comet

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package comet wraps the CometBFT RPC client with the specific calls cometcli tools need.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	RPC *rpchttp.HTTP
}

Client is a thin wrapper over the cometbft RPC HTTP client.

func New

func New(endpoint string) (*Client, error)

New connects to a CometBFT RPC endpoint (tcp:// or http:// URL).

func (*Client) ABCIInfo

func (c *Client) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error)

func (*Client) AllValidators

func (c *Client) AllValidators(ctx context.Context, height *int64) ([]*ctypes.Validator, error)

AllValidators collects the full set across pages.

func (*Client) Block

func (c *Client) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)

func (*Client) BlockResults

func (c *Client) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error)

func (*Client) Commit

func (c *Client) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error)

Commit returns the signed commit at a height — used to count which validators signed a given block (missed-block tracking).

func (*Client) DumpConsensusState

func (c *Client) DumpConsensusState(ctx context.Context) (*coretypes.ResultDumpConsensusState, error)

func (*Client) Health

func (c *Client) Health(ctx context.Context) error

func (*Client) NetInfo

func (c *Client) NetInfo(ctx context.Context) (*coretypes.ResultNetInfo, error)

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*coretypes.ResultStatus, error)

func (*Client) Validators

func (c *Client) Validators(ctx context.Context, height *int64, page, perPage int) (*coretypes.ResultValidators, error)

Validators returns the validator set at a height (paginated).

Jump to

Keyboard shortcuts

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