Repository navigation
docs(routes): document dynamic pricing model and webhook verification/retries - #1223
letstokenize wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
The latest commit fixes both of my earlier nits, and I found no other bugs. A human should still confirm that the new webhook and pricing claims match the live service, because nothing in this repo can back them up.
What was reviewed:
- The Python verifier now checks
isascii()beforeisdigit()and compares bytes, so malformed headers returnFalse. The heading now reads "Binding and indicative quotes". - The new Webhooks "Guide" link in
vocs.config.tsis the only sidebar entry for the page. - Not checked: the header names,
whsec_secret format, retry and backoff schedule, auto-disable threshold, replay window and pricing model. No local spec or source mentions them, so a reviewer has to compare them against the service.
Extended reasoning...
This docs-only change adds a 355-line webhooks guide with HMAC-SHA256 verifier samples and a sidebar link. It also expands the Routes quotes and delivery pages with pricing, subsidy and status-field guidance. It changes no runtime code. The only security-sensitive part is the verifier sample code that readers will copy into their own receivers. I deferred because the page makes many concrete claims about protocol behavior, limits and pricing, and no OpenAPI spec or source in the checkout confirms them.
Summary
src/pages/docs/routes/quotes.mdx: Document the dynamic, quote-based Routes pricing model (variable route/liquidity cost, chain-specific settlement/withdrawal costs, and live exchange rates for cross-asset pairs), contrast binding transfer quotes (destinationAmountMin,quote.expiresAt) with indicative unsubsidized deposit-address estimates, clarify what to show end users (sourceAmount,destinationAmount,fees[]), and explain 1:1 delivery viasubsidize: true.src/pages/docs/api/webhooks-guide.mdx&vocs.config.ts: Publish a canonical Tempo Webhooks guide under Data API › Webhooks › Guide covering subscriptions/scopes, headers (tempo-event-id,tempo-event-type,tempo-signature), event types (routes:transfer.updated,routes:deposit.updated, onchain events,ping), ordering and reconciliation (data.version,data.updatedAt, credit only oncompleted), exact HMAC-SHA256 verification (TypeScript, Python, Go) with a verified canonical test vector, zero-downtime secret rotation,POST /v1/webhooks/{id}/ping, retryable vs. non-retryable failures, backoff schedule (up to 30 attempts), auto-disable at 20 net failures, and 7-day manual replay.src/pages/docs/routes/delivery.mdx: Cross-link the new webhooks guide from Routes delivery tracking.Verification
pnpm check(Biome + styles + oxlint)pnpm check:typespnpm check:anchors(798 links across 315 pages)pnpm og:goldens:checkpnpm test(80 test files, 1,777 tests passing, including sidebar coverage and SEO metadata)pnpm build&pnpm check:markdown(0 findings, 347 pages audited)node:crypto) and Python (hmac/hashlib)