cosmos/base

Table of Contents

cosmos/base/v1beta1/coin.proto

Top

Coin

Coin defines a token with a denomination and an amount.

NOTE: The amount field is an Int which implements the custom method

signatures required by gogoproto.

FieldTypeLabelDescription
denom string

amount string

DecCoin

DecCoin defines a token with a denomination and a decimal amount.

NOTE: The amount field is an Dec which implements the custom method

signatures required by gogoproto.

FieldTypeLabelDescription
denom string

amount string

DecProto

DecProto defines a Protobuf wrapper around a Dec object.

FieldTypeLabelDescription
dec string

IntProto

IntProto defines a Protobuf wrapper around an Int object.

FieldTypeLabelDescription
int string

cosmos/base/query/v1beta1/pagination.proto

Top

PageRequest

PageRequest is to be embedded in gRPC request messages for efficient

pagination. Ex:

message SomeRequest {

Foo some_parameter = 1;

PageRequest pagination = 2;

}

FieldTypeLabelDescription
key bytes

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

offset uint64

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

limit uint64

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

count_total bool

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

reverse bool

reverse is set to true if results are to be returned in the descending order. Since: cosmos-sdk 0.43

PageResponse

PageResponse is to be embedded in gRPC response messages where the

corresponding request message has used PageRequest.

message SomeResponse {

repeated Bar results = 1;

PageResponse page = 2;

}

FieldTypeLabelDescription
next_key bytes

next_key is the key to be passed to PageRequest.key to query the next page most efficiently

total uint64

total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise

cosmos/base/store/v1beta1/listening.proto

Top

StoreKVPair

StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)

It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and

Deletes

Since: cosmos-sdk 0.43

FieldTypeLabelDescription
store_key string

the store key for the KVStore this pair originates from

delete bool

true indicates a delete operation, false indicates a set operation

key bytes

value bytes

cosmos/base/store/v1beta1/commit_info.proto

Top

CommitID

CommitID defines the committment information when a specific store is

committed.

FieldTypeLabelDescription
version int64

hash bytes

CommitInfo

CommitInfo defines commit information used by the multi-store when committing

a version/height.

FieldTypeLabelDescription
version int64

store_infos StoreInfo repeated

StoreInfo

StoreInfo defines store-specific commit information. It contains a reference

between a store name and the commit ID.

FieldTypeLabelDescription
name string

commit_id CommitID

cosmos/base/store/v1beta1/snapshot.proto

Top

SnapshotIAVLItem

SnapshotIAVLItem is an exported IAVL node.

FieldTypeLabelDescription
key bytes

value bytes

version int64

height int32

SnapshotItem

SnapshotItem is an item contained in a rootmulti.Store snapshot.

FieldTypeLabelDescription
store SnapshotStoreItem

iavl SnapshotIAVLItem

SnapshotStoreItem

SnapshotStoreItem contains metadata about a snapshotted store.

FieldTypeLabelDescription
name string

cosmos/base/reflection/v1beta1/reflection.proto

Top

ListAllInterfacesRequest

ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC.

ListAllInterfacesResponse

ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC.

FieldTypeLabelDescription
interface_names string repeated

interface_names is an array of all the registered interfaces.

ListImplementationsRequest

ListImplementationsRequest is the request type of the ListImplementations

RPC.

FieldTypeLabelDescription
interface_name string

interface_name defines the interface to query the implementations for.

ListImplementationsResponse

ListImplementationsResponse is the response type of the ListImplementations

RPC.

FieldTypeLabelDescription
implementation_message_names string repeated

ReflectionService

ReflectionService defines a service for interface reflection.

Method NameRequest TypeResponse TypeDescription
ListAllInterfaces ListAllInterfacesRequest ListAllInterfacesResponse

ListAllInterfaces lists all the interfaces registered in the interface registry.

ListImplementations ListImplementationsRequest ListImplementationsResponse

ListImplementations list all the concrete types that implement a given interface.

Methods with HTTP bindings

Method Name Method Pattern Body
ListAllInterfaces GET /cosmos/base/reflection/v1beta1/interfaces
ListImplementations GET /cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations

cosmos/base/reflection/v2alpha1/reflection.proto

Top

Since: cosmos-sdk 0.43

AppDescriptor

AppDescriptor describes a cosmos-sdk based application

FieldTypeLabelDescription
authn AuthnDescriptor

AuthnDescriptor provides information on how to authenticate transactions on the application NOTE: experimental and subject to change in future releases.

chain ChainDescriptor

chain provides the chain descriptor

codec CodecDescriptor

codec provides metadata information regarding codec related types

configuration ConfigurationDescriptor

configuration provides metadata information regarding the sdk.Config type

query_services QueryServicesDescriptor

query_services provides metadata information regarding the available queriable endpoints

tx TxDescriptor

tx provides metadata information regarding how to send transactions to the given application

AuthnDescriptor

AuthnDescriptor provides information on how to sign transactions without relying

on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures

FieldTypeLabelDescription
sign_modes SigningModeDescriptor repeated

sign_modes defines the supported signature algorithm

ChainDescriptor

ChainDescriptor describes chain information of the application

FieldTypeLabelDescription
id string

id is the chain id

CodecDescriptor

CodecDescriptor describes the registered interfaces and provides metadata information on the types

FieldTypeLabelDescription
interfaces InterfaceDescriptor repeated

interfaces is a list of the registerted interfaces descriptors

ConfigurationDescriptor

ConfigurationDescriptor contains metadata information on the sdk.Config

FieldTypeLabelDescription
bech32_account_address_prefix string

bech32_account_address_prefix is the account address prefix

GetAuthnDescriptorRequest

GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC

GetAuthnDescriptorResponse

GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC

FieldTypeLabelDescription
authn AuthnDescriptor

authn describes how to authenticate to the application when sending transactions

GetChainDescriptorRequest

GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC

GetChainDescriptorResponse

GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC

FieldTypeLabelDescription
chain ChainDescriptor

chain describes application chain information

GetCodecDescriptorRequest

GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC

GetCodecDescriptorResponse

GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC

FieldTypeLabelDescription
codec CodecDescriptor

codec describes the application codec such as registered interfaces and implementations

GetConfigurationDescriptorRequest

GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC

GetConfigurationDescriptorResponse

GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC

FieldTypeLabelDescription
config ConfigurationDescriptor

config describes the application's sdk.Config

GetQueryServicesDescriptorRequest

GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC

GetQueryServicesDescriptorResponse

GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC

FieldTypeLabelDescription
queries QueryServicesDescriptor

queries provides information on the available queryable services

GetTxDescriptorRequest

GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC

GetTxDescriptorResponse

GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC

FieldTypeLabelDescription
tx TxDescriptor

tx provides information on msgs that can be forwarded to the application alongside the accepted transaction protobuf type

InterfaceAcceptingMessageDescriptor

InterfaceAcceptingMessageDescriptor describes a protobuf message which contains

an interface represented as a google.protobuf.Any

FieldTypeLabelDescription
fullname string

fullname is the protobuf fullname of the type containing the interface

field_descriptor_names string repeated

field_descriptor_names is a list of the protobuf name (not fullname) of the field which contains the interface as google.protobuf.Any (the interface is the same, but it can be in multiple fields of the same proto message)

InterfaceDescriptor

InterfaceDescriptor describes the implementation of an interface

FieldTypeLabelDescription
fullname string

fullname is the name of the interface

interface_accepting_messages InterfaceAcceptingMessageDescriptor repeated

interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field

interface_implementers InterfaceImplementerDescriptor repeated

interface_implementers is a list of the descriptors of the interface implementers

InterfaceImplementerDescriptor

InterfaceImplementerDescriptor describes an interface implementer

FieldTypeLabelDescription
fullname string

fullname is the protobuf queryable name of the interface implementer

type_url string

type_url defines the type URL used when marshalling the type as any this is required so we can provide type safe google.protobuf.Any marshalling and unmarshalling, making sure that we don't accept just 'any' type in our interface fields

MsgDescriptor

MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction

FieldTypeLabelDescription
msg_type_url string

msg_type_url contains the TypeURL of a sdk.Msg.

QueryMethodDescriptor

QueryMethodDescriptor describes a queryable method of a query service

no other info is provided beside method name and tendermint queryable path

because it would be redundant with the grpc reflection service

FieldTypeLabelDescription
name string

name is the protobuf name (not fullname) of the method

full_query_path string

full_query_path is the path that can be used to query this method via tendermint abci.Query

QueryServiceDescriptor

QueryServiceDescriptor describes a cosmos-sdk queryable service

FieldTypeLabelDescription
fullname string

fullname is the protobuf fullname of the service descriptor

is_module bool

is_module describes if this service is actually exposed by an application's module

methods QueryMethodDescriptor repeated

methods provides a list of query service methods

QueryServicesDescriptor

QueryServicesDescriptor contains the list of cosmos-sdk queriable services

FieldTypeLabelDescription
query_services QueryServiceDescriptor repeated

query_services is a list of cosmos-sdk QueryServiceDescriptor

SigningModeDescriptor

SigningModeDescriptor provides information on a signing flow of the application

NOTE(fdymylja): here we could go as far as providing an entire flow on how

to sign a message given a SigningModeDescriptor, but it's better to think about

this another time

FieldTypeLabelDescription
name string

name defines the unique name of the signing mode

number int32

number is the unique int32 identifier for the sign_mode enum

authn_info_provider_method_fullname string

authn_info_provider_method_fullname defines the fullname of the method to call to get the metadata required to authenticate using the provided sign_modes

TxDescriptor

TxDescriptor describes the accepted transaction type

FieldTypeLabelDescription
fullname string

fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) it is not meant to support polymorphism of transaction types, it is supposed to be used by reflection clients to understand if they can handle a specific transaction type in an application.

msgs MsgDescriptor repeated

msgs lists the accepted application messages (sdk.Msg)

ReflectionService

ReflectionService defines a service for application reflection.

Method NameRequest TypeResponse TypeDescription
GetAuthnDescriptor GetAuthnDescriptorRequest GetAuthnDescriptorResponse

GetAuthnDescriptor returns information on how to authenticate transactions in the application NOTE: this RPC is still experimental and might be subject to breaking changes or removal in future releases of the cosmos-sdk.

GetChainDescriptor GetChainDescriptorRequest GetChainDescriptorResponse

GetChainDescriptor returns the description of the chain

GetCodecDescriptor GetCodecDescriptorRequest GetCodecDescriptorResponse

GetCodecDescriptor returns the descriptor of the codec of the application

GetConfigurationDescriptor GetConfigurationDescriptorRequest GetConfigurationDescriptorResponse

GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application

GetQueryServicesDescriptor GetQueryServicesDescriptorRequest GetQueryServicesDescriptorResponse

GetQueryServicesDescriptor returns the available gRPC queryable services of the application

GetTxDescriptor GetTxDescriptorRequest GetTxDescriptorResponse

GetTxDescriptor returns information on the used transaction object and available msgs that can be used

Methods with HTTP bindings

Method Name Method Pattern Body
GetAuthnDescriptor GET /cosmos/base/reflection/v1beta1/app_descriptor/authn
GetChainDescriptor GET /cosmos/base/reflection/v1beta1/app_descriptor/chain
GetCodecDescriptor GET /cosmos/base/reflection/v1beta1/app_descriptor/codec
GetConfigurationDescriptor GET /cosmos/base/reflection/v1beta1/app_descriptor/configuration
GetQueryServicesDescriptor GET /cosmos/base/reflection/v1beta1/app_descriptor/query_services
GetTxDescriptor GET /cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor

cosmos/base/abci/v1beta1/abci.proto

Top

ABCIMessageLog

ABCIMessageLog defines a structure containing an indexed tx ABCI message log.

FieldTypeLabelDescription
msg_index uint32

log string

events StringEvent repeated

Events contains a slice of Event objects that were emitted during some execution.

Attribute

Attribute defines an attribute wrapper where the key and value are

strings instead of raw bytes.

FieldTypeLabelDescription
key string

value string

GasInfo

GasInfo defines tx execution gas context.

FieldTypeLabelDescription
gas_wanted uint64

GasWanted is the maximum units of work we allow this tx to perform.

gas_used uint64

GasUsed is the amount of gas actually consumed.

MsgData

MsgData defines the data returned in a Result object during message

execution.

FieldTypeLabelDescription
msg_type string

data bytes

Result

Result is the union of ResponseFormat and ResponseCheckTx.

FieldTypeLabelDescription
data bytes

Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions.

log string

Log contains the log information from message or handler execution.

events tendermint.abci.Event repeated

Events contains a slice of Event objects that were emitted during message or handler execution.

SearchTxsResult

SearchTxsResult defines a structure for querying txs pageable

FieldTypeLabelDescription
total_count uint64

Count of all txs

count uint64

Count of txs in current page

page_number uint64

Index of current page, start from 1

page_total uint64

Count of total pages

limit uint64

Max count txs per page

txs TxResponse repeated

List of txs in current page

SimulationResponse

SimulationResponse defines the response generated when a transaction is

successfully simulated.

FieldTypeLabelDescription
gas_info GasInfo

result Result

StringEvent

StringEvent defines en Event object wrapper where all the attributes

contain key/value pairs that are strings instead of raw bytes.

FieldTypeLabelDescription
type string

attributes Attribute repeated

TxMsgData

TxMsgData defines a list of MsgData. A transaction will have a MsgData object

for each message.

FieldTypeLabelDescription
data MsgData repeated

TxResponse

TxResponse defines a structure containing relevant tx data and metadata. The

tags are stringified and the log is JSON decoded.

FieldTypeLabelDescription
height int64

The block height

txhash string

The transaction hash.

codespace string

Namespace for the Code

code uint32

Response code.

data string

Result bytes, if any.

raw_log string

The output of the application's logger (raw string). May be non-deterministic.

logs ABCIMessageLog repeated

The output of the application's logger (typed). May be non-deterministic.

info string

Additional information. May be non-deterministic.

gas_wanted int64

Amount of gas requested for transaction.

gas_used int64

Amount of gas consumed by transaction.

tx google.protobuf.Any

The request transaction bytes.

timestamp string

Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.

events tendermint.abci.Event repeated

Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante handler. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. Since: cosmos-sdk 0.42.11, 0.44.5, 0.45

cosmos/base/kv/v1beta1/kv.proto

Top

Pair

Pair defines a key/value bytes tuple.

FieldTypeLabelDescription
key bytes

value bytes

Pairs

Pairs defines a repeated slice of Pair objects.

FieldTypeLabelDescription
pairs Pair repeated

cosmos/base/snapshots/v1beta1/snapshot.proto

Top

Metadata

Metadata contains SDK-specific snapshot metadata.

FieldTypeLabelDescription
chunk_hashes bytes repeated

SHA-256 chunk hashes

Snapshot

Snapshot contains Tendermint state sync snapshot info.

FieldTypeLabelDescription
height uint64

format uint32

chunks uint32

hash bytes

metadata Metadata

SnapshotExtensionMeta

SnapshotExtensionMeta contains metadata about an external snapshotter.

FieldTypeLabelDescription
name string

format uint32

SnapshotExtensionPayload

SnapshotExtensionPayload contains payloads of an external snapshotter.

FieldTypeLabelDescription
payload bytes

SnapshotIAVLItem

SnapshotIAVLItem is an exported IAVL node.

FieldTypeLabelDescription
key bytes

value bytes

version int64

version is block height

height int32

height is depth of the tree.

SnapshotItem

SnapshotItem is an item contained in a rootmulti.Store snapshot.

FieldTypeLabelDescription
store SnapshotStoreItem

iavl SnapshotIAVLItem

extension SnapshotExtensionMeta

extension_payload SnapshotExtensionPayload

SnapshotStoreItem

SnapshotStoreItem contains metadata about a snapshotted store.

FieldTypeLabelDescription
name string

cosmos/base/tendermint/v1beta1/query.proto

Top

GetBlockByHeightRequest

GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method.

FieldTypeLabelDescription
height int64

GetBlockByHeightResponse

GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method.

FieldTypeLabelDescription
block_id tendermint.types.BlockID

block tendermint.types.Block

GetLatestBlockRequest

GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method.

GetLatestBlockResponse

GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method.

FieldTypeLabelDescription
block_id tendermint.types.BlockID

block tendermint.types.Block

GetLatestValidatorSetRequest

GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method.

FieldTypeLabelDescription
pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an pagination for the request.

GetLatestValidatorSetResponse

GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method.

FieldTypeLabelDescription
block_height int64

validators Validator repeated

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines an pagination for the response.

GetNodeInfoRequest

GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method.

GetNodeInfoResponse

GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method.

FieldTypeLabelDescription
default_node_info tendermint.p2p.DefaultNodeInfo

application_version VersionInfo

GetSyncingRequest

GetSyncingRequest is the request type for the Query/GetSyncing RPC method.

GetSyncingResponse

GetSyncingResponse is the response type for the Query/GetSyncing RPC method.

FieldTypeLabelDescription
syncing bool

GetValidatorSetByHeightRequest

GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method.

FieldTypeLabelDescription
height int64

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an pagination for the request.

GetValidatorSetByHeightResponse

GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method.

FieldTypeLabelDescription
block_height int64

validators Validator repeated

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines an pagination for the response.

Module

Module is the type for VersionInfo

FieldTypeLabelDescription
path string

module path

version string

module version

sum string

checksum

Validator

Validator is the type for the validator-set.

FieldTypeLabelDescription
address string

pub_key google.protobuf.Any

voting_power int64

proposer_priority int64

VersionInfo

VersionInfo is the type for the GetNodeInfoResponse message.

FieldTypeLabelDescription
name string

app_name string

version string

git_commit string

build_tags string

go_version string

build_deps Module repeated

cosmos_sdk_version string

Since: cosmos-sdk 0.43

Service

Service defines the gRPC querier service for tendermint queries.

Method NameRequest TypeResponse TypeDescription
GetNodeInfo GetNodeInfoRequest GetNodeInfoResponse

GetNodeInfo queries the current node info.

GetSyncing GetSyncingRequest GetSyncingResponse

GetSyncing queries node syncing.

GetLatestBlock GetLatestBlockRequest GetLatestBlockResponse

GetLatestBlock returns the latest block.

GetBlockByHeight GetBlockByHeightRequest GetBlockByHeightResponse

GetBlockByHeight queries block for given height.

GetLatestValidatorSet GetLatestValidatorSetRequest GetLatestValidatorSetResponse

GetLatestValidatorSet queries latest validator-set.

GetValidatorSetByHeight GetValidatorSetByHeightRequest GetValidatorSetByHeightResponse

GetValidatorSetByHeight queries validator-set at a given height.

Methods with HTTP bindings

Method Name Method Pattern Body
GetNodeInfo GET /cosmos/base/tendermint/v1beta1/node_info
GetSyncing GET /cosmos/base/tendermint/v1beta1/syncing
GetLatestBlock GET /cosmos/base/tendermint/v1beta1/blocks/latest
GetBlockByHeight GET /cosmos/base/tendermint/v1beta1/blocks/{height}
GetLatestValidatorSet GET /cosmos/base/tendermint/v1beta1/validatorsets/latest
GetValidatorSetByHeight GET /cosmos/base/tendermint/v1beta1/validatorsets/{height}

Scalar Value Types

.proto Type Notes Python Type
double float
float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int/long
uint32 Uses variable-length encoding. int/long
uint64 Uses variable-length encoding. int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. int/long
sfixed32 Always four bytes. int
sfixed64 Always eight bytes. int/long
bool boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. str/unicode
bytes May contain any arbitrary sequence of bytes. str