Cosmos
Cosmos Hub mainnet (cosmoshub-4) over REST, gRPC, and Tendermint RPC. Includes the full Cosmos-ecosystem method surface (Cosmos SDK, CosmWasm, IBC, Tendermint).
Endpoints
The default Cosmos setup runs three listeners — one per API interface:
| Port | Interface | Calling convention |
|---|---|---|
3360 |
REST | GET /cosmos/..., GET /ibc/... |
3361 |
gRPC | gRPC services from the Cosmos SDK proto trees |
3362 |
Tendermint RPC | URI (/status?...) or JSON-RPC over POST |
chain-id |
COSMOSHUB |
| Spec | specs/cosmoshub.json (imports COSMOSSDK50 + COSMOSWASM, which pull in COSMOSSDK → IBC + TENDERMINT) |
Supported method families
| Family | Examples |
|---|---|
| Cosmos SDK | /cosmos/auth/, /cosmos/bank/, /cosmos/staking/, /cosmos/gov/, /cosmos/distribution/, /cosmos/slashing/, /cosmos/tx/, etc. |
| CosmWasm | /cosmwasm/wasm/v1/contract/..., smart-contract queries |
| IBC | /ibc/apps/transfer/, /ibc/core/channel/, /ibc/core/client/, /ibc/core/connection/ |
| Tendermint RPC | status, block, tx, abci_query, validators, broadcast_tx_*, etc. |
Connect a client
Other Cosmos chains
The spec catalog already covers the major Cosmos-SDK chains — Osmosis, Juno, Celestia, Stargaze, Secret, Stride, and more (see Supported chains). They all build on the shared Cosmos / CosmWasm / IBC / Tendermint method surface, so serving one is a matter of pointing your config at its spec and upstreams — no spec authoring on your side.
If a Cosmos chain you need isn't in the catalog, request it and Magma will add the spec.
Run this example
The repo ships a ready-to-run config at config/smartrouter_examples/smartrouter_cosmos.yml — it opens all three Cosmos Hub listeners (REST 3360, gRPC 3361, Tendermint RPC 3362), each backed by two distinct public vendor groups (PublicNode + Polkachu), no API key needed:
Then send a request with any of the client snippets above. Edit the node-urls in the config to point at your own upstreams.