import { generateWallet, generateSecretKey } from '@stacks/wallet-sdk';
import { privateKeyToAddress } from '@stacks/transactions'
// Generate a new wallet with a new 24-word seed phrase
const secretKey = generateSecretKey(256); // 256 bits = 24 words
const wallet = await generateWallet({
secretKey,
password: 'your-secure-password',
});
// Access the first account
const account = wallet.accounts[0];
const mainnetAddress = privateKeyToAddress(account.stxPrivateKey, 'mainnet');
console.log('Mnemonic:', secretKey);
console.log('Address:', mainnetAddress