mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 16:48:50 +00:00
replace micro-bip with @scure/bip, fix #25
This commit is contained in:
6
nip06.js
6
nip06.js
@@ -1,10 +1,10 @@
|
|||||||
import {wordlist} from 'micro-bip39/wordlists/english.js'
|
import {wordlist} from '@scure/bip39/wordlists/english.js'
|
||||||
import {
|
import {
|
||||||
generateMnemonic,
|
generateMnemonic,
|
||||||
mnemonicToSeedSync,
|
mnemonicToSeedSync,
|
||||||
validateMnemonic
|
validateMnemonic
|
||||||
} from 'micro-bip39'
|
} from '@scure/bip39'
|
||||||
import {HDKey} from 'micro-bip32'
|
import {HDKey} from '@scure/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'))
|
||||||
|
|||||||
@@ -10,12 +10,12 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@noble/hashes": "^0.5.7",
|
"@noble/hashes": "^0.5.7",
|
||||||
"@noble/secp256k1": "^1.5.2",
|
"@noble/secp256k1": "^1.5.2",
|
||||||
|
"@scure/bip32": "^1.1.1",
|
||||||
|
"@scure/bip39": "^1.1.0",
|
||||||
"browserify-cipher": ">=1",
|
"browserify-cipher": ">=1",
|
||||||
"buffer": ">=5",
|
"buffer": ">=5",
|
||||||
"create-hash": "^1.2.0",
|
"create-hash": "^1.2.0",
|
||||||
"cross-fetch": "^3.1.4",
|
"cross-fetch": "^3.1.4",
|
||||||
"micro-bip32": "^0.1.0",
|
|
||||||
"micro-bip39": "^0.1.3",
|
|
||||||
"websocket-polyfill": "^0.0.3"
|
"websocket-polyfill": "^0.0.3"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Reference in New Issue
Block a user