val active : unit -> bool

Returns true if the batcher was started for this node.

Retrieve an L2 transaction from the queue.

List all queued transactions in the order they appear in the queue, i.e. the message that were added first to the queue are at the end of list.

val register_transaction : ?eager_batch:bool -> ?apply:bool -> L2_transaction.t -> L2_transaction.hash Tezos_base.TzPervasives.tzresult Lwt.t

register_transaction ?apply state tx registers a new L2 transaction tx in the queue of the batcher for future injection on L1. If apply is true (defaults to true), the transaction is applied on the batcher's incremental context. In this case, when the application fails, the transaction is not queued. A batch is injected asynchronously if a full batch can be constructed and eager_batch is true.

val batch : unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Create L2 batches of operations from the queue and pack them in an L1 batch operation. The batch operation is queued in the injector for injection on the Tezos node.

Notifies a new L2 head to the batcher worker.

val shutdown : unit -> unit Lwt.t

Shutdown the batcher, waiting for the ongoing request to be processed.