aptos-x402 2.2.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.3.0] - 2026-01-17
6
+
7
+ ### 🔴 Breaking Change (V2 Protocol Compliance)
8
+ - **402 Response Format**: Payment requirements now sent via `PAYMENT-REQUIRED` header (base64 JSON) instead of response body
9
+ - **Header Constants**: Added `PAYMENT_REQUIRED_HEADER` export
10
+
11
+ ### ✨ Improvements
12
+ - **Backward Compatibility**: Client (`x402axios`) still reads from body if header is missing (V1 fallback)
13
+ - **Protocol Compliance**: Now fully compliant with official x402 V2 specification
14
+
5
15
  ## [2.2.4] - 2026-01-17
6
16
 
7
17
  ### 🐛 Bug Fixes
package/README.md CHANGED
@@ -30,7 +30,7 @@ Built for **machine-to-machine micropayments**, this SDK provides zero-friction
30
30
  - 🚚 **Header-Based Spec**: Payment specs and proofs handling moved entirely to headers.
31
31
  - ⚡ **Performance**: Significant speed improvements with bug fixes and optimizations.
32
32
 
33
- > ⚡ **Performance:** Latest optimizations deliver **faster settlement** with verification caching, async confirmation, and smart deduplication. See [PERFORMANCE_OPTIMIZATIONS.md](./PERFORMANCE_OPTIMIZATIONS.md) for details.
33
+ > ⚡ **Performance:** Latest optimizations deliver **faster settlement** with verification caching, async confirmation, and smart deduplication.
34
34
 
35
35
  <!-- ## Key Features
36
36
 
@@ -68,25 +68,7 @@ npm install aptos-x402
68
68
  - **TypeScript:** 5.x (recommended)
69
69
  - **Aptos SDK:** 1.26.0 or higher (included as peer dependency)
70
70
 
71
- ---
72
-
73
- ## 🤖 AI-Powered Setup (Cursor IDE)
74
-
75
- Get started in seconds with AI-assisted integration:
76
-
77
- ```bash
78
- mkdir -p .cursor/rules
79
- curl -o .cursor/rules/aptos-x402.mdc https://raw.githubusercontent.com/adipundir/aptos-x402/main/integration/aptos-x402.mdc
80
- ```
81
-
82
- **Restart Cursor IDE**, then ask:
83
- > "Set up Aptos x402 in my Next.js app with payment middleware and a test client component"
84
-
85
- The MDC context file provides Cursor with complete API documentation, types, and examples for accurate code generation.
86
71
 
87
- **Learn more:** [Cursor Integration Guide](./docs/guides/cursor-integration.md)
88
-
89
- ---
90
72
 
91
73
  ## 🛒 Client Integration (Consuming Paid APIs)
92
74