deriveStxPrivateKey
Usage
import { deriveStxPrivateKey } from '@stacks/wallet-sdk';
import { HDKey } from '@scure/bip32';
import { mnemonicToSeed } from '@scure/bip39';
const seed = await mnemonicToSeed('your 24-word seed phrase ...');
const rootNode = HDKey.fromMasterSeed(seed);
const stxPrivateKey = deriveStxPrivateKey({ rootNode, index: 0 });
// compressed hex private key stringNotes
Signature
Returns
Parameters
opts (required)
Property
Type
Description
Last updated
Was this helpful?