cut out the first byte of pubkeys.

This commit is contained in:
fiatjaf
2021-12-29 15:15:53 -03:00
parent 6d4916e6f7
commit 800beb37f1
2 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ export function generatePrivateKey() {
}
export function getPublicKey(privateKey) {
return Buffer.from(
pointFromScalar(Buffer.from(privateKey, 'hex'), true)
).toString('hex')
return Buffer.from(pointFromScalar(Buffer.from(privateKey, 'hex'), true))
.toString('hex')
.slice(2)
}

View File

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