mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +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) {
|
function getNormalizedX(key) {
|
||||||
return typeof key === 'string'
|
return typeof key === 'string'
|
||||||
? key.substr(2)
|
? key.substr(2, 64)
|
||||||
: Buffer.from(key.slice(1)).toString('hex')
|
: Buffer.from(key.slice(1)).toString('hex')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "0.21.2",
|
"version": "0.21.3",
|
||||||
"description": "Tools for making a Nostr client.",
|
"description": "Tools for making a Nostr client.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user