cosmos/bank

Table of Contents

cosmos/bank/v1beta1/bank.proto

Top

DenomUnit

DenomUnit represents a struct that describes a given

denomination unit of the basic token.

FieldTypeLabelDescription
denom string

denom represents the string name of the given denom unit (e.g uatom).

exponent uint32

exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 1^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom).

aliases string repeated

aliases is a list of string aliases for the given denom

Input

Input models transaction input.

FieldTypeLabelDescription
address string

coins cosmos.base.v1beta1.Coin repeated

Metadata

Metadata represents a struct that describes

a basic token.

FieldTypeLabelDescription
description string

denom_units DenomUnit repeated

denom_units represents the list of DenomUnit's for a given coin

base string

base represents the base denom (should be the DenomUnit with exponent = 0).

display string

display indicates the suggested denom that should be displayed in clients.

name string

name defines the name of the token (eg: Cosmos Atom) Since: cosmos-sdk 0.43

symbol string

symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. Since: cosmos-sdk 0.43

Output

Output models transaction outputs.

FieldTypeLabelDescription
address string

coins cosmos.base.v1beta1.Coin repeated

Params

Params defines the parameters for the bank module.

FieldTypeLabelDescription
send_enabled SendEnabled repeated

default_send_enabled bool

SendEnabled

SendEnabled maps coin denom to a send_enabled status (whether a denom is

sendable).

FieldTypeLabelDescription
denom string

enabled bool

Supply

Supply represents a struct that passively keeps track of the total supply

amounts in the network.

This message is deprecated now that supply is indexed by denom.

FieldTypeLabelDescription
total cosmos.base.v1beta1.Coin repeated

cosmos/bank/v1beta1/query.proto

Top

QueryAllBalancesRequest

QueryBalanceRequest is the request type for the Query/AllBalances RPC method.

FieldTypeLabelDescription
address string

address is the address to query balances for.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryAllBalancesResponse

QueryAllBalancesResponse is the response type for the Query/AllBalances RPC

method.

FieldTypeLabelDescription
balances cosmos.base.v1beta1.Coin repeated

balances is the balances of all the coins.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryBalanceRequest

QueryBalanceRequest is the request type for the Query/Balance RPC method.

FieldTypeLabelDescription
address string

address is the address to query balances for.

denom string

denom is the coin denom to query balances for.

QueryBalanceResponse

QueryBalanceResponse is the response type for the Query/Balance RPC method.

FieldTypeLabelDescription
balance cosmos.base.v1beta1.Coin

balance is the balance of the coin.

QueryDenomMetadataRequest

QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method.

FieldTypeLabelDescription
denom string

denom is the coin denom to query the metadata for.

QueryDenomMetadataResponse

QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC

method.

FieldTypeLabelDescription
metadata Metadata

metadata describes and provides all the client information for the requested token.

QueryDenomsMetadataRequest

QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method.

FieldTypeLabelDescription
pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QueryDenomsMetadataResponse

QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC

method.

FieldTypeLabelDescription
metadatas Metadata repeated

metadata provides the client information for all the registered tokens.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QueryParamsRequest

QueryParamsRequest defines the request type for querying x/bank parameters.

QueryParamsResponse

QueryParamsResponse defines the response type for querying x/bank parameters.

FieldTypeLabelDescription
params Params

QuerySpendableBalancesRequest

QuerySpendableBalancesRequest defines the gRPC request structure for querying

an account's spendable balances.

FieldTypeLabelDescription
address string

address is the address to query spendable balances for.

pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request.

QuerySpendableBalancesResponse

QuerySpendableBalancesResponse defines the gRPC response structure for querying

an account's spendable balances.

FieldTypeLabelDescription
balances cosmos.base.v1beta1.Coin repeated

balances is the spendable balances of all the coins.

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response.

QuerySupplyOfRequest

QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method.

FieldTypeLabelDescription
denom string

denom is the coin denom to query balances for.

QuerySupplyOfResponse

QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.

FieldTypeLabelDescription
amount cosmos.base.v1beta1.Coin

amount is the supply of the coin.

QueryTotalSupplyRequest

QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC

method.

FieldTypeLabelDescription
pagination cosmos.base.query.v1beta1.PageRequest

pagination defines an optional pagination for the request. Since: cosmos-sdk 0.43

QueryTotalSupplyResponse

QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC

method

FieldTypeLabelDescription
supply cosmos.base.v1beta1.Coin repeated

supply is the supply of the coins

pagination cosmos.base.query.v1beta1.PageResponse

pagination defines the pagination in the response. Since: cosmos-sdk 0.43

Query

Query defines the gRPC querier service.

Method NameRequest TypeResponse TypeDescription
Balance QueryBalanceRequest QueryBalanceResponse

Balance queries the balance of a single coin for a single account.

AllBalances QueryAllBalancesRequest QueryAllBalancesResponse

AllBalances queries the balance of all coins for a single account.

SpendableBalances QuerySpendableBalancesRequest QuerySpendableBalancesResponse

SpendableBalances queries the spenable balance of all coins for a single account.

TotalSupply QueryTotalSupplyRequest QueryTotalSupplyResponse

TotalSupply queries the total supply of all coins.

SupplyOf QuerySupplyOfRequest QuerySupplyOfResponse

SupplyOf queries the supply of a single coin.

Params QueryParamsRequest QueryParamsResponse

Params queries the parameters of x/bank module.

DenomMetadata QueryDenomMetadataRequest QueryDenomMetadataResponse

DenomsMetadata queries the client metadata of a given coin denomination.

DenomsMetadata QueryDenomsMetadataRequest QueryDenomsMetadataResponse

DenomsMetadata queries the client metadata for all registered coin denominations.

Methods with HTTP bindings

Method Name Method Pattern Body
Balance GET /cosmos/bank/v1beta1/balances/{address}/by_denom
AllBalances GET /cosmos/bank/v1beta1/balances/{address}
SpendableBalances GET /cosmos/bank/v1beta1/spendable_balances/{address}
TotalSupply GET /cosmos/bank/v1beta1/supply
SupplyOf GET /cosmos/bank/v1beta1/supply/{denom}
Params GET /cosmos/bank/v1beta1/params
DenomMetadata GET /cosmos/bank/v1beta1/denoms_metadata/{denom}
DenomsMetadata GET /cosmos/bank/v1beta1/denoms_metadata

cosmos/bank/v1beta1/genesis.proto

Top

Balance

Balance defines an account address and balance pair used in the bank module's

genesis state.

FieldTypeLabelDescription
address string

address is the address of the balance holder.

coins cosmos.base.v1beta1.Coin repeated

coins defines the different coins this balance holds.

GenesisState

GenesisState defines the bank module's genesis state.

FieldTypeLabelDescription
params Params

params defines all the paramaters of the module.

balances Balance repeated

balances is an array containing the balances of all the accounts.

supply cosmos.base.v1beta1.Coin repeated

supply represents the total supply. If it is left empty, then supply will be calculated based on the provided balances. Otherwise, it will be used to validate that the sum of the balances equals this amount.

denom_metadata Metadata repeated

denom_metadata defines the metadata of the differents coins.

cosmos/bank/v1beta1/authz.proto

Top

SendAuthorization

SendAuthorization allows the grantee to spend up to spend_limit coins from

the granter's account.

Since: cosmos-sdk 0.43

FieldTypeLabelDescription
spend_limit cosmos.base.v1beta1.Coin repeated

cosmos/bank/v1beta1/tx.proto

Top

MsgMultiSend

MsgMultiSend represents an arbitrary multi-in, multi-out send message.

FieldTypeLabelDescription
inputs Input repeated

outputs Output repeated

MsgMultiSendResponse

MsgMultiSendResponse defines the Msg/MultiSend response type.

MsgSend

MsgSend represents a message to send coins from one account to another.

FieldTypeLabelDescription
from_address string

to_address string

amount cosmos.base.v1beta1.Coin repeated

MsgSendResponse

MsgSendResponse defines the Msg/Send response type.

Msg

Msg defines the bank Msg service.

Method NameRequest TypeResponse TypeDescription
Send MsgSend MsgSendResponse

Send defines a method for sending coins from one account to another account.

MultiSend MsgMultiSend MsgMultiSendResponse

MultiSend defines a method for sending coins from some accounts to other accounts.

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