@integraledger/lcp-binding-evm-x402 0.15.1 → 0.16.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 +54 -1
- package/README.md +1 -1
- package/dist/adapter.d.ts +2 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +2 -1
- package/dist/adapter.js.map +1 -1
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +10 -1
- package/dist/manifest.js.map +1 -1
- package/package.json +4 -4
- package/src/adapter.ts +2 -1
- package/src/manifest.ts +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @integraledger/lcp-binding-evm-x402
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 62e2b3e: `weldGrades` is keyed by x402's own asset-transfer-method token, not by the escrow sibling's collector name.
|
|
8
|
+
|
|
9
|
+
The manifest declared `weldGrades: { ERC3009: "signature" }`. Every other rail keys this map in its host's
|
|
10
|
+
vocabulary — `spl-memo`, `invoice-id`, `cap67-mux`, `tx-metadata`, `settle-payment` — and this rail's
|
|
11
|
+
vocabulary is x402's `assetTransferMethod`, which this package exports as
|
|
12
|
+
`EIP3009_TRANSFER_METHOD = "eip3009"` and which x402's exact-EVM scheme spells the same way. `ERC3009` is
|
|
13
|
+
the Commerce Payments Protocol COLLECTOR name that `binding-evm-escrow` declares, where it is correct.
|
|
14
|
+
|
|
15
|
+
Here it named nothing, so a consumer doing `manifest.weldGrades[assetTransferMethod]` got `undefined` —
|
|
16
|
+
the grade absent rather than wrong, which reads as a rail that declares no weld grade at all. The key is
|
|
17
|
+
now the constant itself, so the manifest and the filter cannot spell it differently.
|
|
18
|
+
|
|
19
|
+
**This changes published behaviour**: the manifest key, and the published `integra-x402-nonce-v1` profile
|
|
20
|
+
in the corpus, move from `ERC3009` to `eip3009`. Escrow's collector names are untouched. The corpus root
|
|
21
|
+
moves to `c2875add14f5f2bf…`.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- feab885: Five README examples that failed on their first line, and a gate that runs the examples.
|
|
26
|
+
|
|
27
|
+
Each was the first thing a stranger runs, on the npmjs landing page:
|
|
28
|
+
|
|
29
|
+
- `binding-evm-x402` opened with `getX402Deployment("base-sepolia-usdc")`; the keys are `base`,
|
|
30
|
+
`base-sepolia`, `avalanche`, `monad`. It threw.
|
|
31
|
+
- `discovery` told the reader to read `hashesAgree`; the field is `hashesMatch`, so the documented read is
|
|
32
|
+
`undefined` — falsy — and records a MISMATCH for a hash that matched, the exact defect the two-field
|
|
33
|
+
design exists to prevent.
|
|
34
|
+
- `placement-ucp`'s only usage example refused `ucp/terms-url-missing`: this protocol declares a terms-URL
|
|
35
|
+
slot, so an integrity-bearing reference needs one, and every sibling README passes it.
|
|
36
|
+
- `placement-ack` claimed a `url` carrier in the canonical slot "passes `requireIntegrity`". It did when
|
|
37
|
+
written; `requireIntegrity` now checks the value's type as well as the slot's declared class and returns
|
|
38
|
+
`undefined`. The narrower point that survives is stated instead.
|
|
39
|
+
- `binding-canton` documented a DAR filename, `lcp-anchor-0.9.0.dar`, that no build produces —
|
|
40
|
+
`daml.yaml` carries the package version, gated by a test. Both the README and `daml.yaml`'s own comment
|
|
41
|
+
now write the version as a glob, because a pinned number inside a copyable command goes stale at the
|
|
42
|
+
next bump and had already done so twice.
|
|
43
|
+
|
|
44
|
+
The mechanism behind all five is that `check:docs` COMPILES fences and never runs them. `check:doc-calls`
|
|
45
|
+
runs the subset that can be run — a call of a workspace export whose every argument is a literal — and
|
|
46
|
+
refuses a throw or a returned `Refusal`. It also reads the inversion: a line the document annotates
|
|
47
|
+
`// throws` or `// refuses` must fail, so a demonstration that quietly starts succeeding is caught too.
|
|
48
|
+
Elided arguments (`"0x…"`) and calls inside a `try` are skipped as structurally not assertions. It refuses
|
|
49
|
+
an empty subject set, and it runs 30 calls across 74 fences today.
|
|
50
|
+
- Updated dependencies [2fd5eb2]
|
|
51
|
+
- Updated dependencies [bb48020]
|
|
52
|
+
- @integraledger/lcp-binding-evm-common@0.16.0
|
|
53
|
+
- @integraledger/lcp-binding-core@0.16.0
|
|
54
|
+
- @integraledger/lcp-kernel@0.16.0
|
|
55
|
+
|
|
3
56
|
## 0.15.1
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|
|
@@ -148,7 +201,7 @@ and a large number of documentation claims were corrected against the host speci
|
|
|
148
201
|
First public release.
|
|
149
202
|
|
|
150
203
|
`0.9.0` is deliberate: this is a release candidate for 1.0, not a preview. The implementation is complete
|
|
151
|
-
against LCP
|
|
204
|
+
against the published LCP specification and certified by the conformance corpus, and the remaining distance to 1.0 is the
|
|
152
205
|
specification's own — the standard is still moving through its steering committee, and this package will not
|
|
153
206
|
claim a stability its protocol has not yet promised.
|
|
154
207
|
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ declare const payTo: string;
|
|
|
27
27
|
declare const ports: VerifierPorts; // your viem-backed ChainReader + ArtifactResolver
|
|
28
28
|
declare const txHash: `0x${string}`;
|
|
29
29
|
|
|
30
|
-
const d = getX402Deployment("base-sepolia
|
|
30
|
+
const d = getX402Deployment("base-sepolia"); // one of: base, base-sepolia, avalanche, monad
|
|
31
31
|
const adapter = createX402Adapter({
|
|
32
32
|
chainId: d.chainId,
|
|
33
33
|
asset: d.asset,
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The x402 `exact` / EIP-3009 WeldAdapter (LCP `LCP-X402-EVM-NONCE-1`). Built on the live
|
|
3
3
|
* (`lcp-x402-reference`, 114 tests) onto binding-core's `WeldAdapter` contract, with the typed-data
|
|
4
|
-
* machinery reused from `binding-evm-common` (viem
|
|
4
|
+
* machinery reused from `binding-evm-common` (viem is confined to the EVM packages, and `depcruise`
|
|
5
|
+
* holds it there — it reaches no non-EVM binding and no placement).
|
|
5
6
|
*
|
|
6
7
|
* - `propose` — build the EIP-3009 authorization + typed-data with `nonce = atrHash` (after the Permit2
|
|
7
8
|
* filter); the payer signs the returned `typedData`.
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAKV,WAAW,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAGtB,MAAM,uCAAuC,CAAC;AAM/C,0GAA0G;AAC1G,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,+FAA+F;IAC/F,KAAK,EAAE,KAAK,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,8FAA8F;AAC9F,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,kGAAkG;IAClG,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,sFAAsF;AACtF,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,oBAAoB,CAAC;IACpC,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AAED,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,WAAW,CA4HxE"}
|
package/dist/adapter.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The x402 `exact` / EIP-3009 WeldAdapter (LCP `LCP-X402-EVM-NONCE-1`). Built on the live
|
|
3
3
|
* (`lcp-x402-reference`, 114 tests) onto binding-core's `WeldAdapter` contract, with the typed-data
|
|
4
|
-
* machinery reused from `binding-evm-common` (viem
|
|
4
|
+
* machinery reused from `binding-evm-common` (viem is confined to the EVM packages, and `depcruise`
|
|
5
|
+
* holds it there — it reaches no non-EVM binding and no placement).
|
|
5
6
|
*
|
|
6
7
|
* - `propose` — build the EIP-3009 authorization + typed-data with `nonce = atrHash` (after the Permit2
|
|
7
8
|
* filter); the payer signs the returned `typedData`.
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EAGrB,qBAAqB,EACrB,KAAK,GACN,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AA+B9C,4DAA4D;AAC5D,MAAM,UAAU,iBAAiB,CAAC,MAAyB;IACzD,OAAO;QACL,QAAQ,EAAE,aAAa;QAEvB,KAAK,CAAC,OAAO,CACX,OAAsB,EACtB,GAAY;YAEZ,MAAM,CAAC,GAAG,GAA0B,CAAC;YACrC,MAAM,OAAO,GAAG,yBAAyB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;YACjE,IAAI,OAAO,KAAK,IAAI;gBAAE,OAAO,OAAO,CAAC;YACrC,+FAA+F;Y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AC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACpB,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAClE,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,eAgC3B,CAAC"}
|
package/dist/manifest.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EIP3009_TRANSFER_METHOD } from "./asset-transfer-method-filter.js";
|
|
1
2
|
/**
|
|
2
3
|
* The x402 `exact` / EIP-3009 binding manifest (LCP `LCP-X402-EVM-NONCE-1`).
|
|
3
4
|
*
|
|
@@ -26,7 +27,15 @@ export const X402_MANIFEST = {
|
|
|
26
27
|
note: "instant, final settlement (EIP-3009) — no on-rail reversal; recourse is the record's elected forum, and finality is never represented as dispute resolution (PAY-3/RCS-5). The atrHash welded as the EIP-3009 nonce MUST be per-transaction: an EIP-3009 nonce is one-time use, so one payer paying twice under the same ATR reproduces the same authorization and the token rejects the second with no LCP-level diagnostic. LCP §6.1 wants a per-transaction ATR anyway.",
|
|
27
28
|
},
|
|
28
29
|
// The payer's EIP-3009 signature commits to the nonce (= atrHash): signature-grade weld.
|
|
29
|
-
|
|
30
|
+
//
|
|
31
|
+
// ⛔ KEYED OFF THIS PACKAGE'S OWN CONSTANT, and it said `ERC3009` until 2026-09-03. Every other rail
|
|
32
|
+
// keys `weldGrades` in its host's vocabulary — `spl-memo`, `invoice-id`, `cap67-mux`, `tx-metadata` —
|
|
33
|
+
// and this rail's is x402's `assetTransferMethod` token, which this package exports as
|
|
34
|
+
// `EIP3009_TRANSFER_METHOD = "eip3009"` and x402's exact-EVM scheme spells the same way. `ERC3009` is
|
|
35
|
+
// the escrow sibling's COLLECTOR name, where it is right and where it came from; here it named nothing,
|
|
36
|
+
// so a consumer's `weldGrades[assetTransferMethod]` lookup answered `undefined` — the grade absent
|
|
37
|
+
// rather than wrong, which reads as a rail that declares no weld grade at all.
|
|
38
|
+
weldGrades: { [EIP3009_TRANSFER_METHOD]: "signature" },
|
|
30
39
|
offCanonical: { profile: "integra-x402-nonce-v1" }, // named profile
|
|
31
40
|
// "welded-settled", not "settled": on this rail the two are one event. The nonce IS the atrHash, so the
|
|
32
41
|
// settlement that fires `AuthorizationUsed` welds in the same log — there is no settled-but-unwelded
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAoB;IAC5C,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE;QACR,OAAO,EAAE,IAAI;QACb,oBAAoB,EAAE,IAAI;QAC1B,gBAAgB,EAAE,IAAI;KACvB;IACD,YAAY,EAAE,UAAU,EAAE,2FAA2F;IACrH,WAAW,EAAE,YAAY,EAAE,gFAAgF;IAC3G,QAAQ,EAAE,+BAA+B;IACzC,QAAQ,EAAE;QACR,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,4cAA4c;KACnd;IACD,yFAAyF;IACzF,EAAE;IACF,oGAAoG;IACpG,sGAAsG;IACtG,uFAAuF;IACvF,sGAAsG;IACtG,wGAAwG;IACxG,mGAAmG;IACnG,+EAA+E;IAC/E,UAAU,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,WAAW,EAAE;IACtD,YAAY,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE,gBAAgB;IACpE,wGAAwG;IACxG,qGAAqG;IACrG,kGAAkG;IAClG,eAAe,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;CAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@integraledger/lcp-binding-evm-x402",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Welds an ATR hash into an x402 instant settlement on any EVM chain.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lcp",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/IntegraLedger/integra-protocol/tree/main/packages/binding-evm-x402#readme",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@integraledger/lcp-binding-core": "0.
|
|
48
|
-
"@integraledger/lcp-binding-evm-common": "0.
|
|
49
|
-
"@integraledger/lcp-kernel": "0.
|
|
47
|
+
"@integraledger/lcp-binding-core": "0.16.0",
|
|
48
|
+
"@integraledger/lcp-binding-evm-common": "0.16.0",
|
|
49
|
+
"@integraledger/lcp-kernel": "0.16.0",
|
|
50
50
|
"viem": "2.55.19"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
package/src/adapter.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The x402 `exact` / EIP-3009 WeldAdapter (LCP `LCP-X402-EVM-NONCE-1`). Built on the live
|
|
3
3
|
* (`lcp-x402-reference`, 114 tests) onto binding-core's `WeldAdapter` contract, with the typed-data
|
|
4
|
-
* machinery reused from `binding-evm-common` (viem
|
|
4
|
+
* machinery reused from `binding-evm-common` (viem is confined to the EVM packages, and `depcruise`
|
|
5
|
+
* holds it there — it reaches no non-EVM binding and no placement).
|
|
5
6
|
*
|
|
6
7
|
* - `propose` — build the EIP-3009 authorization + typed-data with `nonce = atrHash` (after the Permit2
|
|
7
8
|
* filter); the payer signs the returned `typedData`.
|
package/src/manifest.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BindingManifest } from "@integraledger/lcp-binding-core";
|
|
2
|
+
import { EIP3009_TRANSFER_METHOD } from "./asset-transfer-method-filter.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* The x402 `exact` / EIP-3009 binding manifest (LCP `LCP-X402-EVM-NONCE-1`).
|
|
@@ -28,7 +29,15 @@ export const X402_MANIFEST: BindingManifest = {
|
|
|
28
29
|
note: "instant, final settlement (EIP-3009) — no on-rail reversal; recourse is the record's elected forum, and finality is never represented as dispute resolution (PAY-3/RCS-5). The atrHash welded as the EIP-3009 nonce MUST be per-transaction: an EIP-3009 nonce is one-time use, so one payer paying twice under the same ATR reproduces the same authorization and the token rejects the second with no LCP-level diagnostic. LCP §6.1 wants a per-transaction ATR anyway.",
|
|
29
30
|
},
|
|
30
31
|
// The payer's EIP-3009 signature commits to the nonce (= atrHash): signature-grade weld.
|
|
31
|
-
|
|
32
|
+
//
|
|
33
|
+
// ⛔ KEYED OFF THIS PACKAGE'S OWN CONSTANT, and it said `ERC3009` until 2026-09-03. Every other rail
|
|
34
|
+
// keys `weldGrades` in its host's vocabulary — `spl-memo`, `invoice-id`, `cap67-mux`, `tx-metadata` —
|
|
35
|
+
// and this rail's is x402's `assetTransferMethod` token, which this package exports as
|
|
36
|
+
// `EIP3009_TRANSFER_METHOD = "eip3009"` and x402's exact-EVM scheme spells the same way. `ERC3009` is
|
|
37
|
+
// the escrow sibling's COLLECTOR name, where it is right and where it came from; here it named nothing,
|
|
38
|
+
// so a consumer's `weldGrades[assetTransferMethod]` lookup answered `undefined` — the grade absent
|
|
39
|
+
// rather than wrong, which reads as a rail that declares no weld grade at all.
|
|
40
|
+
weldGrades: { [EIP3009_TRANSFER_METHOD]: "signature" },
|
|
32
41
|
offCanonical: { profile: "integra-x402-nonce-v1" }, // named profile
|
|
33
42
|
// "welded-settled", not "settled": on this rail the two are one event. The nonce IS the atrHash, so the
|
|
34
43
|
// settlement that fires `AuthorizationUsed` welds in the same log — there is no settled-but-unwelded
|