Querying the Chain

Overview

Pocket Network is a public blockchain, which means all of its data is open for anyone to inspect. Querying the chain is simply reading information from the network — looking up account balances, checking which suppliers are active, reviewing governance settings, or examining session details.

Think of the blockchain as a public bulletin board. Everything posted there — every staked application, every registered supplier, every governance parameter — is visible to anyone who knows where to look. Querying is how you read that bulletin board.

Importantly, queries are read-only. They do not change anything on the network. You are simply asking the network a question and getting an answer back. There are no fees for querying, and you do not need to have an account or stake to look up information.

Why Query the Chain?

Different participants query the chain for different reasons:

  • Token holders might check their account balance or look up the current tokenomics settings to understand how rewards are distributed.
  • Application operators might look up their staking status, see which gateways they are delegated to, or check which suppliers were assigned to their latest session.
  • Suppliers might verify their registration, check their staking amount, review relay mining difficulty for the services they provide, or examine their claims and proofs.
  • Gateway operators might confirm their staking status and review the current minimum stake requirement.
  • Community members and governance participants might review the current parameters for any module to understand the network’s current configuration before proposing changes.
  • Analysts and researchers might browse the full list of services, suppliers, or applications to understand network health and growth.
  • Migration participants might check whether their Morse account is available for claiming on Shannon.

What You Can Look Up

Application Information

You can look up details about any staked application on the network:

  • All applications — Browse the complete list of staked applications.
  • A specific application — Look up a single application by its address to see its stake amount, which gateways it delegates to, which services it uses, and any pending changes.
  • Application parameters — Check the current governance settings for applications, such as the maximum number of gateways and the minimum stake requirement.

Gateway Information

You can look up details about gateways operating on the network:

  • All gateways — Browse the complete list of staked gateways.
  • A specific gateway — Look up a single gateway by its address to see its stake amount and status.
  • Gateway parameters — Check the current minimum stake and other gateway settings.

Supplier Information

Supplier queries are especially rich, with several ways to filter and narrow results:

  • All suppliers — Browse the full list of registered suppliers.
  • Filtered by service — See only the suppliers that serve a particular service (for example, all suppliers serving Ethereum Mainnet).
  • Filtered by owner or operator — Find suppliers associated with a particular address.
  • A specific supplier — Look up a single supplier to see its full details: stake amount, services offered, service configuration history, and revenue sharing setup.
  • Supplier parameters — Check the current minimum stake and staking fee.

Supplier queries also support a compact mode that omits detailed history and revenue share information, which is useful when you just need a quick overview rather than full details.

Service Information

Services are the APIs and blockchains available through Pocket Network. You can explore:

  • All services — Browse every registered service on the network.
  • A specific service — Look up a service by its identifier to see its name, compute units per relay, owner, and full metadata (API specifications).
  • Relay mining difficulty — Check the current difficulty level for any service. Difficulty adjusts automatically based on traffic to keep the network balanced. You can also look up the difficulty at a specific point in time or browse the full history of difficulty changes for a service.
  • Service parameters — Check the fee to register a new service and the target relay volume.

Session Information

Sessions are the time windows during which specific suppliers are matched with applications:

  • A specific session — Look up which suppliers were assigned to serve a particular application for a particular service at a given point in time. This is useful for debugging or auditing relay delivery.
  • Session parameters — Check how many suppliers are assigned per session and other timing settings.

Proof and Claim Information

The proof system is how the network verifies that work was done. You can examine:

  • All claims — Browse claims that suppliers have submitted for their work during sessions. You can filter by session, by block height, or by supplier address.
  • A specific claim — Look up the details of a particular claim.
  • All proofs — Browse the cryptographic proofs that suppliers have submitted. The same filtering options are available as for claims.
  • A specific proof — Look up the details of a particular proof.

Claims and proofs are temporary — they are removed from the chain after they have been fully processed and the dispute window has closed.

Tokenomics Information

  • Tokenomics parameters — Review the complete set of economic settings: inflation rate, mint allocations, the DAO reward address, the burn distribution, and the deflationary mint ratio introduced by PIP-41.

Shared Module Information

  • Shared parameters — Review the cross-module settings that affect session timing, unbonding periods, and compute unit pricing. These are the fundamental coordination parameters of the network.

Migration Information

  • Migration parameters — Check whether gas fees are waived for migration claims and whether claiming is currently enabled.
  • All Morse claimable accounts — Browse the list of Morse accounts that have been imported and are available for claiming.
  • A specific Morse claimable account — Look up a particular Morse address to see its balance, stake, and whether it has already been claimed.

General Blockchain Information

Beyond Pocket-specific data, you can also look up standard blockchain information:

  • Account balances — Check the POKT balance of any address.
  • Transaction details — Look up a specific transaction by its unique hash to see whether it succeeded, what it did, and when it was processed.
  • Block information — Examine the contents of a specific block at a given height.
  • Governance proposals — Review any active or past governance proposals.
  • Authorization grants — See what governance permissions have been granted and to whom.

Browsing Results Page by Page

When you query a list — such as all suppliers or all services — the results may be too numerous to return all at once. The network handles this through pagination, which works just like pages in a book or search results on a website.

You can:

  • Set a page size — Choose how many results to show per page (for example, 50 or 100 at a time).
  • Navigate pages — Move forward and backward through the results.
  • Get a total count — Ask the network how many total items exist so you know how many pages there are.
  • Reverse the order — View results in reverse order if needed.

This makes it practical to browse even very large datasets without overwhelming your connection or waiting for massive responses.

Historical Queries

One powerful feature of blockchain queries is the ability to look back in time. You can query the state of the network at any past block height. This means you can answer questions like:

  • “What was this application’s stake 1,000 blocks ago?”
  • “Which suppliers were active last week?”
  • “What was the relay mining difficulty for Ethereum at block 5,000?”

Historical queries are invaluable for auditing, analysis, and dispute resolution.

Summary of Available Queries

AreaWhat You Can Look Up
ApplicationsParameters, list all, show one by address
GatewaysParameters, list all, show one by address
SuppliersParameters, list all (with filters by service/owner/operator), show one by address
ServicesParameters, list all, show one by ID, relay mining difficulty (current, historical, at a given height)
SessionsParameters, look up a session by application + service + block height
Proofs and ClaimsParameters, list claims (with filters), show one claim, list proofs (with filters), show one proof
TokenomicsParameters (inflation, mint allocation, burn distribution, mint ratio)
SharedParameters (session timing, unbonding periods, compute unit pricing)
MigrationParameters, list claimable Morse accounts, show one claimable account
GeneralAccount balances, transactions, blocks, governance proposals, authorization grants

For the exact technical commands and syntax, see the developer documentation.

This document covers every available query command across all Pocket Network Shannon modules. Each command is shown with its full pocketd CLI syntax, available flags, filtering options, and pagination support.

Common Query Flags

All query commands support the following standard Cosmos SDK flags:

FlagDescription
--networkTarget network (local, beta, main)
--nodeRPC endpoint URL (overrides --network)
--outputOutput format: text (default) or json
--heightQuery state at a specific block height
--homePath to pocketd home directory

Pagination

List queries that return multiple items support pagination via the following flags:

FlagDescription
--pagePage number (1-indexed)
--limitNumber of results per page
--count-totalInclude total count in response
--offsetNumber of results to skip (alternative to --page)
--reverseReverse the order of results
--page-keyKey for cursor-based pagination (from a previous response)

Example using pagination:

bash
pocketd query supplier list-suppliers --page 2 --limit 50 --network=main

Application Module Queries

Query Application Parameters

Displays all governance parameters for the application module.

bash
pocketd query application params --network=main

List All Applications

Returns a paginated list of all staked applications on the network.

bash
pocketd query application list-application --network=main

With pagination:

bash
pocketd query application list-application --limit 50 --page 1 --network=main

Show a Specific Application

Retrieves detailed information about a single staked application by its address.

bash
pocketd query application show-application pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 --network=main

The response includes the application’s staked amount, delegated gateways, service configurations, and pending undelegations.

Gateway Module Queries

Query Gateway Parameters

Displays all governance parameters for the gateway module.

bash
pocketd query gateway params --network=main

List All Gateways

Returns a paginated list of all staked gateways.

bash
pocketd query gateway list-gateway --network=main

With pagination:

bash
pocketd query gateway list-gateway --limit 100 --page 1 --network=main

Show a Specific Gateway

Retrieves detailed information about a single gateway by its address.

bash
pocketd query gateway show-gateway pokt1abc123...xyz --network=main

Supplier Module Queries

Query Supplier Parameters

Displays all governance parameters for the supplier module.

bash
pocketd query supplier params --network=main

List All Suppliers

New in v0.1.31: The --owner-address, --operator-address, and --dehydrated flags were added to support filtering and compact responses.

Returns a paginated list of all suppliers registered on the network. Supports optional filtering by service ID, operator address, or owner address. Multiple filters can be combined (AND logic).

bash
pocketd query supplier list-suppliers --network=main

Aliases: suppliers, ls

Filtering by Service ID

Return only suppliers that serve a specific service:

bash
pocketd query supplier list-suppliers --service-id anvil --network=main

The --service-id flag (shorthand: -s) accepts a service ID string.

Filtering by Operator Address

Return only suppliers operated by a specific address:

bash
pocketd query supplier list-suppliers --operator-address pokt1operator...xyz --network=main

Filtering by Owner Address

Return only suppliers owned by a specific address:

bash
pocketd query supplier list-suppliers --owner-address pokt1owner...xyz --network=main

Combining Filters

Filters can be combined. For example, suppliers serving “anvil” owned by a specific address:

bash
pocketd query supplier list-suppliers \
  --service-id anvil \
  --owner-address pokt1owner...xyz \
  --network=main

Dehydrated Output

Use the --dehydrated flag (shorthand: -d) to exclude service_config_history and rev_share details for a smaller response payload:

bash
pocketd query supplier list-suppliers --dehydrated --network=main

Combining filters with dehydrated output and pagination:

bash
pocketd query supplier list-suppliers \
  --service-id anvil \
  --dehydrated \
  --page 1 \
  --limit 100 \
  --network=main

Show a Specific Supplier

Retrieves comprehensive information about a supplier identified by their operator address.

bash
pocketd query supplier show-supplier pokt1operator...xyz --network=main

Aliases: supplier, s

Returned details include:

  • Supplier staked amount and status
  • List of services provided
  • Service configuration history
  • Revenue share configuration

With JSON output:

bash
pocketd query supplier show-supplier pokt1operator...xyz --output json --network=main

At a specific block height:

bash
pocketd query supplier show-supplier pokt1operator...xyz --height 100 --network=main

With dehydrated output (compact, excluding history and rev share):

bash
pocketd query supplier show-supplier pokt1operator...xyz --dehydrated --network=main

Service Module Queries

Query Service Parameters

Displays all governance parameters for the service module.

bash
pocketd query service params --network=main

List All Services

Returns a paginated list of all services registered on the network. By default, service metadata (API specifications) is excluded to reduce payload size.

bash
pocketd query service all-services --network=main

With pagination:

bash
pocketd query service all-services --limit 50 --page 2 --network=main

To include full metadata (up to 256 KiB per service):

bash
pocketd query service all-services --dehydrated=false --network=main

Show a Specific Service

Retrieves full details for a service by its unique on-chain ID. By default, metadata is included in the response.

bash
pocketd query service show-service anvil --network=main

Returned details include:

  • Service ID and name
  • Compute units per relay
  • Owner address
  • Full metadata (API specifications)

With JSON output:

bash
pocketd query service show-service anvil --output json --network=main

With dehydrated output (no metadata):

bash
pocketd query service show-service anvil --dehydrated --network=main

Relay Mining Difficulty — All Services

Lists the current relay mining difficulty for every service on the network.

bash
pocketd query service relay-mining-difficulty-all --network=main

Relay Mining Difficulty — Single Service

Shows the current relay mining difficulty for a specific service.

bash
pocketd query service relay-mining-difficulty anvil --network=main

Relay Mining Difficulty at a Specific Height

New in v0.1.31: Historical relay mining difficulty queries are now supported via the on-chain difficulty history store.

Shows the relay mining difficulty that was effective for a specific service at a given block height. This is useful for historical analysis and verifying the difficulty used during past sessions.

bash
pocketd query service relay-mining-difficulty-at-height anvil 1000 --network=main

Arguments:

  1. service-id — The service to query
  2. block-height — The block height to look up

Relay Mining Difficulty History

Lists all historical relay mining difficulty changes for a specific service. Each entry shows when a difficulty became effective and its parameters.

bash
pocketd query service relay-mining-difficulty-history anvil --network=main

Supports pagination:

bash
pocketd query service relay-mining-difficulty-history anvil --limit 50 --page 1 --network=main

Session Module Queries

Query Session Parameters

Displays all governance parameters for the session module.

bash
pocketd query session params --network=main

Get a Session

Queries session data for a specific (application, service, block height) tuple. This is a read-only query that does not modify chain state.

bash
pocketd query session get-session <application_address> <service_id> [block_height] --network=main

Arguments:

  1. application_address — The staked application’s bech32 address
  2. service_id — The service ID for the session
  3. block_height (optional) — The block height for the session. If omitted, defaults to the latest height.

Examples:

bash
# Get the current session for an app and service
pocketd query session get-session pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 anvil --network=main

# Get the session at a specific block height
pocketd query session get-session pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 anvil 42 --network=main

The response includes:

  • Session header (application address, service, session start/end heights, session ID)
  • List of suppliers assigned to the session
  • Session number

Proof Module Queries

Query Proof Parameters

Displays all governance parameters for the proof module.

bash
pocketd query proof params --network=main

List All Claims

Returns a paginated list of all claims in the node’s state. Claims can be filtered by exactly one of the following flags (only one filter at a time):

FlagDescription
--session-idFilter by session ID
--session-end-heightFilter by session end block height
--supplier-operator-addressFilter by supplier operator address
bash
# List all claims
pocketd query proof list-claims --network=main

# Filter by session ID
pocketd query proof list-claims --session-id abc123...def --network=main

# Filter by session end height
pocketd query proof list-claims --session-end-height 1000 --network=main

# Filter by supplier operator address
pocketd query proof list-claims --supplier-operator-address pokt1supplier...xyz --network=main

With pagination:

bash
pocketd query proof list-claims --limit 100 --page 1 --network=main

Show a Specific Claim

Retrieves a specific claim identified by its session ID and supplier operator address. Claims are pruned from state after their proof has been submitted and the dispute window has closed.

bash
pocketd query proof show-claim <session_id> <supplier_operator_address> --network=main

Example:

bash
pocketd query proof show-claim abc123...def pokt1supplier...xyz --network=main

List All Proofs

Returns a paginated list of all proofs in the node’s state. Supports the same filter flags as claims (only one at a time):

FlagDescription
--session-idFilter by session ID
--session-end-heightFilter by session end block height
--supplier-operator-addressFilter by supplier operator address
bash
# List all proofs
pocketd query proof list-proofs --network=main

# Filter by session ID
pocketd query proof list-proofs --session-id abc123...def --network=main

# Filter by session end height
pocketd query proof list-proofs --session-end-height 1000 --network=main

# Filter by supplier operator address
pocketd query proof list-proofs --supplier-operator-address pokt1supplier...xyz --network=main

With pagination:

bash
pocketd query proof list-proofs --limit 100 --page 1 --network=main

Show a Specific Proof

Retrieves a specific proof identified by its session ID and supplier operator address.

bash
pocketd query proof show-proof <session_id> <supplier_operator_address> --network=main

Example:

bash
pocketd query proof show-proof abc123...def pokt1supplier...xyz --network=main

Tokenomics Module Queries

Query Tokenomics Parameters

Displays all governance parameters for the tokenomics module, including mint allocations, inflation rates, and the deflationary mint ratio.

bash
pocketd query tokenomics params --network=main

New in v0.1.31: The mint_ratio parameter (PIP-41) is now included in the tokenomics params response.

Shared Module Queries

Query Shared Parameters

Displays all governance parameters for the shared module, including session timing, unbonding periods, and compute unit pricing.

bash
pocketd query shared params --network=main

Migration Module Queries

Query Migration Parameters

Displays the migration module parameters that control the Morse-to-Shannon migration process.

bash
pocketd query migration params --network=main

List Morse Claimable Accounts

Returns a paginated list of all Morse claimable accounts that have been imported on-chain and are available for claiming.

bash
pocketd query migration list-morse-claimable-account --network=main

With pagination:

bash
pocketd query migration list-morse-claimable-account --limit 100 --page 1 --network=main

Show a Specific Morse Claimable Account

Retrieves details for a specific Morse claimable account by its Morse address.

bash
pocketd query migration show-morse-claimable-account <morse_address_hex> --network=main

Example:

bash
pocketd query migration show-morse-claimable-account A1B2C3D4E5F6... --network=main

Standard Cosmos SDK Queries

In addition to the Pocket-specific module queries above, pocketd supports all standard Cosmos SDK query commands. Below are some commonly used ones.

Account Balance

bash
pocketd query bank balances pokt1youraddress... --network=main

Transaction by Hash

bash
pocketd query tx --type=hash <TRANSACTION_HASH> --network=main

Block at Height

bash
pocketd query block --type=height 1000 --network=main

Authorization Grants

bash
# Grants issued by a specific granter
pocketd query authz grants-by-granter pokt10d07y265gmmuvt4z0w9aw880jnsr700j8yv32t --network=main

# Grants received by a specific grantee
pocketd query authz grants-by-grantee pokt1hv3xrylxvwd7hfv03j50ql0ttp3s5hqqelegmv --network=main

Consensus Parameters

bash
pocketd query consensus params --network=main

Staking Parameters

bash
pocketd query staking params --network=main

Governance Proposals

bash
pocketd query gov proposals --network=main

Query Command Summary Table

The following table provides a complete reference of all Pocket-specific query commands:

ModuleCommandDescription
applicationparamsShow application module parameters
applicationlist-applicationList all staked applications
applicationshow-application <address>Show a specific application
gatewayparamsShow gateway module parameters
gatewaylist-gatewayList all staked gateways
gatewayshow-gateway <address>Show a specific gateway
supplierparamsShow supplier module parameters
supplierlist-suppliersList all suppliers (filterable)
suppliershow-supplier <operator_address>Show a specific supplier
serviceparamsShow service module parameters
serviceall-servicesList all registered services
serviceshow-service <service_id>Show a specific service
servicerelay-mining-difficulty-allList relay mining difficulty for all services
servicerelay-mining-difficulty <service_id>Show relay mining difficulty for one service
servicerelay-mining-difficulty-at-height <service_id> <height>Difficulty at a specific block height
servicerelay-mining-difficulty-history <service_id>Historical difficulty changes for a service
sessionparamsShow session module parameters
sessionget-session <app_addr> <svc_id> [height]Get session for an app/service/height tuple
proofparamsShow proof module parameters
prooflist-claimsList all claims (filterable)
proofshow-claim <session_id> <supplier_addr>Show a specific claim
prooflist-proofsList all proofs (filterable)
proofshow-proof <session_id> <supplier_addr>Show a specific proof
tokenomicsparamsShow tokenomics module parameters
sharedparamsShow shared module parameters
migrationparamsShow migration module parameters
migrationlist-morse-claimable-accountList Morse claimable accounts
migrationshow-morse-claimable-account <address>Show a Morse claimable account

Tips for Effective Querying

JSON Output for Scripting

Use --output json to get machine-parseable output suitable for piping to jq or other tools:

bash
pocketd query supplier list-suppliers --output json --network=main | jq '.supplier[] | .operator_address'

Querying Historical State

Use the --height flag to query chain state at a past block height:

bash
pocketd query application show-application pokt1app...xyz --height 5000 --network=main

Using a Custom RPC Endpoint

Override the default network RPC with --node:

bash
pocketd query shared params --node https://custom-rpc.example.com:443

Counting Total Results

When paginating through large result sets, use --count-total on the first page to learn how many items exist:

bash
pocketd query supplier list-suppliers --limit 10 --page 1 --count-total --network=main