Cancel
TxTypeCancel cancels the execution of the transaction with the same nonce in the transaction pool. This transaction type is useful when a submitted transaction seems unprocessed for a certain amount of time.
Fee Delegation
Import the @kaiachain/viem-ext packages to add kaia features on web3
Set up sender and fee payer wallets using createWalletClient, configured with the Kairos chain, an HTTP transport, and the sender’s private key converted to an account.
Create a transaction request for a value transfer using prepareTransactionRequest, specifying the sender’s account and transaction type (TxType.FeeDelegatedCancel).
Signing the transaction with the wallet client’s signTransaction method, and log the transaction hash.
The fee payer signs the already-signed transaction from the sender with function signTransactionAsFeePayer
, agreeing to pay the transaction fees.
Sends the fully signed, fee-delegated transaction (signed by both sender and fee payer) to the Kairos blockchain network using the kaia_sendRawTransaction
method, returning the transaction hash or response from the network.