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
- Open a session — create a temporary vault for a user session
- Collect operations — queue commits and reveals during the session
- Close session — submit all queued operations as a batch to the BatchCommitRevealVault
- 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.