@cancore/contracts 0.1.0 → 0.2.0-rc.13

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 (62) hide show
  1. package/README.md +522 -10
  2. package/dist/abi.d.ts +6598 -1675
  3. package/dist/abi.js +1 -1
  4. package/dist/chunk-2ELHDMZ7.js +9911 -0
  5. package/dist/chunk-2ELHDMZ7.js.map +1 -0
  6. package/dist/{chunk-CIBYXHSX.js → chunk-IAPV7XWJ.js} +2 -2
  7. package/dist/chunk-IAPV7XWJ.js.map +1 -0
  8. package/dist/index.d.ts +1774 -29
  9. package/dist/index.js +3692 -21
  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 +2666 -0
  18. package/spec/abi/FeeVault.json +604 -0
  19. package/spec/abi/HTLC.json +717 -0
  20. package/spec/abi/IAttribute.json +110 -0
  21. package/spec/abi/IBurnMintERC20.json +252 -0
  22. package/spec/abi/ICancoreRouter.json +1361 -0
  23. package/spec/abi/IFormula.json +28 -0
  24. package/spec/abi/IHTLC.json +382 -0
  25. package/spec/abi/IPayment.json +40 -0
  26. package/spec/abi/IPermit2.json +150 -0
  27. package/spec/abi/IResolver.json +55 -0
  28. package/spec/abi/IStep.json +30 -0
  29. package/spec/abi/IVariableRole.json +141 -0
  30. package/spec/abi/MultiBalanceChecker.json +34 -0
  31. package/spec/abi/PointsClaim.json +791 -0
  32. package/spec/constants.json +66 -0
  33. package/spec/protocol/asyncapi.json +1587 -0
  34. package/spec/protocol/messages.schema.json +906 -0
  35. package/spec/protocol/records.schema.json +94 -0
  36. package/spec/protocol/rest.schema.json +193 -0
  37. package/spec/protocol/typed-data/CantonTicketReceipt.json +77 -0
  38. package/spec/protocol/typed-data/FillerAuth.json +58 -0
  39. package/spec/protocol/typed-data/FillerKeyRegistration.json +69 -0
  40. package/spec/protocol/typed-data/FillerMessage.json +115 -0
  41. package/spec/protocol/typed-data/FillerQuote.json +75 -0
  42. package/spec/protocol/typed-data/GatewayMessage.json +95 -0
  43. package/spec/protocol/typed-data/StakeBinding.json +75 -0
  44. package/spec/protocol/typed-data/TicketIntent.json +113 -0
  45. package/spec/protocol/typed-data/TicketReceipt.json +51 -0
  46. package/spec/protocol/vectors/draw.json +61 -0
  47. package/spec/protocol/vectors/jcs.json +59 -0
  48. package/spec/protocol/vectors/messages.json +743 -0
  49. package/spec/protocol/vectors/records.json +81 -0
  50. package/spec/protocol/vectors/settle-attestations.json +544 -0
  51. package/spec/typed-data/FillProof.json +227 -0
  52. package/spec/typed-data/FillTicket.json +116 -0
  53. package/spec/typed-data/Order.json +169 -0
  54. package/spec/typed-data/Quote.json +79 -0
  55. package/spec/vectors/canton-destination.json +60 -0
  56. package/spec/vectors/canton-order.json +70 -0
  57. package/spec/vectors/evm-order.json +50 -0
  58. package/spec/vectors/fee-split.json +179 -0
  59. package/spec/vectors/permit-witness.json +150 -0
  60. package/dist/chunk-CIBYXHSX.js.map +0 -1
  61. package/dist/chunk-ZSX67S72.js +0 -3423
  62. package/dist/chunk-ZSX67S72.js.map +0 -1
@@ -0,0 +1,717 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [],
9
+ "name": "ClaimTimeExpired",
10
+ "type": "error"
11
+ },
12
+ {
13
+ "inputs": [],
14
+ "name": "InvalidFeeRate",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [],
19
+ "name": "InvalidPermit2Parameters",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "InvalidPermitParameters",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [],
29
+ "name": "InvalidPreImage",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [],
34
+ "name": "InvalidUnlockTime",
35
+ "type": "error"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "LockAlreadyExists",
40
+ "type": "error"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "LockNotFound",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [],
49
+ "name": "Permit2NotSet",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [],
54
+ "name": "RetakeTimeNotReached",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "SenderEqualsReceiver",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "TransferFailed",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [],
69
+ "name": "UnauthorizedClaim",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [],
74
+ "name": "UnauthorizedRetake",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "ZeroAddress",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "ZeroAmount",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": false,
92
+ "internalType": "string",
93
+ "name": "preImage",
94
+ "type": "string"
95
+ },
96
+ {
97
+ "indexed": false,
98
+ "internalType": "bytes32",
99
+ "name": "hashValue",
100
+ "type": "bytes32"
101
+ },
102
+ {
103
+ "indexed": false,
104
+ "internalType": "uint256",
105
+ "name": "when",
106
+ "type": "uint256"
107
+ },
108
+ {
109
+ "indexed": false,
110
+ "internalType": "uint256",
111
+ "name": "amount",
112
+ "type": "uint256"
113
+ },
114
+ {
115
+ "indexed": false,
116
+ "internalType": "uint256",
117
+ "name": "feeAmount",
118
+ "type": "uint256"
119
+ },
120
+ {
121
+ "indexed": true,
122
+ "internalType": "address",
123
+ "name": "tokenAddress",
124
+ "type": "address"
125
+ },
126
+ {
127
+ "indexed": true,
128
+ "internalType": "address",
129
+ "name": "senderAddress",
130
+ "type": "address"
131
+ },
132
+ {
133
+ "indexed": true,
134
+ "internalType": "address",
135
+ "name": "receiverAddress",
136
+ "type": "address"
137
+ }
138
+ ],
139
+ "name": "Claimed",
140
+ "type": "event"
141
+ },
142
+ {
143
+ "anonymous": false,
144
+ "inputs": [
145
+ {
146
+ "indexed": false,
147
+ "internalType": "uint256",
148
+ "name": "oldRate",
149
+ "type": "uint256"
150
+ },
151
+ {
152
+ "indexed": false,
153
+ "internalType": "uint256",
154
+ "name": "newRate",
155
+ "type": "uint256"
156
+ }
157
+ ],
158
+ "name": "FeeRateUpdated",
159
+ "type": "event"
160
+ },
161
+ {
162
+ "anonymous": false,
163
+ "inputs": [
164
+ {
165
+ "indexed": true,
166
+ "internalType": "address",
167
+ "name": "oldRecipient",
168
+ "type": "address"
169
+ },
170
+ {
171
+ "indexed": true,
172
+ "internalType": "address",
173
+ "name": "newRecipient",
174
+ "type": "address"
175
+ }
176
+ ],
177
+ "name": "FeeRecipientUpdated",
178
+ "type": "event"
179
+ },
180
+ {
181
+ "anonymous": false,
182
+ "inputs": [
183
+ {
184
+ "indexed": false,
185
+ "internalType": "bytes32",
186
+ "name": "hashValue",
187
+ "type": "bytes32"
188
+ },
189
+ {
190
+ "indexed": false,
191
+ "internalType": "uint256",
192
+ "name": "when",
193
+ "type": "uint256"
194
+ },
195
+ {
196
+ "indexed": false,
197
+ "internalType": "uint256",
198
+ "name": "amount",
199
+ "type": "uint256"
200
+ },
201
+ {
202
+ "indexed": true,
203
+ "internalType": "address",
204
+ "name": "tokenAddress",
205
+ "type": "address"
206
+ },
207
+ {
208
+ "indexed": true,
209
+ "internalType": "address",
210
+ "name": "senderAddress",
211
+ "type": "address"
212
+ },
213
+ {
214
+ "indexed": true,
215
+ "internalType": "address",
216
+ "name": "receiverAddress",
217
+ "type": "address"
218
+ }
219
+ ],
220
+ "name": "Locked",
221
+ "type": "event"
222
+ },
223
+ {
224
+ "anonymous": false,
225
+ "inputs": [
226
+ {
227
+ "indexed": true,
228
+ "internalType": "address",
229
+ "name": "previousOwner",
230
+ "type": "address"
231
+ },
232
+ {
233
+ "indexed": true,
234
+ "internalType": "address",
235
+ "name": "newOwner",
236
+ "type": "address"
237
+ }
238
+ ],
239
+ "name": "OwnershipTransferred",
240
+ "type": "event"
241
+ },
242
+ {
243
+ "anonymous": false,
244
+ "inputs": [
245
+ {
246
+ "indexed": true,
247
+ "internalType": "address",
248
+ "name": "oldPermit2",
249
+ "type": "address"
250
+ },
251
+ {
252
+ "indexed": true,
253
+ "internalType": "address",
254
+ "name": "newPermit2",
255
+ "type": "address"
256
+ }
257
+ ],
258
+ "name": "Permit2Updated",
259
+ "type": "event"
260
+ },
261
+ {
262
+ "anonymous": false,
263
+ "inputs": [
264
+ {
265
+ "indexed": false,
266
+ "internalType": "bytes32",
267
+ "name": "hashValue",
268
+ "type": "bytes32"
269
+ },
270
+ {
271
+ "indexed": false,
272
+ "internalType": "uint256",
273
+ "name": "when",
274
+ "type": "uint256"
275
+ },
276
+ {
277
+ "indexed": false,
278
+ "internalType": "uint256",
279
+ "name": "amount",
280
+ "type": "uint256"
281
+ },
282
+ {
283
+ "indexed": true,
284
+ "internalType": "address",
285
+ "name": "tokenAddress",
286
+ "type": "address"
287
+ },
288
+ {
289
+ "indexed": true,
290
+ "internalType": "address",
291
+ "name": "senderAddress",
292
+ "type": "address"
293
+ },
294
+ {
295
+ "indexed": true,
296
+ "internalType": "address",
297
+ "name": "receiverAddress",
298
+ "type": "address"
299
+ }
300
+ ],
301
+ "name": "Retaken",
302
+ "type": "event"
303
+ },
304
+ {
305
+ "inputs": [],
306
+ "name": "MAX_FEE_RATE",
307
+ "outputs": [
308
+ {
309
+ "internalType": "uint256",
310
+ "name": "",
311
+ "type": "uint256"
312
+ }
313
+ ],
314
+ "stateMutability": "view",
315
+ "type": "function"
316
+ },
317
+ {
318
+ "inputs": [
319
+ {
320
+ "internalType": "string",
321
+ "name": "preImage",
322
+ "type": "string"
323
+ },
324
+ {
325
+ "internalType": "address",
326
+ "name": "senderAddress",
327
+ "type": "address"
328
+ }
329
+ ],
330
+ "name": "claim",
331
+ "outputs": [],
332
+ "stateMutability": "nonpayable",
333
+ "type": "function"
334
+ },
335
+ {
336
+ "inputs": [],
337
+ "name": "feeRate",
338
+ "outputs": [
339
+ {
340
+ "internalType": "uint256",
341
+ "name": "",
342
+ "type": "uint256"
343
+ }
344
+ ],
345
+ "stateMutability": "view",
346
+ "type": "function"
347
+ },
348
+ {
349
+ "inputs": [],
350
+ "name": "feeRecipient",
351
+ "outputs": [
352
+ {
353
+ "internalType": "address",
354
+ "name": "",
355
+ "type": "address"
356
+ }
357
+ ],
358
+ "stateMutability": "view",
359
+ "type": "function"
360
+ },
361
+ {
362
+ "inputs": [
363
+ {
364
+ "internalType": "bytes32",
365
+ "name": "hashValue",
366
+ "type": "bytes32"
367
+ },
368
+ {
369
+ "internalType": "address",
370
+ "name": "senderAddress",
371
+ "type": "address"
372
+ }
373
+ ],
374
+ "name": "getLock",
375
+ "outputs": [
376
+ {
377
+ "internalType": "uint256",
378
+ "name": "unlockTime",
379
+ "type": "uint256"
380
+ },
381
+ {
382
+ "internalType": "uint256",
383
+ "name": "amount",
384
+ "type": "uint256"
385
+ },
386
+ {
387
+ "internalType": "address",
388
+ "name": "tokenAddress",
389
+ "type": "address"
390
+ },
391
+ {
392
+ "internalType": "address",
393
+ "name": "senderAddr",
394
+ "type": "address"
395
+ },
396
+ {
397
+ "internalType": "address",
398
+ "name": "receiverAddress",
399
+ "type": "address"
400
+ }
401
+ ],
402
+ "stateMutability": "view",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "inputs": [
407
+ {
408
+ "internalType": "bytes32",
409
+ "name": "hashValue",
410
+ "type": "bytes32"
411
+ },
412
+ {
413
+ "internalType": "uint256",
414
+ "name": "unlockTime",
415
+ "type": "uint256"
416
+ },
417
+ {
418
+ "internalType": "uint256",
419
+ "name": "amount",
420
+ "type": "uint256"
421
+ },
422
+ {
423
+ "internalType": "address",
424
+ "name": "tokenAddress",
425
+ "type": "address"
426
+ },
427
+ {
428
+ "internalType": "address",
429
+ "name": "receiverAddress",
430
+ "type": "address"
431
+ }
432
+ ],
433
+ "name": "lock",
434
+ "outputs": [],
435
+ "stateMutability": "nonpayable",
436
+ "type": "function"
437
+ },
438
+ {
439
+ "inputs": [
440
+ {
441
+ "internalType": "bytes32",
442
+ "name": "hashValue",
443
+ "type": "bytes32"
444
+ },
445
+ {
446
+ "internalType": "uint256",
447
+ "name": "unlockTime",
448
+ "type": "uint256"
449
+ },
450
+ {
451
+ "internalType": "uint256",
452
+ "name": "amount",
453
+ "type": "uint256"
454
+ },
455
+ {
456
+ "internalType": "address",
457
+ "name": "tokenAddress",
458
+ "type": "address"
459
+ },
460
+ {
461
+ "internalType": "address",
462
+ "name": "receiverAddress",
463
+ "type": "address"
464
+ },
465
+ {
466
+ "internalType": "uint256",
467
+ "name": "deadline",
468
+ "type": "uint256"
469
+ },
470
+ {
471
+ "internalType": "uint8",
472
+ "name": "v",
473
+ "type": "uint8"
474
+ },
475
+ {
476
+ "internalType": "bytes32",
477
+ "name": "r",
478
+ "type": "bytes32"
479
+ },
480
+ {
481
+ "internalType": "bytes32",
482
+ "name": "s",
483
+ "type": "bytes32"
484
+ }
485
+ ],
486
+ "name": "lockWithPermit",
487
+ "outputs": [],
488
+ "stateMutability": "nonpayable",
489
+ "type": "function"
490
+ },
491
+ {
492
+ "inputs": [
493
+ {
494
+ "internalType": "bytes32",
495
+ "name": "hashValue",
496
+ "type": "bytes32"
497
+ },
498
+ {
499
+ "internalType": "uint256",
500
+ "name": "unlockTime",
501
+ "type": "uint256"
502
+ },
503
+ {
504
+ "internalType": "uint256",
505
+ "name": "amount",
506
+ "type": "uint256"
507
+ },
508
+ {
509
+ "internalType": "address",
510
+ "name": "tokenAddress",
511
+ "type": "address"
512
+ },
513
+ {
514
+ "internalType": "address",
515
+ "name": "receiverAddress",
516
+ "type": "address"
517
+ },
518
+ {
519
+ "components": [
520
+ {
521
+ "components": [
522
+ {
523
+ "internalType": "address",
524
+ "name": "token",
525
+ "type": "address"
526
+ },
527
+ {
528
+ "internalType": "uint256",
529
+ "name": "amount",
530
+ "type": "uint256"
531
+ }
532
+ ],
533
+ "internalType": "struct IPermit2.TokenPermissions",
534
+ "name": "permitted",
535
+ "type": "tuple"
536
+ },
537
+ {
538
+ "internalType": "uint256",
539
+ "name": "nonce",
540
+ "type": "uint256"
541
+ },
542
+ {
543
+ "internalType": "uint256",
544
+ "name": "deadline",
545
+ "type": "uint256"
546
+ }
547
+ ],
548
+ "internalType": "struct IPermit2.PermitTransferFrom",
549
+ "name": "permit",
550
+ "type": "tuple"
551
+ },
552
+ {
553
+ "components": [
554
+ {
555
+ "internalType": "address",
556
+ "name": "to",
557
+ "type": "address"
558
+ },
559
+ {
560
+ "internalType": "uint256",
561
+ "name": "requestedAmount",
562
+ "type": "uint256"
563
+ }
564
+ ],
565
+ "internalType": "struct IPermit2.SignatureTransferDetails",
566
+ "name": "transferDetails",
567
+ "type": "tuple"
568
+ },
569
+ {
570
+ "internalType": "bytes",
571
+ "name": "signature",
572
+ "type": "bytes"
573
+ }
574
+ ],
575
+ "name": "lockWithPermit2",
576
+ "outputs": [],
577
+ "stateMutability": "nonpayable",
578
+ "type": "function"
579
+ },
580
+ {
581
+ "inputs": [
582
+ {
583
+ "internalType": "bytes32",
584
+ "name": "",
585
+ "type": "bytes32"
586
+ }
587
+ ],
588
+ "name": "locks",
589
+ "outputs": [
590
+ {
591
+ "internalType": "uint256",
592
+ "name": "unlockTime",
593
+ "type": "uint256"
594
+ },
595
+ {
596
+ "internalType": "uint256",
597
+ "name": "amount",
598
+ "type": "uint256"
599
+ },
600
+ {
601
+ "internalType": "address",
602
+ "name": "tokenAddress",
603
+ "type": "address"
604
+ },
605
+ {
606
+ "internalType": "address",
607
+ "name": "senderAddress",
608
+ "type": "address"
609
+ },
610
+ {
611
+ "internalType": "address",
612
+ "name": "receiverAddress",
613
+ "type": "address"
614
+ }
615
+ ],
616
+ "stateMutability": "view",
617
+ "type": "function"
618
+ },
619
+ {
620
+ "inputs": [],
621
+ "name": "owner",
622
+ "outputs": [
623
+ {
624
+ "internalType": "address",
625
+ "name": "",
626
+ "type": "address"
627
+ }
628
+ ],
629
+ "stateMutability": "view",
630
+ "type": "function"
631
+ },
632
+ {
633
+ "inputs": [],
634
+ "name": "permit2",
635
+ "outputs": [
636
+ {
637
+ "internalType": "address",
638
+ "name": "",
639
+ "type": "address"
640
+ }
641
+ ],
642
+ "stateMutability": "view",
643
+ "type": "function"
644
+ },
645
+ {
646
+ "inputs": [],
647
+ "name": "renounceOwnership",
648
+ "outputs": [],
649
+ "stateMutability": "nonpayable",
650
+ "type": "function"
651
+ },
652
+ {
653
+ "inputs": [
654
+ {
655
+ "internalType": "bytes32",
656
+ "name": "hashValue",
657
+ "type": "bytes32"
658
+ }
659
+ ],
660
+ "name": "retake",
661
+ "outputs": [],
662
+ "stateMutability": "nonpayable",
663
+ "type": "function"
664
+ },
665
+ {
666
+ "inputs": [
667
+ {
668
+ "internalType": "uint256",
669
+ "name": "newFeeRate",
670
+ "type": "uint256"
671
+ }
672
+ ],
673
+ "name": "setFeeRate",
674
+ "outputs": [],
675
+ "stateMutability": "nonpayable",
676
+ "type": "function"
677
+ },
678
+ {
679
+ "inputs": [
680
+ {
681
+ "internalType": "address",
682
+ "name": "newFeeRecipient",
683
+ "type": "address"
684
+ }
685
+ ],
686
+ "name": "setFeeRecipient",
687
+ "outputs": [],
688
+ "stateMutability": "nonpayable",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [
693
+ {
694
+ "internalType": "address",
695
+ "name": "newPermit2",
696
+ "type": "address"
697
+ }
698
+ ],
699
+ "name": "setPermit2",
700
+ "outputs": [],
701
+ "stateMutability": "nonpayable",
702
+ "type": "function"
703
+ },
704
+ {
705
+ "inputs": [
706
+ {
707
+ "internalType": "address",
708
+ "name": "newOwner",
709
+ "type": "address"
710
+ }
711
+ ],
712
+ "name": "transferOwnership",
713
+ "outputs": [],
714
+ "stateMutability": "nonpayable",
715
+ "type": "function"
716
+ }
717
+ ]