From b50b8e8ced882d7d46b5a3dd3b598e540b705149 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 18 Dec 2022 14:00:22 -0500 Subject: [PATCH] *Make bip44 path a constant --- src/lib/seed.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/seed.ts b/src/lib/seed.ts index 227f942..9ccde2b 100644 --- a/src/lib/seed.ts +++ b/src/lib/seed.ts @@ -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() {