*Make bip44 path a constant

This commit is contained in:
Derrick Hammer 2022-12-18 14:00:22 -05:00
parent 37b0e824c4
commit b50b8e8ced
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@ import * as bip39 from "@scure/bip39";
import { wordlist } from "@scure/bip39/wordlists/english";
import { errorExit } from "./error.js";
const BIP44_PATH = "m/44'/1627'/0'/0'/0'";
export function getSeed() {
const seed = config.str("seed");
@ -16,7 +18,7 @@ export function getSeed() {
}
export function getHDKey(): HDKey {
return HDKey.fromMasterSeed(getSeed()).derive("m/44'/1627'/0'/0'/0'");
return HDKey.fromMasterSeed(getSeed()).derive(BIP44_PATH);
}
export function getKeyPair() {