getConversationKey

Derives a conversation key from an ECDH shared secret.

Uses HKDF-Extract with salt "nip44-v2" to derive a conversation key that can be used for multiple messages between the same two parties.

Return

The 32-byte conversation key

Parameters

sharedSecret

The 32-byte ECDH shared secret

Throws

if shared secret is not 32 bytes