Data Structures
This page provides detailed technical schemas for the core data structures used in the ATL Protocol.
1. Checkpoint (Binary Wire Format)
Before signing, a Checkpoint must be serialized into a strict 98-byte binary blob to ensure byte-for-byte consistency across different implementations.
Offset Size Field Encoding
------ ---- ----- --------
0 18 Magic Bytes "ATL-Protocol-v1-CP" (ASCII)
18 32 Origin ID SHA256 of Instance UUID (binary)
50 8 Tree Size u64 little-endian
58 8 Timestamp u64 little-endian (Unix nanoseconds)
66 32 Root Hash SHA256 root of Merkle tree (binary)
------ ----
Total: 98 bytes2. Evidence Receipt (JSON)
The Evidence Receipt is the primary unit of proof. It is a JSON file (standard extension .atl) that contains the entry data and the cryptographic proof of its inclusion.
{
"spec_version": "1.0.0",
"entry": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"payload_hash": "sha256:e3b0c442...",
"metadata": {
"filename": "contract.pdf",
"type": "legal-agreement"
}
},
"proof": {
"tree_size": 1450,
"root_hash": "sha256:7f83b165...",
"leaf_index": 142,
"inclusion_path": [
"sha256:a1b2...",
"sha256:c3d4..."
],
"checkpoint": {
"origin": "sha256:9988...",
"tree_size": 1450,
"root_hash": "sha256:7f83...",
"timestamp": 1704067200000000000,
"key_id": "sha256:4433...",
"signature": "base64:SGVsbG8..."
},
"consistency_proof": {
"from_tree_size": 1200,
"path": [
"sha256:e5f6...",
"sha256:a7b8..."
]
}
},
"anchors": [
{
"type": "rfc3161",
"timestamp": "2026-01-04T12:00:00Z",
"token_der": "base64:MIAGCS..."
},
{
"type": "bitcoin",
"data": "base64:AE9wZW5..."
}
]
}3. Merkle Leaf Construction
ATL leaves are constructed with a domain separation prefix to prevent second-preimage attacks.
LeafHash = SHA-256(
0x00 || // Prefix (1 byte)
PayloadHash || // 32 bytes
MetadataHash // 32 bytes
)Where MetadataHash is the SHA-256 of the JCS-canonicalized (RFC 8785) metadata JSON object.
Last updated on