You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The onramp's gate is pluggable since decdn/sponsord#19 (sponsord_onramp::gate::Gate), with Turnstile as the only built-in. Publishers who already know their users (a signed-in session, a purchase) want to gate on that without writing Rust.
Proposal
ONRAMP_GATE=webhook: on POST /v1/fund, the onramp POSTs to the publisher's endpoint and allows the request on 2xx.
ONRAMP_WEBHOOK_URL, plus ONRAMP_WEBHOOK_SECRET[_FILE] for an HMAC-SHA256 signature header over the body, so the publisher can verify the call came from their onramp.
Request body: {"client": "0x..", "proof": "<what the page posted>", "client_ip": "..."}. proof is opaque to the onramp (a session cookie value, a one-time code, ...).
The gate page: ONRAMP_GATE_TEMPLATE is required for this gate, since only the publisher knows how their page obtains a proof (e.g. a redirect from their site carrying a code).
Timeouts and non-2xx map to gate_failed; transport errors to internal.
Done when
WebhookGate implements Gate, with tests against wiremock (allow, deny, bad signature config, timeout).
docs/operator.md and docs/integrator.md describe it.
Activity
fix(sponsord): re-send a hashless topUp once its nonce is vacant (#2573)