Explorar el Código

fix: bolt12 is nut25 (#1020)

thesimplekid hace 2 meses
padre
commit
7246ea2e10

+ 2 - 0
CHANGELOG.md

@@ -13,6 +13,8 @@
 - cdk-common: Refactored `MintPayment` trait method `wait_any_incoming_payment` to `wait_payment_event` with event-driven architecture ([thesimplekid]).
 - cdk-common: Updated `wait_payment_event` return type to stream `Event` enum instead of `WaitPaymentResponse` directly ([thesimplekid]).
 - cdk: Updated mint payment handling to process payment events through new `Event` enum pattern ([thesimplekid]).
+- cashu: Updated BOLT12 payment method specification from NUT-24 to NUT-25 ([thesimplekid]).
+- cdk: Updated BOLT12 import references from nut24 to nut25 module ([thesimplekid]).
 
 ## [0.12.0](https://github.com/cashubtc/cdk/releases/tag/v0.12.0)
 

+ 2 - 0
README.md

@@ -87,6 +87,7 @@ gossip_source_type = "rgs"
 | [21][21] | Clear Authentication | :heavy_check_mark: |
 | [22][22] | Blind Authentication  | :heavy_check_mark: |
 | [23][23] | Payment Method: BOLT11 | :heavy_check_mark: |
+| [25][25] | Payment Method: BOLT12 | :heavy_check_mark: |
 
 
 ## License
@@ -126,3 +127,4 @@ Please see the [development guide](DEVELOPMENT.md).
 [21]: https://github.com/cashubtc/nuts/blob/main/21.md
 [22]: https://github.com/cashubtc/nuts/blob/main/22.md
 [23]: https://github.com/cashubtc/nuts/blob/main/23.md
+[25]: https://github.com/cashubtc/nuts/blob/main/25.md

+ 2 - 2
crates/cashu/src/nuts/mod.rs

@@ -24,7 +24,7 @@ pub mod nut18;
 pub mod nut19;
 pub mod nut20;
 pub mod nut23;
-pub mod nut24;
+pub mod nut25;
 
 #[cfg(feature = "auth")]
 mod auth;
@@ -68,4 +68,4 @@ pub use nut23::{
     MeltOptions, MeltQuoteBolt11Request, MeltQuoteBolt11Response, MintQuoteBolt11Request,
     MintQuoteBolt11Response, QuoteState as MintQuoteState,
 };
-pub use nut24::{MeltQuoteBolt12Request, MintQuoteBolt12Request, MintQuoteBolt12Response};
+pub use nut25::{MeltQuoteBolt12Request, MintQuoteBolt12Request, MintQuoteBolt12Response};

+ 0 - 0
crates/cashu/src/nuts/nut24.rs → crates/cashu/src/nuts/nut25.rs


+ 1 - 1
crates/cdk/src/wallet/issue/issue_bolt12.rs

@@ -1,7 +1,7 @@
 use std::collections::HashMap;
 
 use cdk_common::nut04::MintMethodOptions;
-use cdk_common::nut24::MintQuoteBolt12Request;
+use cdk_common::nut25::MintQuoteBolt12Request;
 use cdk_common::wallet::{Transaction, TransactionDirection};
 use cdk_common::{Proofs, SecretKey};
 use tracing::instrument;