mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +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) {
|
||||
return Buffer.from(
|
||||
pointFromScalar(Buffer.from(privateKey, 'hex'), true)
|
||||
).toString('hex')
|
||||
return Buffer.from(pointFromScalar(Buffer.from(privateKey, 'hex'), true))
|
||||
.toString('hex')
|
||||
.slice(2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user