types

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 16 Imported by: 1 module, 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

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

Variables

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 []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(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.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