Skip to content

Multi-Network Support

Inodra supports multiple Sui networks. Each API key is associated with a project that targets a specific network (mainnet or testnet).

Network-Specific Endpoints

For explicit network targeting, use network-specific subdomains:

REST API & JSON-RPC

NetworkEndpoint
Mainnethttps://mainnet-api.inodra.com
Testnethttps://testnet-api.inodra.com

gRPC

NetworkEndpoint
Mainnetmainnet-grpc.inodra.com:443
Testnettestnet-grpc.inodra.com:443

Legacy URLs

The legacy URLs (api.inodra.com and grpc.inodra.com) automatically redirect to their mainnet equivalents:

  • api.inodra.commainnet-api.inodra.com
  • grpc.inodra.commainnet-grpc.inodra.com

WARNING

While legacy URLs continue to work via redirect, we recommend updating to network-specific URLs for new projects.

API Key Network Binding

Each API key is bound to the network configured in its project. If you make a request to a network-specific endpoint that doesn't match your API key's network, you'll receive a 403 Forbidden error:

json
{
  "error": "Network mismatch",
  "message": "API key is configured for testnet but request was made to mainnet-api.inodra.com. Use testnet-api.inodra.com instead.",
  "code": "NETWORK_MISMATCH"
}

Examples

Mainnet JSON-RPC

bash
curl -X POST https://mainnet-api.inodra.com/v1/jsonrpc \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_MAINNET_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"sui_getChainIdentifier","params":[]}'

Testnet JSON-RPC

bash
curl -X POST https://testnet-api.inodra.com/v1/jsonrpc \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_TESTNET_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"sui_getChainIdentifier","params":[]}'

Mainnet gRPC

bash
grpcurl -H "x-api-key: YOUR_MAINNET_API_KEY" \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.LedgerService/GetLatestCheckpoint

Testnet gRPC

bash
grpcurl -H "x-api-key: YOUR_TESTNET_API_KEY" \
  testnet-grpc.inodra.com:443 \
  sui.rpc.v2.LedgerService/GetLatestCheckpoint

Setting Up Projects for Different Networks

  1. Go to Inodra Dashboard
  2. Create a new project
  3. Select the target network (Mainnet or Testnet)
  4. Generate an API key for that project
  5. Use the network-specific endpoint with your API key

Released under the MIT License.