Blockchain & Merkle Proofs¶
Vargate aggregates audit records into Merkle trees and anchors the tree roots to public blockchains. This creates an independently verifiable, immutable record of governance decisions.
Architecture¶
- Hourly Merkle trees — audit records are grouped into per-tenant Merkle trees every hour
- Inclusion proofs — any record can be proven to exist in a tree with O(log n) proof
- Blockchain anchor — the Merkle root is submitted to a smart contract on-chain
- Verification — anyone can verify the on-chain root matches the local tree root
Supported Chains¶
| Chain | Usage | Explorer |
|---|---|---|
| Polygon | Production (default) | polygonscan.com |
| Ethereum mainnet | High-assurance | etherscan.io |
| Sepolia | Testing | sepolia.etherscan.io |
Configure your chain preference:
curl -X PATCH https://vargate.ai/api/dashboard/settings \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"anchor_chain": "polygon"}'
Endpoints¶
Anchor Status¶
Returns the current state of blockchain anchoring:
{
"network": "polygon",
"connected_chains": ["polygon"],
"contract_address": "0xe742E768...",
"anchor_count": 42,
"last_anchor": {
"merkle_root": "a1b2c3...",
"tx_hash": "0xdef456...",
"block_number": 12345678,
"anchored_at": "2026-04-08T09:00:00Z"
}
}
Verify On-Chain Anchor¶
Compares the local Merkle root against the on-chain value:
{
"verified": true,
"on_chain_root": "a1b2c3...",
"local_root": "a1b2c3...",
"tx_hash": "0xdef456..."
}
Trigger Manual Anchor¶
Manually trigger an anchor cycle (normally runs on schedule):
List Merkle Trees¶
Returns all Merkle trees with their roots and record ranges:
{
"trees": [
{
"tree_index": 0,
"merkle_root": "a1b2c3...",
"record_count": 50,
"from_record_id": 1,
"to_record_id": 50,
"period_start": "2026-04-08T08:00:00Z",
"period_end": "2026-04-08T09:00:00Z"
}
]
}
Inclusion Proof¶
Get a Merkle inclusion proof for a specific audit record:
{
"record_hash": "a1b2c3...",
"merkle_root": "d4e5f6...",
"proof": ["hash1", "hash2", "hash3"],
"verified": true
}
Proof availability
Proofs are only available after the hourly Merkle tree build includes the record.
Consistency Proof¶
Verify consistency between two Merkle tree periods. Proves that the earlier tree is a prefix of the later tree.
Compliance Export¶
Export a complete compliance package containing:
- All audit records in the date range
- Hash chain verification result
- Merkle tree summary
- Blockchain anchor references with explorer links
- Sample inclusion proofs
- Policy snapshot
Supports format=json (default) and format=pdf.
Enterprise artifact
The compliance export is designed for auditors and regulators. The PDF version includes cover page, summary statistics, and tabular data.