config

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AlternativeConfigHomePath = "/tmp"

	GlobalProviderFlag = "provider"
)

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
	Provider   string
	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