Documentation ¶
Index ¶
- func IsHealthyRPC(ctx context.Context, endpoint string) error
- type AssetList
- type ChainInfo
- func (c ChainInfo) GetAllRPCEndpoints() (out []string, err error)
- func (c ChainInfo) GetAssetList() (AssetList, error)
- func (c ChainInfo) GetPreferredRPCEndpoint(ctx context.Context, preferredEndpoints []string) (string, error)
- func (c ChainInfo) GetRPCEndpointWithDomain(ctx context.Context, preferredDomains []string) (out string, err error)
- func (c ChainInfo) GetRPCEndpoints(ctx context.Context) (out []string, err error)
- func (c ChainInfo) GetRandomRPCEndpoint(ctx context.Context) (string, error)
- type ChainRegistry
- type CosmosGithubRegistry
- type IbcConfig
- type IbcConfigChain
- type IbcConfigChannel
- type IbcConfigChannelOuter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssetList ¶
type AssetList struct { Schema string `json:"$schema"` ChainID string `json:"chain_id"` Assets []struct { Description string `json:"description"` DenomUnits []struct { Denom string `json:"denom"` Exponent int `json:"exponent"` } `json:"denom_units"` Base string `json:"base"` Name string `json:"name"` Display string `json:"display"` Symbol string `json:"symbol"` LogoURIs struct { Png string `json:"png"` Svg string `json:"svg"` } `json:"logo_URIs"` CoingeckoID string `json:"coingecko_id"` } `json:"assets"` }
type ChainInfo ¶
type ChainInfo struct { Schema string `json:"$schema"` ChainName string `json:"chain_name"` Status string `json:"status"` NetworkType string `json:"network_type"` PrettyName string `json:"pretty_name"` ChainID string `json:"chain_id"` Bech32Prefix string `json:"bech32_prefix"` DaemonName string `json:"daemon_name"` NodeHome string `json:"node_home"` Genesis struct { GenesisURL string `json:"genesis_url"` } `json:"genesis"` Slip44 int `json:"slip44"` Codebase struct { GitRepo string `json:"git_repo"` RecommendedVersion string `json:"recommended_version"` CompatibleVersions []string `json:"compatible_versions"` } `json:"codebase"` Peers struct { Seeds []struct { ID string `json:"id"` Address string `json:"address"` Provider string `json:"provider,omitempty"` } `json:"seeds"` PersistentPeers []struct { ID string `json:"id"` Address string `json:"address"` } `json:"persistent_peers"` } `json:"peers"` Apis struct { RPC []struct { Address string `json:"address"` Provider string `json:"provider"` } `json:"rpc"` Rest []struct { Address string `json:"address"` Provider string `json:"provider"` } `json:"rest"` } `json:"apis"` // contains filtered or unexported fields }
func NewChainInfo ¶
NewChainInfo returns a ChainInfo that is uninitialized other than the provided zap.Logger. Typically, the caller will unmarshal JSON content into the ChainInfo after initialization.
func (ChainInfo) GetAllRPCEndpoints ¶
func (ChainInfo) GetAssetList ¶
func (ChainInfo) GetPreferredRPCEndpoint ¶
func (ChainInfo) GetRPCEndpointWithDomain ¶
func (ChainInfo) GetRPCEndpoints ¶
type ChainRegistry ¶
type ChainRegistry interface { GetChain(name string) (ChainInfo, error) ListChains(ctx context.Context) ([]string, error) SourceLink() string }
func DefaultChainRegistry ¶
func DefaultChainRegistry(log *zap.Logger) ChainRegistry
type CosmosGithubRegistry ¶
type CosmosGithubRegistry struct {
// contains filtered or unexported fields
}
func NewCosmosGithubRegistry ¶
func NewCosmosGithubRegistry(log *zap.Logger) CosmosGithubRegistry
func (CosmosGithubRegistry) GetChain ¶
func (c CosmosGithubRegistry) GetChain(name string) (ChainInfo, error)
func (CosmosGithubRegistry) ListChains ¶
func (c CosmosGithubRegistry) ListChains(ctx context.Context) ([]string, error)
func (CosmosGithubRegistry) SourceLink ¶
func (c CosmosGithubRegistry) SourceLink() string
type IbcConfig ¶
type IbcConfig struct { Schema string `json:"$schema"` Chain1 IbcConfigChain `json:"chain_1"` Chain2 IbcConfigChain `json:"chain_2"` Channels []IbcConfigChannelOuter `json:"channels"` }
Defines IBC connection details between Cosmos chains. From e.g. https://raw.githubusercontent.com/cosmos/chain-registry/master/_IBC/cosmoshub-osmosis.json
type IbcConfigChain ¶
type IbcConfigChannel ¶
type IbcConfigChannelOuter ¶
type IbcConfigChannelOuter struct { Chain1 IbcConfigChannel `json:"chain_1"` Chain2 IbcConfigChannel `json:"chain_2"` Ordering string `json:"ordering"` Version string `json:"version"` Tags struct { Status string `json:"status,omitempty"` Preferred bool `json:"preferred,omitempty"` Dex string `json:"dex,omitempty"` } `json:"tags,omitempty"` }
Click to show internal directories.
Click to hide internal directories.