app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: Apache-2.0 Imports: 34 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCLIHome  = os.ExpandEnv("$HOME/.linocli")
	DefaultNodeHome = os.ExpandEnv("$HOME/.lino")
)

default home directories for expected binaries

Functions

func DefaultTxDecoder

func DefaultTxDecoder(cdc *wire.Codec) sdk.TxDecoder

func ErrGenesisFailed

func ErrGenesisFailed(msg string) sdk.Error

Error constructors

func LinoBlockchainGenState

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

default genesis file, only have one genesis account

func LinoBlockchainGenTx

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

func LinoBlockchainInit

func LinoBlockchainInit() server.AppInit

get app init parameters for server init command

func MakeCodec

func MakeCodec() *wire.Codec

func RegisterEvent

func RegisterEvent(cdc *wire.Codec)

Types

type GenesisAccount

type GenesisAccount struct {
	Name           string        `json:"name"`
	Lino           types.LNO     `json:"lino"`
	ResetKey       crypto.PubKey `json:"reset_key"`
	TransactionKey crypto.PubKey `json:"transaction_key"`
	AppKey         crypto.PubKey `json:"app_key"`
	IsValidator    bool          `json:"is_validator"`
	ValPubKey      crypto.PubKey `json:"validator_pub_key"`
}

genesis account will get coin to the address and register user if genesis account is validator, it will be added to validator list automatically

type GenesisAppDeveloper

type GenesisAppDeveloper struct {
	Name        string    `json:"name"`
	Deposit     types.LNO `json:"deposit"`
	Website     string    `json:"web_site"`
	Description string    `json:"description"`
	AppMetaData string    `json:"app_meta_data"`
}

register developer in genesis phase

type GenesisInfraProvider

type GenesisInfraProvider struct {
	Name string `json:"name"`
}

register infra provider in genesis phase

type GenesisState

type GenesisState struct {
	Accounts       []GenesisAccount          `json:"accounts"`
	Developers     []GenesisAppDeveloper     `json:"developers"`
	Infra          []GenesisInfraProvider    `json:"infra"`
	GenesisParam   GenesisParam              `json:"genesis_param"`
	InitGlobalMeta globalModel.InitParamList `json:"init_global_meta"`
}

genesis state for blockchain

type LinoBlockchain

type LinoBlockchain struct {
	*bam.BaseApp

	// keys to access the KVStore
	CapKeyMainStore      *sdk.KVStoreKey
	CapKeyAccountStore   *sdk.KVStoreKey
	CapKeyPostStore      *sdk.KVStoreKey
	CapKeyValStore       *sdk.KVStoreKey
	CapKeyVoteStore      *sdk.KVStoreKey
	CapKeyInfraStore     *sdk.KVStoreKey
	CapKeyDeveloperStore *sdk.KVStoreKey
	CapKeyIBCStore       *sdk.KVStoreKey
	CapKeyGlobalStore    *sdk.KVStoreKey
	CapKeyParamStore     *sdk.KVStoreKey
	CapKeyProposalStore  *sdk.KVStoreKey
	// contains filtered or unexported fields
}

Extended ABCI application

func NewLinoBlockchain

func NewLinoBlockchain(
	logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptions ...func(*bam.BaseApp)) *LinoBlockchain

func (*LinoBlockchain) ExportAppStateAndValidators

func (lb *LinoBlockchain) ExportAppStateAndValidators() (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)

Custom logic for state export

Jump to

Keyboard shortcuts

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