Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultEndpoint = fmt.Sprintf("http://localhost:%d", seiconfig.PortRPC)
DefaultEndpoint is the local CometBFT RPC address.
Functions ¶
This section is empty.
Types ¶
type NodeStatus ¶
NodeStatus holds the fields we care about from CometBFT /status.
type StatusClient ¶
type StatusClient struct {
// contains filtered or unexported fields
}
StatusClient queries a CometBFT node's /status endpoint.
func NewStatusClient ¶
func NewStatusClient(endpoint string, httpClient *http.Client) *StatusClient
NewStatusClient creates a client targeting the given RPC endpoint. Pass "" for the default localhost endpoint.
func (*StatusClient) Endpoint ¶
func (c *StatusClient) Endpoint() string
Endpoint returns the configured RPC endpoint.
func (*StatusClient) LatestHeight ¶
func (c *StatusClient) LatestHeight(ctx context.Context) (int64, error)
LatestHeight is a convenience wrapper returning just the height.
func (*StatusClient) Status ¶
func (c *StatusClient) Status(ctx context.Context) (*NodeStatus, error)
Status queries the node and returns the parsed status.
Click to show internal directories.
Click to hide internal directories.