Skip to content

Verifying Proofs

Independently verify receipt proofs from webhook payload data.

When you receive a delta.verified webhook, you can validate proof integrity without trusting any single system.


Proof Payload Fields

Example payload fragment:

json
{
  "proof": {
    "proofHash": "0x8f3a9b...",
    "contentHash": "0x2d4e7f...",
    "itemHashes": ["0x2d4e7f...", "0x9f1a..."],
    "previousProofHash": "0x1c7b2e..."
  }
}

Verification Steps

1) Confirm Content Fingerprint Presence

Ensure contentHash is included in itemHashes.

javascript
const { contentHash, itemHashes } = webhookData.proof;
if (!itemHashes.includes(contentHash)) {
  throw new Error('Content fingerprint not found in proof set');
}

2) Confirm Receipt Fingerprint

Compare webhook proofHash with the receipt value you stored from emit.

javascript
if (webhookData.proof.proofHash !== storedReceiptId) {
  throw new Error('Proof fingerprint mismatch');
}

3) Validate Chain Continuity (Optional)

If you store prior proofs, compare previousProofHash.

javascript
if (storedPreviousProofHash &&
    webhookData.proof.previousProofHash !== storedPreviousProofHash) {
  throw new Error('Proof chain continuity failed');
}

Verification Summary

CheckConfirms
itemHashes contains contentHashYour record is included
proofHash equals stored receipt valueReceipt proof matches
previousProofHash continuityNo sequence tampering