@@ -4,13 +4,11 @@ use std::collections::HashMap;
44use std:: sync:: Arc ;
55
66use arc_swap:: ArcSwap ;
7- use bitcoin:: bip32:: { DerivationPath , Xpriv } ;
8- use bitcoin:: secp256k1;
97use cdk_common:: common:: { PaymentProcessorKey , QuoteTTL } ;
108#[ cfg( feature = "auth" ) ]
119use cdk_common:: database:: MintAuthDatabase ;
1210use cdk_common:: database:: { self , MintDatabase } ;
13- use cdk_common:: nuts:: { self , BlindSignature , BlindedMessage , CurrencyUnit , Id , Kind , MintKeySet } ;
11+ use cdk_common:: nuts:: { self , BlindSignature , BlindedMessage , CurrencyUnit , Id , Kind } ;
1412use cdk_common:: secret;
1513use cdk_signatory:: signatory:: { Signatory , SignatoryKeySet } ;
1614use futures:: StreamExt ;
@@ -26,7 +24,6 @@ use crate::cdk_payment::{self, MintPayment};
2624use crate :: error:: Error ;
2725use crate :: fees:: calculate_fee;
2826use crate :: nuts:: * ;
29- use crate :: util:: unix_time;
3027use crate :: Amount ;
3128#[ cfg( feature = "auth" ) ]
3229use crate :: OidcClient ;
@@ -537,39 +534,6 @@ impl Mint {
537534 }
538535}
539536
540- /// Generate new [`MintKeySetInfo`] from path
541- #[ instrument( skip_all) ]
542- fn create_new_keyset < C : secp256k1:: Signing > (
543- secp : & secp256k1:: Secp256k1 < C > ,
544- xpriv : Xpriv ,
545- derivation_path : DerivationPath ,
546- derivation_path_index : Option < u32 > ,
547- unit : CurrencyUnit ,
548- max_order : u8 ,
549- input_fee_ppk : u64 ,
550- ) -> ( MintKeySet , MintKeySetInfo ) {
551- let keyset = MintKeySet :: generate (
552- secp,
553- xpriv
554- . derive_priv ( secp, & derivation_path)
555- . expect ( "RNG busted" ) ,
556- unit,
557- max_order,
558- ) ;
559- let keyset_info = MintKeySetInfo {
560- id : keyset. id ,
561- unit : keyset. unit . clone ( ) ,
562- active : true ,
563- valid_from : unix_time ( ) ,
564- valid_to : None ,
565- derivation_path,
566- derivation_path_index,
567- max_order,
568- input_fee_ppk,
569- } ;
570- ( keyset, keyset_info)
571- }
572-
573537#[ cfg( test) ]
574538mod tests {
575539 use std:: str:: FromStr ;
0 commit comments