chore: add missing script

This commit is contained in:
Derrick Hammer 2023-12-28 01:40:20 -05:00
parent 494c7e9ac3
commit 15758f442a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
import { HDKey } from "ed25519-keygen/hdkey";
import * as bip39 from "@scure/bip39";
import { wordlist } from "@scure/bip39/wordlists/english";
const BIP44_PATH = "m/44'/1627'/0'/0'/0'";
const mn = bip39.generateMnemonic(wordlist);
console.log(mn);
const hdkey = HDKey.fromMasterSeed(await bip39.mnemonicToSeed(mn));
console.log(Buffer.from(hdkey.derive(BIP44_PATH).publicKeyRaw).toString("hex"));