types

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseCoinAppGenState added in v0.0.2

func BaseCoinAppGenState(cdc *amino.Codec, appGenTxs []json.RawMessage) (appState json.RawMessage, err error)

func BaseCoinAppGenTx added in v0.0.2

func BaseCoinAppGenTx(cdc *amino.Codec, pk crypto.PubKey, genTxConfig config.GenTx) (
	appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, err error)

Generate a genesis transaction

func BaseCoinInit added in v0.0.2

func BaseCoinInit() server.AppInit

func GenerateCoinKey

func GenerateCoinKey() (addr types.Address, secret string, err error)

func NewAppAccount

func NewAppAccount() account.Account

Types

type AppAccount

type AppAccount struct {
	account.BaseAccount `json:"base_account"`
	Coins               types.BaseCoins `json:"coins"`
}

func (*AppAccount) GetCoins

func (acc *AppAccount) GetCoins() types.BaseCoins

func (*AppAccount) SetCoins

func (acc *AppAccount) SetCoins(coins types.BaseCoins) error

type BaseCoinGenTx

type BaseCoinGenTx struct {
	Addr types.Address `json:"addr"`
}

type GenesisAccount

type GenesisAccount struct {
	Address types.Address   `json:"address"`
	Coins   types.BaseCoins `json:"coins"`
}

初始账户

func NewGenesisAccount

func NewGenesisAccount(aa *AppAccount) *GenesisAccount

给定 AppAccpunt 创建 GenesisAccount

func (*GenesisAccount) ToAppAccount

func (ga *GenesisAccount) ToAppAccount() (acc *AppAccount, err error)

给定 GenesisAccount 创建 AppAccpunt

type GenesisState

type GenesisState struct {
	CAPubKey crypto.PubKey     `json:"pub_key"`
	Accounts []*GenesisAccount `json:"accounts"`
}

QOS初始状态

Jump to

Keyboard shortcuts

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