new BasicTransactionApi()
- Version:
- 1.0
BasicTransaction service.
Methods
accountUpdateTransaction(xChainId, opts, callback)
AccountUpdateTransaction Create a transaction for updating Klaytn account keys. For more details about the types of Klaytn account keys, refer to the following.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~accountUpdateTransactionCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
anchorTransaction(xChainId, opts, callback)
AnchorTransaction Create a transaction for anchoring service chain data to the Klaytn main chain.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~anchorTransactionCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
cancelTransaction(xChainId, opts, callback)
CancelTransaction Create a transaction for canceling a pending transaction. Either a nonce or transaction hash is required for cancellation.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~cancelTransactionCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
contractCall(xChainId, opts, callback)
ContractCall You can view certain value in the contract and validate that you can submit executable transaction.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~contractCallCallback | The callback function, accepting three arguments: error, data, response data is of type: ContractCallResponse |
contractDeployTransaction(xChainId, opts, callback)
ContractDeployTransaction Create a transaction for deploying a contract.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~contractDeployTransactionCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
contractExecutionTransaction(xChainId, opts, callback)
ContractExecutionTransaction Create a transaction for executing a released contract function.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~contractExecutionTransactionCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
legacyTransaction(xChainId, opts, callback)
LegacyTransaction Create a transaction that supports legacy accounts (which have a public key that is derived from a private key) and transaction formats. Through KAS, any Klaytn account will be created as a legacy account by default.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~legacyTransactionCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
processRLP(xChainId, opts, callback)
ProcessRLP Create a transaction using the rlp(SigRLP or TxHashRLP). Rlp value from transaction API is TxHashRLP format which contains signatures. SigRLP which does not contain signatures can easily be made from caver.
If you want to make SigRLP, you can use methodgetRLPEncodingForSignature()
of certain transaction object. If you want to make TxHashRLP, you can use method getRLPEncoding()
of certain transaction object. If you give SigRLP in rlp value, we sign the trasnaction using from
address in your account pool. If you need detail description about SigRLP, TxHashRLP of each of transaction, you can refer Klaytn Docs.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~processRLPCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
transactionReceipt(xChainId, transactionHash, callback)
TransactionReceipt Search for the transaction execution result using the transaction hash value. The status field of the response indicates if the execution is successful.
Parameters:
Name | Type | Description |
---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
transactionHash |
String | Transaction hash value |
callback |
BasicTransactionApi~transactionReceiptCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionReceipt |
valueTransferTransaction(xChainId, opts, callback)
ValueTransferTransaction Create a transaction for transferring KLAYs with or without a memo.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
xChainId |
String | Klaytn chain network ID (1001 or 8217) |
||||||
opts |
Object | Optional parameters Properties
|
||||||
callback |
BasicTransactionApi~valueTransferTransactionCallback | The callback function, accepting three arguments: error, data, response data is of type: TransactionResult |
Type Definitions
accountUpdateTransactionCallback(error, data, response)
Callback function to receive the result of the accountUpdateTransaction operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |
anchorTransactionCallback(error, data, response)
Callback function to receive the result of the anchorTransaction operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |
cancelTransactionCallback(error, data, response)
Callback function to receive the result of the cancelTransaction operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |
contractCallCallback(error, data, response)
Callback function to receive the result of the contractCall operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
ContractCallResponse | The data returned by the service call. |
response |
String | The complete HTTP response. |
contractDeployTransactionCallback(error, data, response)
Callback function to receive the result of the contractDeployTransaction operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |
contractExecutionTransactionCallback(error, data, response)
Callback function to receive the result of the contractExecutionTransaction operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |
legacyTransactionCallback(error, data, response)
Callback function to receive the result of the legacyTransaction operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |
processRLPCallback(error, data, response)
Callback function to receive the result of the processRLP operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |
transactionReceiptCallback(error, data, response)
Callback function to receive the result of the transactionReceipt operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionReceipt | The data returned by the service call. |
response |
String | The complete HTTP response. |
valueTransferTransactionCallback(error, data, response)
Callback function to receive the result of the valueTransferTransaction operation.
Parameters:
Name | Type | Description |
---|---|---|
error |
String | Error message, if any. |
data |
TransactionResult | The data returned by the service call. |
response |
String | The complete HTTP response. |