diff --git a/nip04.js b/nip04.js index 1e715b0..e89dcee 100644 --- a/nip04.js +++ b/nip04.js @@ -36,5 +36,5 @@ export function decrypt(privkey, pubkey, ciphertext) { } function getOnlyXFromFullSharedSecret(fullSharedSecretCoordinates) { - return fullSharedSecretCoordinates.substr(2, 64) + return Buffer.from(fullSharedSecretCoordinates).toString('hex').substr(2, 64) } diff --git a/package.json b/package.json index ad93629..336d4b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nostr-tools", - "version": "0.21.0", + "version": "0.21.1", "description": "Tools for making a Nostr client.", "repository": { "type": "git",