@peac/adapter-x402 0.11.2 → 0.12.0-preview.1

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.
Files changed (2) hide show
  1. package/README.md +19 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -95,6 +95,25 @@ Select the matching accept entry. Throws `X402Error` on failure.
95
95
 
96
96
  Map an x402 payment flow to a PEAC interaction record.
97
97
 
98
+ ## x402 Version Support
99
+
100
+ This adapter supports x402 **Offer/Receipt extension version 1** (default).
101
+
102
+ | Component | Versions | Details |
103
+ | ----------------------- | ------------ | --------------------------------------------------------- |
104
+ | Offer/Receipt extension | v1 (default) | Configurable via `supportedVersions` option |
105
+ | HTTP header dialect | v1 + v2 | Auto-detected by `@peac/rails-x402` via `detectDialect()` |
106
+
107
+ The version is configurable per call:
108
+
109
+ ```typescript
110
+ const result = verifyOffer(offer, accepts, acceptIndex, {
111
+ supportedVersions: ['1', '2'],
112
+ });
113
+ ```
114
+
115
+ The adapter defines its own x402 types (no external x402 npm dependencies). If x402 v2 introduces new required payload fields, update the adapter types and add conformance vectors.
116
+
98
117
  ## Error handling
99
118
 
100
119
  All verification functions return structured results with error arrays.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peac/adapter-x402",
3
- "version": "0.11.2",
3
+ "version": "0.12.0-preview.1",
4
4
  "description": "x402 offer/receipt verification, term-matching, and PEAC record mapping",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@peac/kernel": "0.11.2",
23
- "@peac/schema": "0.11.2",
24
- "@peac/adapter-core": "0.11.2"
22
+ "@peac/adapter-core": "0.12.0-preview.1",
23
+ "@peac/kernel": "0.12.0-preview.1",
24
+ "@peac/schema": "0.12.0-preview.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^22.19.11",