Bank

API

class terra_sdk.client.lcd.api.bank.BankAPI(c)[source]
balance(address, params=None)[source]

Fetches an account’s current balance.

Parameters
  • address (AccAddress) – account address

  • params (APIParams, optional) – additional params for the API like pagination

Returns

balance Pagination: pagination info

Return type

Coins

total()[source]

Fetches the current total supply of all tokens.

Returns

total supply params (APIParams, optional): additional params for the API like pagination

Return type

Coins

Messages

Bank module message types.

class terra_sdk.core.bank.msgs.MsgMultiSend(inputs, outputs)[source]

Allows batch-sending between multiple source and destination addresses. The total amount of coins in inputs must match outputs. The transaction containing MsgMultiSend must contain signatures from all addresses used as inputs.

Parameters
action = 'multisend'
to_data()[source]

Converts the object to its JSON-serializable Python data representation.

Return type

dict

type_amino = 'bank/MsgMultiSend'
type_url: str = '/cosmos.bank.v1beta1.MsgMultiSend'
class terra_sdk.core.bank.msgs.MsgSend(from_address, to_address, amount)[source]

Sends native Terra assets (Luna or Terra stablecoins) from from_address to to_address.

Parameters
action = 'send'
to_data()[source]

Converts the object to its JSON-serializable Python data representation.

Return type

dict

type_amino = 'bank/MsgSend'
type_url: str = '/cosmos.bank.v1beta1.MsgSend'
class terra_sdk.core.bank.msgs.MultiSendInput(address, coins)[source]

Organizes data for MsgMultiSend input/outputs. Expects data to be provided in the format:

Parameters
  • address (AccAddress) – from_address

  • coins (Coins) – amount to send from the address

address: AccAddress

Input / output address.

coins: terra_sdk.core.coins.Coins

Coins to be sent.

to_data()[source]

Converts the object to its JSON-serializable Python data representation.

Return type

dict

class terra_sdk.core.bank.msgs.MultiSendOutput(address, coins)[source]

Organizes data for MsgMultiSend input/outputs. Expects data to be provided in the format:

Parameters
address: AccAddress

Input / output address.

coins: terra_sdk.core.coins.Coins

Coins to be received.

to_data()[source]

Converts the object to its JSON-serializable Python data representation.

Return type

dict