Gateway POST /rpc/42161
+ TAP-Receipt: { signed EIP-712 receipt }
│
▼
TAP middleware
- recover signer from EIP-712 signature
- check sender is in authorized_senders
- check timestamp not stale (configurable window)
- persist receipt to tap_receipts table (async)
│
▼
Parse JSON-RPC method + params
│
▼
Forward to backend Ethereum client (chain_id → backend URL mapping)
│
▼
Sign response attestation:
keccak256(chainId || method || paramsHash || responseHash || blockNumber || blockHash)
│
▼
Return JSON-RPC response
+ X-Dispatch-Attestation: <signature>