From 661a6a14a01d9a91a4a0420ff6ec680650a266fd Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Wed, 30 Oct 2024 10:29:19 +0000 Subject: [PATCH] feat: add promises response to restore --- crates/cdk/src/mint/mod.rs | 3 ++- crates/cdk/src/nuts/nut09.rs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/cdk/src/mint/mod.rs b/crates/cdk/src/mint/mod.rs index 7c726059..f0a7c2ce 100644 --- a/crates/cdk/src/mint/mod.rs +++ b/crates/cdk/src/mint/mod.rs @@ -447,7 +447,8 @@ impl Mint { Ok(RestoreResponse { outputs, - signatures, + signatures: signatures.clone(), + promises: Some(signatures), }) } diff --git a/crates/cdk/src/nuts/nut09.rs b/crates/cdk/src/nuts/nut09.rs index abcd8f85..5f04045f 100644 --- a/crates/cdk/src/nuts/nut09.rs +++ b/crates/cdk/src/nuts/nut09.rs @@ -22,6 +22,9 @@ pub struct RestoreResponse { pub outputs: Vec, /// Signatures pub signatures: Vec, + /// Promises + // Temp compatibility with cashu-ts + pub promises: Option>, } mod test {