ethrpc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ForkchoiceUpdatedMethodV3 = "engine_forkchoiceUpdatedV3"
	GetPayloadMethodV4        = "engine_getPayloadV4"
	NewPayloadMethodV4        = "engine_newPayloadV4"
	ExchangeCapabilities      = "engine_exchangeCapabilities"
	GetClientVersionV1        = "engine_getClientVersionV1"
	GetChainConfig            = "engine_getChainConfig"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*ethclient.Client
}

Client defines typed wrappers for the Ethereum RPC API.

func DialContext

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

DialContext connects a client to the given URL with context.

func (*Client) ExchangeCapabilities

func (ec *Client) ExchangeCapabilities(ctx context.Context, caps []string) ([]string, error)

func (*Client) ForkchoiceUpdatedV3

func (ec *Client) ForkchoiceUpdatedV3(ctx context.Context, update *engine.ForkchoiceStateV1, params *engine.PayloadAttributes) (engine.ForkChoiceResponse, error)

func (*Client) GetChainConfig

func (ec *Client) GetChainConfig(ctx context.Context) (*params.ChainConfig, error)

func (*Client) GetClientVersionV1

func (ec *Client) GetClientVersionV1(ctx context.Context, info engine.ClientVersionV1) ([]engine.ClientVersionV1, error)

func (*Client) GetPayloadV4

func (ec *Client) GetPayloadV4(ctx context.Context, payloadID engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error)

func (*Client) NewPayloadV4

func (ec *Client) NewPayloadV4(ctx context.Context, params *engine.ExecutableData, blobHashes []common.Hash, beaconRoot common.Hash, requests [][]byte) (*engine.PayloadStatusV1, error)

type EngineClient

type EngineClient interface {
	ForkchoiceUpdatedV3(ctx context.Context, update *engine.ForkchoiceStateV1, params *engine.PayloadAttributes) (engine.ForkChoiceResponse, error)
	GetPayloadV4(ctx context.Context, payloadID engine.PayloadID) (*engine.ExecutionPayloadEnvelope, error)
	NewPayloadV4(ctx context.Context, params *engine.ExecutableData, versionedHashes []common.Hash, beaconRoot common.Hash, requests [][]byte) (*engine.PayloadStatusV1, error)
	ExchangeCapabilities(ctx context.Context, caps []string) ([]string, error)
	GetClientVersionV1(ctx context.Context, info engine.ClientVersionV1) ([]engine.ClientVersionV1, error)
	GetChainConfig(ctx context.Context) (*params.ChainConfig, error)
}

Jump to

Keyboard shortcuts

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