Account Update
Import the ethers and @kaiachain/viem-ext packages to add kaia features on web3
Specify the kairos chain configuration to connect to the Kaia Kairos testnet.
Set up a wallet client using createWalletClient, configured with the Kairos chain, an HTTP transport, and the sender’s private key converted to an account.
Generate the public key from the sender’s private key using ethers.SigningKey.computePublicKey. The true parameter ensures the key is compressed.
Create a transaction request for the account update using prepareTransactionRequest, specifying the transaction type, sender account, recipient address, and the new public key.
Sign the prepared transaction using the wallet client’s signTransaction method.
Send the signed transaction to the Kaia blockchain using the kaia_sendRawTransaction method and log the transaction hash.