Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
Types ¶
type ChainConfig ¶
type ChainConfig struct {
ID string `json:"id"`
Name string `json:"name"`
NameZh string `json:"name_zh"`
Type ChainType `json:"type"`
IsTestnet bool `json:"is_testnet"`
Status string `json:"status"`
Icon string `json:"icon"`
Color string `json:"color"`
NativeCurrency NativeCurrency `json:"native_currency"`
ExplorerURL string `json:"explorer_url"`
BlockTime int `json:"block_time"`
NetworkMagic uint32 `json:"network_magic"`
ChainID uint64 `json:"chain_id"`
RPCUrls []string `json:"rpc_urls"`
WSUrls []string `json:"ws_urls"`
Contracts map[string]string `json:"contracts"`
Metadata map[string]any `json:"metadata"`
}
func (ChainConfig) Contract ¶
func (c ChainConfig) Contract(name string) string
func (ChainConfig) Validate ¶
func (c ChainConfig) Validate() error
type Config ¶
type Config struct {
Chains []ChainConfig `json:"chains"`
}
func LoadConfig ¶
func LoadConfigFromBytes ¶
func LoadConfigFromPath ¶
func (*Config) ActiveChains ¶
func (c *Config) ActiveChains() []ChainConfig
type NativeCurrency ¶
Click to show internal directories.
Click to hide internal directories.