이 페이지는 영어로 된 기계 번역을 사용하므로 오류나 불명확한 언어가 포함될 수 있습니다. 가장 정확한 정보는 영어 원문을 참조하시기 바랍니다. 잦은 업데이트로 인해 일부 콘텐츠는 원래 영어로 되어 있을 수 있습니다. Crowdin에서 이 페이지의 번역을 개선하는 데 동참하여 도움을 주세요. (Crowdin translation page, Contributing guide)
Legacy Account Key
Import necessary classes from the Web3j and kaia libraries(web3j-ext
).
Create a Web3j instance with the specified BAOBAB_URL
Also, you can change the default provider. For example, using the alchemy provider.
Create a credential from private key
Gas price and gas limit settings
Set the sender address equal to the loaded credential's address
Get chain ID from the network
Set the receiver address equal to any valid address
Get the nonce for the sender's address
Set the value to transfer
Set transaction type as VALUE_TRANSFER
Create a raw transaction for value transfer
Sign the transaction
Send the signed transaction to kaia network
Recover the sender address from signed transaction and compare it to the from address
Shut down the Web3j instance