Documentation ¶
Index ¶
Constants ¶
View Source
const ( AlternativeConfigHomePath = "/tmp" GlobalProviderFlag = "provider" )
Variables ¶
View Source
var DefaultConfigDir string
Functions ¶
func BindGlobalFlags ¶
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:
- flags
- config file
- 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
Click to show internal directories.
Click to hide internal directories.