Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RPCURL string
}
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig returns a new config with default values. Default values can be overwritten with env variables, most importantly RPC_URL for a custom endpoint.
func (*Config) ExtractDefaultRPCURL ¶
func (c *Config) ExtractDefaultRPCURL()
ExtractDefaultRPCURL reads the env variable RPC_URL and sets it in the config. If that variable is unset or empty, it will fallback to "http://127.0.0.1:9933"
Click to show internal directories.
Click to hide internal directories.