pandora

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 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 PandoraClient

type PandoraClient interface {
	ChainID(ctx context.Context) (*big.Int, error)
	InsertConsensusInfo(ctx context.Context, curEpoch types.Epoch, validatorPubKeys []string, epochStartTime uint64) (bool, error)
	Close()
}

type RPCClient

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

Client defines typed wrappers for the Ethereum RPC API.

func Dial

func Dial(ctx context.Context, rawurl string) (*RPCClient, error)

Dial connects a client to the given URL.

func DialContext

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

func NewClient

func NewClient(c *rpc.Client) *RPCClient

NewClient creates a client that uses the given RPC client.

func (*RPCClient) ChainID

func (ec *RPCClient) ChainID(ctx context.Context) (*big.Int, error)

ChainId retrieves the current chain ID for transaction replay protection.

func (*RPCClient) Close

func (ec *RPCClient) Close()

func (*RPCClient) InsertConsensusInfo

func (ec *RPCClient) InsertConsensusInfo(ctx context.Context,
	curEpoch types.Epoch, validatorPubKeys []string, epochStartTime uint64) (bool, error)

Jump to

Keyboard shortcuts

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