[Transaction] kaia_sendTransactionAsFeePayer
Constructs a transaction with given parameters, signs the transaction with a fee payer's private key and propagates the transaction to Kaia network. This API supports only fee delegated type (including partial fee delegated type) transactions.
kaia_sendTransactionAsFeePayer
will be failed to baobab/cypress network because it is signed in the EN node, which means that the EN must have the key that you want to sign with.
Steps to test kaia_sendTransactionAsFeePayer
.
- Step 1: Setup a local EN node
- Step 2: Create an account into the EN node
- Step 3: Unlock the account for using in signing
JSONRPC: kaia_sendTransactionAsFeePayer
Request
- application/json
Body
Array [
- TxTypeLegacyTransaction
- TxTypeValueTransfer
- TxTypeFeeDelegatedValueTransfer
- TxTypeFeeDelegatedValueTransferWithRatio
- TxTypeValueTransferMemo
- TxTypeFeeDelegatedValueTransferMemo
- TxTypeFeeDelegatedValueTransferMemoWithRatio
- TxTypeAccountUpdate
- TxTypeFeeDelegatedAccountUpdate
- TxTypeFeeDelegatedAccountUpdateWithRatio
- TxTypeSmartContractDeploy
- TxTypeFeeDelegatedSmartContractDeploy
- TxTypeFeeDelegatedSmartContractDeployWithRatio
- TxTypeSmartContractExecution
- TxTypeFeeDelegatedSmartContractExecution
- TxTypeFeeDelegatedSmartContractExecutionWithRatio
- TxTypeCancel
- TxTypeFeeDelegatedCancel
- TxTypeFeeDelegatedCancelWithRatio
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
]
params
object[]
required
oneOf
TxTypeLegacyTransaction represents a type of transaction existed previously in Kaia. This transaction type exists to support compatibility. For more information, see TxTypeLegacyTransaction.
The address from which the transaction is sent.
(optional when creating a new contract) The address to which the transaction is directed.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice. The transaction fee is calculated by the multiplication of gas and gasPrice.
(optional) Integer of the value sent with this transaction.
The compiled byte code of a contract to deploy or data (function indicator and parameter values) required to call a contract.
(optional) Integer of a nonce.
TxTypeValueTransfer is used when a user wants to send KLAY. For more information, see TxTypeValueTransfer.
The integer indicating TxTypeValueTransfer 8
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice. The transaction fee is calculated by the multiplication of gas and gasPrice.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
Fee delegating version of TxTypeValueTransfer. For more information, see TxTypeFeeDelegatedValueTransfer.
The integer indicating TxTypeFeeDelegatedValueTransfer 9
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice. The transaction fee is calculated by the multiplication of gas and gasPrice.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The address which pays the transaction fee.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
Partial fee delegating version of TxTypeValueTransfer. For more information, see TxTypeFeeDelegatedValueTransferWithRatio.
The integer indicating TxTypeFeeDelegatedValueTransferWithRatio 10
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The fee payer address of the transaction.
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
TxTypeValueTransferMemo is used when a user wants to send KAIA with a specific message. For more information, see TxTypeValueTransferMemo.
The integer indicating TxTypeValueTransferMemo 16
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice. The transaction fee is calculated by the multiplication of gas and gasPrice.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
Fee delegating version of TxTypeValueTransferMemo. For more information, see TxTypeFeeDelegatedValueTransferMemo.
The integer indicating TxTypeFeeDelegatedValueTransferMemo 17
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
The fee payer address of the transaction.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
Partial fee delegating version of TxTypeValueTransferMemo. For more information, see TxTypeFeeDelegatedValueTransferMemoWithRatio.
The integer indicating TxTypeFeeDelegatedValueTransferMemoWithRatio 18
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
The fee payer address of the transaction.
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
TxTypeAccountUpdate updates the key of the given account. For more information, see TxTypeAccountUpdate.
The integer indicating TxTypeAccountUpdate 32
The address from which the transaction is sent.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
The new account key of the from account in RLP encoded format. For more information about the account key, see Account Key.
Fee delegating version of TxTypeAccountUpdate. For more information, see TxTypeFeeDelegatedAccountUpdate.
The integer indicating TxTypeFeeDelegatedAccountUpdate 33
The address from which the transaction is sent.
(optional, default 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
The new account key of the from account in RLP encoded format. For more information about the account key, see Account Key.
The fee payer address of the transaction.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
The integer indicating TxTypeFeeDelegatedAccountUpdateWithRatio: 34
The address from which the transaction is sent.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
The new account key of the from account in RLP encoded format. For more information about the account key, see Account Key.
The fee payer address of the transaction.
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
The integer indicating TxTypeSmartContractDeploy: 40
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
true if the address is humanReadable, false if the address is not humanReadable. Currently, the value should be false. Human-readable addresses will be supported later.
The code format of smart contract code. The value 0 indicates EVM.
The integer indicating TxTypeFeeDelegatedSmartContractDeploy: 41
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
true if the address is humanReadable, false if the address is not humanReadable. Currently, the value should be false. Human-readable addresses will be supported later.
The code format of smart contract code. The value 0 indicates EVM.
The fee payer address of the transaction.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
The integer indicating TxTypeFeeDelegatedSmartContractDeployWithRatio: 42
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
true if the address is humanReadable, false if the address is not humanReadable. Currently, the value should be false. Human-readable addresses will be supported later.
The code format of smart contract code. The value 0 indicates EVM.
The fee payer address of the transaction.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
The integer indicating TxTypeSmartContractExecution: 48
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
The integer indicating TxTypeFeeDelegatedSmartContractExecution: 49
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
The fee payer address of the transaction.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
The integer indicating TxTypeFeeDelegatedSmartContractExecutionWithRatio: 50
The address from which the transaction is sent.
The address to which the transaction is directed.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
Integer of the value sent with this transaction.
The data sent along with the transaction.
The fee payer address of the transaction.
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
The integer indicating TxTypeCancel: 56
The address from which the transaction is sent.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
The integer indicating TxTypeFeeDelegatedCancel: 57
The address from which the transaction is sent.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
The fee payer address of the transaction.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
The integer indicating TxTypeFeeDelegatedCancelWithRatio: 58
The address from which the transaction is sent.
(optional, default: 90000) Integer of the gas provided for the transaction execution. Unused gas will be refunded to the sender. If the specified gas is not enough to execute the transaction, the transaction is reverted.
(optional, default: 25000000000 Peb) Integer of the gasPrice used for each paid gas.
(optional) Integer of a nonce.
The fee payer address of the transaction.
Fee ratio of the fee payer. If it is 30, 30% of the fee will be paid by the fee payer. 70% will be paid by the sender. The range of fee ratio is 1 ~ 99, if it is out of range, the transaction will not be accepted.
signatures
object[]
(optional - only for kaia_sendTransactionAsFeePayer API) An array of signature objects. A signature object contains three fields (V, R, and S). V contains ECDSA recovery id. R contains ECDSA signature r while S contains ECDSA signature s.
Responses
- 200
Returns the transaction hash
- application/json
- Schema
- Example (from schema)
Schema
error
object
A Number that indicates the error type that occurred. This MUST be an integer.
code | message | description |
---|---|---|
-32700 | Parse error | invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-32602 | Invalid params | Invalid method parameter(s). |
A String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
The transaction hash
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}