create-python-x402-facilitator-bazaar

Implements Bazaar discovery extensions for Python x402 payment-gated APIs.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Rudhrakoushik10/RootNode --skill create-python-x402-facilitator-bazaar-rudhrakoushik10
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-python-x402-facilitator-bazaar
Source: https://github.com/Rudhrakoushik10/RootNode/tree/main/projects/.opencode/skill/create-python-x402-facilitator-bazaar
Command: npx skills add https://github.com/Rudhrakoushik10/RootNode --skill create-python-x402-facilitator-bazaar-rudhrakoushik10

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires x402-avm, jsonschema, and includes references (resource) components.

What problem does it solve? Payment-gated APIs built with x402 are hard for clients to discover and understand because they lack machine-readable descriptions of their inputs and outputs. This Skill guides you through declaring Bazaar discovery extensions on x402 routes so facilitators can automatically catalog and index your paid APIs. ## Core Features & Use Cases - Discovery Declaration: Use declare_discovery_extension() to describe query parameters for GET routes or JSON bodies for POST routes, with input schemas and output examples. - Facilitator-Side Extraction: Extract and validate discovery info from payment requests using extract_discovery_info() and validate_discovery_extension(). - Framework Integration: Register the bazaar_resource_server_extension on FastAPI or Flask servers and let clients query catalogs via with_bazaar(). - Use Case: You run a weather API gated behind Algorand payments. Declare a Bazaar extension describing the city query parameter and response schema, register the server extension, and facilitators can now index your API so clients discover it by capability. ## Quick Start Ask the AI to add a Bazaar discovery extension to your x402 FastAPI weather route so facilitators can catalog the payment-gated endpoint.

Frequently Asked Questions about create-python-x402-facilitator-bazaar

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Bazaar discovery to an x402 route in Python?▼

Call declare_discovery_extension() with an input example, input_schema, and optional OutputConfig, then spread the result into your RouteConfig extensions dict. Register bazaar_resource_server_extension on your x402ResourceServer so the HTTP method is injected at runtime.

How do facilitators extract discovery info from x402 payment requests?▼

Use extract_discovery_info() with the payment payload and payment requirements, optionally setting validate=True. It returns a DiscoveredResource with the resource URL, HTTP method, and discovery info, or None if no Bazaar extension is present.

Does Bazaar discovery work with both FastAPI and Flask?▼

Yes, Bazaar discovery works with both frameworks. FastAPI uses x402ResourceServer with PaymentMiddlewareASGI, while Flask uses x402ResourceServerSync with the payment_middleware function; both register the same bazaar_resource_server_extension.

Why does declare_discovery_extension need body_type for POST routes?▼

The body_type parameter distinguishes query-based extensions from body-based ones. The default None creates a query extension for GET, HEAD, or DELETE, while "json", "form-data", or "text" creates a body extension for POST, PUT, or PATCH routes.

What causes the ImportError for jsonschema with x402 Bazaar?▼

The jsonschema package is only installed via the extensions extra. Install it with pip install "x402-avm[extensions]" or combine it with framework extras like "x402-avm[extensions,avm,fastapi]".

Is Bazaar discovery tied to a specific blockchain network?▼

No, Bazaar discovery is chain-agnostic. The same metadata applies whether clients pay via Algorand (AVM), EVM, or SVM networks, so a single extension declaration works for multi-chain route configurations.