@morpho-dev/router 0.7.0 → 0.7.2

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.
@@ -150,8 +150,1014 @@ declare const MetaMorphoFactory: readonly [{
150
150
  }];
151
151
  }];
152
152
  type MetaMorphoFactory = typeof MetaMorphoFactory;
153
+ //#endregion
154
+ //#region src/core/Abi/MorphoV2.d.ts
155
+ declare const MorphoV2: readonly [{
156
+ readonly type: "constructor";
157
+ readonly stateMutability: "nonpayable";
158
+ readonly inputs: readonly [];
159
+ }, {
160
+ readonly name: "collateralOf";
161
+ readonly type: "function";
162
+ readonly stateMutability: "view";
163
+ readonly inputs: readonly [{
164
+ readonly type: "bytes32";
165
+ readonly name: "id";
166
+ }, {
167
+ readonly type: "address";
168
+ readonly name: "user";
169
+ }, {
170
+ readonly type: "address";
171
+ readonly name: "collateralToken";
172
+ }];
173
+ readonly outputs: readonly [{
174
+ readonly type: "uint256";
175
+ }];
176
+ }, {
177
+ readonly name: "consume";
178
+ readonly type: "function";
179
+ readonly stateMutability: "nonpayable";
180
+ readonly inputs: readonly [{
181
+ readonly type: "bytes32";
182
+ readonly name: "group";
183
+ }, {
184
+ readonly type: "uint256";
185
+ readonly name: "amount";
186
+ }];
187
+ readonly outputs: readonly [];
188
+ }, {
189
+ readonly name: "consumed";
190
+ readonly type: "function";
191
+ readonly stateMutability: "view";
192
+ readonly inputs: readonly [{
193
+ readonly type: "address";
194
+ readonly name: "user";
195
+ }, {
196
+ readonly type: "bytes32";
197
+ readonly name: "group";
198
+ }];
199
+ readonly outputs: readonly [{
200
+ readonly type: "uint256";
201
+ }];
202
+ }, {
203
+ readonly name: "debtOf";
204
+ readonly type: "function";
205
+ readonly stateMutability: "view";
206
+ readonly inputs: readonly [{
207
+ readonly type: "bytes32";
208
+ readonly name: "id";
209
+ }, {
210
+ readonly type: "address";
211
+ readonly name: "user";
212
+ }];
213
+ readonly outputs: readonly [{
214
+ readonly type: "uint256";
215
+ }];
216
+ }, {
217
+ readonly name: "defaultFees";
218
+ readonly type: "function";
219
+ readonly stateMutability: "view";
220
+ readonly inputs: readonly [{
221
+ readonly type: "address";
222
+ readonly name: "loanToken";
223
+ }, {
224
+ readonly type: "uint256";
225
+ readonly name: "index";
226
+ }];
227
+ readonly outputs: readonly [{
228
+ readonly type: "uint16";
229
+ }];
230
+ }, {
231
+ readonly name: "feeSetter";
232
+ readonly type: "function";
233
+ readonly stateMutability: "view";
234
+ readonly inputs: readonly [];
235
+ readonly outputs: readonly [{
236
+ readonly type: "address";
237
+ }];
238
+ }, {
239
+ readonly name: "fees";
240
+ readonly type: "function";
241
+ readonly stateMutability: "view";
242
+ readonly inputs: readonly [{
243
+ readonly type: "bytes32";
244
+ readonly name: "id";
245
+ }];
246
+ readonly outputs: readonly [{
247
+ readonly type: "uint16[6]";
248
+ }];
249
+ }, {
250
+ readonly name: "flashLoan";
251
+ readonly type: "function";
252
+ readonly stateMutability: "nonpayable";
253
+ readonly inputs: readonly [{
254
+ readonly type: "address";
255
+ readonly name: "token";
256
+ }, {
257
+ readonly type: "uint256";
258
+ readonly name: "assets";
259
+ }, {
260
+ readonly type: "address";
261
+ readonly name: "callback";
262
+ }, {
263
+ readonly type: "bytes";
264
+ readonly name: "data";
265
+ }];
266
+ readonly outputs: readonly [];
267
+ }, {
268
+ readonly name: "isHealthy";
269
+ readonly type: "function";
270
+ readonly stateMutability: "view";
271
+ readonly inputs: readonly [{
272
+ readonly type: "tuple";
273
+ readonly components: readonly [{
274
+ readonly type: "address";
275
+ readonly name: "loanToken";
276
+ }, {
277
+ readonly type: "tuple[]";
278
+ readonly components: readonly [{
279
+ readonly type: "address";
280
+ readonly name: "token";
281
+ }, {
282
+ readonly type: "uint256";
283
+ readonly name: "lltv";
284
+ }, {
285
+ readonly type: "address";
286
+ readonly name: "oracle";
287
+ }];
288
+ readonly name: "collaterals";
289
+ }, {
290
+ readonly type: "uint256";
291
+ readonly name: "maturity";
292
+ }];
293
+ readonly name: "obligation";
294
+ }, {
295
+ readonly type: "bytes32";
296
+ readonly name: "id";
297
+ }, {
298
+ readonly type: "address";
299
+ readonly name: "borrower";
300
+ }];
301
+ readonly outputs: readonly [{
302
+ readonly type: "bool";
303
+ }];
304
+ }, {
305
+ readonly name: "liquidate";
306
+ readonly type: "function";
307
+ readonly stateMutability: "nonpayable";
308
+ readonly inputs: readonly [{
309
+ readonly type: "tuple";
310
+ readonly components: readonly [{
311
+ readonly type: "address";
312
+ readonly name: "loanToken";
313
+ }, {
314
+ readonly type: "tuple[]";
315
+ readonly components: readonly [{
316
+ readonly type: "address";
317
+ readonly name: "token";
318
+ }, {
319
+ readonly type: "uint256";
320
+ readonly name: "lltv";
321
+ }, {
322
+ readonly type: "address";
323
+ readonly name: "oracle";
324
+ }];
325
+ readonly name: "collaterals";
326
+ }, {
327
+ readonly type: "uint256";
328
+ readonly name: "maturity";
329
+ }];
330
+ readonly name: "obligation";
331
+ }, {
332
+ readonly type: "tuple[]";
333
+ readonly components: readonly [{
334
+ readonly type: "uint256";
335
+ readonly name: "collateralIndex";
336
+ }, {
337
+ readonly type: "uint256";
338
+ readonly name: "repaid";
339
+ }, {
340
+ readonly type: "uint256";
341
+ readonly name: "seized";
342
+ }];
343
+ readonly name: "seizures";
344
+ }, {
345
+ readonly type: "address";
346
+ readonly name: "borrower";
347
+ }, {
348
+ readonly type: "bytes";
349
+ readonly name: "data";
350
+ }];
351
+ readonly outputs: readonly [{
352
+ readonly type: "tuple[]";
353
+ readonly components: readonly [{
354
+ readonly type: "uint256";
355
+ readonly name: "collateralIndex";
356
+ }, {
357
+ readonly type: "uint256";
358
+ readonly name: "repaid";
359
+ }, {
360
+ readonly type: "uint256";
361
+ readonly name: "seized";
362
+ }];
363
+ }];
364
+ }, {
365
+ readonly name: "multicall";
366
+ readonly type: "function";
367
+ readonly stateMutability: "nonpayable";
368
+ readonly inputs: readonly [{
369
+ readonly type: "bytes[]";
370
+ readonly name: "calls";
371
+ }];
372
+ readonly outputs: readonly [];
373
+ }, {
374
+ readonly name: "obligationCreated";
375
+ readonly type: "function";
376
+ readonly stateMutability: "view";
377
+ readonly inputs: readonly [{
378
+ readonly type: "bytes32";
379
+ readonly name: "id";
380
+ }];
381
+ readonly outputs: readonly [{
382
+ readonly type: "bool";
383
+ }];
384
+ }, {
385
+ readonly name: "obligationState";
386
+ readonly type: "function";
387
+ readonly stateMutability: "view";
388
+ readonly inputs: readonly [{
389
+ readonly type: "bytes32";
390
+ readonly name: "id";
391
+ }];
392
+ readonly outputs: readonly [{
393
+ readonly type: "uint128";
394
+ readonly name: "totalUnits";
395
+ }, {
396
+ readonly type: "uint128";
397
+ readonly name: "totalShares";
398
+ }, {
399
+ readonly type: "uint256";
400
+ readonly name: "withdrawable";
401
+ }, {
402
+ readonly type: "bool";
403
+ readonly name: "created";
404
+ }];
405
+ }, {
406
+ readonly name: "owner";
407
+ readonly type: "function";
408
+ readonly stateMutability: "view";
409
+ readonly inputs: readonly [];
410
+ readonly outputs: readonly [{
411
+ readonly type: "address";
412
+ }];
413
+ }, {
414
+ readonly name: "repay";
415
+ readonly type: "function";
416
+ readonly stateMutability: "nonpayable";
417
+ readonly inputs: readonly [{
418
+ readonly type: "tuple";
419
+ readonly components: readonly [{
420
+ readonly type: "address";
421
+ readonly name: "loanToken";
422
+ }, {
423
+ readonly type: "tuple[]";
424
+ readonly components: readonly [{
425
+ readonly type: "address";
426
+ readonly name: "token";
427
+ }, {
428
+ readonly type: "uint256";
429
+ readonly name: "lltv";
430
+ }, {
431
+ readonly type: "address";
432
+ readonly name: "oracle";
433
+ }];
434
+ readonly name: "collaterals";
435
+ }, {
436
+ readonly type: "uint256";
437
+ readonly name: "maturity";
438
+ }];
439
+ readonly name: "obligation";
440
+ }, {
441
+ readonly type: "uint256";
442
+ readonly name: "obligationUnits";
443
+ }, {
444
+ readonly type: "address";
445
+ readonly name: "onBehalf";
446
+ }];
447
+ readonly outputs: readonly [];
448
+ }, {
449
+ readonly name: "session";
450
+ readonly type: "function";
451
+ readonly stateMutability: "view";
452
+ readonly inputs: readonly [{
453
+ readonly type: "address";
454
+ readonly name: "user";
455
+ }];
456
+ readonly outputs: readonly [{
457
+ readonly type: "bytes32";
458
+ }];
459
+ }, {
460
+ readonly name: "setDefaultTradingFee";
461
+ readonly type: "function";
462
+ readonly stateMutability: "nonpayable";
463
+ readonly inputs: readonly [{
464
+ readonly type: "address";
465
+ readonly name: "loanToken";
466
+ }, {
467
+ readonly type: "uint256";
468
+ readonly name: "index";
469
+ }, {
470
+ readonly type: "uint256";
471
+ readonly name: "newTradingFee";
472
+ }];
473
+ readonly outputs: readonly [];
474
+ }, {
475
+ readonly name: "setFeeSetter";
476
+ readonly type: "function";
477
+ readonly stateMutability: "nonpayable";
478
+ readonly inputs: readonly [{
479
+ readonly type: "address";
480
+ readonly name: "newFeeSetter";
481
+ }];
482
+ readonly outputs: readonly [];
483
+ }, {
484
+ readonly name: "setObligationTradingFee";
485
+ readonly type: "function";
486
+ readonly stateMutability: "nonpayable";
487
+ readonly inputs: readonly [{
488
+ readonly type: "bytes32";
489
+ readonly name: "id";
490
+ }, {
491
+ readonly type: "uint256";
492
+ readonly name: "index";
493
+ }, {
494
+ readonly type: "uint256";
495
+ readonly name: "newTradingFee";
496
+ }];
497
+ readonly outputs: readonly [];
498
+ }, {
499
+ readonly name: "setOwner";
500
+ readonly type: "function";
501
+ readonly stateMutability: "nonpayable";
502
+ readonly inputs: readonly [{
503
+ readonly type: "address";
504
+ readonly name: "newOwner";
505
+ }];
506
+ readonly outputs: readonly [];
507
+ }, {
508
+ readonly name: "setTradingFeeRecipient";
509
+ readonly type: "function";
510
+ readonly stateMutability: "nonpayable";
511
+ readonly inputs: readonly [{
512
+ readonly type: "address";
513
+ readonly name: "recipient";
514
+ }];
515
+ readonly outputs: readonly [];
516
+ }, {
517
+ readonly name: "sharesOf";
518
+ readonly type: "function";
519
+ readonly stateMutability: "view";
520
+ readonly inputs: readonly [{
521
+ readonly type: "bytes32";
522
+ readonly name: "id";
523
+ }, {
524
+ readonly type: "address";
525
+ readonly name: "user";
526
+ }];
527
+ readonly outputs: readonly [{
528
+ readonly type: "uint256";
529
+ }];
530
+ }, {
531
+ readonly name: "shuffleSession";
532
+ readonly type: "function";
533
+ readonly stateMutability: "nonpayable";
534
+ readonly inputs: readonly [];
535
+ readonly outputs: readonly [];
536
+ }, {
537
+ readonly name: "supplyCollateral";
538
+ readonly type: "function";
539
+ readonly stateMutability: "nonpayable";
540
+ readonly inputs: readonly [{
541
+ readonly type: "tuple";
542
+ readonly components: readonly [{
543
+ readonly type: "address";
544
+ readonly name: "loanToken";
545
+ }, {
546
+ readonly type: "tuple[]";
547
+ readonly components: readonly [{
548
+ readonly type: "address";
549
+ readonly name: "token";
550
+ }, {
551
+ readonly type: "uint256";
552
+ readonly name: "lltv";
553
+ }, {
554
+ readonly type: "address";
555
+ readonly name: "oracle";
556
+ }];
557
+ readonly name: "collaterals";
558
+ }, {
559
+ readonly type: "uint256";
560
+ readonly name: "maturity";
561
+ }];
562
+ readonly name: "obligation";
563
+ }, {
564
+ readonly type: "address";
565
+ readonly name: "collateral";
566
+ }, {
567
+ readonly type: "uint256";
568
+ readonly name: "assets";
569
+ }, {
570
+ readonly type: "address";
571
+ readonly name: "onBehalf";
572
+ }];
573
+ readonly outputs: readonly [];
574
+ }, {
575
+ readonly name: "take";
576
+ readonly type: "function";
577
+ readonly stateMutability: "nonpayable";
578
+ readonly inputs: readonly [{
579
+ readonly type: "uint256";
580
+ readonly name: "buyerAssets";
581
+ }, {
582
+ readonly type: "uint256";
583
+ readonly name: "sellerAssets";
584
+ }, {
585
+ readonly type: "uint256";
586
+ readonly name: "obligationUnits";
587
+ }, {
588
+ readonly type: "uint256";
589
+ readonly name: "obligationShares";
590
+ }, {
591
+ readonly type: "address";
592
+ readonly name: "taker";
593
+ }, {
594
+ readonly type: "tuple";
595
+ readonly components: readonly [{
596
+ readonly type: "tuple";
597
+ readonly components: readonly [{
598
+ readonly type: "address";
599
+ readonly name: "loanToken";
600
+ }, {
601
+ readonly type: "tuple[]";
602
+ readonly components: readonly [{
603
+ readonly type: "address";
604
+ readonly name: "token";
605
+ }, {
606
+ readonly type: "uint256";
607
+ readonly name: "lltv";
608
+ }, {
609
+ readonly type: "address";
610
+ readonly name: "oracle";
611
+ }];
612
+ readonly name: "collaterals";
613
+ }, {
614
+ readonly type: "uint256";
615
+ readonly name: "maturity";
616
+ }];
617
+ readonly name: "obligation";
618
+ }, {
619
+ readonly type: "bool";
620
+ readonly name: "buy";
621
+ }, {
622
+ readonly type: "address";
623
+ readonly name: "maker";
624
+ }, {
625
+ readonly type: "uint256";
626
+ readonly name: "assets";
627
+ }, {
628
+ readonly type: "uint256";
629
+ readonly name: "obligationUnits";
630
+ }, {
631
+ readonly type: "uint256";
632
+ readonly name: "obligationShares";
633
+ }, {
634
+ readonly type: "uint256";
635
+ readonly name: "start";
636
+ }, {
637
+ readonly type: "uint256";
638
+ readonly name: "expiry";
639
+ }, {
640
+ readonly type: "uint256";
641
+ readonly name: "tick";
642
+ }, {
643
+ readonly type: "bytes32";
644
+ readonly name: "group";
645
+ }, {
646
+ readonly type: "bytes32";
647
+ readonly name: "session";
648
+ }, {
649
+ readonly type: "address";
650
+ readonly name: "callback";
651
+ }, {
652
+ readonly type: "bytes";
653
+ readonly name: "callbackData";
654
+ }];
655
+ readonly name: "offer";
656
+ }, {
657
+ readonly type: "tuple";
658
+ readonly components: readonly [{
659
+ readonly type: "uint8";
660
+ readonly name: "v";
661
+ }, {
662
+ readonly type: "bytes32";
663
+ readonly name: "r";
664
+ }, {
665
+ readonly type: "bytes32";
666
+ readonly name: "s";
667
+ }];
668
+ readonly name: "sig";
669
+ }, {
670
+ readonly type: "bytes32";
671
+ readonly name: "root";
672
+ }, {
673
+ readonly type: "bytes32[]";
674
+ readonly name: "proof";
675
+ }, {
676
+ readonly type: "address";
677
+ readonly name: "takerCallback";
678
+ }, {
679
+ readonly type: "bytes";
680
+ readonly name: "takerCallbackData";
681
+ }];
682
+ readonly outputs: readonly [{
683
+ readonly type: "uint256";
684
+ }, {
685
+ readonly type: "uint256";
686
+ }, {
687
+ readonly type: "uint256";
688
+ }, {
689
+ readonly type: "uint256";
690
+ }];
691
+ }, {
692
+ readonly name: "totalShares";
693
+ readonly type: "function";
694
+ readonly stateMutability: "view";
695
+ readonly inputs: readonly [{
696
+ readonly type: "bytes32";
697
+ readonly name: "id";
698
+ }];
699
+ readonly outputs: readonly [{
700
+ readonly type: "uint256";
701
+ }];
702
+ }, {
703
+ readonly name: "totalUnits";
704
+ readonly type: "function";
705
+ readonly stateMutability: "view";
706
+ readonly inputs: readonly [{
707
+ readonly type: "bytes32";
708
+ readonly name: "id";
709
+ }];
710
+ readonly outputs: readonly [{
711
+ readonly type: "uint256";
712
+ }];
713
+ }, {
714
+ readonly name: "touchObligation";
715
+ readonly type: "function";
716
+ readonly stateMutability: "nonpayable";
717
+ readonly inputs: readonly [{
718
+ readonly type: "tuple";
719
+ readonly components: readonly [{
720
+ readonly type: "address";
721
+ readonly name: "loanToken";
722
+ }, {
723
+ readonly type: "tuple[]";
724
+ readonly components: readonly [{
725
+ readonly type: "address";
726
+ readonly name: "token";
727
+ }, {
728
+ readonly type: "uint256";
729
+ readonly name: "lltv";
730
+ }, {
731
+ readonly type: "address";
732
+ readonly name: "oracle";
733
+ }];
734
+ readonly name: "collaterals";
735
+ }, {
736
+ readonly type: "uint256";
737
+ readonly name: "maturity";
738
+ }];
739
+ readonly name: "obligation";
740
+ }];
741
+ readonly outputs: readonly [{
742
+ readonly type: "bytes32";
743
+ }];
744
+ }, {
745
+ readonly name: "tradingFee";
746
+ readonly type: "function";
747
+ readonly stateMutability: "view";
748
+ readonly inputs: readonly [{
749
+ readonly type: "bytes32";
750
+ readonly name: "id";
751
+ }, {
752
+ readonly type: "uint256";
753
+ readonly name: "timeToMaturity";
754
+ }];
755
+ readonly outputs: readonly [{
756
+ readonly type: "uint256";
757
+ }];
758
+ }, {
759
+ readonly name: "tradingFeeRecipient";
760
+ readonly type: "function";
761
+ readonly stateMutability: "view";
762
+ readonly inputs: readonly [];
763
+ readonly outputs: readonly [{
764
+ readonly type: "address";
765
+ }];
766
+ }, {
767
+ readonly name: "withdraw";
768
+ readonly type: "function";
769
+ readonly stateMutability: "nonpayable";
770
+ readonly inputs: readonly [{
771
+ readonly type: "tuple";
772
+ readonly components: readonly [{
773
+ readonly type: "address";
774
+ readonly name: "loanToken";
775
+ }, {
776
+ readonly type: "tuple[]";
777
+ readonly components: readonly [{
778
+ readonly type: "address";
779
+ readonly name: "token";
780
+ }, {
781
+ readonly type: "uint256";
782
+ readonly name: "lltv";
783
+ }, {
784
+ readonly type: "address";
785
+ readonly name: "oracle";
786
+ }];
787
+ readonly name: "collaterals";
788
+ }, {
789
+ readonly type: "uint256";
790
+ readonly name: "maturity";
791
+ }];
792
+ readonly name: "obligation";
793
+ }, {
794
+ readonly type: "uint256";
795
+ readonly name: "obligationUnits";
796
+ }, {
797
+ readonly type: "uint256";
798
+ readonly name: "shares";
799
+ }, {
800
+ readonly type: "address";
801
+ readonly name: "onBehalf";
802
+ }];
803
+ readonly outputs: readonly [{
804
+ readonly type: "uint256";
805
+ }, {
806
+ readonly type: "uint256";
807
+ }];
808
+ }, {
809
+ readonly name: "withdrawCollateral";
810
+ readonly type: "function";
811
+ readonly stateMutability: "nonpayable";
812
+ readonly inputs: readonly [{
813
+ readonly type: "tuple";
814
+ readonly components: readonly [{
815
+ readonly type: "address";
816
+ readonly name: "loanToken";
817
+ }, {
818
+ readonly type: "tuple[]";
819
+ readonly components: readonly [{
820
+ readonly type: "address";
821
+ readonly name: "token";
822
+ }, {
823
+ readonly type: "uint256";
824
+ readonly name: "lltv";
825
+ }, {
826
+ readonly type: "address";
827
+ readonly name: "oracle";
828
+ }];
829
+ readonly name: "collaterals";
830
+ }, {
831
+ readonly type: "uint256";
832
+ readonly name: "maturity";
833
+ }];
834
+ readonly name: "obligation";
835
+ }, {
836
+ readonly type: "address";
837
+ readonly name: "collateral";
838
+ }, {
839
+ readonly type: "uint256";
840
+ readonly name: "assets";
841
+ }, {
842
+ readonly type: "address";
843
+ readonly name: "onBehalf";
844
+ }];
845
+ readonly outputs: readonly [];
846
+ }, {
847
+ readonly name: "withdrawable";
848
+ readonly type: "function";
849
+ readonly stateMutability: "view";
850
+ readonly inputs: readonly [{
851
+ readonly type: "bytes32";
852
+ readonly name: "id";
853
+ }];
854
+ readonly outputs: readonly [{
855
+ readonly type: "uint256";
856
+ }];
857
+ }, {
858
+ readonly name: "Constructor";
859
+ readonly type: "event";
860
+ readonly inputs: readonly [{
861
+ readonly type: "address";
862
+ readonly name: "owner";
863
+ readonly indexed: true;
864
+ }];
865
+ }, {
866
+ readonly name: "Consume";
867
+ readonly type: "event";
868
+ readonly inputs: readonly [{
869
+ readonly type: "address";
870
+ readonly name: "user";
871
+ readonly indexed: true;
872
+ }, {
873
+ readonly type: "bytes32";
874
+ readonly name: "group";
875
+ readonly indexed: true;
876
+ }, {
877
+ readonly type: "uint256";
878
+ readonly name: "amount";
879
+ }];
880
+ }, {
881
+ readonly name: "FlashLoan";
882
+ readonly type: "event";
883
+ readonly inputs: readonly [{
884
+ readonly type: "address";
885
+ readonly name: "caller";
886
+ readonly indexed: true;
887
+ }, {
888
+ readonly type: "address";
889
+ readonly name: "token";
890
+ readonly indexed: true;
891
+ }, {
892
+ readonly type: "uint256";
893
+ readonly name: "assets";
894
+ }];
895
+ }, {
896
+ readonly name: "Liquidate";
897
+ readonly type: "event";
898
+ readonly inputs: readonly [{
899
+ readonly type: "address";
900
+ readonly name: "caller";
901
+ readonly indexed: true;
902
+ }, {
903
+ readonly type: "bytes32";
904
+ readonly name: "id";
905
+ readonly indexed: true;
906
+ }, {
907
+ readonly type: "tuple[]";
908
+ readonly components: readonly [{
909
+ readonly type: "uint256";
910
+ readonly name: "collateralIndex";
911
+ }, {
912
+ readonly type: "uint256";
913
+ readonly name: "repaid";
914
+ }, {
915
+ readonly type: "uint256";
916
+ readonly name: "seized";
917
+ }];
918
+ readonly name: "seizures";
919
+ }, {
920
+ readonly type: "address";
921
+ readonly name: "borrower";
922
+ readonly indexed: true;
923
+ }, {
924
+ readonly type: "uint256";
925
+ readonly name: "totalRepaid";
926
+ }, {
927
+ readonly type: "uint256";
928
+ readonly name: "badDebt";
929
+ }];
930
+ }, {
931
+ readonly name: "ObligationCreated";
932
+ readonly type: "event";
933
+ readonly inputs: readonly [{
934
+ readonly type: "bytes32";
935
+ readonly name: "id";
936
+ readonly indexed: true;
937
+ }, {
938
+ readonly type: "tuple";
939
+ readonly components: readonly [{
940
+ readonly type: "address";
941
+ readonly name: "loanToken";
942
+ }, {
943
+ readonly type: "tuple[]";
944
+ readonly components: readonly [{
945
+ readonly type: "address";
946
+ readonly name: "token";
947
+ }, {
948
+ readonly type: "uint256";
949
+ readonly name: "lltv";
950
+ }, {
951
+ readonly type: "address";
952
+ readonly name: "oracle";
953
+ }];
954
+ readonly name: "collaterals";
955
+ }, {
956
+ readonly type: "uint256";
957
+ readonly name: "maturity";
958
+ }];
959
+ readonly name: "obligation";
960
+ }];
961
+ }, {
962
+ readonly name: "Repay";
963
+ readonly type: "event";
964
+ readonly inputs: readonly [{
965
+ readonly type: "address";
966
+ readonly name: "caller";
967
+ readonly indexed: true;
968
+ }, {
969
+ readonly type: "bytes32";
970
+ readonly name: "id";
971
+ readonly indexed: true;
972
+ }, {
973
+ readonly type: "uint256";
974
+ readonly name: "obligationUnits";
975
+ }, {
976
+ readonly type: "address";
977
+ readonly name: "onBehalf";
978
+ readonly indexed: true;
979
+ }];
980
+ }, {
981
+ readonly name: "SetDefaultTradingFee";
982
+ readonly type: "event";
983
+ readonly inputs: readonly [{
984
+ readonly type: "address";
985
+ readonly name: "loanToken";
986
+ readonly indexed: true;
987
+ }, {
988
+ readonly type: "uint256";
989
+ readonly name: "index";
990
+ readonly indexed: true;
991
+ }, {
992
+ readonly type: "uint256";
993
+ readonly name: "newTradingFee";
994
+ }];
995
+ }, {
996
+ readonly name: "SetFeeSetter";
997
+ readonly type: "event";
998
+ readonly inputs: readonly [{
999
+ readonly type: "address";
1000
+ readonly name: "feeSetter";
1001
+ readonly indexed: true;
1002
+ }];
1003
+ }, {
1004
+ readonly name: "SetObligationTradingFee";
1005
+ readonly type: "event";
1006
+ readonly inputs: readonly [{
1007
+ readonly type: "bytes32";
1008
+ readonly name: "id";
1009
+ readonly indexed: true;
1010
+ }, {
1011
+ readonly type: "uint256";
1012
+ readonly name: "index";
1013
+ readonly indexed: true;
1014
+ }, {
1015
+ readonly type: "uint256";
1016
+ readonly name: "newTradingFee";
1017
+ }];
1018
+ }, {
1019
+ readonly name: "SetOwner";
1020
+ readonly type: "event";
1021
+ readonly inputs: readonly [{
1022
+ readonly type: "address";
1023
+ readonly name: "owner";
1024
+ readonly indexed: true;
1025
+ }];
1026
+ }, {
1027
+ readonly name: "SetTradingFeeRecipient";
1028
+ readonly type: "event";
1029
+ readonly inputs: readonly [{
1030
+ readonly type: "address";
1031
+ readonly name: "recipient";
1032
+ readonly indexed: true;
1033
+ }];
1034
+ }, {
1035
+ readonly name: "ShuffleSession";
1036
+ readonly type: "event";
1037
+ readonly inputs: readonly [{
1038
+ readonly type: "address";
1039
+ readonly name: "user";
1040
+ readonly indexed: true;
1041
+ }, {
1042
+ readonly type: "bytes32";
1043
+ readonly name: "session";
1044
+ }];
1045
+ }, {
1046
+ readonly name: "SupplyCollateral";
1047
+ readonly type: "event";
1048
+ readonly inputs: readonly [{
1049
+ readonly type: "address";
1050
+ readonly name: "caller";
1051
+ }, {
1052
+ readonly type: "bytes32";
1053
+ readonly name: "id";
1054
+ readonly indexed: true;
1055
+ }, {
1056
+ readonly type: "address";
1057
+ readonly name: "collateral";
1058
+ readonly indexed: true;
1059
+ }, {
1060
+ readonly type: "uint256";
1061
+ readonly name: "assets";
1062
+ }, {
1063
+ readonly type: "address";
1064
+ readonly name: "onBehalf";
1065
+ readonly indexed: true;
1066
+ }];
1067
+ }, {
1068
+ readonly name: "Take";
1069
+ readonly type: "event";
1070
+ readonly inputs: readonly [{
1071
+ readonly type: "address";
1072
+ readonly name: "caller";
1073
+ }, {
1074
+ readonly type: "bytes32";
1075
+ readonly name: "id";
1076
+ readonly indexed: true;
1077
+ }, {
1078
+ readonly type: "address";
1079
+ readonly name: "maker";
1080
+ readonly indexed: true;
1081
+ }, {
1082
+ readonly type: "address";
1083
+ readonly name: "taker";
1084
+ readonly indexed: true;
1085
+ }, {
1086
+ readonly type: "bool";
1087
+ readonly name: "offerIsBuy";
1088
+ }, {
1089
+ readonly type: "uint256";
1090
+ readonly name: "buyerAssets";
1091
+ }, {
1092
+ readonly type: "uint256";
1093
+ readonly name: "sellerAssets";
1094
+ }, {
1095
+ readonly type: "uint256";
1096
+ readonly name: "obligationUnits";
1097
+ }, {
1098
+ readonly type: "uint256";
1099
+ readonly name: "obligationShares";
1100
+ }, {
1101
+ readonly type: "bool";
1102
+ readonly name: "buyerIsLender";
1103
+ }, {
1104
+ readonly type: "bool";
1105
+ readonly name: "sellerIsBorrower";
1106
+ }, {
1107
+ readonly type: "bytes32";
1108
+ readonly name: "group";
1109
+ }, {
1110
+ readonly type: "uint256";
1111
+ readonly name: "consumed";
1112
+ }];
1113
+ }, {
1114
+ readonly name: "Withdraw";
1115
+ readonly type: "event";
1116
+ readonly inputs: readonly [{
1117
+ readonly type: "address";
1118
+ readonly name: "caller";
1119
+ readonly indexed: true;
1120
+ }, {
1121
+ readonly type: "bytes32";
1122
+ readonly name: "id";
1123
+ readonly indexed: true;
1124
+ }, {
1125
+ readonly type: "uint256";
1126
+ readonly name: "obligationUnits";
1127
+ }, {
1128
+ readonly type: "uint256";
1129
+ readonly name: "shares";
1130
+ }, {
1131
+ readonly type: "address";
1132
+ readonly name: "onBehalf";
1133
+ readonly indexed: true;
1134
+ }];
1135
+ }, {
1136
+ readonly name: "WithdrawCollateral";
1137
+ readonly type: "event";
1138
+ readonly inputs: readonly [{
1139
+ readonly type: "address";
1140
+ readonly name: "caller";
1141
+ }, {
1142
+ readonly type: "bytes32";
1143
+ readonly name: "id";
1144
+ readonly indexed: true;
1145
+ }, {
1146
+ readonly type: "address";
1147
+ readonly name: "collateral";
1148
+ readonly indexed: true;
1149
+ }, {
1150
+ readonly type: "uint256";
1151
+ readonly name: "assets";
1152
+ }, {
1153
+ readonly type: "address";
1154
+ readonly name: "onBehalf";
1155
+ readonly indexed: true;
1156
+ }];
1157
+ }];
1158
+ type MorphoV2 = typeof MorphoV2;
153
1159
  declare namespace index_d_exports {
154
- export { ERC4626, MetaMorpho, MetaMorphoFactory, Morpho, Oracle$1 as Oracle };
1160
+ export { ERC4626, MetaMorpho, MetaMorphoFactory, Morpho, MorphoV2, Oracle$1 as Oracle };
155
1161
  }
156
1162
  declare const Oracle$1: readonly [{
157
1163
  readonly type: "function";
@@ -274,94 +1280,19 @@ declare const Morpho: readonly [{
274
1280
  }];
275
1281
  readonly stateMutability: "view";
276
1282
  }];
277
- //#endregion
278
- //#region src/core/types.d.ts
279
- /** Combines members of an intersection into a readable type. */
280
- type Compute<type> = { [key in keyof type]: type[key] } & unknown;
281
- declare const BrandTypeId: unique symbol;
282
- type Brand<in out ID extends string | symbol> = {
283
- readonly [BrandTypeId]: { readonly [id in ID]: ID };
284
- };
285
1283
  declare namespace Callback_d_exports {
286
- export { BuyERC20Data, BuyVaultV1CallbackData, Callback, CallbackPosition, SellERC20CallbackData, Type$1 as Type, decode$2 as decode, decodeBuyERC20, decodeBuyVaultV1Callback, decodeSellERC20Callback, encode$2 as encode, encodeBuyERC20, encodeBuyVaultV1Callback, encodeSellERC20Callback, isEmptyCallback };
1284
+ export { Callback, Type$1 as Type, isEmptyCallback };
287
1285
  }
288
- /** A position decoded from callback data. */
289
- type CallbackPosition = {
290
- /** The ERC20 token contract address. */contract: Address; /** The maximum amount available from this position. */
291
- amount: bigint;
292
- };
293
1286
  type Callback = {
294
1287
  type: Type$1.BuyWithEmptyCallback;
295
- } | (({
296
- /** The address of the callback contract. */address: Address; /** The ABI-encoded callback data. */
297
- data: Hex;
298
- } & {
299
- type: Type$1.BuyERC20; /** The decoded callback inputs. */
300
- inputs: {
301
- /** The ERC20 positions available for the callback. */positions: CallbackPosition[];
302
- };
303
- }) & Brand<"Callback">);
1288
+ } | {
1289
+ type: Type$1.SellWithEmptyCallback;
1290
+ };
304
1291
  declare enum Type$1 {
305
1292
  BuyWithEmptyCallback = "buy_with_empty_callback",
306
- BuyERC20 = "buy_erc20",
307
- BuyVaultV1Callback = "buy_vault_v1_callback",
308
- SellERC20Callback = "sell_erc20_callback"
1293
+ SellWithEmptyCallback = "sell_with_empty_callback"
309
1294
  }
310
1295
  declare const isEmptyCallback: (offer: Offer) => boolean;
311
- declare function decode$2(type: Type$1, data: Hex): {
312
- contract: Address;
313
- amount: bigint;
314
- }[];
315
- type BuyERC20Data = {
316
- tokens: Address[];
317
- amounts: bigint[];
318
- };
319
- type BuyVaultV1CallbackData = {
320
- vaults: Address[];
321
- amounts: bigint[];
322
- };
323
- type SellERC20CallbackData = {
324
- collaterals: Address[];
325
- amounts: bigint[];
326
- };
327
- declare function encode$2(type: Type$1.BuyERC20, data: BuyERC20Data): Hex;
328
- declare function encode$2(type: Type$1.BuyVaultV1Callback, data: BuyVaultV1CallbackData): Hex;
329
- declare function encode$2(type: Type$1.SellERC20Callback, data: SellERC20CallbackData): Hex;
330
- /**
331
- * Decodes BuyERC20 callback data into positions.
332
- * @param data - The ABI-encoded callback data containing token addresses and amounts.
333
- * @returns Array of positions with contract address and amount.
334
- * @throws If data is empty, malformed, or arrays have mismatched lengths.
335
- */
336
- declare function decodeBuyERC20(data: Hex): Array<{
337
- contract: Address;
338
- amount: bigint;
339
- }>;
340
- /**
341
- * Encodes BuyERC20 callback parameters into ABI-encoded data.
342
- * @param parameters - The tokens and amounts to encode.
343
- * @returns ABI-encoded hex string.
344
- */
345
- declare function encodeBuyERC20(parameters: {
346
- tokens: Address[];
347
- amounts: bigint[];
348
- }): Hex;
349
- declare function decodeBuyVaultV1Callback(data: Hex): Array<{
350
- contract: Address;
351
- amount: bigint;
352
- }>;
353
- declare function decodeSellERC20Callback(data: Hex): Array<{
354
- contract: Address;
355
- amount: bigint;
356
- }>;
357
- declare function encodeBuyVaultV1Callback(parameters: {
358
- vaults: Address[];
359
- amounts: bigint[];
360
- }): Hex;
361
- declare function encodeSellERC20Callback(parameters: {
362
- collaterals: Address[];
363
- amounts: bigint[];
364
- }): Hex;
365
1296
  declare namespace Errors_d_exports {
366
1297
  export { BaseError, GlobalErrorType, ReorgError };
367
1298
  }
@@ -481,6 +1412,14 @@ type ChainRegistry = {
481
1412
  * @returns A registry for looking up chains by ID. {@link ChainRegistry}
482
1413
  */
483
1414
  declare function create$6(chains: Chain$1[]): ChainRegistry;
1415
+ //#endregion
1416
+ //#region src/core/types.d.ts
1417
+ /** Combines members of an intersection into a readable type. */
1418
+ type Compute<type> = { [key in keyof type]: type[key] } & unknown;
1419
+ declare const BrandTypeId: unique symbol;
1420
+ type Brand<in out ID extends string | symbol> = {
1421
+ readonly [BrandTypeId]: { readonly [id in ID]: ID };
1422
+ };
484
1423
  declare namespace LLTV_d_exports {
485
1424
  export { InvalidLLTVError, InvalidOptionError$1 as InvalidOptionError, LLTV, LLTVSchema, Options, from$17 as from };
486
1425
  }
@@ -627,7 +1566,7 @@ declare class DenominatorIsZeroError extends BaseError {
627
1566
  constructor();
628
1567
  }
629
1568
  declare namespace Liquidity_d_exports {
630
- export { LiquidityLink, LiquidityPool, OfferLiquidityPool, calculateMaxDebt, generateAllowancePoolId, generateBalancePoolId, generateBuyVaultCallbackPoolId, generateDebtPoolId, generateMarketLiquidityPoolId, generateObligationCollateralPoolId, generateSellERC20CallbackPoolId, generateUserVaultPositionPoolId, generateVaultPositionPoolId };
1569
+ export { LiquidityLink, LiquidityPool, OfferLiquidityPool, calculateMaxDebt, generateAllowancePoolId, generateBalancePoolId, generateDebtPoolId, generateMarketLiquidityPoolId, generateObligationCollateralPoolId, generateUserVaultPositionPoolId, generateVaultPositionPoolId };
631
1570
  }
632
1571
  /**
633
1572
  * Represents a liquidity pool with a unique ID and amount.
@@ -652,10 +1591,7 @@ type OfferLiquidityPool = {
652
1591
  poolId: string;
653
1592
  /**
654
1593
  * The available capacity/liquidity from this pool for this offer.
655
- * Meaning varies by pool type:
656
- * - BuyWithEmptyCallback: Matches allowance amount from pool bellow
657
- * - SellERC20Callback: Sell Callback/Predeposited -> Maximum debt capacity calculated from collateral (collateralAmount * oraclePrice * lltv)
658
- * - SellERC20Callback: Existing debt as negative value (reduces available capacity)
1594
+ * Matches allowance amount from pool below.
659
1595
  */
660
1596
  amount: bigint;
661
1597
  };
@@ -683,17 +1619,6 @@ declare function generateAllowancePoolId(parameters: {
683
1619
  chainId: Id;
684
1620
  token: Address;
685
1621
  }): string;
686
- /**
687
- * Generate pool ID for sell ERC20 callback pools.
688
- * Each offer has its own callback pool to prevent liquidity conflicts.
689
- */
690
- declare function generateSellERC20CallbackPoolId(parameters: {
691
- user: Address;
692
- chainId: Id;
693
- obligationId: Hex;
694
- token: Address;
695
- offerHash: Hex;
696
- }): string;
697
1622
  /**
698
1623
  * Generate pool ID for obligation collateral pools.
699
1624
  * Obligation collateral pools represent collateral already deposited in the obligation.
@@ -705,15 +1630,6 @@ declare function generateObligationCollateralPoolId(parameters: {
705
1630
  obligationId: Hex;
706
1631
  token: Address;
707
1632
  }): string;
708
- /**
709
- * Generate pool ID for buy vault callback pools.
710
- */
711
- declare function generateBuyVaultCallbackPoolId(parameters: {
712
- user: Address;
713
- chainId: Id;
714
- vault: Address;
715
- offerHash: Hex;
716
- }): string;
717
1633
  /**
718
1634
  * Generate pool ID for debt pools.
719
1635
  */
@@ -950,7 +1866,7 @@ declare class CollateralsAreNotSortedError extends BaseError {
950
1866
  constructor();
951
1867
  }
952
1868
  declare namespace Offer_d_exports {
953
- export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, domain, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, obligationId, random$1 as random, serialize, toSnakeCase, types };
1869
+ export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, domain, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, obligationId, random$1 as random, serialize, takeEvent, toSnakeCase, types };
954
1870
  }
955
1871
  type Offer = {
956
1872
  /** The address that made the offer. */readonly maker: Address; /** The amount of assets offered. Mutually exclusive with obligationUnits and obligationShares. */
@@ -1207,6 +2123,80 @@ type OfferConsumed = {
1207
2123
  amount: bigint;
1208
2124
  blockNumber: number;
1209
2125
  };
2126
+ /**
2127
+ * ABI for the Take event emitted by the Morpho V2 contract.
2128
+ */
2129
+ declare const takeEvent: {
2130
+ readonly type: "event";
2131
+ readonly name: "Take";
2132
+ readonly inputs: readonly [{
2133
+ readonly name: "caller";
2134
+ readonly type: "address";
2135
+ readonly indexed: false;
2136
+ readonly internalType: "address";
2137
+ }, {
2138
+ readonly name: "id";
2139
+ readonly type: "bytes32";
2140
+ readonly indexed: true;
2141
+ readonly internalType: "bytes32";
2142
+ }, {
2143
+ readonly name: "maker";
2144
+ readonly type: "address";
2145
+ readonly indexed: true;
2146
+ readonly internalType: "address";
2147
+ }, {
2148
+ readonly name: "taker";
2149
+ readonly type: "address";
2150
+ readonly indexed: true;
2151
+ readonly internalType: "address";
2152
+ }, {
2153
+ readonly name: "offerIsBuy";
2154
+ readonly type: "bool";
2155
+ readonly indexed: false;
2156
+ readonly internalType: "bool";
2157
+ }, {
2158
+ readonly name: "buyerAssets";
2159
+ readonly type: "uint256";
2160
+ readonly indexed: false;
2161
+ readonly internalType: "uint256";
2162
+ }, {
2163
+ readonly name: "sellerAssets";
2164
+ readonly type: "uint256";
2165
+ readonly indexed: false;
2166
+ readonly internalType: "uint256";
2167
+ }, {
2168
+ readonly name: "obligationUnits";
2169
+ readonly type: "uint256";
2170
+ readonly indexed: false;
2171
+ readonly internalType: "uint256";
2172
+ }, {
2173
+ readonly name: "obligationShares";
2174
+ readonly type: "uint256";
2175
+ readonly indexed: false;
2176
+ readonly internalType: "uint256";
2177
+ }, {
2178
+ readonly name: "buyerIsLender";
2179
+ readonly type: "bool";
2180
+ readonly indexed: false;
2181
+ readonly internalType: "bool";
2182
+ }, {
2183
+ readonly name: "sellerIsBorrower";
2184
+ readonly type: "bool";
2185
+ readonly indexed: false;
2186
+ readonly internalType: "bool";
2187
+ }, {
2188
+ readonly name: "group";
2189
+ readonly type: "bytes32";
2190
+ readonly indexed: false;
2191
+ readonly internalType: "bytes32";
2192
+ }, {
2193
+ readonly name: "consumed";
2194
+ readonly type: "uint256";
2195
+ readonly indexed: false;
2196
+ readonly internalType: "uint256";
2197
+ }];
2198
+ readonly anonymous: false;
2199
+ };
1210
2200
  /**
1211
2201
  * ABI for the Consume event emitted by the Obligation contract.
1212
2202
  */
@@ -2412,16 +3402,6 @@ type ValidateOffersIssues = {
2412
3402
  issues: ValidationIssue[];
2413
3403
  };
2414
3404
  type ValidateOffersData = ValidateOffersSuccess | ValidateOffersIssues;
2415
- type CallbackType = Type$1 | "not_supported";
2416
- type CallbackTypesRequest = {
2417
- callbacks: Array<{
2418
- chain_id: Id;
2419
- addresses: Address[];
2420
- }>;
2421
- };
2422
- type CallbackTypesResponse = Array<{
2423
- chain_id: Id;
2424
- } & Partial<Record<CallbackType, Address[]>>>;
2425
3405
  type ConfigRulesPayload = SuccessPayload<ConfigRule[]> | ErrorPayload;
2426
3406
  type SuccessPayload<T> = {
2427
3407
  meta: {
@@ -2458,8 +3438,7 @@ type GatekeeperClient = {
2458
3438
  statusCode: number;
2459
3439
  body: ConfigRulesPayload;
2460
3440
  }>; /** Validate offers and return decision results. */
2461
- isAllowed: (offers: Offer[]) => Promise<Result<Offer, string>>; /** Resolve callback types for callback addresses. */
2462
- getCallbackTypes: (request: CallbackTypesRequest) => Promise<CallbackTypesResponse>; /** Base URL for the gatekeeper service. */
3441
+ isAllowed: (offers: Offer[]) => Promise<Result<Offer, string>>; /** Base URL for the gatekeeper service. */
2463
3442
  baseUrl: string;
2464
3443
  };
2465
3444
  type ClientConfig = {
@@ -2781,7 +3760,7 @@ interface paths {
2781
3760
  };
2782
3761
  /**
2783
3762
  * Get config rules
2784
- * @description Returns configured rules for supported chains.
3763
+ * @description Returns configured rules (maturities, loan tokens, oracles) for supported chains.
2785
3764
  */
2786
3765
  get: {
2787
3766
  parameters: {
@@ -3238,7 +4217,7 @@ interface paths {
3238
4217
  put?: never;
3239
4218
  /**
3240
4219
  * Validate offers
3241
- * @description Validates offers against router validation rules. Returns unsigned payload + root on success, or issues only on validation failure.
4220
+ * @description Validates offers against router validation rules. Only empty callbacks (zero address, 0x data) are accepted. Returns unsigned payload + root on success, or issues only on validation failure.
3242
4221
  */
3243
4222
  post: {
3244
4223
  parameters: {
@@ -3277,56 +4256,6 @@ interface paths {
3277
4256
  patch?: never;
3278
4257
  trace?: never;
3279
4258
  };
3280
- "/v1/callbacks": {
3281
- parameters: {
3282
- query?: never;
3283
- header?: never;
3284
- path?: never;
3285
- cookie?: never;
3286
- };
3287
- get?: never;
3288
- put?: never;
3289
- /**
3290
- * Resolve callback types
3291
- * @description Returns callback types for callback addresses grouped by chain.
3292
- */
3293
- post: {
3294
- parameters: {
3295
- query?: never;
3296
- header?: never;
3297
- path?: never;
3298
- cookie?: never;
3299
- };
3300
- requestBody?: {
3301
- content: {
3302
- "application/json": components["schemas"]["CallbackTypesRequest"];
3303
- };
3304
- };
3305
- responses: {
3306
- /** @description Success */200: {
3307
- headers: {
3308
- [name: string]: unknown;
3309
- };
3310
- content: {
3311
- "application/json": components["schemas"]["CallbackTypesSuccessResponse"];
3312
- };
3313
- }; /** @description Bad Request */
3314
- 400: {
3315
- headers: {
3316
- [name: string]: unknown;
3317
- };
3318
- content: {
3319
- "application/json": components["schemas"]["BadRequestResponse"];
3320
- };
3321
- };
3322
- };
3323
- };
3324
- delete?: never;
3325
- options?: never;
3326
- head?: never;
3327
- patch?: never;
3328
- trace?: never;
3329
- };
3330
4259
  }
3331
4260
  interface components {
3332
4261
  schemas: {
@@ -3411,12 +4340,6 @@ interface components {
3411
4340
  * "timestamp": 1730415600
3412
4341
  * },
3413
4342
  * {
3414
- * "type": "callback",
3415
- * "chain_id": 1,
3416
- * "address": "0x1111111111111111111111111111111111111111",
3417
- * "callback_type": "sell_erc20_callback"
3418
- * },
3419
- * {
3420
4343
  * "type": "loan_token",
3421
4344
  * "chain_id": 1,
3422
4345
  * "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
@@ -3438,9 +4361,8 @@ interface components {
3438
4361
  /** @example maturity */type: string; /** @example 1 */
3439
4362
  chain_id: number; /** @example end_of_next_month */
3440
4363
  name?: string; /** @example 1730415600 */
3441
- timestamp?: number; /** @example 0x1111111111111111111111111111111111111111 */
3442
- address?: string; /** @example sell_erc20_callback */
3443
- callback_type?: string;
4364
+ timestamp?: number; /** @example 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 */
4365
+ address?: string;
3444
4366
  };
3445
4367
  OfferListResponse: {
3446
4368
  meta: components["schemas"]["Meta"];
@@ -3475,8 +4397,8 @@ interface components {
3475
4397
  * "price": "2750000000000000000",
3476
4398
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
3477
4399
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
3478
- * "callback": "0x1111111111111111111111111111111111111111",
3479
- * "callback_data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000"
4400
+ * "callback": "0x0000000000000000000000000000000000000000",
4401
+ * "callback_data": "0x"
3480
4402
  * },
3481
4403
  * "offer_hash": "0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427",
3482
4404
  * "obligation_id": "0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc",
@@ -3519,8 +4441,8 @@ interface components {
3519
4441
  * "price": "2750000000000000000",
3520
4442
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
3521
4443
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
3522
- * "callback": "0x1111111111111111111111111111111111111111",
3523
- * "callback_data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000"
4444
+ * "callback": "0x0000000000000000000000000000000000000000",
4445
+ * "callback_data": "0x"
3524
4446
  * }
3525
4447
  */
3526
4448
  offer: components["schemas"]["OfferDataResponse"]; /** @example 0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427 */
@@ -3564,8 +4486,8 @@ interface components {
3564
4486
  expiry: number; /** @example 2750000000000000000 */
3565
4487
  price: string; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
3566
4488
  group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
3567
- session: string; /** @example 0x1111111111111111111111111111111111111111 */
3568
- callback: string; /** @example 0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000 */
4489
+ session: string; /** @example 0x0000000000000000000000000000000000000000 */
4490
+ callback: string; /** @example 0x */
3569
4491
  callback_data: string;
3570
4492
  };
3571
4493
  ObligationOfferResponse: {
@@ -3754,8 +4676,8 @@ interface components {
3754
4676
  collaterals: components["schemas"]["ValidateCollateralRequest"][];
3755
4677
  /**
3756
4678
  * @example {
3757
- * "address": "0x1111111111111111111111111111111111111111",
3758
- * "data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000"
4679
+ * "address": "0x0000000000000000000000000000000000000000",
4680
+ * "data": "0x"
3759
4681
  * }
3760
4682
  */
3761
4683
  callback: components["schemas"]["ValidateCallbackRequest"];
@@ -3766,7 +4688,7 @@ interface components {
3766
4688
  lltv: string;
3767
4689
  };
3768
4690
  ValidateCallbackRequest: {
3769
- /** @example 0x1111111111111111111111111111111111111111 */address: string; /** @example 0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000 */
4691
+ /** @example 0x0000000000000000000000000000000000000000 */address: string; /** @example 0x */
3770
4692
  data: string;
3771
4693
  };
3772
4694
  ValidationSuccessResponse: {
@@ -3786,84 +4708,6 @@ interface components {
3786
4708
  */
3787
4709
  root: string;
3788
4710
  };
3789
- CallbackTypesRequest: {
3790
- /**
3791
- * @example [
3792
- * {
3793
- * "chain_id": 1,
3794
- * "addresses": [
3795
- * "0x1111111111111111111111111111111111111111",
3796
- * "0x3333333333333333333333333333333333333333",
3797
- * "0x9999999999999999999999999999999999999999"
3798
- * ]
3799
- * }
3800
- * ]
3801
- */
3802
- callbacks: components["schemas"]["CallbackTypesChainRequest"][];
3803
- };
3804
- CallbackTypesChainRequest: {
3805
- /** @example 1 */chain_id: number;
3806
- /**
3807
- * @example [
3808
- * "0x1111111111111111111111111111111111111111",
3809
- * "0x3333333333333333333333333333333333333333",
3810
- * "0x9999999999999999999999999999999999999999"
3811
- * ]
3812
- */
3813
- addresses: string[];
3814
- };
3815
- CallbackTypesSuccessResponse: {
3816
- meta: components["schemas"]["Meta"]; /** @example maturity:1:1730415600:end_of_next_month */
3817
- cursor: string | null;
3818
- /**
3819
- * @description Callback types grouped by chain.
3820
- * @example [
3821
- * {
3822
- * "chain_id": 1,
3823
- * "sell_erc20_callback": [
3824
- * "0x1111111111111111111111111111111111111111"
3825
- * ],
3826
- * "buy_erc20": [
3827
- * "0x5555555555555555555555555555555555555555"
3828
- * ],
3829
- * "buy_vault_v1_callback": [
3830
- * "0x3333333333333333333333333333333333333333"
3831
- * ],
3832
- * "not_supported": [
3833
- * "0x9999999999999999999999999999999999999999"
3834
- * ]
3835
- * }
3836
- * ]
3837
- */
3838
- data: components["schemas"]["CallbackTypesChainResponse"][];
3839
- };
3840
- CallbackTypesChainResponse: {
3841
- /** @example 1 */chain_id: number;
3842
- /**
3843
- * @example [
3844
- * "0x3333333333333333333333333333333333333333"
3845
- * ]
3846
- */
3847
- buy_vault_v1_callback?: string[];
3848
- /**
3849
- * @example [
3850
- * "0x1111111111111111111111111111111111111111"
3851
- * ]
3852
- */
3853
- sell_erc20_callback?: string[];
3854
- /**
3855
- * @example [
3856
- * "0x5555555555555555555555555555555555555555"
3857
- * ]
3858
- */
3859
- buy_erc20?: string[];
3860
- /**
3861
- * @example [
3862
- * "0x9999999999999999999999999999999999999999"
3863
- * ]
3864
- */
3865
- not_supported: string[];
3866
- };
3867
4711
  };
3868
4712
  responses: never;
3869
4713
  parameters: never;
@@ -3932,9 +4776,6 @@ declare class BooksController {
3932
4776
  declare class ValidateController {
3933
4777
  validateOffers(): Promise<void>;
3934
4778
  }
3935
- declare class CallbacksController {
3936
- resolveCallbackTypes(): Promise<void>;
3937
- }
3938
4779
  declare class OffersController {
3939
4780
  getOffers(): Promise<void>;
3940
4781
  }
@@ -3981,25 +4822,25 @@ declare const schemas: {
3981
4822
  strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
3982
4823
  0: "0";
3983
4824
  1: "1";
3984
- false: "false";
3985
4825
  true: "true";
3986
- }>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
4826
+ false: "false";
4827
+ }>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
3987
4828
  }, z$1.core.$strip>;
3988
4829
  readonly get_health_collectors: z$1.ZodObject<{
3989
4830
  strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
3990
4831
  0: "0";
3991
4832
  1: "1";
3992
- false: "false";
3993
4833
  true: "true";
3994
- }>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
4834
+ false: "false";
4835
+ }>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
3995
4836
  }, z$1.core.$strip>;
3996
4837
  readonly get_health_chains: z$1.ZodObject<{
3997
4838
  strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
3998
4839
  0: "0";
3999
4840
  1: "1";
4000
- false: "false";
4001
4841
  true: "true";
4002
- }>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
4842
+ false: "false";
4843
+ }>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
4003
4844
  }, z$1.core.$strip>;
4004
4845
  readonly get_config_contracts: z$1.ZodObject<{
4005
4846
  cursor: z$1.ZodOptional<z$1.ZodString>;
@@ -4010,10 +4851,10 @@ declare const schemas: {
4010
4851
  cursor: z$1.ZodOptional<z$1.ZodString>;
4011
4852
  limit: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>, z$1.ZodNumber>>>;
4012
4853
  types: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodEnum<{
4013
- loan_token: "loan_token";
4854
+ oracle: "oracle";
4014
4855
  maturity: "maturity";
4015
4856
  callback: "callback";
4016
- oracle: "oracle";
4857
+ loan_token: "loan_token";
4017
4858
  }>>>>;
4018
4859
  chains: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>>>>;
4019
4860
  }, z$1.core.$strip>;
@@ -4062,12 +4903,6 @@ declare const schemas: {
4062
4903
  readonly validate_offers: z$1.ZodObject<{
4063
4904
  offers: z$1.ZodArray<z$1.ZodUnknown>;
4064
4905
  }, z$1.core.$strict>;
4065
- readonly callback_types: z$1.ZodObject<{
4066
- callbacks: z$1.ZodArray<z$1.ZodObject<{
4067
- chain_id: z$1.ZodNumber;
4068
- addresses: z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>>;
4069
- }, z$1.core.$strict>>;
4070
- }, z$1.core.$strict>;
4071
4906
  readonly get_user_positions: z$1.ZodObject<{
4072
4907
  user_address: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
4073
4908
  cursor: z$1.ZodOptional<z$1.ZodString>;
@@ -4175,16 +5010,17 @@ type GetOffersQueryParams = {
4175
5010
  cursor?: string; /** Page size; defaults to {@link OffersDomain.DEFAULT_LIMIT} */
4176
5011
  limit?: number;
4177
5012
  };
5013
+ type OffersRowsResult = {
5014
+ rows: Row[];
5015
+ nextCursor: string | null;
5016
+ };
4178
5017
  /**
4179
5018
  * Query offers with computed consumed/available/takeable values.
4180
5019
  * @param db - The database client. {@link Database.Core}
4181
5020
  * @param parameters - {@link GetOffersQueryParams}
4182
5021
  * @returns The offers with pagination cursor.
4183
5022
  */
4184
- declare function getOffersQuery(db: Core, parameters?: GetOffersQueryParams): Promise<{
4185
- rows: Row[];
4186
- nextCursor: string | null;
4187
- }>;
5023
+ declare function getOffersQuery(db: Core, parameters?: GetOffersQueryParams): Promise<OffersRowsResult>;
4188
5024
  declare function getOffers$1(queryParameters: object, db: Database): Promise<Payload<OfferResponse[]>>;
4189
5025
  //#endregion
4190
5026
  //#region src/api/Controllers/getUserPositions.d.ts
@@ -4195,16 +5031,6 @@ declare function getOffers$1(queryParameters: object, db: Database): Promise<Pay
4195
5031
  * @returns Paginated list of positions with remaining balances.
4196
5032
  */
4197
5033
  declare function getUserPositions(queryParameters: object, db: Database): Promise<Payload<PositionResponse[]>>;
4198
- //#endregion
4199
- //#region src/api/Controllers/resolveCallbackTypes.d.ts
4200
- type CallbackTypesPayload = SuccessPayload$1<CallbackTypesResponse>;
4201
- /**
4202
- * Resolve callback types for a list of callback addresses grouped by chain.
4203
- * @param body - Request body with callback addresses. {@link CallbackTypesRequest}
4204
- * @param chains - Chains to resolve callback types against. {@link Chain.Chain}
4205
- * @returns Callback types grouped by chain. {@link CallbackTypesPayload}
4206
- */
4207
- declare function resolveCallbackTypes(body: object, chains: Chain$1[]): Promise<CallbackTypesPayload | ErrorPayload$1>;
4208
5034
  declare namespace Gatekeeper_d_exports {
4209
5035
  export { Gatekeeper, Rules, create };
4210
5036
  }
@@ -4238,10 +5064,10 @@ type ValidateOffersIssuesPayload = SuccessPayload$1<{
4238
5064
  type ValidateOffersResponse = ValidateOffersSuccessPayload | ValidateOffersIssuesPayload;
4239
5065
  declare function validateOffers(body: object, gatekeeper: Gatekeeper): Promise<ValidateOffersResponse | ErrorPayload$1>;
4240
5066
  declare namespace index_d_exports$4 {
4241
- export { CONFIG_CONTRACT_NAMES, ConfigContract, ConfigContractName, GetOffersQueryParams, ValidationIssue$1 as ValidationIssue, getBook, getConfigContracts, getConfigRules, getDocsHtml, getHealth, getHealthChains, getHealthCollectors, getIntegratorDocsHtml, getObligation, getObligations$1 as getObligations, getOffers$1 as getOffers, getOffersQuery, getSwaggerJson, getUserPositions, resolveCallbackTypes, validateOffers };
5067
+ export { CONFIG_CONTRACT_NAMES, ConfigContract, ConfigContractName, GetOffersQueryParams, ValidationIssue$1 as ValidationIssue, getBook, getConfigContracts, getConfigRules, getDocsHtml, getHealth, getHealthChains, getHealthCollectors, getIntegratorDocsHtml, getObligation, getObligations$1 as getObligations, getOffers$1 as getOffers, getOffersQuery, getSwaggerJson, getUserPositions, validateOffers };
4242
5068
  }
4243
5069
  declare namespace RouterApi_d_exports {
4244
- export { ApiConfig, BookResponse_d_exports as BookResponse, BooksController, CallbacksController, ChainHealth, ChainsHealthResponse, CollectorHealth, CollectorsHealthResponse, ConfigContractsController, ConfigRulesController, index_d_exports$4 as Controllers, HealthController, ObligationResponse_d_exports as ObligationResponse, ObligationsController, OfferResponse_d_exports as OfferResponse, OffersController, OpenApi, PositionResponse_d_exports as PositionResponse, RouterApi, RouterStatusResponse, UsersController, ValidateController, create$1 as create, from$5 as from, parse, safeParse };
5070
+ export { ApiConfig, BookResponse_d_exports as BookResponse, BooksController, ChainHealth, ChainsHealthResponse, CollectorHealth, CollectorsHealthResponse, ConfigContractsController, ConfigRulesController, index_d_exports$4 as Controllers, HealthController, ObligationResponse_d_exports as ObligationResponse, ObligationsController, OfferResponse_d_exports as OfferResponse, OffersController, OpenApi, PositionResponse_d_exports as PositionResponse, RouterApi, RouterStatusResponse, UsersController, ValidateController, create$1 as create, from$5 as from, parse, safeParse };
4245
5071
  }
4246
5072
  declare namespace Client_d_exports$1 {
4247
5073
  export { Client$3 as Client, ConnectOptions, HttpForbiddenError, HttpGetApiFailedError, HttpRateLimitError, HttpUnauthorizedError, InvalidUrlError, connect$1 as connect, getObligations, getOffers };
@@ -6408,10 +7234,10 @@ type ValidityParameters = {
6408
7234
  /**
6409
7235
  * set of rules to validate offers.
6410
7236
  *
6411
- * @param parameters - Validity parameters with chain and client
7237
+ * @param _parameters - Validity parameters with chain and client
6412
7238
  * @returns Array of validation rules to evaluate against offers
6413
7239
  */
6414
- declare function validity(parameters: ValidityParameters): (Rule<Offer, "expiry"> | Rule<Offer, "sell_erc20_callback_invalid"> | Rule<Offer, "buy_offers_callback_vault_invalid">)[];
7240
+ declare function validity(_parameters: ValidityParameters): Rule<Offer, "expiry">[];
6415
7241
  declare const chains: ({
6416
7242
  chains
6417
7243
  }: {
@@ -6423,8 +7249,7 @@ declare const maturity: ({
6423
7249
  maturities: MaturityType[];
6424
7250
  }) => Rule<Offer, "maturity">;
6425
7251
  declare const callback: ({
6426
- callbacks,
6427
- allowedAddresses
7252
+ callbacks
6428
7253
  }: {
6429
7254
  callbacks: Type$1[];
6430
7255
  allowedAddresses: Address[];
@@ -6695,5 +7520,5 @@ declare namespace index_d_exports$3 {
6695
7520
  export { BaseError, GlobalErrorType, Group_d_exports as Group, Random_d_exports as Random, ReorgError, Snake, time_d_exports as Time, atMostOneNonZero, batch, batchMulticall, fromSnakeCase$3 as fromSnakeCase, lazy, max$1 as max, min, poll, retry, stringifyBigint, toSnakeCase$1 as toSnakeCase, wait };
6696
7521
  }
6697
7522
  //#endregion
6698
- export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, CallbackType, CallbackTypesRequest, CallbackTypesResponse, CallbacksController, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, time_d_exports as Time, TradingFee_d_exports as TradingFee, Transfer_d_exports as Transfer, Tree_d_exports as Tree, UsersController, index_d_exports$3 as Utils, ValidateController, ValidateOffersData, ValidateOffersIssues, ValidateOffersSuccess, Gate_d_exports as Validation, ValidationIssue, morphoRules, parse, safeParse };
7523
+ export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, time_d_exports as Time, TradingFee_d_exports as TradingFee, Transfer_d_exports as Transfer, Tree_d_exports as Tree, UsersController, index_d_exports$3 as Utils, ValidateController, ValidateOffersData, ValidateOffersIssues, ValidateOffersSuccess, Gate_d_exports as Validation, ValidationIssue, morphoRules, parse, safeParse };
6699
7524
  //# sourceMappingURL=index.node.d.ts.map