Documentation
¶
Index ¶
- func BaseCoinAppGenState(cdc *amino.Codec, appGenTxs []json.RawMessage) (appState json.RawMessage, err error)
- func BaseCoinAppGenTx(cdc *amino.Codec, pk crypto.PubKey, genTxConfig config.GenTx) (appGenTx, cliPrint json.RawMessage, validator tmtypes.GenesisValidator, ...)
- func BaseCoinInit() server.AppInit
- func GenerateCoinKey() (addr types.Address, secret string, err error)
- func NewAppAccount() account.Account
- type AppAccount
- type BaseCoinGenTx
- type GenesisAccount
- type GenesisQCP
- type GenesisState
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 NewAppAccount ¶
Types ¶
type AppAccount ¶
type AppAccount struct {
account.BaseAccount `json:"base_account"`
Coins []types.BaseCoin `json:"coins"`
}
func (*AppAccount) GetCoins ¶
func (acc *AppAccount) GetCoins() []types.BaseCoin
type BaseCoinGenTx ¶
type GenesisAccount ¶
type GenesisAccount struct {
Address types.Address `json:"address"`
Coins []types.BaseCoin `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 GenesisQCP ¶ added in v0.0.2
type GenesisQCP struct {
Name string `json:"name"`
ChainId string `json:"chain_id"`
PubKey crypto.PubKey `json:"pub_key"`
}
初始QCP配置
type GenesisState ¶
type GenesisState struct {
CAPubKey crypto.PubKey `json:"pub_key"`
Accounts []*GenesisAccount `json:"accounts"`
QCP []*GenesisQCP `json:"qcp"`
}
QOS初始状态
Click to show internal directories.
Click to hide internal directories.