Skip to main content

Session Vaults

Session vaults provide temporary, session-based batching for interactive applications. A session collects multiple operations and submits them as a batch when the session ends.

How it works

  1. Open a session — create a temporary vault for a user session
  2. Collect operations — queue commits and reveals during the session
  3. Close session — submit all queued operations as a batch to the BatchCommitRevealVault
  4. Settle — the batch is processed and roots are updated

Use cases

  • Interactive privacy — users make multiple commit/reveal operations in a browsing session
  • Payment batching — collect multiple payments and settle them in batch
  • Gas optimization — amortize transaction costs across multiple operations

Architecture

The SessionVault acts as a buffer, collecting operations before submitting them to the batch system.