cmd

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagHeight           = "height"
	FlagForZeroHeight    = "for-zero-height"
	FlagJailAllowedAddrs = "jail-allowed-addrs"
)
View Source
const (
	FlagStartHeight string = "start-height"
)
View Source
const (
	StartBlockHeight = 0
)

Variables

View Source
var (
	FlagName       = "name"
	FlagClientHome = "home-client"
	FlagOWK        = "owk"
)
View Source
var (
	FlagOverwrite = "overwrite"
	FlagWithTxs   = "with-txs"
	FlagIP        = "ip"
	FlagChainID   = "chain_id"
	FlagStateDB   = "statedb"
	//FlagDBName = "dbname"
	FlagWithValidator = "validator_key"
	FlagCoinName      = "denom"
)
View Source
var LineBreak = &cobra.Command{Run: func(cmd *cobra.Command, args []string) {}}

Functions

func AddGenesisAccountCmd

func AddGenesisAccountCmd(ctx *app.Context, cdc *codec.Codec) *cobra.Command

func AddGenesisShardCmd

func AddGenesisShardCmd(ctx *app.Context, cdc *codec.Codec) *cobra.Command

func AddGenesisValidatorCmd

func AddGenesisValidatorCmd(ctx *app.Context, cdc *codec.Codec) *cobra.Command

func AddServerCommands

func AddServerCommands(
	ctx *app.Context,
	cdc *amino.Codec,
	rootCmd *cobra.Command,
	appInit app.AppInit,
	appCreator app.AppCreator,
	appExport app.AppExporter,
)

func CopyFile

func CopyFile(src, dst string) error

func ExportCmd added in v1.5.23

func ExportCmd(appExporter app.AppExporter, defaultNodeHome string) *cobra.Command

func GetVersion

func GetVersion() string

return version of CLI/node and commit hash

func InitWithConfig

func InitWithConfig(cdc *amino.Codec, appInit app.AppInit, c *cfg.Config, initConfig InitConfig) (
	chainID string, nodeID string, appMessage json.RawMessage, pubKey crypto.PubKey, err error)

func MustSortJSON added in v1.5.23

func MustSortJSON(toSortJSON []byte) []byte

MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.

func ParseAccAddress

func ParseAccAddress(addr string) types.AccAddress

func ParseCoin

func ParseCoin(denom, amount string) (types.Coin, error)

func SortJSON added in v1.5.23

func SortJSON(toSortJSON []byte) ([]byte, error)

func StartInProcess

func StartInProcess(ctx *app.Context, appCreator app.AppCreator, cdc *codec.Codec) (*node.Node, error)

Types

type GenesisTx

type GenesisTx struct {
	NodeID    string                   `json:"node_id"`
	IP        string                   `json:"ip"`
	Validator tmtypes.GenesisValidator `json:"validator"`
	AppGenTx  json.RawMessage          `json:"app_gen_tx"`
}

type InitConfig

type InitConfig struct {
	ChainID      string
	GenTxs       bool
	GenTxsDir    string
	Overwrite    bool
	GenesisTime  time.Time
	Export       bool
	ValidatorKey string
}

type ValidatorAccount

type ValidatorAccount struct {
	Address    string `json:"address"`
	PublicKey  string `json:"public_key"`
	PrivateKey string `json:"private_key"`
}

Jump to

Keyboard shortcuts

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