nostr-websocket-utils

nostr-websocket-utils v0.3.16


nostr-websocket-utils / createEncryptedDM44

Function: createEncryptedDM44()

createEncryptedDM44(content, recipientPubkey, senderPrivkey, tags?, kind?): NostrWSMessage

Defined in: nips/nip-44.ts:79

Creates an encrypted direct message event using NIP-44

Parameters

content

string

Message content to encrypt

recipientPubkey

string

Recipient’s public key (hex)

senderPrivkey

string

Sender’s private key (hex)

tags?

string[][] = []

Additional tags for the event

kind?

number = ENCRYPTED_DM_KIND_44

Event kind (defaults to ENCRYPTED_DM_KIND_44)

Returns

NostrWSMessage

Encrypted message event as NostrWSMessage