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
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 matchoutputs
. The transaction containingMsgMultiSend
must contain signatures from all addresses used as inputs.- Parameters
inputs (List[MultiSendInput]) – senders and amounts
outputs (List[MultiSendOutput]) – recipients and amounts
- 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
toto_address
.- Parameters
from_address (AccAddress) – sender
to_address (AccAddress) – recipient
amount (Coins) – coins to send
- 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.
- 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) – to_address
coins (Coins) – amount to receive
- address: AccAddress
Input / output address.
- coins: terra_sdk.core.coins.Coins
Coins to be received.