@cancore/contracts 0.1.0 → 0.2.0-rc.3

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 (47) hide show
  1. package/README.md +168 -9
  2. package/dist/abi.d.ts +6086 -1675
  3. package/dist/abi.js +1 -1
  4. package/dist/chunk-NV5IUURP.js +9252 -0
  5. package/dist/chunk-NV5IUURP.js.map +1 -0
  6. package/dist/{chunk-CIBYXHSX.js → chunk-VODZRADO.js} +2 -2
  7. package/dist/chunk-VODZRADO.js.map +1 -0
  8. package/dist/index.d.ts +849 -28
  9. package/dist/index.js +2065 -16
  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 +1050 -0
  27. package/spec/protocol/messages.schema.json +414 -0
  28. package/spec/protocol/records.schema.json +93 -0
  29. package/spec/protocol/rest.schema.json +115 -0
  30. package/spec/protocol/typed-data/FillerAuth.json +58 -0
  31. package/spec/protocol/typed-data/FillerQuote.json +75 -0
  32. package/spec/protocol/typed-data/GatewayMessage.json +90 -0
  33. package/spec/protocol/typed-data/StakeBinding.json +75 -0
  34. package/spec/protocol/typed-data/TicketIntent.json +65 -0
  35. package/spec/protocol/typed-data/TicketReceipt.json +51 -0
  36. package/spec/protocol/vectors/draw.json +61 -0
  37. package/spec/protocol/vectors/jcs.json +59 -0
  38. package/spec/protocol/vectors/messages.json +343 -0
  39. package/spec/protocol/vectors/records.json +81 -0
  40. package/spec/typed-data/FillProof.json +199 -0
  41. package/spec/typed-data/FillTicket.json +83 -0
  42. package/spec/typed-data/Order.json +141 -0
  43. package/spec/typed-data/Quote.json +69 -0
  44. package/spec/vectors/canton-order.json +67 -0
  45. package/dist/chunk-CIBYXHSX.js.map +0 -1
  46. package/dist/chunk-ZSX67S72.js +0 -3423
  47. package/dist/chunk-ZSX67S72.js.map +0 -1
@@ -0,0 +1,791 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "contract IERC20",
6
+ "name": "token_",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "owner_",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "treasury_",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "ECDSAInvalidSignature",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [
30
+ {
31
+ "internalType": "uint256",
32
+ "name": "length",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "name": "ECDSAInvalidSignatureLength",
37
+ "type": "error"
38
+ },
39
+ {
40
+ "inputs": [
41
+ {
42
+ "internalType": "bytes32",
43
+ "name": "s",
44
+ "type": "bytes32"
45
+ }
46
+ ],
47
+ "name": "ECDSAInvalidSignatureS",
48
+ "type": "error"
49
+ },
50
+ {
51
+ "inputs": [],
52
+ "name": "InvalidSchedule",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "InvalidShortString",
58
+ "type": "error"
59
+ },
60
+ {
61
+ "inputs": [],
62
+ "name": "InvalidSigner",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "NotASigner",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [],
72
+ "name": "NothingToClaim",
73
+ "type": "error"
74
+ },
75
+ {
76
+ "inputs": [
77
+ {
78
+ "internalType": "address",
79
+ "name": "owner",
80
+ "type": "address"
81
+ }
82
+ ],
83
+ "name": "OwnableInvalidOwner",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [
88
+ {
89
+ "internalType": "address",
90
+ "name": "account",
91
+ "type": "address"
92
+ }
93
+ ],
94
+ "name": "OwnableUnauthorizedAccount",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "ReentrancyGuardReentrantCall",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "inputs": [],
104
+ "name": "RenounceDisabled",
105
+ "type": "error"
106
+ },
107
+ {
108
+ "inputs": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "token",
112
+ "type": "address"
113
+ }
114
+ ],
115
+ "name": "SafeERC20FailedOperation",
116
+ "type": "error"
117
+ },
118
+ {
119
+ "inputs": [],
120
+ "name": "SignerPermanentlyRevoked",
121
+ "type": "error"
122
+ },
123
+ {
124
+ "inputs": [
125
+ {
126
+ "internalType": "string",
127
+ "name": "str",
128
+ "type": "string"
129
+ }
130
+ ],
131
+ "name": "StringTooLong",
132
+ "type": "error"
133
+ },
134
+ {
135
+ "inputs": [],
136
+ "name": "VoucherExpired",
137
+ "type": "error"
138
+ },
139
+ {
140
+ "inputs": [],
141
+ "name": "VoucherIsCancelled",
142
+ "type": "error"
143
+ },
144
+ {
145
+ "inputs": [],
146
+ "name": "ZeroAddress",
147
+ "type": "error"
148
+ },
149
+ {
150
+ "inputs": [],
151
+ "name": "ZeroAmount",
152
+ "type": "error"
153
+ },
154
+ {
155
+ "anonymous": false,
156
+ "inputs": [
157
+ {
158
+ "indexed": true,
159
+ "internalType": "bytes32",
160
+ "name": "digest",
161
+ "type": "bytes32"
162
+ },
163
+ {
164
+ "indexed": true,
165
+ "internalType": "address",
166
+ "name": "beneficiary",
167
+ "type": "address"
168
+ },
169
+ {
170
+ "indexed": false,
171
+ "internalType": "uint256",
172
+ "name": "amount",
173
+ "type": "uint256"
174
+ },
175
+ {
176
+ "indexed": false,
177
+ "internalType": "uint256",
178
+ "name": "totalClaimed",
179
+ "type": "uint256"
180
+ }
181
+ ],
182
+ "name": "Claimed",
183
+ "type": "event"
184
+ },
185
+ {
186
+ "anonymous": false,
187
+ "inputs": [],
188
+ "name": "EIP712DomainChanged",
189
+ "type": "event"
190
+ },
191
+ {
192
+ "anonymous": false,
193
+ "inputs": [
194
+ {
195
+ "indexed": true,
196
+ "internalType": "address",
197
+ "name": "previousOwner",
198
+ "type": "address"
199
+ },
200
+ {
201
+ "indexed": true,
202
+ "internalType": "address",
203
+ "name": "newOwner",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "OwnershipTransferStarted",
208
+ "type": "event"
209
+ },
210
+ {
211
+ "anonymous": false,
212
+ "inputs": [
213
+ {
214
+ "indexed": true,
215
+ "internalType": "address",
216
+ "name": "previousOwner",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "indexed": true,
221
+ "internalType": "address",
222
+ "name": "newOwner",
223
+ "type": "address"
224
+ }
225
+ ],
226
+ "name": "OwnershipTransferred",
227
+ "type": "event"
228
+ },
229
+ {
230
+ "anonymous": false,
231
+ "inputs": [
232
+ {
233
+ "indexed": true,
234
+ "internalType": "address",
235
+ "name": "signer",
236
+ "type": "address"
237
+ }
238
+ ],
239
+ "name": "SignerAdded",
240
+ "type": "event"
241
+ },
242
+ {
243
+ "anonymous": false,
244
+ "inputs": [
245
+ {
246
+ "indexed": true,
247
+ "internalType": "address",
248
+ "name": "signer",
249
+ "type": "address"
250
+ }
251
+ ],
252
+ "name": "SignerRevoked",
253
+ "type": "event"
254
+ },
255
+ {
256
+ "anonymous": false,
257
+ "inputs": [
258
+ {
259
+ "indexed": true,
260
+ "internalType": "address",
261
+ "name": "to",
262
+ "type": "address"
263
+ },
264
+ {
265
+ "indexed": false,
266
+ "internalType": "uint256",
267
+ "name": "amount",
268
+ "type": "uint256"
269
+ }
270
+ ],
271
+ "name": "Swept",
272
+ "type": "event"
273
+ },
274
+ {
275
+ "anonymous": false,
276
+ "inputs": [
277
+ {
278
+ "indexed": true,
279
+ "internalType": "bytes32",
280
+ "name": "digest",
281
+ "type": "bytes32"
282
+ }
283
+ ],
284
+ "name": "VoucherCancelled",
285
+ "type": "event"
286
+ },
287
+ {
288
+ "inputs": [],
289
+ "name": "acceptOwnership",
290
+ "outputs": [],
291
+ "stateMutability": "nonpayable",
292
+ "type": "function"
293
+ },
294
+ {
295
+ "inputs": [
296
+ {
297
+ "internalType": "address",
298
+ "name": "signer",
299
+ "type": "address"
300
+ }
301
+ ],
302
+ "name": "addSigner",
303
+ "outputs": [],
304
+ "stateMutability": "nonpayable",
305
+ "type": "function"
306
+ },
307
+ {
308
+ "inputs": [
309
+ {
310
+ "internalType": "bytes32",
311
+ "name": "digest",
312
+ "type": "bytes32"
313
+ }
314
+ ],
315
+ "name": "cancelVoucher",
316
+ "outputs": [],
317
+ "stateMutability": "nonpayable",
318
+ "type": "function"
319
+ },
320
+ {
321
+ "inputs": [
322
+ {
323
+ "components": [
324
+ {
325
+ "internalType": "address",
326
+ "name": "beneficiary",
327
+ "type": "address"
328
+ },
329
+ {
330
+ "internalType": "uint256",
331
+ "name": "totalAmount",
332
+ "type": "uint256"
333
+ },
334
+ {
335
+ "internalType": "uint64",
336
+ "name": "cliffEnd",
337
+ "type": "uint64"
338
+ },
339
+ {
340
+ "internalType": "uint64",
341
+ "name": "vestEnd",
342
+ "type": "uint64"
343
+ },
344
+ {
345
+ "internalType": "uint256",
346
+ "name": "nonce",
347
+ "type": "uint256"
348
+ },
349
+ {
350
+ "internalType": "uint256",
351
+ "name": "deadline",
352
+ "type": "uint256"
353
+ }
354
+ ],
355
+ "internalType": "struct PointsClaim.Voucher",
356
+ "name": "v",
357
+ "type": "tuple"
358
+ },
359
+ {
360
+ "internalType": "bytes",
361
+ "name": "signature",
362
+ "type": "bytes"
363
+ }
364
+ ],
365
+ "name": "claim",
366
+ "outputs": [],
367
+ "stateMutability": "nonpayable",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "inputs": [
372
+ {
373
+ "components": [
374
+ {
375
+ "internalType": "address",
376
+ "name": "beneficiary",
377
+ "type": "address"
378
+ },
379
+ {
380
+ "internalType": "uint256",
381
+ "name": "totalAmount",
382
+ "type": "uint256"
383
+ },
384
+ {
385
+ "internalType": "uint64",
386
+ "name": "cliffEnd",
387
+ "type": "uint64"
388
+ },
389
+ {
390
+ "internalType": "uint64",
391
+ "name": "vestEnd",
392
+ "type": "uint64"
393
+ },
394
+ {
395
+ "internalType": "uint256",
396
+ "name": "nonce",
397
+ "type": "uint256"
398
+ },
399
+ {
400
+ "internalType": "uint256",
401
+ "name": "deadline",
402
+ "type": "uint256"
403
+ }
404
+ ],
405
+ "internalType": "struct PointsClaim.Voucher",
406
+ "name": "v",
407
+ "type": "tuple"
408
+ }
409
+ ],
410
+ "name": "claimableOf",
411
+ "outputs": [
412
+ {
413
+ "internalType": "uint256",
414
+ "name": "",
415
+ "type": "uint256"
416
+ }
417
+ ],
418
+ "stateMutability": "view",
419
+ "type": "function"
420
+ },
421
+ {
422
+ "inputs": [
423
+ {
424
+ "internalType": "bytes32",
425
+ "name": "digest",
426
+ "type": "bytes32"
427
+ }
428
+ ],
429
+ "name": "claimedOf",
430
+ "outputs": [
431
+ {
432
+ "internalType": "uint256",
433
+ "name": "amount",
434
+ "type": "uint256"
435
+ }
436
+ ],
437
+ "stateMutability": "view",
438
+ "type": "function"
439
+ },
440
+ {
441
+ "inputs": [
442
+ {
443
+ "components": [
444
+ {
445
+ "internalType": "address",
446
+ "name": "beneficiary",
447
+ "type": "address"
448
+ },
449
+ {
450
+ "internalType": "uint256",
451
+ "name": "totalAmount",
452
+ "type": "uint256"
453
+ },
454
+ {
455
+ "internalType": "uint64",
456
+ "name": "cliffEnd",
457
+ "type": "uint64"
458
+ },
459
+ {
460
+ "internalType": "uint64",
461
+ "name": "vestEnd",
462
+ "type": "uint64"
463
+ },
464
+ {
465
+ "internalType": "uint256",
466
+ "name": "nonce",
467
+ "type": "uint256"
468
+ },
469
+ {
470
+ "internalType": "uint256",
471
+ "name": "deadline",
472
+ "type": "uint256"
473
+ }
474
+ ],
475
+ "internalType": "struct PointsClaim.Voucher",
476
+ "name": "v",
477
+ "type": "tuple"
478
+ }
479
+ ],
480
+ "name": "digestOf",
481
+ "outputs": [
482
+ {
483
+ "internalType": "bytes32",
484
+ "name": "",
485
+ "type": "bytes32"
486
+ }
487
+ ],
488
+ "stateMutability": "view",
489
+ "type": "function"
490
+ },
491
+ {
492
+ "inputs": [],
493
+ "name": "eip712Domain",
494
+ "outputs": [
495
+ {
496
+ "internalType": "bytes1",
497
+ "name": "fields",
498
+ "type": "bytes1"
499
+ },
500
+ {
501
+ "internalType": "string",
502
+ "name": "name",
503
+ "type": "string"
504
+ },
505
+ {
506
+ "internalType": "string",
507
+ "name": "version",
508
+ "type": "string"
509
+ },
510
+ {
511
+ "internalType": "uint256",
512
+ "name": "chainId",
513
+ "type": "uint256"
514
+ },
515
+ {
516
+ "internalType": "address",
517
+ "name": "verifyingContract",
518
+ "type": "address"
519
+ },
520
+ {
521
+ "internalType": "bytes32",
522
+ "name": "salt",
523
+ "type": "bytes32"
524
+ },
525
+ {
526
+ "internalType": "uint256[]",
527
+ "name": "extensions",
528
+ "type": "uint256[]"
529
+ }
530
+ ],
531
+ "stateMutability": "view",
532
+ "type": "function"
533
+ },
534
+ {
535
+ "inputs": [
536
+ {
537
+ "internalType": "bytes32",
538
+ "name": "digest",
539
+ "type": "bytes32"
540
+ }
541
+ ],
542
+ "name": "isCancelled",
543
+ "outputs": [
544
+ {
545
+ "internalType": "bool",
546
+ "name": "",
547
+ "type": "bool"
548
+ }
549
+ ],
550
+ "stateMutability": "view",
551
+ "type": "function"
552
+ },
553
+ {
554
+ "inputs": [
555
+ {
556
+ "internalType": "address",
557
+ "name": "",
558
+ "type": "address"
559
+ }
560
+ ],
561
+ "name": "isSigner",
562
+ "outputs": [
563
+ {
564
+ "internalType": "bool",
565
+ "name": "",
566
+ "type": "bool"
567
+ }
568
+ ],
569
+ "stateMutability": "view",
570
+ "type": "function"
571
+ },
572
+ {
573
+ "inputs": [
574
+ {
575
+ "components": [
576
+ {
577
+ "internalType": "address",
578
+ "name": "beneficiary",
579
+ "type": "address"
580
+ },
581
+ {
582
+ "internalType": "uint256",
583
+ "name": "totalAmount",
584
+ "type": "uint256"
585
+ },
586
+ {
587
+ "internalType": "uint64",
588
+ "name": "cliffEnd",
589
+ "type": "uint64"
590
+ },
591
+ {
592
+ "internalType": "uint64",
593
+ "name": "vestEnd",
594
+ "type": "uint64"
595
+ },
596
+ {
597
+ "internalType": "uint256",
598
+ "name": "nonce",
599
+ "type": "uint256"
600
+ },
601
+ {
602
+ "internalType": "uint256",
603
+ "name": "deadline",
604
+ "type": "uint256"
605
+ }
606
+ ],
607
+ "internalType": "struct PointsClaim.Voucher",
608
+ "name": "v",
609
+ "type": "tuple"
610
+ }
611
+ ],
612
+ "name": "isValidVoucher",
613
+ "outputs": [
614
+ {
615
+ "internalType": "bool",
616
+ "name": "",
617
+ "type": "bool"
618
+ }
619
+ ],
620
+ "stateMutability": "pure",
621
+ "type": "function"
622
+ },
623
+ {
624
+ "inputs": [],
625
+ "name": "owner",
626
+ "outputs": [
627
+ {
628
+ "internalType": "address",
629
+ "name": "",
630
+ "type": "address"
631
+ }
632
+ ],
633
+ "stateMutability": "view",
634
+ "type": "function"
635
+ },
636
+ {
637
+ "inputs": [],
638
+ "name": "pendingOwner",
639
+ "outputs": [
640
+ {
641
+ "internalType": "address",
642
+ "name": "",
643
+ "type": "address"
644
+ }
645
+ ],
646
+ "stateMutability": "view",
647
+ "type": "function"
648
+ },
649
+ {
650
+ "inputs": [],
651
+ "name": "renounceOwnership",
652
+ "outputs": [],
653
+ "stateMutability": "pure",
654
+ "type": "function"
655
+ },
656
+ {
657
+ "inputs": [
658
+ {
659
+ "internalType": "address",
660
+ "name": "signer",
661
+ "type": "address"
662
+ }
663
+ ],
664
+ "name": "revokeSigner",
665
+ "outputs": [],
666
+ "stateMutability": "nonpayable",
667
+ "type": "function"
668
+ },
669
+ {
670
+ "inputs": [
671
+ {
672
+ "internalType": "address",
673
+ "name": "",
674
+ "type": "address"
675
+ }
676
+ ],
677
+ "name": "revokedSigners",
678
+ "outputs": [
679
+ {
680
+ "internalType": "bool",
681
+ "name": "",
682
+ "type": "bool"
683
+ }
684
+ ],
685
+ "stateMutability": "view",
686
+ "type": "function"
687
+ },
688
+ {
689
+ "inputs": [
690
+ {
691
+ "internalType": "uint256",
692
+ "name": "amount",
693
+ "type": "uint256"
694
+ }
695
+ ],
696
+ "name": "sweep",
697
+ "outputs": [],
698
+ "stateMutability": "nonpayable",
699
+ "type": "function"
700
+ },
701
+ {
702
+ "inputs": [],
703
+ "name": "token",
704
+ "outputs": [
705
+ {
706
+ "internalType": "contract IERC20",
707
+ "name": "",
708
+ "type": "address"
709
+ }
710
+ ],
711
+ "stateMutability": "view",
712
+ "type": "function"
713
+ },
714
+ {
715
+ "inputs": [
716
+ {
717
+ "internalType": "address",
718
+ "name": "newOwner",
719
+ "type": "address"
720
+ }
721
+ ],
722
+ "name": "transferOwnership",
723
+ "outputs": [],
724
+ "stateMutability": "nonpayable",
725
+ "type": "function"
726
+ },
727
+ {
728
+ "inputs": [],
729
+ "name": "treasury",
730
+ "outputs": [
731
+ {
732
+ "internalType": "address",
733
+ "name": "",
734
+ "type": "address"
735
+ }
736
+ ],
737
+ "stateMutability": "view",
738
+ "type": "function"
739
+ },
740
+ {
741
+ "inputs": [
742
+ {
743
+ "components": [
744
+ {
745
+ "internalType": "address",
746
+ "name": "beneficiary",
747
+ "type": "address"
748
+ },
749
+ {
750
+ "internalType": "uint256",
751
+ "name": "totalAmount",
752
+ "type": "uint256"
753
+ },
754
+ {
755
+ "internalType": "uint64",
756
+ "name": "cliffEnd",
757
+ "type": "uint64"
758
+ },
759
+ {
760
+ "internalType": "uint64",
761
+ "name": "vestEnd",
762
+ "type": "uint64"
763
+ },
764
+ {
765
+ "internalType": "uint256",
766
+ "name": "nonce",
767
+ "type": "uint256"
768
+ },
769
+ {
770
+ "internalType": "uint256",
771
+ "name": "deadline",
772
+ "type": "uint256"
773
+ }
774
+ ],
775
+ "internalType": "struct PointsClaim.Voucher",
776
+ "name": "v",
777
+ "type": "tuple"
778
+ }
779
+ ],
780
+ "name": "vestedOf",
781
+ "outputs": [
782
+ {
783
+ "internalType": "uint256",
784
+ "name": "",
785
+ "type": "uint256"
786
+ }
787
+ ],
788
+ "stateMutability": "view",
789
+ "type": "function"
790
+ }
791
+ ]