Last updated 1 year 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")