mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
fix argument to micro-bip32
This commit is contained in:
4
nip06.js
4
nip06.js
@@ -8,7 +8,9 @@ import {HDKey} from 'micro-bip32'
|
|||||||
|
|
||||||
export function privateKeyFromSeed(seed) {
|
export function privateKeyFromSeed(seed) {
|
||||||
let root = HDKey.fromMasterSeed(Buffer.from(seed, 'hex'))
|
let root = HDKey.fromMasterSeed(Buffer.from(seed, 'hex'))
|
||||||
return root.derive(`m/44'/1237'/0'/0'`).privateKey.toString('hex')
|
return Buffer.from(root.derive(`m/44'/1237'/0'/0'`).privateKey).toString(
|
||||||
|
'hex'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function seedFromWords(mnemonic) {
|
export function seedFromWords(mnemonic) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "0.14.1",
|
"version": "0.14.2",
|
||||||
"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