types

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeInvalidTransaction sdk.CodeType      = 501
	CodeMissingField       sdk.CodeType      = 502
	CodeInvalidField       sdk.CodeType      = 503
	DefaultCodespace       sdk.CodespaceType = 10
)

ABCI Response Codes Base SDK reserves 500 - 599.

Variables

This section is empty.

Functions

func AddrToBytes added in v0.1.4

func AddrToBytes(addr sdk.AccAddress) []byte

func CodeToDefaultMsg added in v0.1.0

func CodeToDefaultMsg(code sdk.CodeType) string

CodeToDefaultMsg NOTE: Don't stringer this, we'll put better messages in later.

func ErrInvalidField added in v0.1.0

func ErrInvalidField(codespace sdk.CodespaceType, field string) sdk.Error

ErrInvalidField ...

func ErrMissingField added in v0.1.0

func ErrMissingField(codespace sdk.CodespaceType, field string) sdk.Error

ErrMissingField ...

func GetAccountDecoder

func GetAccountDecoder(cdc *wire.Codec) auth.AccountDecoder

Get the AccountDecoder function for the custom AppAccount

func InvalidTransaction added in v0.1.0

func InvalidTransaction(codespace sdk.CodespaceType, msg string) sdk.Error

InvalidTransaction ...

func ProtoAppAccount added in v0.20.0

func ProtoAppAccount() auth.Account

Constructor for AppAccount

Types

type AppAccount

type AppAccount struct {
	auth.BaseAccount
	Name string `json:"name"`
}

Custom extensions for this application. This is just an example of extending auth.BaseAccount with custom fields.

This is compatible with the stock auth.AccountStore, since auth.AccountStore uses the flexible go-amino library.

func (AppAccount) GetName

func (acc AppAccount) GetName() string

nolint

func (*AppAccount) SetName

func (acc *AppAccount) SetName(name string)

type AssetAmount added in v0.20.0

type AssetAmount struct {
	AssetID string `json:"asset_id"`
	Amount  sdk.Int
}

AssetAmount

type GenesisAccount

type GenesisAccount struct {
	Name    string         `json:"name"`
	Address sdk.AccAddress `json:"address"`
	Coins   sdk.Coins      `json:"coins"`
}

GenesisAccount doesn't need pubkey or sequence

func NewGenesisAccount

func NewGenesisAccount(aa *AppAccount) GenesisAccount

func NewGenesisAccountI added in v0.2.0

func NewGenesisAccountI(acc auth.Account) GenesisAccount

func (*GenesisAccount) ToAccount added in v0.2.0

func (ga *GenesisAccount) ToAccount() (acc *AppAccount)

convert GenesisAccount to AppAccount

type GenesisState

type GenesisState struct {
	Accounts  []GenesisAccount   `json:"accounts"`
	StakeData stake.GenesisState `json:"stake"`
}

State to Unmarshal

Jump to

Keyboard shortcuts

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