Terp Docs
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

FileProtocolTypical useDefault public host
CometBFT RPCHTTP JSON-RPCstatus, abci_query, broadcast, blockshttps://rpc.cosmos.directory/terpnetwork
LCD / RESTRESTbank, staking, wasm querieshttps://rest.cosmos.directory/terpnetwork
OpenAPI / gRPC-gatewayOpenAPI + HTTPgenerated REST from protobufnode grpc-web / gateway
IBC-GoOpenAPIclients, connections, channelssame REST/gRPC stack
Historical dataHTTParchive / info.terp.network style datadeployment-specific
CLIterpdlocal queries and txsyour node or --node

Integration state

ConcernStatusNotes
Public RPC/REST via cosmos.directoryLiveGood for docs examples; rate limits apply
S3 chain files (genesis, chain.json, snapshots)LivePublic endpoints
Multi-chain state.json (code_ids + addresses)Livestate.json reference
OpenAPI YAML in this repoPartialSpecs under static/api/*.yaml — some LCD/DATA stubs
Interactive OpenAPI UI (fumadocs-openapi)LiveOne page per YAML file
Authenticated / permissioned APIsN/APublic chain reads; txs need keys
gRPC binary clientsSupportedEnable 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 list

4. CLI against public or local node

terpd status --node https://rpc.cosmos.directory/terpnetwork
terpd query bank balances "$ADDR" --node https://rpc.cosmos.directory/terpnetwork

5. 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)

ServiceDefaultConfig
P2P26656config.toml
RPC26657config.toml
REST / LCD1317app.tomlapi
gRPC9090app.tomlgrpc
Prometheus26660config.tomlinstrumentation

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.

On this page