@integraledger/lcp-binding-evm-x402 0.9.0 → 0.10.2
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 +70 -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/asset-transfer-method-filter.d.ts +1 -1
- package/dist/asset-transfer-method-filter.js +1 -1
- package/dist/constants.d.ts +21 -9
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/manifest.js +1 -1
- package/dist/manifest.js.map +1 -1
- package/package.json +4 -4
- package/src/adapter.ts +5 -4
- package/src/asset-transfer-method-filter.ts +1 -1
- package/src/constants.ts +21 -9
- package/src/manifest.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @integraledger/lcp-binding-evm-x402
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b2ffecc: Report the class a record actually supports, place a terms URL on UCP, and stop refusing a conformant UCP
|
|
8
|
+
profile — the remediation of the 2026-08-19 conformance re-audit.
|
|
9
|
+
|
|
10
|
+
**`verify` now computes `supportedClass` instead of echoing the claim.** It was `anyFailed ? "TC-0" :
|
|
11
|
+
claimedClass`, so a record proving nothing — no settlement, no acceptance, no authority chain — reported
|
|
12
|
+
whatever class the caller named, while the field's own published docblock promised "what the record
|
|
13
|
+
honestly supports, not what the caller asked for". It is now the highest class every one of whose required
|
|
14
|
+
steps is `proved`, `TC-0` on any failure, computed from the steps alone: neither capped by the claim (rungs
|
|
15
|
+
that reach TC-3 read TC-3 where the caller claimed TC-2) nor lifted by it. White paper #4 §5 defines the
|
|
16
|
+
class of a transaction as "the highest class whose criteria it fully meets", and this is that.
|
|
17
|
+
|
|
18
|
+
The claim is not discarded — the report gains **`claimedClass`**, a required member, because `verified`
|
|
19
|
+
answers "did the record reach the class it claimed?" and cannot be read without it. The two fields are the
|
|
20
|
+
report's two halves: an input echoed, and a finding computed. Where they differ, the record did not reach
|
|
21
|
+
its own shape. An out-of-taxonomy claim now lands only in the echo and can no longer masquerade as a
|
|
22
|
+
finding.
|
|
23
|
+
|
|
24
|
+
**UCP can advertise a terms URL.** Its policy object declares `url` — "Optional link to the full policy
|
|
25
|
+
document", `format: uri` — on the very entry this placement writes, and §C.3's illustration carries `url`
|
|
26
|
+
and `atrHash` side by side there. The manifest previously said the protocol had no slot, citing `links[]`,
|
|
27
|
+
which §C.3 separates as "a standing page, not a per-transaction record". The obstacle was mechanical:
|
|
28
|
+
`termsUrlFields` addresses document paths, and a tagged-array entry's index is chosen at write time. The
|
|
29
|
+
`tagged-array` container therefore gains `termsUrlField`, written onto the same entry in the same write, and
|
|
30
|
+
read back through the same first-match rule. UCP was the last shipped protocol that refused an
|
|
31
|
+
advertisement carrying its own locator (integra-protocol#8).
|
|
32
|
+
|
|
33
|
+
**`readUcpProfile` no longer refuses a conformant business profile.** `requireHttps` mapped an ABSENT `spec`
|
|
34
|
+
to the same branch as a malformed one, and the live host requires `spec` only of a platform declaration —
|
|
35
|
+
as this repository's own README already said. It is now `requireHttpsIfDeclared`: absence is absence, and a
|
|
36
|
+
declared value is still held to the host's https MUST.
|
|
37
|
+
|
|
38
|
+
Also: `requireWritten` replaces an unchecked cast in the x402 override, so a broken postcondition throws
|
|
39
|
+
instead of returning a success carrying no document; six x402 citations move to the revision that actually
|
|
40
|
+
touches the file they name, and a new gate refuses any `owner/repo@sha` in source that `spec-pins.json` does
|
|
41
|
+
not record; four spec citations move from line anchors to section anchors; the escrow binding states why it
|
|
42
|
+
declares no §8.3.1 off-canonical variant, and asserts it; and §C.3's `policies[]` illustration is recorded as
|
|
43
|
+
invalid against the live UCP schema, which shows `description` as a bare string where the host requires an
|
|
44
|
+
object — owed upstream, not a defect here.
|
|
45
|
+
|
|
46
|
+
Corpus 844 → 847, root `ec4ad1b02a81538b…`.
|
|
47
|
+
|
|
48
|
+
- Updated dependencies [b2ffecc]
|
|
49
|
+
- Updated dependencies [822190a]
|
|
50
|
+
- @integraledger/lcp-binding-core@0.11.0
|
|
51
|
+
- @integraledger/lcp-binding-evm-common@0.10.2
|
|
52
|
+
- @integraledger/lcp-kernel@0.11.0
|
|
53
|
+
|
|
54
|
+
## 0.10.1
|
|
55
|
+
|
|
56
|
+
**0.10.0 was staged and withdrawn before approval; this is that release, re-cut.** The conformance corpus
|
|
57
|
+
was re-sealed after 0.10.0 was staged — its root moved `32fa90a6…` → `28bbf4ef…` when the vector tree was
|
|
58
|
+
brought inside the prose gates — so the staged `lcp-conformance` tarball carried a seal that no longer
|
|
59
|
+
matched the repository. The seal is what proves corpus authenticity to an independent implementer, and a
|
|
60
|
+
published version cannot be replaced, so the whole set was rejected and re-cut rather than shipping one
|
|
61
|
+
package that disagreed with its own source. No version 0.10.0 exists on the registry.
|
|
62
|
+
|
|
63
|
+
Released as part of a flat `0.10.1` across the whole suite. One number describes the set that was built,
|
|
64
|
+
tested and sealed together, so a consumer never has to work out which combination of versions was verified.
|
|
65
|
+
|
|
66
|
+
This package has no source change of its own in this release. What moved across the suite: three exported
|
|
67
|
+
names were corrected before anyone depends on them — `USDC_DECIMALS` became rail-qualified after it was
|
|
68
|
+
found to mean 6 on three rails and 7 on Stellar under one name, `VISA_TAP_PLACEMENT_TIER_A` lost the tier
|
|
69
|
+
it had baked into an identifier, and the memo codecs were named for the carrier they encode. Two wire
|
|
70
|
+
identities were respelled to match the vocabulary they are written into. Five gates were added or widened,
|
|
71
|
+
and a large number of documentation claims were corrected against the host specifications at HEAD.
|
|
72
|
+
|
|
3
73
|
## 0.9.0
|
|
4
74
|
|
|
5
75
|
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,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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AiB,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,E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;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"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 1. **Asset-transfer-method filter.** The atrHash-as-nonce weld rides ONLY on EIP-3009
|
|
5
5
|
* `transferWithAuthorization`, whose `nonce` is a payer-controlled 32-byte field committed on-chain in
|
|
6
6
|
* `AuthorizationUsed`. x402's `exact` scheme on EVM defines **three** methods, verified at
|
|
7
|
-
* `x402-foundation/x402@
|
|
7
|
+
* `x402-foundation/x402@db5da2e65952`, `specs/schemes/exact/scheme_exact_evm.md` (read 2026-08-11):
|
|
8
8
|
*
|
|
9
9
|
* 1. `eip3009` — tokens with native `transferWithAuthorization` (the default when `extra` omits it)
|
|
10
10
|
* 2. `permit2` — tokens without it, via a proxy and the canonical Permit2 contract
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 1. **Asset-transfer-method filter.** The atrHash-as-nonce weld rides ONLY on EIP-3009
|
|
5
5
|
* `transferWithAuthorization`, whose `nonce` is a payer-controlled 32-byte field committed on-chain in
|
|
6
6
|
* `AuthorizationUsed`. x402's `exact` scheme on EVM defines **three** methods, verified at
|
|
7
|
-
* `x402-foundation/x402@
|
|
7
|
+
* `x402-foundation/x402@db5da2e65952`, `specs/schemes/exact/scheme_exact_evm.md` (read 2026-08-11):
|
|
8
8
|
*
|
|
9
9
|
* 1. `eip3009` — tokens with native `transferWithAuthorization` (the default when `extra` omits it)
|
|
10
10
|
* 2. `permit2` — tokens without it, via a proxy and the canonical Permit2 contract
|
package/dist/constants.d.ts
CHANGED
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
* cast call <asset> "version()(string)" --rpc-url <rpc>
|
|
18
18
|
* cast call <asset> "DOMAIN_SEPARATOR()(bytes32)" --rpc-url <rpc>
|
|
19
19
|
*
|
|
20
|
-
* **AN UPSTREAM MISMATCH,
|
|
21
|
-
* implementation
|
|
22
|
-
* `x402-foundation/x402@
|
|
20
|
+
* **AN UPSTREAM MISMATCH, SINCE FIXED — recorded because it is the kind that fails silently.** x402's own
|
|
21
|
+
* Go implementation disagreed with the chain about Monad. Verified 2026-08-08 at
|
|
22
|
+
* `x402-foundation/x402@db9dabd0c674` — the last commit touching `go/mechanisms/evm/constants.go`, which is
|
|
23
|
+
* pinned as `x402-go` in `spec-pins.json` and is NOT the specification pin: the SDK and the specification
|
|
24
|
+
* are separate path sets that move on separate schedules. At that revision the `"eip155:143"` entry names
|
|
23
25
|
* the SAME asset address as the `monad` entry below — `0x754704Bc059F8C67012fEd69BC8A327a5aafb603` — and
|
|
24
26
|
* gives it EIP-712 domain `Name: "USD Coin"`. The deployed contract's `name()` returns `"USDC"`, which is
|
|
25
27
|
* what the entry below carries and what the pinned `DOMAIN_SEPARATOR()` assertion in this repository holds
|
|
@@ -29,18 +31,28 @@
|
|
|
29
31
|
* "USD Coin" against a contract reporting "USDC" produces an authorization that simply does not recover to
|
|
30
32
|
* the payer. That is the silent failure this whole file exists to prevent, and here it is upstream.
|
|
31
33
|
*
|
|
32
|
-
* **REPORTED UPSTREAM 2026-08-08:** x402-foundation/x402#3102, with the `cast call`
|
|
33
|
-
* observation that USDC deployments are not uniform on this — Base Sepolia and Monad
|
|
34
|
-
* Base mainnet and Avalanche report "USD Coin", so a value copied between chains yields
|
|
35
|
-
* separator rather than an obvious error.
|
|
36
|
-
*
|
|
34
|
+
* **REPORTED UPSTREAM 2026-08-08 and FIXED 2026-08-10:** x402-foundation/x402#3102, with the `cast call`
|
|
35
|
+
* reproduction and the observation that USDC deployments are not uniform on this — Base Sepolia and Monad
|
|
36
|
+
* report "USDC" while Base mainnet and Avalanche report "USD Coin", so a value copied between chains yields
|
|
37
|
+
* a wrong domain separator rather than an obvious error. `76bda78ef420` (PR #3105) changed the Go entry to
|
|
38
|
+
* `"USDC"`, matching the chain and matching the row below. The account is kept because the failure mode is
|
|
39
|
+
* the reason this file exists at all, and because the pin above is what a reader would otherwise re-derive.
|
|
40
|
+
* Our entry never depended on the outcome: the token contract computes the separator, so the chain was and
|
|
41
|
+
* remains the authority.
|
|
37
42
|
*
|
|
38
43
|
* **What this file is not.** It is not an endorsement of a rail, an allowlist, or a supported-chain list.
|
|
39
44
|
* `createX402Adapter` takes any `X402AdapterConfig`, and a deployment absent here is not thereby refused —
|
|
40
45
|
* it simply has not been read off-chain by us. Adding a chain means adding a verified row, nothing more.
|
|
41
46
|
*/
|
|
42
47
|
import type { X402AdapterConfig } from "./adapter.js";
|
|
43
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* The deployments whose EIP-712 domain values have been read from their own USDC contract.
|
|
50
|
+
*
|
|
51
|
+
* NOT a list of what x402 supports, in either direction. The specification names far more networks than
|
|
52
|
+
* these four — `eip155:43114` and `eip155:43113` among them — so `avalanche` is a verified domain row on a
|
|
53
|
+
* network x402 does define. (Re-checked at HEAD 2026-08-11: it is the Go SDK's `constants.go` that carries
|
|
54
|
+
* no 43114 entry, not the specification.) Adding a chain means adding a verified row, nothing more.
|
|
55
|
+
*/
|
|
44
56
|
export type X402DeploymentName = "base" | "base-sepolia" | "avalanche" | "monad";
|
|
45
57
|
/**
|
|
46
58
|
* 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
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;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":"AA8DA;;;;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/dist/manifest.js
CHANGED
|
@@ -23,7 +23,7 @@ export const X402_MANIFEST = {
|
|
|
23
23
|
indexing: "nonce-topic:AuthorizationUsed",
|
|
24
24
|
finality: {
|
|
25
25
|
reversible: false,
|
|
26
|
-
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.",
|
|
26
|
+
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
27
|
},
|
|
28
28
|
// The payer's EIP-3009 signature commits to the nonce (= atrHash): signature-grade weld.
|
|
29
29
|
weldGrades: { ERC3009: "signature" },
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;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,
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;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,UAAU,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;IACpC,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.10.2",
|
|
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.11.0",
|
|
49
|
+
"@integraledger/lcp-kernel": "0.11.0",
|
|
50
|
+
"@integraledger/lcp-binding-evm-common": "0.10.2"
|
|
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
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 1. **Asset-transfer-method filter.** The atrHash-as-nonce weld rides ONLY on EIP-3009
|
|
5
5
|
* `transferWithAuthorization`, whose `nonce` is a payer-controlled 32-byte field committed on-chain in
|
|
6
6
|
* `AuthorizationUsed`. x402's `exact` scheme on EVM defines **three** methods, verified at
|
|
7
|
-
* `x402-foundation/x402@
|
|
7
|
+
* `x402-foundation/x402@db5da2e65952`, `specs/schemes/exact/scheme_exact_evm.md` (read 2026-08-11):
|
|
8
8
|
*
|
|
9
9
|
* 1. `eip3009` — tokens with native `transferWithAuthorization` (the default when `extra` omits it)
|
|
10
10
|
* 2. `permit2` — tokens without it, via a proxy and the canonical Permit2 contract
|
package/src/constants.ts
CHANGED
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
* cast call <asset> "version()(string)" --rpc-url <rpc>
|
|
18
18
|
* cast call <asset> "DOMAIN_SEPARATOR()(bytes32)" --rpc-url <rpc>
|
|
19
19
|
*
|
|
20
|
-
* **AN UPSTREAM MISMATCH,
|
|
21
|
-
* implementation
|
|
22
|
-
* `x402-foundation/x402@
|
|
20
|
+
* **AN UPSTREAM MISMATCH, SINCE FIXED — recorded because it is the kind that fails silently.** x402's own
|
|
21
|
+
* Go implementation disagreed with the chain about Monad. Verified 2026-08-08 at
|
|
22
|
+
* `x402-foundation/x402@db9dabd0c674` — the last commit touching `go/mechanisms/evm/constants.go`, which is
|
|
23
|
+
* pinned as `x402-go` in `spec-pins.json` and is NOT the specification pin: the SDK and the specification
|
|
24
|
+
* are separate path sets that move on separate schedules. At that revision the `"eip155:143"` entry names
|
|
23
25
|
* the SAME asset address as the `monad` entry below — `0x754704Bc059F8C67012fEd69BC8A327a5aafb603` — and
|
|
24
26
|
* gives it EIP-712 domain `Name: "USD Coin"`. The deployed contract's `name()` returns `"USDC"`, which is
|
|
25
27
|
* what the entry below carries and what the pinned `DOMAIN_SEPARATOR()` assertion in this repository holds
|
|
@@ -29,11 +31,14 @@
|
|
|
29
31
|
* "USD Coin" against a contract reporting "USDC" produces an authorization that simply does not recover to
|
|
30
32
|
* the payer. That is the silent failure this whole file exists to prevent, and here it is upstream.
|
|
31
33
|
*
|
|
32
|
-
* **REPORTED UPSTREAM 2026-08-08:** x402-foundation/x402#3102, with the `cast call`
|
|
33
|
-
* observation that USDC deployments are not uniform on this — Base Sepolia and Monad
|
|
34
|
-
* Base mainnet and Avalanche report "USD Coin", so a value copied between chains yields
|
|
35
|
-
* separator rather than an obvious error.
|
|
36
|
-
*
|
|
34
|
+
* **REPORTED UPSTREAM 2026-08-08 and FIXED 2026-08-10:** x402-foundation/x402#3102, with the `cast call`
|
|
35
|
+
* reproduction and the observation that USDC deployments are not uniform on this — Base Sepolia and Monad
|
|
36
|
+
* report "USDC" while Base mainnet and Avalanche report "USD Coin", so a value copied between chains yields
|
|
37
|
+
* a wrong domain separator rather than an obvious error. `76bda78ef420` (PR #3105) changed the Go entry to
|
|
38
|
+
* `"USDC"`, matching the chain and matching the row below. The account is kept because the failure mode is
|
|
39
|
+
* the reason this file exists at all, and because the pin above is what a reader would otherwise re-derive.
|
|
40
|
+
* Our entry never depended on the outcome: the token contract computes the separator, so the chain was and
|
|
41
|
+
* remains the authority.
|
|
37
42
|
*
|
|
38
43
|
* **What this file is not.** It is not an endorsement of a rail, an allowlist, or a supported-chain list.
|
|
39
44
|
* `createX402Adapter` takes any `X402AdapterConfig`, and a deployment absent here is not thereby refused —
|
|
@@ -41,7 +46,14 @@
|
|
|
41
46
|
*/
|
|
42
47
|
import type { X402AdapterConfig } from "./adapter.js";
|
|
43
48
|
|
|
44
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* The deployments whose EIP-712 domain values have been read from their own USDC contract.
|
|
51
|
+
*
|
|
52
|
+
* NOT a list of what x402 supports, in either direction. The specification names far more networks than
|
|
53
|
+
* these four — `eip155:43114` and `eip155:43113` among them — so `avalanche` is a verified domain row on a
|
|
54
|
+
* network x402 does define. (Re-checked at HEAD 2026-08-11: it is the Go SDK's `constants.go` that carries
|
|
55
|
+
* no 43114 entry, not the specification.) Adding a chain means adding a verified row, nothing more.
|
|
56
|
+
*/
|
|
45
57
|
export type X402DeploymentName =
|
|
46
58
|
| "base"
|
|
47
59
|
| "base-sepolia"
|
package/src/manifest.ts
CHANGED
|
@@ -25,7 +25,7 @@ export const X402_MANIFEST: BindingManifest = {
|
|
|
25
25
|
indexing: "nonce-topic:AuthorizationUsed",
|
|
26
26
|
finality: {
|
|
27
27
|
reversible: false,
|
|
28
|
-
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.",
|
|
28
|
+
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
29
|
},
|
|
30
30
|
// The payer's EIP-3009 signature commits to the nonce (= atrHash): signature-grade weld.
|
|
31
31
|
weldGrades: { ERC3009: "signature" },
|