-
Notifications
You must be signed in to change notification settings - Fork 58
JSON RPC
Table of Contents generated with DocToc
-
JSON RPC API
- JSON-RPC Endpoint
- Environment Variables
- Curl Examples Explained
- JSON-RPC methods
-
JSON RPC API Reference
- clientVersion
- netVersion
- networkHashRate
- nodeWaitList
- peerCount
- protocolVersion
- syncing
- accounts
- deleteAccount
- encryptAccount
- exportAccount
- importAccount
- newAccount
- blockNumber
- getBalance
- getTransactionCount
- getBlockTransactionCountByHash
- getBlockTransactionCountByNumber
- sendTransaction
- sendAdvancedTransaction
- sendRawTransaction
- getBlockByHash
- getBlockByNumber
- getTransactionByHash
- getTransactionByBlockHashAndIndex
- getTransactionByBlockNumberAndIndex
JSON is a lightweight data-interchange format. It can represent numbers, strings, ordered sequences of values, and collections of name/value pairs.
JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol. Primarily this specification defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in many various message passing environments. It uses JSON (RFC 4627) as data format.
Default JSON-RPC endpoints:
Client | URL |
---|---|
Node | http://localhost:{port} |
Port must be defined explicitly by passing the number through the environment variable JSON_RPC_SERVER_PORT
JSON_RPC_SERVER_PORT=3334 npm run commands
Variable | Mandatory | Default Value | Description |
---|---|---|---|
JSON_RPC_SERVER_HOST | No | 127.0.0.1 | The IP address on which the server will listen |
JSON_RPC_SERVER_PORT | Yes | {no-value} | The Port on which the server will listen (if not defined, the server will not start) |
JSON_RPC_BASIC_AUTH_ENABLE | No | False | Whether the basic authentication is enabled or not |
JSON_RPC_BASIC_AUTH_USER | No | {no-value} | The basic authentication username |
JSON_RPC_BASIC_AUTH_PASS | No | {no-value} | The basic authentication password |
JSON_RPC_RATE_LIMIT_WINDOW | No | 60000 | The Rate limiter window (1 minute, 60 * 1000ms) |
JSON_RPC_RATE_LIMIT_MAX_REQUESTS | No | 60 | The Rate limiter maximum requests in the specified window |
JSON_RPC_RATE_LIMIT_ENABLE | No | True | Whether the Rate limiter is enabled or not |
The curl options below might return a response where the node complains about the content type, this is because the --data option sets the content type to application/x-www-form-urlencoded . If your node does complain, manually set the header by placing -H "Content-Type: application/json" at the start of the call.
The examples also do not include the URL/IP & port combination which must be the last argument given to curl e.x. 127.0.0.1:3334
- clientVersion
- netVersion
- networkHashRate
- nodeWaitList
- peerCount
- protocolVersion
- syncing
- accounts
- deleteAccount
- encryptAccount
- exportAccount
- importAccount
- newAccount
- blockNumber
- getBalance
- getTransactionCount
- getBlockTransactionCountByHash
- getBlockTransactionCountByNumber
- sendTransaction
- sendRawTransaction
- getBlockByHash
- getBlockByNumber
- getTransactionByHash
- getTransactionByBlockHashAndIndex
- getTransactionByBlockNumberAndIndex
Returns the current client version.
none
String
- The current client version.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"clientVersion","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc":"2.0",
"result": "1.0.0"
}
Returns the current network.
none
String
- The current network id.
-
"1"
: Webdollar MainNet -
"2"
: Webdollar TestNet
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"netVersion","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": {
"id": 1,
"name": "Webdollar MainNet"
}
}
Returns the current network hash rate.
none
Integer
- The current network hash rate.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"networkHashRate","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": 1234567890
}
Returns the current node wait list.
none
Array
- The current node wait list.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"nodeWaitList","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": [
"https://node1.example.com",
"https://node2.example.com",
]
}
Returns number of peers currently connected to the client.
none
Object
- Information about the connected peers.
-
clients
:QUANTITY
-
servers
:QUANTITY
-
webpeers
:QUANTITY
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"peerCount","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": {
"clients": 1,
"servers": 10,
"webpeers": 0
}
}
Returns the current webdollar protocol version.
none
String
- The current webdollar protocol version.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"protocolVersion","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": "1.200.0"
}
Returns an object with data about the sync status.
none
Object
, An object with sync status data or FALSE
, when not syncing:
-
currentBlock
:QUANTITY
- The current block, same as blockNumber -
isSynchronized
:Boolean
- If the node is in sync with the network -
secondsBehind
:QUANTITY
- The estimated number of seconds behind
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"syncing","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": {
"currentBlock": 160,
"isSynchronized": true,
"secondsBehind": 10.84
}
}
Returns a list of accounts in the wallet.
-
Boolean
- Iftrue
, the response will include also the balance
Array of Object
, The accounts included in the wallet
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"accounts","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": ["WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$"]
}
// or with balance
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"accounts","params":[true],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": [
{
"address": "WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$",
"balance": 200,
"balance_raw": 2000000
}
]
}
Removes an account from the wallet.
-
String
- The account to remove -
String
- The encryption password, if the account was previously encrypted
Boolean
, The status of the operation
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"deleteAccount","params":["WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$"],"id":1}'
// Result
{
"id" : 1,
"jsonrpc": "2.0",
"result" : true
}
// or with password if the account was previously encrypted
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"deleteAccount","params":["WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$", "<12 words password>"],"id":1}'
// Result
{
"id" : 1,
"jsonrpc": "2.0",
"result" : true
}
Encrypt an existing account from the wallet, which is not already encrypted.
-
String
- The account to encrypt
String
, The generated password for the account
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"encryptAccount","params":["WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$"],"id":1}'
// Result
{
"id" : 1,
"jsonrpc": "2.0",
"result" : "<12 words password>"
}
Exports an existing account from the wallet.
-
String
- The account to export
Object
, The JSON containing all the informations describing the account
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"exportAccount","params":["WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$"],"id":1}'
// Result
{
"id" : 1,
"jsonrpc": "2.0",
"result" : {
"version" : "0.1",
"address" : "WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$",
"publicKey" : "<address public key>",
"privateKey": "<address private key>"
}
}
Imports an existing account from a JSON Object.
-
Object
- The JSON object containing the informations describing an account
Object
, An object describing the imported account
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"importAccount","params":[{ \
"version" : "0.1", \
"address" : "WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$", \
"publicKey" : "<address public key>", \
"privateKey": "<address private key>" \
}], "id":1}'
// Result
{
"id" : 1,
"jsonrpc": "2.0",
"result" : {
"address" : "WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$",
"publicKey" : "<address public key>",
}
}
Creates a new account in the wallet.
-
Boolean
- Iftrue
, the account will be encrypted and the response will include also the generated password
Object
, An object containing the newly created account and the generated password (in case encryption was set)
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"newAccount","params":[],"id":1}'
// Result
{
"id" : 1,
"jsonrpc": "2.0",
"result" : {
"address" : "WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$"
}
}
// or if the account should be encrypted
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"newAccount","params":[true],"id":1}'
// Result
{
"id" : 1,
"jsonrpc": "2.0",
"result" : {
"address" : "WEBD$gCA2Ydie63YGu+4ZVIfA+xP6n$7@r4txvL$",
"password": "<12 words password>"
}
}
Returns the number of most recent block.
none
QUANTITY
- integer of the current block number
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"blockNumber","params":[],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": 1045
}
WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$
Returns the balance of the account of given address.
-
String
, address to check for balance.
params: [
"WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$"
]
QUANTITY
- integer of the current balance, in webdollar coins.
- "Address is invalid" - When the address is invalid
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getBalance","params":["WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$"],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": 4257200000
}
Returns the number of transactions sent from an address.
!!! Important: This method is not available yet
-
String
, address to check for the number of transactions. -
QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
params: [
"WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$",
"latest" // state at the latest block
]
QUANTITY
- integer of the number of transactions send from this address.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getTransactionCount","params":["WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$","latest"],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": 1
}
Returns the number of transactions in a block from a block matching the given block hash.
-
String
, hash of a block.
params: [
"0000000000d31971c54e65f7e253ae2d45df5d0dab52d05d04da6bd470c90e4f"
]
QUANTITY
- integer of the number of transactions in this block.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockTransactionCountByHash","params":["0000000000d31971c54e65f7e253ae2d45df5d0dab52d05d04da6bd470c90e4f"],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": 16
}
Returns the number of transactions in a block matching the given block number.
-
QUANTITY|TAG
- integer of a block number, or the string"earliest"
,"latest"
or"pending"
params: [
"105789",
]
QUANTITY
- integer of the number of transactions in this block.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockTransactionCountByNumber","params":["105789"],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": 25
}
Creates new transaction.
-
Object
- The transaction object
-
from
:String
- The address the transaction is sent from. -
to
:String
, - The address the transaction is directed to. -
value
:QUANTITY
- Integer of the value sent with this transaction (in Webdollar coins) -
fee
:QUANTITY
- (optional) Integer of the fee for this transaction (in Webdollar coins) -
password
:String
- (optional) The password corresponding to the "from" address, if this is encrypted
params: [{
"from": "WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$",
"to": "WEBD$gDs#W$n1#8zf@9JmLsgV7vvRirfdrC+Y@v$",
"value": 500000,
"fee": 100000,
"password": "AAAA BBBB CCCC DDDD EEEE FFFF GGGGG HHHH IIII JJJJ KKKK LLLL" // optional
}]
String
- the transaction hash.
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"sendTransaction","params":[{see above}],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": "9dfc1de8fc6877f77a61ba1af6e9d4da310d09061cb5ca59fa45f7bf3b2217e3"
}
Creates new advanced transaction.
-
Array
- The "From" Addresses objects list
-
address
:String
- The address the transaction is sent from. -
value
:QUANTITY
- Integer of the value sent from this address (in Webdollar coins) -
password
:String
- (optional) The password corresponding to the current address, if this is encrypted
-
Array
- The "To" Addresses objects list
-
address
:String
- The address the transaction is sent to. -
value
:QUANTITY
- Integer of the value sent to this address (in Webdollar coins)
Note: The fee is automatically calculated based on the transaction size in bytes
params: [
[
{
"address": "WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$",
"value": 100000,
"password": "AAAA BBBB CCCC DDDD EEEE FFFF GGGGG HHHH IIII JJJJ KKKK LLLL" // optional
}
],
[
{
"address": "WEBD$gDs#W$n1#8zf@9JmLsgV7vvRirfdrC+Y@v$",
"value": 100000,
}
]
]
String
- the transaction hash.
- "Address "{address}" is invalid" - When one of the addresses is invalid
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"sendAdvancedTransaction","params":[{see above}],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": "9dfc1de8fc6877f77a61ba1af6e9d4da310d09061cb5ca59fa45f7bf3b2217e3"
}
Creates new transaction from a pre-signed (offline) transaction.
-
String
, The base64 encoded transaction data.
params: ["{base64 encoded transaction}"]
String
- the transaction hash
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"sendRawTransaction","params":[{see above}],"id":1}'
// Result
{
"id":1,
"jsonrpc": "2.0",
"result": "9dfc1de8fc6877f77a61ba1af6e9d4da310d09061cb5ca59fa45f7bf3b2217e3"
}
Returns information about a block by hash.
-
String
- Hash of a block. -
Boolean
- Iftrue
it returns the full transaction objects, iffalse
only the hashes of the transactions. (default: false) -
Boolean
- Iftrue
it will process the block according to hard-forks. (default: true)
params: [
'0000000000d31971c54e65f7e253ae2d45df5d0dab52d05d04da6bd470c90e4f',
true,
true
]
Object
- A block object, or null
when no block was found:
-
id
:Integer
- the block number -
block_id
:Integer
- the block number -
hash
:String
- hash of the block -
nonce
:Integer
- the nonce of the block -
nonce_raw
:Integer
- the unprocessed nonce of the block -
version
:Integer
- the version of the block -
previous_hash
:String
- hash of the previous block. -
timestamp
:String
- the formatted timestamp for when the block was created. -
timestamp_UTC
:Integer
- the timestamp in UTC for when the block was created. -
timestamp_block
:Integer
- the raw timestamp for when the block was created. -
hash_data
:String
- the hash of the data stored in the block. -
miner_address
:String
- the address that mined the block. -
trxs_hash_data
:String
- the hash of the transaction data. -
trxs_number
:Integer
- the number of transactions included in the block. -
trxs
:Array
- the transactions included in the block (hashes or the full object). -
reward
:Integer
- the reward for the block. -
reward_raw
:Integer
- the reward for the block in Webdollar coins. -
createdAtUTC
:String
- the formatted timestamp in UTC for when the block was created. -
block_raw
:String
- the raw enoded block information
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockByHash","params":["0000000000d31971c54e65f7e253ae2d45df5d0dab52d05d04da6bd470c90e4f", true, true],"id":1}'
// Result
{
"id":1,
"jsonrpc":"2.0",
"result": {
"id": 100,
"block_id": 100,
"hash": "00000000349a2c3c93dea00bf56ca0fa83553b1d3ce0b5e0292ad704b6da21f1",
"nonce": 0,
"nonce_raw": 0,
"version": 1,
"previous_hash": "0000000017af4e3d05aa745c4de982085887b6cfd165d69f311aed059a170bd6",
"timestamp": "Fri, 14 Dec 2018 12:02:53 GMT",
"timestamp_UTC": 1544788973,
"timestamp_block": 5275394,
"hash_data": "950d45f13e32cfce6e52f6e69ad72a2ce744fdf600f281ec171d94475bff1e0b",
"miner_address": "WEBD$gCt+f$3rJ7Q@AGrGVhqZ$2ke+o8E6BVpbv$",
"trxs_hash_data": "5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456",
"trxs_number": 0,
"trxs": [],
"reward": 6000,
"reward_raw": 60000000,
"createdAtUTC": "2018-12-14T12:02:53.000Z",
"block_raw": "MDAwMDAwMDAzND@hMmMzYzkzZGVhMD{.........}mZGI0YjAwZjg3NzAwMDAwMDAwMDAwMA=="
}
}
Returns information about a block by block number.
-
QUANTITY|TAG
- integer of a block number, or the string"earliest"
,"latest"
-
Boolean
- Iftrue
it returns the full transaction objects, iffalse
only the hashes of the transactions. (default: false) -
Boolean
- Iftrue
it will process the block according to hard-forks. (default: true)
params: [
100,
true,
true
]
See getBlockByHash
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getBlockByNumber","params":[100, true, true],"id":1}'
Result see getBlockByHash
Returns the information about a transaction requested by transaction hash.
-
String
- hash of a transaction
params: [
"44692aa0762d7699d3849837cb823dcfd727b3ff7f65cfc55194484929842e7d"
]
Object
- A transaction object, or null
when no transaction was found:
-
trx_id
:String
- hash of the transaction. -
version
:Integer
- version of the transaction. -
nonce
:Integer
- the nonce of the transaction. -
index
:Integer
- the index of the transaction in the block. -
time_lock
:Integer
- the time_lock of the transaction. -
from_length
:Integer
- the number of "from" addresses. -
to_length
:Integer
- the number of "to" addresses. -
fee
:Float
- the fee of the transaction. -
fee_raw
:Integer
- the fee of the transaction in Webdollar coins. -
amount
:Float
- the amount sent (without fee). -
amount_raw
:Integer
- the amount sent (without fee) in Webdollar coins. -
total_amount
:Float
- the total amount sent (including the fee). -
total_amount_raw
:Integer
- the total amount sent (including the fee) in Webdollar coins. -
timestamp
:String
- the timestamp of the transaction.null
when its pending. -
timestamp_UTC
:Integer
- the timestamp of the transaction in UTC.null
when its pending. -
timestamp_block
:Integer
- the timestamp of the block.null
when its pending. -
createdAtUTC
:String
- the formatted timestamp in UTC for when the block was created.null
when its pending. -
block_id
:Integer
- block number where this transaction was in.null
when its pending. -
isConfirmed
:Boolean
- Whether the transaction is confirmed or not, -
isVirtual
:Boolean
- Whether the transaction is virtual or not, -
from
:Object
- The list of sending addresses-
from[trxs]
:Array
- The information about a single address-
from[trxs][][trx_from_address]
- The address -
from[trxs][][trx_from_pub_key]
- The public key of the address -
from[trxs][][trx_from_signature]
- The signature of the address -
from[trxs][][trx_from_amount]
- The amount sent -
from[trxs][][trx_from_amount_raw]
- The amount sent in Webdollar coins
-
-
from[addresses]
:Array
- The list of the receiving addresses -
from[amount]
:Float
- The sent amount (including the fee) -
from[amount_raw]
:Integer
- The sent amount (including the fee) in Webdollar coins
-
-
to
:Object
- The list of receiving addresses-
to[trxs]
:Array
- The information about a single address-
to[trxs][][trx_to_address]
- The address -
to[trxs][][trx_to_amount]
- The amount received -
to[trxs][][trx_to_amount_raw]
- The amount received in Webdollar coins
-
-
to[addresses]
:Array
- The list of the receiving addresses -
to[amount]
:Float
- The received amount -
to[amount_raw]
:Integer
- The received amount in Webdollar coins
-
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getTransactionByHash","params":["44692aa0762d7699d3849837cb823dcfd727b3ff7f65cfc55194484929842e7d"],"id":1}'
// Result
{
"jsonrpc":"2.0",
"id":1,
"result": {
"trx_id": "44692aa0762d7699d3849837cb823dcfd727b3ff7f65cfc55194484929842e7d",
"version": 2,
"nonce": 0,
"index": 0,
"time_lock": 71,
"from_length": 1,
"to_length": 1,
"fee": 8.178,
"fee_raw": 81780,
"amount": 20,
"amount_raw": 200000,
"total_amount": 281780,
"total_amount_raw": 28.178,
"timestamp": null,
"timestamp_UTC": null,
"timestamp_block": null,
"timestamp_raw": null,
"createdAtUTC": null,
"block_id": null,
"isConfirmed": true,
"isVirtual": false,
"from": {
"trxs": [
{
"trx_from_address": "WEBD$gAaGpKWMi#$#1HgTW0qgndTbd1a71BM@7H$",
"trx_from_pub_key": "6df10437fc31019404258ea58da62a49973b03a81425eccacc82bee3ee229bf2",
"trx_from_signature": "149bf40b2efdce42b78054db342d9d38742c0bf27963883a1f1f26df4e52a5f8438afda342d78b6b95e78200719a46ebd53b5840f3f2cef6612cb214f296ec00",
"trx_from_amount": 28.178,
"trx_from_amount_raw": 281780
}
],
"addresses": [
"WEBD$gAaGpKWMi#$#1HgTW0qgndTbd1a71BM@7H$"
],
"amount": 28.178,
"amount_raw": 281780
},
"to": {
"trxs": [
{
"trx_to_address": "WEBD$gD$DU#wKt@xIEMU3j@CFqakpRciWn006o7$",
"trx_to_amount": 20,
"trx_to_amount_raw": 200000
}
],
"addresses": [
"WEBD$gD$DU#wKt@xIEMU3j@CFqakpRciWn006o7$"
],
"amount": 20,
"amount_raw": 200000
},
"isConfirmed": false
}
}
Returns information about a transaction by block hash and transaction index position.
-
String
- hash of a block. -
Integer
- transaction index position.
params: [
'44692aa0762d7699d3849837cb823dcfd727b3ff7f65cfc55194484929842e7d',
0
]
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getTransactionByBlockHashAndIndex","params":["44692aa0762d7699d3849837cb823dcfd727b3ff7f65cfc55194484929842e7d", 0],"id":1}'
Result see getTransactionByHash
Returns information about a transaction by block number and transaction index position.
-
Integer|TAG
- a block number, or the string"earliest"
,"latest"
or"pending"
-
Integer
- the transaction index position.
params: [
100678,
0
]
// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"getTransactionByBlockNumberAndIndex","params":[100678, 0],"id":1}'
Result see getTransactionByHash