Connecting to the chain
Use the hosted c12-testnet-1 endpoints for integration. Public RPC and REST are served over HTTPS (fronted by Caddy). CORS is open on those public RPC and REST endpoints for browser dApps. gRPC is 52.6.69.73:9200 plaintext (no TLS for now). There are no published rate limits on RPC/REST/EVM yet; the faucet enforces 1 drip per address and per IP per 24 hours.
Endpoint table
| Interface | URL / host | Default port (single-node template) |
|---|---|---|
| CometBFT RPC | https://rpc.testnet.carbon12.network | 26657 |
| Cosmos REST (LCD) | https://rest.testnet.carbon12.network | 1317 |
| EVM JSON-RPC | https://evm.testnet.carbon12.network | 8545 (local); hosted path above |
| gRPC | 52.6.69.73:9200 | 9090 (local template) |
| WebSocket | Comet /websocket on RPC URL | Same host as RPC |
Local multi-node offsets are documented in devnet/scripts/lib.sh (REST 1317+i, gRPC 9090+i*10, EVM 8545+i*2).
CosmJS (TypeScript)
import { StargateClient } from "@cosmjs/stargate";
const rpc = "https://rpc.testnet.carbon12.network";
const client = await StargateClient.connect(rpc);
const height = await client.getHeight();
console.log("chain height", height);Query LCD modules via fetch:
const rest = "https://rest.testnet.carbon12.network";
const res = await fetch(`${rest}/c12/registry/v1/schemas/list`);
const body = await res.json();Message types and protobuf paths live under proto/c12/*/v1/ in the chain repo.
gRPC
Generated stubs come from chain make proto-gen. Example service paths used by tooling:
/c12.aggregate.v1.Query/Proof- Registry, attest, checking queries as defined in
proto/c12/*/v1/query.proto
Plaintext gRPC to 52.6.69.73:9200 (no TLS for now). Do not send credentials over untrusted networks without a TLS front-end you control.
grpcurl -plaintext 52.6.69.73:9200 list(grpcurl must be installed locally.)
EVM: ethers v6
import { JsonRpcProvider, Contract } from "ethers";
const provider = new JsonRpcProvider("https://evm.testnet.carbon12.network");
const network = await provider.getNetwork();
console.log(network.chainId); // 12121n
const IC12 = "0x0000000000000000000000000000000000000C12";
const abi = ["function head(string eventId) view returns (string recordId, uint8 status, uint32 revision)"];
const c12 = new Contract(IC12, abi, provider);EVM: viem
import { createPublicClient, http } from "viem";
const client = createPublicClient({
transport: http("https://evm.testnet.carbon12.network"),
});
const chainId = await client.getChainId(); // 12121Configure a custom chain definition with id: 12121 for wallet clients.
CometBFT RPC & WebSocket
curl -s https://rpc.testnet.carbon12.network/status | jq .
curl -s "https://rpc.testnet.carbon12.network/block?height=1" | jq .Subscribe to events via WebSocket at wss://rpc.testnet.carbon12.network/websocket (scheme/host follow your RPC deployment).
REST module paths (examples)
| Module | Example |
|---|---|
| Oracle price | /c12/oracle/v1/price |
| Participants | /c12/registry/v1/participants/list |
| Schemas | /c12/registry/v1/schemas/list |
| Aggregate proof | /c12/aggregate/v1/proof?key=… |
| Tx by hash | /cosmos/tx/v1beta1/txs/{hash} |
Explorer smoke script: scripts/chain-smoke.ts in the explorer repo.
CORS & rate limits
- CORS: Open on public CometBFT RPC and Cosmos REST (
https://rpc.testnet.carbon12.network,https://rest.testnet.carbon12.network). Third-party explorers may still proxy REST (e.g.GET /api/lcd/*→C12_REST). - Rate limits: None published yet for RPC/REST/EVM JSON-RPC. Abuse may be handled operationally; plan for client-side backoff.
- Faucet: 1 drip per address and per IP per 24h — see Testnet status.
Minimum gas price
Nodes default to 0.001uc12 (app/config/config.go). Wallets should set matching fee tokens on broadcast.