REST API ​
Transactions ​
Broadcast Transaction ​
Broadcasts a signed transaction to the network.
Request ​
- Method: GET
- URL:
/broadcast_tx_sync - Query Parameters:
tx: The transaction to broadcast (hex-encoded JSON string)
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The result of the broadcastcode: The result code (0 if successfully passed CheckTx)data: Hex-encoded JSON string with CheckTx informationhash: The transaction hashlog: The transaction logcodespace: The transaction codespace
Get Transaction ​
Retrieves a transaction by its hash.
Request ​
- Method: GET
- URL:
/tx - Query Parameters:
hash: The transaction hash (prepend with0x)prove: Whether to include a proof of the transaction (default: false)
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The transaction datahash: The transaction hashheight: The block heightindex: The transaction indextx_result: The transaction resultcode: The transaction result codedata: Hex-encoded JSON string with transaction datalog: The transaction logcodespace: The transaction codespace
tx: The transaction dataproof: The transaction proofproof_height: The proof height
Wallets ​
Get Next Nonce ​
Retrieves the next nonce for a given address.
Request ​
- Method: GET
- URL:
/abci_query?path="/get_next_nonce/<address>"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded nonce
State ​
Query State ​
Queries the data at a given path in the state store
Request ​
- Method: GET
- URL:
/abci_query?path="/get/<contract>.<hash>:<key>" - Alternate URL:
/abci_query?path="/get/<contract>.<variable>"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded value
Keys in a Hash ​
Retrieves the keys in a given hash
Request ​
- Method: GET
- URL:
/abci_query?path="/keys/<contract>.<hash>"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded JSON string with keys
Deployed Contracts ​
Retrieves the deployed contracts
Request ​
- Method: GET
- URL:
/abci_query?path="/contracts"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded JSON string with list of contracts
Contract Code ​
Retrieves the code for a given contract
Request ​
- Method: GET
- URL:
/abci_query?path="/contract/<contract>"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded code
Contract Methods ​
Retrieves the methods for a given contract
Request ​
- Method: GET
- URL:
/abci_query?path="/contract_methods/<contract>"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded JSON string with method data
Services ​
Estimate Stamps ​
Estimates the number of stamps required for a given transaction
Request ​
- Method: GET
- URL:
/abci_query?path="/estimate_stamps/<hex-encoded-signed-transaction>"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded JSON string with stamp estimate and tx result
Lint Code ​
Lints the code for a given contract
Request ​
- Method: GET
- URL:
/abci_query?path="/lint/<base64-encoded-urlsafe-code>"
Response ​
- Content-Type: application/json
- Body: JSON object with the following fields:
jsonrpc: The JSON-RPC versionid: The request IDresult: The query resultresponse: The response datavalue: Hex-encoded JSON string with lint result