The configured Groth16 prover.
The prover, or undefined when none was supplied.
Construct a portable engine around an injected chain storage.
Required { chainId, chainStorage }, optional { prover }.
EVM chain ID of the one chain that the storage holds.
Chain storage contract; caller owns its lifecycle (open/close/delete).
Optionalprover?: Groth16ProverGroth16 backend for proof-bearing operations.
Set Logger for Railgun Engine
Logger Function
Drain the data source into the chain storage, returning when
the source reaches its current tip. Resumes from the persisted sync
cursor when one exists, otherwise starts at startBlock or the network's
deployment block. Live sources never reach a natural tip; bound the scan with
endBlock when using one.
Direct engine calls are not serialized. Await each scan before starting
another on the same storage or data source. RailgunClient.scan() provides
a per-client queue.
{ dataSource, startBlock?, endBlock?, onBatch?, persistRailgunTransactions? }.
Source of blocks. The caller owns it; the engine never destroys it.
Inclusive floor used only without a persisted cursor. Must be at or above the network deployment block.
Inclusive ceiling; the scan exits after writing a block at or above this height.
Fired after each batch is committed with the resolved scan start and the highest block number in that batch. Synchronous; throwing aborts the run.
Whether to persist PPOI Railgun transaction rows while denormalizing blocks.
Last block number written, or undefined when the source had
nothing to yield.
Access chain storage without fetching or scanning blocks.
The caller-owned storage, which is already open.
Get MerkleTree by treeNumber
Input treeNumber
Get all the note commitment tree in the engine
Portable RailgunEngine for browser (and any non-Node) runtimes.
Mirrors the Node engine's scan surface but never touches a filesystem or opens databases: the caller constructs a
ChainStorage(for example from@railgun-reloaded/storage/browser) and injects it. The caller owns the storage lifecycle.