Skip to content

Receipt Service

The Receipt Service validates attestations and maintains the ordered transparency log.

Purpose

  • Validation: 7-phase atomic validation pipeline
  • Merkle tree: Ordered, verifiable attestation log
  • Receipts: Cryptographic proofs of inclusion
  • Persistence: Durable attestation storage

7-Phase Validation

  1. Schema validation - Verify structure
  2. Epoch validation - Check current epoch
  3. Identity verification - Verify sidecar
  4. Co-epoch attestation - Cross-verify with witness
  5. Monotonic counter - Ensure ordering
  6. Merkle append - Add to tree atomically
  7. Persistence - Store and return proof

Submission Endpoint

const response = await fetch('https://receipts.glacis.io/api/v1/attestations', {
method: 'POST',
headers: {
'Authorization': 'Bearer wt_abc123...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
epochId: 'epoch_2024010112',
level: 'L0',
blindedId: 'base64...',
requestCommitment: 'sha256...',
signature: 'base64...'
})
});

Receipt Response

{
"attestationId": "att_xyz789",
"merkleProof": {
"root": "0x...",
"index": 1247,
"siblings": ["0x...", "0x..."]
}
}

Error Codes

CodeDescription
EPOCH_EXPIREDAttestation references old epoch
IDENTITY_MISMATCHSignature doesn’t match sidecar
COUNTER_REPLAYMonotonic counter violation

Next Steps