mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
800beb37f1 |
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