types

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAccountName = "Jia"
	DefaultAccountPass = "12345678"
)

Variables

View Source
var (
	EventActionSend = "send"

	AttributeKeySender   = "sender"
	AttributeKeyReceiver = "receiver"
)
View Source
var (
	DefaultCLIHome  = os.ExpandEnv("$HOME/.basecli")
	DefaultNodeHome = os.ExpandEnv("$HOME/.basecoind")
)

Functions

func BaseCoinAppGenState added in v0.0.2

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

func GenerateCoinKey

func GenerateCoinKey(cdc *amino.Codec, clientRoot string) (addr types.Address, mnemonic 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.AccAddress `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
t or T : Toggle theme light dark auto
y or Y : Canonical URL