Skip to content

Explore Bazaar support for Stellar on x402-foundation/x402 #50

Description

@marcelosalloum

Bazaar is the AI-agent discovery layer built on top of the x402 protocol — a machine-readable catalog that indexes x402-compatible API endpoints (URLs, prices, accepted payment methods, and input/output schemas) so AI agents can autonomously discover, pay for, and consume APIs without manual setup or API keys.

Bazaar is shipped as @x402/extensions and provides:

  • withBazaar — wraps an x402-protected route with structured metadata describing inputs, outputs, and schema so AI agents can discover and invoke it
  • bazaarResourceServerExtension — registers the resource server with the Bazaar discovery network
  • declareDiscoveryExtension / extractDiscoveryInfo — HTTP and MCP extension points for agent-facing discovery
  • Discovery endpoints: https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources (prod) and https://x402.org/facilitator/discovery/resources (testnet)

Current State

@x402/extensions/bazaar is pulled into this repo as a dependency (via @x402/express), but it is not wired up for Stellar. The Dockerfile comments explicitly note: @x402/extensions dynamic import is in a try/catch (bazaar not used).

Upstream Status

Stellar support is fully merged upstream. The x402 protocol repo has moved to x402-foundation/x402 and PR #711 merged the complete @x402/stellar package, including:

  • ExactStellarScheme for client, server, and facilitator
  • Soroban auth-entry signing and SEP-41 token support
  • Network identifiers (stellar:testnet, stellar)
  • Fee sponsorship via fee-bump transactions
  • Full integration into the all_networks examples and e2e test suite

This unblocks Bazaar integration for Stellar.

Goal

Wire up Bazaar support in this repo now that @x402/stellar is available upstream — enabling Stellar-backed x402 endpoints to be discoverable and invocable by AI agents through the Bazaar network.

Tasks

  • Upgrade dependencies to pick up the published @x402/stellar and latest @x402/extensions from x402-foundation/x402
  • Audit the current @x402/extensions Bazaar API — confirm withBazaar is payment-network-agnostic (not EVM-coupled)
  • Determine the path for independent (non-CDP) facilitators to register with the Bazaar discovery index
  • Wire up withBazaar on the examples/simple-paywall/server Stellar routes
  • Evaluate exposing a /discovery/resources endpoint from this repo's facilitator, compatible with the Bazaar spec
  • Update the Dockerfile to remove the bazaar not used comment once wired

Context

The @x402/extensions package lives in the x402-foundation/x402 monorepo. Bazaar listing for Stellar may still require CDP facilitator support for Stellar settlement — this should be validated as part of the work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AIAI-related workecosystemx402 ecosystem integrationenhancementNew feature or requestx402Work to be done on the coinbase/x402 repo or ecosystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions