Conversation
* docs: add llms.txt intro page for AI agents (#256) Add a GitBook-friendly page introducing PolyPay's llms.txt support so non-technical readers can discover the feature and link AI agents to the live playbook. - New page docs/llms-txt-for-agents.md covering what llms.txt is, the live endpoint, the five integration flows it documents, two ways to wire an agent up, and compatibility notes. - Add the page to docs/SUMMARY.md between x402 and Architecture. - Fix stale api.polypay.xyz references in docs/x402-deposits.md to the real api.polypay.pro host. * feat(x402): add Coinbase CDP bazaar deposit route for agentic.market listing (#260) Adds a second x402 deposit endpoint /x402/bazaar/deposit/:multisig that routes through Coinbase CDP facilitator instead of PayAI, so the resource gets indexed in CDP discovery and surfaces on agentic.market. The default /x402/deposit/:multisig path keeps using PayAI (better rate limits, simpler auth) — no UI change. CDP path activates implicitly when CDP_API_KEY_ID is set; otherwise it returns a clear config error. CDP requires Ed25519 JWT signed per-request (2-min TTL), so the service now lazy-imports @coinbase/x402 createAuthHeader to produce the Authorization header. Payment requirements for the CDP path also embed a declareDiscoveryExtension-shaped extensions.bazaar block (strict JSON Schema), without which CDP would settle but not index. Includes scripts/bazaar-bootstrap.ts to produce the first real settlement that triggers CDP indexing — bootstrap must run against a deployed backend (the resource URL ends up in the catalog). Refs #259 --------- Co-authored-by: BoHsuu <115441679+Huygon764@users.noreply.github.com>
…dexed (#266) After the initial bazaar listing rollout, CDP /discovery/merchant?payTo=<addr> still returned not_found even after a successful mainnet settlement. The hand-rolled extensions.bazaar block diverged from @x402/extensions/bazaar.declareDiscoveryExtension in three ways that broke CDP's strict JSON Schema validation: - info.input declared a pathParams field the SDK schema does not allow - schema.required was ['type', 'method'] instead of ['type', 'bodyType', 'body'] - schema.body was a generic { type: 'object' } instead of the body schema Verified the new shape is byte-identical to the SDK output via stable-key JSON compare and validateDiscoveryExtension() passes on both. Also log the EXTENSION-RESPONSES header from CDP settle so silent rejections surface without another 10-min indexing wait. Bootstrap script now loads packages/backend/.env via dotenv so we can invoke it without inline env vars on every run. Refs #259
#267) The previous fix tried to populate `paymentRequirements.extensions.bazaar` for the CDP path. That field is x402 protocol v2; PolyPay still sends `x402Version: 1` to the facilitator, so CDP silently drops the v2 extension (verified: EXTENSION-RESPONSES header on settle returned base64('{}') and `/discovery/merchant?payTo=<addr>` stayed not_found after a successful mainnet settlement). CDP indexes v1 routes when `paymentRequirements.accepts[*].outputSchema` has `input.discoverable: true`. This matches what the x402-express middleware emits for v1 sellers, and is the same shape PayAI already accepts (PolyPay is already listed in facilitator.payai.network/discovery via this exact field). Both v1 and v2 entries are still being indexed in the CDP catalog today (verified directly). Now both PayAI and CDP paths share the same outputSchema. Drops the unused `buildCdpBazaarExtension` helper. Refs #259
CDP Bazaar requires paymentPayload.resource — not just paymentRequirements.resource — to know which URL to catalog. Quote from docs.cdp.coinbase.com/x402/bazaar: "If your service does not appear in CDP Bazaar discovery, ensure at least one successful settlement has completed through the CDP Facilitator with paymentPayload.resource set." The x402 v1 PaymentPayload spec has no resource field, so we only inject it on the CDP path; PayAI keeps the strict-spec payload shape. Verified by: 2 successful Base Sepolia settlements with the previous outputSchema fix completed, but /discovery/merchant?payTo=<addr> stayed not_found 15+ minutes later. Catalog total kept growing during that window, so the indexer pipeline was active — only our entries were dropped, consistent with the missing paymentPayload.resource. Refs #259
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.