cosmos/base

Table of Contents

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

Deprecated. Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. Deprecated. This field is still populated, but prefer msg_response instead because it also contains the Msg response typeURL.

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.

msg_responses google.protobuf.Any repeated

msg_responses contains the Msg handler responses type packed in Anys. Since: cosmos-sdk 0.46

Fields with deprecated option

Name Option
data

true

SearchBlocksResult

SearchBlocksResult defines a structure for querying blocks pageable

FieldTypeLabelDescription
total_count int64

Count of all blocks

count int64

Count of blocks in current page

page_number int64

Index of current page, start from 1

page_total int64

Count of total pages

limit int64

Max count blocks per page

blocks tendermint.types.Block repeated

List of blocks in current page

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

Deprecated. data field is deprecated and not populated.

msg_responses google.protobuf.Any repeated

msg_responses contains the Msg handler responses packed into Anys. Since: cosmos-sdk 0.46

Fields with deprecated option

Name Option
data

true

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. 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/node/v1beta1/query.proto

Top

ConfigRequest

ConfigRequest defines the request structure for the Config gRPC query.

ConfigResponse

ConfigResponse defines the response structure for the Config gRPC query.

FieldTypeLabelDescription
minimum_gas_price string

pruning_keep_recent string

pruning_interval string

halt_height uint64

StatusRequest

StateRequest defines the request structure for the status of a node.

StatusResponse

StateResponse defines the response structure for the status of a node.

FieldTypeLabelDescription
earliest_store_height uint64

earliest block height available in the store

height uint64

current block height

timestamp google.protobuf.Timestamp

block height timestamp

app_hash bytes

app hash of the current block

validator_hash bytes

validator hash provided by the consensus header

Service

Service defines the gRPC querier service for node related queries.

Method NameRequest TypeResponse TypeDescription
Config ConfigRequest ConfigResponse

Config queries for the operator configuration.

Status StatusRequest StatusResponse

Status queries for the node status.

Methods with HTTP bindings

Method Name Method Pattern Body
Config GET /cosmos/base/node/v1beta1/config
Status GET /cosmos/base/node/v1beta1/status

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. It will be empty if there are no more results.

total uint64

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

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/tendermint/v1beta1/query.proto

Top

ABCIQueryRequest

ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query.

FieldTypeLabelDescription
data bytes

path string

height int64

prove bool

ABCIQueryResponse

ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query.

Note: This type is a duplicate of the ResponseQuery proto type defined in

Tendermint.

FieldTypeLabelDescription
code uint32

log string

nondeterministic

info string

nondeterministic

index int64

key bytes

value bytes

proof_ops ProofOps

height int64

codespace string

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

Deprecated: please use `sdk_block` instead

sdk_block Block

Since: cosmos-sdk 0.47

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

Deprecated: please use `sdk_block` instead

sdk_block Block

Since: cosmos-sdk 0.47

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 response 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

ProofOp

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.

FieldTypeLabelDescription
type string

key bytes

data bytes

ProofOps

ProofOps is Merkle proof defined by the list of ProofOps.

Note: This type is a duplicate of the ProofOps proto type defined in Tendermint.

FieldTypeLabelDescription
ops ProofOp repeated

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.

ABCIQuery ABCIQueryRequest ABCIQueryResponse

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. Since: cosmos-sdk 0.46

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}
ABCIQuery GET /cosmos/base/tendermint/v1beta1/abci_query

cosmos/base/tendermint/v1beta1/types.proto

Top

Block

Block is tendermint type Block, with the Header proposer address

field converted to bech32 string.

FieldTypeLabelDescription
header Header

data tendermint.types.Data

evidence tendermint.types.EvidenceList

last_commit tendermint.types.Commit

Header

Header defines the structure of a Tendermint block header.

FieldTypeLabelDescription
version tendermint.version.Consensus

basic block info

chain_id string

height int64

time google.protobuf.Timestamp

last_block_id tendermint.types.BlockID

prev block info

last_commit_hash bytes

hashes of block data commit from validators from the last block

data_hash bytes

transactions

validators_hash bytes

hashes from the app output from the prev block validators for the current block

next_validators_hash bytes

validators for the next block

consensus_hash bytes

consensus params for current block

app_hash bytes

state after txs from the previous block

last_results_hash bytes

root hash of all results from the txs from the previous block

evidence_hash bytes

consensus info evidence included in the block

proposer_address string

proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. original proposer of the block

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.

Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal.

FieldTypeLabelDescription
dec string

IntProto

IntProto defines a Protobuf wrapper around an Int object.

Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal.

FieldTypeLabelDescription
int string

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