@@ -15,7 +15,7 @@ use secp256k1::rand::{CryptoRng, Rng};
15
15
use secp256k1:: { Secp256k1 , Signing , Verification } ;
16
16
use serde_json:: { json, Value } ;
17
17
18
- #[ cfg( all( feature = "std" , feature = "nip04 " , feature = "nip46" ) ) ]
18
+ #[ cfg( all( feature = "std" , feature = "nip44 " , feature = "nip46" ) ) ]
19
19
use crate :: nips:: nip46:: Message as NostrConnectMessage ;
20
20
use crate :: nips:: nip62:: VanishTarget ;
21
21
use crate :: prelude:: * ;
@@ -876,15 +876,20 @@ impl EventBuilder {
876
876
///
877
877
/// <https://github.com/nostr-protocol/nips/blob/master/46.md>
878
878
#[ inline]
879
- #[ cfg( all( feature = "std" , feature = "nip04 " , feature = "nip46" ) ) ]
879
+ #[ cfg( all( feature = "std" , feature = "nip44 " , feature = "nip46" ) ) ]
880
880
pub fn nostr_connect (
881
881
sender_keys : & Keys ,
882
882
receiver_pubkey : PublicKey ,
883
883
msg : NostrConnectMessage ,
884
884
) -> Result < Self , Error > {
885
885
Ok ( Self :: new (
886
886
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
+ ) ?,
888
893
)
889
894
. tag ( Tag :: public_key ( receiver_pubkey) ) )
890
895
}
0 commit comments