Skip to content

Cosmos Hub

Endpointhttps://rpc.lab.au.ro/cosmos
ProtocolCometBFT RPC (JSON-RPC and REST-style GET)
Networkcosmoshub-4
Batch✓ (JSON-RPC form)

The endpoint is the node's CometBFT RPC (port 26657 upstream) — exactly what CosmJS connects to. It answers both styles:

bash
# JSON-RPC
curl -X POST https://rpc.lab.au.ro/cosmos \
  -H "apikey: $YOUR_API_KEY" -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"status","params":{},"id":1}'

# GET style — same data
curl https://rpc.lab.au.ro/cosmos/status -H "apikey: $YOUR_API_KEY"

Supported methods

Live-verified: status, abci_info, block, validators, health, net_info, broadcast_tx_sync — the CometBFT RPC surface (plus abci_query, which is how CosmJS reads bank balances and other module state).

SDK integration — CosmJS

js
import { Tendermint37Client } from '@cosmjs/tendermint-rpc'
import { QueryClient, setupBankExtension } from '@cosmjs/stargate'

const tm = await Tendermint37Client.connect({
  url: 'https://rpc.lab.au.ro/cosmos',
  headers: { apikey: process.env.YOUR_API_KEY }
})

const status = await tm.status()
console.log('height:', status.syncInfo.latestBlockHeight)   // 31546680

// module queries (bank, staking, …) via abci_query:
const bank = QueryClient.withExtensions(tm, setupBankExtension)
const balance = await bank.bank.balance('cosmos1...', 'uatom')

tm.disconnect()

Recipes

Latest block & time

js
const block = await tm.block()
console.log(block.block.header.height, block.block.header.time)

Broadcast a signed transaction

Sign offline with @cosmjs/proto-signing (DirectSecp256k1HdWallet), then:

js
const result = await tm.broadcastTxSync({ tx: signedTxBytes })
console.log(result.code === 0 ? 'accepted' : `rejected: ${result.log}`)

(Garbage bytes are rejected by CheckTx with a non-zero code — the node validates before relay.)

Limitations

  • The LCD/REST API (:1317, /cosmos/bank/v1beta1/... paths) is not routed — use CometBFT RPC + CosmJS extensions (above), which cover the same module state via abci_query.
  • gRPC (:9090) is not exposed.
  • Historical state is limited by node pruning (recent heights only).