{"criteria_id":"payer-preflight/v1","criteria_revision":"1.0.0","family":"payer-preflight","op":"check","ops_not_offered":[],"corpus":{"id":"funding-check-corpus/v1","sha256":"d6608308c21291275b1c263b578d74fc866df0e202482cbbd8e09c3f9baf98a6"},"corpus_pin_definition":"The corpus pin is the SHA-256 of the corpus's canonical serialization (the corpus object excluding its sha256 field), computed and verifiable by the published harness (harness.mjs). Expected outputs inside corpus cases are derived from the criteria text by an independent implementation in gen-corpus.mjs (never the engine's code path), and each case labels its provenance (constructed from on-disk fleet records vs synthetic).","price":{"usdc_units_per_call":10000,"label":"$0.01","basis":"per check"},"free_tier":{"per_day":100,"min_interval_ms":5000,"on_exhaustion":"402"},"input_contract":{"body":"One JSON request body: { wallet_address, challenge, client_mode?, linked_wallet_address?, caller? (free pre-check only) }. challenge carries network, scheme, asset, amount_required, and optionally asset_symbol and facilitator.","caps":{"body_bytes":262144},"over_cap":"A request body over 262,144 bytes is a free pre-gate refusal naming the cap.","validation":"The submission is validated FREE, before any payment: the published refusal order (request_not_object, challenge_missing, network_not_supported, wallet_address_invalid, scheme_not_supported, asset_invalid, amount_invalid, client_mode_invalid, facilitator_invalid, asset_symbol_invalid, linked_wallet_invalid). A malformed submission fails free and never consumes a payment. The chain reads and the readiness verdict are computed only after payment verification (or a verified-marker resume)."},"supported_networks":["solana","base"],"schemes_by_network":{"solana":["exact"],"base":["exact","exact-permit2","upto"]},"permit2_contract":"0x000000000022D473030F116dDEE9F6B43aC78BA3","ata_creation_cost_lamports":2039280,"missing_order":["network_match","exact_asset","sufficient_balance","permit2_approval","native_gas","ata_creation"],"precondition_table":[{"row":"evm-exact-eip3009","network_kind":"evm","scheme":"exact","permit2_approval_needed":false,"native_gas_needed":"only for direct-broadcast clients","ata_creation":"not applicable","provenance":"402-frictions lane-1 F-12 (fleet record on disk, 2026-11-03): EIP-3009 exact is gasless for the payer — the payer signs off-chain and the facilitator broadcasts transferWithAuthorization and pays gas."},{"row":"evm-upto","network_kind":"evm","scheme":"upto","permit2_approval_needed":true,"native_gas_needed":"for the approval transaction, unless the facilitator sponsors it","ata_creation":"not applicable","provenance":"402-frictions lane-1 F-12, citing the Katara docs statement recorded there: upto is Permit2-only — before the first payment, one approval of Permit2 for the asset, vs nothing for exact."},{"row":"evm-exact-permit2","network_kind":"evm","scheme":"exact-permit2","permit2_approval_needed":true,"native_gas_needed":"for the approval transaction, unless the facilitator sponsors it","ata_creation":"not applicable","provenance":"402-frictions lane-1 F-12, citing the Aomi x402 reference recorded there: tokens without EIP-3009 go through Permit2, which requires a prior on-chain approve (native gas)."},{"row":"direct-broadcast-any","network_kind":"any","scheme":"any","permit2_approval_needed":"per scheme row","native_gas_needed":true,"ata_creation":"per network row","provenance":"402-frictions lane-1 F-12, citing the Zynd SDK note recorded there: clients that broadcast a transfer themselves need native gas beside the payment asset (ETH on EVM; SOL on Solana)."},{"row":"solana-exact","network_kind":"solana","scheme":"exact","permit2_approval_needed":false,"native_gas_needed":"only for direct-broadcast clients (the facilitator is otherwise the fee payer)","ata_creation":"needed when the wallet has no associated token account for the required mint; cost is the Solana rent-exempt minimum for a token account, 2039280 lamports","provenance":"402-frictions lane-1 F-12, citing the PayAI pricing docs recorded there (Solana ATA setup is a separate priced cost); the lamport figure is the Solana rent-exempt parameter for a 165-byte token account."}],"facilitator_table":[{"facilitator":"cdp","sponsors_permit2_approval":true,"provenance":"CDP Facilitator docs, 2026-11-02, as recorded in 402-frictions lane-1 F-12: CDP sponsors the initial Permit2 (EIP-2612) approval as an extension, so buyers do not need native gas."},{"facilitator":"payai","sponsors_permit2_approval":null,"provenance":"NOT-PUBLISHED — no sponsorship statement found in the on-disk record (402-frictions folder, 2026-11-03); the absence is reported, never filled in."},{"facilitator":"x402.org","sponsors_permit2_approval":null,"provenance":"NOT-PUBLISHED — same basis as the payai row."},{"facilitator":"other","sponsors_permit2_approval":null,"provenance":"NOT-PUBLISHED — same basis as the payai row."},{"facilitator":"not-named","sponsors_permit2_approval":null,"provenance":"NOT-PUBLISHED — the challenge names no facilitator."}],"submission_contract":"Submission contract: one JSON object { wallet_address, challenge, client_mode? }. wallet_address is a Solana public key (base58, 32-44 chars) when the challenge network is solana, or an EVM address (0x + 40 hex) when it is base. challenge.network is one of the supported networks (solana = Solana mainnet; base = Base mainnet, eip155:8453); any other value is refused free (network_not_supported) — the check never guesses a network. challenge.scheme: on solana, exact; on base, one of exact (EIP-3009), exact-permit2 (a token without EIP-3009, paid through Permit2), or upto (Permit2-only). challenge.asset is the asset's contract address (base) or mint (solana) — the identity the check matches; a ticker symbol is never an identity. challenge.asset_symbol is optional (a non-empty string when present): the ticker the challenge carries, used only for the published diagnoses, never to pass. challenge.amount_required is a positive integer string in the asset's atomic units. challenge.facilitator is optional (a non-empty string when present) and is graded against the published sponsorship table under the published normalisation (contains cdp or coinbase -> cdp; contains payai -> payai; contains x402.org -> x402.org; anything else -> other; absent -> not-named). client_mode is optional: facilitator (the default — the facilitator broadcasts and pays network fees) or direct-broadcast (the payer's own client broadcasts the transfer itself, so the payer needs native gas). linked_wallet_address is optional: the same operator's wallet on the other supported network, read only for the network diagnosis; when absent, the other-network reading is empty and the diagnosis grades accordingly — it is never guessed.","refusal_rule":"Malformed submissions — named FREE refusals, checked in this order, each a free 400 refusal naming the failure: request_not_object (the body is not one JSON object); challenge_missing (challenge absent or not an object); network_not_supported; wallet_address_invalid (not a valid address for the declared network); scheme_not_supported; asset_invalid (not a valid mint/contract for the network); amount_invalid (not a positive atomic integer string); client_mode_invalid; facilitator_invalid; asset_symbol_invalid; linked_wallet_invalid (a linked wallet that is not a valid address for the other supported network). Error bodies are closed-form: static strings plus the refusal code only — no part of a submission is interpolated into any error.","readiness_rule":"Readiness rules: the chain reading covers the challenge's network for the submitted wallet, and the other supported network for the submitted linked wallet when one is supplied; the challenge's network decides the verdict and the other network is read only for the network diagnosis. Asset identity is contract/mint equality: the exact-asset balance is the balance held under the challenge's exact asset value. Identity grades: EXACT-MATCH (a holding under the exact asset exists); TICKER-MATCH-ONLY (no exact holding, but a holding under a different asset carrying the challenge's stated symbol holds at least the required amount — a ticker match never passes: bridged or namesake tokens do not satisfy a native-asset challenge); OTHER-ASSET-ONLY; ABSENT. Network grade: MATCH when the exact asset is held sufficiently on the challenge network; ASSET-ON-OTHER-NETWORK when it is not, but the other supported network holds at least the required amount of the exact asset or of an asset carrying the challenge's stated symbol (a diagnosis, never a pass); otherwise NO-ASSET-FOUND. Balance: found_atomic (the exact-asset balance on the challenge network, 0 when absent) vs required_atomic, exact integer comparison, no rounding. Verdict: READY when the missing list is empty, else NOT-READY with the missing list naming exactly what is missing. Factors are printed per check; there is no composite score, grade, or band anywhere in this op.","missing_rule":"The missing list (published vocabulary, published order): network_match (network grade is ASSET-ON-OTHER-NETWORK); exact_asset (no holding under the exact asset on the challenge network); sufficient_balance (an exact holding exists but is below required); permit2_approval; native_gas; ata_creation. The list contains exactly the items that fail, in this order, and nothing else.","precondition_rule":"Precondition grading: permit2_approval is NOT-NEEDED when the scheme needs no Permit2; APPROVED when the wallet's existing Permit2 allowance for the asset is at least the required amount; SPONSORED-BY-FACILITATOR when it is needed, not yet approved, and the named facilitator's published table row says it sponsors the approval; otherwise NEEDED (a missing item). native_gas: gas is needed when the client broadcasts directly, or when a Permit2 approval is NEEDED (the approval is itself an on-chain transaction); then COVERED when the wallet holds any positive native balance — the check grades presence, not sufficiency for a specific gas quote, because no gas price is read — or NEEDED (a missing item) when the native balance is zero; otherwise NOT-NEEDED. ata_creation (Solana only; NOT-APPLICABLE on base): EXISTS when the wallet's associated token account for the required mint exists, else NEEDED (a missing item) with ata_creation_cost_lamports printed; an exact-asset balance held in a non-associated token account does not clear this precondition — the standard payer flow sources the ATA.","chain_read_line":"Chain reads: one-off at check time, for the submitted wallet on the challenge's network and for the linked wallet (when supplied) on the other network — the wallet's token holdings under that network (Solana: every token account, so a ticker namesake is visible as a different mint; Base: the challenge asset's balanceOf — on the other network, the native USDC contract's), the native balance (lamports / wei), the Permit2 allowance for the challenge asset (Base only), and ATA existence for the required mint (Solana only). Where a holding's symbol is known (token metadata / the published mint table) it is carried in the reading for the diagnosis; where it is not known, the diagnosis grades ABSENT, never a guess. Public chain state for a submitted public address only; no other data is read.","verdict_grammar":{"line":"FUNDING READINESS — <READY|NOT-READY> — <network> · <scheme> — missing: <comma list or none>","vocabulary":"The line carries the verdict and the missing-item codes; readiness factors are printed in the report body. There is no composite score, grade, or band anywhere in this op."},"free_precheck":"The free pre-check (POST /precheck) validates the submitted wallet + challenge under the published contract and returns assessability ONLY: the common signed fields, whether the submission is assessable (or the free refusal naming the failure), the submission-shape facts (network, scheme, client mode), and the honesty/retention lines. It returns no chain read, no readiness factor, and no verdict. Free allowance: 100 per day per caller wallet, minimum interval 5,000 ms, 402 on exhaustion.","custody":{"construction":"In-memory processing within a single request lifetime; the queried wallet, the submitted challenge, and every chain-reading value persist nowhere, on any path including errors.","ledger_closed_fields":["payer wallet","timestamp/day","price (USDC units) with the CAD fair-market-value block (rate, rate date, basis, cad_pending, refund)","payment tx id + Solana fee (lamports)","criteria version","verdict line","readiness verdict (READY / NOT-READY)","house flag"],"ledger_note":"The ledger list above is closed: adding a field is a criteria/handling version change. The ledger NEVER carries the queried wallet address, the challenge, or any chain-reading value; the verdict line carries network, scheme, and missing-item codes only.","errors":"Error handling is closed-form: static strings plus refusal codes only. No error path interpolates any part of a submission or a chain reading."},"forbidden":"Forbidden in every surface of this op (report, pre-check, errors, ledger, metrics): any composite score or grade; any retained or re-emitted queried wallet address outside the signed delivery; any ticker-based asset pass (identity is contract/mint equality only); any facilitator sponsorship stated beyond the published table; any estimated balance or allowance (a value the reading does not carry is graded as found: absent/zero).","boundary_statement":"Boundary vs C1 Payment Payload Pre-flight (payer-preflight/v1, op payload): C1 lints a signed-or-unsigned payment payload artefact; C4 reads wallet state against a challenge — different input, different evidence. Boundary vs C3 Facilitator Fit Check (same family): C3 grades the facilitator (its published /supported, its credit state); C4 grades the payer's wallet and reads the facilitator only for its published sponsorship row. Boundary vs B1 Settlement Verification (settlement-evidence/v1): B1 verifies a payment that already happened by reading the chain per payment; C4 checks whether a payment could be made at all — pre-flight, not post-hoc.","honesty_line":"The check reports public chain state as read at check time for the address submitted; it states what the reading found and nothing about any other wallet, any other network, or any later state. A READY verdict states funding and precondition readiness under the published table — it is not a guarantee that a facilitator will settle, and it never upgrades a facilitator's unpublished sponsorship into a fact.","retention":"Store-nothing: the queried wallet address, the submitted challenge, and every chain-reading value are processed in memory only and are never stored — not in KV, not in logs, not in the payments ledger, not in metrics, and not in error records. The signed delivery is the only surface carrying the queried address, because it is the answer the buyer paid for. The payments ledger records only the closed field list published in the criteria, and its verdict line carries network, scheme, and missing-item codes only, by construction. Because nothing is kept, a paid retry re-submits the wallet and challenge.","payment_includes":"$0.01 per funding check. The payment includes: one funding-and-gas readiness check of the wallet address and challenge you submit — one-off public chain reads on the supported networks reporting whether the wallet holds the exact asset named by the challenge (matched by contract address or mint, never by ticker) on the exact network, in at least the required amount, plus the scheme's published preconditions (Permit2 approval, native gas, facilitator sponsorship of the approval, Solana ATA creation) — returned as one signed report with every readiness factor printed and, when the wallet is not ready, the missing items named exactly. There is no composite score. A free pre-check validates the submission's shape before any payment and returns no readiness verdict. The check is one-off and store-nothing: nothing about the queried wallet is retained; the service's own payments ledger is the fleet-standard closed list and never carries the queried address.","kill_line":"Kill line (M-28 / C4, under the operator's 2026-11-03 build-bank-hold doctrine): build, bank, and hold; judged at the fleet's periodic reviews. There is NO demand kill line for this item. Day-0 = first outside paid settle (accounting only; house proofs never count). Tripwires, all stop-and-review: (1) refunds >5% in any 30-day window; (2) free use >10x paid use; (3) a wrong verdict from undisclosed stale or partial data (the error enters the corpus first as a regression case, corrected rules publish as a new criteria version, the corpus re-passes at 100% before serving resumes; issued reports are never amended); (4) store-nothing breach: any surface retaining or emitting the queried wallet address outside the signed delivery itself.","never":"This op never stores a queried wallet address or a chain reading; never passes an asset on a ticker match; never reads any network beyond the two supported networks; never computes a composite score; never states a facilitator sponsorship the published table does not carry; never charges for a malformed submission.","service":"funding-check","version":"1.0.0","endpoints":{"criteria":"GET /criteria (free)","precheck":"POST /precheck (free, submission validation + assessability only: no chain read, no readiness factor, no verdict)","check":"POST /check (paid, $0.01 per check: signed funding & gas readiness report)","metrics":"GET /metrics","not_offered":"Any other POST path answers NOT COVERED — this worker serves op check only."}}