info

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: BSD-3-Clause Imports: 6 Imported by: 8

Documentation

Index

Constants

View Source
const (
	MethodGetNodeVersion  = "info.getNodeVersion"
	MethodGetNodeID       = "info.getNodeID"
	MethodGetNodeIP       = "info.getNodeIP"
	MethodGetNetworkID    = "info.getNetworkID"
	MethodGetNetworkName  = "info.getNetworkName"
	MethodGetBlockchainID = "info.getBlockchainID"
	MethodPeers           = "info.peers"
	MethodIsBootstrapped  = "info.isBootstrapped"
	MethodUpgrades        = "info.upgrades"
	MethodUptime          = "info.uptime"
	MethodLps             = "info.lps"
	MethodGetTxFee        = "info.getTxFee"
	MethodGetVMs          = "info.getVMs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetBlockchainIDArgs

type GetBlockchainIDArgs struct {
	Alias string `json:"alias"`
}

GetBlockchainIDArgs are the arguments for calling GetBlockchainID.

type GetBlockchainIDReply

type GetBlockchainIDReply struct {
	BlockchainID ids.ID `json:"blockchainID"`
}

GetBlockchainIDReply are the results from calling GetBlockchainID.

type GetNetworkIDReply

type GetNetworkIDReply struct {
	NetworkID types.Uint32 `json:"networkID"`
}

GetNetworkIDReply are the results from calling GetNetworkID.

type GetNetworkNameReply

type GetNetworkNameReply struct {
	NetworkName string `json:"networkName"`
}

GetNetworkNameReply is the result from calling GetNetworkName.

type GetNodeIDReply

type GetNodeIDReply struct {
	NodeID  ids.NodeID         `json:"nodeID"`
	NodePOP *ProofOfPossession `json:"nodePOP"`
}

GetNodeIDReply are the results from calling GetNodeID.

type GetNodeIPReply

type GetNodeIPReply struct {
	IP netip.AddrPort `json:"ip"`
}

GetNodeIPReply are the results from calling GetNodeIP.

type GetNodeVersionReply

type GetNodeVersionReply struct {
	Version            string            `json:"version"`
	DatabaseVersion    string            `json:"databaseVersion"`
	RPCProtocolVersion types.Uint32      `json:"rpcProtocolVersion"`
	GitCommit          string            `json:"gitCommit"`
	VMVersions         map[string]string `json:"vmVersions"`
}

GetNodeVersionReply are the results from calling GetNodeVersion.

type GetTxFeeResponse

type GetTxFeeResponse struct {
	TxFee                  types.Uint64 `json:"txFee"`
	CreateAssetTxFee       types.Uint64 `json:"createAssetTxFee"`
	CreateNetworkTxFee     types.Uint64 `json:"createNetworkTxFee"`
	TransformChainTxFee    types.Uint64 `json:"transformChainTxFee"`
	CreateChainTxFee       types.Uint64 `json:"createChainTxFee"`
	AddNetworkValidatorFee types.Uint64 `json:"addNetworkValidatorFee"`
	AddNetworkDelegatorFee types.Uint64 `json:"addNetworkDelegatorFee"`
}

GetTxFeeResponse are the results from calling GetTxFee.

type GetVMsReply

type GetVMsReply struct {
	VMs map[ids.ID][]string `json:"vms"`
	Fxs map[ids.ID]string   `json:"fxs"`
}

GetVMsReply contains the response metadata for GetVMs.

type IsBootstrappedArgs

type IsBootstrappedArgs struct {
	Chain string `json:"chain"`
}

IsBootstrappedArgs are the arguments for calling IsBootstrapped.

type IsBootstrappedResponse

type IsBootstrappedResponse struct {
	IsBootstrapped bool `json:"isBootstrapped"`
}

IsBootstrappedResponse are the results from calling IsBootstrapped.

type LP

type LP struct {
	SupportWeight types.Uint64        `json:"supportWeight"`
	Supporters    set.Set[ids.NodeID] `json:"supporters"`
	ObjectWeight  types.Uint64        `json:"objectWeight"`
	Objectors     set.Set[ids.NodeID] `json:"objectors"`
	AbstainWeight types.Uint64        `json:"abstainWeight"`
}

LP is information about an LP proposal.

type LPsReply

type LPsReply struct {
	LPs map[uint32]*LP `json:"lps"`
}

LPsReply are the results from calling LPs.

type Peer

type Peer struct {
	peer.Info

	Benched []string `json:"benched"`
}

Peer is information about a peer in the network.

type PeersArgs

type PeersArgs struct {
	NodeIDs []ids.NodeID `json:"nodeIDs"`
}

PeersArgs are the arguments for calling Peers.

type PeersReply

type PeersReply struct {
	NumPeers types.Uint64 `json:"numPeers"`
	Peers    []Peer       `json:"peers"`
}

PeersReply are the results from calling Peers.

type ProofOfPossession

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

ProofOfPossession is a JSON-friendly representation of a BLS PoP.

type Service

type Service interface {
	GetNodeVersion(ctx context.Context) (*GetNodeVersionReply, error)
	GetNodeID(ctx context.Context) (*GetNodeIDReply, error)
	GetNodeIP(ctx context.Context) (*GetNodeIPReply, error)
	GetNetworkID(ctx context.Context) (*GetNetworkIDReply, error)
	GetNetworkName(ctx context.Context) (*GetNetworkNameReply, error)
	GetBlockchainID(ctx context.Context, args *GetBlockchainIDArgs) (*GetBlockchainIDReply, error)
	Peers(ctx context.Context, args *PeersArgs) (*PeersReply, error)
	IsBootstrapped(ctx context.Context, args *IsBootstrappedArgs) (*IsBootstrappedResponse, error)
	Upgrades(ctx context.Context) (*map[string]any, error)
	Uptime(ctx context.Context) (*UptimeResponse, error)
	Lps(ctx context.Context) (*LPsReply, error)
	GetTxFee(ctx context.Context) (*GetTxFeeResponse, error)
	GetVMs(ctx context.Context) (*GetVMsReply, error)
}

Service defines the info API contract.

type UptimeResponse

type UptimeResponse struct {
	RewardingStakePercentage  types.Float64 `json:"rewardingStakePercentage"`
	WeightedAveragePercentage types.Float64 `json:"weightedAveragePercentage"`
}

UptimeResponse are the results from calling Uptime.

Jump to

Keyboard shortcuts

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