@meantjs/profile 0.5.0 → 0.6.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,17 @@
2
2
 
3
3
  The five Candid Profile library packages (`@meantjs/profile`, `/format`, `/consent`, `/tools`, `/reconcile`) release together under one version and pin each other exactly; a version appears here even when this package did not change. Release steps: `docs/releasing.md` in the repository.
4
4
 
5
+ ## 0.6.0 — 2026-11-01
6
+
7
+ - x402's usage-based payment, x402's other networks and USDC's permit (D-059, experimental). New standard contract
8
+ profiles, shipped beside the packs: `x402-upto-permit2`, x402's `upto` payment through Permit2 (witness
9
+ `Witness(address to,address facilitator,uint256 validAfter)`), its spender pinned to x402's `upto` proxy and its
10
+ grant the maximum to `witness.to`; and `usdc-domain-usdc`, USDC's messages on the eleven chains where it signs under
11
+ the domain name `USDC` (Base Sepolia among them). `usdc` and `usdc-domain-usdc` also read USDC's EIP-2612 `Permit`
12
+ (`approve`, a grant to `spender` that never ends). `usdc` lists chains 1, 137, 8453, 42161, 43113, 43114 and 421614;
13
+ `x402-exact-permit2` 20 networks; `permit2` 23. Their profile ids changed. `usdc-base-sepolia` is unchanged and kept
14
+ for 0.5.0 code; `usdc-domain-usdc` reads the same messages there with the same words.
15
+
5
16
  ## 0.5.0 — 2026-10-30
6
17
 
7
18
  - Pins, experimental (spec §15.4, D-058): the new tag `fixed`, with `value` one address, says that a profile describes
package/README.md CHANGED
@@ -186,12 +186,15 @@ r.resolved.methods.transfer.tags.intent.args.template; // "Send {wad} to {dst}":
186
186
  (`PermitSingle(0).details.amount`) and listed under the resolved form's `messages` with its `encode_type` and
187
187
  `type_hash`. `amount.token` names an amount's token by an `address` field (`E_TOKEN_PATH` otherwise). Bad types, a
188
188
  message named like a function and two meanings for one type name are `E_EIP712`. Standard files: the `erc2612`
189
- pack, and the contract profiles `permit2`, `dai-permit`, `usdc`, `usdc-base-sepolia` and `x402-exact-permit2`
190
- shipped beside the packs (`@meantjs/profile/packs/permit2.profile.json`); `loadPacks()` returns the packs only.
189
+ pack, and the contract profiles `permit2`, `dai-permit`, `usdc` and `usdc-domain-usdc` (USDC's EIP-3009 messages
190
+ and permit, under its two domain names), `usdc-base-sepolia` (as 0.5.0 published it), `x402-exact-permit2` and
191
+ `x402-upto-permit2`, shipped beside the packs (`@meantjs/profile/packs/permit2.profile.json`); `loadPacks()`
192
+ returns the packs only.
191
193
  - **Pins** (`fixed`, spec §15.4, D-058): an `address` in the arguments of a function or a message that the profile
192
- describes only with one value, as x402's Permit2 payment holds x402's proxy as its spender. A pin that does not hold
193
- (another place or type, a bad checksum, an address that does not resolve, another value pinned by any profile) is
194
- an error, and its profile then supplies only its effects, without grants, and its pins that hold.
194
+ describes only with one value, as each of x402's Permit2 payments holds its scheme's proxy as its spender. A pin
195
+ that does not hold (another place or type, a bad checksum, an address that does not resolve, another value pinned
196
+ by any profile) is an error, and its profile then supplies only its effects, without grants, and its pins that
197
+ hold.
195
198
  - **Refused for now:** overloaded function names and unreadable fragments (`E_ABI`); `idempotency`, `outcome`, `list`,
196
199
  `names` and `named` on a contract (`E_TAG_TARGET`); `account` and `subaccount` (`E_TAG_NOT_APPLICABLE`); `[ ]`
197
200
  template segments (`E_TEMPLATE`).
@@ -5,7 +5,7 @@
5
5
  "name": "permit2",
6
6
  "origin": "third_party",
7
7
  "language": "en",
8
- "description": "Uniswap's Permit2 (spec section 15.9, experimental): its AllowanceTransfer messages (PermitSingle, PermitBatch), which set allowances, and its SignatureTransfer messages (PermitTransferFrom, PermitBatchTransferFrom), which authorize one transfer. Witness messages (PermitWitnessTransferFrom) are left out: each protocol adds its own witness type, in a profile of its own (O9; x402's is x402-exact-permit2). Bound to the deployments ERC-7730's own Permit2 example lists (chains 1 and 42161) and to Base and Base Sepolia (8453 and 84532), whose Permit2 code and domain were read on chain on 2026-10-30, so a look-alike contract named \"Permit2\" gets none of these words. Amounts are in the token the message names: a consumer supplies that token's decimals() and symbol(), and shows its address beside the symbol.",
8
+ "description": "Uniswap's Permit2 (spec section 15.9, experimental): its AllowanceTransfer messages (PermitSingle, PermitBatch), which set allowances, and its SignatureTransfer messages (PermitTransferFrom, PermitBatchTransferFrom), which authorize one transfer. Witness messages (PermitWitnessTransferFrom) are left out: each protocol adds its own witness type, in a profile of its own (O9; x402's are x402-exact-permit2 and x402-upto-permit2). Bound to the deployments ERC-7730's own Permit2 example lists (chains 1 and 42161) and to the other networks x402 names, whose Permit2 code and domain were read on chain (Base and Base Sepolia on 2026-10-30, the others on 2026-11-01), so a look-alike contract named \"Permit2\" gets none of these words. Amounts are in the token the message names: a consumer supplies that token's decimals() and symbol(), and shows its address beside the symbol.",
9
9
  "binds": {
10
10
  "eip712": {
11
11
  "domain": {
@@ -111,17 +111,93 @@
111
111
  "chain_id": 1,
112
112
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
113
113
  },
114
+ {
115
+ "chain_id": 14,
116
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
117
+ },
118
+ {
119
+ "chain_id": 50,
120
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
121
+ },
122
+ {
123
+ "chain_id": 51,
124
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
125
+ },
126
+ {
127
+ "chain_id": 137,
128
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
129
+ },
130
+ {
131
+ "chain_id": 143,
132
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
133
+ },
134
+ {
135
+ "chain_id": 988,
136
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
137
+ },
138
+ {
139
+ "chain_id": 1328,
140
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
141
+ },
142
+ {
143
+ "chain_id": 1329,
144
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
145
+ },
146
+ {
147
+ "chain_id": 2201,
148
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
149
+ },
150
+ {
151
+ "chain_id": 4326,
152
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
153
+ },
114
154
  {
115
155
  "chain_id": 8453,
116
156
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
117
157
  },
158
+ {
159
+ "chain_id": 10143,
160
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
161
+ },
162
+ {
163
+ "chain_id": 31612,
164
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
165
+ },
118
166
  {
119
167
  "chain_id": 42161,
120
168
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
121
169
  },
170
+ {
171
+ "chain_id": 42220,
172
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
173
+ },
174
+ {
175
+ "chain_id": 43113,
176
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
177
+ },
178
+ {
179
+ "chain_id": 43114,
180
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
181
+ },
182
+ {
183
+ "chain_id": 80002,
184
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
185
+ },
122
186
  {
123
187
  "chain_id": 84532,
124
188
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
189
+ },
190
+ {
191
+ "chain_id": 421614,
192
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
193
+ },
194
+ {
195
+ "chain_id": 5042002,
196
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
197
+ },
198
+ {
199
+ "chain_id": 11142220,
200
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
125
201
  }
126
202
  ]
127
203
  },
@@ -0,0 +1,437 @@
1
+ {
2
+ "format": "candid-profile",
3
+ "format_version": 0,
4
+ "kind": "contract",
5
+ "name": "usdc-domain-usdc",
6
+ "origin": "third_party",
7
+ "language": "en",
8
+ "description": "USDC's EIP-3009 messages and its EIP-2612 permit where USDC signs under the domain name `USDC`, not `USD Coin`: Monad, Sei, Celo and XDC, and the test networks Base Sepolia, Polygon Amoy, Monad testnet, Sei testnet, Celo Sepolia, Arc testnet and XDC Apothem (spec section 15.9, experimental), with the usdc profile's words. TransferWithAuthorization and ReceiveWithAuthorization pay `to` once, by a signature that someone else submits (only the payee, for ReceiveWithAuthorization), and CancelAuthorization cancels one that is unused (EIP-3009; Circle stablecoin-evm, FiatTokenV2.sol). Permit sets an allowance (EIP-2612), which never ends once it is submitted; x402's payments through Permit2 may come with one for Permit2 (coinbase/x402, specs/extensions/eip2612_gas_sponsoring.md). x402's `exact` scheme pays by TransferWithAuthorization by default (coinbase/x402, specs/schemes/exact/scheme_exact_evm.md). Only the messages are described: USDC's ABI names transferWithAuthorization, receiveWithAuthorization, cancelAuthorization and permit twice each, which the resolver refuses (O1). A profile binds one domain, so these chains have a profile of their own; it replaces usdc-base-sepolia, which describes Base Sepolia alone and is kept as it was published. Bound to USDC's domain (`USDC`, version `2`) and to its contracts, each read on chain on 2026-11-01 (DOMAIN_SEPARATOR, decimals 6, the four type hashes), so a look-alike token gets none of these words. x402 names each of these networks.",
9
+ "binds": {
10
+ "eip712": {
11
+ "domain": {
12
+ "name": "USDC",
13
+ "version": "2"
14
+ },
15
+ "types": {
16
+ "CancelAuthorization": [
17
+ {
18
+ "name": "authorizer",
19
+ "type": "address"
20
+ },
21
+ {
22
+ "name": "nonce",
23
+ "type": "bytes32"
24
+ }
25
+ ],
26
+ "Permit": [
27
+ {
28
+ "name": "owner",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "name": "spender",
33
+ "type": "address"
34
+ },
35
+ {
36
+ "name": "value",
37
+ "type": "uint256"
38
+ },
39
+ {
40
+ "name": "nonce",
41
+ "type": "uint256"
42
+ },
43
+ {
44
+ "name": "deadline",
45
+ "type": "uint256"
46
+ }
47
+ ],
48
+ "ReceiveWithAuthorization": [
49
+ {
50
+ "name": "from",
51
+ "type": "address"
52
+ },
53
+ {
54
+ "name": "to",
55
+ "type": "address"
56
+ },
57
+ {
58
+ "name": "value",
59
+ "type": "uint256"
60
+ },
61
+ {
62
+ "name": "validAfter",
63
+ "type": "uint256"
64
+ },
65
+ {
66
+ "name": "validBefore",
67
+ "type": "uint256"
68
+ },
69
+ {
70
+ "name": "nonce",
71
+ "type": "bytes32"
72
+ }
73
+ ],
74
+ "TransferWithAuthorization": [
75
+ {
76
+ "name": "from",
77
+ "type": "address"
78
+ },
79
+ {
80
+ "name": "to",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "name": "value",
85
+ "type": "uint256"
86
+ },
87
+ {
88
+ "name": "validAfter",
89
+ "type": "uint256"
90
+ },
91
+ {
92
+ "name": "validBefore",
93
+ "type": "uint256"
94
+ },
95
+ {
96
+ "name": "nonce",
97
+ "type": "bytes32"
98
+ }
99
+ ]
100
+ }
101
+ },
102
+ "deployments": [
103
+ {
104
+ "chain_id": 50,
105
+ "address": "0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1"
106
+ },
107
+ {
108
+ "chain_id": 51,
109
+ "address": "0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4"
110
+ },
111
+ {
112
+ "chain_id": 143,
113
+ "address": "0x754704Bc059F8C67012fEd69BC8A327a5aafb603"
114
+ },
115
+ {
116
+ "chain_id": 1328,
117
+ "address": "0x4fCF1784B31630811181f670Aea7A7bEF803eaED"
118
+ },
119
+ {
120
+ "chain_id": 1329,
121
+ "address": "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392"
122
+ },
123
+ {
124
+ "chain_id": 10143,
125
+ "address": "0x534b2f3A21130d7a60830c2Df862319e593943A3"
126
+ },
127
+ {
128
+ "chain_id": 42220,
129
+ "address": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C"
130
+ },
131
+ {
132
+ "chain_id": 80002,
133
+ "address": "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582"
134
+ },
135
+ {
136
+ "chain_id": 84532,
137
+ "address": "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
138
+ },
139
+ {
140
+ "chain_id": 5042002,
141
+ "address": "0x3600000000000000000000000000000000000000"
142
+ },
143
+ {
144
+ "chain_id": 11142220,
145
+ "address": "0x01C5C0122039549AD1493B8220cABEdD739BC44E"
146
+ }
147
+ ]
148
+ },
149
+ "annotations": [
150
+ {
151
+ "at": "TransferWithAuthorization",
152
+ "tag": "intent",
153
+ "args": {
154
+ "title": "Pay USDC by signature",
155
+ "template": "Send {value} from {from} to {to}, once. Valid after {validAfter}. Expires: {validBefore}."
156
+ }
157
+ },
158
+ {
159
+ "at": "TransferWithAuthorization",
160
+ "tag": "effect",
161
+ "args": {
162
+ "kind": "transfer",
163
+ "irreversible": true,
164
+ "grant": {
165
+ "to": "to",
166
+ "amount": "value",
167
+ "ends": [
168
+ "validBefore"
169
+ ]
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "at": "TransferWithAuthorization(0).from",
175
+ "tag": "describe",
176
+ "args": {
177
+ "label": "From"
178
+ }
179
+ },
180
+ {
181
+ "at": "TransferWithAuthorization(0).to",
182
+ "tag": "describe",
183
+ "args": {
184
+ "label": "To"
185
+ }
186
+ },
187
+ {
188
+ "at": "TransferWithAuthorization(0).value",
189
+ "tag": "amount",
190
+ "args": {
191
+ "decimals": 6,
192
+ "symbol": "USDC"
193
+ }
194
+ },
195
+ {
196
+ "at": "TransferWithAuthorization(0).value",
197
+ "tag": "describe",
198
+ "args": {
199
+ "label": "Amount"
200
+ }
201
+ },
202
+ {
203
+ "at": "TransferWithAuthorization(0).validAfter",
204
+ "tag": "timestamp",
205
+ "args": {
206
+ "unit": "s",
207
+ "epoch": "unix"
208
+ }
209
+ },
210
+ {
211
+ "at": "TransferWithAuthorization(0).validAfter",
212
+ "tag": "describe",
213
+ "args": {
214
+ "label": "Valid after"
215
+ }
216
+ },
217
+ {
218
+ "at": "TransferWithAuthorization(0).validBefore",
219
+ "tag": "timestamp",
220
+ "args": {
221
+ "unit": "s",
222
+ "epoch": "unix",
223
+ "threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
224
+ "message": "Never"
225
+ }
226
+ },
227
+ {
228
+ "at": "TransferWithAuthorization(0).validBefore",
229
+ "tag": "describe",
230
+ "args": {
231
+ "label": "Expires"
232
+ }
233
+ },
234
+ {
235
+ "at": "TransferWithAuthorization(0).nonce",
236
+ "tag": "describe",
237
+ "args": {
238
+ "label": "Nonce"
239
+ }
240
+ },
241
+ {
242
+ "at": "ReceiveWithAuthorization",
243
+ "tag": "intent",
244
+ "args": {
245
+ "title": "Pay USDC by signature, collected by the payee",
246
+ "template": "Send {value} from {from} to {to}, once; only {to} can submit it. Valid after {validAfter}. Expires: {validBefore}."
247
+ }
248
+ },
249
+ {
250
+ "at": "ReceiveWithAuthorization",
251
+ "tag": "effect",
252
+ "args": {
253
+ "kind": "transfer",
254
+ "irreversible": true,
255
+ "grant": {
256
+ "to": "to",
257
+ "amount": "value",
258
+ "ends": [
259
+ "validBefore"
260
+ ]
261
+ }
262
+ }
263
+ },
264
+ {
265
+ "at": "ReceiveWithAuthorization(0).from",
266
+ "tag": "describe",
267
+ "args": {
268
+ "label": "From"
269
+ }
270
+ },
271
+ {
272
+ "at": "ReceiveWithAuthorization(0).to",
273
+ "tag": "describe",
274
+ "args": {
275
+ "label": "To"
276
+ }
277
+ },
278
+ {
279
+ "at": "ReceiveWithAuthorization(0).value",
280
+ "tag": "amount",
281
+ "args": {
282
+ "decimals": 6,
283
+ "symbol": "USDC"
284
+ }
285
+ },
286
+ {
287
+ "at": "ReceiveWithAuthorization(0).value",
288
+ "tag": "describe",
289
+ "args": {
290
+ "label": "Amount"
291
+ }
292
+ },
293
+ {
294
+ "at": "ReceiveWithAuthorization(0).validAfter",
295
+ "tag": "timestamp",
296
+ "args": {
297
+ "unit": "s",
298
+ "epoch": "unix"
299
+ }
300
+ },
301
+ {
302
+ "at": "ReceiveWithAuthorization(0).validAfter",
303
+ "tag": "describe",
304
+ "args": {
305
+ "label": "Valid after"
306
+ }
307
+ },
308
+ {
309
+ "at": "ReceiveWithAuthorization(0).validBefore",
310
+ "tag": "timestamp",
311
+ "args": {
312
+ "unit": "s",
313
+ "epoch": "unix",
314
+ "threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
315
+ "message": "Never"
316
+ }
317
+ },
318
+ {
319
+ "at": "ReceiveWithAuthorization(0).validBefore",
320
+ "tag": "describe",
321
+ "args": {
322
+ "label": "Expires"
323
+ }
324
+ },
325
+ {
326
+ "at": "ReceiveWithAuthorization(0).nonce",
327
+ "tag": "describe",
328
+ "args": {
329
+ "label": "Nonce"
330
+ }
331
+ },
332
+ {
333
+ "at": "CancelAuthorization",
334
+ "tag": "intent",
335
+ "args": {
336
+ "title": "Cancel a USDC payment signature",
337
+ "template": "Cancel the unused USDC payment signature of {authorizer} with nonce {nonce}."
338
+ }
339
+ },
340
+ {
341
+ "at": "CancelAuthorization",
342
+ "tag": "effect",
343
+ "args": {
344
+ "kind": "write",
345
+ "irreversible": true
346
+ }
347
+ },
348
+ {
349
+ "at": "CancelAuthorization(0).authorizer",
350
+ "tag": "describe",
351
+ "args": {
352
+ "label": "Signer of the payment"
353
+ }
354
+ },
355
+ {
356
+ "at": "CancelAuthorization(0).nonce",
357
+ "tag": "describe",
358
+ "args": {
359
+ "label": "Nonce"
360
+ }
361
+ },
362
+ {
363
+ "at": "Permit",
364
+ "tag": "intent",
365
+ "args": {
366
+ "title": "Permit USDC spending",
367
+ "template": "Allow {spender} to spend up to {value} from {owner}. Signature expires: {deadline}."
368
+ }
369
+ },
370
+ {
371
+ "at": "Permit",
372
+ "tag": "effect",
373
+ "args": {
374
+ "kind": "approve",
375
+ "irreversible": false,
376
+ "grant": {
377
+ "spender": "spender",
378
+ "amount": "value"
379
+ }
380
+ }
381
+ },
382
+ {
383
+ "at": "Permit(0).owner",
384
+ "tag": "describe",
385
+ "args": {
386
+ "label": "Owner"
387
+ }
388
+ },
389
+ {
390
+ "at": "Permit(0).spender",
391
+ "tag": "describe",
392
+ "args": {
393
+ "label": "Spender"
394
+ }
395
+ },
396
+ {
397
+ "at": "Permit(0).value",
398
+ "tag": "amount",
399
+ "args": {
400
+ "decimals": 6,
401
+ "symbol": "USDC",
402
+ "threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
403
+ }
404
+ },
405
+ {
406
+ "at": "Permit(0).value",
407
+ "tag": "describe",
408
+ "args": {
409
+ "label": "Amount"
410
+ }
411
+ },
412
+ {
413
+ "at": "Permit(0).nonce",
414
+ "tag": "describe",
415
+ "args": {
416
+ "label": "Nonce"
417
+ }
418
+ },
419
+ {
420
+ "at": "Permit(0).deadline",
421
+ "tag": "timestamp",
422
+ "args": {
423
+ "unit": "s",
424
+ "epoch": "unix",
425
+ "threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
426
+ "message": "Never"
427
+ }
428
+ },
429
+ {
430
+ "at": "Permit(0).deadline",
431
+ "tag": "describe",
432
+ "args": {
433
+ "label": "Signature expires"
434
+ }
435
+ }
436
+ ]
437
+ }
@@ -5,7 +5,7 @@
5
5
  "name": "usdc",
6
6
  "origin": "third_party",
7
7
  "language": "en",
8
- "description": "USDC's EIP-3009 messages on Ethereum, Base and Arbitrum (spec section 15.9, experimental). TransferWithAuthorization and ReceiveWithAuthorization pay `to` once, by a signature that someone else submits (only the payee, for ReceiveWithAuthorization), and CancelAuthorization cancels one that is unused (EIP-3009; Circle stablecoin-evm, FiatTokenV2.sol). x402's `exact` scheme pays by TransferWithAuthorization by default (coinbase/x402, specs/schemes/exact/scheme_exact_evm.md). Only the messages are described: USDC's ABI names transferWithAuthorization, receiveWithAuthorization, cancelAuthorization and permit twice each, which the resolver refuses (O1). Bound to USDC's domain (`USD Coin`, version `2`) and to its contracts, each read on chain on 2026-10-30 (DOMAIN_SEPARATOR, decimals 6, the three type hashes), so a look-alike token gets none of these words.",
8
+ "description": "USDC's EIP-3009 messages and its EIP-2612 permit where USDC signs as `USD Coin`: Ethereum, Polygon, Base, Arbitrum and Avalanche, and the test networks Avalanche Fuji and Arbitrum Sepolia (spec section 15.9, experimental). TransferWithAuthorization and ReceiveWithAuthorization pay `to` once, by a signature that someone else submits (only the payee, for ReceiveWithAuthorization), and CancelAuthorization cancels one that is unused (EIP-3009; Circle stablecoin-evm, FiatTokenV2.sol). Permit sets an allowance (EIP-2612), which never ends once it is submitted; x402's payments through Permit2 may come with one for Permit2 (coinbase/x402, specs/extensions/eip2612_gas_sponsoring.md). x402's `exact` scheme pays by TransferWithAuthorization by default (coinbase/x402, specs/schemes/exact/scheme_exact_evm.md). Only the messages are described: USDC's ABI names transferWithAuthorization, receiveWithAuthorization, cancelAuthorization and permit twice each, which the resolver refuses (O1). Bound to USDC's domain (`USD Coin`, version `2`) and to its contracts, each read on chain (DOMAIN_SEPARATOR, decimals 6, the four type hashes; chains 1, 8453 and 42161 on 2026-10-30, the others on 2026-11-01), so a look-alike token gets none of these words. Where USDC signs as `USDC`, the usdc-domain-usdc profile has the same words.",
9
9
  "binds": {
10
10
  "eip712": {
11
11
  "domain": {
@@ -23,6 +23,28 @@
23
23
  "type": "bytes32"
24
24
  }
25
25
  ],
26
+ "Permit": [
27
+ {
28
+ "name": "owner",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "name": "spender",
33
+ "type": "address"
34
+ },
35
+ {
36
+ "name": "value",
37
+ "type": "uint256"
38
+ },
39
+ {
40
+ "name": "nonce",
41
+ "type": "uint256"
42
+ },
43
+ {
44
+ "name": "deadline",
45
+ "type": "uint256"
46
+ }
47
+ ],
26
48
  "ReceiveWithAuthorization": [
27
49
  {
28
50
  "name": "from",
@@ -82,6 +104,10 @@
82
104
  "chain_id": 1,
83
105
  "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
84
106
  },
107
+ {
108
+ "chain_id": 137,
109
+ "address": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"
110
+ },
85
111
  {
86
112
  "chain_id": 8453,
87
113
  "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
@@ -89,6 +115,18 @@
89
115
  {
90
116
  "chain_id": 42161,
91
117
  "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
118
+ },
119
+ {
120
+ "chain_id": 43113,
121
+ "address": "0x5425890298aed601595a70AB815c96711a31Bc65"
122
+ },
123
+ {
124
+ "chain_id": 43114,
125
+ "address": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"
126
+ },
127
+ {
128
+ "chain_id": 421614,
129
+ "address": "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"
92
130
  }
93
131
  ]
94
132
  },
@@ -304,6 +342,80 @@
304
342
  "args": {
305
343
  "label": "Nonce"
306
344
  }
345
+ },
346
+ {
347
+ "at": "Permit",
348
+ "tag": "intent",
349
+ "args": {
350
+ "title": "Permit USDC spending",
351
+ "template": "Allow {spender} to spend up to {value} from {owner}. Signature expires: {deadline}."
352
+ }
353
+ },
354
+ {
355
+ "at": "Permit",
356
+ "tag": "effect",
357
+ "args": {
358
+ "kind": "approve",
359
+ "irreversible": false,
360
+ "grant": {
361
+ "spender": "spender",
362
+ "amount": "value"
363
+ }
364
+ }
365
+ },
366
+ {
367
+ "at": "Permit(0).owner",
368
+ "tag": "describe",
369
+ "args": {
370
+ "label": "Owner"
371
+ }
372
+ },
373
+ {
374
+ "at": "Permit(0).spender",
375
+ "tag": "describe",
376
+ "args": {
377
+ "label": "Spender"
378
+ }
379
+ },
380
+ {
381
+ "at": "Permit(0).value",
382
+ "tag": "amount",
383
+ "args": {
384
+ "decimals": 6,
385
+ "symbol": "USDC",
386
+ "threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
387
+ }
388
+ },
389
+ {
390
+ "at": "Permit(0).value",
391
+ "tag": "describe",
392
+ "args": {
393
+ "label": "Amount"
394
+ }
395
+ },
396
+ {
397
+ "at": "Permit(0).nonce",
398
+ "tag": "describe",
399
+ "args": {
400
+ "label": "Nonce"
401
+ }
402
+ },
403
+ {
404
+ "at": "Permit(0).deadline",
405
+ "tag": "timestamp",
406
+ "args": {
407
+ "unit": "s",
408
+ "epoch": "unix",
409
+ "threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
410
+ "message": "Never"
411
+ }
412
+ },
413
+ {
414
+ "at": "Permit(0).deadline",
415
+ "tag": "describe",
416
+ "args": {
417
+ "label": "Signature expires"
418
+ }
307
419
  }
308
420
  ]
309
421
  }
@@ -5,7 +5,7 @@
5
5
  "name": "x402-exact-permit2",
6
6
  "origin": "third_party",
7
7
  "language": "en",
8
- "description": "x402's `exact` payment through Permit2 (spec section 15.9, experimental): Permit2's PermitWitnessTransferFrom with x402's witness, Witness(address to,uint256 validAfter), which x402 uses for tokens without EIP-3009 (coinbase/x402, specs/schemes/exact/scheme_exact_evm.md). Permit2 lets the spender choose where the tokens go and never reads the witness, so the witness's `to` is the payee only when the spender is x402's proxy, 0x402085c248EeA27D92E8b30b2C58ed07f9E20001, whose `settle` sends exactly `permitted.amount` to `witness.to`, not before `validAfter` (contracts/evm/src/x402BasePermit2Proxy.sol). The spender is therefore fixed to the proxy, and a request with any other spender gets no text (E_FIXED). Bound to Permit2's domain and deployments; the proxy has the same code on each of these chains (read on chain on 2026-10-30). Amounts are in the token the message names: a consumer supplies that token's decimals() and symbol(), and shows its address beside the symbol.",
8
+ "description": "x402's `exact` payment through Permit2 (spec section 15.9, experimental): Permit2's PermitWitnessTransferFrom with x402's witness, Witness(address to,uint256 validAfter), which x402 uses for tokens without EIP-3009 (coinbase/x402, specs/schemes/exact/scheme_exact_evm.md). Permit2 lets the spender choose where the tokens go and never reads the witness, so the witness's `to` is the payee only when the spender is x402's proxy, 0x402085c248EeA27D92E8b30b2C58ed07f9E20001, whose `settle` sends exactly `permitted.amount` to `witness.to`, not before `validAfter` (contracts/evm/src/x402BasePermit2Proxy.sol). The spender is therefore fixed to the proxy, and a request with any other spender gets no text (E_FIXED). Bound to Permit2's domain and to its deployments on the networks x402 names where the proxy has the same code (read on chain: chains 1, 8453, 42161 and 84532 on 2026-10-30, the others on 2026-11-01). x402's `upto` payment signs another witness, described by the x402-upto-permit2 profile. Amounts are in the token the message names: a consumer supplies that token's decimals() and symbol(), and shows its address beside the symbol.",
9
9
  "binds": {
10
10
  "eip712": {
11
11
  "domain": {
@@ -61,17 +61,81 @@
61
61
  "chain_id": 1,
62
62
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
63
63
  },
64
+ {
65
+ "chain_id": 50,
66
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
67
+ },
68
+ {
69
+ "chain_id": 51,
70
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
71
+ },
72
+ {
73
+ "chain_id": 137,
74
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
75
+ },
76
+ {
77
+ "chain_id": 143,
78
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
79
+ },
80
+ {
81
+ "chain_id": 1328,
82
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
83
+ },
84
+ {
85
+ "chain_id": 1329,
86
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
87
+ },
88
+ {
89
+ "chain_id": 4326,
90
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
91
+ },
64
92
  {
65
93
  "chain_id": 8453,
66
94
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
67
95
  },
96
+ {
97
+ "chain_id": 10143,
98
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
99
+ },
100
+ {
101
+ "chain_id": 31612,
102
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
103
+ },
68
104
  {
69
105
  "chain_id": 42161,
70
106
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
71
107
  },
108
+ {
109
+ "chain_id": 42220,
110
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
111
+ },
112
+ {
113
+ "chain_id": 43113,
114
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
115
+ },
116
+ {
117
+ "chain_id": 43114,
118
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
119
+ },
120
+ {
121
+ "chain_id": 80002,
122
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
123
+ },
72
124
  {
73
125
  "chain_id": 84532,
74
126
  "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
127
+ },
128
+ {
129
+ "chain_id": 421614,
130
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
131
+ },
132
+ {
133
+ "chain_id": 5042002,
134
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
135
+ },
136
+ {
137
+ "chain_id": 11142220,
138
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
75
139
  }
76
140
  ]
77
141
  },
@@ -0,0 +1,254 @@
1
+ {
2
+ "format": "candid-profile",
3
+ "format_version": 0,
4
+ "kind": "contract",
5
+ "name": "x402-upto-permit2",
6
+ "origin": "third_party",
7
+ "language": "en",
8
+ "description": "x402's `upto` payment through Permit2 (spec section 15.9, experimental): Permit2's PermitWitnessTransferFrom with x402's usage-based witness, Witness(address to,address facilitator,uint256 validAfter) (coinbase/x402, specs/schemes/upto/scheme_upto_evm.md). The payer signs a maximum, and the facilitator the witness names settles it once, for any amount from one unit up to that maximum, to `witness.to`, not before `validAfter` (contracts/evm/src/x402UptoPermit2Proxy.sol and x402BasePermit2Proxy.sol). Permit2 lets the spender choose where the tokens go and never reads the witness, so the witness's `to` is the payee only when the spender is x402's `upto` proxy, 0x4020A4f3b7b90ccA423B9fabCc0CE57C6C240002. The spender is therefore fixed to the proxy, and a request with any other spender gets no text (E_FIXED). The grant is the maximum, since the payer bears the risk of all of it being charged. Bound to Permit2's domain and to its deployments on the networks x402 names where the proxy has the same code (read on chain on 2026-11-01). Amounts are in the token the message names: a consumer supplies that token's decimals() and symbol(), and shows its address beside the symbol.",
9
+ "binds": {
10
+ "eip712": {
11
+ "domain": {
12
+ "name": "Permit2"
13
+ },
14
+ "types": {
15
+ "PermitWitnessTransferFrom": [
16
+ {
17
+ "name": "permitted",
18
+ "type": "TokenPermissions"
19
+ },
20
+ {
21
+ "name": "spender",
22
+ "type": "address"
23
+ },
24
+ {
25
+ "name": "nonce",
26
+ "type": "uint256"
27
+ },
28
+ {
29
+ "name": "deadline",
30
+ "type": "uint256"
31
+ },
32
+ {
33
+ "name": "witness",
34
+ "type": "Witness"
35
+ }
36
+ ],
37
+ "TokenPermissions": [
38
+ {
39
+ "name": "token",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "name": "amount",
44
+ "type": "uint256"
45
+ }
46
+ ],
47
+ "Witness": [
48
+ {
49
+ "name": "to",
50
+ "type": "address"
51
+ },
52
+ {
53
+ "name": "facilitator",
54
+ "type": "address"
55
+ },
56
+ {
57
+ "name": "validAfter",
58
+ "type": "uint256"
59
+ }
60
+ ]
61
+ }
62
+ },
63
+ "deployments": [
64
+ {
65
+ "chain_id": 1,
66
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
67
+ },
68
+ {
69
+ "chain_id": 50,
70
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
71
+ },
72
+ {
73
+ "chain_id": 51,
74
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
75
+ },
76
+ {
77
+ "chain_id": 137,
78
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
79
+ },
80
+ {
81
+ "chain_id": 143,
82
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
83
+ },
84
+ {
85
+ "chain_id": 1328,
86
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
87
+ },
88
+ {
89
+ "chain_id": 1329,
90
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
91
+ },
92
+ {
93
+ "chain_id": 4326,
94
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
95
+ },
96
+ {
97
+ "chain_id": 8453,
98
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
99
+ },
100
+ {
101
+ "chain_id": 10143,
102
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
103
+ },
104
+ {
105
+ "chain_id": 31612,
106
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
107
+ },
108
+ {
109
+ "chain_id": 42161,
110
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
111
+ },
112
+ {
113
+ "chain_id": 43113,
114
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
115
+ },
116
+ {
117
+ "chain_id": 43114,
118
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
119
+ },
120
+ {
121
+ "chain_id": 80002,
122
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
123
+ },
124
+ {
125
+ "chain_id": 84532,
126
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
127
+ },
128
+ {
129
+ "chain_id": 421614,
130
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
131
+ },
132
+ {
133
+ "chain_id": 5042002,
134
+ "address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
135
+ }
136
+ ]
137
+ },
138
+ "annotations": [
139
+ {
140
+ "at": "PermitWitnessTransferFrom",
141
+ "tag": "intent",
142
+ "args": {
143
+ "title": "Pay by x402 up to a maximum, through Permit2",
144
+ "template": "Send at most {permitted.amount} to {witness.to}, once, through x402's usage-based payment contract. Only {witness.facilitator} can settle it, and it chooses the amount. Usable from {witness.validAfter}. Signature expires: {deadline}."
145
+ }
146
+ },
147
+ {
148
+ "at": "PermitWitnessTransferFrom",
149
+ "tag": "effect",
150
+ "args": {
151
+ "kind": "transfer",
152
+ "irreversible": true,
153
+ "grant": {
154
+ "to": "witness.to",
155
+ "amount": "permitted.amount",
156
+ "ends": [
157
+ "deadline"
158
+ ]
159
+ }
160
+ }
161
+ },
162
+ {
163
+ "at": "PermitWitnessTransferFrom(0).permitted.token",
164
+ "tag": "describe",
165
+ "args": {
166
+ "label": "Token"
167
+ }
168
+ },
169
+ {
170
+ "at": "PermitWitnessTransferFrom(0).permitted.amount",
171
+ "tag": "amount",
172
+ "args": {
173
+ "token": "permitted.token"
174
+ }
175
+ },
176
+ {
177
+ "at": "PermitWitnessTransferFrom(0).permitted.amount",
178
+ "tag": "describe",
179
+ "args": {
180
+ "label": "Maximum amount"
181
+ }
182
+ },
183
+ {
184
+ "at": "PermitWitnessTransferFrom(0).spender",
185
+ "tag": "fixed",
186
+ "args": {
187
+ "value": "0x4020A4f3b7b90ccA423B9fabCc0CE57C6C240002"
188
+ }
189
+ },
190
+ {
191
+ "at": "PermitWitnessTransferFrom(0).spender",
192
+ "tag": "describe",
193
+ "args": {
194
+ "label": "x402's usage-based payment contract"
195
+ }
196
+ },
197
+ {
198
+ "at": "PermitWitnessTransferFrom(0).nonce",
199
+ "tag": "describe",
200
+ "args": {
201
+ "label": "Nonce"
202
+ }
203
+ },
204
+ {
205
+ "at": "PermitWitnessTransferFrom(0).deadline",
206
+ "tag": "timestamp",
207
+ "args": {
208
+ "unit": "s",
209
+ "epoch": "unix",
210
+ "threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
211
+ "message": "Never"
212
+ }
213
+ },
214
+ {
215
+ "at": "PermitWitnessTransferFrom(0).deadline",
216
+ "tag": "describe",
217
+ "args": {
218
+ "label": "Signature expires"
219
+ }
220
+ },
221
+ {
222
+ "at": "PermitWitnessTransferFrom(0).witness.to",
223
+ "tag": "describe",
224
+ "args": {
225
+ "label": "To"
226
+ }
227
+ },
228
+ {
229
+ "at": "PermitWitnessTransferFrom(0).witness.facilitator",
230
+ "tag": "describe",
231
+ "args": {
232
+ "label": "Settled by"
233
+ }
234
+ },
235
+ {
236
+ "at": "PermitWitnessTransferFrom(0).witness.validAfter",
237
+ "tag": "timestamp",
238
+ "args": {
239
+ "unit": "s",
240
+ "epoch": "unix",
241
+ "labels": {
242
+ "0": "now"
243
+ }
244
+ }
245
+ },
246
+ {
247
+ "at": "PermitWitnessTransferFrom(0).witness.validAfter",
248
+ "tag": "describe",
249
+ "args": {
250
+ "label": "Usable from"
251
+ }
252
+ }
253
+ ]
254
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meantjs/profile",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Candid Profile resolver: validates profiles, matches packs by Candid subtyping, merges layers (spec section 8) and emits the resolved form (spec section 10).",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/browser.mjs CHANGED
@@ -35,8 +35,8 @@ export const PROFILE_SCHEMA = schema;
35
35
 
36
36
  /**
37
37
  * The standard packs (copies of packs/*.profile.json whose kind is "pack"), sorted by file name, in the shape
38
- * `loadPacks` returns. The standard contract profiles there (Permit2, DAI's permit, USDC, x402's Permit2 payment) are
39
- * under `./packs/*` too.
38
+ * `loadPacks` returns. The standard contract profiles there (Permit2, DAI's permit, USDC under its two domain names,
39
+ * x402's two Permit2 payments) are under `./packs/*` too.
40
40
  */
41
41
  export const STANDARD_PACKS = Object.freeze([
42
42
  { file: "erc20.profile.json", doc: erc20 },