Documentation ¶
Index ¶
- type ChainInfo
- type Config
- type NetworkConfig
- type Providers
- func (p *Providers) ChainList() []ChainInfo
- func (p *Providers) FindChain(chainHandle string) (uint64, ChainInfo, error)
- func (p *Providers) Get(chainHandle string) *ethrpc.Provider
- func (p *Providers) GetAuthChain() *ethrpc.Provider
- func (p *Providers) GetAuthProvider() *ethrpc.Provider
- func (p *Providers) GetByChainID(chainID uint64) *ethrpc.Provider
- func (p *Providers) GetByChainName(chainName string) *ethrpc.Provider
- func (p *Providers) GetTestAuthChain() *ethrpc.Provider
- func (p *Providers) GetTestnetAuthProvider() *ethrpc.Provider
- func (p *Providers) LookupAuthProviderByChainID(chainID uint64) *ethrpc.Provider
- func (p *Providers) ProviderMap() map[uint64]*ethrpc.Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config map[string]NetworkConfig
func (Config) AuthChain ¶
func (n Config) AuthChain() (NetworkConfig, bool)
func (Config) TestAuthChain ¶
func (n Config) TestAuthChain() (NetworkConfig, bool)
type NetworkConfig ¶
type NetworkConfig struct { ID uint64 `toml:"id" json:"id"` URL string `toml:"url" json:"url"` WSEnabled bool `toml:"ws_enabled" json:"wsEnabled"` WSURL string `toml:"ws_url" json:"wsUrl"` AuthChain bool `toml:"auth_chain" json:"authChain"` Testnet bool `toml:"testnet" json:"testnet"` Disabled bool `toml:"disabled" json:"disabled"` }
type Providers ¶
type Providers struct {
// contains filtered or unexported fields
}
func (*Providers) Get ¶
Get is a helper method which will allow you to fetch the provider for a chain by either the chain canonical name, or by the chain canonical id. This works because at the time of configuring the providers list in `NewProviders` we assign the name and string-id to the byName mapping.
func (*Providers) GetAuthChain ¶
func (*Providers) GetAuthProvider ¶
func (*Providers) GetByChainName ¶
func (*Providers) GetTestAuthChain ¶
func (*Providers) GetTestnetAuthProvider ¶
func (*Providers) LookupAuthProviderByChainID ¶
Click to show internal directories.
Click to hide internal directories.