types

package
v0.24.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2018 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v0.20.0

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) GetName

func (acc AppAccount) GetName() string

nolint

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL