*Private key must be full 64 bit private key

This commit is contained in:
Derrick Hammer 2022-12-31 13:30:16 -05:00
parent 2c22c88e30
commit f71d8f8685
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 1 deletions

View File

@ -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]),
};
}