I write a simple pancakeswap bot and i need to sign the tx, but the tutorials are only for signing with mnemonic, which i dont want to use.
My code is this:
//const mnemonic = ‘your mnemonic here, to send’;
const privateKey = ‘privateky goes here’
const provider = new ethers.providers.WebSocketProvider(’’);
const wallet = new Wallet(walletMnemonic.privateKey);
//const walletPrivateKey =
//walletMnemonic.address === walletPrivateKey.address
const account = wallet.connect(provider);