@@ -10,7 +10,7 @@ use bitcoin::{
1010 self , Keypair , Message , PublicKey , SECP256K1 , Scalar , SecretKey , rand, schnorr:: Signature ,
1111 } ,
1212} ;
13- use nostr_sdk :: ToBech32 ;
13+ use nostr :: ToBech32 ;
1414use thiserror:: Error ;
1515
1616pub type Result < T > = std:: result:: Result < T , Error > ;
@@ -20,12 +20,6 @@ pub enum Error {
2020 #[ error( "Private key error: {0}" ) ]
2121 PrivateKey ( #[ from] secp256k1:: Error ) ,
2222
23- #[ error( "Nostr key error: {0}" ) ]
24- NostrKey ( #[ from] nostr_sdk:: key:: Error ) ,
25-
26- #[ error( "Nostr bech32 key error: {0}" ) ]
27- NostrNip19 ( #[ from] nostr_sdk:: nips:: nip19:: Error ) ,
28-
2923 #[ error( "Ecies encryption error: {0}" ) ]
3024 Ecies ( String ) ,
3125
@@ -111,8 +105,8 @@ impl BcrKeys {
111105 }
112106
113107 /// Returns the key pair as a nostr key pair
114- pub fn get_nostr_keys ( & self ) -> nostr_sdk :: Keys {
115- nostr_sdk :: Keys :: new ( self . inner . secret_key ( ) . into ( ) )
108+ pub fn get_nostr_keys ( & self ) -> nostr :: Keys {
109+ nostr :: Keys :: new ( self . inner . secret_key ( ) . into ( ) )
116110 }
117111
118112 /// Returns the nostr public key as an XOnlyPublicKey hex string
@@ -172,7 +166,7 @@ pub fn is_node_id_nostr_hex_npub(node_id: &str, npub: &str) -> bool {
172166 Ok ( pub_key) => pub_key,
173167 Err ( _) => return false ,
174168 } ;
175- match nostr_sdk :: PublicKey :: from_hex ( & x_only_pub_key) {
169+ match nostr :: PublicKey :: from_hex ( & x_only_pub_key) {
176170 Ok ( npub_from_node_id) => npub == npub_from_node_id. to_hex ( ) ,
177171 Err ( _) => false ,
178172 }
@@ -738,14 +732,14 @@ mod tests {
738732 npub_as_hex. to_string( )
739733 ) ;
740734 let npub =
741- nostr_sdk :: PublicKey :: from_hex ( & get_nostr_npub_as_hex_from_node_id ( node_id) . unwrap ( ) )
735+ nostr :: PublicKey :: from_hex ( & get_nostr_npub_as_hex_from_node_id ( node_id) . unwrap ( ) )
742736 . unwrap ( ) ;
743737 assert_eq ! ( npub. to_hex( ) , npub_as_hex) ;
744738 assert_eq ! (
745739 get_nostr_npub_as_hex_from_node_id( TEST_NODE_ID_SECP ) . unwrap( ) ,
746740 TEST_NODE_ID_SECP_AS_NPUB_HEX . to_string( )
747741 ) ;
748- let npub = nostr_sdk :: PublicKey :: from_hex (
742+ let npub = nostr :: PublicKey :: from_hex (
749743 & get_nostr_npub_as_hex_from_node_id ( TEST_NODE_ID_SECP ) . unwrap ( ) ,
750744 )
751745 . unwrap ( ) ;
0 commit comments