@cancore/contracts 0.1.0 → 0.2.0-rc.6

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.
Files changed (50) hide show
  1. package/README.md +266 -10
  2. package/dist/abi.d.ts +6086 -1675
  3. package/dist/abi.js +1 -1
  4. package/dist/{chunk-CIBYXHSX.js → chunk-IAPV7XWJ.js} +2 -2
  5. package/dist/chunk-IAPV7XWJ.js.map +1 -0
  6. package/dist/chunk-NV5IUURP.js +9252 -0
  7. package/dist/chunk-NV5IUURP.js.map +1 -0
  8. package/dist/index.d.ts +1180 -29
  9. package/dist/index.js +2600 -17
  10. package/dist/index.js.map +1 -1
  11. package/dist/networks.d.ts +2 -2
  12. package/dist/networks.js +1 -1
  13. package/package.json +10 -8
  14. package/spec/abi/AttestorSet.json +476 -0
  15. package/spec/abi/CNRX.json +1294 -0
  16. package/spec/abi/CNRXStaking.json +510 -0
  17. package/spec/abi/CancoreRouter.json +2564 -0
  18. package/spec/abi/FeeVault.json +604 -0
  19. package/spec/abi/HTLC.json +717 -0
  20. package/spec/abi/IBurnMintERC20.json +252 -0
  21. package/spec/abi/ICancoreRouter.json +1226 -0
  22. package/spec/abi/IHTLC.json +382 -0
  23. package/spec/abi/IPermit2.json +150 -0
  24. package/spec/abi/MultiBalanceChecker.json +34 -0
  25. package/spec/abi/PointsClaim.json +791 -0
  26. package/spec/protocol/asyncapi.json +1288 -0
  27. package/spec/protocol/messages.schema.json +525 -0
  28. package/spec/protocol/records.schema.json +94 -0
  29. package/spec/protocol/rest.schema.json +118 -0
  30. package/spec/protocol/typed-data/FillerAuth.json +58 -0
  31. package/spec/protocol/typed-data/FillerKeyRegistration.json +69 -0
  32. package/spec/protocol/typed-data/FillerMessage.json +115 -0
  33. package/spec/protocol/typed-data/FillerQuote.json +75 -0
  34. package/spec/protocol/typed-data/GatewayMessage.json +93 -0
  35. package/spec/protocol/typed-data/StakeBinding.json +75 -0
  36. package/spec/protocol/typed-data/TicketIntent.json +113 -0
  37. package/spec/protocol/typed-data/TicketReceipt.json +51 -0
  38. package/spec/protocol/vectors/draw.json +61 -0
  39. package/spec/protocol/vectors/jcs.json +59 -0
  40. package/spec/protocol/vectors/messages.json +523 -0
  41. package/spec/protocol/vectors/records.json +81 -0
  42. package/spec/protocol/vectors/settle-attestations.json +542 -0
  43. package/spec/typed-data/FillProof.json +227 -0
  44. package/spec/typed-data/FillTicket.json +115 -0
  45. package/spec/typed-data/Order.json +141 -0
  46. package/spec/typed-data/Quote.json +69 -0
  47. package/spec/vectors/canton-order.json +67 -0
  48. package/dist/chunk-CIBYXHSX.js.map +0 -1
  49. package/dist/chunk-ZSX67S72.js +0 -3423
  50. package/dist/chunk-ZSX67S72.js.map +0 -1
@@ -0,0 +1,382 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "name": "MAX_FEE_RATE",
5
+ "outputs": [
6
+ {
7
+ "internalType": "uint256",
8
+ "name": "",
9
+ "type": "uint256"
10
+ }
11
+ ],
12
+ "stateMutability": "view",
13
+ "type": "function"
14
+ },
15
+ {
16
+ "inputs": [
17
+ {
18
+ "internalType": "string",
19
+ "name": "preImage",
20
+ "type": "string"
21
+ },
22
+ {
23
+ "internalType": "address",
24
+ "name": "senderAddress",
25
+ "type": "address"
26
+ }
27
+ ],
28
+ "name": "claim",
29
+ "outputs": [],
30
+ "stateMutability": "nonpayable",
31
+ "type": "function"
32
+ },
33
+ {
34
+ "inputs": [],
35
+ "name": "feeRate",
36
+ "outputs": [
37
+ {
38
+ "internalType": "uint256",
39
+ "name": "",
40
+ "type": "uint256"
41
+ }
42
+ ],
43
+ "stateMutability": "view",
44
+ "type": "function"
45
+ },
46
+ {
47
+ "inputs": [],
48
+ "name": "feeRecipient",
49
+ "outputs": [
50
+ {
51
+ "internalType": "address",
52
+ "name": "",
53
+ "type": "address"
54
+ }
55
+ ],
56
+ "stateMutability": "view",
57
+ "type": "function"
58
+ },
59
+ {
60
+ "inputs": [
61
+ {
62
+ "internalType": "bytes32",
63
+ "name": "hashValue",
64
+ "type": "bytes32"
65
+ },
66
+ {
67
+ "internalType": "address",
68
+ "name": "senderAddress",
69
+ "type": "address"
70
+ }
71
+ ],
72
+ "name": "getLock",
73
+ "outputs": [
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "unlockTime",
77
+ "type": "uint256"
78
+ },
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "amount",
82
+ "type": "uint256"
83
+ },
84
+ {
85
+ "internalType": "address",
86
+ "name": "tokenAddress",
87
+ "type": "address"
88
+ },
89
+ {
90
+ "internalType": "address",
91
+ "name": "senderAddr",
92
+ "type": "address"
93
+ },
94
+ {
95
+ "internalType": "address",
96
+ "name": "receiverAddress",
97
+ "type": "address"
98
+ }
99
+ ],
100
+ "stateMutability": "view",
101
+ "type": "function"
102
+ },
103
+ {
104
+ "inputs": [
105
+ {
106
+ "internalType": "bytes32",
107
+ "name": "hashValue",
108
+ "type": "bytes32"
109
+ },
110
+ {
111
+ "internalType": "uint256",
112
+ "name": "unlockTime",
113
+ "type": "uint256"
114
+ },
115
+ {
116
+ "internalType": "uint256",
117
+ "name": "amount",
118
+ "type": "uint256"
119
+ },
120
+ {
121
+ "internalType": "address",
122
+ "name": "tokenAddress",
123
+ "type": "address"
124
+ },
125
+ {
126
+ "internalType": "address",
127
+ "name": "receiverAddress",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "name": "lock",
132
+ "outputs": [],
133
+ "stateMutability": "nonpayable",
134
+ "type": "function"
135
+ },
136
+ {
137
+ "inputs": [
138
+ {
139
+ "internalType": "bytes32",
140
+ "name": "hashValue",
141
+ "type": "bytes32"
142
+ },
143
+ {
144
+ "internalType": "uint256",
145
+ "name": "unlockTime",
146
+ "type": "uint256"
147
+ },
148
+ {
149
+ "internalType": "uint256",
150
+ "name": "amount",
151
+ "type": "uint256"
152
+ },
153
+ {
154
+ "internalType": "address",
155
+ "name": "tokenAddress",
156
+ "type": "address"
157
+ },
158
+ {
159
+ "internalType": "address",
160
+ "name": "receiverAddress",
161
+ "type": "address"
162
+ },
163
+ {
164
+ "internalType": "uint256",
165
+ "name": "deadline",
166
+ "type": "uint256"
167
+ },
168
+ {
169
+ "internalType": "uint8",
170
+ "name": "v",
171
+ "type": "uint8"
172
+ },
173
+ {
174
+ "internalType": "bytes32",
175
+ "name": "r",
176
+ "type": "bytes32"
177
+ },
178
+ {
179
+ "internalType": "bytes32",
180
+ "name": "s",
181
+ "type": "bytes32"
182
+ }
183
+ ],
184
+ "name": "lockWithPermit",
185
+ "outputs": [],
186
+ "stateMutability": "nonpayable",
187
+ "type": "function"
188
+ },
189
+ {
190
+ "inputs": [
191
+ {
192
+ "internalType": "bytes32",
193
+ "name": "hashValue",
194
+ "type": "bytes32"
195
+ },
196
+ {
197
+ "internalType": "uint256",
198
+ "name": "unlockTime",
199
+ "type": "uint256"
200
+ },
201
+ {
202
+ "internalType": "uint256",
203
+ "name": "amount",
204
+ "type": "uint256"
205
+ },
206
+ {
207
+ "internalType": "address",
208
+ "name": "tokenAddress",
209
+ "type": "address"
210
+ },
211
+ {
212
+ "internalType": "address",
213
+ "name": "receiverAddress",
214
+ "type": "address"
215
+ },
216
+ {
217
+ "components": [
218
+ {
219
+ "components": [
220
+ {
221
+ "internalType": "address",
222
+ "name": "token",
223
+ "type": "address"
224
+ },
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "amount",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "internalType": "struct IPermit2.TokenPermissions",
232
+ "name": "permitted",
233
+ "type": "tuple"
234
+ },
235
+ {
236
+ "internalType": "uint256",
237
+ "name": "nonce",
238
+ "type": "uint256"
239
+ },
240
+ {
241
+ "internalType": "uint256",
242
+ "name": "deadline",
243
+ "type": "uint256"
244
+ }
245
+ ],
246
+ "internalType": "struct IPermit2.PermitTransferFrom",
247
+ "name": "permit",
248
+ "type": "tuple"
249
+ },
250
+ {
251
+ "components": [
252
+ {
253
+ "internalType": "address",
254
+ "name": "to",
255
+ "type": "address"
256
+ },
257
+ {
258
+ "internalType": "uint256",
259
+ "name": "requestedAmount",
260
+ "type": "uint256"
261
+ }
262
+ ],
263
+ "internalType": "struct IPermit2.SignatureTransferDetails",
264
+ "name": "transferDetails",
265
+ "type": "tuple"
266
+ },
267
+ {
268
+ "internalType": "bytes",
269
+ "name": "signature",
270
+ "type": "bytes"
271
+ }
272
+ ],
273
+ "name": "lockWithPermit2",
274
+ "outputs": [],
275
+ "stateMutability": "nonpayable",
276
+ "type": "function"
277
+ },
278
+ {
279
+ "inputs": [
280
+ {
281
+ "internalType": "bytes32",
282
+ "name": "lockKey",
283
+ "type": "bytes32"
284
+ }
285
+ ],
286
+ "name": "locks",
287
+ "outputs": [
288
+ {
289
+ "internalType": "uint256",
290
+ "name": "unlockTime",
291
+ "type": "uint256"
292
+ },
293
+ {
294
+ "internalType": "uint256",
295
+ "name": "amount",
296
+ "type": "uint256"
297
+ },
298
+ {
299
+ "internalType": "address",
300
+ "name": "tokenAddress",
301
+ "type": "address"
302
+ },
303
+ {
304
+ "internalType": "address",
305
+ "name": "senderAddress",
306
+ "type": "address"
307
+ },
308
+ {
309
+ "internalType": "address",
310
+ "name": "receiverAddress",
311
+ "type": "address"
312
+ }
313
+ ],
314
+ "stateMutability": "view",
315
+ "type": "function"
316
+ },
317
+ {
318
+ "inputs": [],
319
+ "name": "permit2",
320
+ "outputs": [
321
+ {
322
+ "internalType": "address",
323
+ "name": "",
324
+ "type": "address"
325
+ }
326
+ ],
327
+ "stateMutability": "view",
328
+ "type": "function"
329
+ },
330
+ {
331
+ "inputs": [
332
+ {
333
+ "internalType": "bytes32",
334
+ "name": "hashValue",
335
+ "type": "bytes32"
336
+ }
337
+ ],
338
+ "name": "retake",
339
+ "outputs": [],
340
+ "stateMutability": "nonpayable",
341
+ "type": "function"
342
+ },
343
+ {
344
+ "inputs": [
345
+ {
346
+ "internalType": "uint256",
347
+ "name": "newFeeRate",
348
+ "type": "uint256"
349
+ }
350
+ ],
351
+ "name": "setFeeRate",
352
+ "outputs": [],
353
+ "stateMutability": "nonpayable",
354
+ "type": "function"
355
+ },
356
+ {
357
+ "inputs": [
358
+ {
359
+ "internalType": "address",
360
+ "name": "newFeeRecipient",
361
+ "type": "address"
362
+ }
363
+ ],
364
+ "name": "setFeeRecipient",
365
+ "outputs": [],
366
+ "stateMutability": "nonpayable",
367
+ "type": "function"
368
+ },
369
+ {
370
+ "inputs": [
371
+ {
372
+ "internalType": "address",
373
+ "name": "newPermit2",
374
+ "type": "address"
375
+ }
376
+ ],
377
+ "name": "setPermit2",
378
+ "outputs": [],
379
+ "stateMutability": "nonpayable",
380
+ "type": "function"
381
+ }
382
+ ]
@@ -0,0 +1,150 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "components": [
6
+ {
7
+ "components": [
8
+ {
9
+ "internalType": "address",
10
+ "name": "token",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "internalType": "uint256",
15
+ "name": "amount",
16
+ "type": "uint256"
17
+ }
18
+ ],
19
+ "internalType": "struct IPermit2.TokenPermissions",
20
+ "name": "permitted",
21
+ "type": "tuple"
22
+ },
23
+ {
24
+ "internalType": "uint256",
25
+ "name": "nonce",
26
+ "type": "uint256"
27
+ },
28
+ {
29
+ "internalType": "uint256",
30
+ "name": "deadline",
31
+ "type": "uint256"
32
+ }
33
+ ],
34
+ "internalType": "struct IPermit2.PermitTransferFrom",
35
+ "name": "permit",
36
+ "type": "tuple"
37
+ },
38
+ {
39
+ "components": [
40
+ {
41
+ "internalType": "address",
42
+ "name": "to",
43
+ "type": "address"
44
+ },
45
+ {
46
+ "internalType": "uint256",
47
+ "name": "requestedAmount",
48
+ "type": "uint256"
49
+ }
50
+ ],
51
+ "internalType": "struct IPermit2.SignatureTransferDetails",
52
+ "name": "transferDetails",
53
+ "type": "tuple"
54
+ },
55
+ {
56
+ "internalType": "address",
57
+ "name": "owner",
58
+ "type": "address"
59
+ },
60
+ {
61
+ "internalType": "bytes",
62
+ "name": "signature",
63
+ "type": "bytes"
64
+ }
65
+ ],
66
+ "name": "permitTransferFrom",
67
+ "outputs": [],
68
+ "stateMutability": "nonpayable",
69
+ "type": "function"
70
+ },
71
+ {
72
+ "inputs": [
73
+ {
74
+ "components": [
75
+ {
76
+ "components": [
77
+ {
78
+ "internalType": "address",
79
+ "name": "token",
80
+ "type": "address"
81
+ },
82
+ {
83
+ "internalType": "uint256",
84
+ "name": "amount",
85
+ "type": "uint256"
86
+ }
87
+ ],
88
+ "internalType": "struct IPermit2.TokenPermissions",
89
+ "name": "permitted",
90
+ "type": "tuple"
91
+ },
92
+ {
93
+ "internalType": "uint256",
94
+ "name": "nonce",
95
+ "type": "uint256"
96
+ },
97
+ {
98
+ "internalType": "uint256",
99
+ "name": "deadline",
100
+ "type": "uint256"
101
+ }
102
+ ],
103
+ "internalType": "struct IPermit2.PermitTransferFrom",
104
+ "name": "permit",
105
+ "type": "tuple"
106
+ },
107
+ {
108
+ "components": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "to",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "requestedAmount",
117
+ "type": "uint256"
118
+ }
119
+ ],
120
+ "internalType": "struct IPermit2.SignatureTransferDetails",
121
+ "name": "transferDetails",
122
+ "type": "tuple"
123
+ },
124
+ {
125
+ "internalType": "address",
126
+ "name": "owner",
127
+ "type": "address"
128
+ },
129
+ {
130
+ "internalType": "bytes32",
131
+ "name": "witness",
132
+ "type": "bytes32"
133
+ },
134
+ {
135
+ "internalType": "string",
136
+ "name": "witnessTypeString",
137
+ "type": "string"
138
+ },
139
+ {
140
+ "internalType": "bytes",
141
+ "name": "signature",
142
+ "type": "bytes"
143
+ }
144
+ ],
145
+ "name": "permitWitnessTransferFrom",
146
+ "outputs": [],
147
+ "stateMutability": "nonpayable",
148
+ "type": "function"
149
+ }
150
+ ]
@@ -0,0 +1,34 @@
1
+ [
2
+ {
3
+ "stateMutability": "payable",
4
+ "type": "fallback"
5
+ },
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "address[]",
10
+ "name": "users",
11
+ "type": "address[]"
12
+ },
13
+ {
14
+ "internalType": "address[]",
15
+ "name": "tokens",
16
+ "type": "address[]"
17
+ }
18
+ ],
19
+ "name": "balances",
20
+ "outputs": [
21
+ {
22
+ "internalType": "uint256[]",
23
+ "name": "",
24
+ "type": "uint256[]"
25
+ }
26
+ ],
27
+ "stateMutability": "view",
28
+ "type": "function"
29
+ },
30
+ {
31
+ "stateMutability": "payable",
32
+ "type": "receive"
33
+ }
34
+ ]