What is Transaction?
A transaction in KAS is just same as a Kaia transaction. Sending a transaction means uploading the data to the blockchain, modifying or deleting uploaded data on the blockchain, or executing a smart contract deployed to the blockchain. As such, sending a blockchain means changing the "blockchain state." A transaction that you "Send" must be "Executed" in Kaia without any problem to record, delete, or modify data on the blockchain.
info
For details about Kaia transaction, please visit here.
Transactions can be sent to Kaia without operating the blockchain node with KAS Wallet API.
What is Signing?
Signing is a form of credential for proving the identity of the sender of the transactions. To send a transaction to Kaia, a user must sign the transactions with his/her account key, but the KAS Wallet API executes this action through the user’s Kaia account. Then, enter the required parameters when calling the KAS Wallet API to send transactions without directly signing them.
Create, Send, Execute Transaction
Create Transaction
"Creating" a transaction means formatting the transaction for sending to Kaia and letting the transaction sender sign (from
) the transaction. As such, the KAS Wallet API formats the transaction automatically for the user to sign. Enter the required parameters when calling the KAS Wallet API to send the transactions without directly formatting and signing them.
Send Transaction
"Sending" a transaction means sending the formatted and signed transaction to Kaia.
info
Transaction Transmission Fee occurs in the transaction sending stage.
Execute Transaction
"Executing" a transaction means executing the transaction after it was sucessfully sent to Kaia. In this stage, new data is recorded to the blockchain, or existing data is deleted or modified.
Transaction Status
A transaction can have one of the following states
Item | Description | Note |
---|---|---|
Pending | The number of signatures made for a transaction is insufficient, so the transaction is pending and not sent to Kaia. | status=2 |
Signed | Only some accounts have signed the transaction, so the number of signatures for sending the transaction is still incomplete. | status=3 |
Submitted | A transaction has successfully been sent to Kaia. | status=4 |
Committed | A sent transition is successfully executed. | status=5 , Be checked using the transaction information search API. |
CommitError | A sent transition failed to be executed. | status=6 |
info
The transaction will automatically be sent if a transaction receives all required signatures.
Transaction Types
For more details on transaction types, refer to the followings.
info
typeInt
variable is a value for identifying the transaction type.
Sending Transactions with KAS Wallet API
With the KAS Wallet API, different types of transactions can be sent to Klaytn.
Item | Description | Note |
---|---|---|
Send KAIA | Send KAIA to another EOA in Kaia | direct payment or fee-delegation of transaction fee |
Deploy Smart Contract | Deploy smart contract on Kaia | direct payment or fee-delegation of transaction fee |
Execute Smart Contract | Execute deployed smart contract | direct payment or fee-delegation of transaction fee |
Cancel Pending Transaction | Cancel the transmission of a transaction which is in pending state | direct payment or fee-delegation of transaction fee |
Send RLP-encoded Transaction | Send a transaction which is represented in RLP-encoded string | direct payment or fee-delegation of transaction fee |
Update AccountKey | Update AccountKey to AccountMultiSig or AccountKeyRoleBased | direct payment or fee-delegation of transaction fee |
Data Anchoring | Anchor service chain data to Kaia main chain | direct payment or fee-delegation of transaction fee |
Send Multiple Signing Transaction | Send a transaction with AccountKeyWeightedMultiSig, which is the case that requires multiple signatures from several accounts | direct payment or fee-delegation of transaction fee |
Send Other Transactions | Send legacy transaction, get transaction information |
For details about this API, please visit here. For inquires about this document or KAS, please visit KAS Developers Forum.