mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
cut out the first byte of pubkeys.
This commit is contained in:
6
keys.js
6
keys.js
@@ -13,7 +13,7 @@ export function generatePrivateKey() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getPublicKey(privateKey) {
|
export function getPublicKey(privateKey) {
|
||||||
return Buffer.from(
|
return Buffer.from(pointFromScalar(Buffer.from(privateKey, 'hex'), true))
|
||||||
pointFromScalar(Buffer.from(privateKey, 'hex'), true)
|
.toString('hex')
|
||||||
).toString('hex')
|
.slice(2)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "0.12.2",
|
"version": "0.12.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