@metalntwx/metal-pay 0.2.0 → 0.3.1

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 (75) hide show
  1. package/README.md +104 -38
  2. package/dist/clearing-abi.d.ts +1836 -0
  3. package/dist/clearing-abi.js +2361 -0
  4. package/dist/clearing-client.d.ts +96 -159
  5. package/dist/clearing-client.js +412 -553
  6. package/dist/clearing-codec.d.ts +57 -0
  7. package/dist/clearing-codec.js +173 -0
  8. package/dist/clearing-custody.d.ts +202 -0
  9. package/dist/clearing-custody.js +552 -0
  10. package/dist/clearing-server.d.ts +30 -49
  11. package/dist/clearing-server.js +87 -67
  12. package/dist/clearing-x402.d.ts +38 -0
  13. package/dist/clearing-x402.js +249 -0
  14. package/dist/client.d.ts +14 -15
  15. package/dist/client.js +53 -22
  16. package/dist/index.d.ts +4 -1
  17. package/dist/index.js +4 -1
  18. package/dist/mandates/account.d.ts +9 -4
  19. package/dist/mandates/account.js +15 -11
  20. package/dist/mandates/binding.d.ts +4 -27
  21. package/dist/mandates/binding.js +5 -9
  22. package/dist/mandates/checkout.js +5 -5
  23. package/dist/mandates/client.js +4 -3
  24. package/dist/mandates/l3a.d.ts +2 -2
  25. package/dist/mandates/l3a.js +5 -4
  26. package/dist/mandates/seller.d.ts +1 -1
  27. package/dist/mandates/seller.js +4 -4
  28. package/dist/mandates/verify.d.ts +4 -6
  29. package/dist/mandates/verify.js +147 -82
  30. package/dist/mandates/vi/credential.js +4 -4
  31. package/dist/networks.d.ts +9 -1
  32. package/dist/networks.js +105 -4
  33. package/dist/node.d.ts +11 -0
  34. package/dist/node.js +97 -0
  35. package/package.json +18 -11
  36. package/src/clearing-abi.ts +2361 -0
  37. package/src/clearing-client.test.ts +850 -0
  38. package/src/clearing-client.ts +612 -0
  39. package/src/clearing-codec.test.ts +57 -0
  40. package/src/clearing-codec.ts +251 -0
  41. package/src/clearing-custody.test.ts +763 -0
  42. package/src/clearing-custody.ts +743 -0
  43. package/src/clearing-fixture.json +37 -0
  44. package/src/clearing-server.test.ts +450 -0
  45. package/src/clearing-server.ts +123 -0
  46. package/src/clearing-x402.test.ts +181 -0
  47. package/src/clearing-x402.ts +328 -0
  48. package/src/client.test.ts +333 -0
  49. package/src/client.ts +195 -0
  50. package/src/index.ts +33 -0
  51. package/src/mandates/account.ts +95 -0
  52. package/src/mandates/binding.ts +280 -0
  53. package/src/mandates/chain.ts +68 -0
  54. package/src/mandates/checkout.ts +368 -0
  55. package/src/mandates/client.ts +159 -0
  56. package/src/mandates/extension.ts +48 -0
  57. package/src/mandates/index.ts +121 -0
  58. package/src/mandates/ingest.ts +42 -0
  59. package/src/mandates/jcs.ts +16 -0
  60. package/src/mandates/l3a.ts +216 -0
  61. package/src/mandates/seller.ts +91 -0
  62. package/src/mandates/verify.ts +625 -0
  63. package/src/mandates/vi/credential.ts +477 -0
  64. package/src/mandates/vi/issue.ts +118 -0
  65. package/src/mandates/vi/sd-jwt.ts +189 -0
  66. package/src/networks.test.ts +177 -0
  67. package/src/networks.ts +242 -0
  68. package/src/node.test.ts +24 -0
  69. package/src/node.ts +96 -0
  70. package/src/server.test.ts +223 -0
  71. package/src/server.ts +77 -0
  72. package/dist/clearing.d.ts +0 -204
  73. package/dist/clearing.js +0 -151
  74. package/dist/file-storage.d.ts +0 -39
  75. package/dist/file-storage.js +0 -195
@@ -0,0 +1,2361 @@
1
+ // Generated from contracts/src/clearing/Clearing.sol.
2
+ export const clearingAbi = [
3
+ {
4
+ type: "constructor",
5
+ inputs: [
6
+ {
7
+ name: "token_",
8
+ type: "address",
9
+ internalType: "contract IERC20",
10
+ },
11
+ {
12
+ name: "operator_",
13
+ type: "address",
14
+ internalType: "address",
15
+ },
16
+ {
17
+ name: "operatorKey_",
18
+ type: "bytes",
19
+ internalType: "bytes",
20
+ },
21
+ {
22
+ name: "committee_",
23
+ type: "address",
24
+ internalType: "contract ClearingCommittee",
25
+ },
26
+ {
27
+ name: "policy_",
28
+ type: "tuple",
29
+ internalType: "struct Clearing.Policy",
30
+ components: [
31
+ {
32
+ name: "admissionDelay",
33
+ type: "uint64",
34
+ internalType: "uint64",
35
+ },
36
+ {
37
+ name: "minimumChallenge",
38
+ type: "uint64",
39
+ internalType: "uint64",
40
+ },
41
+ {
42
+ name: "maximumChallenge",
43
+ type: "uint64",
44
+ internalType: "uint64",
45
+ },
46
+ {
47
+ name: "depositTimeout",
48
+ type: "uint64",
49
+ internalType: "uint64",
50
+ },
51
+ {
52
+ name: "minimumWithdrawalNotice",
53
+ type: "uint64",
54
+ internalType: "uint64",
55
+ },
56
+ {
57
+ name: "maximumWithdrawalNotice",
58
+ type: "uint64",
59
+ internalType: "uint64",
60
+ },
61
+ ],
62
+ },
63
+ ],
64
+ stateMutability: "nonpayable",
65
+ },
66
+ {
67
+ type: "function",
68
+ name: "MAX_DEPOSIT_ACCOUNTS",
69
+ inputs: [],
70
+ outputs: [
71
+ {
72
+ name: "",
73
+ type: "uint256",
74
+ internalType: "uint256",
75
+ },
76
+ ],
77
+ stateMutability: "view",
78
+ },
79
+ {
80
+ type: "function",
81
+ name: "MAX_QUEUED_WITHDRAWALS",
82
+ inputs: [],
83
+ outputs: [
84
+ {
85
+ name: "",
86
+ type: "uint256",
87
+ internalType: "uint256",
88
+ },
89
+ ],
90
+ stateMutability: "view",
91
+ },
92
+ {
93
+ type: "function",
94
+ name: "activeCustody",
95
+ inputs: [],
96
+ outputs: [
97
+ {
98
+ name: "",
99
+ type: "uint64",
100
+ internalType: "uint64",
101
+ },
102
+ ],
103
+ stateMutability: "view",
104
+ },
105
+ {
106
+ type: "function",
107
+ name: "admit",
108
+ inputs: [
109
+ {
110
+ name: "roots",
111
+ type: "tuple",
112
+ internalType: "struct ClearingCodec.Roots",
113
+ components: [
114
+ {
115
+ name: "activity",
116
+ type: "tuple",
117
+ internalType: "struct ClearingCodec.Head",
118
+ components: [
119
+ {
120
+ name: "root",
121
+ type: "bytes32",
122
+ internalType: "bytes32",
123
+ },
124
+ {
125
+ name: "operations",
126
+ type: "uint64",
127
+ internalType: "uint64",
128
+ },
129
+ {
130
+ name: "floor",
131
+ type: "uint64",
132
+ internalType: "uint64",
133
+ },
134
+ ],
135
+ },
136
+ {
137
+ name: "rows",
138
+ type: "uint64",
139
+ internalType: "uint64",
140
+ },
141
+ {
142
+ name: "payouts",
143
+ type: "tuple",
144
+ internalType: "struct ClearingCodec.Head",
145
+ components: [
146
+ {
147
+ name: "root",
148
+ type: "bytes32",
149
+ internalType: "bytes32",
150
+ },
151
+ {
152
+ name: "operations",
153
+ type: "uint64",
154
+ internalType: "uint64",
155
+ },
156
+ {
157
+ name: "floor",
158
+ type: "uint64",
159
+ internalType: "uint64",
160
+ },
161
+ ],
162
+ },
163
+ {
164
+ name: "state",
165
+ type: "bytes32",
166
+ internalType: "bytes32",
167
+ },
168
+ {
169
+ name: "stateOperations",
170
+ type: "uint64",
171
+ internalType: "uint64",
172
+ },
173
+ {
174
+ name: "stateSyncBoundary",
175
+ type: "uint64",
176
+ internalType: "uint64",
177
+ },
178
+ {
179
+ name: "proposal",
180
+ type: "bytes32",
181
+ internalType: "bytes32",
182
+ },
183
+ ],
184
+ },
185
+ {
186
+ name: "withdrawalTotal",
187
+ type: "uint64",
188
+ internalType: "uint64",
189
+ },
190
+ {
191
+ name: "signers",
192
+ type: "bytes",
193
+ internalType: "bytes",
194
+ },
195
+ {
196
+ name: "signature",
197
+ type: "bytes",
198
+ internalType: "bytes",
199
+ },
200
+ ],
201
+ outputs: [],
202
+ stateMutability: "nonpayable",
203
+ },
204
+ {
205
+ type: "function",
206
+ name: "admittedCount",
207
+ inputs: [],
208
+ outputs: [
209
+ {
210
+ name: "",
211
+ type: "uint64",
212
+ internalType: "uint64",
213
+ },
214
+ ],
215
+ stateMutability: "view",
216
+ },
217
+ {
218
+ type: "function",
219
+ name: "beginRecovery",
220
+ inputs: [],
221
+ outputs: [],
222
+ stateMutability: "nonpayable",
223
+ },
224
+ {
225
+ type: "function",
226
+ name: "challengeDebit",
227
+ inputs: [
228
+ {
229
+ name: "epoch",
230
+ type: "uint64",
231
+ internalType: "uint64",
232
+ },
233
+ {
234
+ name: "ack",
235
+ type: "tuple",
236
+ internalType: "struct ClearingCodec.Ack",
237
+ components: [
238
+ {
239
+ name: "body",
240
+ type: "tuple",
241
+ internalType: "struct ClearingCodec.Send",
242
+ components: [
243
+ {
244
+ name: "anchor",
245
+ type: "bytes32",
246
+ internalType: "bytes32",
247
+ },
248
+ {
249
+ name: "epoch",
250
+ type: "uint64",
251
+ internalType: "uint64",
252
+ },
253
+ {
254
+ name: "payer",
255
+ type: "bytes",
256
+ internalType: "bytes",
257
+ },
258
+ {
259
+ name: "sequence",
260
+ type: "uint64",
261
+ internalType: "uint64",
262
+ },
263
+ {
264
+ name: "debit",
265
+ type: "uint64",
266
+ internalType: "uint64",
267
+ },
268
+ {
269
+ name: "vector",
270
+ type: "bytes32",
271
+ internalType: "bytes32",
272
+ },
273
+ ],
274
+ },
275
+ {
276
+ name: "payerSignature",
277
+ type: "bytes",
278
+ internalType: "bytes",
279
+ },
280
+ {
281
+ name: "operatorSignature",
282
+ type: "bytes",
283
+ internalType: "bytes",
284
+ },
285
+ ],
286
+ },
287
+ {
288
+ name: "lookup",
289
+ type: "tuple",
290
+ internalType: "struct ClearingProofs.AccountLookup",
291
+ components: [
292
+ {
293
+ name: "present",
294
+ type: "bool",
295
+ internalType: "bool",
296
+ },
297
+ {
298
+ name: "hasLeft",
299
+ type: "bool",
300
+ internalType: "bool",
301
+ },
302
+ {
303
+ name: "hasRight",
304
+ type: "bool",
305
+ internalType: "bool",
306
+ },
307
+ {
308
+ name: "left",
309
+ type: "tuple",
310
+ internalType: "struct ClearingProofs.Row",
311
+ components: [
312
+ {
313
+ name: "account",
314
+ type: "bytes",
315
+ internalType: "bytes",
316
+ },
317
+ {
318
+ name: "debit",
319
+ type: "uint64",
320
+ internalType: "uint64",
321
+ },
322
+ {
323
+ name: "sequence",
324
+ type: "uint64",
325
+ internalType: "uint64",
326
+ },
327
+ {
328
+ name: "vector",
329
+ type: "bytes32",
330
+ internalType: "bytes32",
331
+ },
332
+ {
333
+ name: "proof",
334
+ type: "tuple",
335
+ internalType: "struct LibQMDBCommon.Proof",
336
+ components: [
337
+ {
338
+ name: "leaves",
339
+ type: "uint256",
340
+ internalType: "uint256",
341
+ },
342
+ {
343
+ name: "location",
344
+ type: "uint256",
345
+ internalType: "uint256",
346
+ },
347
+ {
348
+ name: "inactivePeaks",
349
+ type: "uint256",
350
+ internalType: "uint256",
351
+ },
352
+ {
353
+ name: "digests",
354
+ type: "bytes32[]",
355
+ internalType: "bytes32[]",
356
+ },
357
+ ],
358
+ },
359
+ ],
360
+ },
361
+ {
362
+ name: "right",
363
+ type: "tuple",
364
+ internalType: "struct ClearingProofs.Row",
365
+ components: [
366
+ {
367
+ name: "account",
368
+ type: "bytes",
369
+ internalType: "bytes",
370
+ },
371
+ {
372
+ name: "debit",
373
+ type: "uint64",
374
+ internalType: "uint64",
375
+ },
376
+ {
377
+ name: "sequence",
378
+ type: "uint64",
379
+ internalType: "uint64",
380
+ },
381
+ {
382
+ name: "vector",
383
+ type: "bytes32",
384
+ internalType: "bytes32",
385
+ },
386
+ {
387
+ name: "proof",
388
+ type: "tuple",
389
+ internalType: "struct LibQMDBCommon.Proof",
390
+ components: [
391
+ {
392
+ name: "leaves",
393
+ type: "uint256",
394
+ internalType: "uint256",
395
+ },
396
+ {
397
+ name: "location",
398
+ type: "uint256",
399
+ internalType: "uint256",
400
+ },
401
+ {
402
+ name: "inactivePeaks",
403
+ type: "uint256",
404
+ internalType: "uint256",
405
+ },
406
+ {
407
+ name: "digests",
408
+ type: "bytes32[]",
409
+ internalType: "bytes32[]",
410
+ },
411
+ ],
412
+ },
413
+ ],
414
+ },
415
+ ],
416
+ },
417
+ ],
418
+ outputs: [
419
+ {
420
+ name: "proven",
421
+ type: "bool",
422
+ internalType: "bool",
423
+ },
424
+ ],
425
+ stateMutability: "nonpayable",
426
+ },
427
+ {
428
+ type: "function",
429
+ name: "challengeEntry",
430
+ inputs: [
431
+ {
432
+ name: "epoch",
433
+ type: "uint64",
434
+ internalType: "uint64",
435
+ },
436
+ {
437
+ name: "ack",
438
+ type: "tuple",
439
+ internalType: "struct ClearingCodec.Ack",
440
+ components: [
441
+ {
442
+ name: "body",
443
+ type: "tuple",
444
+ internalType: "struct ClearingCodec.Send",
445
+ components: [
446
+ {
447
+ name: "anchor",
448
+ type: "bytes32",
449
+ internalType: "bytes32",
450
+ },
451
+ {
452
+ name: "epoch",
453
+ type: "uint64",
454
+ internalType: "uint64",
455
+ },
456
+ {
457
+ name: "payer",
458
+ type: "bytes",
459
+ internalType: "bytes",
460
+ },
461
+ {
462
+ name: "sequence",
463
+ type: "uint64",
464
+ internalType: "uint64",
465
+ },
466
+ {
467
+ name: "debit",
468
+ type: "uint64",
469
+ internalType: "uint64",
470
+ },
471
+ {
472
+ name: "vector",
473
+ type: "bytes32",
474
+ internalType: "bytes32",
475
+ },
476
+ ],
477
+ },
478
+ {
479
+ name: "payerSignature",
480
+ type: "bytes",
481
+ internalType: "bytes",
482
+ },
483
+ {
484
+ name: "operatorSignature",
485
+ type: "bytes",
486
+ internalType: "bytes",
487
+ },
488
+ ],
489
+ },
490
+ {
491
+ name: "length",
492
+ type: "uint32",
493
+ internalType: "uint32",
494
+ },
495
+ {
496
+ name: "nativeRoot",
497
+ type: "bytes32",
498
+ internalType: "bytes32",
499
+ },
500
+ {
501
+ name: "entry",
502
+ type: "tuple",
503
+ internalType: "struct ClearingProofs.Entry",
504
+ components: [
505
+ {
506
+ name: "recipient",
507
+ type: "bytes",
508
+ internalType: "bytes",
509
+ },
510
+ {
511
+ name: "cumulative",
512
+ type: "uint64",
513
+ internalType: "uint64",
514
+ },
515
+ {
516
+ name: "count",
517
+ type: "uint64",
518
+ internalType: "uint64",
519
+ },
520
+ {
521
+ name: "position",
522
+ type: "uint32",
523
+ internalType: "uint32",
524
+ },
525
+ {
526
+ name: "siblings",
527
+ type: "bytes32[]",
528
+ internalType: "bytes32[]",
529
+ },
530
+ ],
531
+ },
532
+ {
533
+ name: "sender",
534
+ type: "tuple",
535
+ internalType: "struct ClearingProofs.AccountLookup",
536
+ components: [
537
+ {
538
+ name: "present",
539
+ type: "bool",
540
+ internalType: "bool",
541
+ },
542
+ {
543
+ name: "hasLeft",
544
+ type: "bool",
545
+ internalType: "bool",
546
+ },
547
+ {
548
+ name: "hasRight",
549
+ type: "bool",
550
+ internalType: "bool",
551
+ },
552
+ {
553
+ name: "left",
554
+ type: "tuple",
555
+ internalType: "struct ClearingProofs.Row",
556
+ components: [
557
+ {
558
+ name: "account",
559
+ type: "bytes",
560
+ internalType: "bytes",
561
+ },
562
+ {
563
+ name: "debit",
564
+ type: "uint64",
565
+ internalType: "uint64",
566
+ },
567
+ {
568
+ name: "sequence",
569
+ type: "uint64",
570
+ internalType: "uint64",
571
+ },
572
+ {
573
+ name: "vector",
574
+ type: "bytes32",
575
+ internalType: "bytes32",
576
+ },
577
+ {
578
+ name: "proof",
579
+ type: "tuple",
580
+ internalType: "struct LibQMDBCommon.Proof",
581
+ components: [
582
+ {
583
+ name: "leaves",
584
+ type: "uint256",
585
+ internalType: "uint256",
586
+ },
587
+ {
588
+ name: "location",
589
+ type: "uint256",
590
+ internalType: "uint256",
591
+ },
592
+ {
593
+ name: "inactivePeaks",
594
+ type: "uint256",
595
+ internalType: "uint256",
596
+ },
597
+ {
598
+ name: "digests",
599
+ type: "bytes32[]",
600
+ internalType: "bytes32[]",
601
+ },
602
+ ],
603
+ },
604
+ ],
605
+ },
606
+ {
607
+ name: "right",
608
+ type: "tuple",
609
+ internalType: "struct ClearingProofs.Row",
610
+ components: [
611
+ {
612
+ name: "account",
613
+ type: "bytes",
614
+ internalType: "bytes",
615
+ },
616
+ {
617
+ name: "debit",
618
+ type: "uint64",
619
+ internalType: "uint64",
620
+ },
621
+ {
622
+ name: "sequence",
623
+ type: "uint64",
624
+ internalType: "uint64",
625
+ },
626
+ {
627
+ name: "vector",
628
+ type: "bytes32",
629
+ internalType: "bytes32",
630
+ },
631
+ {
632
+ name: "proof",
633
+ type: "tuple",
634
+ internalType: "struct LibQMDBCommon.Proof",
635
+ components: [
636
+ {
637
+ name: "leaves",
638
+ type: "uint256",
639
+ internalType: "uint256",
640
+ },
641
+ {
642
+ name: "location",
643
+ type: "uint256",
644
+ internalType: "uint256",
645
+ },
646
+ {
647
+ name: "inactivePeaks",
648
+ type: "uint256",
649
+ internalType: "uint256",
650
+ },
651
+ {
652
+ name: "digests",
653
+ type: "bytes32[]",
654
+ internalType: "bytes32[]",
655
+ },
656
+ ],
657
+ },
658
+ ],
659
+ },
660
+ ],
661
+ },
662
+ {
663
+ name: "publicEntry",
664
+ type: "tuple",
665
+ internalType: "struct ClearingProofs.EntryLookup",
666
+ components: [
667
+ {
668
+ name: "present",
669
+ type: "bool",
670
+ internalType: "bool",
671
+ },
672
+ {
673
+ name: "hasLeft",
674
+ type: "bool",
675
+ internalType: "bool",
676
+ },
677
+ {
678
+ name: "hasRight",
679
+ type: "bool",
680
+ internalType: "bool",
681
+ },
682
+ {
683
+ name: "length",
684
+ type: "uint32",
685
+ internalType: "uint32",
686
+ },
687
+ {
688
+ name: "nativeRoot",
689
+ type: "bytes32",
690
+ internalType: "bytes32",
691
+ },
692
+ {
693
+ name: "left",
694
+ type: "tuple",
695
+ internalType: "struct ClearingProofs.Entry",
696
+ components: [
697
+ {
698
+ name: "recipient",
699
+ type: "bytes",
700
+ internalType: "bytes",
701
+ },
702
+ {
703
+ name: "cumulative",
704
+ type: "uint64",
705
+ internalType: "uint64",
706
+ },
707
+ {
708
+ name: "count",
709
+ type: "uint64",
710
+ internalType: "uint64",
711
+ },
712
+ {
713
+ name: "position",
714
+ type: "uint32",
715
+ internalType: "uint32",
716
+ },
717
+ {
718
+ name: "siblings",
719
+ type: "bytes32[]",
720
+ internalType: "bytes32[]",
721
+ },
722
+ ],
723
+ },
724
+ {
725
+ name: "right",
726
+ type: "tuple",
727
+ internalType: "struct ClearingProofs.Entry",
728
+ components: [
729
+ {
730
+ name: "recipient",
731
+ type: "bytes",
732
+ internalType: "bytes",
733
+ },
734
+ {
735
+ name: "cumulative",
736
+ type: "uint64",
737
+ internalType: "uint64",
738
+ },
739
+ {
740
+ name: "count",
741
+ type: "uint64",
742
+ internalType: "uint64",
743
+ },
744
+ {
745
+ name: "position",
746
+ type: "uint32",
747
+ internalType: "uint32",
748
+ },
749
+ {
750
+ name: "siblings",
751
+ type: "bytes32[]",
752
+ internalType: "bytes32[]",
753
+ },
754
+ ],
755
+ },
756
+ ],
757
+ },
758
+ ],
759
+ outputs: [
760
+ {
761
+ name: "proven",
762
+ type: "bool",
763
+ internalType: "bool",
764
+ },
765
+ ],
766
+ stateMutability: "nonpayable",
767
+ },
768
+ {
769
+ type: "function",
770
+ name: "challengeFork",
771
+ inputs: [
772
+ {
773
+ name: "epoch",
774
+ type: "uint64",
775
+ internalType: "uint64",
776
+ },
777
+ {
778
+ name: "left",
779
+ type: "tuple",
780
+ internalType: "struct ClearingCodec.Ack",
781
+ components: [
782
+ {
783
+ name: "body",
784
+ type: "tuple",
785
+ internalType: "struct ClearingCodec.Send",
786
+ components: [
787
+ {
788
+ name: "anchor",
789
+ type: "bytes32",
790
+ internalType: "bytes32",
791
+ },
792
+ {
793
+ name: "epoch",
794
+ type: "uint64",
795
+ internalType: "uint64",
796
+ },
797
+ {
798
+ name: "payer",
799
+ type: "bytes",
800
+ internalType: "bytes",
801
+ },
802
+ {
803
+ name: "sequence",
804
+ type: "uint64",
805
+ internalType: "uint64",
806
+ },
807
+ {
808
+ name: "debit",
809
+ type: "uint64",
810
+ internalType: "uint64",
811
+ },
812
+ {
813
+ name: "vector",
814
+ type: "bytes32",
815
+ internalType: "bytes32",
816
+ },
817
+ ],
818
+ },
819
+ {
820
+ name: "payerSignature",
821
+ type: "bytes",
822
+ internalType: "bytes",
823
+ },
824
+ {
825
+ name: "operatorSignature",
826
+ type: "bytes",
827
+ internalType: "bytes",
828
+ },
829
+ ],
830
+ },
831
+ {
832
+ name: "right",
833
+ type: "tuple",
834
+ internalType: "struct ClearingCodec.Ack",
835
+ components: [
836
+ {
837
+ name: "body",
838
+ type: "tuple",
839
+ internalType: "struct ClearingCodec.Send",
840
+ components: [
841
+ {
842
+ name: "anchor",
843
+ type: "bytes32",
844
+ internalType: "bytes32",
845
+ },
846
+ {
847
+ name: "epoch",
848
+ type: "uint64",
849
+ internalType: "uint64",
850
+ },
851
+ {
852
+ name: "payer",
853
+ type: "bytes",
854
+ internalType: "bytes",
855
+ },
856
+ {
857
+ name: "sequence",
858
+ type: "uint64",
859
+ internalType: "uint64",
860
+ },
861
+ {
862
+ name: "debit",
863
+ type: "uint64",
864
+ internalType: "uint64",
865
+ },
866
+ {
867
+ name: "vector",
868
+ type: "bytes32",
869
+ internalType: "bytes32",
870
+ },
871
+ ],
872
+ },
873
+ {
874
+ name: "payerSignature",
875
+ type: "bytes",
876
+ internalType: "bytes",
877
+ },
878
+ {
879
+ name: "operatorSignature",
880
+ type: "bytes",
881
+ internalType: "bytes",
882
+ },
883
+ ],
884
+ },
885
+ ],
886
+ outputs: [
887
+ {
888
+ name: "proven",
889
+ type: "bool",
890
+ internalType: "bool",
891
+ },
892
+ ],
893
+ stateMutability: "nonpayable",
894
+ },
895
+ {
896
+ type: "function",
897
+ name: "claim",
898
+ inputs: [
899
+ {
900
+ name: "destination",
901
+ type: "address",
902
+ internalType: "address",
903
+ },
904
+ {
905
+ name: "amount",
906
+ type: "uint64",
907
+ internalType: "uint64",
908
+ },
909
+ {
910
+ name: "proof",
911
+ type: "tuple",
912
+ internalType: "struct LibQMDBCommon.Proof",
913
+ components: [
914
+ {
915
+ name: "leaves",
916
+ type: "uint256",
917
+ internalType: "uint256",
918
+ },
919
+ {
920
+ name: "location",
921
+ type: "uint256",
922
+ internalType: "uint256",
923
+ },
924
+ {
925
+ name: "inactivePeaks",
926
+ type: "uint256",
927
+ internalType: "uint256",
928
+ },
929
+ {
930
+ name: "digests",
931
+ type: "bytes32[]",
932
+ internalType: "bytes32[]",
933
+ },
934
+ ],
935
+ },
936
+ ],
937
+ outputs: [],
938
+ stateMutability: "nonpayable",
939
+ },
940
+ {
941
+ type: "function",
942
+ name: "claimReserve",
943
+ inputs: [],
944
+ outputs: [
945
+ {
946
+ name: "",
947
+ type: "uint64",
948
+ internalType: "uint64",
949
+ },
950
+ ],
951
+ stateMutability: "view",
952
+ },
953
+ {
954
+ type: "function",
955
+ name: "claimedPayouts",
956
+ inputs: [
957
+ {
958
+ name: "",
959
+ type: "uint256",
960
+ internalType: "uint256",
961
+ },
962
+ ],
963
+ outputs: [
964
+ {
965
+ name: "",
966
+ type: "uint256",
967
+ internalType: "uint256",
968
+ },
969
+ ],
970
+ stateMutability: "view",
971
+ },
972
+ {
973
+ type: "function",
974
+ name: "committee",
975
+ inputs: [],
976
+ outputs: [
977
+ {
978
+ name: "",
979
+ type: "address",
980
+ internalType: "contract ClearingCommittee",
981
+ },
982
+ ],
983
+ stateMutability: "view",
984
+ },
985
+ {
986
+ type: "function",
987
+ name: "consumedRequests",
988
+ inputs: [
989
+ {
990
+ name: "",
991
+ type: "bytes32",
992
+ internalType: "bytes32",
993
+ },
994
+ ],
995
+ outputs: [
996
+ {
997
+ name: "",
998
+ type: "bool",
999
+ internalType: "bool",
1000
+ },
1001
+ ],
1002
+ stateMutability: "view",
1003
+ },
1004
+ {
1005
+ type: "function",
1006
+ name: "contextOf",
1007
+ inputs: [
1008
+ {
1009
+ name: "epoch",
1010
+ type: "uint64",
1011
+ internalType: "uint64",
1012
+ },
1013
+ ],
1014
+ outputs: [
1015
+ {
1016
+ name: "",
1017
+ type: "tuple",
1018
+ internalType: "struct ClearingCodec.Context",
1019
+ components: [
1020
+ {
1021
+ name: "anchor",
1022
+ type: "bytes32",
1023
+ internalType: "bytes32",
1024
+ },
1025
+ {
1026
+ name: "epoch",
1027
+ type: "uint64",
1028
+ internalType: "uint64",
1029
+ },
1030
+ {
1031
+ name: "operatorKey",
1032
+ type: "bytes",
1033
+ internalType: "bytes",
1034
+ },
1035
+ {
1036
+ name: "deployment",
1037
+ type: "bytes32",
1038
+ internalType: "bytes32",
1039
+ },
1040
+ {
1041
+ name: "deposits",
1042
+ type: "bytes32",
1043
+ internalType: "bytes32",
1044
+ },
1045
+ {
1046
+ name: "withdrawals",
1047
+ type: "bytes32",
1048
+ internalType: "bytes32",
1049
+ },
1050
+ {
1051
+ name: "liability",
1052
+ type: "uint64",
1053
+ internalType: "uint64",
1054
+ },
1055
+ {
1056
+ name: "admissionDeadline",
1057
+ type: "uint64",
1058
+ internalType: "uint64",
1059
+ },
1060
+ {
1061
+ name: "challengeDeadline",
1062
+ type: "uint64",
1063
+ internalType: "uint64",
1064
+ },
1065
+ {
1066
+ name: "limits",
1067
+ type: "tuple",
1068
+ internalType: "struct ClearingCodec.Limits",
1069
+ components: [
1070
+ {
1071
+ name: "states",
1072
+ type: "uint64",
1073
+ internalType: "uint64",
1074
+ },
1075
+ {
1076
+ name: "rows",
1077
+ type: "uint64",
1078
+ internalType: "uint64",
1079
+ },
1080
+ {
1081
+ name: "withdrawals",
1082
+ type: "uint64",
1083
+ internalType: "uint64",
1084
+ },
1085
+ {
1086
+ name: "accountEntries",
1087
+ type: "uint64",
1088
+ internalType: "uint64",
1089
+ },
1090
+ {
1091
+ name: "totalEntries",
1092
+ type: "uint64",
1093
+ internalType: "uint64",
1094
+ },
1095
+ {
1096
+ name: "paymentTotal",
1097
+ type: "uint64",
1098
+ internalType: "uint64",
1099
+ },
1100
+ {
1101
+ name: "depositTotal",
1102
+ type: "uint64",
1103
+ internalType: "uint64",
1104
+ },
1105
+ {
1106
+ name: "withdrawalTotal",
1107
+ type: "uint64",
1108
+ internalType: "uint64",
1109
+ },
1110
+ ],
1111
+ },
1112
+ {
1113
+ name: "committee",
1114
+ type: "bytes32",
1115
+ internalType: "bytes32",
1116
+ },
1117
+ {
1118
+ name: "predecessor",
1119
+ type: "bytes32",
1120
+ internalType: "bytes32",
1121
+ },
1122
+ {
1123
+ name: "activity",
1124
+ type: "tuple",
1125
+ internalType: "struct ClearingCodec.Head",
1126
+ components: [
1127
+ {
1128
+ name: "root",
1129
+ type: "bytes32",
1130
+ internalType: "bytes32",
1131
+ },
1132
+ {
1133
+ name: "operations",
1134
+ type: "uint64",
1135
+ internalType: "uint64",
1136
+ },
1137
+ {
1138
+ name: "floor",
1139
+ type: "uint64",
1140
+ internalType: "uint64",
1141
+ },
1142
+ ],
1143
+ },
1144
+ {
1145
+ name: "payouts",
1146
+ type: "tuple",
1147
+ internalType: "struct ClearingCodec.Head",
1148
+ components: [
1149
+ {
1150
+ name: "root",
1151
+ type: "bytes32",
1152
+ internalType: "bytes32",
1153
+ },
1154
+ {
1155
+ name: "operations",
1156
+ type: "uint64",
1157
+ internalType: "uint64",
1158
+ },
1159
+ {
1160
+ name: "floor",
1161
+ type: "uint64",
1162
+ internalType: "uint64",
1163
+ },
1164
+ ],
1165
+ },
1166
+ {
1167
+ name: "activityFloor",
1168
+ type: "uint64",
1169
+ internalType: "uint64",
1170
+ },
1171
+ {
1172
+ name: "payoutFloor",
1173
+ type: "uint64",
1174
+ internalType: "uint64",
1175
+ },
1176
+ ],
1177
+ },
1178
+ ],
1179
+ stateMutability: "view",
1180
+ },
1181
+ {
1182
+ type: "function",
1183
+ name: "deployment",
1184
+ inputs: [],
1185
+ outputs: [
1186
+ {
1187
+ name: "",
1188
+ type: "bytes32",
1189
+ internalType: "bytes32",
1190
+ },
1191
+ ],
1192
+ stateMutability: "view",
1193
+ },
1194
+ {
1195
+ type: "function",
1196
+ name: "deposit",
1197
+ inputs: [
1198
+ {
1199
+ name: "account",
1200
+ type: "bytes",
1201
+ internalType: "bytes",
1202
+ },
1203
+ {
1204
+ name: "amount",
1205
+ type: "uint64",
1206
+ internalType: "uint64",
1207
+ },
1208
+ ],
1209
+ outputs: [],
1210
+ stateMutability: "nonpayable",
1211
+ },
1212
+ {
1213
+ type: "function",
1214
+ name: "depositAmounts",
1215
+ inputs: [
1216
+ {
1217
+ name: "",
1218
+ type: "uint64",
1219
+ internalType: "uint64",
1220
+ },
1221
+ {
1222
+ name: "",
1223
+ type: "bytes32",
1224
+ internalType: "bytes32",
1225
+ },
1226
+ ],
1227
+ outputs: [
1228
+ {
1229
+ name: "",
1230
+ type: "uint64",
1231
+ internalType: "uint64",
1232
+ },
1233
+ ],
1234
+ stateMutability: "view",
1235
+ },
1236
+ {
1237
+ type: "function",
1238
+ name: "depositDeadlines",
1239
+ inputs: [
1240
+ {
1241
+ name: "",
1242
+ type: "uint64",
1243
+ internalType: "uint64",
1244
+ },
1245
+ {
1246
+ name: "",
1247
+ type: "bytes32",
1248
+ internalType: "bytes32",
1249
+ },
1250
+ ],
1251
+ outputs: [
1252
+ {
1253
+ name: "",
1254
+ type: "uint64",
1255
+ internalType: "uint64",
1256
+ },
1257
+ ],
1258
+ stateMutability: "view",
1259
+ },
1260
+ {
1261
+ type: "function",
1262
+ name: "fault",
1263
+ inputs: [],
1264
+ outputs: [
1265
+ {
1266
+ name: "",
1267
+ type: "uint8",
1268
+ internalType: "enum Clearing.Fault",
1269
+ },
1270
+ ],
1271
+ stateMutability: "view",
1272
+ },
1273
+ {
1274
+ type: "function",
1275
+ name: "faultDeposit",
1276
+ inputs: [
1277
+ {
1278
+ name: "epoch",
1279
+ type: "uint64",
1280
+ internalType: "uint64",
1281
+ },
1282
+ {
1283
+ name: "account",
1284
+ type: "bytes",
1285
+ internalType: "bytes",
1286
+ },
1287
+ ],
1288
+ outputs: [],
1289
+ stateMutability: "nonpayable",
1290
+ },
1291
+ {
1292
+ type: "function",
1293
+ name: "faultRegistration",
1294
+ inputs: [],
1295
+ outputs: [],
1296
+ stateMutability: "nonpayable",
1297
+ },
1298
+ {
1299
+ type: "function",
1300
+ name: "faultWithdrawal",
1301
+ inputs: [
1302
+ {
1303
+ name: "account",
1304
+ type: "bytes",
1305
+ internalType: "bytes",
1306
+ },
1307
+ ],
1308
+ outputs: [],
1309
+ stateMutability: "nonpayable",
1310
+ },
1311
+ {
1312
+ type: "function",
1313
+ name: "finalize",
1314
+ inputs: [],
1315
+ outputs: [],
1316
+ stateMutability: "nonpayable",
1317
+ },
1318
+ {
1319
+ type: "function",
1320
+ name: "finalizedActivity",
1321
+ inputs: [],
1322
+ outputs: [
1323
+ {
1324
+ name: "root",
1325
+ type: "bytes32",
1326
+ internalType: "bytes32",
1327
+ },
1328
+ {
1329
+ name: "operations",
1330
+ type: "uint64",
1331
+ internalType: "uint64",
1332
+ },
1333
+ {
1334
+ name: "floor",
1335
+ type: "uint64",
1336
+ internalType: "uint64",
1337
+ },
1338
+ ],
1339
+ stateMutability: "view",
1340
+ },
1341
+ {
1342
+ type: "function",
1343
+ name: "finalizedCount",
1344
+ inputs: [],
1345
+ outputs: [
1346
+ {
1347
+ name: "",
1348
+ type: "uint64",
1349
+ internalType: "uint64",
1350
+ },
1351
+ ],
1352
+ stateMutability: "view",
1353
+ },
1354
+ {
1355
+ type: "function",
1356
+ name: "finalizedLiability",
1357
+ inputs: [],
1358
+ outputs: [
1359
+ {
1360
+ name: "",
1361
+ type: "uint64",
1362
+ internalType: "uint64",
1363
+ },
1364
+ ],
1365
+ stateMutability: "view",
1366
+ },
1367
+ {
1368
+ type: "function",
1369
+ name: "finalizedPayouts",
1370
+ inputs: [],
1371
+ outputs: [
1372
+ {
1373
+ name: "root",
1374
+ type: "bytes32",
1375
+ internalType: "bytes32",
1376
+ },
1377
+ {
1378
+ name: "operations",
1379
+ type: "uint64",
1380
+ internalType: "uint64",
1381
+ },
1382
+ {
1383
+ name: "floor",
1384
+ type: "uint64",
1385
+ internalType: "uint64",
1386
+ },
1387
+ ],
1388
+ stateMutability: "view",
1389
+ },
1390
+ {
1391
+ type: "function",
1392
+ name: "finalizedState",
1393
+ inputs: [],
1394
+ outputs: [
1395
+ {
1396
+ name: "",
1397
+ type: "bytes32",
1398
+ internalType: "bytes32",
1399
+ },
1400
+ ],
1401
+ stateMutability: "view",
1402
+ },
1403
+ {
1404
+ type: "function",
1405
+ name: "invalidFrom",
1406
+ inputs: [],
1407
+ outputs: [
1408
+ {
1409
+ name: "",
1410
+ type: "uint64",
1411
+ internalType: "uint64",
1412
+ },
1413
+ ],
1414
+ stateMutability: "view",
1415
+ },
1416
+ {
1417
+ type: "function",
1418
+ name: "operator",
1419
+ inputs: [],
1420
+ outputs: [
1421
+ {
1422
+ name: "",
1423
+ type: "address",
1424
+ internalType: "address",
1425
+ },
1426
+ ],
1427
+ stateMutability: "view",
1428
+ },
1429
+ {
1430
+ type: "function",
1431
+ name: "operatorKey",
1432
+ inputs: [],
1433
+ outputs: [
1434
+ {
1435
+ name: "",
1436
+ type: "bytes",
1437
+ internalType: "bytes",
1438
+ },
1439
+ ],
1440
+ stateMutability: "view",
1441
+ },
1442
+ {
1443
+ type: "function",
1444
+ name: "policy",
1445
+ inputs: [],
1446
+ outputs: [
1447
+ {
1448
+ name: "admissionDelay",
1449
+ type: "uint64",
1450
+ internalType: "uint64",
1451
+ },
1452
+ {
1453
+ name: "minimumChallenge",
1454
+ type: "uint64",
1455
+ internalType: "uint64",
1456
+ },
1457
+ {
1458
+ name: "maximumChallenge",
1459
+ type: "uint64",
1460
+ internalType: "uint64",
1461
+ },
1462
+ {
1463
+ name: "depositTimeout",
1464
+ type: "uint64",
1465
+ internalType: "uint64",
1466
+ },
1467
+ {
1468
+ name: "minimumWithdrawalNotice",
1469
+ type: "uint64",
1470
+ internalType: "uint64",
1471
+ },
1472
+ {
1473
+ name: "maximumWithdrawalNotice",
1474
+ type: "uint64",
1475
+ internalType: "uint64",
1476
+ },
1477
+ ],
1478
+ stateMutability: "view",
1479
+ },
1480
+ {
1481
+ type: "function",
1482
+ name: "queueWithdrawal",
1483
+ inputs: [
1484
+ {
1485
+ name: "w",
1486
+ type: "tuple",
1487
+ internalType: "struct ClearingCodec.Withdrawal",
1488
+ components: [
1489
+ {
1490
+ name: "account",
1491
+ type: "bytes",
1492
+ internalType: "bytes",
1493
+ },
1494
+ {
1495
+ name: "deployment",
1496
+ type: "bytes32",
1497
+ internalType: "bytes32",
1498
+ },
1499
+ {
1500
+ name: "state",
1501
+ type: "bytes32",
1502
+ internalType: "bytes32",
1503
+ },
1504
+ {
1505
+ name: "destination",
1506
+ type: "address",
1507
+ internalType: "address",
1508
+ },
1509
+ {
1510
+ name: "amount",
1511
+ type: "uint64",
1512
+ internalType: "uint64",
1513
+ },
1514
+ {
1515
+ name: "deadline",
1516
+ type: "uint64",
1517
+ internalType: "uint64",
1518
+ },
1519
+ {
1520
+ name: "signature",
1521
+ type: "bytes",
1522
+ internalType: "bytes",
1523
+ },
1524
+ ],
1525
+ },
1526
+ {
1527
+ name: "opening",
1528
+ type: "tuple",
1529
+ internalType: "struct ClearingProofs.Balance",
1530
+ components: [
1531
+ {
1532
+ name: "amount",
1533
+ type: "uint64",
1534
+ internalType: "uint64",
1535
+ },
1536
+ {
1537
+ name: "nextKey",
1538
+ type: "bytes32",
1539
+ internalType: "bytes32",
1540
+ },
1541
+ {
1542
+ name: "proof",
1543
+ type: "tuple",
1544
+ internalType: "struct LibQMDBCurrent.Proof",
1545
+ components: [
1546
+ {
1547
+ name: "leaves",
1548
+ type: "uint256",
1549
+ internalType: "uint256",
1550
+ },
1551
+ {
1552
+ name: "location",
1553
+ type: "uint256",
1554
+ internalType: "uint256",
1555
+ },
1556
+ {
1557
+ name: "inactivePeaks",
1558
+ type: "uint256",
1559
+ internalType: "uint256",
1560
+ },
1561
+ {
1562
+ name: "chunk",
1563
+ type: "bytes",
1564
+ internalType: "bytes",
1565
+ },
1566
+ {
1567
+ name: "opsRoot",
1568
+ type: "bytes32",
1569
+ internalType: "bytes32",
1570
+ },
1571
+ {
1572
+ name: "pending",
1573
+ type: "bytes32",
1574
+ internalType: "bytes32",
1575
+ },
1576
+ {
1577
+ name: "partialDigest",
1578
+ type: "bytes32",
1579
+ internalType: "bytes32",
1580
+ },
1581
+ {
1582
+ name: "digests",
1583
+ type: "bytes32[]",
1584
+ internalType: "bytes32[]",
1585
+ },
1586
+ ],
1587
+ },
1588
+ ],
1589
+ },
1590
+ ],
1591
+ outputs: [],
1592
+ stateMutability: "nonpayable",
1593
+ },
1594
+ {
1595
+ type: "function",
1596
+ name: "queuedWithdrawals",
1597
+ inputs: [],
1598
+ outputs: [
1599
+ {
1600
+ name: "",
1601
+ type: "uint64",
1602
+ internalType: "uint64",
1603
+ },
1604
+ ],
1605
+ stateMutability: "view",
1606
+ },
1607
+ {
1608
+ type: "function",
1609
+ name: "recover",
1610
+ inputs: [
1611
+ {
1612
+ name: "account",
1613
+ type: "bytes",
1614
+ internalType: "bytes",
1615
+ },
1616
+ {
1617
+ name: "residualDestination",
1618
+ type: "address",
1619
+ internalType: "address",
1620
+ },
1621
+ {
1622
+ name: "signature",
1623
+ type: "bytes",
1624
+ internalType: "bytes",
1625
+ },
1626
+ {
1627
+ name: "opening",
1628
+ type: "tuple",
1629
+ internalType: "struct ClearingProofs.Balance",
1630
+ components: [
1631
+ {
1632
+ name: "amount",
1633
+ type: "uint64",
1634
+ internalType: "uint64",
1635
+ },
1636
+ {
1637
+ name: "nextKey",
1638
+ type: "bytes32",
1639
+ internalType: "bytes32",
1640
+ },
1641
+ {
1642
+ name: "proof",
1643
+ type: "tuple",
1644
+ internalType: "struct LibQMDBCurrent.Proof",
1645
+ components: [
1646
+ {
1647
+ name: "leaves",
1648
+ type: "uint256",
1649
+ internalType: "uint256",
1650
+ },
1651
+ {
1652
+ name: "location",
1653
+ type: "uint256",
1654
+ internalType: "uint256",
1655
+ },
1656
+ {
1657
+ name: "inactivePeaks",
1658
+ type: "uint256",
1659
+ internalType: "uint256",
1660
+ },
1661
+ {
1662
+ name: "chunk",
1663
+ type: "bytes",
1664
+ internalType: "bytes",
1665
+ },
1666
+ {
1667
+ name: "opsRoot",
1668
+ type: "bytes32",
1669
+ internalType: "bytes32",
1670
+ },
1671
+ {
1672
+ name: "pending",
1673
+ type: "bytes32",
1674
+ internalType: "bytes32",
1675
+ },
1676
+ {
1677
+ name: "partialDigest",
1678
+ type: "bytes32",
1679
+ internalType: "bytes32",
1680
+ },
1681
+ {
1682
+ name: "digests",
1683
+ type: "bytes32[]",
1684
+ internalType: "bytes32[]",
1685
+ },
1686
+ ],
1687
+ },
1688
+ ],
1689
+ },
1690
+ ],
1691
+ outputs: [],
1692
+ stateMutability: "nonpayable",
1693
+ },
1694
+ {
1695
+ type: "function",
1696
+ name: "recoveredAccounts",
1697
+ inputs: [
1698
+ {
1699
+ name: "",
1700
+ type: "bytes32",
1701
+ internalType: "bytes32",
1702
+ },
1703
+ ],
1704
+ outputs: [
1705
+ {
1706
+ name: "",
1707
+ type: "bool",
1708
+ internalType: "bool",
1709
+ },
1710
+ ],
1711
+ stateMutability: "view",
1712
+ },
1713
+ {
1714
+ type: "function",
1715
+ name: "recovering",
1716
+ inputs: [],
1717
+ outputs: [
1718
+ {
1719
+ name: "",
1720
+ type: "bool",
1721
+ internalType: "bool",
1722
+ },
1723
+ ],
1724
+ stateMutability: "view",
1725
+ },
1726
+ {
1727
+ type: "function",
1728
+ name: "refundDeposit",
1729
+ inputs: [
1730
+ {
1731
+ name: "epoch",
1732
+ type: "uint64",
1733
+ internalType: "uint64",
1734
+ },
1735
+ {
1736
+ name: "account",
1737
+ type: "bytes",
1738
+ internalType: "bytes",
1739
+ },
1740
+ {
1741
+ name: "destination",
1742
+ type: "address",
1743
+ internalType: "address",
1744
+ },
1745
+ {
1746
+ name: "signature",
1747
+ type: "bytes",
1748
+ internalType: "bytes",
1749
+ },
1750
+ ],
1751
+ outputs: [],
1752
+ stateMutability: "nonpayable",
1753
+ },
1754
+ {
1755
+ type: "function",
1756
+ name: "register",
1757
+ inputs: [
1758
+ {
1759
+ name: "deposits_",
1760
+ type: "tuple[]",
1761
+ internalType: "struct Clearing.Deposit[]",
1762
+ components: [
1763
+ {
1764
+ name: "account",
1765
+ type: "bytes",
1766
+ internalType: "bytes",
1767
+ },
1768
+ {
1769
+ name: "amount",
1770
+ type: "uint64",
1771
+ internalType: "uint64",
1772
+ },
1773
+ ],
1774
+ },
1775
+ {
1776
+ name: "requests",
1777
+ type: "tuple[]",
1778
+ internalType: "struct ClearingCodec.Withdrawal[]",
1779
+ components: [
1780
+ {
1781
+ name: "account",
1782
+ type: "bytes",
1783
+ internalType: "bytes",
1784
+ },
1785
+ {
1786
+ name: "deployment",
1787
+ type: "bytes32",
1788
+ internalType: "bytes32",
1789
+ },
1790
+ {
1791
+ name: "state",
1792
+ type: "bytes32",
1793
+ internalType: "bytes32",
1794
+ },
1795
+ {
1796
+ name: "destination",
1797
+ type: "address",
1798
+ internalType: "address",
1799
+ },
1800
+ {
1801
+ name: "amount",
1802
+ type: "uint64",
1803
+ internalType: "uint64",
1804
+ },
1805
+ {
1806
+ name: "deadline",
1807
+ type: "uint64",
1808
+ internalType: "uint64",
1809
+ },
1810
+ {
1811
+ name: "signature",
1812
+ type: "bytes",
1813
+ internalType: "bytes",
1814
+ },
1815
+ ],
1816
+ },
1817
+ {
1818
+ name: "extraOpenings",
1819
+ type: "tuple[]",
1820
+ internalType: "struct ClearingProofs.Balance[]",
1821
+ components: [
1822
+ {
1823
+ name: "amount",
1824
+ type: "uint64",
1825
+ internalType: "uint64",
1826
+ },
1827
+ {
1828
+ name: "nextKey",
1829
+ type: "bytes32",
1830
+ internalType: "bytes32",
1831
+ },
1832
+ {
1833
+ name: "proof",
1834
+ type: "tuple",
1835
+ internalType: "struct LibQMDBCurrent.Proof",
1836
+ components: [
1837
+ {
1838
+ name: "leaves",
1839
+ type: "uint256",
1840
+ internalType: "uint256",
1841
+ },
1842
+ {
1843
+ name: "location",
1844
+ type: "uint256",
1845
+ internalType: "uint256",
1846
+ },
1847
+ {
1848
+ name: "inactivePeaks",
1849
+ type: "uint256",
1850
+ internalType: "uint256",
1851
+ },
1852
+ {
1853
+ name: "chunk",
1854
+ type: "bytes",
1855
+ internalType: "bytes",
1856
+ },
1857
+ {
1858
+ name: "opsRoot",
1859
+ type: "bytes32",
1860
+ internalType: "bytes32",
1861
+ },
1862
+ {
1863
+ name: "pending",
1864
+ type: "bytes32",
1865
+ internalType: "bytes32",
1866
+ },
1867
+ {
1868
+ name: "partialDigest",
1869
+ type: "bytes32",
1870
+ internalType: "bytes32",
1871
+ },
1872
+ {
1873
+ name: "digests",
1874
+ type: "bytes32[]",
1875
+ internalType: "bytes32[]",
1876
+ },
1877
+ ],
1878
+ },
1879
+ ],
1880
+ },
1881
+ {
1882
+ name: "admissionDeadline",
1883
+ type: "uint64",
1884
+ internalType: "uint64",
1885
+ },
1886
+ {
1887
+ name: "challengeDeadline",
1888
+ type: "uint64",
1889
+ internalType: "uint64",
1890
+ },
1891
+ {
1892
+ name: "limits_",
1893
+ type: "tuple",
1894
+ internalType: "struct ClearingCodec.Limits",
1895
+ components: [
1896
+ {
1897
+ name: "states",
1898
+ type: "uint64",
1899
+ internalType: "uint64",
1900
+ },
1901
+ {
1902
+ name: "rows",
1903
+ type: "uint64",
1904
+ internalType: "uint64",
1905
+ },
1906
+ {
1907
+ name: "withdrawals",
1908
+ type: "uint64",
1909
+ internalType: "uint64",
1910
+ },
1911
+ {
1912
+ name: "accountEntries",
1913
+ type: "uint64",
1914
+ internalType: "uint64",
1915
+ },
1916
+ {
1917
+ name: "totalEntries",
1918
+ type: "uint64",
1919
+ internalType: "uint64",
1920
+ },
1921
+ {
1922
+ name: "paymentTotal",
1923
+ type: "uint64",
1924
+ internalType: "uint64",
1925
+ },
1926
+ {
1927
+ name: "depositTotal",
1928
+ type: "uint64",
1929
+ internalType: "uint64",
1930
+ },
1931
+ {
1932
+ name: "withdrawalTotal",
1933
+ type: "uint64",
1934
+ internalType: "uint64",
1935
+ },
1936
+ ],
1937
+ },
1938
+ ],
1939
+ outputs: [],
1940
+ stateMutability: "nonpayable",
1941
+ },
1942
+ {
1943
+ type: "function",
1944
+ name: "registered",
1945
+ inputs: [],
1946
+ outputs: [
1947
+ {
1948
+ name: "",
1949
+ type: "bool",
1950
+ internalType: "bool",
1951
+ },
1952
+ ],
1953
+ stateMutability: "view",
1954
+ },
1955
+ {
1956
+ type: "function",
1957
+ name: "token",
1958
+ inputs: [],
1959
+ outputs: [
1960
+ {
1961
+ name: "",
1962
+ type: "address",
1963
+ internalType: "contract IERC20",
1964
+ },
1965
+ ],
1966
+ stateMutability: "view",
1967
+ },
1968
+ {
1969
+ type: "function",
1970
+ name: "unclaimedPayout",
1971
+ inputs: [
1972
+ {
1973
+ name: "",
1974
+ type: "address",
1975
+ internalType: "address",
1976
+ },
1977
+ ],
1978
+ outputs: [
1979
+ {
1980
+ name: "",
1981
+ type: "uint256",
1982
+ internalType: "uint256",
1983
+ },
1984
+ ],
1985
+ stateMutability: "view",
1986
+ },
1987
+ {
1988
+ type: "function",
1989
+ name: "unfinalizedDeposits",
1990
+ inputs: [],
1991
+ outputs: [
1992
+ {
1993
+ name: "",
1994
+ type: "uint64",
1995
+ internalType: "uint64",
1996
+ },
1997
+ ],
1998
+ stateMutability: "view",
1999
+ },
2000
+ {
2001
+ type: "function",
2002
+ name: "unit",
2003
+ inputs: [],
2004
+ outputs: [
2005
+ {
2006
+ name: "",
2007
+ type: "uint256",
2008
+ internalType: "uint256",
2009
+ },
2010
+ ],
2011
+ stateMutability: "view",
2012
+ },
2013
+ {
2014
+ type: "function",
2015
+ name: "withdrawUnclaimed",
2016
+ inputs: [],
2017
+ outputs: [],
2018
+ stateMutability: "nonpayable",
2019
+ },
2020
+ {
2021
+ type: "function",
2022
+ name: "withdrawals",
2023
+ inputs: [
2024
+ {
2025
+ name: "",
2026
+ type: "bytes32",
2027
+ internalType: "bytes32",
2028
+ },
2029
+ ],
2030
+ outputs: [
2031
+ {
2032
+ name: "encodedHash",
2033
+ type: "bytes32",
2034
+ internalType: "bytes32",
2035
+ },
2036
+ {
2037
+ name: "epochPlusOne",
2038
+ type: "uint64",
2039
+ internalType: "uint64",
2040
+ },
2041
+ {
2042
+ name: "deadline",
2043
+ type: "uint64",
2044
+ internalType: "uint64",
2045
+ },
2046
+ {
2047
+ name: "amount",
2048
+ type: "uint64",
2049
+ internalType: "uint64",
2050
+ },
2051
+ {
2052
+ name: "destination",
2053
+ type: "address",
2054
+ internalType: "address",
2055
+ },
2056
+ {
2057
+ name: "queued",
2058
+ type: "bool",
2059
+ internalType: "bool",
2060
+ },
2061
+ ],
2062
+ stateMutability: "view",
2063
+ },
2064
+ {
2065
+ type: "event",
2066
+ name: "Admitted",
2067
+ inputs: [
2068
+ {
2069
+ name: "epoch",
2070
+ type: "uint64",
2071
+ indexed: true,
2072
+ internalType: "uint64",
2073
+ },
2074
+ {
2075
+ name: "header",
2076
+ type: "bytes32",
2077
+ indexed: false,
2078
+ internalType: "bytes32",
2079
+ },
2080
+ {
2081
+ name: "roots",
2082
+ type: "bytes",
2083
+ indexed: false,
2084
+ internalType: "bytes",
2085
+ },
2086
+ {
2087
+ name: "withdrawalTotal",
2088
+ type: "uint64",
2089
+ indexed: false,
2090
+ internalType: "uint64",
2091
+ },
2092
+ ],
2093
+ anonymous: false,
2094
+ },
2095
+ {
2096
+ type: "event",
2097
+ name: "Claimed",
2098
+ inputs: [
2099
+ {
2100
+ name: "location",
2101
+ type: "uint256",
2102
+ indexed: true,
2103
+ internalType: "uint256",
2104
+ },
2105
+ {
2106
+ name: "destination",
2107
+ type: "address",
2108
+ indexed: false,
2109
+ internalType: "address",
2110
+ },
2111
+ {
2112
+ name: "amount",
2113
+ type: "uint64",
2114
+ indexed: false,
2115
+ internalType: "uint64",
2116
+ },
2117
+ ],
2118
+ anonymous: false,
2119
+ },
2120
+ {
2121
+ type: "event",
2122
+ name: "Deposited",
2123
+ inputs: [
2124
+ {
2125
+ name: "epoch",
2126
+ type: "uint64",
2127
+ indexed: true,
2128
+ internalType: "uint64",
2129
+ },
2130
+ {
2131
+ name: "account",
2132
+ type: "bytes",
2133
+ indexed: false,
2134
+ internalType: "bytes",
2135
+ },
2136
+ {
2137
+ name: "amount",
2138
+ type: "uint64",
2139
+ indexed: false,
2140
+ internalType: "uint64",
2141
+ },
2142
+ {
2143
+ name: "deadline",
2144
+ type: "uint64",
2145
+ indexed: false,
2146
+ internalType: "uint64",
2147
+ },
2148
+ ],
2149
+ anonymous: false,
2150
+ },
2151
+ {
2152
+ type: "event",
2153
+ name: "Faulted",
2154
+ inputs: [
2155
+ {
2156
+ name: "reason",
2157
+ type: "uint8",
2158
+ indexed: false,
2159
+ internalType: "enum Clearing.Fault",
2160
+ },
2161
+ {
2162
+ name: "invalidFrom",
2163
+ type: "uint64",
2164
+ indexed: false,
2165
+ internalType: "uint64",
2166
+ },
2167
+ ],
2168
+ anonymous: false,
2169
+ },
2170
+ {
2171
+ type: "event",
2172
+ name: "Finalized",
2173
+ inputs: [
2174
+ {
2175
+ name: "epoch",
2176
+ type: "uint64",
2177
+ indexed: true,
2178
+ internalType: "uint64",
2179
+ },
2180
+ {
2181
+ name: "state",
2182
+ type: "bytes32",
2183
+ indexed: false,
2184
+ internalType: "bytes32",
2185
+ },
2186
+ {
2187
+ name: "liability",
2188
+ type: "uint64",
2189
+ indexed: false,
2190
+ internalType: "uint64",
2191
+ },
2192
+ {
2193
+ name: "withdrawalTotal",
2194
+ type: "uint64",
2195
+ indexed: false,
2196
+ internalType: "uint64",
2197
+ },
2198
+ ],
2199
+ anonymous: false,
2200
+ },
2201
+ {
2202
+ type: "event",
2203
+ name: "Invalidated",
2204
+ inputs: [
2205
+ {
2206
+ name: "epoch",
2207
+ type: "uint64",
2208
+ indexed: true,
2209
+ internalType: "uint64",
2210
+ },
2211
+ ],
2212
+ anonymous: false,
2213
+ },
2214
+ {
2215
+ type: "event",
2216
+ name: "PayoutDeferred",
2217
+ inputs: [
2218
+ {
2219
+ name: "destination",
2220
+ type: "address",
2221
+ indexed: true,
2222
+ internalType: "address",
2223
+ },
2224
+ {
2225
+ name: "amount",
2226
+ type: "uint64",
2227
+ indexed: false,
2228
+ internalType: "uint64",
2229
+ },
2230
+ ],
2231
+ anonymous: false,
2232
+ },
2233
+ {
2234
+ type: "event",
2235
+ name: "PayoutWithdrawn",
2236
+ inputs: [
2237
+ {
2238
+ name: "destination",
2239
+ type: "address",
2240
+ indexed: true,
2241
+ internalType: "address",
2242
+ },
2243
+ {
2244
+ name: "amount",
2245
+ type: "uint256",
2246
+ indexed: false,
2247
+ internalType: "uint256",
2248
+ },
2249
+ ],
2250
+ anonymous: false,
2251
+ },
2252
+ {
2253
+ type: "event",
2254
+ name: "Registered",
2255
+ inputs: [
2256
+ {
2257
+ name: "epoch",
2258
+ type: "uint64",
2259
+ indexed: true,
2260
+ internalType: "uint64",
2261
+ },
2262
+ {
2263
+ name: "context",
2264
+ type: "bytes",
2265
+ indexed: false,
2266
+ internalType: "bytes",
2267
+ },
2268
+ ],
2269
+ anonymous: false,
2270
+ },
2271
+ {
2272
+ type: "event",
2273
+ name: "WithdrawalQueued",
2274
+ inputs: [
2275
+ {
2276
+ name: "id",
2277
+ type: "bytes32",
2278
+ indexed: true,
2279
+ internalType: "bytes32",
2280
+ },
2281
+ {
2282
+ name: "encoded",
2283
+ type: "bytes",
2284
+ indexed: false,
2285
+ internalType: "bytes",
2286
+ },
2287
+ ],
2288
+ anonymous: false,
2289
+ },
2290
+ {
2291
+ type: "error",
2292
+ name: "AlreadyClaimed",
2293
+ inputs: [],
2294
+ },
2295
+ {
2296
+ type: "error",
2297
+ name: "DepositAccountsExceeded",
2298
+ inputs: [],
2299
+ },
2300
+ {
2301
+ type: "error",
2302
+ name: "DepositShortfall",
2303
+ inputs: [],
2304
+ },
2305
+ {
2306
+ type: "error",
2307
+ name: "InvalidBoundary",
2308
+ inputs: [],
2309
+ },
2310
+ {
2311
+ type: "error",
2312
+ name: "InvalidCertificate",
2313
+ inputs: [],
2314
+ },
2315
+ {
2316
+ type: "error",
2317
+ name: "InvalidClose",
2318
+ inputs: [],
2319
+ },
2320
+ {
2321
+ type: "error",
2322
+ name: "InvalidDeadline",
2323
+ inputs: [],
2324
+ },
2325
+ {
2326
+ type: "error",
2327
+ name: "InvalidKey",
2328
+ inputs: [],
2329
+ },
2330
+ {
2331
+ type: "error",
2332
+ name: "InvalidProof",
2333
+ inputs: [],
2334
+ },
2335
+ {
2336
+ type: "error",
2337
+ name: "QueuedWithdrawalsExceeded",
2338
+ inputs: [],
2339
+ },
2340
+ {
2341
+ type: "error",
2342
+ name: "ReentrancyGuardReentrantCall",
2343
+ inputs: [],
2344
+ },
2345
+ {
2346
+ type: "error",
2347
+ name: "SafeERC20FailedOperation",
2348
+ inputs: [
2349
+ {
2350
+ name: "token",
2351
+ type: "address",
2352
+ internalType: "address",
2353
+ },
2354
+ ],
2355
+ },
2356
+ {
2357
+ type: "error",
2358
+ name: "Unavailable",
2359
+ inputs: [],
2360
+ },
2361
+ ];