dflow-proof-kyc
DFlow Proof
Proof is DFlow's identity-verification primitive for Solana wallets. Stripe Identity verifies the person once; Proof links that verified identity to one or more wallet addresses. Builders query a public endpoint to check status.
There are two reasons to integrate it:
- Self-gating your own app — any product that needs identity-based KYC (jurisdiction-gated DeFi, regulated token sales, identity-attested access, etc.) can use Proof as a ready-made primitive.
- Kalshi PM trading on DFlow — DFlow's Trading API requires Proof for Kalshi prediction-market buys. This skill is also where the matching error handling lives.
Prerequisites
- DFlow docs MCP (
https://pond.dflow.net/mcp) — install per the repo README. This skill is the recipe; the MCP is the reference. Look up the deep-link signing code, the full parameter list, and user-journey diagrams viasearch_d_flow/query_docs_filesystem_d_flow— don't guess. dflowCLI (optional, only relevant for Kalshi-trading use) — install per the repo README.
Part I — Proof as a generic primitive (self-gating)
Use this path when you need KYC for your own app, independent of Kalshi.
Check verification status
GET https://proof.dflow.net/verify/{address} → { "verified": boolean }. Public, no auth. Use it to gate features, to decide whether to show a "Verify me" CTA, or to short-circuit a restricted action.
Redirect the user to verify (deep link)
If the wallet isn't verified, redirect the user to Proof's hosted flow. The deep link carries a signed ownership proof so Proof can link the wallet to the verified identity automatically:
- URL:
https://dflow.net/proof?wallet=<addr>&signature=<sig>×tamp=<ms>&redirect_uri=<url> - Optional:
email,projectId. - Signature: user signs the exact message
Proof KYC verification: {timestamp}(Unix ms, 13 digits) with their wallet; base58-encode the bytes. - Full signing snippet and parameter table → docs MCP, or read directly:
/build/proof/partner-integration.
Handle the return
User lands back on your redirect_uri. Re-query /verify/{address} to confirm status. If verified: true, proceed; otherwise, surface an appropriate "verification pending / failed" message.
Part II — Kalshi PM trading (Trading API enforcement)
DFlow's Trading API enforces Proof only on Kalshi PM buys. Not sells, not redemptions, not spot, not quotes.
Three patterns, each maps to a user intent:
- Proactive UX gate — at session start, call
/verify/{address}, cache the result, and conditionally show the "Buy" button. Best UX; same primitive as Part I. - Reactive fallback — if the proactive check was skipped or is stale,
/orderwill reject unverified buys withunverified_wallet_not_allowed(API) /PROOF_NOT_VERIFIED(CLI). Both error envelopes carrydetails.deepLink— redirect the user straight to it, then retry the buy after they return verified. (The CLI auto-opens the browser itself and prints the deepLink for headless environments.) - Quote-before-KYC — omit
userPublicKeyfromGET /orderto preview pricing without verification. Lets unverified users see what a buy would cost before committing to KYC.
What to ASK the user (and what NOT to ask)
Ask if missing:
- What are they using Proof for? Self-gating their own app / Kalshi PM trading / both.
- Self-gating → only
/verify/{address}+ deep-link flow matters. Skip trade-API error handling. - Kalshi trading → same flow, plus handle
unverified_wallet_not_allowed/PROOF_NOT_VERIFIED+details.deepLinkat/ordertime. - Both → superset of the Kalshi path.
- Wallet pubkey — the address to verify / check.
- App's callback URL (
redirect_uri) — where Proof sends the user after verification. - Web or native mobile — changes the redirect_uri guidance (universal / app links for mobile; see Gotchas).
Do NOT ask about:
- API key —
/verify/{address}is public, no auth. Proof itself has no API key concept. - RPC / signing for trading — that's
dflow-kalshi-trading. This skill just does the verification piece.
Gotchas (the docs MCP won't volunteer these)
- Proof is enforced on Kalshi PM buys, not spot swaps. Don't state "all DFlow trades need KYC" — they don't.
- Buys only, not sells or redemptions. Even on Kalshi, selling an outcome token or redeeming a winner needs no KYC.
- Proof doesn't verify age. Stripe Identity captures name, address, email, and government-issued ID, but Proof does not currently check or expose date-of-birth. Don't use Proof for age gating — you won't get what you need.
- Enforced on both dev and prod. Many agents assume dev is unprotected; it isn't.
- Proof is usable outside Kalshi. Don't default to thinking "Proof = Kalshi KYC" — any builder who needs identity-gating can use it. Same primitive, same endpoint.
- Redirect URI scheme restrictions. Proof only redirects to
https:,chrome-extension:, andmoz-extension:URLs. Custom schemes (myapp://callback) fail silently — no redirect, no error. Native mobile → universal links (iOS) / app links (Android), which arehttps:URLs that deep-link into the app. - The public endpoint is booleanized.
/verify/{address}returns{ verified: true | false }. There's nopending/failed/unverifieddistinction — everything non-verified collapses tofalse. If you need those states for UX, infer them from your own session state (did the user come back from Proof?), not from the public check. - Cache
true, notfalse. Once verified, a wallet stays verified; caching avoids the per-trade check. But unverified is volatile — never cache it, because it flips the moment the user completes the flow. - For Kalshi buys, DFlow is authoritative.
/orderchecks verification server-side internally, so you don't need your own backend re-check just to gate a buy — the API won't let an unverified wallet through either way. Client-side caching is fine purely as a UX hint (to hide the Buy button). - For self-gating your own app, verify server-side. If your backend is the thing enforcing a KYC-gated feature (not DFlow's API), don't trust a client's cached status. Re-query
/verify/{address}from your backend before unlocking the gated action. - Embedded wallets work. Privy, Turnkey, etc., as long as the wallet supports
signMessage. - One verified identity → unlimited wallets. No cap. A user who verified on wallet A can link wallet B, C, D, and onward without re-doing ID + liveness — just a fresh ownership signature from each new wallet.
- Free + Stripe Identity under the hood. No fee to builders or users. Users complete Stripe's document + liveness flow.
- Proof is not geoblocking. KYC ≠ jurisdictional restriction. Kalshi PM trading requires both — geoblocking logic lives inline in
dflow-kalshi-trading, not here.
When something doesn't fit
Defer to the docs MCP for full reference — specifically:
/build/proof/partner-integration— deep-link code (signature generation, URL building), caching sample, handling edge cases (signature expiration, user cancellation, network errors), security guidance./build/proof/user-journeys— diagrams for new-direct, new-from-partner, and returning-user flows./build/proof-api/verify-address— the single public endpoint's reference./build/faqs— Proof + embedded wallets, Proof + dev endpoints, redirect debugging.
Sibling skills
dflow-kalshi-trading— places the actual orders that require Proof. Geoblocking policy also lives here.dflow-kalshi-portfolio— view positions / P&L (no Proof required for reading).dflow-spot-trading— non-Kalshi swaps; no Proof required, ever.
More from dflowprotocol/dflow-skills
dflow-spot-trading
Swap any pair of Solana tokens via DFlow. Use when the user wants to trade, swap, or convert tokens on Solana, get a price quote, build a swap UI, tune priority fees so a swap lands under congestion, or build a gasless / sponsored swap where the app pays fees. Covers both the `dflow` CLI and the DFlow Trading API. Do NOT use for Kalshi prediction-market YES/NO trades or builder-side platform fees.
21dflow-platform-fees
Monetize a DFlow integration by collecting a builder-defined fee on trades your app routes through the Trade API — either a fixed percentage (spot + PM) via `platformFeeBps`, or a probability-weighted dynamic fee (PM outcome tokens only) via `platformFeeScale`. Use when the user asks "how do I take a cut of trades?", "add a builder fee", "monetize my swap UI", "charge a platform fee", "how does platformFeeBps / platformFeeScale work?", or "where do my fees get paid?". Do NOT use to run a trade itself (use `dflow-spot-trading` or `dflow-kalshi-trading` — both also cover priority fees and sponsored / gasless flows).
21dflow-kalshi-market-data
Read market data for a known Kalshi prediction market on DFlow — orderbook, trades, top-of-book prices, candlesticks, forecast-percentile history, and Kalshi in-game live data — via one-shot REST snapshots, historical ranges, or live WebSocket streams. Use when the user asks "show me the orderbook for X", "get last hour of trades", "build a live price ticker", "stream orderbook depth", "pull 1-minute candles for the last day", "watch in-game scores for this sports market", or "alert me when the orderbook moves". Do NOT use to discover markets matching a criterion (use `dflow-kalshi-market-scanner`), to place orders (use `dflow-kalshi-trading`), or to read a user's own positions/P&L (use `dflow-kalshi-portfolio`).
21dflow-kalshi-trading
Buy, sell, or redeem YES/NO outcome tokens on Kalshi prediction markets via DFlow. Use when the user wants to bet on an event, place a Kalshi order, take a YES or NO position, exit a Kalshi position, redeem winning outcome tokens after a market resolves, tune priority fees on a PM trade, or build a gasless / sponsored PM flow where the app pays tx / ATA / market-init costs. Covers both the `dflow` CLI and the DFlow Trading API. Do NOT use to discover markets, view positions, stream prices, complete Proof KYC, or for non-Kalshi spot swaps.
20dflow-kalshi-portfolio
View what a wallet holds on DFlow's Kalshi prediction markets — current positions, unrealized mark-to-market, realized P&L, activity history, and redeemable winners. Use when the user asks "what are my positions?", "what do I own?", "am I up or down?", "what's my fill history?", "what can I redeem?", "mark my portfolio to market", or "show me this wallet's DFlow activity". Read-only. Do NOT use to place sells or redemptions (use `dflow-kalshi-trading`), for market-wide data unrelated to a wallet (use `dflow-kalshi-market-data`), or to discover new markets (use `dflow-kalshi-market-scanner`).
20dflow-kalshi-market-scanner
Find Kalshi prediction markets on DFlow that match a criterion — arbitrage (YES+NO<$1), cheap long-shots, near-certain short-dated plays, biggest movers, widest spreads, highest volume, closing soonest, and series/event-level scans. Use when the user asks "where's the free money?", "any mispriced markets?", "cheap YES with volume", "what moved today?", "markets closing soon", "cheapest YES in this event", "top markets by volume", or "alert me when X happens" (streaming). Do NOT use to place orders (use `dflow-kalshi-trading`), to view a user's own positions (use `dflow-kalshi-portfolio`), or for general live-data plumbing unrelated to a scan (use `dflow-kalshi-market-data`).
20