Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccountDecoder ¶
func GetAccountDecoder(cdc *wire.Codec) auth.AccountDecoder
GetAccountDecoder returns the AccountDecoder function for the custom AppAccount.
Types ¶
type AppAccount ¶
type AppAccount struct { auth.BaseAccount Name string `json:"name"` }
AppAccount is a custom extension for this application. It is an example of extending auth.BaseAccount with custom fields. It is compatible with the stock auth.AccountStore, since auth.AccountStore uses the flexible go-amino library.
func NewAppAccount ¶
func NewAppAccount(name string, baseAcct auth.BaseAccount) *AppAccount
NewAppAccount returns a reference to a new AppAccount given a name and an auth.BaseAccount.
func (*AppAccount) SetName ¶
func (acc *AppAccount) SetName(name string)
type GenesisAccount ¶
type GenesisAccount struct { Name string `json:"name"` Address sdk.AccAddress `json:"address"` Coins sdk.Coins `json:"coins"` }
GenesisAccount reflects a genesis account the application expects in it's genesis state.
func NewGenesisAccount ¶
func NewGenesisAccount(aa *AppAccount) *GenesisAccount
NewGenesisAccount returns a reference to a new GenesisAccount given an AppAccount.
func (*GenesisAccount) ToAppAccount ¶
func (ga *GenesisAccount) ToAppAccount() (acc *AppAccount, err error)
ToAppAccount converts a GenesisAccount to an AppAccount.
type GenesisState ¶
type GenesisState struct {
Accounts []*GenesisAccount `json:"accounts"`
}
GenesisState reflects the genesis state of the application.