Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
Transactions []Tx
}
Batch is a collection of transactions
type BatchVerifier ¶
type BatchVerifier interface { // VerifyBatch verifies a batch of transactions received from the sequencer // RollupId is the unique identifier for the rollup chain // BatchHash is the cryptographic hash of the batch to verify // returns a boolean indicating if the batch is valid and an error if any from the sequencer VerifyBatch(ctx context.Context, req VerifyBatchRequest) (*VerifyBatchResponse, error) }
BatchVerifier provides a method for verifying a batch of transactions received from the sequencer
type GetNextBatchRequest ¶ added in v0.2.0
GetNextBatchRequest is a request to get the next batch of transactions from sequencer to rollup
type GetNextBatchResponse ¶ added in v0.2.0
GetNextBatchResponse is a response to getting the next batch of transactions from sequencer to rollup
type Sequencer ¶
type Sequencer interface { SequencerInput SequencerOutput BatchVerifier }
Sequencer is a generic interface for a rollup sequencer
type SequencerInput ¶
type SequencerInput interface { // SubmitRollupTransaction submits a transaction from rollup to sequencer // RollupId is the unique identifier for the rollup chain // Tx is the transaction to submit // returns an error if any from the sequencer SubmitRollupTransaction(ctx context.Context, req SubmitRollupTransactionRequest) (*SubmitRollupTransactionResponse, error) }
SequencerInput provides a method for submitting a transaction from rollup to sequencer
type SequencerOutput ¶
type SequencerOutput interface { // GetNextBatch returns the next batch of transactions from sequencer to rollup // RollupId is the unique identifier for the rollup chain // LastBatchHash is the cryptographic hash of the last batch received by the rollup // MaxBytes is the maximum number of bytes to return in the batch // returns the next batch of transactions and an error if any from the sequencer GetNextBatch(ctx context.Context, req GetNextBatchRequest) (*GetNextBatchResponse, error) }
SequencerOutput provides a method for getting the next batch of transactions from sequencer to rollup
type SubmitRollupTransactionRequest ¶ added in v0.2.0
SubmitRollupTransactionRequest is a request to submit a transaction from rollup to sequencer
type SubmitRollupTransactionResponse ¶ added in v0.2.0
type SubmitRollupTransactionResponse struct { }
SubmitRollupTransactionResponse is a response to submitting a transaction from rollup to sequencer
type VerifyBatchRequest ¶ added in v0.2.0
VerifyBatchRequest is a request to verify a batch of transactions received from the sequencer
type VerifyBatchResponse ¶ added in v0.2.0
type VerifyBatchResponse struct {
Status bool
}
VerifyBatchResponse is a response to verifying a batch of transactions received from the sequencer