config

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlternativeConfigHomePath = "/tmp"
)

Variables

View Source
var DefaultConfigDir string

Functions

func BindGlobalFlags

func BindGlobalFlags(fs *pflag.FlagSet)

func DefaultKwilCliPersistedConfig

func DefaultKwilCliPersistedConfig() *kwilCliPersistedConfig

func PersistConfig

func PersistConfig(conf *KwilCliConfig) error

Types

type KwilCliConfig

type KwilCliConfig struct {
	PrivateKey *crypto.Secp256k1PrivateKey
	GrpcURL    string // TODO: change to maybe `RPCProvider` or `ProviderURL`
	ChainID    string
}

func LoadCliConfig

func LoadCliConfig() (*KwilCliConfig, error)

LoadCliConfig loads the config. The precedence order is following, each item takes precedence over the item below it:

  1. flags
  2. config file
  3. default config

func LoadPersistedConfig

func LoadPersistedConfig() (*KwilCliConfig, error)

func (*KwilCliConfig) Identity

func (c *KwilCliConfig) Identity() []byte

Identity returns the account ID, or nil if no private key is set. These are the bytes of the ethereum address.

func (*KwilCliConfig) ToPersistedConfig

func (c *KwilCliConfig) ToPersistedConfig() *kwilCliPersistedConfig

Jump to

Keyboard shortcuts

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