Value Transfer
TxTypeValueTransfer는 사용자가 KAIA를 전송하고자 할 때 사용됩니다.
- As kaia provides multiple transaction types to make each transaction type serve a single purpose, TxTypeValueTransfer is limited to send KAIA to an externally owned account (EOA).
feeDelegation
Import the ethers and @kaiachain/ethers-ext packages to add kaia features on ethers.js
Define sender address, sender private key and reciever address
Set up the provider with the specified kairos testnet URL. A provider in ethers is a read-only abstraction to access the blockchain data.
Also, you can change the provider URL from kairos to quicknode
Create sender and fee payer wallets from private keys.
Declare transaction with the fields such as type, from, to, value.
Populating transaction with additional information with senderWallet.populateTransaction
Signing the transaction with the sender's private key
Send the transaction to blockchain using fee payer's wallet. Function sendTransactionAsFeePayer
adds a signature with FeePayer’s private key to the sender’s signature and transmits it to the blockchain network.
Wait for the transaction receipt.