Documentation ¶
Overview ¶
nolint
Index ¶
- Constants
- func ErrInvalidInput(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrInvalidOutput(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error
- func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
- func NewHandler(k Keeper) sdk.Handler
- func RegisterWire(cdc *wire.Codec)
- type Input
- type Keeper
- func (keeper Keeper) AddCoins(ctx sdk.Context, addr sdk.Address, amt sdk.Coins) (sdk.Coins, sdk.Error)
- func (keeper Keeper) GetCoins(ctx sdk.Context, addr sdk.Address) sdk.Coins
- func (keeper Keeper) HasCoins(ctx sdk.Context, addr sdk.Address, amt sdk.Coins) bool
- func (keeper Keeper) InputOutputCoins(ctx sdk.Context, inputs []Input, outputs []Output) sdk.Error
- func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.Address, toAddr sdk.Address, amt sdk.Coins) sdk.Error
- func (keeper Keeper) SetCoins(ctx sdk.Context, addr sdk.Address, amt sdk.Coins) sdk.Error
- func (keeper Keeper) SubtractCoins(ctx sdk.Context, addr sdk.Address, amt sdk.Coins) (sdk.Coins, sdk.Error)
- type MsgIssue
- type MsgSend
- type Output
- type SendKeeper
- func (keeper SendKeeper) GetCoins(ctx sdk.Context, addr sdk.Address) sdk.Coins
- func (keeper SendKeeper) HasCoins(ctx sdk.Context, addr sdk.Address, amt sdk.Coins) bool
- func (keeper SendKeeper) InputOutputCoins(ctx sdk.Context, inputs []Input, outputs []Output) sdk.Error
- func (keeper SendKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.Address, toAddr sdk.Address, amt sdk.Coins) sdk.Error
- type ViewKeeper
Constants ¶
const ( DefaultCodespace sdk.CodespaceType = 2 CodeInvalidInput sdk.CodeType = 101 CodeInvalidOutput sdk.CodeType = 102 )
Bank errors reserve 100 ~ 199.
Variables ¶
This section is empty.
Functions ¶
func ErrInvalidInput ¶
func ErrInvalidInput(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrInvalidOutput ¶
func ErrInvalidOutput(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrNoInputs ¶
func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error
func ErrNoOutputs ¶
func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
func NewHandler ¶
NewHandler returns a handler for "bank" type messages.
Types ¶
type Input ¶
Transaction Output
func (Input) ValidateBasic ¶
ValidateBasic - validate transaction input
type Keeper ¶ added in v0.2.1
type Keeper struct {
// contains filtered or unexported fields
}
Keeper manages transfers between accounts
func NewKeeper ¶ added in v0.16.0
func NewKeeper(am sdk.AccountMapper) Keeper
NewKeeper returns a new Keeper
func (Keeper) AddCoins ¶ added in v0.16.0
func (keeper Keeper) AddCoins(ctx sdk.Context, addr sdk.Address, amt sdk.Coins) (sdk.Coins, sdk.Error)
AddCoins adds amt to the coins at the addr.
func (Keeper) HasCoins ¶ added in v0.16.0
HasCoins returns whether or not an account has at least amt coins.
func (Keeper) InputOutputCoins ¶ added in v0.16.0
InputOutputCoins handles a list of inputs and outputs
func (Keeper) SendCoins ¶ added in v0.16.0
func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.Address, toAddr sdk.Address, amt sdk.Coins) sdk.Error
SendCoins moves coins from one account to another
type MsgIssue ¶ added in v0.16.0
MsgIssue - high level transaction of the coin module
func NewMsgIssue ¶ added in v0.16.0
NewMsgIssue - construct arbitrary multi-in, multi-out send msg.
func (MsgIssue) GetSignBytes ¶ added in v0.16.0
Implements Msg.
func (MsgIssue) GetSigners ¶ added in v0.16.0
Implements Msg.
func (MsgIssue) ValidateBasic ¶ added in v0.16.0
Implements Msg.
type MsgSend ¶ added in v0.2.1
MsgSend - high level transaction of the coin module
func NewMsgSend ¶ added in v0.2.1
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
func (MsgSend) GetSignBytes ¶ added in v0.16.0
Implements Msg.
func (MsgSend) GetSigners ¶ added in v0.16.0
Implements Msg.
func (MsgSend) ValidateBasic ¶ added in v0.16.0
Implements Msg.
type Output ¶
Transaction Output
func (Output) ValidateBasic ¶
ValidateBasic - validate transaction output
type SendKeeper ¶ added in v0.2.1
type SendKeeper struct {
// contains filtered or unexported fields
}
SendKeeper only allows transfers between accounts, without the possibility of creating coins
func NewSendKeeper ¶ added in v0.16.0
func NewSendKeeper(am sdk.AccountMapper) SendKeeper
NewSendKeeper returns a new Keeper
func (SendKeeper) HasCoins ¶ added in v0.16.0
HasCoins returns whether or not an account has at least amt coins.
func (SendKeeper) InputOutputCoins ¶ added in v0.16.0
func (keeper SendKeeper) InputOutputCoins(ctx sdk.Context, inputs []Input, outputs []Output) sdk.Error
InputOutputCoins handles a list of inputs and outputs
type ViewKeeper ¶ added in v0.2.1
type ViewKeeper struct {
// contains filtered or unexported fields
}
ViewKeeper only allows reading of balances
func NewViewKeeper ¶ added in v0.16.0
func NewViewKeeper(am sdk.AccountMapper) ViewKeeper
NewViewKeeper returns a new Keeper