Last updated 1 year ago
Was this helpful?
Method
async function nip04.encrypt(pubkey: string, plaintext: string): string;
Response
Returns ciphertext and iv as specified in nip-04.
Code Example
const encrypted = await window.nostr.nip04.encrypt(pubkey, "Secret message");