Compare commits

...

2 Commits

Author SHA1 Message Date
fiatjaf
6786641b1d are you kidding me? 2022-01-25 17:06:26 -03:00
fiatjaf
0396db5ed6 nip04 string key is actually x and y, so we must get only 32 bytes of x. 2022-01-25 16:25:10 -03:00
2 changed files with 3 additions and 3 deletions

View File

@@ -37,6 +37,6 @@ export function decrypt(privkey, pubkey, ciphertext) {
function getNormalizedX(key) {
return typeof key === 'string'
? key.substr(2)
: Buffer.from(key.slice(1)).toString('hex')
? key.substr(2, 64)
: Buffer.from(key.slice(1, 33)).toString('hex')
}

View File

@@ -1,6 +1,6 @@
{
"name": "nostr-tools",
"version": "0.21.2",
"version": "0.21.4",
"description": "Tools for making a Nostr client.",
"repository": {
"type": "git",