Skip to content

Latest commit

 

History

History
47 lines (24 loc) · 805 Bytes

createEncryptedDM.md

File metadata and controls

47 lines (24 loc) · 805 Bytes

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