generateNewAccount
Usage
import { generateWallet, generateNewAccount } from '@stacks/wallet-sdk';
let wallet = await generateWallet({
secretKey: 'your 24-word seed phrase here ...',
password: 'my-secure-password',
});
console.log(wallet.accounts.length); // 1
// Add a second account
wallet = generateNewAccount(wallet);
console.log(wallet.accounts.length); // 2
// Add a third account
wallet = generateNewAccount(wallet);
console.log(wallet.accounts.length); // 3Notes
Signature
Returns
Parameters
wallet (required)
Last updated
Was this helpful?