cmd

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: GPL-3.0 Imports: 46 Imported by: 0

Documentation

Overview

Package cmd provides the cli for running the story consensus client.

Package cmd provides commands for interacting with the Story consensus client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStatus added in v0.9.13

func CheckStatus(ctx context.Context, cfg StatusConfig) error

checkStatus queries the status endpoint of the Story chain and fetches the latest block height.

func DefaultCometConfig

func DefaultCometConfig(homeDir string) cfg.Config

DefaultCometConfig returns the default cometBFT config.

func InitFiles

func InitFiles(ctx context.Context, initCfg InitConfig) error

InitFiles initializes the files and folders required by story. It ensures a network and genesis file is generated/downloaded for the provided network.

func MakeGenesis

func MakeGenesis(network netconf.ID, valPubKeys ...crypto.PubKey) (*types.GenesisDoc, error)

func New

func New() *cobra.Command

New returns a new root cobra command that handles our command line tool.

func SplitAndTrim

func SplitAndTrim(input string) []string

Types

type InitConfig

type InitConfig struct {
	HomeDir         string
	Network         netconf.ID
	TrustedSync     bool
	Force           bool
	Clean           bool
	Cosmos          bool
	ExecutionHash   common.Hash
	RPCLaddr        string
	ExternalAddress string
	Seeds           string
	SeedMode        bool
	Moniker         string
}

InitConfig is the config for the init command.

type KeyInfo

type KeyInfo struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type StatusConfig added in v0.9.13

type StatusConfig struct {
	HomeDir  string
	RPCLaddr string
}

StatusConfig is the config for the status command.

type ValidatorKey

type ValidatorKey struct {
	Address string  `json:"address"`
	PubKey  KeyInfo `json:"pub_key"`
	PrivKey KeyInfo `json:"priv_key"`
}

Jump to

Keyboard shortcuts

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