APIs
APIs
Unified Terp Network API surfaces — RPC, REST/LCD, gRPC, historical data, CLI, and integration state
APIs
One folder for all chain and data APIs. Each surface is a file (not a tag folder tree). Start here for how to connect; open a reference page when you need every operation.
Surfaces
| File | Protocol | Typical use | Default public host |
|---|---|---|---|
| CometBFT RPC | HTTP JSON-RPC | status, abci_query, broadcast, blocks | https://rpc.cosmos.directory/terpnetwork |
| LCD / REST | REST | bank, staking, wasm queries | https://rest.cosmos.directory/terpnetwork |
| OpenAPI / gRPC-gateway | OpenAPI + HTTP | generated REST from protobuf | node grpc-web / gateway |
| IBC-Go | OpenAPI | clients, connections, channels | same REST/gRPC stack |
| Historical data | HTTP | archive / info.terp.network style data | deployment-specific |
| CLI | terpd | local queries and txs | your node or --node |
RPC reference
CometBFT endpoints as a single file
LCD / REST
Cosmos SDK REST surface
OpenAPI
Full OpenAPI document UI
IBC-Go
IBC module OpenAPI
Historical data
Archive / analytics API
CLI
terpd status, query, tx patterns
Integration state
| Concern | Status | Notes |
|---|---|---|
| Public RPC/REST via cosmos.directory | Live | Good for docs examples; rate limits apply |
| S3 chain files (genesis, chain.json, snapshots) | Live | Public endpoints |
Multi-chain state.json (code_ids + addresses) | Live | state.json reference |
| OpenAPI YAML in this repo | Partial | Specs under static/api/*.yaml — some LCD/DATA stubs |
| Interactive OpenAPI UI (fumadocs-openapi) | Live | One page per YAML file |
| Authenticated / permissioned APIs | N/A | Public chain reads; txs need keys |
| gRPC binary clients | Supported | Enable on node; use grpcurl / generated stubs |
Public endpoints are convenience, not consensus
For production value, run your own node or verify critical queries against multiple sources. See trustlessness.
How to interact (quick patterns)
1. Status (RPC)
curl -s https://rpc.cosmos.directory/terpnetwork/status \
| jq '.result.sync_info | {latest_block_height, catching_up}'2. Balances (REST / LCD)
ADDR=terp1...
curl -s "https://rest.cosmos.directory/terpnetwork/cosmos/bank/v1beta1/balances/${ADDR}" | jq .3. gRPC list services
# Replace host with a public or self-hosted gRPC endpoint
grpcurl -plaintext grpc.terp.network:9090 list4. CLI against public or local node
terpd status --node https://rpc.cosmos.directory/terpnetwork
terpd query bank balances "$ADDR" --node https://rpc.cosmos.directory/terpnetwork5. Resolve contract addresses from state.json
curl -sL https://s3.terp.network/snapshots/mainnet/morocco-1/state.json \
| jq '.["morocco-1"].default["abstract:registry"]'Full field guide: state.json reference.
Ports (self-hosted node)
| Service | Default | Config |
|---|---|---|
| P2P | 26656 | config.toml |
| RPC | 26657 | config.toml |
| REST / LCD | 1317 | app.toml → api |
| gRPC | 9090 | app.toml → grpc |
| Prometheus | 26660 | config.toml → instrumentation |
Enable REST:
[api]
enable = true
address = "tcp://0.0.0.0:1317"Enable gRPC:
[grpc]
enable = true
address = "0.0.0.0:9090"Client libraries
Prefer language SDKs over raw curl for apps: API libraries.