API
Tendermint RPC

AIOZ Network - Tendermint RPC docs

Tendermint RPC (Remote Procedure Call) provides a powerful interface for interacting with Tendermint node, the core engine driving Byzantine Fault Tolerant (BFT) consensus in AIOZ Network chain. It allows developers to query data, manage accounts, and submit transactions via various protocols. This document serves as a reference for developers looking to leverage Tendermint's capabilities through various protocols and endpoints. Public access Tendermint RPC endpoint can be found here.

Version & Specification

This documentation covers Tendermint RPC version v0.34, and the official specification can be found at the following link: https://docs.tendermint.com/v0.34/rpc/ (opens in a new tab)

Supported Protocols

Tendermint RPC supports three communication protocols:

  • URI over HTTP: Offers a REST-like interface for simple queries and actions using familiar methods like GET and POST.
  • JSONRPC over HTTP: Enables structured RPC calls using JSON as the data format via HTTP requests.
  • JSONRPC over websockets: Provides a real-time communication channel suitable for subscribing to events and receiving continuous updates.

Arguments

When making RPC calls, arguments expected as strings or byte arrays can be formatted in two ways:

  • Quoted strings: "abc"
  • 0x-prefixed strings: 0x616263

Available Methods

Tendermint RPC offers a variety of methods categorized by protocol:

URI/HTTP:

  • /block: Retrieve information about a specific block by its height.
  • /blockchain: Query various aspects of the blockchain, including latest block, validators, and consensus state.
  • /status: Get general information about the Tendermint node and its running state.

JSONRPC/HTTP:

  • Requests can be POST'd to the root RPC endpoint via HTTP with request body.
    • E.g. {"method": "block", "params": ["5"], "id": 1}: Retrieve block information at height 5 with ID 1.
  • Numerous other methods exist for interacting with blocks, transactions, validators, consensus, and more.

JSONRPC/websockets:

  • Subscribe to events like NewBlock to receive real-time notifications.
  • Unsubscribe from events when no longer needed.