glacier

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2025 License: CC0-1.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlsCredentials

type BlsCredentials struct {
	PublicKey         string `json:"publicKey"`
	ProofOfPossession string `json:"proofOfPossession"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func NewClientWithConfig

func NewClientWithConfig(cfg Config) *Client

func (*Client) FetchValidators

func (c *Client) FetchValidators(subnetID ids.ID) ([]Validator, error)

type Config

type Config struct {
	BaseURL string `env:"GLACIER_URL" envDefault:"https://glacier-api.avax.network"`
	ApiKey  string `env:"GLACIER_API_KEY"`
	Network string `env:"GLACIER_NETWORK" envDefault:"mainnet"`
}

type ListValidators

type ListValidators struct {
	Validators    []Validator `json:"validators"`
	NextPageToken string      `json:"nextPageToken"`
}

func (ListValidators) NextPage

func (r ListValidators) NextPage() string

type Owner

type Owner struct {
	Addresses []string `json:"addresses"`
	Threshold uint64   `json:"threshold"`
}

type Pageable

type Pageable interface {
	NextPage() string
}

type Validator

type Validator struct {
	ValidationID          ids.ID         `json:"validationId"`
	CreationTimestamp     uint64         `json:"creationTimestamp"`
	NodeID                ids.NodeID     `json:"nodeId"`
	SubnetID              ids.ID         `json:"subnetId"`
	Weight                uint64         `json:"weight"`
	RemainingBalance      uint64         `json:"remainingBalance"`
	BlsCredentials        BlsCredentials `json:"blsCredentials"`
	RemainingBalanceOwner Owner          `json:"remainingBalanceOwner"`
	DeactivationOwner     Owner          `json:"deactivationOwner"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL