1.9 KiB
1.9 KiB
Message flows
1. Create timestamp (async)
- Zapier →
POST https://zappier-edge/v1/timestamp(x-api-key) - zappier-edge meters →
POST middleware/zapier/v1/timestamp - splitter: chain sha256; optional
verae.archive.put - middleware → chain create or existing lookup
- middleware publishes
verae.zapier.jobs.watch{ jobId, tenantId, … } - HTTP 202
{ jobId }back to Zapier - job-poller consumes watch, GET chain status
- On terminal:
verae.zapier.jobs.events - webhook-deliver POSTs Zapier REST Hook if subscribed
2. Wait
Same as (1) but HTTP holds until jobs.events or WAIT_TIMEOUT_MS → { status: pending, jobId }.
3. Hash already registered
Step 4 returns original jobId + original seal. No second chain write. receipts[0].kind = seal. Later archive attaches become receipts[1…] if includeAttached.
4. includeAttached
After seal is known, aggregator publishes verae.archive.query. Each WORM: bloom miss = no packet; hit = verae.archive.reply.<correlationId>. Aggregator merges into wait JSON.
5. Multipart attachments
Splitter emits one archive.put per file (kind: file, contentSha256). Chain never stores bytes.
6. Batch Merkle (bulk summary)
- Zapier →
POST /v1/timestamp/batch(one item per line) - Middleware hashes each item (leaves), builds Merkle tree
- Chain seals only the root
- Each leaf proof →
verae.archive.putkind: treeon a sharded tree node - Central
GET /hashes/{leaf}→ miss (itemizedOnMainChain: false) GET /hashes/{leaf}?includeTree=true→ aggregator broadcastsverae.archive.querykinds=["tree"]- Tree node bloom hit →
archive.reply.<id>with proof; others silent - Response: root seal +
tree-leafreceipt
7. Simulator
packages/verae-zapier-simulator replays flows 1–6 in-process with a trace console, fault injection, and modification suggestions. It does not connect to live NATS.