Support x402 v1 402s (requirements in the body, X-PAYMENT header)
@franciscorodr26 đang làm issue này rồi.
Từ ngày 7/10/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 56/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- payments
Hướng nghiên cứu
Start by reading the x402 response parsing and payment-header handling, then inspect test/real-merchants.test.ts for the existing v2 fixtures and tests. Add tests for the captured v1 responses and verify opt-in parsing, strict rejection of unknown keys, v1 payment headers, and refusal of a wrong payee or higher price before signing; the issue does not name the implementation files.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Why
Some live merchants on Base still speak x402 v1: the requirements come only in the JSON body (x402Version: 1, network: "base", maxAmountRequired) and they expect an X-PAYMENT header back. Seen on 2026-10-07: Neynar, SLAMai (CryptoSlam) and Browserbase. Today the SDK refuses these 402s (no PAYMENT-REQUIRED header).
What
- Opt-in v1 compatibility (
policy.acceptV1: true): parse the v1 body into the samePaymentRequirementsshape (mapbase→eip155:8453,maxAmountRequired→amount), then run exactly the same policy checks. - Send the payment as v1
X-PAYMENTfor those merchants; read the receipt fromX-PAYMENT-RESPONSE(already supported). - Strict schemas as for v2; unknown keys rejected.
Acceptance
- Unit tests with the captured v1 402s (see
test/real-merchants.test.tsfor the v2 ones). - A v1 402 asking for a different payee or a higher price is refused before signing, same as v2.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 3 giờ 51 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DeepFirstHQ/deepfirstsearch
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
guard: a documented way to pin the payee for clients that expose only a custom fetch or walletĐang mởenhancement help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
-
good first issue integration
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
help wanted integration
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
-
enhancement good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
Tất cả issue của DeepFirstHQ/deepfirstsearch
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
polarsource/polar#15580 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accepted bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
pingdotgg/t3code#20931 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug/1-unconfirmed kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ranxianglei/billion-context#3583 ·
Maintainer thường phản hồi trong vòng 1 ngày