Transaction API

Transaction APIs

POST /v2/tx/legacy

Summary

TxTypeLegacytransaction을 발생시킵니다.

Description

Klaytn 이전의 존재했던 트랜잭션들을 발생시킬 경우 사용합니다. AccountKeyLegacy를 가진 EOA 계정들만 사용할 수 있습니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

value

transfer amount

No

string

to

Receiver's address

No

string

input

Smart contract data

No

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0xf4584afef226e41b384e11b94a9e2f635366dc97", "value": "0x12", "to":"0x275CaDFc171d26d607682746BdbFa910f435Cd7C", "input":"", "nonce": 0, "gas_limit": 1000000, "submit": true }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/legacy'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"from": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0x",
"nonce": 34,
"rlp": "0xf867228505d21dba00830f424094275cadfc171d26d607682746bdbfa910f435cd7c12808207f6a0def22cc6e9f4fa496828a89d4655898192f8e36d6c7654677165cc69320313d2a07a1471d0a77272c8a242b26ea520e4f74be6c7f1c32fd0b04ba5970156a6b696",
"signatures": [
{
"R": "0xdef22cc6e9f4fa496828a89d4655898192f8e36d6c7654677165cc69320313d2",
"S": "0x7a1471d0a77272c8a242b26ea520e4f74be6c7f1c32fd0b04ba5970156a6b696",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0x275cadfc171d26d607682746bdbfa910f435cd7c",
"transaction_hash": "0xd33761fe40ba38f10cfe0bbed9816896f12a80e211ed4a7d6110ba0a5a68d8ad",
"type_int": 0,
"value": "0x12"
}
}

GET v2/tx:tx_hash

Summary

Transaction hash를 통해 트랜잭션 정보를 보여줍니다.

Description

노드로 보내진 트랜잭션 정보를 transaction hash를 통해 보여줍니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Path Parameters

Name

Description

Required

Data Type

tx_hash

Transaction hash

Yes

string

Request

curl -i -X GET -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/0xc331c0a7b512217a0bc803d07b34d8d7eaa19b5e75192847d10d11513b4c296e'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"blockHash": "0x958013fd827e8a2c1076b76d93e764f3f0b7fe1bdacbc6cb532aff169f942234",
"blockNumber": "0x1ef4f3",
"from": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"gas": "0xf4240",
"gasPrice": "0x5d21dba00",
"hash": "0xc331c0a7b512217a0bc803d07b34d8d7eaa19b5e75192847d10d11513b4c296e",
"input": "0x",
"nonce": "0x26",
"senderTxHash": "0xc331c0a7b512217a0bc803d07b34d8d7eaa19b5e75192847d10d11513b4c296e",
"signatures": [
{
"R": "0x7967e77076be78e3d7515174f28686c66340eb10b51ad0a65d00c2783f57d9c4",
"S": "0x234f1cebe0fe38292a3223878696c86e98711ba3cb31266ba05e8c017d3a0351",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0x275cadfc171d26d607682746bdbfa910f435cd7c",
"transactionIndex": "0x0",
"type": "TxTypeLegacyTransaction",
"typeInt": 0,
"value": "0x12"
}
}

Basic transaction APIs

POST /v2/tx/value

Summary

TxTypeValueTransfer 또는 TxTypeValueTransferMemo을 발생시킵니다.

Description

TxTypeValueTransfer는 KLAY 전송을 위해 사용됩니다. 만약 KLAY 전송시 구체적인 메시지를 같이 담으려면 memo 필드를 채우면 되며 이 경우 TxTypeValueTransferMemo로 전송됩니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

value

transfer amount

Yes

string

to

Receiver's address

Yes

string

memo

Value transfer memo message

No

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0xf4584afef226e41b384e11b94a9e2f635366dc97", "value": "0x91100000000000", "to":"0xF867E9FEE43701321F00dF2768adA7609492f6F6", "memo":"with memo", "nonce": 0, "gas_limit": 1000000, "submit": true }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/value'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"from": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0x77697468206d656d6f",
"nonce": 39,
"rlp": "0x10f890278505d21dba00830f424094f867e9fee43701321f00df2768ada7609492f6f6879110000000000094f4584afef226e41b384e11b94a9e2f635366dc978977697468206d656d6ff847f8458207f6a0b45d86dd9fda6d06c9501ac7d2d708cf696cc065e448f9782d5b05481d984b1ca00332af1e729fd7ba22245dbb03665aa10c2828962f984b1ce12b1b2f2614c398",
"signatures": [
{
"R": "0xb45d86dd9fda6d06c9501ac7d2d708cf696cc065e448f9782d5b05481d984b1c",
"S": "0x332af1e729fd7ba22245dbb03665aa10c2828962f984b1ce12b1b2f2614c398",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0xf867e9fee43701321f00df2768ada7609492f6f6",
"transaction_hash": "0x0da78c4d8721840392290e00545023498e56319d6c5b7ca2891173a4b3678aea",
"type_int": 16,
"value": "0x91100000000000"
}
}

DELETE /v2/tx

Summary

TxTypeCancel을 발생시킵니다.

Description

TxPool 내에 같은 nonce 값을 가진 트랜잭션의 실행을 철회합니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

transaction_hash

nil

Yes

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

Request

curl -i -X DELETE -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from": "0xf4584afef226e41b384e11b94a9e2f635366dc97", "transaction_hash": "0xfcb8798854caaabff2d1d1c8e6d95d9c976d999bb0b50f360605c37e462a549b", "nonce": 0, "gas_limit": 1000000, "submit": true }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"from": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"nonce": 40,
"rlp": "0x38f869288505d21dba00830f424094f4584afef226e41b384e11b94a9e2f635366dc97f847f8458207f5a03727dc827af08baaf79ae189e3c82fcb064edfa87301d5e66fa1a318bd1f8026a01554bcbb7547704f90db232d192579e048f9bcd616745c2f3e03a93fc279b9fd",
"signatures": [
{
"R": "0x3727dc827af08baaf79ae189e3c82fcb064edfa87301d5e66fa1a318bd1f8026",
"S": "0x1554bcbb7547704f90db232d192579e048f9bcd616745c2f3e03a93fc279b9fd",
"V": "0x7f5"
}
],
"status": "Submitted",
"transaction_hash": "0xc888cb6df8c41809fc098f7c016ca2d2f7c5633edb5b246bd1503b620912612a",
"type_int": 56
}
}

PUT /v2/tx/account

Summary

TxTypeAccountUpdate을 발생시킵니다.

Description

주어진 account_key 값으로 해당 acccount를 업데이트 합니다. account_key에 대한 자세한 설명은 klaytn docs을 참고하시기 바랍니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

Request

curl -i -X PUT -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0x50300cb79ca9c19fa73a147c8550c2e20beac6fb", "account_key": { "key_type": 5, "key": [ { "key_type": 3, "key": { } }, { "key_type": 4, "key": { "threshold": 2, "keys": [ { "weight": 1, "key": { "x": "0xe4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512d", "y": "0xa5735a23ce1654b14680054a993441eae7c261983a56f8e0da61280758b5919" } }, { "weight": 1, "key": { "x": "0x36f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06", "y": "0x6fdf9fc87a16ac359e66d9761445d5ccbb417fb7757a3f5209d713824596a50d" } } ] } }, { "key_type": 2, "key": { "x": "0x698a5769e28d0a2cf138a4f6533b158e90f1000a6331fe56aea628cf061f74f2", "y": "0x7cbef61d21ed45e6675e220b73912c76522bfae899ddde4eb25926617fb89d5d" } } ] }, "nonce": 0, "gas_limit": 1000000, "submit": true }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/account'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"account_key": "0x05f8778203c0b84e04f84b02f848e301a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512de301a10336f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06a302a103698a5769e28d0a2cf138a4f6533b158e90f1000a6331fe56aea628cf061f74f2",
"from": "0x50300cb79ca9c19fa73a147c8550c2e20beac6fb",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"nonce": 0,
"rlp": "0x20f8e5808505d21dba00830f42409450300cb79ca9c19fa73a147c8550c2e20beac6fbb87a05f8778203c0b84e04f84b02f848e301a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512de301a10336f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06a302a103698a5769e28d0a2cf138a4f6533b158e90f1000a6331fe56aea628cf061f74f2f847f8458207f5a0cc96aafdc19c7419618b12e904fdb9a8b42ad8fdb82c9a24a4adaab5c20a0073a021fd0638247a279c5d3a6a5e866c5933cf8a36c7f07f34ea2e071267077fa328",
"signatures": [
{
"R": "0xcc96aafdc19c7419618b12e904fdb9a8b42ad8fdb82c9a24a4adaab5c20a0073",
"S": "0x21fd0638247a279c5d3a6a5e866c5933cf8a36c7f07f34ea2e071267077fa328",
"V": "0x7f5"
}
],
"status": "Submitted",
"transaction_hash": "0xd93eb9e3cbb43da464853a10d5832d20dedfe2563b184a1e6b85f8ab63bc845b",
"type_int": 32
}
}

POST /v2/tx/contract/deploy

Summary

TxTypeSmartContractDeploy을 발생시킵니다.

Description

주어진 input 데이터로 SmartContract를 배포합니다. 만들어진 contract 주소는 반환되는 transaction_hash 조회를 통해 확인 가능합니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

value

transfer amount

Yes

string

input

Smart contract data

Yes

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0xf4584afef226e41b384e11b94a9e2f635366dc97", "value": "0x0", "input": "0x60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820c5641c81b788eb889a12213841398185c25ec7e230449a83ebbe55052bb815830029", "nonce": 0, "gas_limit": 1000000, "submit": true }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/contract/deploy'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"from": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0x60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820c5641c81b788eb889a12213841398185c25ec7e230449a83ebbe55052bb815830029",
"nonce": 42,
"rlp": "0x28f901aa2a8505d21dba00830f4240808094f4584afef226e41b384e11b94a9e2f635366dc97b9013a60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820c5641c81b788eb889a12213841398185c25ec7e230449a83ebbe55052bb8158300298080f847f8458207f6a045b725c22d47e62beccf48e44a8f6592fde53eb3e2a0e6edf5c36fdcb69f27dfa048fd059ac40c57bd9af4688606abe67d085c16c3ad7e10c0eaaa82669c3b60f7",
"signatures": [
{
"R": "0x45b725c22d47e62beccf48e44a8f6592fde53eb3e2a0e6edf5c36fdcb69f27df",
"S": "0x48fd059ac40c57bd9af4688606abe67d085c16c3ad7e10c0eaaa82669c3b60f7",
"V": "0x7f6"
}
],
"status": "Submitted",
"transaction_hash": "0x9d14548062450fd7d69dda8d8ad9fb962e335f48e016da4715b5b7e757751199",
"type_int": 40,
"value": "0x0"
}
}

POST /v2/tx/contract/execute

Summary

TxTypeSmartContractExecution을 발생시킵니다.

Description

주어진 input 데이터를 통해 from의 contract를 실행시킵니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

value

transfer amount

Yes

string

to

Receiver's address

Yes

string

input

contract execution data

Yes

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from": "0xf4584afef226e41b384e11b94a9e2f635366dc97", "value": "0x0", "to": "0x9949f6acb017798ac40d78fe8411e73e027593ec", "input": "0xd14e62b80000000000000000000000000000000000000000000000000000000000000005", "nonce": 0, "gas_limit": 1000000, "submit": true }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/contract/execute'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"from": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0xd14e62b80000000000000000000000000000000000000000000000000000000000000005",
"nonce": 43,
"rlp": "0x30f8a42b8505d21dba00830f4240949949f6acb017798ac40d78fe8411e73e027593ec8094f4584afef226e41b384e11b94a9e2f635366dc97a4d14e62b80000000000000000000000000000000000000000000000000000000000000005f847f8458207f6a02db29c87ee003148b97c29a635af07b41511d45f5ef5f70f26df8f56dc408461a0226987daa32b7a644078e485e55292b72aada6a9ff53a0b125ad8459ed2e0bd5",
"signatures": [
{
"R": "0x2db29c87ee003148b97c29a635af07b41511d45f5ef5f70f26df8f56dc408461",
"S": "0x226987daa32b7a644078e485e55292b72aada6a9ff53a0b125ad8459ed2e0bd5",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0x9949f6acb017798ac40d78fe8411e73e027593ec",
"transaction_hash": "0x21251d82742edb7f304044cb706100102a2bbaeaeee377964bbb5692ef5db19d",
"type_int": 48,
"value": "0x0"
}
}

Fee delegation transaction APIs

POST /v2/tx/fd/value

Summary

TxTypeFeeDelegatedValueTransfer(TxTypeFeeDelegatedValueTransferWithRatio) 또는 TxTypeFeeDelegatedValueTransferMemo(TxTypeFeeDelegatedValueTransferMemoWithRatio)을 발생시킵니다.

Description

기능 측면으로 'POST /v2/tx/value'와 같으나 fee 대납 및 부분적 대납을 이용할 수 있습니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

value

transfer amount

Yes

string

to

Receiver's address

Yes

string

memo

Value transfer memo message

No

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

fee_ratio

Partial fee delegation transaction

No

number

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0xd8382fd996e34308117d1a04eba99de45342e66d", "value": "0x12", "to":"0x275CaDFc171d26d607682746BdbFa910f435Cd7C", "memo":"with memo", "nonce": 0, "gas_limit": 1000000, "submit": true, "fee_ratio": 0 }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/fd/value'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"fee_payer": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"from": "0xd8382fd996e34308117d1a04eba99de45342e66d",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0x77697468206d656d6f",
"nonce": 0,
"rlp": "0x11f8e6808505d21dba00830f424094275cadfc171d26d607682746bdbfa910f435cd7c1294d8382fd996e34308117d1a04eba99de45342e66d8977697468206d656d6ff847f8458207f6a08daca0bca90a36d6f0d302bea7ef8bbe381c86e8df76339d1b6d4a2604abde5ea04745d012b6aceeceeed27f339c883665285ac29d9185ee799eee11b198cb376c94f4584afef226e41b384e11b94a9e2f635366dc97f846f8448207f6a0a9aced001e361e147706da6cecb7f2914349c87efcb45e8992c3c8f6897e9c4c9fbce9fdb66611d60e37b5449b83d4983bdf4430d6c5cf73a54acd6c491fe8a7",
"signatures": [
{
"R": "0x8daca0bca90a36d6f0d302bea7ef8bbe381c86e8df76339d1b6d4a2604abde5e",
"S": "0x4745d012b6aceeceeed27f339c883665285ac29d9185ee799eee11b198cb376c",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0x275cadfc171d26d607682746bdbfa910f435cd7c",
"transaction_hash": "0x02ec3b30b3dec900f26d537aaf228af876224dc30898c74eb1436b0a4f4001f5",
"type_int": 17,
"value": "0x12"
}
}

PUT /v2/tx/fd/account

Summary

TxTypeFeeDelegatedAccountUpdate(TxTypeFeeDelegatedAccountUpdateWithRatio)을 발생시킵니다.

Description

기능 측면으로 PUT /v2/tx/account와 같으나 fee 대납 및 부분적 대납을 이용할 수 있습니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

fee_ratio

Partial fee delegation transaction

No

number

Request

curl -i -X PUT -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0x1fe4c4b4Fb9eb69909b776132a3184DacA113360", "account_key": { "key_type": 5, "key": [ { "key_type": 3, "key": { } }, { "key_type": 4, "key": { "threshold": 2, "keys": [ { "weight": 1, "key": { "x": "0xe4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512d", "y": "0xa5735a23ce1654b14680054a993441eae7c261983a56f8e0da61280758b5919" } }, { "weight": 1, "key": { "x": "0x36f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06", "y": "0x6fdf9fc87a16ac359e66d9761445d5ccbb417fb7757a3f5209d713824596a50d" } } ] } }, { "key_type": 2, "key": { "x": "0x698a5769e28d0a2cf138a4f6533b158e90f1000a6331fe56aea628cf061f74f2", "y": "0x7cbef61d21ed45e6675e220b73912c76522bfae899ddde4eb25926617fb89d5d" } } ] }, "nonce": 0, "gas_limit": 1000000, "submit": true, "fee_ratio": 0 }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/fd/account'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"account_key": "0x05f8778203c0b84e04f84b02f848e301a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512de301a10336f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06a302a103698a5769e28d0a2cf138a4f6533b158e90f1000a6331fe56aea628cf061f74f2",
"fee_payer": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"from": "0x1fe4c4b4fb9eb69909b776132a3184daca113360",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"nonce": 0,
"rlp": "0x21f90143808505d21dba00830f4240941fe4c4b4fb9eb69909b776132a3184daca113360b87a05f8778203c0b84e04f84b02f848e301a103e4a01407460c1c03ac0c82fd84f303a699b210c0b054f4aff72ff7dcdf01512de301a10336f6355f5b532c3c1606f18fa2be7a16ae200c5159c8031dd25bfa389a4c9c06a302a103698a5769e28d0a2cf138a4f6533b158e90f1000a6331fe56aea628cf061f74f2f847f8458207f6a087d473c1cb6f460148235949b3fe857ba340d15b143ea380ed269aee8573d680a0313f85b59e2908e9bd6faa89ec7fb7a9dee3cde0e4cea05b1ed11a2b2ebf1f9594f4584afef226e41b384e11b94a9e2f635366dc97f847f8458207f5a03f479792a54bd33a80593b461daff25ae1c9bbef74ecfaefa0606cf747df0a32a03d5773bc1b79efbe331956cf6dfa18611afeae84a632a1188dd528bb3cd10f6b",
"signatures": [
{
"R": "0x87d473c1cb6f460148235949b3fe857ba340d15b143ea380ed269aee8573d680",
"S": "0x313f85b59e2908e9bd6faa89ec7fb7a9dee3cde0e4cea05b1ed11a2b2ebf1f95",
"V": "0x7f6"
}
],
"status": "Submitted",
"transaction_hash": "0xec20c73d001d6ce52824481a8a711b7e7f3ece5f863fe085c119979b2176be88",
"type_int": 33
}
}

POST /v2/tx/fd/contract/deploy

Summary

TxTypeFeeDelegatedSmartContractDeploy(TxTypeFeeDelegatedSmartContractDeployWithRatio)을 발생시킵니다.

Description

기능 측면으로 POST /v2/tx/contract/deploy와 같으나 fee 대납 및 부분적 대납을 이용할 수 있습니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

value

transfer amount

Yes

string

input

Smart contract data

Yes

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

fee_ratio

Partial fee delegation transaction

No

number

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0xA19781B073d62E2D523E9b7EaB9194e10d47A6B9", "value": "0x0", "input": "0x60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820c5641c81b788eb889a12213841398185c25ec7e230449a83ebbe55052bb815830029", "nonce": 0, "gas_limit": 1000000, "submit": true, "fee_ratio": 0 }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/fd/contract/deploy'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"fee_payer": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"from": "0xa19781b073d62e2d523e9b7eab9194e10d47a6b9",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0x60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820c5641c81b788eb889a12213841398185c25ec7e230449a83ebbe55052bb815830029",
"nonce": 0,
"rlp": "0x29f90208808505d21dba00830f4240808094a19781b073d62e2d523e9b7eab9194e10d47a6b9b9013a60806040526000805534801561001457600080fd5b50610116806100246000396000f3006080604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306661abd14605857806342cbb15c146080578063d14e62b81460a8575b600080fd5b348015606357600080fd5b50606a60d2565b6040518082815260200191505060405180910390f35b348015608b57600080fd5b50609260d8565b6040518082815260200191505060405180910390f35b34801560b357600080fd5b5060d06004803603810190808035906020019092919050505060e0565b005b60005481565b600043905090565b80600081905550505600a165627a7a72305820c5641c81b788eb889a12213841398185c25ec7e230449a83ebbe55052bb8158300298080f847f8458207f6a0642bab6c8c3b0eb00ca7da91608376699d1d037e089c46d72c5c51b6d698f1dfa01a3159ca40f8ba894a1c86f82895457d5a74ccbd318509054cb8738cd101d69194f4584afef226e41b384e11b94a9e2f635366dc97f847f8458207f6a034d80acde98e569bf36afec57c5c9f0e8f60ffcd4809f867d2acf2b7750dff38a06b405fb1a60617e950e296a77b57da72a9b269afae43f1ed85493433582c1ca2",
"signatures": [
{
"R": "0x642bab6c8c3b0eb00ca7da91608376699d1d037e089c46d72c5c51b6d698f1df",
"S": "0x1a3159ca40f8ba894a1c86f82895457d5a74ccbd318509054cb8738cd101d691",
"V": "0x7f6"
}
],
"status": "Submitted",
"transaction_hash": "0x3756f53b883e3b2c1250e924c7c90f77394a2f4fcf12e925397ade5d2b4be03e",
"type_int": 41,
"value": "0x0"
}
}

POST /v2/tx/fd/contract/execute

Summary

TxTypeFeeDelegatedSmartContractExecution(TxTypeFeeDelegatedSmartContractExecutionWithRatio)을 발생시킵니다.

Description

기능 측면으로 POST /v2/tx/contract/execution와 같으나 fee 대납 및 부분적 대납을 이용할 수 있습니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

value

transfer amount

Yes

string

to

Receiver's address

Yes

string

input

contract execution data

Yes

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

fee_ratio

Partial fee delegation transaction

No

number

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from":"0xeface80ffa63576C6B05dA92b1D5b640683bb8cC", "value": "0x0", "to":"0xd81dc8e7f5080a5e9401015c1695b48a1edb7144", "input": "0xd14e62b80000000000000000000000000000000000000000000000000000000000000005", "nonce": 0, "gas_limit": 1000000, "submit": true, "fee_ratio": 0 }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/fd/contract/execute'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"fee_payer": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"from": "0xeface80ffa63576c6b05da92b1d5b640683bb8cc",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0xd14e62b80000000000000000000000000000000000000000000000000000000000000005",
"nonce": 0,
"rlp": "0x31f90102808505d21dba00830f424094d81dc8e7f5080a5e9401015c1695b48a1edb71448094eface80ffa63576c6b05da92b1d5b640683bb8cca4d14e62b80000000000000000000000000000000000000000000000000000000000000005f847f8458207f5a0fa3ab19f14e83d78f660148b9ceaf52a66c22510e96cda97ed3c830f061442a0a04b10fc25700217cc9a8b74239c454c64f00ab0c59b2702a0e06007d738e73ebd94f4584afef226e41b384e11b94a9e2f635366dc97f847f8458207f5a0ae256ef545646b8f8fd474ca9c4488a94406cf669cb97b2051fdc2f619eaa1fca027261fa2313692ee9e69f2c35b94bb9ae80ab76e348b15616a52ca4018086cbb",
"signatures": [
{
"R": "0xfa3ab19f14e83d78f660148b9ceaf52a66c22510e96cda97ed3c830f061442a0",
"S": "0x4b10fc25700217cc9a8b74239c454c64f00ab0c59b2702a0e06007d738e73ebd",
"V": "0x7f5"
}
],
"status": "Submitted",
"to": "0xd81dc8e7f5080a5e9401015c1695b48a1edb7144",
"transaction_hash": "0x5ecde7819f68130f9dfdf839be701cacfa91c85800f7db1c0ca5082b1a037a42",
"type_int": 49,
"value": "0x0"
}
}

DELETE /v2/tx/fd

Summary

TxTypeFeeDelegatedCancel(TxTypeFeeDelegatedCancelWithRatio)을 발생시킵니다.

Description

기능 측면으로 POST /v2/tx/cancel와 같으나 fee 대납 및 부분적 대납을 이용할 수 있습니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

from

Sender's address

Yes

string

tx_hash

Transaction hash

No

string

nonce

Nonce

No

number

gas_limit

Gas limit

No

number

submit

Submit transaction

No

boolean

fee_ratio

Partial fee delegation transaction

No

number

Request

curl -i -X DELETE -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "from": "0xf4584afef226e41b384e11b94a9e2f635366dc97", "transaction_hash": "0xda3102d162701b470e1ec7b7c66be6d89ca0e8c013259ae437fa6226eeac8917", "nonce": 0, "gas_limit": 1000000, "submit": true, "fee_ratio": 0 }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/fd'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"fee_payer": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"from": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"nonce": 45,
"rlp": "0x39f8c72d8505d21dba00830f424094f4584afef226e41b384e11b94a9e2f635366dc97f847f8458207f5a0cead1cb561208b9cd05f096dfe9cecfe51c3353994e8813113bd88e42e86ca18a01e65e6966da9576dc68bd4c33b37657dd92f607544124bf0453f98cd88edafc994f4584afef226e41b384e11b94a9e2f635366dc97f847f8458207f5a09835955c99a3120347338da05515ca8f4451a1ed8250b558a15530f4149f62e4a06f08efe4968c1c00e27f006ef69772001f98358d331e5e12fd6fbdb419ebd8cf",
"signatures": [
{
"R": "0xcead1cb561208b9cd05f096dfe9cecfe51c3353994e8813113bd88e42e86ca18",
"S": "0x1e65e6966da9576dc68bd4c33b37657dd92f607544124bf0453f98cd88edafc9",
"V": "0x7f5"
}
],
"status": "Submitted",
"transaction_hash": "0x9168d3b8bcdd6fe3a3db55b1f592085bdbb575c54e4666826a36fd0c930f468c",
"type_int": 57
}
}

Invoking transactions with RLP

POST /v2/tx/rlp

Summary

rlp 값으로 주어진 트랜잭션을 발생시킵니다.

Description

주어진 rlp 값을 decode하여 트랜잭션 종류 및 필드값을 확인하고 그에 따른 트랜잭션을 발생시킵니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

krn

Resource pool name

Yes

string

rlp

Basic Tx RLP encoded string

Yes

string

submit

Submit transaction

No

boolean

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d ' { "krn": "krn:1001:wallet:GC1:account:rp1", "rlp": "0xf842b83bf839088204d28505d21dba00830f4240947b65b75d204abed71587c9e519a89277766ee1d00a94c60e0315343071d412b71ff94b37a9cadf38bc318203e98080", "submit": true }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/rlp'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"from": "0xc60e0315343071d412b71ff94b37a9cadf38bc31",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"nonce": 1234,
"rlp": "0x08f8818204d28505d21dba00830f4240947b65b75d204abed71587c9e519a89277766ee1d00a94c60e0315343071d412b71ff94b37a9cadf38bc31f847f8458207f6a041285ee929cfb9017e435c2ee604f2e4a0dfa84793382b3a6f8082f47db05eeea0477f7c84dc8b6254af352a81620425a96571dd71fa4a924e686ed9ad662f94e8",
"signatures": [
{
"R": "0x41285ee929cfb9017e435c2ee604f2e4a0dfa84793382b3a6f8082f47db05eee",
"S": "0x477f7c84dc8b6254af352a81620425a96571dd71fa4a924e686ed9ad662f94e8",
"V": "0x7f6"
}
],
"status": "Submitted",
"to": "0x7b65b75d204abed71587c9e519a89277766ee1d0",
"transaction_hash": "0x66bd013bb744fc7b15e0378d7de1db310fbbb769fee051ea05e60af4352a9654",
"type_int": 8,
"value": "0xa"
}
}

POST /v2/tx/fd/rlp

Summary

rlp 값으로 주어진 트랜잭션을 발생시킵니다.

Description

기능 측면으로 POST /v2/tx/rlp와 같으나 fee 대납 및 부분적 대납을 이용할 수 있습니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

krn

Resource pool name

Yes

string

rlp

Basic Tx RLP encoded string

Yes

string

submit

Submit transaction

No

boolean

fee_ratio

Partial fee delegation transaction

No

number

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "krn": "krn:1001:wallet:GC1:account:rp1", "rlp": "0xf842b83bf839088204d18505d21dba00830f4240947b65b75d204abed71587c9e519a89277766ee1d00a94c60e0315343071d412b71ff94b37a9cadf38bc318203e98080", "submit": true, "fee_ratio": 0 }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/tx/fd/rlp'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"fee_payer": "0xf4584afef226e41b384e11b94a9e2f635366dc97",
"from": "0xc60e0315343071d412b71ff94b37a9cadf38bc31",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"nonce": 1233,
"rlp": "0x09f8df8204d18505d21dba00830f4240947b65b75d204abed71587c9e519a89277766ee1d00a94c60e0315343071d412b71ff94b37a9cadf38bc31f847f8458207f5a0cc3e7736c8b1be207785e809e56dbd97090f41b02afb26d332da2966c65c408aa03c2aa9cd57d552bd4d6c48a264b6ec383beef0b72e0e36e1b3157bdf2ec8d9b194f4584afef226e41b384e11b94a9e2f635366dc97f847f8458207f6a096b4cca9a959bee6a8bda6a3d0c1f1e29b93914a6a20aa74b36ab59f4f11ac15a01b524877e22882225cfd8ae6fd2a9f7d186d76ebc506526c10fcb310c64efe0b",
"signatures": [
{
"R": "0xcc3e7736c8b1be207785e809e56dbd97090f41b02afb26d332da2966c65c408a",
"S": "0x3c2aa9cd57d552bd4d6c48a264b6ec383beef0b72e0e36e1b3157bdf2ec8d9b1",
"V": "0x7f5"
}
],
"status": "Submitted",
"to": "0x7b65b75d204abed71587c9e519a89277766ee1d0",
"transaction_hash": "0xad78b8e3aa7c79e0eec5c59b3dac8f349608f6374b6219e754a9d2f55474fc4f",
"type_int": 9,
"value": "0xa"
}
}

Multisig transaction APIs

GET /v2/multisig/tx

Summary

해당 주소가 signer 또는 sender이며 pending 상태인 모든 트랙잭션 데이터를 가져옵니다.

Description

특정 mutlsisig 계정이 트랜잭션 발생시켰으나 threshold를 넘지 않아 pending 상태인 트랜잭션들을 signer들의 주소 또는 해당 multisig 계정 주소를 통해 가져옵니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

address

Account address

Yes

string

limit

Page size

Yes

number

bookmark

Bookmark for database search

Yes

string

Request

curl -i -X GET -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "address":"0x12755119EA8AB81CE00BEaD1795b202aEa3E8a55", "limit": 10, "bookmark":"" }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/multisig/tx'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"bookmark": "0xabea8b21251c0da96ba3bad83aa537973ef0290b78405cfb060243673ec7a009#TX_0x12755119EA8AB81CE00BEaD1795b202aEa3E8a55",
"count": 1,
"transactions": [
{
"account": "0x12755119EA8AB81CE00BEaD1795b202aEa3E8a55",
"chain_id": 1001,
"created_at": 1592459715,
"multi_sig_keys": [
{
"address": "0x77f7801327AF9e1DA6Ae0B99fC8bC45b32c032a6",
"weight": 3
},
{
"address": "0x12755119EA8AB81CE00BEaD1795b202aEa3E8a55",
"weight": 3
}
],
"status": 2,
"threshold": 6,
"transaction_data": {
"from": "0x77f7801327af9e1da6ae0b99fc8bc45b32c032a6",
"gas_limit": 1000000,
"gas_price": "0x5d21dba00",
"input": "0x77697468206d656d6f",
"nonce": 0,
"to": "0x275cadfc171d26d607682746bdbfa910f435cd7c",
"type_int": 16,
"value": "0x123"
},
"transaction_id": "0xabea8b21251c0da96ba3bad83aa537973ef0290b78405cfb060243673ec7a009",
"type": "TX_0x12755119EA8AB81CE00BEaD1795b202aEa3E8a55",
"updated_at": 1592459715
}
]
}
}

POST /v2/multisig/tx/sign

Summary

pending 중인 트랜잭션에 대해 서명합니다.

Description

pending 상태인 트랜잭션에 대해 서명을 하며 만약 signer가 아닌 경우 또는 threshold가 다 채워져 노드로 보내진 경우엔 에러가 발생합니다.

Request Headers

Name

Description

Required

Data Type

x-krn

KRN ID

Yes

string

Body Parameters

Name

Description

Required

Data Type

address

Account address

Yes

string

transaction_id

multisig pending transaction ID

Yes

string

Request

curl -i -X POST -H 'Content-Type: application/json' -H 'X-Krn: krn:1001:wallet:GC1:account:rp1' -u {your_accessKeyId}:{your_secretAccessKey} -d '{ "address":"0x12755119EA8AB81CE00BEaD1795b202aEa3E8a55", "transaction_id":"0xabea8b21251c0da96ba3bad83aa537973ef0290b78405cfb060243673ec7a009" }' --max-time 10 --globoff 'https://wallet-api.beta.klaytn.io/v2/multisig/tx/sign'

Responses

200 - OK

Name

Type

code

number

result

object

{
"code": 0,
"result": {
"signed_weight": 6,
"status": "Submitted",
"threshold": 6,
"transaction_hash": "0xa440bc9ed16d52da6f620508f513f0096524ecd3b111065110b52a1177791828",
"transaction_id": "0xabea8b21251c0da96ba3bad83aa537973ef0290b78405cfb060243673ec7a009",
"weight": 3
}
}