@meantjs/profile 0.4.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 +31 -0
- package/README.md +11 -4
- package/data/packs/permit2.profile.json +85 -1
- package/data/packs/usdc-base-sepolia.profile.json +301 -0
- package/data/packs/usdc-domain-usdc.profile.json +437 -0
- package/data/packs/usdc.profile.json +421 -0
- package/data/packs/x402-exact-permit2.profile.json +251 -0
- package/data/packs/x402-upto-permit2.profile.json +254 -0
- package/data/profile-v0.schema.json +35 -2
- package/data/profile-v0.validate.mjs +3 -3
- package/package.json +1 -1
- package/src/analyze.mjs +55 -13
- package/src/browser.mjs +2 -1
- package/src/checks.mjs +22 -0
- package/src/resolve.mjs +3 -1
- package/src/served.mjs +6 -6
|
@@ -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
|
+
}
|