nip04.encrypt

Method

async function nip04.encrypt(pubkey: string, plaintext: string): string;

Response

Returns ciphertext and iv as specified in nip-04.

https://github.com/nostr-protocol/nips/blob/master/04.md

Code Example

const encrypted = await window.nostr.nip04.encrypt(pubkey, "Secret message");

Last updated

Logo

Your bitcoin & nostr companion / from ๐Ÿ with ๐Ÿงก