volaryclient

package
v0.0.0-...-985cc99 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 9 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 {
	ethclient.Client
	// contains filtered or unexported fields
}

Client extends Ethereum API client with typed wrappers for the Volary API.

func Dial

func Dial(rawurl string) (*Client, error)

Dial connects a client to the given URL.

func DialContext

func DialContext(ctx context.Context, rawurl string) (*Client, error)

func NewClient

func NewClient(c *rpc.Client) *Client

NewClient creates a client that uses the given RPC client.

func (*Client) GetEpochStats

func (ec *Client) GetEpochStats(ctx context.Context, epoch *big.Int) (map[string]interface{}, error)

GetEpochStats returns epoch statistics. * When epoch is -2 the statistics for latest epoch is returned. * When epoch is -1 the statistics for latest sealed epoch is returned.

func (*Client) GetEvent

func (ec *Client) GetEvent(ctx context.Context, h hash.Event) (e inter.EventI, err error)

GetEvent returns Lachesis event by hash or short ID.

func (*Client) GetEventPayload

func (ec *Client) GetEventPayload(ctx context.Context, h hash.Event, inclTx bool) (e inter.EventI, txs []common.Hash, err error)

GetEvent returns Lachesis event by hash or short ID.

func (*Client) GetHeads

func (ec *Client) GetHeads(ctx context.Context, epoch *big.Int) (hash.Events, error)

GetHeads returns IDs of all the epoch events with no descendants. * When epoch is -2 the heads for latest epoch are returned. * When epoch is -1 the heads for latest sealed epoch are returned.

Jump to

Keyboard shortcuts

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