Legacy Account Key
AccountKeyLegacy
Import extend from web3py_ext to extend web3 to kaia web3
Import necessary utils from eth_account, web3py_ext and cytools
Create a Web3 instance with the specified kairos testnet URL
Also, you can change the provider URL from kairos to quicknode.
Load an account from private key
Creating an empty transaction of type TxType.ACCOUNT_UPDATE. You can use empty_tx util to get a tx with default fields filled.
Merge additional fields like sender and keys into the empty tx by using the merge util.
In this case, the account key to update is the legacy key.
Use fill_transaction to add more params to transaction object like gas limit...
You can use the to_pretty util to print the formatted tx.
Sign the account update tx type. You must sign it with the loaded account
Sending the signed transaction to the network and waiting receipt until it is completely executed in the blockchain