Provider — Overview
Become a Sylan API Provider in minutes using the Provider SDK + Express adapter + CLI.
A Provider runs a lightweight HTTP service (your gateway). For each API request that Sylan Nodes pick up on-chain, your gateway produces a Snapshot of the response, signs it with EIP‑712 using your provider signer key, and returns a compact JSON payload that nodes can verify and relay to APIConsensus.
What you ship
- Your business logic (fetch/compute the payload)
- A single Express route per endpoint, with
res.locals.data = { ... } - The Sylan wrap middleware takes care of: hashing, seq/TTL, EIP‑712 signing, and JSON response shape.
Key ideas
- Content‑addressed integrity:
contentHash = keccak256(canonicalStringify(payload)) - Deterministic sequencing: monotonic or hash‑change sequence numbers (stored locally)
- Time bounds: optional TTL; nodes enforce timestamp skew and expiry
Last updated on