Send Transaction

This page introduces the basic concepts about Klaytn transaction with regard to KAS Wallet API.

What is Transaction?

A transaction in KAS is just same as a Klaytn 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 Klaytn without any problem to record, delete, or modify data on the blockchain.

For details about Klaytn transaction, please visit here.

Transactions can be sent to Klaytn 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 Klaytn, a user must sign the transactions with his/her account key, but the KAS Wallet API executes this action through the user’s Klaytn 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 Klaytn 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 Klaytn.

Transaction Transmission Fee occurs in the transaction sending stage.

Execute Transaction

“Executing” a transaction means executing the transaction after it was sucessfully sent to Klaytn. 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 Klaytn.

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 Klaytn.

status=4

Committed

A sent transition is successfully executed.

status=5, Be checked using the transaction information search API.

CommittedError

A sent transition failed to be executed.

status=6

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.

“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 KLAY to another EOA in Klaytn

direct payment or fee-delegation of transaction fee

Deploy smart contract on Klaytn

direct payment or fee-delegation of transaction fee

Execute deployed smart contract

direct payment or fee-delegation of transaction fee

Cancel the transmission of a transaction which is in pending state

direct payment or fee-delegation of transaction fee

Send a transaction which is represented in RLP-encoded string

direct payment or fee-delegation of transaction fee

Update AccountKey to AccountMultiSig or AccountKeyRoleBased

direct payment or fee-delegation of transaction fee

Anchor service chain data to Klaytn main chain

direct payment or fee-delegation of transaction fee

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 legacy transaction, get transaction information

For details about this API, please visit here. For inquires about this document or KAS, please visit KAS Developer forum.

Last updated