Developer Portal
API explorer, SDK references, and protocol documentation for the Attestik Protocol.
Interactive API Explorer
Try every endpoint live. Click to expand, fill parameters, and send requests.
Wire Format Explorer
Paste raw Attestik frame bytes to parse and inspect the binary structure.
SDK Reference
Integration code for WASM, Rust, and CLI. Same operations, three runtimes.
Use the WASM verifier for in-browser verification. The module is ~180KB gzipped and requires no server round-trip. Install via npm:
npm install @attestik/verify
import init, { verify_frame, parse_frame } from '@attestik/verify';
// Initialize WASM module
await init();
// Verify a frame against its media segment
const result = verify_frame(frameBytes, segmentBytes);
console.log(result.overall_state); // 'Verified'
console.log(result.signature_valid); // true
console.log(result.binding_ok); // true
// Parse frame structure without verification
const info = parse_frame(frameBytes);
console.log(info.publisher_id); // hex entity ID
console.log(info.stream_id); // hex stream ID
console.log(info.seq); // segment sequence number
console.log(info.frame_type); // 'Full' | 'Delta' | 'Heartbeat'Test Vectors
Golden test data for validating your implementation. Use these fixed inputs to verify deterministic outputs.
Fixed Inputs
Expected Outputs
Protocol Reference
Wire format specification, verification states, content binding levels, and frame types.
Wire Format
Every Attestik frame follows a fixed binary layout: 8-byte header, variable-length CBOR payload, and 64-byte Ed25519 signature.
+------------------------------------------+
| HEADER (8 bytes) |
| Magic: 0x4154 "AT" | Version: 0x02 |
| Frame Type (1B) | Flags (2B) |
| Payload Length (2B) |
+------------------------------------------+
| CBOR PAYLOAD (variable length) |
| publisher_id : bytes(32) |
| publisher_pk : bytes(32) |
| stream_id : bytes(32) |
| seq : uint |
| timestamp : uint |
| content_bind : { |
| l1_hash: bytes(32) // bitstream |
| l2_hash: bytes(32) // codec-level |
| l3_hash: bytes(32) // distribution |
| } |
| attestations[] : [{ type, data }] |
| prev_frame_hash: bytes(32) |
+------------------------------------------+
| ED25519 SIGNATURE (64 bytes) |
| Sign(header_bytes || cbor_bytes) |
+------------------------------------------+Verification States
Each segment resolves to one of five states based on signature validity, content binding level, and chain integrity.
All segments cryptographically proven. Signature valid, L1 bitstream hash matches, chain intact.
Some segments modified post-stamp. Signature valid on remaining segments, chain broken at modification point.
L1 bitstream hash fails but L2 codec-level hash passes. Content semantically unchanged (e.g., re-muxed).
Ed25519 signature valid, but no content binding data present in frame. Publisher authenticated, content not bound.
Signature invalid or missing. No cryptographic proof of origin or integrity.
Content Binding Levels
Three hash levels provide graduated resilience. Each level survives progressively more transformations.
SHA-256 of exact segment bytes. Detects any byte-level modification including re-encoding, re-muxing, and metadata changes. The gold standard for pristine verification.
SHA-256 over H.264 slice NAL bodies only. Survives re-muxing, parameter set changes, SEI injection/removal, and container format changes.
Byte-distribution histogram fingerprint. Resilient to minor byte modifications, compression artifacts, and limited re-encoding. Used as a fuzzy similarity check.
Frame Types
Three frame types balance completeness against size. A typical stream starts with Full, continues with Delta, and uses Heartbeat for keepalive.
Complete attestation frame. Contains publisher key, stream ID, all content binding levels, attestation metadata, and full signature. Sent at stream start and periodically for resynchronization.
Incremental frame with content binding + prev_frame_hash. Maintains hash chain continuity without repeating publisher identity. Requires a preceding Full frame for context.
Minimal keepalive frame for continuous stream verification. Contains only timestamp, sequence number, and prev_frame_hash. Proves stream is still live and controlled by the signer.