From c66a2acda1a9103e0c1b011e935d42bc61a18e40 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 24 Jan 2022 21:00:51 -0300 Subject: [PATCH] encrypt uint8array to hex. --- nip04.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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",