Lux SDKGoPackages

info

Package info

import "github.com/luxfi/sdk/info"

Functions

AwaitBootstrapped

func AwaitBootstrapped(ctx context.Context, c *Client, chainID string, freq time.Duration, options ...rpc.Option) (bool, error)

AwaitBootstrapped polls the node every [freq] to check if [chainID] has finished bootstrapping. Returns true once [chainID] reports that it has finished bootstrapping. Only returns an error if [ctx] returns an error.

Types

Client

func NewClient(uri string) *Client
func (c *Client) GetBlockchainID(ctx context.Context, alias string, options ...rpc.Option) (ids.ID, error)
func (c *Client) GetNetworkID(ctx context.Context, options ...rpc.Option) (uint32, error)
func (c *Client) GetNetworkName(ctx context.Context, options ...rpc.Option) (string, error)
func (c *Client) GetNodeID(ctx context.Context, options ...rpc.Option) (ids.NodeID, *apiinfo.ProofOfPossession, error)
func (c *Client) GetNodeIP(ctx context.Context, options ...rpc.Option) (netip.AddrPort, error)
func (c *Client) GetNodeVersion(ctx context.Context, options ...rpc.Option) (*apiinfo.GetNodeVersionReply, error)
func (c *Client) GetVMs(ctx context.Context, options ...rpc.Option) (map[ids.ID][]string, error)
func (c *Client) IsBootstrapped(ctx context.Context, chainID string, options ...rpc.Option) (bool, error)
func (c *Client) Peers(ctx context.Context, nodeIDs []ids.NodeID, options ...rpc.Option) ([]apiinfo.Peer, error)
func (c *Client) Upgrades(ctx context.Context, options ...rpc.Option) (*upgrade.Config, error)
func (c *Client) Uptime(ctx context.Context, options ...rpc.Option) (*apiinfo.UptimeResponse, error)