Documentation ¶
Index ¶
- Constants
- Variables
- func ErrInputOutputMismatch(codespace sdk.CodespaceType) sdk.Error
- func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error
- func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
- func ErrSendDisabled(codespace sdk.CodespaceType) sdk.Error
- func ParamKeyTable() params.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func ValidateInputsOutputs(inputs []Input, outputs []Output) sdk.Error
- type AccountKeeper
- type Input
- type MsgMultiSend
- type MsgSend
- type Output
- type QueryBalanceParams
Constants ¶
const ( DefaultCodespace sdk.CodespaceType = ModuleName CodeSendDisabled sdk.CodeType = 101 CodeInvalidInputsOutputs sdk.CodeType = 102 )
Bank errors reserve 100 ~ 199.
const ( EventTypeTransfer = "transfer" AttributeKeyRecipient = "recipient" AttributeKeySender = "sender" AttributeValueCategory = ModuleName )
bank module event types
const ( // module name ModuleName = "bank" QuerierRoute = ModuleName )
const ( // DefaultParamspace for params keeper DefaultParamspace = ModuleName // DefaultSendEnabled enabled DefaultSendEnabled = true )
const RouterKey = ModuleName
RouterKey is they name of the bank module
Variables ¶
var ModuleCdc *codec.Codec
module codec
var ParamStoreKeySendEnabled = []byte("sendenabled")
ParamStoreKeySendEnabled is store's key for SendEnabled
Functions ¶
func ErrInputOutputMismatch ¶
func ErrInputOutputMismatch(codespace sdk.CodespaceType) sdk.Error
ErrInputOutputMismatch is an error
func ErrNoOutputs ¶
func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
ErrNoOutputs is an error
func ErrSendDisabled ¶
func ErrSendDisabled(codespace sdk.CodespaceType) sdk.Error
ErrSendDisabled is an error
func ParamKeyTable ¶
ParamKeyTable type declaration for parameters
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) exported.Account GetAccount(ctx sdk.Context, addr sdk.AccAddress) exported.Account GetAllAccounts(ctx sdk.Context) []exported.Account SetAccount(ctx sdk.Context, acc exported.Account) IterateAccounts(ctx sdk.Context, process func(exported.Account) bool) }
AccountKeeper defines the account contract that must be fulfilled when creating a x/bank keeper.
type Input ¶
type Input struct { Address sdk.AccAddress `json:"address" yaml:"address"` Coins sdk.Coins `json:"coins" yaml:"coins"` }
Input models transaction input
func NewInput ¶
func NewInput(addr sdk.AccAddress, coins sdk.Coins) Input
NewInput - create a transaction input, used with MsgMultiSend
func (Input) ValidateBasic ¶
ValidateBasic - validate transaction input
type MsgMultiSend ¶
type MsgMultiSend struct { Inputs []Input `json:"inputs" yaml:"inputs"` Outputs []Output `json:"outputs" yaml:"outputs"` }
MsgMultiSend - high level transaction of the coin module
func NewMsgMultiSend ¶
func NewMsgMultiSend(in []Input, out []Output) MsgMultiSend
NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.
func (MsgMultiSend) GetSignBytes ¶
func (msg MsgMultiSend) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgMultiSend) GetSigners ¶
func (msg MsgMultiSend) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgMultiSend) ValidateBasic ¶
func (msg MsgMultiSend) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgSend ¶
type MsgSend struct { FromAddress sdk.AccAddress `json:"from_address" yaml:"from_address"` ToAddress sdk.AccAddress `json:"to_address" yaml:"to_address"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
MsgSend - high level transaction of the coin module
func NewMsgSend ¶
func NewMsgSend(fromAddr, toAddr sdk.AccAddress, amount sdk.Coins) MsgSend
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
func (MsgSend) GetSigners ¶
func (msg MsgSend) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgSend) ValidateBasic ¶
ValidateBasic Implements Msg.
type Output ¶
type Output struct { Address sdk.AccAddress `json:"address" yaml:"address"` Coins sdk.Coins `json:"coins" yaml:"coins"` }
Output models transaction outputs
func NewOutput ¶
func NewOutput(addr sdk.AccAddress, coins sdk.Coins) Output
NewOutput - create a transaction output, used with MsgMultiSend
func (Output) ValidateBasic ¶
ValidateBasic - validate transaction output
type QueryBalanceParams ¶
type QueryBalanceParams struct {
Address sdk.AccAddress
}
QueryBalanceParams defines the params for querying an account balance.
func NewQueryBalanceParams ¶
func NewQueryBalanceParams(addr sdk.AccAddress) QueryBalanceParams
NewQueryBalanceParams creates a new instance of QueryBalanceParams.