refactor: rename proof to payment_preimage

This commit is contained in:
thesimplekid
2023-12-18 22:55:26 +00:00
parent 5c5d0bf888
commit 299d4c9c05
2 changed files with 4 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ pub struct MeltBolt11Response {
/// Indicate if payment was successful
pub paid: bool,
/// Bolt11 preimage
pub payment_preimage: String,
pub payment_preimage: Option<String>,
}
/// Melt Settings

View File

@@ -14,7 +14,7 @@ pub struct MeltBolt11Request {
/// Proofs
pub inputs: Proofs,
/// Blinded Message that can be used to return change [NUT-08]
/// Amount field of blindedMessages `SHOULD` be set to zero
/// Amount field of BlindedMessages `SHOULD` be set to zero
pub outputs: Option<Vec<BlindedMessage>>,
}
@@ -31,12 +31,11 @@ impl MeltBolt11Request {
}
/// Melt Response [NUT-08]
/// Lightning fee return [NUT-08] if change is defined
/// Lightning fee return [NUT-08]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct MeltBolt11Response {
pub paid: bool,
// REVIEW: https://github.com/cashubtc/nuts/pull/55#discussion_r1419991818
pub proof: String,
pub payment_preimage: Option<String>,
pub change: Option<Vec<BlindedSignature>>,
}