client

package
v1.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the client for StoreService, P2PService, HealthService, and ConfigService

func NewClient

func NewClient(baseURL string) *Client

NewClient creates a new RPC client

func (*Client) GetBlockByHash

func (c *Client) GetBlockByHash(ctx context.Context, hash []byte) (*pb.GetBlockResponse, error)

GetBlockByHash returns the full GetBlockResponse for a block by hash

func (*Client) GetBlockByHeight

func (c *Client) GetBlockByHeight(ctx context.Context, height uint64) (*pb.GetBlockResponse, error)

GetBlockByHeight returns the full GetBlockResponse for a block by height

func (*Client) GetHealth

func (c *Client) GetHealth(ctx context.Context) (pb.HealthStatus, error)

GetHealth calls the HealthService.Livez endpoint and returns the HealthStatus

func (*Client) GetMetadata

func (c *Client) GetMetadata(ctx context.Context, key string) ([]byte, error)

GetMetadata returns metadata for a specific key

func (*Client) GetNamespace

func (c *Client) GetNamespace(ctx context.Context) (*pb.GetNamespaceResponse, error)

GetNamespace returns the namespace configuration for this network

func (*Client) GetNetInfo

func (c *Client) GetNetInfo(ctx context.Context) (*pb.NetInfo, error)

GetNetInfo returns information about the network

func (*Client) GetPeerInfo

func (c *Client) GetPeerInfo(ctx context.Context) ([]*pb.PeerInfo, error)

GetPeerInfo returns information about the connected peers

func (*Client) GetState

func (c *Client) GetState(ctx context.Context) (*pb.State, error)

GetState returns the current state

Jump to

Keyboard shortcuts

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