diff --git a/src/lib/seed.ts b/src/lib/seed.ts index a78e6d1..6355b8a 100644 --- a/src/lib/seed.ts +++ b/src/lib/seed.ts @@ -3,6 +3,7 @@ import config from "../config"; import * as bip39 from "@scure/bip39"; import { wordlist } from "@scure/bip39/wordlists/english"; import { errorExit } from "./error.js"; +import b4a from "b4a"; const BIP44_PATH = "m/44'/1627'/0'/0'/0'"; @@ -24,5 +25,8 @@ export function getHDKey(): HDKey { export function getKeyPair(): { publicKey: Uint8Array; secretKey: Uint8Array } { const key = getHDKey(); - return { publicKey: key.publicKeyRaw, secretKey: key.privateKey }; + return { + publicKey: key.publicKeyRaw, + secretKey: b4a.concat([key.privateKey, key.publicKeyRaw]), + }; }