LumiWave Protocol

API Reference

LumiWave Protocol REST API, gRPC, and RPC endpoint guide

API Types

LumiWave provides 3 types of API interfaces. Choose the API based on your use case and environment. Typically, REST API is used for web frontends, gRPC for backend services, and CometBFT RPC when low-level blockchain data is needed.

APIProtocolDefault PortPurpose
REST (LCD)HTTP/1.11317Chain data queries, transaction broadcast
gRPCHTTP/29090Backend services, indexers, exchange SDKs
CometBFT RPCHTTP/1.1 + WebSocket26657CLI, wallets, relayers, real-time subscriptions

REST API (LCD)

The Cosmos SDK REST API (LCD, Light Client Daemon) is an interface for querying chain data and broadcasting transactions over standard HTTP. It can be called directly from curl or a browser, making it convenient for testing and debugging. It is the most commonly used API for fetching chain data from web frontends. All responses are returned in JSON format.

Key Endpoints

Below are frequently used REST endpoints. All paths are relative to http://localhost:1317 — replace with your node's IP and port in production.

# Node info — returns network, version, moniker and basic node information
curl http://localhost:1317/cosmos/base/tendermint/v1beta1/node_info

# Latest block — most recent block header and transaction list
curl http://localhost:1317/cosmos/base/tendermint/v1beta1/blocks/latest

# Account balance — all token balances held by a specific address
curl http://localhost:1317/cosmos/bank/v1beta1/balances/<ADDRESS>

# Validator list — active/inactive validator info and voting power
curl http://localhost:1317/cosmos/staking/v1beta1/validators

# Proposal list — governance proposals and voting status
curl http://localhost:1317/cosmos/gov/v1beta1/proposals

# TX query — execution result and event logs for a transaction hash
curl http://localhost:1317/cosmos/tx/v1beta1/txs/<TX_HASH>

# Transaction broadcast — submit a signed transaction to the network
# BROADCAST_MODE_SYNC: responds after basic validation (recommended)
# BROADCAST_MODE_ASYNC: responds immediately without validation (fast but no failure detection)
# BROADCAST_MODE_BLOCK: waits until included in a block (slow but certain)
curl -X POST http://localhost:1317/cosmos/tx/v1beta1/txs \
  -H "Content-Type: application/json" \
  -d '{"tx_bytes": "<BASE64_TX>", "mode": "BROADCAST_MODE_SYNC"}'

Swagger UI

All REST endpoints with their parameters and request/response schemas can be explored interactively via Swagger UI. We recommend testing APIs in Swagger UI first when getting started:

http://<RPC_NODE>:1317/swagger/

Swagger is available when api.swagger = true is set in the RPC node's app.toml.

gRPC

gRPC is a high-performance RPC framework developed by Google, based on Protobuf. It offers faster serialization/deserialization than REST API and provides strongly-typed schemas for higher data integrity. It is recommended for backend services that need to process large volumes of data quickly, such as indexers and exchange integrations. Built on HTTP/2, it supports streaming and multiplexing.

Using grpcurl

grpcurl is a tool for testing gRPC endpoints from the command line. Think of it as the gRPC equivalent of curl.

# List services — view all gRPC services available on the node
grpcurl -plaintext localhost:9090 list

# Query balances — all token balances for a specific address (same as REST /balances)
grpcurl -plaintext \
  -d '{"address": "<ADDRESS>"}' \
  localhost:9090 cosmos.bank.v1beta1.Query/AllBalances

# Validator list — query all validator information
grpcurl -plaintext localhost:9090 cosmos.staking.v1beta1.Query/Validators

# Total supply query — total supply of all tokens on the chain
grpcurl -plaintext localhost:9090 cosmos.bank.v1beta1.Query/TotalSupply

gRPC-web

Browsers cannot directly call HTTP/2 gRPC, so browser-based applications use gRPC-web. gRPC-web is an HTTP/1.1 compatible protocol that relays gRPC requests through a proxy like Nginx or Envoy. Use this when you want to leverage gRPC's strongly-typed advantages in frontend applications.

CometBFT RPC

CometBFT (formerly Tendermint) RPC is an interface for accessing low-level blockchain data at the consensus engine level. It provides information not available through REST API or gRPC, such as consensus state, network peer information, and the unconfirmed transaction pool. It is primarily used by CLI tools, wallet applications, and IBC relayers, and also supports real-time event subscriptions via WebSocket.

Key Endpoints

CometBFT RPC uses URL query parameter style requests. The default port is 26657.

# Status query — node sync status, latest block height, validator info
curl http://localhost:26657/status

# Network info — connected peer list, each peer's IP and connection status
curl http://localhost:26657/net_info

# Specific block — block header, transactions, and signatures at a given height
curl http://localhost:26657/block?height=1000

# Transaction search — search transactions by conditions (height, events, etc.)
curl "http://localhost:26657/tx_search?query=\"tx.height=1000\""

# Consensus state — current consensus round, step, and validator vote status
curl http://localhost:26657/consensus_state

# Unconfirmed TX pool — pending transactions not yet included in a block
curl http://localhost:26657/unconfirmed_txs

WebSocket Subscriptions

CometBFT RPC supports real-time blockchain event subscriptions via WebSocket. You can receive various events instantly without polling, such as new block creation and transactions for specific addresses. This is useful for real-time notifications in wallet apps and deposit/withdrawal detection for exchanges.

# WebSocket connection
wscat -c ws://localhost:26657/websocket

# Subscribe to new blocks
{"jsonrpc":"2.0","method":"subscribe","params":["tm.event='NewBlock'"],"id":1}

# Subscribe to TX for a specific address
{"jsonrpc":"2.0","method":"subscribe","params":["tm.event='Tx' AND transfer.sender='lumi1...'"],"id":2}

When integrating with exchanges, the WebSocket buffer size should be increased. See Sentry/RPC Setup for detailed configuration.

Module Query Paths

LumiWave follows the Cosmos SDK modular architecture, where each module provides independent REST paths and gRPC services. The table below lists frequently used module API paths. REST paths are appended to http://localhost:1317, and gRPC services are accessed at localhost:9090.

ModuleREST PathgRPC Service
Bank/cosmos/bank/v1beta1/cosmos.bank.v1beta1.Query
Staking/cosmos/staking/v1beta1/cosmos.staking.v1beta1.Query
Distribution/cosmos/distribution/v1beta1/cosmos.distribution.v1beta1.Query
Gov/cosmos/gov/v1beta1/cosmos.gov.v1beta1.Query
Slashing/cosmos/slashing/v1beta1/cosmos.slashing.v1beta1.Query
IBC Transfer/ibc/apps/transfer/v1/ibc.applications.transfer.v1.Query
Wasm/cosmwasm/wasm/v1/cosmwasm.wasm.v1.Query
TokenFactory/osmosis/tokenfactory/v1beta1/osmosis.tokenfactory.v1beta1.Query

Authentication & Security

LumiWave APIs have no authentication by default. If you expose your node externally, anyone can access the APIs, so you must apply security settings for production environments.

  • Nginx Reverse Proxy: Protect transmitted data with SSL/TLS encryption and restrict access with IP whitelisting. Essential when exposing APIs externally.
  • Firewall: Block unnecessary ports and only open required ones → Firewall Setup
  • Rate Limiting: Limit requests per second/minute via Nginx to protect your node from DDoS attacks or excessive requests.

For personal use, simply allowing only your IP through the firewall provides safe access without additional authentication setup.

On this page