grpc

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	input sequencing.SequencerInput,
	output sequencing.SequencerOutput,
	verifier sequencing.BatchVerifier,
	opts ...grpc.ServerOption,
) *grpc.Server

NewServer creates a new gRPC server for the Sequencer service.

Types

type Client

type Client struct {
	pbseq.SequencerInputClient
	pbseq.SequencerOutputClient
	pbseq.BatchVerifierClient
	// contains filtered or unexported fields
}

Client is a gRPC proxy client for DA interface.

func NewClient

func NewClient() *Client

NewClient returns new Client instance.

func (*Client) GetNextBatch

func (c *Client) GetNextBatch(ctx context.Context, lastBatch *sequencing.Batch) (*sequencing.Batch, error)

GetNextBatch returns the next batch of transactions from sequencer to rollup.

func (*Client) Start

func (c *Client) Start(target string, opts ...grpc.DialOption) (err error)

Start connects Client to target, with given options.

func (*Client) Stop

func (c *Client) Stop() error

Stop gently closes Client connection.

func (*Client) SubmitRollupTransaction

func (c *Client) SubmitRollupTransaction(ctx context.Context, rollupId []byte, tx []byte) error

SubmitRollupTransaction submits a transaction from rollup to sequencer.

func (*Client) VerifyBatch

func (c *Client) VerifyBatch(ctx context.Context, batch *sequencing.Batch) (bool, error)

VerifyBatch verifies a batch of transactions received from the sequencer.

Jump to

Keyboard shortcuts

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