Before Getting Started
- The x-chain-id value for calling the API is 8217 (Cypress) or 1001 (Baobab).
- Essential parameters for calling APIs are described in individual examples.
Values that a user needs to enter for calling APIs will be represented with one pair of braces ({}). A user must enter the following values.
Item | Description | Note |
---|---|---|
chain-id | 8217 or 1001 | Cypress(Klaytn mainnet) or Baobab(Klaytn testnet |
access-key-id | Auth ID | accessKeyId obtained from KAS Console > [Security] > [Credential] |
secret-access-key | Auth Password | secretAccessKey obtained from KAS Console > [Security] > [Credential] |
krn | (optional) ID of Account Pool | Unnecessary when using Default Account Pool |
A KAS API Authentication Key (API Auth Key) provides access to all KAS services and all the rights to a Klaytn account which was created by calling Wallet API via this API Auth Key. The rights here include accessing and transferring all the assets (KLAY, etc.) of or sending a transaction from a Klaytn account. If you shared your API Auth Key with any unauthorized personnel, your Klaytn account could be compromised and might cause unwanted transaction execution.
danger
DO NOT share your API Auth Key (Secret AccessKey or Authorization) with any unauthorized personnel. DO PUT efforts necessary to keep your API Auth Key safe for the security of your KAS/Klaytn account.
KLAY is the cryptocurrency of Klaytn. For details about KLAY, please visit here.
Send KLAY: Direct Payment of Transaction Fee
The KLAY transmission API sends a transaction for sending KLAY to another account.
To send Klay, a user must send a transaction to the Klaytn Node and pay the transaction fee. In this example, the account who sends this transaction must directly pay the transaction fee for sending KLAY.
info
For details about KAS SDK (caver-js/caver-java extensions) installation and execution, please visit KAS SDK. For more details on creating an Account Pool, account, and selecting an account, refer to Getting Started.
API Request
Call the KLAY transmission API. You may use the REST API or KAS SDKs (caver-js, caver-java extensions) for this.
curl --location --request POST "https://wallet-api.klaytnapi.com/v2/tx/value" \
-u {access-key-id}:{secret-access-key} \
--header "x-chain-id: {chain-id}" \
--header "Content-Type: application/json" \
--data-raw "{
"from": "0x5bb85d4032354E88020595AFAFC081C24098202e",
"value": "0x100",
"to": "0x2F87Ba64de5526F7880F21481Effbf950f70005c",
"memo": "memo",
"nonce": 0,
"gasLimit": 1000000,
"submit": true
}"
const tx = {
from: "0x13a9f77304cE84bb4EecA9E7d56AeE644bdd71bd",
to: "0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1",
value: 1,
gas: 25000,
memo: "memo",
submit: true,
};
const result = await caver.kas.wallet.requestValueTransfer(tx);
ValueTransferTransactionRequest request = new ValueTransferTransactionRequest();
request.setFrom("0x81bA6c299350719B18dFAEC38ba566fBd5Cd7202");
request.setTo("0x95E3Fd82eCd2b32Cae8618599971F5F47F4bC110");
request.setValue("0x1");
request.setSubmit(true);
TransactionResult transactionResult = caver.kas.wallet.requestValueTransfer(request);
System.out.println(transactionResult);
-
submit
: If it is false, a transaction is not sent and the RLP of signed transaction and the transaction information are returned. -
from
: The EOA of a Klaytn account to send the KLAY. This account sends KLAY to "to" account and it also sends this transaction directly.
API Response
Here is the response of the KLAY transmission API.
{
"from": "0xa4068f0d4e4ffad5945824cddd748ba2dc450330",
"gasLimit": 1000000,
"gasPrice": "0x5d21dba00",
"input": "0x6d656d6f",
"nonce": 0,
"rlp": "0x10f886808505d21dba00830f4240942f87ba64de5526f7880f21481effbf950f70005c82010094a4068f0d4e4ffad5945824cddd748ba2dc450330846d656d6ff847f8458207f5a029e618253df93692d7f26712e0aa29393f3fb72e5170fe99a43257ed9d32c2e6a02257927ba0ebf9d80471bb56b52efc196c319b40d33cd1f0a566911376da805f",
"signatures": [
{
"R": "0x29e618253df93692d7f26712e0aa29393f3fb72e5170fe99a43257ed9d32c2e6",
"S": "0x2257927ba0ebf9d80471bb56b52efc196c319b40d33cd1f0a566911376da805f",
"V": "0x7f5"
}
],
"status": "Submitted",
"to": "0x2f87ba64de5526f7880f21481effbf950f70005c",
"transactionHash": "0x04cbfe6b4c1a39d4a8ab2fc4373a9da91e54762fdcbd90a7409a60cda0bea044",
"typeInt": 16,
"value": "0x100"
}
TransactionResult {
from: '0x13a9f77304ce84bb4eeca9e7d56aee644bdd71bd',
gas: 25000,
gasPrice: '0x5d21dba00',
nonce: 0,
rlp: '0x10f883808505d21dba008261a89476c6b1f34562ed7a843786e1d7f57d0d7948a6f1019413a9f77304ce84bb4eeca9e7d56aee644bdd71bd846d656d6ff847f8458207f5a0c2fcecfc7fac125a445ba304a71c368ddbbe65740b55ba5208de63cd3e59d123a020a7db292af31f373b027545e4333909b9fd5651fa0705b797856e0b12973aa0',
typeInt: 16,
input: '0x6d656d6f',
signatures: [
Signature {
R: '0xc2fcecfc7fac125a445ba304a71c368ddbbe65740b55ba5208de63cd3e59d123',
S: '0x20a7db292af31f373b027545e4333909b9fd5651fa0705b797856e0b12973aa0',
V: '0x7f5'
}
],
status: 'Submitted',
to: '0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1',
transactionHash: '0x63b701e208d65d01b9efce91481b2b6a1d7bb2d44ce5c504df0e0b30a967fb75',
value: '0x1'
}
class TransactionResult {
from: 0x81ba6c299350719b18dfaec38ba566fbd5cd7202
gas: 1000000
gasPrice: 0x5d21dba00
input: null
nonce: 950
rlp: 0x08f8818203b68505d21dba00830186a09495e3fd82ecd2b32cae8618599971f5f47f4bc110019481ba6c299350719b18dfaec38ba566fbd5cd7202f847f8458207f5a058ee7baf19dc2d01bc31ce6dcd3bd69fd733667a335265c5b95a88283a318f9ca0790adf8eaf012c39f5a223359f6a3b32f7a854034646a963f7b30a487c4077c2
signatures: [class Signature {
R: 0x58ee7baf19dc2d01bc31ce6dcd3bd69fd733667a335265c5b95a88283a318f9c
S: 0x790adf8eaf012c39f5a223359f6a3b32f7a854034646a963f7b30a487c4077c2
V: 0x7f5
}]
status: Submitted
to: 0x95e3fd82ecd2b32cae8618599971f5f47f4bc110
transactionHash: 0x45633e36f1c9f08e4df0efbb5ef82bdfd65a38e8ee3eaff546fdfce74c879125
typeInt: 8
value: 0x1
code: null
message: null
transactionId: null
accountKey: null
}
The API response value is as follows if the KLAY transmission transmit field is pending. Moreover, the KLAY transmission transaction can be pending if signatures are not obtained as required when sending KLAY to a Multiple Signing Account.
// KLAY transmission transaction, which is in pending status, is received as the API response value.
{
"from": "0x6b0861be172884d6bcec75558b617287404d7073",
"gasLimit": 1000000,
"gasPrice": "0x5d21dba00",
"input": "0x6d656d6f",
"nonce": 1,
"status": "Pending",
"to": "0x2f87ba64de5526f7880f21481effbf950f70005c",
"transactionId": "0x7ee5d33b931e1c172dee21027aeeca31c33ddd44efd02cd3fd4fdfa0a86f888e",
"typeInt": 16,
"value": "0x100"
}
TransactionResult {
from: '0x1fdad2294d82e14fe5b8228268bec0f3cb28e0af',
gas: 25000,
gasPrice: '0x5d21dba00',
nonce: 1,
rlp: undefined,
typeInt: 16,
input: '0x6d656d6f',
status: 'Pending',
to: '0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1',
value: '0x1',
transactionId: '0xfd933ad07dd43264088cf7fc38ab4ec2db4ae780bd6e171680225a881a289c85'
}
class TransactionResult {
from: 0xbf19457580dcf1ed9e586f0c74747311a0d9d070
gas: 1000000
gasPrice: 0x5d21dba00
input: null
nonce: 120
rlp: null
signatures: null
status: Pending
to: 0x95e3fd82ecd2b32cae8618599971f5f47f4bc110
transactionHash: null
typeInt: 8
value: 0x1
code: null
message: null
transactionId: 0x86e3ab3978a73264af4fa968240b278f81196189803d038ef2da3e92f364c5aa
accountKey: null
}
- transactionId: Transaction ID. This transaction requires multiple signatures.
info
"typeInt" variable is a value for identifying the transaction type. For details about the types of transactions, please visit here.
For details about this API, please visit here. For inquires about this document or KAS, please visit KAS Developers Forum.
Send KLAY: Transaction Fee Delegation by User
The KLAY transmission API sends a transaction for sending KLAY to another account. If you send this transaction with fee-delegation, a fee payer account will pay the transaction fee instead of the transaction sender account.
To send Klay, a user must send a transaction to the Klaytn Node and pay the transaction fee. To call this API, you first need to create the Klaytn account who sends this transaction and the Klaytn account who pays the transaction fee (fee-payer) in Account Pool and Fee Payer Account Pool, each. In this example, the fee payer account pays the transaction transmission fee, not the account who sends this transaction. For details about fee-delegation methods that KAS provides for you, please visit here.
info
For details about KAS SDK (caver-js/caver-java extensions) installation and execution, please visit KAS SDK. For more details on creating an Account Pool, account, and selecting an account, refer to Getting Started. For more details on creating an fee payer Account Pool, fee payer account, and selecting an fee payer account, refer to Getting Started.
API Request
Call the fee delegation KLAY transmission API. You may use the REST API or KAS SDKs (caver-js, caver-java extensions) for this.
curl --location --request POST "https://wallet-api.klaytnapi.com/v2/tx/fd-user/value" \
-u {access-key-id}:{secret-access-key} \
--header "x-chain-id: {chain-id}" \
--header "Content-Type: application/json" \
--data-raw "{
"from": "0x5bb85d4032354E88020595AFAFC081C24098202e",
"value": "0x12",
"to": "0x2F87Ba64de5526F7880F21481Effbf950f70005c",
"memo": "memo",
"nonce": 0,
"gasLimit": 1000000,
"submit": true,
"feePayer": "0x85B98485444c89880cD9C48807CEF727C296F2da",
"feeRatio": 10
}"
const tx = {
from: "0xd2061D4bdbee433Dd2f99C28E25d301593f544e0",
to: "0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1",
value: 1,
gas: 50000,
memo: "memo",
feeRatio: 99,
feePayer: "0x44Ee3906a7a2007762E9d706dF6E4eF63FA1edA8",
submit: true,
};
const result = await caver.kas.wallet.requestFDValueTransferPaidByUser(tx);
FDUserValueTransferTransactionRequest request = new FDUserValueTransferTransactionRequest();
request.setFrom("0x81bA6c299350719B18dFAEC38ba566fBd5Cd7202");
request.setTo("0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1");
request.setFeePayer("0x31d845Ac80A0B2a38f6267CabcF34F8fA9DcD2B7");
request.setValue("0x1");
request.setSubmit(true);
FDTransactionResult result = caver.kas.wallet.requestFDValueTransferPaidByUser(request);
System.out.println(result);
-
from
: The EOA of a Klaytn account to send the KLAY. This account sends KLAY to "to" account and it also sends this transaction directly. -
submit
: If it is false, a transaction is not sent and the RLP of signed transaction and the transaction information are returned. -
fee_payer
: If a user uses a separate transaction fee-payer account, he/she provides the account address to this parameter. Do not use the "feePayer" parameter to make KAS pay for the transaction fee first. -
feeRatio
: The ratio (1%~99%) of the transaction fee that afeePayer
pays. The remaining fees will be directly paid by the account (from
) that sends transactions to Klaytn.- This parameter is available for fee delegation through either a user fee-payer account or and KAS (KAS Global fee payer).
API Response
Here is the response of the fee delegation KLAY transmission API.
{
"feePayer": "0xe8ab1729ab614551021cf5cc22c0e037f5a82930",
"from": "0x9c56b45b7443bc73f47234199982481c64807f78",
"gasLimit": 1000000,
"gasPrice": "0x5d21dba00",
"input": "0x6d656d6f",
"nonce": 0,
"rlp": "0x11f8e2808505d21dba00830f4240942f87ba64de5526f7880f21481effbf950f70005c12949c56b45b7443bc73f47234199982481c64807f78846d656d6ff847f8458207f6a06335f41b59276bd1d1c2b276d65b633545fe624b4c6eb854ac85c2bc0bfcb869a004e7b8910e1ce4cf47739dfa7801dd9b6f3d23de7acc932ad38c6bcc51429f2e94e8ab1729ab614551021cf5cc22c0e037f5a82930f847f8458207f6a0e4d799e18080ab2d9c82f979256d27ef87f68d19a07a6e9a57b006c4a639da12a0088df123474ad3a7ad6ef772603abc2ec209d9148ad3de29b475793240f54b41",
"signatures": [
{
"R": "0x6335f41b59276bd1d1c2b276d65b633545fe624b4c6eb854ac85c2bc0bfcb869",
"S": "0x4e7b8910e1ce4cf47739dfa7801dd9b6f3d23de7acc932ad38c6bcc51429f2e",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0x2f87ba64de5526f7880f21481effbf950f70005c",
"transactionHash": "0xbc35a85f694e27d88d9e65ddb005fff0abd5efa180862184ec466a6945e1fd55",
"typeInt": 17,
"value": "0x12"
}
FDTransactionResult {
feePayer: '0x44ee3906a7a2007762e9d706df6e4ef63fa1eda8',
from: '0xd2061d4bdbee433dd2f99c28e25d301593f544e0',
gas: 50000,
gasPrice: '0x5d21dba00',
nonce: 0,
rlp: '0x12f8e2808505d21dba0082c3509476c6b1f34562ed7a843786e1d7f57d0d7948a6f10194d2061d4bdbee433dd2f99c28e25d301593f544e0846d656d6f63f847f8458207f5a0ed71aacf02d7dbd9742554eb866797f0fb66d48b5cb80b1cf4a40ec10229b246a0187353cddb8e680ae6038779d566a47a83230f017608946730e0841a4b0254bb9444ee3906a7a2007762e9d706df6e4ef63fa1eda8f847f8458207f6a07f058cec4b314881d4ba2be417e9439dc665e3f16bd888188536c8cc5ba61383a016e23a0e99b0dd0547a2cdc102d5f834a5516fa27c2b8216a43c637e16c0803d',
typeInt: 18,
input: '0x6d656d6f',
signatures: [
Signature {
R: '0xed71aacf02d7dbd9742554eb866797f0fb66d48b5cb80b1cf4a40ec10229b246',
S: '0x187353cddb8e680ae6038779d566a47a83230f017608946730e0841a4b0254bb',
V: '0x7f5'
}
],
status: 'Submitted',
to: '0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1',
transactionHash: '0x8ed13565a89d6faad27ee5db742b93cf2dc6a0a2377ab2f72e87a5f1f3d82c6f',
value: '0x1',
feeRatio: 99
}
class FDTransactionResult {
feePayer: 0x31d845ac80a0b2a38f6267cabcf34f8fa9dcd2b7
from: 0x81ba6c299350719b18dfaec38ba566fbd5cd7202
gas: 1000000
gasPrice: 0x5d21dba00
input: null
nonce: 951
rlp: 0x09f8df8203b78505d21dba00830186a09476c6b1f34562ed7a843786e1d7f57d0d7948a6f1019481ba6c299350719b18dfaec38ba566fbd5cd7202f847f8458207f5a03c5a690aca465d2cbb1033d3b362af12414bbb9d70d7575a274b614072167ac0a03303ecac3db1dc67f606127f6cb9f4bd5e0dc811e735e660708adad60b1325e79431d845ac80a0b2a38f6267cabcf34f8fa9dcd2b7f847f8458207f6a0ff14b705e998c0d2351feec5d186d4fefd2d348756857b37111685c321df49a0a0517c890028c7fc33dc31454ef855bf80b882f3025e08433ee153c867de356c35
signatures: [class Signature {
R: 0x3c5a690aca465d2cbb1033d3b362af12414bbb9d70d7575a274b614072167ac0
S: 0x3303ecac3db1dc67f606127f6cb9f4bd5e0dc811e735e660708adad60b1325e7
V: 0x7f5
}]
status: Submitted
to: 0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1
transactionHash: 0x81d835fedb7028a3366cc7ab48e37cef6f7b00bdb52326e3def7879b8f5d6432
typeInt: 9
value: 0x1
feeRatio: null
transactionId: null
accountKey: null
}
The API response value is as follows if the KLAY transmission transaction is in pending. For example, the KLAY transmission transaction is pending if signatures are not obtained as required when a Multiple Signing Account sends KLAY.
// KLAY transmission transaction, which is in pending status, is received as the API response value.
{
"feePayer": "0x6a7a7f60346852d23be184aa948fd7c5053c2096",
"from": "0xe300034949f97251e3c5cf2c9fb5a159f713cae2",
"gasLimit": 1000000,
"gasPrice": "0x5d21dba00",
"input": "0x6d656d6f",
"nonce": 1,
"status": "Pending",
"to": "0x2f87ba64de5526f7880f21481effbf950f70005c",
"transactionId": "0x036de62cde59113716ee3c8d453cf8cc0e2aac0b119d00c0290c1aacb5fe3847",
"typeInt": 17,
"value": "0x12"
}
FDTransactionResult {
feePayer: '0x44ee3906a7a2007762e9d706df6e4ef63fa1eda8',
from: '0x0a3b0582ab6cf551c8c93979e60f0c0398f4b15e',
gas: 50000,
gasPrice: '0x5d21dba00',
nonce: 1,
rlp: undefined,
typeInt: 18,
input: '0x6d656d6f',
status: 'Pending',
to: '0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1',
value: '0x1',
feeRatio: 99,
transactionId: '0x90817ff0f06a02aff0bd210df779f0f0ad7aa33720a74ce61301ed68390faf17'
}
class FDTransactionResult {
feePayer: 0x85b98485444c89880cd9c48807cef727c296f2da
from: 0xbf19457580dcf1ed9e586f0c74747311a0d9d070
gas: 1000000
gasPrice: 0x5d21dba00
input: null
nonce: 120
rlp: null
signatures: null
status: Pending
to: 0x95e3fd82ecd2b32cae8618599971f5f47f4bc110
transactionHash: null
typeInt: 8
value: 0x1
feeRatio: 0
transactionId: 0x86e3ab3978a73264af4fa968240b278f81196189803d038ef2da3e92f364c5aa
accountKey: null
}
- transactionId: Transaction ID. This transaction requires multiple signatures.
info
"typeInt" variable is a value for identifying the transaction type. For details about the types of transactions, please visit here.
For details about this API, please visit here. For inquires about this document or KAS, please visit KAS Developers Forum.
Send KLAY: Transaction Fee Delegation by KAS
The KLAY transmission API sends a transaction for sending KLAY to another account. If you send this transaction with fee-delegation, a fee payer account will pay the transaction fee instead of the transaction sender account.
To send Klay, a user must send a transaction to the Klaytn Node and pay the transaction fee. To call this API, you first need to create an Account Pool and a Klaytn account who sends this transaction in that Account Pool. In this example, the KAS global fee payer account pays the transaction transmission fee, not the account who sends this transaction. This fee paid by KAS global fee payer instead of the Klaytn account who sent a transaction will later be charged to your KAS account. For details about fee-delegation methods that KAS provides for you, please visit here.
info
For details about KAS SDK (caver-js/caver-java extensions) installation and execution, please visit KAS SDK. For more details on creating an Account Pool, account, and selecting an account, refer to Getting Started.
API Request
Call the KAS GlobalFeePayer fee delegation KLAY transmission API. You may use the REST API or KAS SDKs (caver-js, caver-java extensions) for this.
curl --location --request POST "https://wallet-api.klaytnapi.com/v2/tx/fd/value" \
-u {access-key-id}:{secret-access-key} \
--header "x-chain-id: {chain-id}" \
--header "Content-Type: application/json" \
--data-raw "{
"from": "0x5bb85d4032354E88020595AFAFC081C24098202e",
"value": "0x12",
"to": "0x2F87Ba64de5526F7880F21481Effbf950f70005c",
"memo": "memo",
"nonce": 0,
"gasLimit": 1000000,
"submit": true,
"feeRatio": 10
}"
const tx = {
from: "0xd2061D4bdbee433Dd2f99C28E25d301593f544e0",
to: "0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1",
value: 1,
gas: 50000,
memo: "memo",
feeRatio: 99,
submit: true,
};
const result =
await caver.kas.wallet.requestFDValueTransferPaidByGlobalFeePayer(tx);
request.setFrom("0x81bA6c299350719B18dFAEC38ba566fBd5Cd7202");
request.setTo("0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1");
request.setValue("0x1");
request.setSubmit(true);
FDTransactionResult result = caver.kas.wallet.requestFDValueTransferPaidByGlobalFeePayer(request);
System.out.println(result);
-
from
: The EOA of a Klaytn account to send the KLAY. This account sends KLAY to "to" account and it also sends this transaction directly. -
submit
: If it is false, a transaction is not sent and the RLP of signed transaction and the transaction information are returned. -
feeRatio
: The ratio (1%~99%) of the transaction fee that afeePayer
pays. The remaining fees will be directly paid by the account (from
) that sends transactions to Klaytn.- This parameter is available for fee delegation through either a user fee-payer account or and KAS (KAS Global fee payer).
API Response
Here is the response of the KAS GlobalFeePayer fee delegation KLAY transmission API.
{
"feePayer": "0x85b98485444c89880cd9c48807cef727c296f2da",
"feeRatio": 10,
"from": "0x9c56b45b7443bc73f47234199982481c64807f78",
"gasLimit": 1000000,
"gasPrice": "0x5d21dba00",
"input": "0x6d656d6f",
"nonce": 0,
"rlp": "0x11f8e2808505d21dba00830f4240942f87ba64de5526f7880f21481effbf950f70005c12949c56b45b7443bc73f47234199982481c64807f78846d656d6ff847f8458207f6a06335f41b59276bd1d1c2b276d65b633545fe624b4c6eb854ac85c2bc0bfcb869a004e7b8910e1ce4cf47739dfa7801dd9b6f3d23de7acc932ad38c6bcc51429f2e94e8ab1729ab614551021cf5cc22c0e037f5a82930f847f8458207f6a0e4d799e18080ab2d9c82f979256d27ef87f68d19a07a6e9a57b006c4a639da12a0088df123474ad3a7ad6ef772603abc2ec209d9148ad3de29b475793240f54b41",
"signatures": [
{
"R": "0x6335f41b59276bd1d1c2b276d65b633545fe624b4c6eb854ac85c2bc0bfcb869",
"S": "0x4e7b8910e1ce4cf47739dfa7801dd9b6f3d23de7acc932ad38c6bcc51429f2e",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0x2f87ba64de5526f7880f21481effbf950f70005c",
"transactionHash": "0xbc35a85f694e27d88d9e65ddb005fff0abd5efa180862184ec466a6945e1fd55",
"typeInt": 17,
"value": "0x12"
}
FDTransactionResult {
feePayer: '0x1b71a63903e35371e2fc41c6012effb99b9a2c0f',
from: '0x9955607cd80972165d9de83b6c8c9cd2b6064d5b',
gas: 50000,
gasPrice: '0x5d21dba00',
nonce: 0,
rlp: '0x12f8e2808505d21dba0082c3509476c6b1f34562ed7a843786e1d7f57d0d7948a6f101949955607cd80972165d9de83b6c8c9cd2b6064d5b846d656d6f63f847f8458207f5a031d447fc2bcbfd908a1e89ef4ddd48575dcd2d1c86e434f030b474833e932963a00c64cfc67fb29f9f23666ebea18a93be7b9099b92a4c8b0b06dc86fe114e1f63941b71a63903e35371e2fc41c6012effb99b9a2c0ff847f8458207f5a0c6b5b13ed4e00130f96f545ad5572dbbf3028f5e1be9b58bc75c9115106dbc94a0260e0e0208abec114c96f8c49cadb3293445e39e1bfddb880f7e2281ddcb1008',
typeInt: 18,
input: '0x6d656d6f',
signatures: [
Signature {
R: '0x31d447fc2bcbfd908a1e89ef4ddd48575dcd2d1c86e434f030b474833e932963',
S: '0xc64cfc67fb29f9f23666ebea18a93be7b9099b92a4c8b0b06dc86fe114e1f63',
V: '0x7f5'
}
],
status: 'Submitted',
to: '0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1',
transactionHash: '0xfa6ed4b9daeb2e5782ce7ee6a03637bed6cea15b22ab1b21a1481c6d44d29e8c',
value: '0x1',
feeRatio: 99
}
FDUserValueTransferTransactionRequest request = new FDUserValueTransferTransactionRequest();
request.setFrom("0x81bA6c299350719B18dFAEC38ba566fBd5Cd7202");
request.setTo("0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1");
request.setValue("0x1");
request.setSubmit(true);
FDTransactionResult result = kas.getWallet().requestFDValueTransferPaidByGlobalFeePayer(request);
System.out.println(result);
The API response value is as follows if the KLAY transmission transaction is in pending. For example, the KLAY transmission transaction is pending if signatures are not obtained as required when a Multiple Signing Account sends KLAY.
// KLAY transmission transaction, which is in pending status, is received as the API response value.
{
"feePayer": "0x85b98485444c89880cd9c48807cef727c296f2da",
"from": "0xe300034949f97251e3c5cf2c9fb5a159f713cae2",
"gasLimit": 1000000,
"gasPrice": "0x5d21dba00",
"input": "0x6d656d6f",
"nonce": 1,
"status": "Pending",
"to": "0x2f87ba64de5526f7880f21481effbf950f70005c",
"transactionId": "0x036de62cde59113716ee3c8d453cf8cc0e2aac0b119d00c0290c1aacb5fe3847",
"typeInt": 17,
"value": "0x12"
}
FDTransactionResult {
feePayer: '0x1b71a63903e35371e2fc41c6012effb99b9a2c0f',
from: '0xc62e3d01cdd9a9f345b879d9d9e8f6c2f3756441',
gas: 50000,
gasPrice: '0x5d21dba00',
nonce: 1,
rlp: undefined,
typeInt: 18,
input: '0x6d656d6f',
status: 'Pending',
to: '0x76c6b1f34562ed7a843786e1d7f57d0d7948a6f1',
value: '0x1',
feeRatio: 99,
transactionId: '0x39e88788719e1df1fd40d5c30aa2f3e397393c6cfd2e2cb9e821cbea64477194'
}
class FDTransactionResult {
feePayer: 0x1b71a63903e35371e2fc41c6012effb99b9a2c0f
from: 0x81ba6c299350719b18dfaec38ba566fbd5cd7202
gas: 1000000
gasPrice: 0x5d21dba00
input: null
nonce: 957
rlp: 0x09f8df8203bd8505d21dba00830186a09495e3fd82ecd2b32cae8618599971f5f47f4bc110019481ba6c299350719b18dfaec38ba566fbd5cd7202f847f8458207f6a0f3da42b6551b4c3e23357da5600f3bd91867600b0d7ffa387b3d57abe88e895ca0411e9435be6f89828094200f340bfe58c1b7a5ae812525c96cb074d9c58bcc44941b71a63903e35371e2fc41c6012effb99b9a2c0ff847f8458207f6a06beb7fc8ee9029d345b7f62e18f24dcfc4f4f2ebca52b6ee3ee54a5a9d380d1aa04ef2fb1c83edd10993957d5dfae5b8c7ef33af2f885fa8bab0d25213dc0e8266
signatures: [class Signature {
R: 0xf3da42b6551b4c3e23357da5600f3bd91867600b0d7ffa387b3d57abe88e895c
S: 0x411e9435be6f89828094200f340bfe58c1b7a5ae812525c96cb074d9c58bcc44
V: 0x7f6
}]
status: Submitted
to: 0x95e3fd82ecd2b32cae8618599971f5f47f4bc110
transactionHash: 0xca70429bc9503be280f4596451a1b4c2b42fc4a1bdebd526cbab3ab72e2a25f8
typeInt: 9
value: 0x1
feeRatio: null
transactionId: null
accountKey: null
}
- transactionId: Transaction ID. This transaction requires multiple signatures.
info
"typeInt" variable is a value for identifying the transaction type. For details about the types of transactions, please visit here.
For details about this API, please visit here. For inquires about this document or KAS, please visit KAS Developers Forum.