@integraledger/lcp-binding-evm-x402 0.9.0 → 0.10.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.
- package/CHANGELOG.md +19 -0
- package/README.md +2 -2
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +5 -4
- package/dist/adapter.js.map +1 -1
- package/dist/constants.d.ts +8 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js.map +1 -1
- package/package.json +4 -4
- package/src/adapter.ts +5 -4
- package/src/constants.ts +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @integraledger/lcp-binding-evm-x402
|
|
2
2
|
|
|
3
|
+
## 0.10.1
|
|
4
|
+
|
|
5
|
+
**0.10.0 was staged and withdrawn before approval; this is that release, re-cut.** The conformance corpus
|
|
6
|
+
was re-sealed after 0.10.0 was staged — its root moved `32fa90a6…` → `28bbf4ef…` when the vector tree was
|
|
7
|
+
brought inside the prose gates — so the staged `lcp-conformance` tarball carried a seal that no longer
|
|
8
|
+
matched the repository. The seal is what proves corpus authenticity to an independent implementer, and a
|
|
9
|
+
published version cannot be replaced, so the whole set was rejected and re-cut rather than shipping one
|
|
10
|
+
package that disagreed with its own source. No version 0.10.0 exists on the registry.
|
|
11
|
+
|
|
12
|
+
Released as part of a flat `0.10.1` across the whole suite. One number describes the set that was built,
|
|
13
|
+
tested and sealed together, so a consumer never has to work out which combination of versions was verified.
|
|
14
|
+
|
|
15
|
+
This package has no source change of its own in this release. What moved across the suite: three exported
|
|
16
|
+
names were corrected before anyone depends on them — `USDC_DECIMALS` became rail-qualified after it was
|
|
17
|
+
found to mean 6 on three rails and 7 on Stellar under one name, `VISA_TAP_PLACEMENT_TIER_A` lost the tier
|
|
18
|
+
it had baked into an identifier, and the memo codecs were named for the carrier they encode. Two wire
|
|
19
|
+
identities were respelled to match the vocabulary they are written into. Five gates were added or widened,
|
|
20
|
+
and a large number of documentation claims were corrected against the host specifications at HEAD.
|
|
21
|
+
|
|
3
22
|
## 0.9.0
|
|
4
23
|
|
|
5
24
|
First public release.
|
package/README.md
CHANGED
|
@@ -78,10 +78,10 @@ convenient one is wrong:
|
|
|
78
78
|
|
|
79
79
|
| Refusal | When |
|
|
80
80
|
|---|---|
|
|
81
|
-
| `x402/not-eip3009-settlement` | The token moved and no `AuthorizationUsed` accompanied it. The payment settled — through the
|
|
81
|
+
| `x402/not-eip3009-settlement` | The token moved and no `AuthorizationUsed` accompanied it. The payment settled — through `permit2` or `erc7710`, the other two asset-transfer methods x402's exact-EVM scheme defines, or another path that carries no payer-controlled nonce — so there is no weld to report. An empty transition list would say the opposite: that nothing settled. |
|
|
82
82
|
| `x402/ambiguous-settlement` | One transaction carries several `AuthorizationUsed` events with *different* nonces and the `SettlementRef` pins no `logIndex`. Answering either one would be a coin flip presented as a recovery. Pin one with `ref.logIndex`. Repeats of the *same* nonce are one weld seen twice, and resolve normally. |
|
|
83
83
|
|
|
84
|
-
`x402/
|
|
84
|
+
`x402/asset-transfer-method-unsupported` is the propose-side counterpart: an offer requesting a non-EIP-3009 transfer
|
|
85
85
|
method is refused before it is signed, rather than settled unwelded.
|
|
86
86
|
|
|
87
87
|
## The inbound re-challenge
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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,YA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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
|
@@ -85,16 +85,17 @@ export function createX402Adapter(config) {
|
|
|
85
85
|
if (events.length === 0) {
|
|
86
86
|
// An empty transition list is a POSITIVE claim: this transaction settled nothing of this asset.
|
|
87
87
|
// That is true only when the token did not move. If it did, the payment settled through a path
|
|
88
|
-
// this binding cannot read the weld from
|
|
89
|
-
// (`x402ExactPermit2Proxy`)
|
|
90
|
-
//
|
|
88
|
+
// this binding cannot read the weld from. x402's exact-EVM scheme defines two such paths, not one:
|
|
89
|
+
// `permit2` (settled through `x402ExactPermit2Proxy`) and `erc7710` (smart-account delegation,
|
|
90
|
+
// verified by simulation). Neither exposes a payer-controlled nonce, which is exactly why
|
|
91
|
+
// `filterAssetTransferMethod` refuses both on the propose side. Answering `[]` here would let the
|
|
91
92
|
// observe side quietly assert the opposite of what the propose side refuses to allow.
|
|
92
93
|
if (assetWasTransferred(logs, config.asset))
|
|
93
94
|
return {
|
|
94
95
|
refused: true,
|
|
95
96
|
haltClass: "verification-failure",
|
|
96
97
|
code: "x402/not-eip3009-settlement",
|
|
97
|
-
detail: `token ${config.asset} was transferred by settlement ${ref.txHash} but it emitted no EIP-3009 AuthorizationUsed — the atrHash weld rides only on the payer-controlled nonce of transferWithAuthorization, so a settlement reached by any other path (
|
|
98
|
+
detail: `token ${config.asset} was transferred by settlement ${ref.txHash} but it emitted no EIP-3009 AuthorizationUsed — the atrHash weld rides only on the payer-controlled nonce of transferWithAuthorization, so a settlement reached by any other path (x402's permit2 and erc7710 asset-transfer methods among them) carries no on-chain weld this binding can report`,
|
|
98
99
|
};
|
|
99
100
|
return { ok: true, value: [] };
|
|
100
101
|
}
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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;YAC/F,0FAA0F;YAC1F,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,qBAAqB,CAAC;gBACzD,OAAO;gBACP,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,EAAE,EAAE,CAAC,CAAC,KAAK;gBACX,KAAK,EAAE,CAAC,CAAC,MAAM;gBACf,UAAU,EAAE,CAAC,CAAC,UAAU;gBACxB,WAAW,EAAE,CAAC,CAAC,WAAW;gBAC1B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,YAAY,EAAE,MAAM,CAAC,YAAY;gBACjC,iBAAiB,EAAE,MAAM,CAAC,KAAK;aAChC,CAAC,CAAC;YACH,OAAO,EAAE,EAAE,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K,EAAE,sBAAsB,CAAC,CAAC,CAAC;gBAChC,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE;gBACvD,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,UAAU;gBACzC,OAAO,EAAE,QAAQ;aAClB,CAAC,CAAU,CAAC;YACb,OAAO,IAAI,CAAC,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/constants.d.ts
CHANGED
|
@@ -40,7 +40,14 @@
|
|
|
40
40
|
* it simply has not been read off-chain by us. Adding a chain means adding a verified row, nothing more.
|
|
41
41
|
*/
|
|
42
42
|
import type { X402AdapterConfig } from "./adapter.js";
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* The deployments whose EIP-712 domain values have been read from their own USDC contract.
|
|
45
|
+
*
|
|
46
|
+
* NOT a list of what x402 supports, in either direction. The specification names far more networks than
|
|
47
|
+
* these four — `eip155:43114` and `eip155:43113` among them — so `avalanche` is a verified domain row on a
|
|
48
|
+
* network x402 does define. (Re-checked at HEAD 2026-08-11: it is the Go SDK's `constants.go` that carries
|
|
49
|
+
* no 43114 entry, not the specification.) Adding a chain means adding a verified row, nothing more.
|
|
50
|
+
*/
|
|
44
51
|
export type X402DeploymentName = "base" | "base-sepolia" | "avalanche" | "monad";
|
|
45
52
|
/**
|
|
46
53
|
* The verified config for a known deployment. Throws on an unknown name (fail-fast): there is no sane
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,cAAc,GACd,WAAW,GACX,OAAO,CAAC;AAoCZ;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAajE;AAED,kFAAkF;AAClF,wBAAgB,mBAAmB,IAAI,kBAAkB,EAAE,CAE1D"}
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAyDA;;;;GAIG;AACH,MAAM,WAAW,GAAkD;IACjE,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,4CAA4C;QACnD,SAAS,EAAE,UAAU;QACrB,YAAY,EAAE,GAAG;KAClB;IACD,qGAAqG;IACrG,qGAAqG;IACrG,cAAc,EAAE;QACd,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,4CAA4C;QACnD,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,GAAG;KAClB;IACD,SAAS,EAAE;QACT,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,4CAA4C;QACnD,SAAS,EAAE,UAAU;QACrB,YAAY,EAAE,GAAG;KAClB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,GAAG;QACZ,KAAK,EAAE,4CAA4C;QACnD,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,GAAG;KAClB;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,oGAAoG;IACpG,iFAAiF;IACjF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC;QAC7C,CAAC,CAAC,WAAW,CAAC,IAA0B,CAAC;QACzC,CAAC,CAAC,SAAS,CAAC;IACd,IAAI,MAAM,KAAK,SAAS;QACtB,MAAM,IAAI,KAAK,CACb,4BAA4B,IAAI,cAAc,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACnF,oGAAoG;YACpG,8FAA8F,CACjG,CAAC;IACJ,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,mBAAmB;IACjC,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAyB,CAAC;AAC1D,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.10.1",
|
|
4
4
|
"description": "Welds an ATR hash into an x402 instant settlement on any EVM chain.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lcp",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"homepage": "https://github.com/IntegraLedger/integra-protocol/tree/main/packages/binding-evm-x402#readme",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"viem": "2.55.11",
|
|
48
|
-
"@integraledger/lcp-binding-core": "0.
|
|
49
|
-
"@integraledger/lcp-kernel": "0.
|
|
50
|
-
"@integraledger/lcp-binding-evm-common": "0.
|
|
48
|
+
"@integraledger/lcp-binding-core": "0.10.1",
|
|
49
|
+
"@integraledger/lcp-kernel": "0.10.1",
|
|
50
|
+
"@integraledger/lcp-binding-evm-common": "0.10.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "24.13.3",
|
package/src/adapter.ts
CHANGED
|
@@ -143,16 +143,17 @@ export function createX402Adapter(config: X402AdapterConfig): WeldAdapter {
|
|
|
143
143
|
if (events.length === 0) {
|
|
144
144
|
// An empty transition list is a POSITIVE claim: this transaction settled nothing of this asset.
|
|
145
145
|
// That is true only when the token did not move. If it did, the payment settled through a path
|
|
146
|
-
// this binding cannot read the weld from
|
|
147
|
-
// (`x402ExactPermit2Proxy`)
|
|
148
|
-
//
|
|
146
|
+
// this binding cannot read the weld from. x402's exact-EVM scheme defines two such paths, not one:
|
|
147
|
+
// `permit2` (settled through `x402ExactPermit2Proxy`) and `erc7710` (smart-account delegation,
|
|
148
|
+
// verified by simulation). Neither exposes a payer-controlled nonce, which is exactly why
|
|
149
|
+
// `filterAssetTransferMethod` refuses both on the propose side. Answering `[]` here would let the
|
|
149
150
|
// observe side quietly assert the opposite of what the propose side refuses to allow.
|
|
150
151
|
if (assetWasTransferred(logs, config.asset))
|
|
151
152
|
return {
|
|
152
153
|
refused: true,
|
|
153
154
|
haltClass: "verification-failure",
|
|
154
155
|
code: "x402/not-eip3009-settlement",
|
|
155
|
-
detail: `token ${config.asset} was transferred by settlement ${ref.txHash} but it emitted no EIP-3009 AuthorizationUsed — the atrHash weld rides only on the payer-controlled nonce of transferWithAuthorization, so a settlement reached by any other path (
|
|
156
|
+
detail: `token ${config.asset} was transferred by settlement ${ref.txHash} but it emitted no EIP-3009 AuthorizationUsed — the atrHash weld rides only on the payer-controlled nonce of transferWithAuthorization, so a settlement reached by any other path (x402's permit2 and erc7710 asset-transfer methods among them) carries no on-chain weld this binding can report`,
|
|
156
157
|
};
|
|
157
158
|
return { ok: true, value: [] };
|
|
158
159
|
}
|
package/src/constants.ts
CHANGED
|
@@ -41,7 +41,14 @@
|
|
|
41
41
|
*/
|
|
42
42
|
import type { X402AdapterConfig } from "./adapter.js";
|
|
43
43
|
|
|
44
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* The deployments whose EIP-712 domain values have been read from their own USDC contract.
|
|
46
|
+
*
|
|
47
|
+
* NOT a list of what x402 supports, in either direction. The specification names far more networks than
|
|
48
|
+
* these four — `eip155:43114` and `eip155:43113` among them — so `avalanche` is a verified domain row on a
|
|
49
|
+
* network x402 does define. (Re-checked at HEAD 2026-08-11: it is the Go SDK's `constants.go` that carries
|
|
50
|
+
* no 43114 entry, not the specification.) Adding a chain means adding a verified row, nothing more.
|
|
51
|
+
*/
|
|
45
52
|
export type X402DeploymentName =
|
|
46
53
|
| "base"
|
|
47
54
|
| "base-sepolia"
|