import {Keypair} from '@solana/web3.js'; import bs58 from 'bs58'; const newWallet = Keypair.generate(); console.log(newWallet.publicKey.toBase58()); console.log(bs58.encode(newWallet.secretKey));