gRPC API

High-performance RPC interface for querying Bitplanet blockchain state.

Overview

The gRPC API provides efficient, typed RPC calls for:

  • All BitSDK module queries

  • Custom module queries (Brahma, Precompile)

  • Streaming responses for large datasets

Default Endpoint: localhost:9090

Protocol: gRPC (plaintext for local development)

Using grpcurl

grpcurl is a command-line tool for interacting with gRPC services.

List All Services

grpcurl -plaintext localhost:9090 list

List Methods for a Service

grpcurl -plaintext localhost:9090 list cosmos.bank.v1beta1.Query

Bank Module

Query Balance

Get balance for a specific denomination.

Service: cosmos.bank.v1beta1.Query Method: Balance

Query All Balances

Get all balances for an address.

Service: cosmos.bank.v1beta1.Query Method: AllBalances

Staking Module

Query Validators

Get all validators.

Service: cosmos.staking.v1beta1.Query Method: Validators

Query Validator

Get specific validator by operator address.

Service: cosmos.staking.v1beta1.Query Method: Validator

Query Delegations

Get delegations for a delegator.

Service: cosmos.staking.v1beta1.Query Method: DelegatorDelegations

Governance Module

Query Proposals

Get all governance proposals.

Service: cosmos.gov.v1.Query Method: Proposals

Query Proposal

Get specific proposal by ID.

Service: cosmos.gov.v1.Query Method: Proposal

Brahma Module

The Brahma module provides queries for AI attribution and reward distribution.

Service: brahma.Query

Query Params

Get Brahma module parameters including siphon percentage and reward splits.

Method: Params

Query AI Tensor by Block Height

Get contribution tensor for an AI at specific block height.

Method: AITensorByBlockHeight

Query Contribution by Wallet Address

Get specific contributor's contributions.

Method: ContributionByWalletAddress

Query Core Grant Application

Get Core Grant Application status by requester.

Method: QueryCoreGrantApplication

Query Core Token Addresses

Get Core token contract addresses.

Method: QueryCore

Query AI Token Addresses

Get Gem token addresses for an AI.

Method: QueryAITokens

Query Claimable Rewards

Get claimable BPL rewards for an address.

Method: QueryClaimableRewards

Query Claim Statistics

Get aggregate statistics about pending claims and Core allocations.

Method: QueryClaimStatistics

Get All Block Heights by AI ID

Get all block heights where an AI has tensor data.

Method: GetAllBlockHeightsByAIID

Precompile Module

The Precompile module manages EVM precompiled contract addresses.

Service: precompile.Query

Query Params

Get precompile module parameters including contract addresses.

Method: Params

Using gRPC Clients

Go

Python

JavaScript/TypeScript

gRPC-Web

For browser-based applications, use gRPC-Web.

Default Endpoint: localhost:9091

Benefits of gRPC

  • Type Safety: Protocol buffers provide strong typing

  • Performance: Binary protocol is more efficient than JSON

  • Streaming: Support for server and client streaming

  • Code Generation: Auto-generate clients in multiple languages

  • Documentation: Self-describing via reflection


Related: REST API Reference | CLI Reference

Last updated