Documentation ¶
Overview ¶
Package commands contains any general setup/helpers valid for all subcommands
Index ¶
- Constants
- Variables
- func AddBasicFlags(cmd *cobra.Command)
- func GetCertifier() (*certifiers.InquiringCertifier, error)
- func GetChainID() string
- func GetNode() rpcclient.Client
- func GetProviders() (trusted certifiers.Provider, source certifiers.Provider)
- func WasInited(root string) (bool, error)
- type Config
- type Runable
Constants ¶
View Source
const ( ChainFlag = "chain-id" NodeFlag = "node" )
View Source
const ( SeedFlag = "seed" HashFlag = "valhash" GenesisFlag = "genesis" ConfigFile = "config.toml" )
Variables ¶
View Source
var InitCmd = &cobra.Command{
Use: "init",
Short: "Initialize the light client for a new chain",
RunE: runInit,
}
InitCmd will initialize the basecli store
View Source
var ResetCmd = &cobra.Command{
Use: "reset_all",
Short: "DANGEROUS: Wipe out all client data, including keys",
RunE: runResetAll,
}
Functions ¶
func AddBasicFlags ¶
func GetCertifier ¶
func GetCertifier() (*certifiers.InquiringCertifier, error)
func GetChainID ¶ added in v0.10.1
func GetChainID() string
func GetProviders ¶ added in v0.10.1
func GetProviders() (trusted certifiers.Provider, source certifiers.Provider)
Types ¶
type Runable ¶ added in v0.10.3
func RequireInit ¶ added in v0.10.3
Any commands that require and init'ed light-client directory should wrap their RunE command with RequireInit to make sure that the client is initialized.
This cannot be called during PersistentPreRun, as they are called from the most specific command first, and root last, and the root command sets up viper, which is needed to find the home dir.
Click to show internal directories.
Click to hide internal directories.