Carbon API

There are three types of API - gRPC, REST and CometBFT RPC, that enables submitting transactions and querying data in Carbon.

Comparison Table

The following table compares the differences between the gRPC, REST and CometBFT RPC endpoints.

NameAdvantagesDisadvantages

gRPC

  • can use code-generated stubs in various languages

  • supports streaming and bidirectional communication (HTTP/2)

  • small wire binary sizes, faster transmission

  • based on HTTP/2, not available in some browsers

  • learning curve (mostly due to Protobuf)

REST

  • ubiquitous

  • client libraries in all languages, faster implementation

  • only supports unary request-response communication (HTTP/1.1)

  • bigger over-the-wire message sizes (JSON)

  • heavily rate-limited by public endpoints

CometBFT RPC

  • easy to use

  • has endpoints that allow querying txs by event type

  • has websocket support for streaming data

  • bigger over-the-wire message sizes (JSON)

  • due to scalability issues, many documented endpoints may be disabled or heavily rate-limited by public endpoints

Endpoints

These public endpoints can be used to query the Carbon blockchain.

gRPC

MainNet: https://grpc.carbon.network

TestNet: https://test-grpc.carbon.network

REST

MainNet: https://api.carbon.network

TestNet: https://test-api.carbon.network

CometBFT RPC

MainNet: https://tm-api.carbon.network

TestNet: https://test-tm-api.carbon.network

It is important to note that the above public endpoints do not have any guarantees on uptime and may not always be accessible, even when the blockchain may operating normally.

To ensure maximum reliability, it is advisable to run your own node with off-chain persistence enabled.

Documentation

REST

The API docs for Carbon are split into two, depending on whether they are for the custom modules (e.g. broker, etc.) on Carbon, or for modules that come standard with Cosmos-SDK (e.g. auth, bank, staking etc.):

Last updated