types

package
v0.0.0-...-7c12c5a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2015 License: GPL-2.0, GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenDocKey = []byte("GenDocKey")

Functions

func RandAccount

func RandAccount(randBalance bool, minBalance int64) (*acm.Account, *acm.PrivAccount)

Types

type BasicAccount

type BasicAccount struct {
	Address []byte `json:"address"`
	Amount  int64  `json:"amount"`
}

type GenesisAccount

type GenesisAccount struct {
	Address     []byte                     `json:"address"`
	Amount      int64                      `json:"amount"`
	Name        string                     `json:"name"`
	Permissions *ptypes.AccountPermissions `json:"permissions"`
}

type GenesisDoc

type GenesisDoc struct {
	GenesisTime time.Time          `json:"genesis_time"`
	ChainID     string             `json:"chain_id"`
	Params      *GenesisParams     `json:"params"`
	Accounts    []GenesisAccount   `json:"accounts"`
	Validators  []GenesisValidator `json:"validators"`
}

func GenesisDocFromJSON

func GenesisDocFromJSON(jsonBlob []byte) (genState *GenesisDoc)

func RandGenesisDoc

func RandGenesisDoc(numAccounts int, randBalance bool, minBalance int64, numValidators int, randBonded bool, minBonded int64) (*GenesisDoc, []*acm.PrivAccount, []*types.PrivValidator)

type GenesisParams

type GenesisParams struct {
	GlobalPermissions *ptypes.AccountPermissions `json:"global_permissions"`
}

type GenesisValidator

type GenesisValidator struct {
	PubKey   acm.PubKeyEd25519 `json:"pub_key"`
	Amount   int64             `json:"amount"`
	Name     string            `json:"name"`
	UnbondTo []BasicAccount    `json:"unbond_to"`
}

Jump to

Keyboard shortcuts

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