Skip to main content

OpenGhostVault

The commit and reveal orchestrator for the Open Protocol. Functions similarly to CommitRevealVault but for public data commitments.

Address: 0x45B022fEB169AF906CaBa8086c977AA7b15faAf1

Key differences from CommitRevealVault

FeatureCommitRevealVaultOpenGhostVault
PrivacyUnlinkable commits and revealsPublic reveals
Token operationsBurns and mints tokensData commitments (no token movement)
Merkle treeCommitmentTreeOpenCommitmentTree
Nullifier registryNullifierRegistryOpenNullifierRegistry
Root updaterghost-root-updateropen-ghost-root-updater

Usage

The OpenGhostVault is used for data commitments where the data itself will be revealed publicly. The Merkle tree provides:

  • Ordering — commitments have a verifiable insertion order
  • Integrity — the root proves the complete set of commitments
  • Existence proofs — prove a specific commitment exists without revealing all data

Example: query the open tree

# Get current root of the open commitment tree
cast call 0xE2b33dB178d6201EDd854ED9163B30dcfECC0c48 \
"getLastRoot()(bytes32)" \
--rpc-url https://testnet.specterchain.com

# Get number of open commitments
cast call 0xE2b33dB178d6201EDd854ED9163B30dcfECC0c48 \
"nextIndex()(uint256)" \
--rpc-url https://testnet.specterchain.com