mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
nip04 string key is actually x and y, so we must get only 32 bytes of x.
This commit is contained in:
2
nip04.js
2
nip04.js
@@ -37,6 +37,6 @@ export function decrypt(privkey, pubkey, ciphertext) {
|
||||
|
||||
function getNormalizedX(key) {
|
||||
return typeof key === 'string'
|
||||
? key.substr(2)
|
||||
? key.substr(2, 64)
|
||||
: Buffer.from(key.slice(1)).toString('hex')
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nostr-tools",
|
||||
"version": "0.21.2",
|
||||
"version": "0.21.3",
|
||||
"description": "Tools for making a Nostr client.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user