fix argument to micro-bip32

This commit is contained in:
fiatjaf
2021-12-31 23:09:43 -03:00
parent ff4e63ecdf
commit a46568d55c
2 changed files with 4 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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",