mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
fix and update nip06.
This commit is contained in:
4
nip06.js
4
nip06.js
@@ -8,13 +8,13 @@ import {HDKey} from 'micro-bip32'
|
||||
|
||||
export function privateKeyFromSeed(seed) {
|
||||
let root = HDKey.fromMasterSeed(Buffer.from(seed, 'hex'))
|
||||
return Buffer.from(root.derive(`m/44'/1237'/0'/0'`).privateKey).toString(
|
||||
return Buffer.from(root.derive(`m/44'/1237'/0'/0/0`).privateKey).toString(
|
||||
'hex'
|
||||
)
|
||||
}
|
||||
|
||||
export function seedFromWords(mnemonic) {
|
||||
return Buffer.from(mnemonicToSeedSync(mnemonic, wordlist)).toString('hex')
|
||||
return Buffer.from(mnemonicToSeedSync(mnemonic)).toString('hex')
|
||||
}
|
||||
|
||||
export function generateSeedWords() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nostr-tools",
|
||||
"version": "0.16.2",
|
||||
"version": "0.17.0",
|
||||
"description": "Tools for making a Nostr client.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user