blockchain

package
v1.22.8 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package blockchain provides utilities for blockchain configuration and deployment.

Package blockchain provides helper functions for blockchain operations including peer management, URI handling, and blockchain state queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToBLSProofOfPossession

func ConvertToBLSProofOfPossession(publicKey, proofOfPossesion string) (signer.ProofOfPossession, error)

ConvertToBLSProofOfPossession converts public key and proof of possession strings to a ProofOfPossession struct.

func GetAggregatorExtraPeers

func GetAggregatorExtraPeers(
	app *application.Lux,
	clusterName string,
) ([]info.Peer, error)

GetAggregatorExtraPeers returns a list of peers for the aggregator from the cluster.

func GetAggregatorNetworkUris

func GetAggregatorNetworkUris(app *application.Lux, clusterName string) ([]string, error)

GetAggregatorNetworkUris returns network URIs for the specified cluster.

func GetBlockchainTimestamp

func GetBlockchainTimestamp(network models.Network) (time.Time, error)

GetBlockchainTimestamp returns the current timestamp from the blockchain.

func GetKeyForChangeOwner

func GetKeyForChangeOwner(app *application.Lux, network models.Network) (string, error)

GetKeyForChangeOwner prompts for and returns a key address for change ownership.

func GetSubnet

func GetSubnet(subnetID ids.ID, network models.Network) (interface{}, error)

GetSubnet returns subnet validators information

func GetSubnetIDFromBlockchainID

func GetSubnetIDFromBlockchainID(blockchainID ids.ID, network models.Network) (ids.ID, error)

GetSubnetIDFromBlockchainID returns the subnet ID that validates the given blockchain.

func PromptValidatorBalance

func PromptValidatorBalance(app *application.Lux, availableBalance float64, prompt string) (float64, error)

PromptValidatorBalance prompts the user to enter a validator balance amount.

func UpdatePChainHeight

func UpdatePChainHeight(
	title string,
) error

UpdatePChainHeight displays a progress bar while waiting for P-Chain height update.

func UrisToPeers

func UrisToPeers(uris []string) ([]info.Peer, error)

UrisToPeers converts a list of node URIs to peer information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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