@@ -15,7 +15,7 @@ use secp256k1::rand::{CryptoRng, Rng};
1515use secp256k1:: { Secp256k1 , Signing , Verification } ;
1616use serde_json:: { json, Value } ;
1717
18- #[ cfg( all( feature = "std" , feature = "nip04 " , feature = "nip46" ) ) ]
18+ #[ cfg( all( feature = "std" , feature = "nip44 " , feature = "nip46" ) ) ]
1919use crate :: nips:: nip46:: Message as NostrConnectMessage ;
2020use crate :: nips:: nip62:: VanishTarget ;
2121use crate :: prelude:: * ;
@@ -876,15 +876,20 @@ impl EventBuilder {
876876 ///
877877 /// <https://github.com/nostr-protocol/nips/blob/master/46.md>
878878 #[ inline]
879- #[ cfg( all( feature = "std" , feature = "nip04 " , feature = "nip46" ) ) ]
879+ #[ cfg( all( feature = "std" , feature = "nip44 " , feature = "nip46" ) ) ]
880880 pub fn nostr_connect (
881881 sender_keys : & Keys ,
882882 receiver_pubkey : PublicKey ,
883883 msg : NostrConnectMessage ,
884884 ) -> Result < Self , Error > {
885885 Ok ( Self :: new (
886886 Kind :: NostrConnect ,
887- nip04:: encrypt ( sender_keys. secret_key ( ) , & receiver_pubkey, msg. as_json ( ) ) ?,
887+ nip44:: encrypt (
888+ sender_keys. secret_key ( ) ,
889+ & receiver_pubkey,
890+ msg. as_json ( ) ,
891+ nip44:: Version :: default ( ) ,
892+ ) ?,
888893 )
889894 . tag ( Tag :: public_key ( receiver_pubkey) ) )
890895 }
0 commit comments