// get to address from walletconst from = wallet.getAddress()// get to address from HD walletconst addressInfo = hdWallet.getAddressNextAddress(0, quais.Zone.Cyprus1)const from = addressInfo.address// build simple transfer transactionconst txData: QuaiTransactionRequest{ from, to: "0x002F4783248e2D6FF1aa6482A8C0D7a76de3C329", value: quais.parseQuai("1.0"),}
The above transaction is a simple value transfer. Additional transaction params for more complex transactions can be found in the QuaiTransaction class.
3
Send and Sign Transaction
Finally, sign and broadcast the transaction using your wallet of choice.
Copy
Ask AI
// send transaction with walletconst tx = await wallet.sendTransaction(txData)const txReceipt = await tx.wait()// send transaction with HD walletconst tx = await hdWallet.sendTransaction(txData)const txReceipt = await tx.wait()