SwissLedger Merkle
On-chain Merkle root registry with off-chain verifier client.
Description
Merkle verifier contract and local client that builds and rotates a single on-chain active root. Keeps only the latest valid Merkle root on-chain (activeRoot), with an owner-managed allowlist of updater addresses that can publish the next root. Supports raw-hash verification via contains(...), canonical leaf-hash verification via containsLeafHash(...), and batch checks via containsMany(...). On-chain storage does not grow with the number of updates, and old proofs stop working as soon as a new root replaces the previous one — ideal for hash-only allowlists, revocation sets and expiration sets. Compatible with OpenZeppelin StandardMerkleTree parity and includes Solidity tests, Node client tests, parity vectors and a local Anvil smoke flow.
Requirements
- ✓ Node.js + npm
- ✓ Foundry (forge, anvil)
- ✓ GNU Make
Installation
# Download the bundle curl -LO https://github.com/LuganoPlanB/swissledger-merkle/archive/refs/heads/main.zip # Extract and start tar -xzf swissledger-merkle-Latest.tar.gz cd swissledger-merkle && ./install.sh