REST API

HTTP endpoints for querying Bitplanet blockchain state.

Overview

The REST API provides HTTP endpoints for querying:

  • Account balances and information

  • Staking validators and delegations

  • Governance proposals and votes

  • Distribution rewards

  • Custom module state (Brahma, Precompile)

Default Endpoint: http://localhost:1317

Bank Module

Get All Balances

Get all token balances for an address.

Endpoint: GET /cosmos/bank/v1beta1/balances/{address}

curl http://localhost:1317/cosmos/bank/v1beta1/balances/cosmos1... | jq

Get Balance by Denomination

Get balance for a specific denomination.

Endpoint: GET /cosmos/bank/v1beta1/balances/{address}/by_denom

Query Parameters:

  • denom: Token denomination (e.g., "bplcoin")

Get Total Supply

Get total supply of all tokens.

Endpoint: GET /cosmos/bank/v1beta1/supply

Get Supply by Denomination

Get supply of a specific denomination.

Endpoint: GET /cosmos/bank/v1beta1/supply/by_denom

Query Parameters:

  • denom: Token denomination

Staking Module

Get All Validators

Get list of all validators.

Endpoint: GET /cosmos/staking/v1beta1/validators

Get Validator by Address

Get validator information by operator address.

Endpoint: GET /cosmos/staking/v1beta1/validators/{validator_addr}

Get Delegations for Delegator

Get all delegations for a delegator address.

Endpoint: GET /cosmos/staking/v1beta1/delegations/{delegator_addr}

Get Delegations to Validator

Get all delegations to a specific validator.

Endpoint: GET /cosmos/staking/v1beta1/validators/{validator_addr}/delegations

Get Staking Pool

Get current staking pool information.

Endpoint: GET /cosmos/staking/v1beta1/pool

Get Staking Parameters

Get staking module parameters.

Endpoint: GET /cosmos/staking/v1beta1/params

Governance Module

Get All Proposals

Get list of all governance proposals.

Endpoint: GET /cosmos/gov/v1/proposals

Get Proposal by ID

Get specific proposal details.

Endpoint: GET /cosmos/gov/v1/proposals/{proposal_id}

Get Votes for Proposal

Get all votes for a proposal.

Endpoint: GET /cosmos/gov/v1/proposals/{proposal_id}/votes

Get Deposits for Proposal

Get all deposits for a proposal.

Endpoint: GET /cosmos/gov/v1/proposals/{proposal_id}/deposits

Get Governance Parameters

Get governance parameters by type.

Endpoint: GET /cosmos/gov/v1/params/{params_type}

Parameter Types:

  • voting: Voting period parameters

  • deposit: Deposit parameters

  • tallying: Vote tallying parameters

Distribution Module

Get Delegator Rewards

Get all rewards for a delegator.

Endpoint: GET /cosmos/distribution/v1beta1/delegators/{delegator_addr}/rewards

Get Rewards from Specific Validator

Get rewards from a specific validator.

Endpoint: GET /cosmos/distribution/v1beta1/delegators/{delegator_addr}/rewards/{validator_addr}

Get Validator Commission

Get commission earned by a validator.

Endpoint: GET /cosmos/distribution/v1beta1/validators/{validator_addr}/commission

Brahma Module

Brahma module endpoints are auto-generated from the gRPC service definitions.

Get Module Parameters

Get Brahma module parameters including siphon percentage and reward splits.

Endpoint: GET /bitplanet/brahma/params

Get AI Tensor by Block Height

Get contribution tensor for an AI at specific block height.

Endpoint: GET /bitplanet/brahma/ai-tensor/{aiId}/{blockHeight}

Get Contribution by Wallet Address

Get specific contributor's contributions.

Endpoint: GET /bitplanet/brahma/contribution/{aiId}/{blockHeight}/{walletAddress}

Get Core Grant Application

Get Core Grant Application status by requester.

Endpoint: GET /bitplanet/brahma/core-grant-application/{requester}

Get Core Token Addresses

Get Core token contract addresses.

Endpoint: GET /bitplanet/brahma/core

Get AI Token Addresses

Get Gem token addresses for an AI.

Endpoint: GET /bitplanet/brahma/ai-tokens/{aiId}

Get Claimable Rewards

Get claimable BPL rewards for an address.

Endpoint: GET /bitplanet/brahma/claimable-rewards/{address}

Get Claim Statistics

Get aggregate statistics about pending claims and Core allocations.

Endpoint: GET /bitplanet/brahma/claim-statistics

Precompile Module

Precompile module endpoints are auto-generated from the gRPC service definitions.

Get Precompile Parameters

Get precompile module parameters including contract addresses.

Endpoint: GET /bitplanet/precompile/params

Transaction Submission

Submit Transaction

Submit a signed transaction.

Endpoint: POST /cosmos/tx/v1beta1/txs

Request Body:

Broadcast Modes:

  • BROADCAST_MODE_SYNC: Return after CheckTx

  • BROADCAST_MODE_ASYNC: Return immediately

  • BROADCAST_MODE_BLOCK: Wait for commit (deprecated)


Related: gRPC API Reference | CLI Reference

Last updated