Last updated 11 months ago
async function nip04.encrypt(pubkey, plaintext): string
returns ciphertext and iv as specified in nip-04
pubkey â required string the publick key
pubkey
string
message â required string a string to sign
message
const provider = (window.$onekey && window.$onekey.nostr) || window.nostr; const encrypted = async provider.nip04.encrypt(pubkey, "Data to be encrypted")