Documentation ¶
Index ¶
- Variables
- func NewChainRegistryClient(log *log.Logger) *chainRegistryClient
- type APIAddress
- type APIs
- type Asset
- type AssetList
- type Binaries
- type ChainInfo
- type ChainRegistryClient
- type Codebase
- type Commission
- type Delegations
- type DenomUnit
- type Description
- type Explorer
- type Fee
- type FeeToken
- type Genesis
- type ImageLinks
- type LogoURIs
- type MissedBlocksPeriods
- type Peer
- type Peers
- type Response
- type Restake
- type RestakeInfo
- type Seed
- type Slashes
- type Staking
- type Token
- type Validator
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoChainFoundForChainID = errors.New("no chain found for chain ID") ErrNoStakingTokenFound = errors.New("no staking tokens found in registry") ErrNoFeeTokenFound = errors.New("no fee tokens found in registry") ErrNoMatchingAsset = errors.New("no matching asset found") ErrNoMatchingDenom = errors.New("no matching denom found") )
Functions ¶
func NewChainRegistryClient ¶ added in v1.0.12
NewRegistryClient makes a new default registry client.
Types ¶
type APIAddress ¶
type APIs ¶
type APIs struct { RPC []APIAddress `json:"rpc"` Rest []APIAddress `json:"rest"` GRPC []APIAddress `json:"grpc"` }
type Asset ¶ added in v1.1.0
type Asset struct { Description string `json:"description"` DenomUnits []DenomUnit `json:"denom_units"` Base string `json:"base"` Name string `json:"name"` Display string `json:"display"` Symbol string `json:"symbol"` LogoURIs LogoURIs `json:"logo_URIs"` CoingeckoID string `json:"coingecko_id"` Images []ImageLinks `json:"images"` }
type AssetList ¶ added in v1.1.0
type AssetList struct { Schema string `json:"$schema"` ChainName string `json:"chain_name"` Assets []Asset `json:"assets"` }
func (*AssetList) ExtractAssetByBaseSymbol ¶ added in v1.1.0
type ChainInfo ¶
type ChainInfo struct { ChainName string `json:"chain_name"` Status string `json:"status"` NetworkType string `json:"network_type"` Website string `json:"website"` 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"` KeyAlgos []string `json:"key_algos"` Slip44 int `json:"slip44"` Fees Fee `json:"fees"` Staking Staking `json:"staking"` Codebase Codebase `json:"codebase"` LogoURIs LogoURIs `json:"logo_URIs"` Peers Peers `json:"peers"` APIs APIs `json:"apis"` Explorers []Explorer `json:"explorers"` }
func (*ChainInfo) StakingDenom ¶ added in v1.0.12
type ChainRegistryClient ¶ added in v1.0.12
type ChainRegistryClient interface { // Cosmos Chain Registry AllChainNames(ctx context.Context) ([]string, error) ChainNameForChainID(ctx context.Context, targetChainID string, refreshCache bool) (string, error) ChainInfo(ctx context.Context, chainName string) (*ChainInfo, error) AssetList(ctx context.Context, chainName string) (*AssetList, error) // Restake Validator Registry Validator(ctx context.Context, targetValidator string) (*Validator, error) }
func NewRetryableChainRegistryClient ¶ added in v1.0.12
func NewRetryableChainRegistryClient(attempts uint, delay time.Duration, chainRegistryClient ChainRegistryClient, logger *log.Logger) (ChainRegistryClient, error)
NewRetryableChainRegistryClient returns a new retryableChainRegistryClient
type Commission ¶ added in v1.0.12
type Commission struct {
Rate float64 `json:"rate"`
}
type Delegations ¶ added in v1.0.12
type Description ¶ added in v1.0.12
type ImageLinks ¶ added in v1.1.0
type MissedBlocksPeriods ¶ added in v1.0.12
type Response ¶ added in v1.0.12
type Response struct {
Validators []Validator `json:"validators"`
}
type RestakeInfo ¶ added in v1.0.12
type RestakeInfo struct { Name string `json:"name"` Restake Restake `json:"restake"` Moniker string `json:"moniker"` Identity string `json:"identity"` Address string `json:"address"` Active bool `json:"active"` Jailed bool `json:"jailed"` Status string `json:"status"` Delegations Delegations `json:"delegations"` Description Description `json:"description"` Commission Commission `json:"commission"` Rank int `json:"rank"` Slashes []Slashes `json:"slashes"` Image string `json:"image"` }
Click to show internal directories.
Click to hide internal directories.