Skip to content

feat(x402): add Bazaar discovery to five GET-query guard routes - #630

Merged
imokokok merged 1 commit into
mainfrom
fix/bazaar-guard-discovery
Nov 17, 2026
Merged

imokokok merged 1 commit into
mainfrom
fix/bazaar-guard-discovery

Conversation

@imokokok

Copy link
Copy Markdown
Owner

Five paid REST routes returned a valid 402 on GET but advertised no Bazaar discovery extension, so CDP validate accepted the quote without listing the resource:

  • /api/v1/safety/hyperliquid-perp-guard
  • /api/v1/safety/monad-perp-guard
  • /api/v1/safety/solana-perp-guard
  • /api/v1/safety/bnb-perp-guard
  • /api/v1/safety/prediction-guard

Each is a read-only, query-param-driven GET guard (POST binds an exact unsigned order where applicable, and stays out of discovery). This PR declares a GET-query Bazaar contract for each and switches their route configs from routeConfigWithoutDiscovery to routeConfigFor.

Tests: official validateDiscoveryExtensionSpec + validateDiscoveryExtension on all five declarations, plus a wire-402 assertion that each route's PAYMENT-REQUIRED header carries extensions.bazaar. Local: tsc clean, 181 x402 tests pass, eslint/prettier clean.

Hyperliquid, Monad, Solana and BNB perp guards plus Prediction Guard returned a valid 402 on GET but advertised no discovery extension, so CDP validate accepted the quote without listing the resource. Declare GET-query Bazaar contracts for all five and switch their route configs from routeConfigWithoutDiscovery to routeConfigFor. Pin each declaration with the official spec/info-vs-schema validators and assert the wire 402 carries bazaar for these routes.
@imokokok
imokokok merged commit db94696 into main Nov 17, 2026
8 checks passed
@imokokok
imokokok deleted the fix/bazaar-guard-discovery branch November 17, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant