swagger: '2.0'
info:
title: Cosmos SDK - gRPC Gateway docs Query Service API
description: A REST interface for state queries.
version: 1.0.0
tags:
- name: Service
paths:
/cosmos/base/node/v1beta1/config:
get:
summary: Config queries for the operator configuration.
operationId: Config
responses:
'200':
description: A successful response.
schema:
type: object
properties:
minimumGasPrice:
type: string
pruningKeepRecent:
type: string
pruningInterval:
type: string
haltHeight:
type: string
format: uint64
description: ConfigResponse defines the response structure for the Config gRPC query.
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
tags:
- Service
/cosmos/base/node/v1beta1/status:
get:
summary: Status queries for the node status.
operationId: Status
responses:
'200':
description: A successful response.
schema:
type: object
properties:
earliestStoreHeight:
type: string
format: uint64
title: earliest block height available in the store
height:
type: string
format: uint64
title: current block height
timestamp:
type: string
format: date-time
title: block height timestamp
appHash:
type: string
format: byte
title: app hash of the current block
validatorHash:
type: string
format: byte
title: validator hash provided by the consensus header
description: StateResponse defines the response structure for the status of a node.
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
tags:
- Service
/cosmos/base/tendermint/v1beta1/abci_query:
get:
summary: 'ABCIQuery defines a query handler that supports ABCI queries directly to the
application, bypassing Tendermint completely. The ABCI query must contain
a valid and supported path, including app, custom, p2p, and store.'
operationId: ABCIQuery
responses:
'200':
description: A successful response.
schema:
type: object
properties:
code:
type: integer
format: int64
log:
type: string
title: nondeterministic
info:
type: string
title: nondeterministic
index:
type: string
format: int64
key:
type: string
format: byte
value:
type: string
format: byte
proofOps:
type: object
properties:
ops:
type: array
items:
type: object
properties:
type:
type: string
key:
type: string
format: byte
data:
type: string
format: byte
description: 'ProofOp defines an operation used for calculating Merkle root. The data could
be arbitrary format, providing necessary data for example neighbouring node
hash.
Note: This type is a duplicate of the ProofOp proto type defined in Tendermint.'
description: 'ProofOps is Merkle proof defined by the list of ProofOps.
Note: This type is a duplicate of the ProofOps proto type defined in Tendermint.'
height:
type: string
format: int64
codespace:
type: string
description: 'ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query.
Note: This type is a duplicate of the ResponseQuery proto type defined in
Tendermint.'
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
description: "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
additionalProperties: {}
description: "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": <string>,\n \"lastName\": <string>\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
parameters:
- name: data
in: query
required: false
type: string
format: byte
- name: path
in: query
required: false
type: string
- name: height
in: query
required: false
type: string
format: int64
- name: prove
in: query
required: false
type: boolean
tags:
- Service
/cosmos/base/tendermint/v1beta1/block_results/latest:
get:
summary: 'GetLatestBlockResults returns the block results for the latest block.
Block results contain finalize_block_events which include consensus-level
events like slashing, jailing, and validator set updates.'
operationId: GetLatestBlockResults
responses:
'200':
description: A successful response.
schema:
type: object
properties:
height:
type: string
format: int64
description: height is the block height.
txsResults:
type: array
items:
type: object
properties:
code:
type: integer
format: int64
data:
type: string
format: byte
log:
type: string
title: nondeterministic
info:
type: string
title: nondeterministic
gas_wanted:
type: string
format: int64
gas_used:
type: string
format: int64
events:
type: array
items:
type: object
properties:
type:
type: string
attributes:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
index:
type: boolean
title: nondeterministic
description: EventAttribute is a single key-value pair, associated with an event.
description: 'Event allows application developers to attach additional information to
ResponseFinalizeBlock and ResponseCheckTx.
Later, transactions may be queried using these events.'
title: nondeterministic
codespace:
type: string
description: 'ExecTxResult contains results of executing one individual transaction.
* Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted'
description: txs_results contains the results of each transaction execution.
finalizeBlockEvents:
type: array
items:
type: object
properties:
type:
type: string
attributes:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
index:
type: boolean
title: nondeterministic
description: EventAttribute is a single key-value pair, associated with an event.
description: 'Event allows application developers to attach additional information to
ResponseFinalizeBlock and ResponseCheckTx.
Later, transactions may be queried using these events.'
description: 'finalize_block_events contains consensus-level events emitted during block
finalization, including slashing, jailing, and validator set updates.'
validatorUpdates:
type: array
items:
type: object
properties:
pubKey:
type: object
properties:
ed25519:
type: string
format: byte
secp256k1:
type: string
format: byte
title: PublicKey defines the keys available for use with Validators
power:
type: string
format: int64
description: validator_updates contains the validator updates for this block.
consensusParamUpdates:
description: consensus_param_updates contains any consensus parameter updates for this block.
type: object
properties:
block:
type: object
properties:
maxBytes:
type: string
format: int64
title: 'Max block size, in bytes.
Note: must be greater than 0'
maxGas:
type: string
format: int64
title: 'Max gas per block.
Note: must be greater or equal to -1'
description: BlockParams contains limits on the block size.
evidence:
type: object
properties:
maxAgeNumBlocks:
type: string
format: int64
description: 'Max age of evidence, in blocks.
The basic formula for calculating this is: MaxAgeDuration / {average block
time}.'
maxAgeDuration:
type: string
description: 'Max age of evidence, in time.
It should correspond with an app''s "unbonding period" or other similar
mechanism for handling [Nothing-At-Stake
attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).'
maxBytes:
type: string
format: int64
title: 'This sets the maximum size of total evidence in bytes that can be committed in a single block.
and should fall comfortably under the max block bytes.
Default is 1048576 or 1MB'
description: EvidenceParams determine how we handle evidence of malfeasance.
validator:
type: object
properties:
pubKeyTypes:
type: array
items:
type: string
description: 'ValidatorParams restrict the public key types validators can use.
NOTE: uses ABCI pubkey naming, not Amino names.'
version:
type: object
properties:
app:
type: string
format: uint64
description: VersionParams contains the ABCI application version.
abci:
type: object
properties:
voteExtensionsEnableHeight:
type: string
format: int64
description: 'vote_extensions_enable_height configures the first height during which
vote extensions will be enabled. During this specified height, and for all
subsequent heights, precommit messages that do not contain valid extension data
will be considered invalid. Prior to this height, vote extensions will not
be used or accepted by validators on the network.
Once enabled, vote extensions will be created by the application in ExtendVote,
passed to the application for validation in VerifyVoteExtension and given
to the application to use when proposing a block during PrepareProposal.'
description: ABCIParams configure functionality specific to the Application Blockchain Interface.
authority:
type: object
properties:
authority:
type: string
appHash:
type: string
format: byte
description: app_hash is the app hash after processing this block.
description: GetLatestBlockResultsResponse is the response type for the Query/GetLatestBlockResults RPC method.
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
description: "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
additionalProperties: {}
description: "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": <string>,\n \"lastName\": <string>\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
tags:
- Service
/cosmos/base/tendermint/v1beta1/block_results/{height}:
get:
summary: GetBlockResults queries block results for given height.
operationId: GetBlockResults
responses:
'200':
description: A successful response.
schema:
type: object
properties:
height:
type: string
format: int64
description: height is the block height.
txsResults:
type: array
items:
type: object
properties:
code:
type: integer
format: int64
data:
type: string
format: byte
log:
type: string
title: nondeterministic
info:
type: string
title: nondeterministic
gas_wanted:
type: string
format: int64
gas_used:
type: string
format: int64
events:
type: array
items:
type: object
properties:
type:
type: string
attributes:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
index:
type: boolean
title: nondeterministic
description: EventAttribute is a single key-value pair, associated with an event.
description: 'Event allows application developers to attach additional information to
ResponseFinalizeBlock and ResponseCheckTx.
Later, transactions may be queried using these events.'
title: nondeterministic
codespace:
type: string
description: 'ExecTxResult contains results of executing one individual transaction.
* Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted'
description: txs_results contains the results of each transaction execution.
finalizeBlockEvents:
type: array
items:
type: object
properties:
type:
type: string
attributes:
type: array
items:
type: object
properties:
key:
type: string
value:
type: string
index:
type: boolean
title: nondeterministic
description: EventAttribute is a single key-value pair, associated with an event.
description: 'Event allows application developers to attach additional information to
ResponseFinalizeBlock and ResponseCheckTx.
Later, transactions may be queried using these events.'
description: 'finalize_block_events contains consensus-level events emitted during block
finalization, including slashing, jailing, and validator set updates.'
validatorUpdates:
type: array
items:
type: object
properties:
pubKey:
type: object
properties:
ed25519:
type: string
format: byte
secp256k1:
type: string
format: byte
title: PublicKey defines the keys available for use with Validators
power:
type: string
format: int64
description: validator_updates contains the validator updates for this block.
consensusParamUpdates:
description: consensus_param_updates contains any consensus parameter updates for this block.
type: object
properties:
block:
type: object
properties:
maxBytes:
type: string
format: int64
title: 'Max block size, in bytes.
Note: must be greater than 0'
maxGas:
type: string
format: int64
title: 'Max gas per block.
Note: must be greater or equal to -1'
description: BlockParams contains limits on the block size.
evidence:
type: object
properties:
maxAgeNumBlocks:
type: string
format: int64
description: 'Max age of evidence, in blocks.
The basic formula for calculating this is: MaxAgeDuration / {average block
time}.'
maxAgeDuration:
type: string
description: 'Max age of evidence, in time.
It should correspond with an app''s "unbonding period" or other similar
mechanism for handling [Nothing-At-Stake
attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).'
maxBytes:
type: string
format: int64
title: 'This sets the maximum size of total evidence in bytes that can be committed in a single block.
and should fall comfortably under the max block bytes.
Default is 1048576 or 1MB'
description: EvidenceParams determine how we handle evidence of malfeasance.
validator:
type: object
properties:
pubKeyTypes:
type: array
items:
type: string
description: 'ValidatorParams restrict the public key types validators can use.
NOTE: uses ABCI pubkey naming, not Amino names.'
version:
type: object
properties:
app:
type: string
format: uint64
description: VersionParams contains the ABCI application version.
abci:
type: object
properties:
voteExtensionsEnableHeight:
type: string
format: int64
description: 'vote_extensions_enable_height configures the first height during which
vote extensions will be enabled. During this specified height, and for all
subsequent heights, precommit messages that do not contain valid extension data
will be considered invalid. Prior to this height, vote extensions will not
be used or accepted by validators on the network.
Once enabled, vote extensions will be created by the application in ExtendVote,
passed to the application for validation in VerifyVoteExtension and given
to the application to use when proposing a block during PrepareProposal.'
description: ABCIParams configure functionality specific to the Application Blockchain Interface.
authority:
type: object
properties:
authority:
type: string
appHash:
type: string
format: byte
# --- truncated at 32 KB (328 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cosmos/refs/heads/main/openapi/cosmos-service-api-openapi.yml