diff --git a/nip04.js b/nip04.js index 88aab2c..4c0b011 100644 --- a/nip04.js +++ b/nip04.js @@ -38,5 +38,5 @@ export function decrypt(privkey, pubkey, ciphertext) { function getNormalizedX(key) { return typeof key === 'string' ? key.substr(2, 64) - : Buffer.from(key.slice(1)).toString('hex') + : Buffer.from(key.slice(1, 33)).toString('hex') } diff --git a/package.json b/package.json index 3b4e976..c63fc6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nostr-tools", - "version": "0.21.3", + "version": "0.21.4", "description": "Tools for making a Nostr client.", "repository": { "type": "git",