nostr-websocket-utils

nostr-websocket-utils v0.3.0


nostr-websocket-utils / createEncryptedDM

Function: createEncryptedDM()

createEncryptedDM(content, recipientPubkey, senderPrivkey, tags): Promise<NostrWSMessage>

Creates an encrypted direct message event

Parameters

content

string

Message content to encrypt

recipientPubkey

string

Recipient’s public key

senderPrivkey

string

Sender’s private key

tags

string[][] = []

Additional tags for the event

Returns

Promise<NostrWSMessage>

Encrypted message event

Defined in

nips/nip-04.ts:24