Help us shape the future of Go! Take the 2026 Go Developer Survey

gvalidators

package
v1.23.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

NewClient creates a new validator state client

Types

type Client

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

Client is a ValidatorState client

func (*Client) GetChainID added in v1.22.86

func (c *Client) GetChainID(netID ids.ID) (ids.ID, error)

func (*Client) GetCurrentHeight

func (c *Client) GetCurrentHeight(ctx context.Context) (uint64, error)

func (*Client) GetCurrentValidators added in v1.16.16

func (c *Client) GetCurrentValidators(ctx context.Context, height uint64, netID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error)

func (*Client) GetMinimumHeight

func (c *Client) GetMinimumHeight(ctx context.Context) (uint64, error)

func (*Client) GetNetworkID added in v1.22.86

func (c *Client) GetNetworkID(chainID ids.ID) (ids.ID, error)

func (*Client) GetValidatorSet

func (c *Client) GetValidatorSet(ctx context.Context, height uint64, netID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error)

func (*Client) GetWarpValidatorSet added in v1.16.56

func (c *Client) GetWarpValidatorSet(ctx context.Context, height uint64, netID ids.ID) (*validators.WarpSet, error)

func (*Client) GetWarpValidatorSets added in v1.16.56

func (c *Client) GetWarpValidatorSets(ctx context.Context, heights []uint64, netIDs []ids.ID) (map[ids.ID]map[uint64]*validators.WarpSet, error)

type Server

type Server struct {
	pb.UnsafeValidatorStateServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(state validators.State) *Server

func (*Server) GetChainID added in v1.22.87

func (s *Server) GetChainID(ctx context.Context, req *pb.GetChainIDRequest) (*pb.GetChainIDResponse, error)

func (*Server) GetCurrentHeight

func (s *Server) GetCurrentHeight(ctx context.Context, _ *emptypb.Empty) (*pb.GetCurrentHeightResponse, error)

func (*Server) GetMinimumHeight

func (s *Server) GetMinimumHeight(ctx context.Context, _ *emptypb.Empty) (*pb.GetMinimumHeightResponse, error)

func (*Server) GetValidatorSet

func (s *Server) GetValidatorSet(ctx context.Context, req *pb.GetValidatorSetRequest) (*pb.GetValidatorSetResponse, error)

Jump to

Keyboard shortcuts

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