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(ctx context.Context) (AssetList, error)
- func (c ChainInfo) GetChainConfig(ctx context.Context) (*client.ChainClientConfig, 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
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) GetChainConfig ¶
func (ChainInfo) GetRPCEndpoints ¶
type ChainRegistry ¶
type ChainRegistry interface {
GetChain(ctx context.Context, 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) ListChains ¶
func (c CosmosGithubRegistry) ListChains(ctx context.Context) ([]string, error)
func (CosmosGithubRegistry) SourceLink ¶
func (c CosmosGithubRegistry) SourceLink() string
Click to show internal directories.
Click to hide internal directories.