Tracking transactions
Lifecycle (Cosmos)
- Build signed tx (proto
Msg*fromproto/c12/*/v1/tx.protoor standard SDK msgs). - Broadcast via CometBFT
broadcast_tx_sync/ RESTPOST /cosmos/tx/v1beta1/txs. - Wait for inclusion in a block; check
codein tx response (0= success). - Inspect
eventsintx_response.eventsfor module attributes (issue,challenge, …).
Query by hash
REST:
TX=YOUR_HEX_HASH
curl -s "https://rest.testnet.carbon12.network/cosmos/tx/v1beta1/txs/${TX}" | jq .CometBFT:
curl -s "https://rpc.testnet.carbon12.network/tx?hash=0x${TX}" | jq .The explorer indexer uses REST GET /cosmos/tx/v1beta1/txs/{hash} (src/indexer/sync.ts).
Events & records
Attest/checking modules emit typed events consumed by the explorer indexer (src/indexer/project.ts). Human-readable summaries live in @c12/protocol (packages/protocol/src/summaries.ts).
Query open challenges, deposits, and record heads via LCD paths documented in Connecting and packages/protocol/src/lcd.ts.
Record & roll-up queries
| Resource | REST (examples) |
|---|---|
| Attest / record head | /c12/attest/v1/... (see proto) |
| Checking state | /c12/checking/v1/... |
| Aggregates list | /c12/aggregate/v1/aggregates, /list, /available |
| Merkle proof | /c12/aggregate/v1/proof?key=… or /proof/{key} |
gRPC: /c12.aggregate.v1.Query/Proof (metadata in explorer packages/protocol/src/scope3.ts).
Explorer usage
The Carbon12 explorer provides:
/txs— list with message type summaries/txs/[hash]— messages, gas, fees, C12 events/attestations/[eventId]— case file (revision, parties, challenges, deposits, J strip)/auditor— period roll-ups and Merkle membership checks
Configure C12_RPC, C12_REST, and CHAIN_ID=c12-testnet-1 per docs/LIVE_CHAIN.md.
Merkle inclusion verification
Algorithm: RFC6962-SHA256 (packages/protocol/src/scope3.ts, x/aggregate/types/merkle.go).
Client flow (explorer):
- Fetch proof payload from
/c12/aggregate/v1/proof. - Recompute root from sorted
record_ids(aggregateRoot()inpackages/protocol/src/merkle.ts). - Compare to on-chain root hex (
verifyAggregateMembership()).
Auditor UI shows In proof list / Root check on /auditor/period/[periodId].
Legacy helper
verifyMerkleInclusion() in the explorer protocol package is a legacy binary-tree verifier — not used for x/aggregate RFC6962 roots.
IC12 precompile reads (EVM)
Read checking/record state from Solidity via IC12 at 0x0000000000000000000000000000000000000C12 — see Deploying smart contracts.