*Private key must be full 64 bit private key
This commit is contained in:
parent
2c22c88e30
commit
f71d8f8685
|
@ -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]),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue