Account
Usage
import { generateWallet, getStxAddress, Account } from '@stacks/wallet-sdk';
const wallet = await generateWallet({
secretKey: 'your 24-word seed phrase ...',
password: 'password',
});
const account: Account = wallet.accounts[0];
console.log(account.index); // 0
console.log(account.stxPrivateKey); // hex string — used for STX transactions
console.log(account.dataPrivateKey); // hex string — used for Gaia/profiles
console.log(account.appsKey); // xprv... — root for app-specific keys
console.log(account.salt); // hex string — wallet-level saltDefinition
Properties
Property
Type
Description
Last updated
Was this helpful?