@morpho-dev/router 0.11.0 → 0.12.0
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.
- package/README.md +20 -5
- package/dist/cli.js +11700 -6794
- package/dist/drizzle/migrations/0034_chain-checkpoints.sql +1 -0
- package/dist/drizzle/migrations/0035_chain-tip-hash-cas.sql +1 -0
- package/dist/drizzle/migrations/0036_pending-links.sql +22 -0
- package/dist/drizzle/migrations/0037_chain-finalized-anchor.sql +2 -0
- package/dist/drizzle/migrations/0038_add-obligation-rcf-threshold.sql +2 -0
- package/dist/drizzle/migrations/0039_add-offers-composite-indexes.sql +2 -0
- package/dist/drizzle/migrations/0040_drop-redundant-offers-indexes.sql +2 -0
- package/dist/drizzle/migrations/0041_add-group-winner-expression-index.sql +10 -0
- package/dist/drizzle/migrations/0042_contract-sync-v1.14.sql +284 -0
- package/dist/drizzle/migrations/0043_add-obligation-side-tick-index.sql +1 -0
- package/dist/drizzle/migrations/0044_index-audit-cleanup.sql +27 -0
- package/dist/drizzle/migrations/0045_add-lots-offsets-availability-indexes.sql +5 -0
- package/dist/drizzle/migrations/0046_add-offers-active-tick-index.sql +1 -0
- package/dist/drizzle/migrations/0047_add-offers-book-winners-index.sql +1 -0
- package/dist/drizzle/migrations/0048_covering-indexes-for-winners-queries.sql +34 -0
- package/dist/drizzle/migrations/0049_contract-sync-v1.15.sql +305 -0
- package/dist/drizzle/migrations/meta/0036_snapshot.json +1864 -0
- package/dist/drizzle/migrations/meta/0037_snapshot.json +1876 -0
- package/dist/drizzle/migrations/meta/0038_snapshot.json +1882 -0
- package/dist/drizzle/migrations/meta/0039_snapshot.json +1960 -0
- package/dist/drizzle/migrations/meta/0040_snapshot.json +1912 -0
- package/dist/drizzle/migrations/meta/0041_snapshot.json +1912 -0
- package/dist/drizzle/migrations/meta/0042_snapshot.json +1882 -0
- package/dist/drizzle/migrations/meta/0043_snapshot.json +1909 -0
- package/dist/drizzle/migrations/meta/0044_snapshot.json +1853 -0
- package/dist/drizzle/migrations/meta/0045_snapshot.json +1921 -0
- package/dist/drizzle/migrations/meta/0046_snapshot.json +1966 -0
- package/dist/drizzle/migrations/meta/0047_snapshot.json +2005 -0
- package/dist/drizzle/migrations/meta/0048_snapshot.json +2035 -0
- package/dist/drizzle/migrations/meta/0049_snapshot.json +2035 -0
- package/dist/drizzle/migrations/meta/_journal.json +112 -0
- package/dist/evm/bytecode/morpho.txt +1 -1
- package/dist/index.browser.d.mts +587 -271
- package/dist/index.browser.d.mts.map +1 -1
- package/dist/index.browser.mjs +656 -419
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +1454 -583
- package/dist/index.node.d.mts.map +1 -1
- package/dist/index.node.mjs +9064 -5228
- package/dist/index.node.mjs.map +1 -1
- package/dist/server-D4xxddev.js +9573 -0
- package/dist/server.js +9617 -0
- package/docs/integrator.md +14 -24
- package/package.json +7 -4
package/dist/index.node.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AbiEvent, Account, Address, ChainContract, ChainFormatters, Client, GetLogsReturnType, Hex, MulticallParameters, PublicClient, Transport, WalletClient } from "viem";
|
|
2
2
|
import { Chain } from "viem/chains";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
|
-
import {
|
|
4
|
+
import { SimpleMerkleTree } from "@openzeppelin/merkle-tree";
|
|
5
5
|
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
6
6
|
import { Hono } from "hono";
|
|
7
7
|
import { z } from "zod/v4";
|
|
@@ -157,34 +157,36 @@ declare const MorphoV2: readonly [{
|
|
|
157
157
|
readonly stateMutability: "nonpayable";
|
|
158
158
|
readonly inputs: readonly [];
|
|
159
159
|
}, {
|
|
160
|
-
readonly name: "
|
|
160
|
+
readonly name: "activatedCollaterals";
|
|
161
161
|
readonly type: "function";
|
|
162
162
|
readonly stateMutability: "view";
|
|
163
163
|
readonly inputs: readonly [{
|
|
164
|
-
readonly type: "
|
|
164
|
+
readonly type: "bytes32";
|
|
165
165
|
readonly name: "id";
|
|
166
166
|
}, {
|
|
167
167
|
readonly type: "address";
|
|
168
168
|
readonly name: "user";
|
|
169
|
-
}, {
|
|
170
|
-
readonly type: "uint256";
|
|
171
|
-
readonly name: "collateralIndex";
|
|
172
169
|
}];
|
|
173
170
|
readonly outputs: readonly [{
|
|
174
171
|
readonly type: "uint128";
|
|
175
172
|
}];
|
|
176
173
|
}, {
|
|
177
|
-
readonly name: "
|
|
174
|
+
readonly name: "collateralOf";
|
|
178
175
|
readonly type: "function";
|
|
179
|
-
readonly stateMutability: "
|
|
176
|
+
readonly stateMutability: "view";
|
|
180
177
|
readonly inputs: readonly [{
|
|
181
178
|
readonly type: "bytes32";
|
|
182
|
-
readonly name: "
|
|
179
|
+
readonly name: "id";
|
|
180
|
+
}, {
|
|
181
|
+
readonly type: "address";
|
|
182
|
+
readonly name: "user";
|
|
183
183
|
}, {
|
|
184
184
|
readonly type: "uint256";
|
|
185
|
-
readonly name: "
|
|
185
|
+
readonly name: "index";
|
|
186
|
+
}];
|
|
187
|
+
readonly outputs: readonly [{
|
|
188
|
+
readonly type: "uint128";
|
|
186
189
|
}];
|
|
187
|
-
readonly outputs: readonly [];
|
|
188
190
|
}, {
|
|
189
191
|
readonly name: "consumed";
|
|
190
192
|
readonly type: "function";
|
|
@@ -199,12 +201,40 @@ declare const MorphoV2: readonly [{
|
|
|
199
201
|
readonly outputs: readonly [{
|
|
200
202
|
readonly type: "uint256";
|
|
201
203
|
}];
|
|
204
|
+
}, {
|
|
205
|
+
readonly name: "creditAfterSlashing";
|
|
206
|
+
readonly type: "function";
|
|
207
|
+
readonly stateMutability: "view";
|
|
208
|
+
readonly inputs: readonly [{
|
|
209
|
+
readonly type: "bytes32";
|
|
210
|
+
readonly name: "id";
|
|
211
|
+
}, {
|
|
212
|
+
readonly type: "address";
|
|
213
|
+
readonly name: "user";
|
|
214
|
+
}];
|
|
215
|
+
readonly outputs: readonly [{
|
|
216
|
+
readonly type: "uint256";
|
|
217
|
+
}];
|
|
218
|
+
}, {
|
|
219
|
+
readonly name: "creditOf";
|
|
220
|
+
readonly type: "function";
|
|
221
|
+
readonly stateMutability: "view";
|
|
222
|
+
readonly inputs: readonly [{
|
|
223
|
+
readonly type: "bytes32";
|
|
224
|
+
readonly name: "id";
|
|
225
|
+
}, {
|
|
226
|
+
readonly type: "address";
|
|
227
|
+
readonly name: "user";
|
|
228
|
+
}];
|
|
229
|
+
readonly outputs: readonly [{
|
|
230
|
+
readonly type: "uint256";
|
|
231
|
+
}];
|
|
202
232
|
}, {
|
|
203
233
|
readonly name: "debtOf";
|
|
204
234
|
readonly type: "function";
|
|
205
235
|
readonly stateMutability: "view";
|
|
206
236
|
readonly inputs: readonly [{
|
|
207
|
-
readonly type: "
|
|
237
|
+
readonly type: "bytes32";
|
|
208
238
|
readonly name: "id";
|
|
209
239
|
}, {
|
|
210
240
|
readonly type: "address";
|
|
@@ -222,7 +252,6 @@ declare const MorphoV2: readonly [{
|
|
|
222
252
|
readonly name: "loanToken";
|
|
223
253
|
}, {
|
|
224
254
|
readonly type: "uint256";
|
|
225
|
-
readonly name: "index";
|
|
226
255
|
}];
|
|
227
256
|
readonly outputs: readonly [{
|
|
228
257
|
readonly type: "uint16";
|
|
@@ -240,11 +269,11 @@ declare const MorphoV2: readonly [{
|
|
|
240
269
|
readonly type: "function";
|
|
241
270
|
readonly stateMutability: "view";
|
|
242
271
|
readonly inputs: readonly [{
|
|
243
|
-
readonly type: "
|
|
272
|
+
readonly type: "bytes32";
|
|
244
273
|
readonly name: "id";
|
|
245
274
|
}];
|
|
246
275
|
readonly outputs: readonly [{
|
|
247
|
-
readonly type: "uint16[
|
|
276
|
+
readonly type: "uint16[7]";
|
|
248
277
|
}];
|
|
249
278
|
}, {
|
|
250
279
|
readonly name: "flashLoan";
|
|
@@ -264,6 +293,20 @@ declare const MorphoV2: readonly [{
|
|
|
264
293
|
readonly name: "data";
|
|
265
294
|
}];
|
|
266
295
|
readonly outputs: readonly [];
|
|
296
|
+
}, {
|
|
297
|
+
readonly name: "isAuthorized";
|
|
298
|
+
readonly type: "function";
|
|
299
|
+
readonly stateMutability: "view";
|
|
300
|
+
readonly inputs: readonly [{
|
|
301
|
+
readonly type: "address";
|
|
302
|
+
readonly name: "authorizer";
|
|
303
|
+
}, {
|
|
304
|
+
readonly type: "address";
|
|
305
|
+
readonly name: "authorized";
|
|
306
|
+
}];
|
|
307
|
+
readonly outputs: readonly [{
|
|
308
|
+
readonly type: "bool";
|
|
309
|
+
}];
|
|
267
310
|
}, {
|
|
268
311
|
readonly name: "isHealthy";
|
|
269
312
|
readonly type: "function";
|
|
@@ -281,6 +324,9 @@ declare const MorphoV2: readonly [{
|
|
|
281
324
|
}, {
|
|
282
325
|
readonly type: "uint256";
|
|
283
326
|
readonly name: "lltv";
|
|
327
|
+
}, {
|
|
328
|
+
readonly type: "uint256";
|
|
329
|
+
readonly name: "maxLif";
|
|
284
330
|
}, {
|
|
285
331
|
readonly type: "address";
|
|
286
332
|
readonly name: "oracle";
|
|
@@ -291,11 +337,11 @@ declare const MorphoV2: readonly [{
|
|
|
291
337
|
readonly name: "maturity";
|
|
292
338
|
}, {
|
|
293
339
|
readonly type: "uint256";
|
|
294
|
-
readonly name: "
|
|
340
|
+
readonly name: "rcfThreshold";
|
|
295
341
|
}];
|
|
296
342
|
readonly name: "obligation";
|
|
297
343
|
}, {
|
|
298
|
-
readonly type: "
|
|
344
|
+
readonly type: "bytes32";
|
|
299
345
|
readonly name: "id";
|
|
300
346
|
}, {
|
|
301
347
|
readonly type: "address";
|
|
@@ -321,6 +367,9 @@ declare const MorphoV2: readonly [{
|
|
|
321
367
|
}, {
|
|
322
368
|
readonly type: "uint256";
|
|
323
369
|
readonly name: "lltv";
|
|
370
|
+
}, {
|
|
371
|
+
readonly type: "uint256";
|
|
372
|
+
readonly name: "maxLif";
|
|
324
373
|
}, {
|
|
325
374
|
readonly type: "address";
|
|
326
375
|
readonly name: "oracle";
|
|
@@ -331,7 +380,7 @@ declare const MorphoV2: readonly [{
|
|
|
331
380
|
readonly name: "maturity";
|
|
332
381
|
}, {
|
|
333
382
|
readonly type: "uint256";
|
|
334
|
-
readonly name: "
|
|
383
|
+
readonly name: "rcfThreshold";
|
|
335
384
|
}];
|
|
336
385
|
readonly name: "obligation";
|
|
337
386
|
}, {
|
|
@@ -355,6 +404,64 @@ declare const MorphoV2: readonly [{
|
|
|
355
404
|
}, {
|
|
356
405
|
readonly type: "uint256";
|
|
357
406
|
}];
|
|
407
|
+
}, {
|
|
408
|
+
readonly name: "maxCollateralPerUser";
|
|
409
|
+
readonly type: "function";
|
|
410
|
+
readonly stateMutability: "view";
|
|
411
|
+
readonly inputs: readonly [{
|
|
412
|
+
readonly type: "address";
|
|
413
|
+
readonly name: "collateralToken";
|
|
414
|
+
}];
|
|
415
|
+
readonly outputs: readonly [{
|
|
416
|
+
readonly type: "uint256";
|
|
417
|
+
}];
|
|
418
|
+
}, {
|
|
419
|
+
readonly name: "maxLif";
|
|
420
|
+
readonly type: "function";
|
|
421
|
+
readonly stateMutability: "pure";
|
|
422
|
+
readonly inputs: readonly [{
|
|
423
|
+
readonly type: "uint256";
|
|
424
|
+
readonly name: "lltv";
|
|
425
|
+
}, {
|
|
426
|
+
readonly type: "uint256";
|
|
427
|
+
readonly name: "cursor";
|
|
428
|
+
}];
|
|
429
|
+
readonly outputs: readonly [{
|
|
430
|
+
readonly type: "uint256";
|
|
431
|
+
}];
|
|
432
|
+
}, {
|
|
433
|
+
readonly name: "maxTakeableAssets";
|
|
434
|
+
readonly type: "function";
|
|
435
|
+
readonly stateMutability: "view";
|
|
436
|
+
readonly inputs: readonly [{
|
|
437
|
+
readonly type: "address";
|
|
438
|
+
readonly name: "loanToken";
|
|
439
|
+
}];
|
|
440
|
+
readonly outputs: readonly [{
|
|
441
|
+
readonly type: "uint256";
|
|
442
|
+
}];
|
|
443
|
+
}, {
|
|
444
|
+
readonly name: "maxTotalUnits";
|
|
445
|
+
readonly type: "function";
|
|
446
|
+
readonly stateMutability: "view";
|
|
447
|
+
readonly inputs: readonly [{
|
|
448
|
+
readonly type: "address";
|
|
449
|
+
readonly name: "loanToken";
|
|
450
|
+
}];
|
|
451
|
+
readonly outputs: readonly [{
|
|
452
|
+
readonly type: "uint128";
|
|
453
|
+
}];
|
|
454
|
+
}, {
|
|
455
|
+
readonly name: "maxTradingFee";
|
|
456
|
+
readonly type: "function";
|
|
457
|
+
readonly stateMutability: "pure";
|
|
458
|
+
readonly inputs: readonly [{
|
|
459
|
+
readonly type: "uint256";
|
|
460
|
+
readonly name: "index";
|
|
461
|
+
}];
|
|
462
|
+
readonly outputs: readonly [{
|
|
463
|
+
readonly type: "uint256";
|
|
464
|
+
}];
|
|
358
465
|
}, {
|
|
359
466
|
readonly name: "multicall";
|
|
360
467
|
readonly type: "function";
|
|
@@ -369,7 +476,7 @@ declare const MorphoV2: readonly [{
|
|
|
369
476
|
readonly type: "function";
|
|
370
477
|
readonly stateMutability: "view";
|
|
371
478
|
readonly inputs: readonly [{
|
|
372
|
-
readonly type: "
|
|
479
|
+
readonly type: "bytes32";
|
|
373
480
|
readonly name: "id";
|
|
374
481
|
}];
|
|
375
482
|
readonly outputs: readonly [{
|
|
@@ -380,24 +487,21 @@ declare const MorphoV2: readonly [{
|
|
|
380
487
|
readonly type: "function";
|
|
381
488
|
readonly stateMutability: "view";
|
|
382
489
|
readonly inputs: readonly [{
|
|
383
|
-
readonly type: "
|
|
490
|
+
readonly type: "bytes32";
|
|
384
491
|
readonly name: "id";
|
|
385
492
|
}];
|
|
386
493
|
readonly outputs: readonly [{
|
|
387
494
|
readonly type: "uint128";
|
|
388
495
|
readonly name: "totalUnits";
|
|
389
|
-
}, {
|
|
390
|
-
readonly type: "uint128";
|
|
391
|
-
readonly name: "totalShares";
|
|
392
496
|
}, {
|
|
393
497
|
readonly type: "uint256";
|
|
394
498
|
readonly name: "withdrawable";
|
|
499
|
+
}, {
|
|
500
|
+
readonly type: "uint128";
|
|
501
|
+
readonly name: "lossIndex";
|
|
395
502
|
}, {
|
|
396
503
|
readonly type: "bool";
|
|
397
504
|
readonly name: "created";
|
|
398
|
-
}, {
|
|
399
|
-
readonly type: "uint16[6]";
|
|
400
|
-
readonly name: "fees";
|
|
401
505
|
}];
|
|
402
506
|
}, {
|
|
403
507
|
readonly name: "owner";
|
|
@@ -424,6 +528,9 @@ declare const MorphoV2: readonly [{
|
|
|
424
528
|
}, {
|
|
425
529
|
readonly type: "uint256";
|
|
426
530
|
readonly name: "lltv";
|
|
531
|
+
}, {
|
|
532
|
+
readonly type: "uint256";
|
|
533
|
+
readonly name: "maxLif";
|
|
427
534
|
}, {
|
|
428
535
|
readonly type: "address";
|
|
429
536
|
readonly name: "oracle";
|
|
@@ -434,7 +541,7 @@ declare const MorphoV2: readonly [{
|
|
|
434
541
|
readonly name: "maturity";
|
|
435
542
|
}, {
|
|
436
543
|
readonly type: "uint256";
|
|
437
|
-
readonly name: "
|
|
544
|
+
readonly name: "rcfThreshold";
|
|
438
545
|
}];
|
|
439
546
|
readonly name: "obligation";
|
|
440
547
|
}, {
|
|
@@ -456,6 +563,21 @@ declare const MorphoV2: readonly [{
|
|
|
456
563
|
readonly outputs: readonly [{
|
|
457
564
|
readonly type: "bytes32";
|
|
458
565
|
}];
|
|
566
|
+
}, {
|
|
567
|
+
readonly name: "setConsumed";
|
|
568
|
+
readonly type: "function";
|
|
569
|
+
readonly stateMutability: "nonpayable";
|
|
570
|
+
readonly inputs: readonly [{
|
|
571
|
+
readonly type: "bytes32";
|
|
572
|
+
readonly name: "group";
|
|
573
|
+
}, {
|
|
574
|
+
readonly type: "uint256";
|
|
575
|
+
readonly name: "amount";
|
|
576
|
+
}, {
|
|
577
|
+
readonly type: "address";
|
|
578
|
+
readonly name: "onBehalf";
|
|
579
|
+
}];
|
|
580
|
+
readonly outputs: readonly [];
|
|
459
581
|
}, {
|
|
460
582
|
readonly name: "setDefaultTradingFee";
|
|
461
583
|
readonly type: "function";
|
|
@@ -480,12 +602,63 @@ declare const MorphoV2: readonly [{
|
|
|
480
602
|
readonly name: "newFeeSetter";
|
|
481
603
|
}];
|
|
482
604
|
readonly outputs: readonly [];
|
|
605
|
+
}, {
|
|
606
|
+
readonly name: "setIsAuthorized";
|
|
607
|
+
readonly type: "function";
|
|
608
|
+
readonly stateMutability: "nonpayable";
|
|
609
|
+
readonly inputs: readonly [{
|
|
610
|
+
readonly type: "address";
|
|
611
|
+
readonly name: "onBehalf";
|
|
612
|
+
}, {
|
|
613
|
+
readonly type: "address";
|
|
614
|
+
readonly name: "authorized";
|
|
615
|
+
}, {
|
|
616
|
+
readonly type: "bool";
|
|
617
|
+
readonly name: "newIsAuthorized";
|
|
618
|
+
}];
|
|
619
|
+
readonly outputs: readonly [];
|
|
620
|
+
}, {
|
|
621
|
+
readonly name: "setMaxCollateralPerUser";
|
|
622
|
+
readonly type: "function";
|
|
623
|
+
readonly stateMutability: "nonpayable";
|
|
624
|
+
readonly inputs: readonly [{
|
|
625
|
+
readonly type: "address";
|
|
626
|
+
readonly name: "collateralToken";
|
|
627
|
+
}, {
|
|
628
|
+
readonly type: "uint256";
|
|
629
|
+
readonly name: "newMaxCollateralPerUser";
|
|
630
|
+
}];
|
|
631
|
+
readonly outputs: readonly [];
|
|
632
|
+
}, {
|
|
633
|
+
readonly name: "setMaxTakeableAssets";
|
|
634
|
+
readonly type: "function";
|
|
635
|
+
readonly stateMutability: "nonpayable";
|
|
636
|
+
readonly inputs: readonly [{
|
|
637
|
+
readonly type: "address";
|
|
638
|
+
readonly name: "loanToken";
|
|
639
|
+
}, {
|
|
640
|
+
readonly type: "uint256";
|
|
641
|
+
readonly name: "newMaxTakeableAssets";
|
|
642
|
+
}];
|
|
643
|
+
readonly outputs: readonly [];
|
|
644
|
+
}, {
|
|
645
|
+
readonly name: "setMaxTotalUnits";
|
|
646
|
+
readonly type: "function";
|
|
647
|
+
readonly stateMutability: "nonpayable";
|
|
648
|
+
readonly inputs: readonly [{
|
|
649
|
+
readonly type: "address";
|
|
650
|
+
readonly name: "loanToken";
|
|
651
|
+
}, {
|
|
652
|
+
readonly type: "uint128";
|
|
653
|
+
readonly name: "newMaxTotalUnits";
|
|
654
|
+
}];
|
|
655
|
+
readonly outputs: readonly [];
|
|
483
656
|
}, {
|
|
484
657
|
readonly name: "setObligationTradingFee";
|
|
485
658
|
readonly type: "function";
|
|
486
659
|
readonly stateMutability: "nonpayable";
|
|
487
660
|
readonly inputs: readonly [{
|
|
488
|
-
readonly type: "
|
|
661
|
+
readonly type: "bytes32";
|
|
489
662
|
readonly name: "id";
|
|
490
663
|
}, {
|
|
491
664
|
readonly type: "uint256";
|
|
@@ -514,24 +687,25 @@ declare const MorphoV2: readonly [{
|
|
|
514
687
|
}];
|
|
515
688
|
readonly outputs: readonly [];
|
|
516
689
|
}, {
|
|
517
|
-
readonly name: "
|
|
690
|
+
readonly name: "shuffleSession";
|
|
518
691
|
readonly type: "function";
|
|
519
|
-
readonly stateMutability: "
|
|
692
|
+
readonly stateMutability: "nonpayable";
|
|
520
693
|
readonly inputs: readonly [{
|
|
521
|
-
readonly type: "bytes20";
|
|
522
|
-
readonly name: "id";
|
|
523
|
-
}, {
|
|
524
694
|
readonly type: "address";
|
|
525
|
-
readonly name: "
|
|
526
|
-
}];
|
|
527
|
-
readonly outputs: readonly [{
|
|
528
|
-
readonly type: "uint256";
|
|
695
|
+
readonly name: "onBehalf";
|
|
529
696
|
}];
|
|
697
|
+
readonly outputs: readonly [];
|
|
530
698
|
}, {
|
|
531
|
-
readonly name: "
|
|
699
|
+
readonly name: "slash";
|
|
532
700
|
readonly type: "function";
|
|
533
701
|
readonly stateMutability: "nonpayable";
|
|
534
|
-
readonly inputs: readonly [
|
|
702
|
+
readonly inputs: readonly [{
|
|
703
|
+
readonly type: "bytes32";
|
|
704
|
+
readonly name: "id";
|
|
705
|
+
}, {
|
|
706
|
+
readonly type: "address";
|
|
707
|
+
readonly name: "user";
|
|
708
|
+
}];
|
|
535
709
|
readonly outputs: readonly [];
|
|
536
710
|
}, {
|
|
537
711
|
readonly name: "supplyCollateral";
|
|
@@ -550,6 +724,9 @@ declare const MorphoV2: readonly [{
|
|
|
550
724
|
}, {
|
|
551
725
|
readonly type: "uint256";
|
|
552
726
|
readonly name: "lltv";
|
|
727
|
+
}, {
|
|
728
|
+
readonly type: "uint256";
|
|
729
|
+
readonly name: "maxLif";
|
|
553
730
|
}, {
|
|
554
731
|
readonly type: "address";
|
|
555
732
|
readonly name: "oracle";
|
|
@@ -560,7 +737,7 @@ declare const MorphoV2: readonly [{
|
|
|
560
737
|
readonly name: "maturity";
|
|
561
738
|
}, {
|
|
562
739
|
readonly type: "uint256";
|
|
563
|
-
readonly name: "
|
|
740
|
+
readonly name: "rcfThreshold";
|
|
564
741
|
}];
|
|
565
742
|
readonly name: "obligation";
|
|
566
743
|
}, {
|
|
@@ -579,17 +756,8 @@ declare const MorphoV2: readonly [{
|
|
|
579
756
|
readonly type: "function";
|
|
580
757
|
readonly stateMutability: "nonpayable";
|
|
581
758
|
readonly inputs: readonly [{
|
|
582
|
-
readonly type: "uint256";
|
|
583
|
-
readonly name: "buyerAssets";
|
|
584
|
-
}, {
|
|
585
|
-
readonly type: "uint256";
|
|
586
|
-
readonly name: "sellerAssets";
|
|
587
|
-
}, {
|
|
588
759
|
readonly type: "uint256";
|
|
589
760
|
readonly name: "obligationUnits";
|
|
590
|
-
}, {
|
|
591
|
-
readonly type: "uint256";
|
|
592
|
-
readonly name: "obligationShares";
|
|
593
761
|
}, {
|
|
594
762
|
readonly type: "address";
|
|
595
763
|
readonly name: "taker";
|
|
@@ -617,6 +785,9 @@ declare const MorphoV2: readonly [{
|
|
|
617
785
|
}, {
|
|
618
786
|
readonly type: "uint256";
|
|
619
787
|
readonly name: "lltv";
|
|
788
|
+
}, {
|
|
789
|
+
readonly type: "uint256";
|
|
790
|
+
readonly name: "maxLif";
|
|
620
791
|
}, {
|
|
621
792
|
readonly type: "address";
|
|
622
793
|
readonly name: "oracle";
|
|
@@ -627,7 +798,7 @@ declare const MorphoV2: readonly [{
|
|
|
627
798
|
readonly name: "maturity";
|
|
628
799
|
}, {
|
|
629
800
|
readonly type: "uint256";
|
|
630
|
-
readonly name: "
|
|
801
|
+
readonly name: "rcfThreshold";
|
|
631
802
|
}];
|
|
632
803
|
readonly name: "obligation";
|
|
633
804
|
}, {
|
|
@@ -636,15 +807,9 @@ declare const MorphoV2: readonly [{
|
|
|
636
807
|
}, {
|
|
637
808
|
readonly type: "address";
|
|
638
809
|
readonly name: "maker";
|
|
639
|
-
}, {
|
|
640
|
-
readonly type: "uint256";
|
|
641
|
-
readonly name: "assets";
|
|
642
810
|
}, {
|
|
643
811
|
readonly type: "uint256";
|
|
644
812
|
readonly name: "obligationUnits";
|
|
645
|
-
}, {
|
|
646
|
-
readonly type: "uint256";
|
|
647
|
-
readonly name: "obligationShares";
|
|
648
813
|
}, {
|
|
649
814
|
readonly type: "uint256";
|
|
650
815
|
readonly name: "start";
|
|
@@ -669,6 +834,9 @@ declare const MorphoV2: readonly [{
|
|
|
669
834
|
}, {
|
|
670
835
|
readonly type: "address";
|
|
671
836
|
readonly name: "receiverIfMakerIsSeller";
|
|
837
|
+
}, {
|
|
838
|
+
readonly type: "bool";
|
|
839
|
+
readonly name: "exitOnly";
|
|
672
840
|
}];
|
|
673
841
|
readonly name: "offer";
|
|
674
842
|
}, {
|
|
@@ -697,8 +865,6 @@ declare const MorphoV2: readonly [{
|
|
|
697
865
|
readonly type: "uint256";
|
|
698
866
|
}, {
|
|
699
867
|
readonly type: "uint256";
|
|
700
|
-
}, {
|
|
701
|
-
readonly type: "uint256";
|
|
702
868
|
}];
|
|
703
869
|
}, {
|
|
704
870
|
readonly name: "toId";
|
|
@@ -717,6 +883,9 @@ declare const MorphoV2: readonly [{
|
|
|
717
883
|
}, {
|
|
718
884
|
readonly type: "uint256";
|
|
719
885
|
readonly name: "lltv";
|
|
886
|
+
}, {
|
|
887
|
+
readonly type: "uint256";
|
|
888
|
+
readonly name: "maxLif";
|
|
720
889
|
}, {
|
|
721
890
|
readonly type: "address";
|
|
722
891
|
readonly name: "oracle";
|
|
@@ -727,19 +896,19 @@ declare const MorphoV2: readonly [{
|
|
|
727
896
|
readonly name: "maturity";
|
|
728
897
|
}, {
|
|
729
898
|
readonly type: "uint256";
|
|
730
|
-
readonly name: "
|
|
899
|
+
readonly name: "rcfThreshold";
|
|
731
900
|
}];
|
|
732
901
|
readonly name: "obligation";
|
|
733
902
|
}];
|
|
734
903
|
readonly outputs: readonly [{
|
|
735
|
-
readonly type: "
|
|
904
|
+
readonly type: "bytes32";
|
|
736
905
|
}];
|
|
737
906
|
}, {
|
|
738
907
|
readonly name: "toObligation";
|
|
739
908
|
readonly type: "function";
|
|
740
909
|
readonly stateMutability: "view";
|
|
741
910
|
readonly inputs: readonly [{
|
|
742
|
-
readonly type: "
|
|
911
|
+
readonly type: "bytes32";
|
|
743
912
|
readonly name: "id";
|
|
744
913
|
}];
|
|
745
914
|
readonly outputs: readonly [{
|
|
@@ -755,6 +924,9 @@ declare const MorphoV2: readonly [{
|
|
|
755
924
|
}, {
|
|
756
925
|
readonly type: "uint256";
|
|
757
926
|
readonly name: "lltv";
|
|
927
|
+
}, {
|
|
928
|
+
readonly type: "uint256";
|
|
929
|
+
readonly name: "maxLif";
|
|
758
930
|
}, {
|
|
759
931
|
readonly type: "address";
|
|
760
932
|
readonly name: "oracle";
|
|
@@ -765,26 +937,15 @@ declare const MorphoV2: readonly [{
|
|
|
765
937
|
readonly name: "maturity";
|
|
766
938
|
}, {
|
|
767
939
|
readonly type: "uint256";
|
|
768
|
-
readonly name: "
|
|
940
|
+
readonly name: "rcfThreshold";
|
|
769
941
|
}];
|
|
770
942
|
}];
|
|
771
|
-
}, {
|
|
772
|
-
readonly name: "totalShares";
|
|
773
|
-
readonly type: "function";
|
|
774
|
-
readonly stateMutability: "view";
|
|
775
|
-
readonly inputs: readonly [{
|
|
776
|
-
readonly type: "bytes20";
|
|
777
|
-
readonly name: "id";
|
|
778
|
-
}];
|
|
779
|
-
readonly outputs: readonly [{
|
|
780
|
-
readonly type: "uint256";
|
|
781
|
-
}];
|
|
782
943
|
}, {
|
|
783
944
|
readonly name: "totalUnits";
|
|
784
945
|
readonly type: "function";
|
|
785
946
|
readonly stateMutability: "view";
|
|
786
947
|
readonly inputs: readonly [{
|
|
787
|
-
readonly type: "
|
|
948
|
+
readonly type: "bytes32";
|
|
788
949
|
readonly name: "id";
|
|
789
950
|
}];
|
|
790
951
|
readonly outputs: readonly [{
|
|
@@ -807,6 +968,9 @@ declare const MorphoV2: readonly [{
|
|
|
807
968
|
}, {
|
|
808
969
|
readonly type: "uint256";
|
|
809
970
|
readonly name: "lltv";
|
|
971
|
+
}, {
|
|
972
|
+
readonly type: "uint256";
|
|
973
|
+
readonly name: "maxLif";
|
|
810
974
|
}, {
|
|
811
975
|
readonly type: "address";
|
|
812
976
|
readonly name: "oracle";
|
|
@@ -817,19 +981,19 @@ declare const MorphoV2: readonly [{
|
|
|
817
981
|
readonly name: "maturity";
|
|
818
982
|
}, {
|
|
819
983
|
readonly type: "uint256";
|
|
820
|
-
readonly name: "
|
|
984
|
+
readonly name: "rcfThreshold";
|
|
821
985
|
}];
|
|
822
986
|
readonly name: "obligation";
|
|
823
987
|
}];
|
|
824
988
|
readonly outputs: readonly [{
|
|
825
|
-
readonly type: "
|
|
989
|
+
readonly type: "bytes32";
|
|
826
990
|
}];
|
|
827
991
|
}, {
|
|
828
992
|
readonly name: "tradingFee";
|
|
829
993
|
readonly type: "function";
|
|
830
994
|
readonly stateMutability: "view";
|
|
831
995
|
readonly inputs: readonly [{
|
|
832
|
-
readonly type: "
|
|
996
|
+
readonly type: "bytes32";
|
|
833
997
|
readonly name: "id";
|
|
834
998
|
}, {
|
|
835
999
|
readonly type: "uint256";
|
|
@@ -846,6 +1010,20 @@ declare const MorphoV2: readonly [{
|
|
|
846
1010
|
readonly outputs: readonly [{
|
|
847
1011
|
readonly type: "address";
|
|
848
1012
|
}];
|
|
1013
|
+
}, {
|
|
1014
|
+
readonly name: "userLossIndex";
|
|
1015
|
+
readonly type: "function";
|
|
1016
|
+
readonly stateMutability: "view";
|
|
1017
|
+
readonly inputs: readonly [{
|
|
1018
|
+
readonly type: "bytes32";
|
|
1019
|
+
readonly name: "id";
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly type: "address";
|
|
1022
|
+
readonly name: "user";
|
|
1023
|
+
}];
|
|
1024
|
+
readonly outputs: readonly [{
|
|
1025
|
+
readonly type: "uint128";
|
|
1026
|
+
}];
|
|
849
1027
|
}, {
|
|
850
1028
|
readonly name: "withdraw";
|
|
851
1029
|
readonly type: "function";
|
|
@@ -863,6 +1041,9 @@ declare const MorphoV2: readonly [{
|
|
|
863
1041
|
}, {
|
|
864
1042
|
readonly type: "uint256";
|
|
865
1043
|
readonly name: "lltv";
|
|
1044
|
+
}, {
|
|
1045
|
+
readonly type: "uint256";
|
|
1046
|
+
readonly name: "maxLif";
|
|
866
1047
|
}, {
|
|
867
1048
|
readonly type: "address";
|
|
868
1049
|
readonly name: "oracle";
|
|
@@ -873,15 +1054,12 @@ declare const MorphoV2: readonly [{
|
|
|
873
1054
|
readonly name: "maturity";
|
|
874
1055
|
}, {
|
|
875
1056
|
readonly type: "uint256";
|
|
876
|
-
readonly name: "
|
|
1057
|
+
readonly name: "rcfThreshold";
|
|
877
1058
|
}];
|
|
878
1059
|
readonly name: "obligation";
|
|
879
1060
|
}, {
|
|
880
1061
|
readonly type: "uint256";
|
|
881
1062
|
readonly name: "obligationUnits";
|
|
882
|
-
}, {
|
|
883
|
-
readonly type: "uint256";
|
|
884
|
-
readonly name: "shares";
|
|
885
1063
|
}, {
|
|
886
1064
|
readonly type: "address";
|
|
887
1065
|
readonly name: "onBehalf";
|
|
@@ -889,11 +1067,7 @@ declare const MorphoV2: readonly [{
|
|
|
889
1067
|
readonly type: "address";
|
|
890
1068
|
readonly name: "receiver";
|
|
891
1069
|
}];
|
|
892
|
-
readonly outputs: readonly [
|
|
893
|
-
readonly type: "uint256";
|
|
894
|
-
}, {
|
|
895
|
-
readonly type: "uint256";
|
|
896
|
-
}];
|
|
1070
|
+
readonly outputs: readonly [];
|
|
897
1071
|
}, {
|
|
898
1072
|
readonly name: "withdrawCollateral";
|
|
899
1073
|
readonly type: "function";
|
|
@@ -911,6 +1085,9 @@ declare const MorphoV2: readonly [{
|
|
|
911
1085
|
}, {
|
|
912
1086
|
readonly type: "uint256";
|
|
913
1087
|
readonly name: "lltv";
|
|
1088
|
+
}, {
|
|
1089
|
+
readonly type: "uint256";
|
|
1090
|
+
readonly name: "maxLif";
|
|
914
1091
|
}, {
|
|
915
1092
|
readonly type: "address";
|
|
916
1093
|
readonly name: "oracle";
|
|
@@ -921,7 +1098,7 @@ declare const MorphoV2: readonly [{
|
|
|
921
1098
|
readonly name: "maturity";
|
|
922
1099
|
}, {
|
|
923
1100
|
readonly type: "uint256";
|
|
924
|
-
readonly name: "
|
|
1101
|
+
readonly name: "rcfThreshold";
|
|
925
1102
|
}];
|
|
926
1103
|
readonly name: "obligation";
|
|
927
1104
|
}, {
|
|
@@ -943,7 +1120,7 @@ declare const MorphoV2: readonly [{
|
|
|
943
1120
|
readonly type: "function";
|
|
944
1121
|
readonly stateMutability: "view";
|
|
945
1122
|
readonly inputs: readonly [{
|
|
946
|
-
readonly type: "
|
|
1123
|
+
readonly type: "bytes32";
|
|
947
1124
|
readonly name: "id";
|
|
948
1125
|
}];
|
|
949
1126
|
readonly outputs: readonly [{
|
|
@@ -957,21 +1134,6 @@ declare const MorphoV2: readonly [{
|
|
|
957
1134
|
readonly name: "owner";
|
|
958
1135
|
readonly indexed: true;
|
|
959
1136
|
}];
|
|
960
|
-
}, {
|
|
961
|
-
readonly name: "Consume";
|
|
962
|
-
readonly type: "event";
|
|
963
|
-
readonly inputs: readonly [{
|
|
964
|
-
readonly type: "address";
|
|
965
|
-
readonly name: "user";
|
|
966
|
-
readonly indexed: true;
|
|
967
|
-
}, {
|
|
968
|
-
readonly type: "bytes32";
|
|
969
|
-
readonly name: "group";
|
|
970
|
-
readonly indexed: true;
|
|
971
|
-
}, {
|
|
972
|
-
readonly type: "uint256";
|
|
973
|
-
readonly name: "amount";
|
|
974
|
-
}];
|
|
975
1137
|
}, {
|
|
976
1138
|
readonly name: "FlashLoan";
|
|
977
1139
|
readonly type: "event";
|
|
@@ -995,7 +1157,7 @@ declare const MorphoV2: readonly [{
|
|
|
995
1157
|
readonly name: "caller";
|
|
996
1158
|
readonly indexed: true;
|
|
997
1159
|
}, {
|
|
998
|
-
readonly type: "
|
|
1160
|
+
readonly type: "bytes32";
|
|
999
1161
|
readonly name: "id_";
|
|
1000
1162
|
readonly indexed: true;
|
|
1001
1163
|
}, {
|
|
@@ -1014,12 +1176,15 @@ declare const MorphoV2: readonly [{
|
|
|
1014
1176
|
}, {
|
|
1015
1177
|
readonly type: "uint256";
|
|
1016
1178
|
readonly name: "badDebt";
|
|
1179
|
+
}, {
|
|
1180
|
+
readonly type: "uint256";
|
|
1181
|
+
readonly name: "latestLossIndex";
|
|
1017
1182
|
}];
|
|
1018
1183
|
}, {
|
|
1019
1184
|
readonly name: "ObligationCreated";
|
|
1020
1185
|
readonly type: "event";
|
|
1021
1186
|
readonly inputs: readonly [{
|
|
1022
|
-
readonly type: "
|
|
1187
|
+
readonly type: "bytes32";
|
|
1023
1188
|
readonly name: "id_";
|
|
1024
1189
|
readonly indexed: true;
|
|
1025
1190
|
}, {
|
|
@@ -1035,6 +1200,9 @@ declare const MorphoV2: readonly [{
|
|
|
1035
1200
|
}, {
|
|
1036
1201
|
readonly type: "uint256";
|
|
1037
1202
|
readonly name: "lltv";
|
|
1203
|
+
}, {
|
|
1204
|
+
readonly type: "uint256";
|
|
1205
|
+
readonly name: "maxLif";
|
|
1038
1206
|
}, {
|
|
1039
1207
|
readonly type: "address";
|
|
1040
1208
|
readonly name: "oracle";
|
|
@@ -1045,7 +1213,7 @@ declare const MorphoV2: readonly [{
|
|
|
1045
1213
|
readonly name: "maturity";
|
|
1046
1214
|
}, {
|
|
1047
1215
|
readonly type: "uint256";
|
|
1048
|
-
readonly name: "
|
|
1216
|
+
readonly name: "rcfThreshold";
|
|
1049
1217
|
}];
|
|
1050
1218
|
readonly name: "obligation";
|
|
1051
1219
|
}];
|
|
@@ -1057,7 +1225,7 @@ declare const MorphoV2: readonly [{
|
|
|
1057
1225
|
readonly name: "caller";
|
|
1058
1226
|
readonly indexed: true;
|
|
1059
1227
|
}, {
|
|
1060
|
-
readonly type: "
|
|
1228
|
+
readonly type: "bytes32";
|
|
1061
1229
|
readonly name: "id_";
|
|
1062
1230
|
readonly indexed: true;
|
|
1063
1231
|
}, {
|
|
@@ -1068,6 +1236,25 @@ declare const MorphoV2: readonly [{
|
|
|
1068
1236
|
readonly name: "onBehalf";
|
|
1069
1237
|
readonly indexed: true;
|
|
1070
1238
|
}];
|
|
1239
|
+
}, {
|
|
1240
|
+
readonly name: "SetConsumed";
|
|
1241
|
+
readonly type: "event";
|
|
1242
|
+
readonly inputs: readonly [{
|
|
1243
|
+
readonly type: "address";
|
|
1244
|
+
readonly name: "caller";
|
|
1245
|
+
readonly indexed: true;
|
|
1246
|
+
}, {
|
|
1247
|
+
readonly type: "address";
|
|
1248
|
+
readonly name: "onBehalf";
|
|
1249
|
+
readonly indexed: true;
|
|
1250
|
+
}, {
|
|
1251
|
+
readonly type: "bytes32";
|
|
1252
|
+
readonly name: "group";
|
|
1253
|
+
readonly indexed: true;
|
|
1254
|
+
}, {
|
|
1255
|
+
readonly type: "uint256";
|
|
1256
|
+
readonly name: "amount";
|
|
1257
|
+
}];
|
|
1071
1258
|
}, {
|
|
1072
1259
|
readonly name: "SetDefaultTradingFee";
|
|
1073
1260
|
readonly type: "event";
|
|
@@ -1091,11 +1278,63 @@ declare const MorphoV2: readonly [{
|
|
|
1091
1278
|
readonly name: "feeSetter";
|
|
1092
1279
|
readonly indexed: true;
|
|
1093
1280
|
}];
|
|
1281
|
+
}, {
|
|
1282
|
+
readonly name: "SetIsAuthorized";
|
|
1283
|
+
readonly type: "event";
|
|
1284
|
+
readonly inputs: readonly [{
|
|
1285
|
+
readonly type: "address";
|
|
1286
|
+
readonly name: "caller";
|
|
1287
|
+
readonly indexed: true;
|
|
1288
|
+
}, {
|
|
1289
|
+
readonly type: "address";
|
|
1290
|
+
readonly name: "onBehalf";
|
|
1291
|
+
readonly indexed: true;
|
|
1292
|
+
}, {
|
|
1293
|
+
readonly type: "address";
|
|
1294
|
+
readonly name: "authorized";
|
|
1295
|
+
readonly indexed: true;
|
|
1296
|
+
}, {
|
|
1297
|
+
readonly type: "bool";
|
|
1298
|
+
readonly name: "newIsAuthorized";
|
|
1299
|
+
}];
|
|
1300
|
+
}, {
|
|
1301
|
+
readonly name: "SetMaxCollateralPerUser";
|
|
1302
|
+
readonly type: "event";
|
|
1303
|
+
readonly inputs: readonly [{
|
|
1304
|
+
readonly type: "address";
|
|
1305
|
+
readonly name: "collateralToken";
|
|
1306
|
+
readonly indexed: true;
|
|
1307
|
+
}, {
|
|
1308
|
+
readonly type: "uint256";
|
|
1309
|
+
readonly name: "maxCollateralPerUser";
|
|
1310
|
+
}];
|
|
1311
|
+
}, {
|
|
1312
|
+
readonly name: "SetMaxTakeableAssets";
|
|
1313
|
+
readonly type: "event";
|
|
1314
|
+
readonly inputs: readonly [{
|
|
1315
|
+
readonly type: "address";
|
|
1316
|
+
readonly name: "loanToken";
|
|
1317
|
+
readonly indexed: true;
|
|
1318
|
+
}, {
|
|
1319
|
+
readonly type: "uint256";
|
|
1320
|
+
readonly name: "maxTakeableAssets";
|
|
1321
|
+
}];
|
|
1322
|
+
}, {
|
|
1323
|
+
readonly name: "SetMaxTotalUnits";
|
|
1324
|
+
readonly type: "event";
|
|
1325
|
+
readonly inputs: readonly [{
|
|
1326
|
+
readonly type: "address";
|
|
1327
|
+
readonly name: "loanToken";
|
|
1328
|
+
readonly indexed: true;
|
|
1329
|
+
}, {
|
|
1330
|
+
readonly type: "uint128";
|
|
1331
|
+
readonly name: "maxTotalUnits";
|
|
1332
|
+
}];
|
|
1094
1333
|
}, {
|
|
1095
1334
|
readonly name: "SetObligationTradingFee";
|
|
1096
1335
|
readonly type: "event";
|
|
1097
1336
|
readonly inputs: readonly [{
|
|
1098
|
-
readonly type: "
|
|
1337
|
+
readonly type: "bytes32";
|
|
1099
1338
|
readonly name: "id_";
|
|
1100
1339
|
readonly indexed: true;
|
|
1101
1340
|
}, {
|
|
@@ -1127,12 +1366,37 @@ declare const MorphoV2: readonly [{
|
|
|
1127
1366
|
readonly type: "event";
|
|
1128
1367
|
readonly inputs: readonly [{
|
|
1129
1368
|
readonly type: "address";
|
|
1130
|
-
readonly name: "
|
|
1369
|
+
readonly name: "caller";
|
|
1370
|
+
readonly indexed: true;
|
|
1371
|
+
}, {
|
|
1372
|
+
readonly type: "address";
|
|
1373
|
+
readonly name: "onBehalf";
|
|
1131
1374
|
readonly indexed: true;
|
|
1132
1375
|
}, {
|
|
1133
1376
|
readonly type: "bytes32";
|
|
1134
1377
|
readonly name: "session";
|
|
1135
1378
|
}];
|
|
1379
|
+
}, {
|
|
1380
|
+
readonly name: "Slash";
|
|
1381
|
+
readonly type: "event";
|
|
1382
|
+
readonly inputs: readonly [{
|
|
1383
|
+
readonly type: "address";
|
|
1384
|
+
readonly name: "caller";
|
|
1385
|
+
}, {
|
|
1386
|
+
readonly type: "bytes32";
|
|
1387
|
+
readonly name: "id_";
|
|
1388
|
+
readonly indexed: true;
|
|
1389
|
+
}, {
|
|
1390
|
+
readonly type: "address";
|
|
1391
|
+
readonly name: "user";
|
|
1392
|
+
readonly indexed: true;
|
|
1393
|
+
}, {
|
|
1394
|
+
readonly type: "uint256";
|
|
1395
|
+
readonly name: "credit";
|
|
1396
|
+
}, {
|
|
1397
|
+
readonly type: "uint256";
|
|
1398
|
+
readonly name: "latestLossIndex";
|
|
1399
|
+
}];
|
|
1136
1400
|
}, {
|
|
1137
1401
|
readonly name: "SupplyCollateral";
|
|
1138
1402
|
readonly type: "event";
|
|
@@ -1140,7 +1404,7 @@ declare const MorphoV2: readonly [{
|
|
|
1140
1404
|
readonly type: "address";
|
|
1141
1405
|
readonly name: "caller";
|
|
1142
1406
|
}, {
|
|
1143
|
-
readonly type: "
|
|
1407
|
+
readonly type: "bytes32";
|
|
1144
1408
|
readonly name: "id_";
|
|
1145
1409
|
readonly indexed: true;
|
|
1146
1410
|
}, {
|
|
@@ -1162,7 +1426,7 @@ declare const MorphoV2: readonly [{
|
|
|
1162
1426
|
readonly type: "address";
|
|
1163
1427
|
readonly name: "caller";
|
|
1164
1428
|
}, {
|
|
1165
|
-
readonly type: "
|
|
1429
|
+
readonly type: "bytes32";
|
|
1166
1430
|
readonly name: "id_";
|
|
1167
1431
|
readonly indexed: true;
|
|
1168
1432
|
}, {
|
|
@@ -1185,15 +1449,6 @@ declare const MorphoV2: readonly [{
|
|
|
1185
1449
|
}, {
|
|
1186
1450
|
readonly type: "uint256";
|
|
1187
1451
|
readonly name: "obligationUnits";
|
|
1188
|
-
}, {
|
|
1189
|
-
readonly type: "uint256";
|
|
1190
|
-
readonly name: "obligationShares";
|
|
1191
|
-
}, {
|
|
1192
|
-
readonly type: "bool";
|
|
1193
|
-
readonly name: "buyerIsLender";
|
|
1194
|
-
}, {
|
|
1195
|
-
readonly type: "bool";
|
|
1196
|
-
readonly name: "sellerIsBorrower";
|
|
1197
1452
|
}, {
|
|
1198
1453
|
readonly type: "address";
|
|
1199
1454
|
readonly name: "sellerReceiver";
|
|
@@ -1203,6 +1458,9 @@ declare const MorphoV2: readonly [{
|
|
|
1203
1458
|
}, {
|
|
1204
1459
|
readonly type: "uint256";
|
|
1205
1460
|
readonly name: "consumed";
|
|
1461
|
+
}, {
|
|
1462
|
+
readonly type: "uint256";
|
|
1463
|
+
readonly name: "totalUnits";
|
|
1206
1464
|
}];
|
|
1207
1465
|
}, {
|
|
1208
1466
|
readonly name: "Withdraw";
|
|
@@ -1211,15 +1469,12 @@ declare const MorphoV2: readonly [{
|
|
|
1211
1469
|
readonly type: "address";
|
|
1212
1470
|
readonly name: "caller";
|
|
1213
1471
|
}, {
|
|
1214
|
-
readonly type: "
|
|
1472
|
+
readonly type: "bytes32";
|
|
1215
1473
|
readonly name: "id_";
|
|
1216
1474
|
readonly indexed: true;
|
|
1217
1475
|
}, {
|
|
1218
1476
|
readonly type: "uint256";
|
|
1219
1477
|
readonly name: "obligationUnits";
|
|
1220
|
-
}, {
|
|
1221
|
-
readonly type: "uint256";
|
|
1222
|
-
readonly name: "shares";
|
|
1223
1478
|
}, {
|
|
1224
1479
|
readonly type: "address";
|
|
1225
1480
|
readonly name: "onBehalf";
|
|
@@ -1236,7 +1491,7 @@ declare const MorphoV2: readonly [{
|
|
|
1236
1491
|
readonly type: "address";
|
|
1237
1492
|
readonly name: "caller";
|
|
1238
1493
|
}, {
|
|
1239
|
-
readonly type: "
|
|
1494
|
+
readonly type: "bytes32";
|
|
1240
1495
|
readonly name: "id_";
|
|
1241
1496
|
readonly indexed: true;
|
|
1242
1497
|
}, {
|
|
@@ -1429,7 +1684,7 @@ declare class ReorgError extends BaseError {
|
|
|
1429
1684
|
constructor(blockNumber: number);
|
|
1430
1685
|
}
|
|
1431
1686
|
declare namespace Chain_d_exports {
|
|
1432
|
-
export { Chain$1 as Chain, ChainId, Id, InvalidBatchSizeError, InvalidBlockRangeError, InvalidBlockWindowError, MissingBlockNumberError, Name
|
|
1687
|
+
export { Chain$1 as Chain, ChainId, Id, InvalidBatchSizeError, InvalidBlockRangeError, InvalidBlockWindowError, MissingBlockNumberError, Name, UnrecoverableLogsResponseSizeError, chainIds, chainNames, chains$1 as chains, getChain, getWhitelistedChains, streamLogs };
|
|
1433
1688
|
}
|
|
1434
1689
|
type Chain$1 = Compute<Omit<Chain<ChainFormatters, {
|
|
1435
1690
|
morpho: ChainContract;
|
|
@@ -1444,7 +1699,7 @@ type Chain$1 = Compute<Omit<Chain<ChainFormatters, {
|
|
|
1444
1699
|
callbacks: Callback[];
|
|
1445
1700
|
}>, "custom"> & {
|
|
1446
1701
|
id: Id;
|
|
1447
|
-
name: Name
|
|
1702
|
+
name: Name;
|
|
1448
1703
|
custom: {
|
|
1449
1704
|
morpho: ChainContract;
|
|
1450
1705
|
morphoBlue: ChainContract;
|
|
@@ -1464,13 +1719,13 @@ declare const ChainId: {
|
|
|
1464
1719
|
readonly "ETHEREUM-VIRTUAL-TESTNET": 109111114;
|
|
1465
1720
|
readonly ANVIL: 505050505;
|
|
1466
1721
|
};
|
|
1467
|
-
type Name
|
|
1468
|
-
declare const chainNames: readonly Name
|
|
1469
|
-
type Id = (typeof ChainId)[Uppercase<Name
|
|
1722
|
+
type Name = Lowercase<keyof typeof ChainId>;
|
|
1723
|
+
declare const chainNames: readonly Name[];
|
|
1724
|
+
type Id = (typeof ChainId)[Uppercase<Name>];
|
|
1470
1725
|
declare const chainIds: readonly Id[];
|
|
1471
1726
|
declare function getChain(chainId: Id): Chain$1 | undefined;
|
|
1472
1727
|
declare const getWhitelistedChains: () => Chain$1[];
|
|
1473
|
-
declare const chains$1: Record<Lowercase<Name
|
|
1728
|
+
declare const chains$1: Record<Lowercase<Name>, Chain$1>;
|
|
1474
1729
|
declare function streamLogs<abiEvent extends AbiEvent | undefined = undefined>(parameters: {
|
|
1475
1730
|
client: PublicClient;
|
|
1476
1731
|
contractAddress?: Address;
|
|
@@ -1558,7 +1813,8 @@ declare namespace Collateral_d_exports {
|
|
|
1558
1813
|
}
|
|
1559
1814
|
type Collateral = {
|
|
1560
1815
|
/** Asset being used as collateral. */asset: Address; /** Liquidation Loan-to-Value of the collateral. */
|
|
1561
|
-
lltv: LLTV; /**
|
|
1816
|
+
lltv: LLTV; /** Maximum Liquidation Incentive Factor for this collateral. */
|
|
1817
|
+
maxLif: bigint; /** Oracle contract used to price the collateral. */
|
|
1562
1818
|
oracle: Address;
|
|
1563
1819
|
};
|
|
1564
1820
|
declare const abi$1: readonly [{
|
|
@@ -1567,6 +1823,9 @@ declare const abi$1: readonly [{
|
|
|
1567
1823
|
}, {
|
|
1568
1824
|
readonly type: "uint256";
|
|
1569
1825
|
readonly name: "lltv";
|
|
1826
|
+
}, {
|
|
1827
|
+
readonly type: "uint256";
|
|
1828
|
+
readonly name: "maxLif";
|
|
1570
1829
|
}, {
|
|
1571
1830
|
readonly type: "address";
|
|
1572
1831
|
readonly name: "oracle";
|
|
@@ -1575,17 +1834,20 @@ declare const CollateralSchema: z$1.ZodObject<{
|
|
|
1575
1834
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1576
1835
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1577
1836
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
1837
|
+
maxLif: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
1578
1838
|
}, z$1.core.$strip>;
|
|
1579
1839
|
declare const CollateralsSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1580
1840
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1581
1841
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1582
1842
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
1843
|
+
maxLif: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
1583
1844
|
}, z$1.core.$strip>>;
|
|
1584
1845
|
declare const from$16: (parameters: from$16.Parameters) => from$16.ReturnType;
|
|
1585
1846
|
declare namespace from$16 {
|
|
1586
1847
|
type Parameters = {
|
|
1587
1848
|
asset: Address;
|
|
1588
1849
|
lltv: Options | bigint;
|
|
1850
|
+
maxLif?: bigint;
|
|
1589
1851
|
oracle: Address;
|
|
1590
1852
|
};
|
|
1591
1853
|
type ReturnType = Collateral;
|
|
@@ -1765,8 +2027,8 @@ declare namespace Obligation_d_exports {
|
|
|
1765
2027
|
type Obligation$1 = {
|
|
1766
2028
|
/** The token that is being borrowed for this obligation. */loanToken: Address; /** The exact set of collaterals required to borrow the loan token. */
|
|
1767
2029
|
collaterals: Collateral[]; /** The maturity of the obligation. */
|
|
1768
|
-
maturity: Maturity; /**
|
|
1769
|
-
|
|
2030
|
+
maturity: Maturity; /** Recovery-close-factor threshold in obligation units. */
|
|
2031
|
+
rcfThreshold: bigint;
|
|
1770
2032
|
};
|
|
1771
2033
|
declare const ObligationSchema: z$1.ZodObject<{
|
|
1772
2034
|
loanToken: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
@@ -1774,9 +2036,10 @@ declare const ObligationSchema: z$1.ZodObject<{
|
|
|
1774
2036
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1775
2037
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1776
2038
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
2039
|
+
maxLif: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
1777
2040
|
}, z$1.core.$strip>>;
|
|
1778
2041
|
maturity: z$1.ZodPipe<z$1.ZodNumber, z$1.ZodTransform<Maturity, number>>;
|
|
1779
|
-
|
|
2042
|
+
rcfThreshold: z$1.ZodBigInt;
|
|
1780
2043
|
}, z$1.core.$strip>;
|
|
1781
2044
|
declare const abi: readonly [{
|
|
1782
2045
|
readonly type: "address";
|
|
@@ -1790,6 +2053,9 @@ declare const abi: readonly [{
|
|
|
1790
2053
|
}, {
|
|
1791
2054
|
readonly type: "uint256";
|
|
1792
2055
|
readonly name: "lltv";
|
|
2056
|
+
}, {
|
|
2057
|
+
readonly type: "uint256";
|
|
2058
|
+
readonly name: "maxLif";
|
|
1793
2059
|
}, {
|
|
1794
2060
|
readonly type: "address";
|
|
1795
2061
|
readonly name: "oracle";
|
|
@@ -1799,7 +2065,7 @@ declare const abi: readonly [{
|
|
|
1799
2065
|
readonly name: "maturity";
|
|
1800
2066
|
}, {
|
|
1801
2067
|
readonly type: "uint256";
|
|
1802
|
-
readonly name: "
|
|
2068
|
+
readonly name: "rcfThreshold";
|
|
1803
2069
|
}];
|
|
1804
2070
|
declare const tupleAbi: readonly [{
|
|
1805
2071
|
readonly type: "tuple";
|
|
@@ -1815,6 +2081,9 @@ declare const tupleAbi: readonly [{
|
|
|
1815
2081
|
}, {
|
|
1816
2082
|
readonly type: "uint256";
|
|
1817
2083
|
readonly name: "lltv";
|
|
2084
|
+
}, {
|
|
2085
|
+
readonly type: "uint256";
|
|
2086
|
+
readonly name: "maxLif";
|
|
1818
2087
|
}, {
|
|
1819
2088
|
readonly type: "address";
|
|
1820
2089
|
readonly name: "oracle";
|
|
@@ -1824,7 +2093,7 @@ declare const tupleAbi: readonly [{
|
|
|
1824
2093
|
readonly name: "maturity";
|
|
1825
2094
|
}, {
|
|
1826
2095
|
readonly type: "uint256";
|
|
1827
|
-
readonly name: "
|
|
2096
|
+
readonly name: "rcfThreshold";
|
|
1828
2097
|
}];
|
|
1829
2098
|
}];
|
|
1830
2099
|
/**
|
|
@@ -1846,6 +2115,7 @@ declare const tupleAbi: readonly [{
|
|
|
1846
2115
|
* }),
|
|
1847
2116
|
* ],
|
|
1848
2117
|
* maturity: Maturity.from("end_of_next_quarter"),
|
|
2118
|
+
* rcfThreshold: 0n,
|
|
1849
2119
|
* });
|
|
1850
2120
|
* ```
|
|
1851
2121
|
*/
|
|
@@ -1854,8 +2124,8 @@ declare namespace from$14 {
|
|
|
1854
2124
|
type Parameters = {
|
|
1855
2125
|
/** The token that is being borrowed for this obligation. */loanToken: Address; /** The exact set of collaterals required to borrow the loan token. Must be sorted alphabetically by address. */
|
|
1856
2126
|
collaterals: from$16.Parameters[] | readonly from$16.Parameters[]; /** The maturity of the obligation. */
|
|
1857
|
-
maturity: from$15.Parameters; /**
|
|
1858
|
-
|
|
2127
|
+
maturity: from$15.Parameters; /** Recovery-close-factor threshold in obligation units. */
|
|
2128
|
+
rcfThreshold: bigint;
|
|
1859
2129
|
};
|
|
1860
2130
|
type ReturnType = Obligation$1;
|
|
1861
2131
|
type ErrorType = InvalidObligationError;
|
|
@@ -1868,17 +2138,14 @@ declare namespace from$14 {
|
|
|
1868
2138
|
*/
|
|
1869
2139
|
declare function fromSnakeCase$2(input: fromSnakeCase$2.Parameters): fromSnakeCase$2.ReturnType;
|
|
1870
2140
|
declare namespace fromSnakeCase$2 {
|
|
1871
|
-
type SnakeCaseParameters =
|
|
1872
|
-
minCollatValue?: bigint;
|
|
1873
|
-
};
|
|
2141
|
+
type SnakeCaseParameters = Obligation$1;
|
|
1874
2142
|
type Parameters = Snake<SnakeCaseParameters>;
|
|
1875
2143
|
type ReturnType = Obligation$1;
|
|
1876
2144
|
type ErrorType = InvalidObligationError;
|
|
1877
2145
|
}
|
|
1878
2146
|
/**
|
|
1879
2147
|
* Calculates a canonical key for an obligation payload.
|
|
1880
|
-
* The key is computed as keccak256(abi.encode(loanToken, collaterals, maturity,
|
|
1881
|
-
* If omitted, `minCollatValue` defaults to `0`.
|
|
2148
|
+
* The key is computed as keccak256(abi.encode(loanToken, collaterals, maturity, rcfThreshold)).
|
|
1882
2149
|
* @throws If the collaterals are not sorted alphabetically by address. {@link CollateralsAreNotSortedError}
|
|
1883
2150
|
* @param parameters - {@link key.Parameters}
|
|
1884
2151
|
* @returns The obligation key as a 32-byte hex string. {@link key.ReturnType}
|
|
@@ -1897,10 +2164,11 @@ declare namespace key$1 {
|
|
|
1897
2164
|
collaterals: {
|
|
1898
2165
|
asset: Address;
|
|
1899
2166
|
lltv: bigint;
|
|
2167
|
+
maxLif?: bigint;
|
|
1900
2168
|
oracle: Address;
|
|
1901
2169
|
}[];
|
|
1902
2170
|
maturity: number;
|
|
1903
|
-
|
|
2171
|
+
rcfThreshold: bigint;
|
|
1904
2172
|
};
|
|
1905
2173
|
type ReturnType = Hex;
|
|
1906
2174
|
type ErrorType = CollateralsAreNotSortedError;
|
|
@@ -1927,7 +2195,6 @@ declare namespace random$2 {
|
|
|
1927
2195
|
*/
|
|
1928
2196
|
declare function fromOffer$1(offer: Offer): fromOffer$1.ReturnType;
|
|
1929
2197
|
declare namespace fromOffer$1 {
|
|
1930
|
-
type Parameters = Offer;
|
|
1931
2198
|
type ReturnType = Obligation$1;
|
|
1932
2199
|
}
|
|
1933
2200
|
declare class InvalidObligationError extends BaseError<z$1.ZodError | Error> {
|
|
@@ -1961,11 +2228,10 @@ declare namespace creationCode {
|
|
|
1961
2228
|
}
|
|
1962
2229
|
/**
|
|
1963
2230
|
* Computes the same id as `IdLib.toId` in Solidity using the CREATE2 preimage:
|
|
1964
|
-
* `keccak256(0xff ++ morphoV2 ++ chainId ++ keccak256(creationCode))
|
|
1965
|
-
* then truncates to the lower 20 bytes.
|
|
2231
|
+
* `keccak256(0xff ++ morphoV2 ++ chainId ++ keccak256(creationCode))`.
|
|
1966
2232
|
*
|
|
1967
2233
|
* @param parameters - {@link toId.Parameters}
|
|
1968
|
-
* @returns The obligation id. {@link toId.ReturnType}
|
|
2234
|
+
* @returns The 32-byte obligation id. {@link toId.ReturnType}
|
|
1969
2235
|
*/
|
|
1970
2236
|
declare function toId(parameters: toId.Parameters): toId.ReturnType;
|
|
1971
2237
|
declare namespace toId {
|
|
@@ -2069,15 +2335,14 @@ declare function generateMarketLiquidityPoolId(parameters: {
|
|
|
2069
2335
|
marketId: string;
|
|
2070
2336
|
}): string;
|
|
2071
2337
|
declare namespace Offer_d_exports {
|
|
2072
|
-
export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, liquidateEvent,
|
|
2338
|
+
export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, liquidateEvent, random$1 as random, repayEvent, serialize, supplyCollateralEvent, takeEvent, toSnakeCase, withdrawCollateralEvent };
|
|
2073
2339
|
}
|
|
2074
2340
|
type Offer = {
|
|
2075
|
-
/** The address that made the offer. */readonly maker: Address; /** The
|
|
2076
|
-
readonly
|
|
2077
|
-
readonly obligationUnits: bigint; /** The max lending shares to trade. Mutually exclusive with assets and obligationUnits. */
|
|
2078
|
-
readonly obligationShares: bigint; /** The offer tick. */
|
|
2341
|
+
/** The address that made the offer. */readonly maker: Address; /** The max debt units to trade. */
|
|
2342
|
+
readonly obligationUnits: bigint; /** The offer tick. */
|
|
2079
2343
|
readonly tick: number; /** The date at which all interests will be paid. */
|
|
2080
|
-
readonly maturity: Maturity; /**
|
|
2344
|
+
readonly maturity: Maturity; /** Recovery-close-factor threshold in obligation units. */
|
|
2345
|
+
readonly rcfThreshold: bigint; /** The date at which the offer will expire. */
|
|
2081
2346
|
readonly expiry: number; /** The date at which the offer will start. */
|
|
2082
2347
|
readonly start: number; /** The group. Used for OCO (One-Cancelled-Other) mechanism. */
|
|
2083
2348
|
readonly group: Hex; /** The session. Used for session-based offer management. */
|
|
@@ -2089,7 +2354,8 @@ type Offer = {
|
|
|
2089
2354
|
readonly address: Address;
|
|
2090
2355
|
readonly data: Hex;
|
|
2091
2356
|
}; /** Receiver of loan token proceeds when maker is seller on `take()`. */
|
|
2092
|
-
readonly receiverIfMakerIsSeller: Address;
|
|
2357
|
+
readonly receiverIfMakerIsSeller: Address; /** Whether this offer can only reduce existing positions, not create new ones. */
|
|
2358
|
+
readonly exitOnly: boolean;
|
|
2093
2359
|
};
|
|
2094
2360
|
declare enum Status {
|
|
2095
2361
|
VALID = "VALID",
|
|
@@ -2102,11 +2368,10 @@ type Validation = {
|
|
|
2102
2368
|
};
|
|
2103
2369
|
declare const OfferSchema: () => z$1.ZodObject<{
|
|
2104
2370
|
maker: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2105
|
-
assets: z$1.ZodBigInt;
|
|
2106
2371
|
obligationUnits: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
2107
|
-
obligationShares: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
2108
2372
|
tick: z$1.ZodCoercedNumber<unknown>;
|
|
2109
2373
|
maturity: z$1.ZodPipe<z$1.ZodNumber, z$1.ZodTransform<Maturity, number>>;
|
|
2374
|
+
rcfThreshold: z$1.ZodBigInt;
|
|
2110
2375
|
expiry: z$1.ZodNumber;
|
|
2111
2376
|
start: z$1.ZodNumber;
|
|
2112
2377
|
group: z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodNumber, z$1.ZodBigInt]>, z$1.ZodTransform<`0x${string}`, string | number | bigint>>;
|
|
@@ -2117,12 +2382,14 @@ declare const OfferSchema: () => z$1.ZodObject<{
|
|
|
2117
2382
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2118
2383
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2119
2384
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
2385
|
+
maxLif: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
2120
2386
|
}, z$1.core.$strip>>;
|
|
2121
2387
|
callback: z$1.ZodObject<{
|
|
2122
2388
|
address: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2123
2389
|
data: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2124
2390
|
}, z$1.core.$strip>;
|
|
2125
2391
|
receiverIfMakerIsSeller: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2392
|
+
exitOnly: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
2126
2393
|
}, z$1.core.$strip>;
|
|
2127
2394
|
/**
|
|
2128
2395
|
* Input type for creating offers. Accepts flexible group types that will be coerced to Hex.
|
|
@@ -2135,12 +2402,13 @@ declare const OfferSchema: () => z$1.ZodObject<{
|
|
|
2135
2402
|
*
|
|
2136
2403
|
* All values validated to be non-negative and within bytes32 range.
|
|
2137
2404
|
*/
|
|
2138
|
-
type OfferInput = Compute<Omit<Offer, "group" | "session" | "obligationUnits" | "
|
|
2405
|
+
type OfferInput = Compute<Omit<Offer, "group" | "session" | "obligationUnits" | "rcfThreshold" | "receiverIfMakerIsSeller" | "exitOnly"> & {
|
|
2139
2406
|
group: Hex | bigint | number | string; /** Optional: defaults to zero bytes32. */
|
|
2140
|
-
session?: Hex | bigint | number | string; /** Optional: defaults to 0n.
|
|
2141
|
-
obligationUnits?: bigint; /**
|
|
2142
|
-
|
|
2143
|
-
receiverIfMakerIsSeller?: Address;
|
|
2407
|
+
session?: Hex | bigint | number | string; /** Optional: defaults to 0n. */
|
|
2408
|
+
obligationUnits?: bigint; /** Recovery-close-factor threshold in obligation units. */
|
|
2409
|
+
rcfThreshold: bigint; /** Optional: defaults to maker for backward compatibility. */
|
|
2410
|
+
receiverIfMakerIsSeller?: Address; /** Optional: defaults to false. */
|
|
2411
|
+
exitOnly?: boolean;
|
|
2144
2412
|
}>;
|
|
2145
2413
|
/**
|
|
2146
2414
|
* Creates an offer from a plain object.
|
|
@@ -2177,11 +2445,10 @@ declare function toSnakeCase(offer: Offer): Snake<Offer>;
|
|
|
2177
2445
|
*/
|
|
2178
2446
|
declare const serialize: (offer: Offer) => {
|
|
2179
2447
|
maker: `0x${string}`;
|
|
2180
|
-
assets: string;
|
|
2181
2448
|
obligationUnits: string;
|
|
2182
|
-
obligationShares: string;
|
|
2183
2449
|
tick: number;
|
|
2184
2450
|
maturity: number;
|
|
2451
|
+
rcfThreshold: string;
|
|
2185
2452
|
expiry: number;
|
|
2186
2453
|
start: number;
|
|
2187
2454
|
group: `0x${string}`;
|
|
@@ -2192,12 +2459,14 @@ declare const serialize: (offer: Offer) => {
|
|
|
2192
2459
|
asset: `0x${string}`;
|
|
2193
2460
|
oracle: `0x${string}`;
|
|
2194
2461
|
lltv: string;
|
|
2462
|
+
maxLif: string;
|
|
2195
2463
|
}[];
|
|
2196
2464
|
callback: {
|
|
2197
2465
|
address: `0x${string}`;
|
|
2198
2466
|
data: `0x${string}`;
|
|
2199
2467
|
};
|
|
2200
2468
|
receiverIfMakerIsSeller: `0x${string}`;
|
|
2469
|
+
exitOnly: boolean;
|
|
2201
2470
|
hash: `0x${string}`;
|
|
2202
2471
|
};
|
|
2203
2472
|
type RandomConfig = {
|
|
@@ -2205,11 +2474,10 @@ type RandomConfig = {
|
|
|
2205
2474
|
collateralTokens?: Address[];
|
|
2206
2475
|
assetsDecimals?: Record<Address, number>;
|
|
2207
2476
|
buy?: boolean;
|
|
2208
|
-
assets?: bigint;
|
|
2209
2477
|
obligationUnits?: bigint;
|
|
2210
|
-
obligationShares?: bigint;
|
|
2211
2478
|
maker?: Address;
|
|
2212
2479
|
maturity?: Maturity;
|
|
2480
|
+
rcfThreshold?: bigint;
|
|
2213
2481
|
start?: number;
|
|
2214
2482
|
expiry?: number;
|
|
2215
2483
|
group?: Hex | bigint | number | string;
|
|
@@ -2221,6 +2489,7 @@ type RandomConfig = {
|
|
|
2221
2489
|
};
|
|
2222
2490
|
receiverIfMakerIsSeller?: Address;
|
|
2223
2491
|
collaterals?: readonly Collateral[];
|
|
2492
|
+
exitOnly?: boolean;
|
|
2224
2493
|
};
|
|
2225
2494
|
/**
|
|
2226
2495
|
* Generates a random Offer.
|
|
@@ -2237,21 +2506,6 @@ declare function random$1(config?: RandomConfig): Offer;
|
|
|
2237
2506
|
* @returns 32-byte offer hash.
|
|
2238
2507
|
*/
|
|
2239
2508
|
declare function hash(offer: Offer): Hex;
|
|
2240
|
-
/**
|
|
2241
|
-
* Calculates the onchain obligation id for an offer.
|
|
2242
|
-
* The id is computed with {@link Id.toId}.
|
|
2243
|
-
* @param offer - The offer to calculate the obligation id for.
|
|
2244
|
-
* @param parameters - The chain context used by the onchain id function.
|
|
2245
|
-
* @returns The obligation id as a 20-byte hex string.
|
|
2246
|
-
*/
|
|
2247
|
-
declare function obligationId(offer: Offer, parameters: obligationId.Parameters): obligationId.ReturnType;
|
|
2248
|
-
declare namespace obligationId {
|
|
2249
|
-
type Parameters = {
|
|
2250
|
-
chainId: Id;
|
|
2251
|
-
morphoV2: Address;
|
|
2252
|
-
};
|
|
2253
|
-
type ReturnType = Hex;
|
|
2254
|
-
}
|
|
2255
2509
|
declare function encode$1(offer: Offer): `0x${string}`;
|
|
2256
2510
|
declare function decode$1(data: Hex): Offer;
|
|
2257
2511
|
type OfferConsumed = {
|
|
@@ -2275,9 +2529,9 @@ declare const takeEvent: {
|
|
|
2275
2529
|
readonly internalType: "address";
|
|
2276
2530
|
}, {
|
|
2277
2531
|
readonly name: "id_";
|
|
2278
|
-
readonly type: "
|
|
2532
|
+
readonly type: "bytes32";
|
|
2279
2533
|
readonly indexed: true;
|
|
2280
|
-
readonly internalType: "
|
|
2534
|
+
readonly internalType: "bytes32";
|
|
2281
2535
|
}, {
|
|
2282
2536
|
readonly name: "maker";
|
|
2283
2537
|
readonly type: "address";
|
|
@@ -2308,21 +2562,6 @@ declare const takeEvent: {
|
|
|
2308
2562
|
readonly type: "uint256";
|
|
2309
2563
|
readonly indexed: false;
|
|
2310
2564
|
readonly internalType: "uint256";
|
|
2311
|
-
}, {
|
|
2312
|
-
readonly name: "obligationShares";
|
|
2313
|
-
readonly type: "uint256";
|
|
2314
|
-
readonly indexed: false;
|
|
2315
|
-
readonly internalType: "uint256";
|
|
2316
|
-
}, {
|
|
2317
|
-
readonly name: "buyerIsLender";
|
|
2318
|
-
readonly type: "bool";
|
|
2319
|
-
readonly indexed: false;
|
|
2320
|
-
readonly internalType: "bool";
|
|
2321
|
-
}, {
|
|
2322
|
-
readonly name: "sellerIsBorrower";
|
|
2323
|
-
readonly type: "bool";
|
|
2324
|
-
readonly indexed: false;
|
|
2325
|
-
readonly internalType: "bool";
|
|
2326
2565
|
}, {
|
|
2327
2566
|
readonly name: "sellerReceiver";
|
|
2328
2567
|
readonly type: "address";
|
|
@@ -2338,17 +2577,27 @@ declare const takeEvent: {
|
|
|
2338
2577
|
readonly type: "uint256";
|
|
2339
2578
|
readonly indexed: false;
|
|
2340
2579
|
readonly internalType: "uint256";
|
|
2580
|
+
}, {
|
|
2581
|
+
readonly name: "totalUnits";
|
|
2582
|
+
readonly type: "uint256";
|
|
2583
|
+
readonly indexed: false;
|
|
2584
|
+
readonly internalType: "uint256";
|
|
2341
2585
|
}];
|
|
2342
2586
|
readonly anonymous: false;
|
|
2343
2587
|
};
|
|
2344
2588
|
/**
|
|
2345
|
-
* ABI for the
|
|
2589
|
+
* ABI for the SetConsumed event emitted by the Morpho V2 contract.
|
|
2346
2590
|
*/
|
|
2347
2591
|
declare const consumedEvent: {
|
|
2348
2592
|
readonly type: "event";
|
|
2349
|
-
readonly name: "
|
|
2593
|
+
readonly name: "SetConsumed";
|
|
2350
2594
|
readonly inputs: readonly [{
|
|
2351
|
-
readonly name: "
|
|
2595
|
+
readonly name: "caller";
|
|
2596
|
+
readonly type: "address";
|
|
2597
|
+
readonly indexed: true;
|
|
2598
|
+
readonly internalType: "address";
|
|
2599
|
+
}, {
|
|
2600
|
+
readonly name: "onBehalf";
|
|
2352
2601
|
readonly type: "address";
|
|
2353
2602
|
readonly indexed: true;
|
|
2354
2603
|
readonly internalType: "address";
|
|
@@ -2378,9 +2627,9 @@ declare const repayEvent: {
|
|
|
2378
2627
|
readonly internalType: "address";
|
|
2379
2628
|
}, {
|
|
2380
2629
|
readonly name: "id_";
|
|
2381
|
-
readonly type: "
|
|
2630
|
+
readonly type: "bytes32";
|
|
2382
2631
|
readonly indexed: true;
|
|
2383
|
-
readonly internalType: "
|
|
2632
|
+
readonly internalType: "bytes32";
|
|
2384
2633
|
}, {
|
|
2385
2634
|
readonly name: "obligationUnits";
|
|
2386
2635
|
readonly type: "uint256";
|
|
@@ -2407,9 +2656,9 @@ declare const liquidateEvent: {
|
|
|
2407
2656
|
readonly internalType: "address";
|
|
2408
2657
|
}, {
|
|
2409
2658
|
readonly name: "id_";
|
|
2410
|
-
readonly type: "
|
|
2659
|
+
readonly type: "bytes32";
|
|
2411
2660
|
readonly indexed: true;
|
|
2412
|
-
readonly internalType: "
|
|
2661
|
+
readonly internalType: "bytes32";
|
|
2413
2662
|
}, {
|
|
2414
2663
|
readonly name: "collateralIndex";
|
|
2415
2664
|
readonly type: "uint256";
|
|
@@ -2435,6 +2684,11 @@ declare const liquidateEvent: {
|
|
|
2435
2684
|
readonly type: "uint256";
|
|
2436
2685
|
readonly indexed: false;
|
|
2437
2686
|
readonly internalType: "uint256";
|
|
2687
|
+
}, {
|
|
2688
|
+
readonly name: "latestLossIndex";
|
|
2689
|
+
readonly type: "uint256";
|
|
2690
|
+
readonly indexed: false;
|
|
2691
|
+
readonly internalType: "uint256";
|
|
2438
2692
|
}];
|
|
2439
2693
|
readonly anonymous: false;
|
|
2440
2694
|
};
|
|
@@ -2451,9 +2705,9 @@ declare const supplyCollateralEvent: {
|
|
|
2451
2705
|
readonly internalType: "address";
|
|
2452
2706
|
}, {
|
|
2453
2707
|
readonly name: "id_";
|
|
2454
|
-
readonly type: "
|
|
2708
|
+
readonly type: "bytes32";
|
|
2455
2709
|
readonly indexed: true;
|
|
2456
|
-
readonly internalType: "
|
|
2710
|
+
readonly internalType: "bytes32";
|
|
2457
2711
|
}, {
|
|
2458
2712
|
readonly name: "collateral";
|
|
2459
2713
|
readonly type: "address";
|
|
@@ -2485,9 +2739,9 @@ declare const withdrawCollateralEvent: {
|
|
|
2485
2739
|
readonly internalType: "address";
|
|
2486
2740
|
}, {
|
|
2487
2741
|
readonly name: "id_";
|
|
2488
|
-
readonly type: "
|
|
2742
|
+
readonly type: "bytes32";
|
|
2489
2743
|
readonly indexed: true;
|
|
2490
|
-
readonly internalType: "
|
|
2744
|
+
readonly internalType: "bytes32";
|
|
2491
2745
|
}, {
|
|
2492
2746
|
readonly name: "collateral";
|
|
2493
2747
|
readonly type: "address";
|
|
@@ -2759,7 +3013,7 @@ declare class InvalidQuoteError extends BaseError<z$1.ZodError | Error> {
|
|
|
2759
3013
|
constructor(error: z$1.ZodError | Error);
|
|
2760
3014
|
}
|
|
2761
3015
|
declare namespace Tick_d_exports {
|
|
2762
|
-
export { InvalidPriceError, InvalidTickError, MAX_PRICE, TICK_RANGE, priceToTick, tickToPrice };
|
|
3016
|
+
export { InvalidPriceError, InvalidTickError, MAX_PRICE, TICK_RANGE, assetsToObligationUnits, obligationUnitsToAssets, priceToTick, tickToPrice };
|
|
2763
3017
|
}
|
|
2764
3018
|
/** Tick domain supported by Morpho V2. */
|
|
2765
3019
|
declare const TICK_RANGE = 990;
|
|
@@ -2785,6 +3039,20 @@ declare function priceToTick(price: bigint): number;
|
|
|
2785
3039
|
declare namespace priceToTick {
|
|
2786
3040
|
type ErrorType = InvalidPriceError;
|
|
2787
3041
|
}
|
|
3042
|
+
/**
|
|
3043
|
+
* Converts obligation units to assets using the tick price (mulDivDown).
|
|
3044
|
+
* @param obligationUnits - The obligation units to convert.
|
|
3045
|
+
* @param tick - The offer tick.
|
|
3046
|
+
* @returns The equivalent amount in assets.
|
|
3047
|
+
*/
|
|
3048
|
+
declare function obligationUnitsToAssets(obligationUnits: bigint, tick: number): bigint;
|
|
3049
|
+
/**
|
|
3050
|
+
* Converts assets to obligation units using the tick price (mulDivUp).
|
|
3051
|
+
* @param assets - The asset amount to convert.
|
|
3052
|
+
* @param tick - The offer tick.
|
|
3053
|
+
* @returns The equivalent amount in obligation units.
|
|
3054
|
+
*/
|
|
3055
|
+
declare function assetsToObligationUnits(assets: bigint, tick: number): bigint;
|
|
2788
3056
|
declare class InvalidTickError extends BaseError {
|
|
2789
3057
|
readonly name = "Tick.InvalidTickError";
|
|
2790
3058
|
constructor(tick: number);
|
|
@@ -2798,15 +3066,15 @@ declare namespace TradingFee_d_exports {
|
|
|
2798
3066
|
}
|
|
2799
3067
|
/**
|
|
2800
3068
|
* Time breakpoints in seconds for piecewise linear fee interpolation.
|
|
2801
|
-
* Matches on-chain constants: 0d, 1d, 7d, 30d, 90d, 180d.
|
|
3069
|
+
* Matches on-chain constants: 0d, 1d, 7d, 30d, 90d, 180d, 360d.
|
|
2802
3070
|
*/
|
|
2803
|
-
declare const BREAKPOINTS: readonly [0n, 86400n, 604800n, 2592000n, 7776000n, 15552000n];
|
|
3071
|
+
declare const BREAKPOINTS: readonly [0n, 86400n, 604800n, 2592000n, 7776000n, 15552000n, 31104000n];
|
|
2804
3072
|
/** WAD constant (1e18) for fee scaling. */
|
|
2805
3073
|
declare const WAD: bigint;
|
|
2806
|
-
/** Tuple type for the
|
|
2807
|
-
type Fees = readonly [bigint, bigint, bigint, bigint, bigint, bigint];
|
|
3074
|
+
/** Tuple type for the 7 fee values at each breakpoint. */
|
|
3075
|
+
type Fees = readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint];
|
|
2808
3076
|
/**
|
|
2809
|
-
* TradingFee represents a piecewise linear fee curve with
|
|
3077
|
+
* TradingFee represents a piecewise linear fee curve with 7 breakpoints.
|
|
2810
3078
|
* The internal storage mimics on-chain bitmap behavior but uses a struct for clarity.
|
|
2811
3079
|
*/
|
|
2812
3080
|
type TradingFee = {
|
|
@@ -2814,12 +3082,12 @@ type TradingFee = {
|
|
|
2814
3082
|
readonly _fees: Fees;
|
|
2815
3083
|
} & Brand<"TradingFee">;
|
|
2816
3084
|
/**
|
|
2817
|
-
* Create a TradingFee from an activation flag and
|
|
3085
|
+
* Create a TradingFee from an activation flag and 7 fee values.
|
|
2818
3086
|
* @param activated - Whether the fee is active.
|
|
2819
|
-
* @param fees - Tuple of
|
|
3087
|
+
* @param fees - Tuple of 7 fee values in WAD (one per breakpoint: 0d, 1d, 7d, 30d, 90d, 180d, 360d).
|
|
2820
3088
|
* @returns A new TradingFee instance.
|
|
2821
3089
|
* @throws {@link InvalidFeeError} if any fee exceeds WAD (100%).
|
|
2822
|
-
* @throws {@link InvalidFeesLengthError} if fees array doesn't have exactly
|
|
3090
|
+
* @throws {@link InvalidFeesLengthError} if fees array doesn't have exactly 7 elements.
|
|
2823
3091
|
*/
|
|
2824
3092
|
declare function from$9(activated: boolean, fees: Fees): TradingFee;
|
|
2825
3093
|
declare namespace from$9 {
|
|
@@ -2853,7 +3121,7 @@ declare function deactivate(tradingFee: TradingFee): TradingFee;
|
|
|
2853
3121
|
/**
|
|
2854
3122
|
* Get the fee values at each breakpoint.
|
|
2855
3123
|
* @param tradingFee - The TradingFee instance.
|
|
2856
|
-
* @returns The tuple of
|
|
3124
|
+
* @returns The tuple of 7 fee values.
|
|
2857
3125
|
*/
|
|
2858
3126
|
declare function getFees(tradingFee: TradingFee): Fees;
|
|
2859
3127
|
/** Error thrown when a fee value is invalid (negative or exceeds WAD). */
|
|
@@ -2861,7 +3129,7 @@ declare class InvalidFeeError extends BaseError {
|
|
|
2861
3129
|
readonly name = "TradingFee.InvalidFeeError";
|
|
2862
3130
|
constructor(fee: bigint, index: number);
|
|
2863
3131
|
}
|
|
2864
|
-
/** Error thrown when fees array doesn't have exactly
|
|
3132
|
+
/** Error thrown when fees array doesn't have exactly 7 elements. */
|
|
2865
3133
|
declare class InvalidFeesLengthError extends BaseError {
|
|
2866
3134
|
readonly name = "TradingFee.InvalidFeesLengthError";
|
|
2867
3135
|
constructor(length: number);
|
|
@@ -2908,13 +3176,13 @@ declare namespace from$8 {
|
|
|
2908
3176
|
type ReturnType = Transfer;
|
|
2909
3177
|
}
|
|
2910
3178
|
declare namespace Tree_d_exports {
|
|
2911
|
-
export { DecodeError, EncodeError, NormalizedSignatureDomain, Proof, SignatureDomain, SignatureDomainError, Tree, TreeError, VERSION$1 as VERSION, decode, encode, encodeUnsigned, from$7 as from, proofs, signatureDomain, signatureTypes };
|
|
3179
|
+
export { DecodeError, EncodeError, MAX_COMPRESSED_OFFERS_BYTES, MAX_DECOMPRESSED_OFFERS_BYTES, MAX_OFFERS_PER_TREE, NormalizedSignatureDomain, Proof, SignatureDomain, SignatureDomainError, Tree, TreeError, VERSION$1 as VERSION, decode, encode, encodeUnsigned, from$7 as from, proofs, signatureDomain, signatureTypes };
|
|
2912
3180
|
}
|
|
2913
3181
|
/**
|
|
2914
3182
|
* A merkle tree of offers built from offer hashes.
|
|
2915
3183
|
* Constructed via {@link from}. The tree root can be signed for onchain broadcast.
|
|
2916
3184
|
*/
|
|
2917
|
-
type Tree = Compute<
|
|
3185
|
+
type Tree = Compute<SimpleMerkleTree & {
|
|
2918
3186
|
/** The offers in the tree. */offers: Offer[]; /** The root of the tree. */
|
|
2919
3187
|
root: Hex;
|
|
2920
3188
|
}>;
|
|
@@ -2922,7 +3190,10 @@ type Proof = {
|
|
|
2922
3190
|
/** The offer that the proof is for. */offer: Offer; /** The merkle proof path for the offer. */
|
|
2923
3191
|
path: Hex[];
|
|
2924
3192
|
};
|
|
2925
|
-
declare const VERSION$1 =
|
|
3193
|
+
declare const VERSION$1 = 2;
|
|
3194
|
+
declare const MAX_COMPRESSED_OFFERS_BYTES = 1000000;
|
|
3195
|
+
declare const MAX_DECOMPRESSED_OFFERS_BYTES = 4000000;
|
|
3196
|
+
declare const MAX_OFFERS_PER_TREE = 100;
|
|
2926
3197
|
type SignatureDomain = {
|
|
2927
3198
|
/** Chain id used in the EIP-712 domain. */chainId: number | bigint; /** MorphoV2 contract address used as verifying contract. */
|
|
2928
3199
|
verifyingContract: Address;
|
|
@@ -2952,11 +3223,10 @@ declare const signatureTypes: {
|
|
|
2952
3223
|
* Builds a Merkle tree from a list of offers.
|
|
2953
3224
|
*
|
|
2954
3225
|
* Leaves are the offer `hash` values as `bytes32` and are deterministically
|
|
2955
|
-
* ordered
|
|
2956
|
-
* root is stable regardless of the input order.
|
|
3226
|
+
* ordered so that the resulting root is stable regardless of the input order.
|
|
2957
3227
|
*
|
|
2958
3228
|
* @param offers - Offers to include in the tree.
|
|
2959
|
-
* @returns A `
|
|
3229
|
+
* @returns A `SimpleMerkleTree` of offer hashes representing the offers.
|
|
2960
3230
|
* @throws {TreeError} If tree building fails due to offer inconsistencies.
|
|
2961
3231
|
*/
|
|
2962
3232
|
declare const from$7: (offers: Offer[]) => Tree;
|
|
@@ -2964,7 +3234,7 @@ declare const from$7: (offers: Offer[]) => Tree;
|
|
|
2964
3234
|
* Generates merkle proofs for all offers in a tree.
|
|
2965
3235
|
*
|
|
2966
3236
|
* Each proof allows independent verification that an offer is included in the tree
|
|
2967
|
-
* without requiring the full tree.
|
|
3237
|
+
* without requiring the full tree.
|
|
2968
3238
|
*
|
|
2969
3239
|
* @param tree - The {@link Tree} to generate proofs for.
|
|
2970
3240
|
* @returns Array of proofs - {@link Proof}
|
|
@@ -3045,10 +3315,11 @@ declare const encodeUnsigned: (tree: Tree) => Hex;
|
|
|
3045
3315
|
* Returns the tree with separately validated signature and recovered signer address.
|
|
3046
3316
|
*
|
|
3047
3317
|
* Validation order:
|
|
3048
|
-
* 1. Version
|
|
3318
|
+
* 1. Version and static size checks
|
|
3049
3319
|
* 2. Signature verification (fail-fast, before decompression)
|
|
3050
|
-
* 3.
|
|
3051
|
-
* 4.
|
|
3320
|
+
* 3. Streaming decompression with byte cap
|
|
3321
|
+
* 4. JSON array + offer count checks
|
|
3322
|
+
* 5. Root verification (computed from offers vs embedded root)
|
|
3052
3323
|
*
|
|
3053
3324
|
* @example
|
|
3054
3325
|
* ```typescript
|
|
@@ -3098,30 +3369,28 @@ declare class SignatureDomainError extends BaseError {
|
|
|
3098
3369
|
constructor(reason: string);
|
|
3099
3370
|
}
|
|
3100
3371
|
//#endregion
|
|
3101
|
-
//#region src/indexer/collectors/
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
readonly interval: number;
|
|
3111
|
-
/** Start collecting data from external sources.
|
|
3112
|
-
* @yields The last block number processed by the collector.
|
|
3113
|
-
*/
|
|
3114
|
-
collect: () => AsyncGenerator<number, void, void>;
|
|
3115
|
-
};
|
|
3372
|
+
//#region src/indexer/collectors/contracts.d.ts
|
|
3373
|
+
/**
|
|
3374
|
+
* Canonical collector names handled by the indexer runtime.
|
|
3375
|
+
*/
|
|
3376
|
+
declare const collectorNames: readonly ["offers", "morpho_v2", "positions", "prices"];
|
|
3377
|
+
/**
|
|
3378
|
+
* Canonical collector name type.
|
|
3379
|
+
*/
|
|
3380
|
+
type CollectorName = (typeof collectorNames)[number];
|
|
3116
3381
|
//#endregion
|
|
3117
3382
|
//#region src/database/domains/Blocks.d.ts
|
|
3118
3383
|
type ChainState = {
|
|
3119
|
-
chainId: Id;
|
|
3120
|
-
blockNumber: number;
|
|
3121
|
-
epoch: bigint;
|
|
3384
|
+
/** Chain identifier. */chainId: Id; /** Latest canonical block number persisted for this chain. */
|
|
3385
|
+
blockNumber: number; /** Current chain epoch fencing token. */
|
|
3386
|
+
epoch: bigint; /** Serialized canonical checkpoint ring used by minimal runtime restart hydration. */
|
|
3387
|
+
checkpoints: string; /** Canonical tip hash corresponding to `blockNumber` when available. */
|
|
3388
|
+
tipHash: string | null; /** Latest finalized block number persisted for deep reorg recovery. */
|
|
3389
|
+
finalizedBlockNumber: number | null; /** Finalized block hash corresponding to `finalizedBlockNumber` when available. */
|
|
3390
|
+
finalizedBlockHash: string | null;
|
|
3122
3391
|
};
|
|
3123
3392
|
type CollectorState = {
|
|
3124
|
-
collectorName:
|
|
3393
|
+
collectorName: CollectorName;
|
|
3125
3394
|
chainId: Id;
|
|
3126
3395
|
blockNumber: number;
|
|
3127
3396
|
epoch: bigint;
|
|
@@ -3132,17 +3401,35 @@ type ChainSnapshot = ChainState & {
|
|
|
3132
3401
|
type CollectorSnapshot = CollectorState & {
|
|
3133
3402
|
updatedAt: Date;
|
|
3134
3403
|
};
|
|
3135
|
-
type
|
|
3404
|
+
type InitChainParameters = {
|
|
3136
3405
|
chainId: Id;
|
|
3137
|
-
collectorName: Name;
|
|
3138
3406
|
};
|
|
3139
|
-
type
|
|
3407
|
+
type InitCollectorParameters = {
|
|
3140
3408
|
chainId: Id;
|
|
3141
|
-
|
|
3142
|
-
|
|
3409
|
+
collectorName: CollectorName;
|
|
3410
|
+
};
|
|
3411
|
+
type Init = {
|
|
3412
|
+
(parameters: InitChainParameters): Promise<{
|
|
3413
|
+
chain: ChainState;
|
|
3414
|
+
}>;
|
|
3415
|
+
(parameters: InitCollectorParameters): Promise<{
|
|
3416
|
+
chain: ChainState;
|
|
3417
|
+
collector: CollectorState;
|
|
3418
|
+
}>;
|
|
3419
|
+
};
|
|
3420
|
+
type AdvanceChainParameters = {
|
|
3421
|
+
/** Chain identifier. */chainId: Id; /** Latest canonical block number. */
|
|
3422
|
+
blockNumber: number; /** Current chain epoch fencing token. */
|
|
3423
|
+
epoch: bigint; /** Optional serialized checkpoint ring; defaults to preserving the current value. */
|
|
3424
|
+
checkpoints?: string; /** Optional canonical tip hash; defaults to preserving the current value. */
|
|
3425
|
+
tipHash?: string | null; /** Optional finalized block number; defaults to preserving the current value. */
|
|
3426
|
+
finalizedBlockNumber?: number | null; /** Optional finalized block hash; defaults to preserving the current value. */
|
|
3427
|
+
finalizedBlockHash?: string | null; /** Optional CAS epoch guard for stale-writer rejection. */
|
|
3428
|
+
expectedEpoch?: bigint; /** Optional CAS tip-hash guard for stale-writer rejection. */
|
|
3429
|
+
expectedTipHash?: string | null;
|
|
3143
3430
|
};
|
|
3144
3431
|
type AdvanceCollectorParameters = {
|
|
3145
|
-
collectorName:
|
|
3432
|
+
collectorName: CollectorName;
|
|
3146
3433
|
chainId: Id;
|
|
3147
3434
|
blockNumber: number;
|
|
3148
3435
|
epoch: bigint;
|
|
@@ -3151,17 +3438,14 @@ type HandleReorgParameters = {
|
|
|
3151
3438
|
chainId: Id;
|
|
3152
3439
|
blockNumber: number;
|
|
3153
3440
|
epoch: bigint;
|
|
3154
|
-
collectorNames?:
|
|
3441
|
+
collectorNames?: CollectorName[];
|
|
3155
3442
|
};
|
|
3156
3443
|
type BlocksDomain = {
|
|
3157
|
-
/** Initialize
|
|
3158
|
-
chain: ChainState;
|
|
3159
|
-
collector: CollectorState;
|
|
3160
|
-
}>; /** Return chain state, failing if it has not been initialized yet. */
|
|
3444
|
+
/** Initialize chain state, and optionally collector state, seeding rows when missing. */init: Init; /** Return chain state, failing if it has not been initialized yet. */
|
|
3161
3445
|
getChain: (chainId: Id) => Promise<ChainState>; /** Return collector state, failing if it has not been initialized yet. */
|
|
3162
3446
|
getCollector: (parameters: {
|
|
3163
3447
|
chainId: Id;
|
|
3164
|
-
collectorName:
|
|
3448
|
+
collectorName: CollectorName;
|
|
3165
3449
|
}) => Promise<CollectorState>; /** Return chain state rows, optionally filtered by chain id. */
|
|
3166
3450
|
getChains: (parameters?: {
|
|
3167
3451
|
chainId?: Id;
|
|
@@ -3174,7 +3458,7 @@ type BlocksDomain = {
|
|
|
3174
3458
|
handleReorg: (parameters: HandleReorgParameters) => Promise<void>;
|
|
3175
3459
|
};
|
|
3176
3460
|
declare namespace Logger_d_exports {
|
|
3177
|
-
export { LogContext, LogEntry, LogFn, LogLevel, LogLevelValues, Logger, defaultLogger, getLogger, runWithLogContext, runWithLogger, silentLogger };
|
|
3461
|
+
export { LogContext, LogEntry, LogFn, LogLevel, LogLevelValues, Logger, defaultLogger, getLogger, isLogFnEnabled, runWithLogContext, runWithLogger, silentLogger };
|
|
3178
3462
|
}
|
|
3179
3463
|
declare const LogLevelValues: readonly ["trace", "debug", "info", "warn", "error", "fatal", "silent"];
|
|
3180
3464
|
type LogLevel = (typeof LogLevelValues)[number];
|
|
@@ -3193,6 +3477,12 @@ type Logger = {
|
|
|
3193
3477
|
};
|
|
3194
3478
|
declare function defaultLogger(minLevel?: LogLevel, pretty?: boolean): Logger;
|
|
3195
3479
|
declare function silentLogger(): Logger;
|
|
3480
|
+
/**
|
|
3481
|
+
* Check whether a log function is configured to emit entries.
|
|
3482
|
+
* @param logFn - Logger method to inspect.
|
|
3483
|
+
* @returns `true` when the function is enabled.
|
|
3484
|
+
*/
|
|
3485
|
+
declare function isLogFnEnabled(logFn: LogFn): boolean;
|
|
3196
3486
|
declare function runWithLogger<T>(logger: Logger, fn: () => Promise<T>): Promise<T>;
|
|
3197
3487
|
/**
|
|
3198
3488
|
* Run a function with additional context fields attached to every log entry emitted via {@link getLogger}.
|
|
@@ -3217,11 +3507,10 @@ type Row = {
|
|
|
3217
3507
|
hash: Hex;
|
|
3218
3508
|
obligationId: Hex;
|
|
3219
3509
|
maker: Address;
|
|
3220
|
-
assets: bigint;
|
|
3221
3510
|
obligationUnits: bigint;
|
|
3222
|
-
obligationShares: bigint;
|
|
3223
3511
|
tick: number;
|
|
3224
3512
|
maturity: Maturity;
|
|
3513
|
+
rcfThreshold: bigint;
|
|
3225
3514
|
expiry: number;
|
|
3226
3515
|
start: number;
|
|
3227
3516
|
group: Hex;
|
|
@@ -3235,10 +3524,14 @@ type Row = {
|
|
|
3235
3524
|
data: Hex;
|
|
3236
3525
|
};
|
|
3237
3526
|
receiverIfMakerIsSeller: Address;
|
|
3527
|
+
exitOnly: boolean;
|
|
3238
3528
|
consumed: bigint;
|
|
3239
3529
|
available: bigint;
|
|
3240
3530
|
takeable: bigint;
|
|
3241
3531
|
blockNumber: number;
|
|
3532
|
+
root?: Hex;
|
|
3533
|
+
signature?: Hex;
|
|
3534
|
+
proof?: Hex[];
|
|
3242
3535
|
};
|
|
3243
3536
|
type OfferReference$1 = {
|
|
3244
3537
|
hash: Hex;
|
|
@@ -3295,7 +3588,7 @@ declare namespace get$5 {
|
|
|
3295
3588
|
};
|
|
3296
3589
|
type Level = {
|
|
3297
3590
|
/** The offer tick for this level */tick: number; /** Sum of takeable amounts at this tick */
|
|
3298
|
-
|
|
3591
|
+
obligationUnits: bigint; /** Number of offers at this tick */
|
|
3299
3592
|
count: number;
|
|
3300
3593
|
};
|
|
3301
3594
|
type ReturnType = {
|
|
@@ -3956,15 +4249,77 @@ type ClientConfig = {
|
|
|
3956
4249
|
* @returns An HTTP-backed gatekeeper client. {@link GatekeeperClient}
|
|
3957
4250
|
*/
|
|
3958
4251
|
declare function createHttpClient(config: ClientConfig): GatekeeperClient;
|
|
4252
|
+
//#endregion
|
|
4253
|
+
//#region src/indexer/engine/operation.d.ts
|
|
4254
|
+
/**
|
|
4255
|
+
* Chain view snapshot returned by the chain sync coroutine.
|
|
4256
|
+
*/
|
|
4257
|
+
type ChainView = {
|
|
4258
|
+
/** Current observed head. */head: number; /** Canonical target for collectors this tick. */
|
|
4259
|
+
target: number; /** Canonical epoch after sync/reorg handling. */
|
|
4260
|
+
epoch: number; /** Rewind point when a reorg is detected. */
|
|
4261
|
+
rewindTo?: number;
|
|
4262
|
+
};
|
|
4263
|
+
//#endregion
|
|
4264
|
+
//#region src/indexer/engine/runtime.d.ts
|
|
4265
|
+
/**
|
|
4266
|
+
* Minimal runtime API.
|
|
4267
|
+
*
|
|
4268
|
+
* Role:
|
|
4269
|
+
* - run one deterministic indexing tick end-to-end;
|
|
4270
|
+
* - own chain sync, reorg reconciliation, and collector stepping order;
|
|
4271
|
+
* - centralize retry/backoff and pending-op resume semantics.
|
|
4272
|
+
*/
|
|
4273
|
+
type Runtime = {
|
|
4274
|
+
/**
|
|
4275
|
+
* Execute one deterministic runtime tick.
|
|
4276
|
+
* Runs chain sync, applies any reorg rewinds, and advances each collector once.
|
|
4277
|
+
*/
|
|
4278
|
+
tick: () => Promise<ChainView>;
|
|
4279
|
+
/**
|
|
4280
|
+
* Return the runtime-recommended wait time before the next tick.
|
|
4281
|
+
*
|
|
4282
|
+
* This captures collector-specific sleep scheduling and is clamped by `heartbeatMs`
|
|
4283
|
+
* when configured.
|
|
4284
|
+
*/
|
|
4285
|
+
nextWakeInMs: () => number;
|
|
4286
|
+
};
|
|
4287
|
+
//#endregion
|
|
4288
|
+
//#region src/indexer/Observer.d.ts
|
|
4289
|
+
type CommitEntityOperation = "inserted" | "upserted" | "deleted" | "ignored";
|
|
4290
|
+
type CommitAppliedStat = {
|
|
4291
|
+
collector: string;
|
|
4292
|
+
entity: string;
|
|
4293
|
+
operation: CommitEntityOperation;
|
|
4294
|
+
count: number;
|
|
4295
|
+
};
|
|
4296
|
+
type RuntimeEventObserver$1 = (parameters: {
|
|
4297
|
+
event: string;
|
|
4298
|
+
fields?: Record<string, unknown>;
|
|
4299
|
+
}) => void;
|
|
4300
|
+
type CommitAppliedObserver$1 = (parameters: {
|
|
4301
|
+
collectors: string[];
|
|
4302
|
+
stats: CommitAppliedStat[];
|
|
4303
|
+
committedAtUnixMs: number;
|
|
4304
|
+
}) => void;
|
|
4305
|
+
type ChainObserver = {
|
|
4306
|
+
observeRuntime: (runtime: Runtime) => Runtime;
|
|
4307
|
+
onRuntimeEvent: RuntimeEventObserver$1;
|
|
4308
|
+
onCommitApplied: CommitAppliedObserver$1;
|
|
4309
|
+
};
|
|
3959
4310
|
declare namespace Indexer_d_exports {
|
|
3960
|
-
export { Indexer, IndexerConfig, create$3 as create, from$6 as from };
|
|
4311
|
+
export { CONNECTION_ERROR_ESCALATION_THRESHOLD, CommitAppliedObserver, CreateParameters$1 as CreateParameters, Indexer, IndexerConfig, RuntimeConfig, RuntimeEventObserver, RuntimeObserver, buildRuntime, create$3 as create, from$6 as from };
|
|
3961
4312
|
}
|
|
4313
|
+
declare const CONNECTION_ERROR_ESCALATION_THRESHOLD = 20;
|
|
3962
4314
|
type Indexer = {
|
|
3963
4315
|
start: () => () => void;
|
|
3964
4316
|
next: () => Promise<void>;
|
|
3965
4317
|
return: () => Promise<void>;
|
|
3966
4318
|
};
|
|
3967
|
-
type
|
|
4319
|
+
type RuntimeEventObserver = RuntimeEventObserver$1;
|
|
4320
|
+
type CommitAppliedObserver = CommitAppliedObserver$1;
|
|
4321
|
+
type RuntimeObserver = Pick<ChainObserver, "observeRuntime" | "onRuntimeEvent" | "onCommitApplied">;
|
|
4322
|
+
type RuntimeConfig<client extends PublicClient<Transport, Chain$1, Account | undefined>> = {
|
|
3968
4323
|
client: client;
|
|
3969
4324
|
db: Database;
|
|
3970
4325
|
gatekeeper: GatekeeperClient;
|
|
@@ -3973,20 +4328,51 @@ type IndexerConfig<client extends PublicClient<Transport, Chain$1, Account | und
|
|
|
3973
4328
|
maxBlockNumber?: number;
|
|
3974
4329
|
blockWindow?: number;
|
|
3975
4330
|
retryAttempts?: number;
|
|
3976
|
-
retryDelayMs?: number;
|
|
4331
|
+
retryDelayMs?: number; /** Maximum concurrent read/execute operations issued by the runtime. */
|
|
4332
|
+
maxParallelRpc?: number; /** Maximum concurrent runtime commits (chain + collector applies). */
|
|
4333
|
+
maxParallelCommits?: number; /** Adapter pending-resolution budget per commit. */
|
|
4334
|
+
maxPendingResolutionsPerCommit?: number; /** Pending item age threshold (blocks) before ignore eligibility. */
|
|
4335
|
+
pendingIgnoreAfterBlocks?: number; /** Pending item attempt threshold before ignore eligibility. */
|
|
4336
|
+
pendingIgnoreAfterAttempts?: number;
|
|
3977
4337
|
};
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
4338
|
+
type IndexerConfig<client extends PublicClient<Transport, Chain$1, Account | undefined>> = RuntimeConfig<client> & {
|
|
4339
|
+
/**
|
|
4340
|
+
* Runtime tick burst count per `next()` call.
|
|
4341
|
+
* Defaults to `2` to reduce catch-up latency while preserving backward behavior.
|
|
4342
|
+
*/
|
|
4343
|
+
ticksPerNext?: number; /** Optional runtime observer hook for tick and runtime-event monitoring. */
|
|
4344
|
+
observer?: RuntimeObserver;
|
|
4345
|
+
};
|
|
4346
|
+
type CreateParameters$1<client extends PublicClient<Transport, Chain$1, Account | undefined>> = {
|
|
3981
4347
|
client: client;
|
|
3982
|
-
|
|
4348
|
+
runtime: Runtime;
|
|
4349
|
+
ticksPerNext?: number;
|
|
4350
|
+
};
|
|
4351
|
+
/**
|
|
4352
|
+
* Build one indexer runtime for a chain configuration.
|
|
4353
|
+
* @param config - Runtime configuration.
|
|
4354
|
+
* @returns Initialized runtime.
|
|
4355
|
+
*/
|
|
4356
|
+
declare function buildRuntime<client extends PublicClient<Transport, Chain$1, Account | undefined>>(config: RuntimeConfig<client>): Runtime;
|
|
4357
|
+
/**
|
|
4358
|
+
* Build and start an indexer host for one chain.
|
|
4359
|
+
* @param config - Indexer configuration.
|
|
4360
|
+
* @returns Indexer host.
|
|
4361
|
+
*/
|
|
4362
|
+
declare function from$6<client extends PublicClient<Transport, Chain$1, Account | undefined>>(config: IndexerConfig<client>): Indexer;
|
|
4363
|
+
/**
|
|
4364
|
+
* Create an indexer host around a prepared runtime.
|
|
4365
|
+
* @param parameters - Indexer host dependencies.
|
|
4366
|
+
* @returns Indexer host.
|
|
4367
|
+
*/
|
|
4368
|
+
declare function create$3<client extends PublicClient<Transport, Chain$1, Account | undefined>>(parameters: CreateParameters$1<client>): Indexer;
|
|
3983
4369
|
declare namespace Health_d_exports {
|
|
3984
4370
|
export { ChainHealth$1 as ChainHealth, CollectorHealth$1 as CollectorHealth, CollectorHealthStatus, HealthService, HealthServiceParameters, MissingCollector, RouterHealth, RouterStatus, create$2 as create };
|
|
3985
4371
|
}
|
|
3986
4372
|
type CollectorHealthStatus = "live" | "lagging" | "unknown";
|
|
3987
4373
|
type RouterStatus = "live" | "syncing";
|
|
3988
4374
|
type CollectorHealth$1 = {
|
|
3989
|
-
name:
|
|
4375
|
+
name: CollectorName;
|
|
3990
4376
|
chainId: Id;
|
|
3991
4377
|
blockNumber: number | null;
|
|
3992
4378
|
updatedAt: string | null;
|
|
@@ -4004,7 +4390,7 @@ type ChainHealth$1 = {
|
|
|
4004
4390
|
};
|
|
4005
4391
|
type MissingCollector = {
|
|
4006
4392
|
chainId: Id;
|
|
4007
|
-
name:
|
|
4393
|
+
name: CollectorName;
|
|
4008
4394
|
};
|
|
4009
4395
|
type RouterHealth = {
|
|
4010
4396
|
status: RouterStatus;
|
|
@@ -4021,7 +4407,8 @@ type HealthService = {
|
|
|
4021
4407
|
type HealthServiceParameters = {
|
|
4022
4408
|
db: Database; /** Maximum number of blocks a collector can lag behind its chain before being considered lagging. */
|
|
4023
4409
|
maxAllowedLag?: number; /** Map of chainId to client for fetching remote block numbers. */
|
|
4024
|
-
healthClients?: Map<Id, Client>; /**
|
|
4410
|
+
healthClients?: Map<Id, Client>; /** Timeout guard for each remote head RPC call. */
|
|
4411
|
+
remoteBlockTimeoutMs?: number; /** Chain registry for deriving expected initialization state. */
|
|
4025
4412
|
chainRegistry?: ChainRegistry;
|
|
4026
4413
|
};
|
|
4027
4414
|
type Snapshot = {
|
|
@@ -4037,45 +4424,44 @@ type Snapshot = {
|
|
|
4037
4424
|
*/
|
|
4038
4425
|
declare function create$2(parameters: HealthServiceParameters): HealthService;
|
|
4039
4426
|
//#endregion
|
|
4040
|
-
//#region src/
|
|
4041
|
-
|
|
4042
|
-
|
|
4427
|
+
//#region src/observability/HttpRequestMetrics.d.ts
|
|
4428
|
+
/**
|
|
4429
|
+
* A completed HTTP request observation.
|
|
4430
|
+
*/
|
|
4431
|
+
type Observation = {
|
|
4432
|
+
component: "api" | "gatekeeper";
|
|
4433
|
+
method: string;
|
|
4434
|
+
route: string;
|
|
4435
|
+
statusCode: number;
|
|
4436
|
+
durationMs: number;
|
|
4043
4437
|
};
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4438
|
+
/**
|
|
4439
|
+
* HTTP request metrics collector.
|
|
4440
|
+
*/
|
|
4441
|
+
type HttpRequestMetrics = {
|
|
4442
|
+
observe: (observation: Observation) => void;
|
|
4443
|
+
render: () => Promise<string>;
|
|
4049
4444
|
};
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
port: number;
|
|
4055
|
-
chainRegistry: ChainRegistry;
|
|
4445
|
+
//#endregion
|
|
4446
|
+
//#region src/observability/SyncMetrics.d.ts
|
|
4447
|
+
type MetricsService = {
|
|
4448
|
+
getPrometheusMetrics: () => Promise<string>;
|
|
4056
4449
|
};
|
|
4057
|
-
declare function create$1(params: CreateParameters): RouterApi;
|
|
4058
|
-
/**
|
|
4059
|
-
* Create the router API Hono app with all routes and middleware configured.
|
|
4060
|
-
* @param parameters - API construction parameters.
|
|
4061
|
-
* @returns Configured Hono app instance.
|
|
4062
|
-
*/
|
|
4063
|
-
declare function createApp(parameters: CreateParameters): Hono;
|
|
4064
4450
|
declare namespace BookResponse_d_exports {
|
|
4065
|
-
export { BookLevelResponse, from$
|
|
4451
|
+
export { BookLevelResponse, from$5 as from };
|
|
4066
4452
|
}
|
|
4067
4453
|
type BookLevelResponse = {
|
|
4068
4454
|
tick: number;
|
|
4069
4455
|
price: string;
|
|
4070
|
-
|
|
4456
|
+
obligation_units: string;
|
|
4071
4457
|
count: number;
|
|
4072
4458
|
};
|
|
4073
4459
|
type Input$1 = {
|
|
4074
4460
|
tick: number;
|
|
4075
|
-
|
|
4461
|
+
obligationUnits: bigint;
|
|
4076
4462
|
count: number;
|
|
4077
4463
|
};
|
|
4078
|
-
declare function from$
|
|
4464
|
+
declare function from$5(level: Input$1): BookLevelResponse;
|
|
4079
4465
|
//#endregion
|
|
4080
4466
|
//#region src/api/Schema/health.d.ts
|
|
4081
4467
|
declare const CollectorHealth: z.ZodObject<{
|
|
@@ -4790,7 +5176,7 @@ interface components {
|
|
|
4790
5176
|
* @example 500000000000000000
|
|
4791
5177
|
*/
|
|
4792
5178
|
price: string; /** @example 369216000000000000000000 */
|
|
4793
|
-
|
|
5179
|
+
obligation_units: string; /** @example 5 */
|
|
4794
5180
|
count: number;
|
|
4795
5181
|
};
|
|
4796
5182
|
BadRequestResponse: {
|
|
@@ -4908,16 +5294,16 @@ interface components {
|
|
|
4908
5294
|
* {
|
|
4909
5295
|
* "token": "0x34Cf890dB685FC536E05652FB41f02090c3fb751",
|
|
4910
5296
|
* "lltv": "860000000000000000",
|
|
5297
|
+
* "max_lif": "0",
|
|
4911
5298
|
* "oracle": "0x45093658BE7f90B63D7c359e8f408e503c2D9401"
|
|
4912
5299
|
* }
|
|
4913
5300
|
* ],
|
|
4914
|
-
* "maturity": 1761922799
|
|
5301
|
+
* "maturity": 1761922799,
|
|
5302
|
+
* "rcf_threshold": "0"
|
|
4915
5303
|
* },
|
|
4916
5304
|
* "buy": false,
|
|
4917
5305
|
* "maker": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
4918
|
-
* "
|
|
4919
|
-
* "obligation_units": "0",
|
|
4920
|
-
* "obligation_shares": "0",
|
|
5306
|
+
* "obligation_units": "369216000000000000000000",
|
|
4921
5307
|
* "start": 1761922790,
|
|
4922
5308
|
* "expiry": 1761922799,
|
|
4923
5309
|
* "tick": 495,
|
|
@@ -4925,7 +5311,8 @@ interface components {
|
|
|
4925
5311
|
* "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
4926
5312
|
* "callback": "0x0000000000000000000000000000000000000000",
|
|
4927
5313
|
* "callback_data": "0x",
|
|
4928
|
-
* "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
|
|
5314
|
+
* "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
5315
|
+
* "exit_only": false
|
|
4929
5316
|
* },
|
|
4930
5317
|
* "offer_hash": "0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427",
|
|
4931
5318
|
* "obligation_id": "0x25690ae1aee324a005be565f3bcdd16dbf8daf79",
|
|
@@ -4953,16 +5340,16 @@ interface components {
|
|
|
4953
5340
|
* {
|
|
4954
5341
|
* "token": "0x34Cf890dB685FC536E05652FB41f02090c3fb751",
|
|
4955
5342
|
* "lltv": "860000000000000000",
|
|
5343
|
+
* "max_lif": "0",
|
|
4956
5344
|
* "oracle": "0x45093658BE7f90B63D7c359e8f408e503c2D9401"
|
|
4957
5345
|
* }
|
|
4958
5346
|
* ],
|
|
4959
|
-
* "maturity": 1761922799
|
|
5347
|
+
* "maturity": 1761922799,
|
|
5348
|
+
* "rcf_threshold": "0"
|
|
4960
5349
|
* },
|
|
4961
5350
|
* "buy": false,
|
|
4962
5351
|
* "maker": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
4963
|
-
* "
|
|
4964
|
-
* "obligation_units": "0",
|
|
4965
|
-
* "obligation_shares": "0",
|
|
5352
|
+
* "obligation_units": "369216000000000000000000",
|
|
4966
5353
|
* "start": 1761922790,
|
|
4967
5354
|
* "expiry": 1761922799,
|
|
4968
5355
|
* "tick": 495,
|
|
@@ -4970,7 +5357,8 @@ interface components {
|
|
|
4970
5357
|
* "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
4971
5358
|
* "callback": "0x0000000000000000000000000000000000000000",
|
|
4972
5359
|
* "callback_data": "0x",
|
|
4973
|
-
* "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
|
|
5360
|
+
* "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
5361
|
+
* "exit_only": false
|
|
4974
5362
|
* }
|
|
4975
5363
|
*/
|
|
4976
5364
|
offer: components["schemas"]["OfferDataResponse"]; /** @example 0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427 */
|
|
@@ -4998,18 +5386,18 @@ interface components {
|
|
|
4998
5386
|
* {
|
|
4999
5387
|
* "token": "0x34Cf890dB685FC536E05652FB41f02090c3fb751",
|
|
5000
5388
|
* "lltv": "860000000000000000",
|
|
5389
|
+
* "max_lif": "0",
|
|
5001
5390
|
* "oracle": "0x45093658BE7f90B63D7c359e8f408e503c2D9401"
|
|
5002
5391
|
* }
|
|
5003
5392
|
* ],
|
|
5004
|
-
* "maturity": 1761922799
|
|
5393
|
+
* "maturity": 1761922799,
|
|
5394
|
+
* "rcf_threshold": "0"
|
|
5005
5395
|
* }
|
|
5006
5396
|
*/
|
|
5007
5397
|
obligation: components["schemas"]["ObligationOfferResponse"]; /** @example false */
|
|
5008
5398
|
buy: boolean; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
|
|
5009
5399
|
maker: string; /** @example 369216000000000000000000 */
|
|
5010
|
-
|
|
5011
|
-
obligation_units: string; /** @example 0 */
|
|
5012
|
-
obligation_shares: string; /** @example 1761922790 */
|
|
5400
|
+
obligation_units: string; /** @example 1761922790 */
|
|
5013
5401
|
start: number; /** @example 1761922799 */
|
|
5014
5402
|
expiry: number; /** @example 495 */
|
|
5015
5403
|
tick: number; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
|
|
@@ -5017,7 +5405,8 @@ interface components {
|
|
|
5017
5405
|
session: string; /** @example 0x0000000000000000000000000000000000000000 */
|
|
5018
5406
|
callback: string; /** @example 0x */
|
|
5019
5407
|
callback_data: string; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
|
|
5020
|
-
receiver_if_maker_is_seller: string;
|
|
5408
|
+
receiver_if_maker_is_seller: string; /** @example false */
|
|
5409
|
+
exit_only: boolean;
|
|
5021
5410
|
};
|
|
5022
5411
|
ObligationOfferResponse: {
|
|
5023
5412
|
/** @example 0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078 */loan_token: string;
|
|
@@ -5026,16 +5415,19 @@ interface components {
|
|
|
5026
5415
|
* {
|
|
5027
5416
|
* "token": "0x34Cf890dB685FC536E05652FB41f02090c3fb751",
|
|
5028
5417
|
* "lltv": "860000000000000000",
|
|
5418
|
+
* "max_lif": "0",
|
|
5029
5419
|
* "oracle": "0x45093658BE7f90B63D7c359e8f408e503c2D9401"
|
|
5030
5420
|
* }
|
|
5031
5421
|
* ]
|
|
5032
5422
|
*/
|
|
5033
5423
|
collaterals: components["schemas"]["CollateralResponse"][]; /** @example 1761922799 */
|
|
5034
|
-
maturity: number;
|
|
5424
|
+
maturity: number; /** @example 0 */
|
|
5425
|
+
rcf_threshold: string;
|
|
5035
5426
|
};
|
|
5036
5427
|
CollateralResponse: {
|
|
5037
5428
|
/** @example 0x34Cf890dB685FC536E05652FB41f02090c3fb751 */token: string; /** @example 860000000000000000 */
|
|
5038
|
-
lltv: string; /** @example
|
|
5429
|
+
lltv: string; /** @example 0 */
|
|
5430
|
+
max_lif: string; /** @example 0x45093658BE7f90B63D7c359e8f408e503c2D9401 */
|
|
5039
5431
|
oracle: string;
|
|
5040
5432
|
};
|
|
5041
5433
|
ObligationListResponse: {
|
|
@@ -5048,7 +5440,8 @@ interface components {
|
|
|
5048
5440
|
chain_id: number; /** @example 0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078 */
|
|
5049
5441
|
loan_token: string;
|
|
5050
5442
|
collaterals: components["schemas"]["CollateralResponse"][]; /** @example 1761922800 */
|
|
5051
|
-
maturity: number;
|
|
5443
|
+
maturity: number; /** @example 0 */
|
|
5444
|
+
rcf_threshold: string;
|
|
5052
5445
|
ask: components["schemas"]["AskResponse"];
|
|
5053
5446
|
bid: components["schemas"]["BidResponse"];
|
|
5054
5447
|
};
|
|
@@ -5172,7 +5565,7 @@ interface components {
|
|
|
5172
5565
|
* "chain_id": 1,
|
|
5173
5566
|
* "contract": "0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078",
|
|
5174
5567
|
* "user": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
5175
|
-
* "obligation_id": "
|
|
5568
|
+
* "obligation_id": "0x12590ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9f67",
|
|
5176
5569
|
* "reserved": "200000000000000000000",
|
|
5177
5570
|
* "block_number": 21345678
|
|
5178
5571
|
* }
|
|
@@ -5186,7 +5579,7 @@ interface components {
|
|
|
5186
5579
|
user: string;
|
|
5187
5580
|
/**
|
|
5188
5581
|
* @description Obligation id this reserved amount belongs to, or null if no lots exist.
|
|
5189
|
-
* @example
|
|
5582
|
+
* @example 0x12590ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9f67
|
|
5190
5583
|
*/
|
|
5191
5584
|
obligation_id: string | null; /** @example 200000000000000000000 */
|
|
5192
5585
|
reserved: string; /** @example 21345678 */
|
|
@@ -5202,11 +5595,10 @@ interface components {
|
|
|
5202
5595
|
};
|
|
5203
5596
|
ValidateOfferRequest: {
|
|
5204
5597
|
/** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */maker: string; /** @example 369216000000000000000000 */
|
|
5205
|
-
|
|
5206
|
-
obligation_units?: string; /** @example 0 */
|
|
5207
|
-
obligation_shares?: string; /** @example 495 */
|
|
5598
|
+
obligation_units?: string; /** @example 495 */
|
|
5208
5599
|
tick: number; /** @example 1761922799 */
|
|
5209
|
-
maturity: number; /** @example
|
|
5600
|
+
maturity: number; /** @example 0 */
|
|
5601
|
+
rcf_threshold: string; /** @example 1761922799 */
|
|
5210
5602
|
expiry: number; /** @example 1761922790 */
|
|
5211
5603
|
start: number; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
|
|
5212
5604
|
group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
|
|
@@ -5218,7 +5610,8 @@ interface components {
|
|
|
5218
5610
|
* {
|
|
5219
5611
|
* "asset": "0x34Cf890dB685FC536E05652FB41f02090c3fb751",
|
|
5220
5612
|
* "oracle": "0x45093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
5221
|
-
* "lltv": "860000000000000000"
|
|
5613
|
+
* "lltv": "860000000000000000",
|
|
5614
|
+
* "max_lif": "0"
|
|
5222
5615
|
* }
|
|
5223
5616
|
* ]
|
|
5224
5617
|
*/
|
|
@@ -5230,12 +5623,14 @@ interface components {
|
|
|
5230
5623
|
* }
|
|
5231
5624
|
*/
|
|
5232
5625
|
callback: components["schemas"]["ValidateCallbackRequest"]; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
|
|
5233
|
-
receiver_if_maker_is_seller: string;
|
|
5626
|
+
receiver_if_maker_is_seller: string; /** @example false */
|
|
5627
|
+
exit_only?: boolean;
|
|
5234
5628
|
};
|
|
5235
5629
|
ValidateCollateralRequest: {
|
|
5236
5630
|
/** @example 0x34Cf890dB685FC536E05652FB41f02090c3fb751 */asset: string; /** @example 0x45093658BE7f90B63D7c359e8f408e503c2D9401 */
|
|
5237
5631
|
oracle: string; /** @example 860000000000000000 */
|
|
5238
|
-
lltv: string;
|
|
5632
|
+
lltv: string; /** @example 0 */
|
|
5633
|
+
max_lif: string;
|
|
5239
5634
|
};
|
|
5240
5635
|
ValidateCallbackRequest: {
|
|
5241
5636
|
/** @example 0x0000000000000000000000000000000000000000 */address: string; /** @example 0x */
|
|
@@ -5266,7 +5661,7 @@ interface components {
|
|
|
5266
5661
|
pathItems: never;
|
|
5267
5662
|
}
|
|
5268
5663
|
declare namespace ObligationResponse_d_exports {
|
|
5269
|
-
export { ObligationResponse, from$
|
|
5664
|
+
export { ObligationResponse, from$4 as from };
|
|
5270
5665
|
}
|
|
5271
5666
|
type ObligationResponse = paths["/v1/obligations"]["get"]["responses"]["200"]["content"]["application/json"]["data"][number];
|
|
5272
5667
|
/**
|
|
@@ -5277,20 +5672,19 @@ type ObligationResponse = paths["/v1/obligations"]["get"]["responses"]["200"]["c
|
|
|
5277
5672
|
* @param chainId - The chain id used to compute `id`.
|
|
5278
5673
|
* @returns The created `ObligationResponse`. {@link ObligationResponse}
|
|
5279
5674
|
*/
|
|
5280
|
-
declare function from$
|
|
5675
|
+
declare function from$4(obligation: Obligation$1, quote: Quote, chainId: Id): ObligationResponse;
|
|
5281
5676
|
declare namespace OfferResponse_d_exports {
|
|
5282
|
-
export { Input, OfferResponse, from$
|
|
5677
|
+
export { Input, OfferResponse, from$3 as from };
|
|
5283
5678
|
}
|
|
5284
5679
|
type OfferResponse = paths["/v1/offers"]["get"]["responses"]["200"]["content"]["application/json"]["data"][number];
|
|
5285
5680
|
type Input = Readonly<{
|
|
5286
5681
|
hash: Hex;
|
|
5287
5682
|
obligationId: Hex;
|
|
5288
5683
|
maker: Address;
|
|
5289
|
-
assets: bigint;
|
|
5290
5684
|
obligationUnits: bigint;
|
|
5291
|
-
obligationShares: bigint;
|
|
5292
5685
|
tick: number;
|
|
5293
5686
|
maturity: number;
|
|
5687
|
+
rcfThreshold: bigint;
|
|
5294
5688
|
expiry: number;
|
|
5295
5689
|
start: number;
|
|
5296
5690
|
group: Hex;
|
|
@@ -5301,6 +5695,7 @@ type Input = Readonly<{
|
|
|
5301
5695
|
collaterals: Readonly<{
|
|
5302
5696
|
asset: Address;
|
|
5303
5697
|
lltv: bigint;
|
|
5698
|
+
maxLif: bigint;
|
|
5304
5699
|
oracle: Address;
|
|
5305
5700
|
}[]>;
|
|
5306
5701
|
callback: {
|
|
@@ -5308,6 +5703,7 @@ type Input = Readonly<{
|
|
|
5308
5703
|
data: Hex;
|
|
5309
5704
|
};
|
|
5310
5705
|
receiverIfMakerIsSeller: Address;
|
|
5706
|
+
exitOnly: boolean;
|
|
5311
5707
|
root?: Hex | undefined;
|
|
5312
5708
|
proof?: Hex[] | undefined;
|
|
5313
5709
|
signature?: Hex | undefined;
|
|
@@ -5321,7 +5717,7 @@ type Input = Readonly<{
|
|
|
5321
5717
|
* @param input - {@link Input}
|
|
5322
5718
|
* @returns The created `OfferResponse`. {@link OfferResponse}
|
|
5323
5719
|
*/
|
|
5324
|
-
declare function from$
|
|
5720
|
+
declare function from$3(input: Input): OfferResponse;
|
|
5325
5721
|
//#endregion
|
|
5326
5722
|
//#region src/api/Schema/openapi.d.ts
|
|
5327
5723
|
declare class BooksController {
|
|
@@ -5353,7 +5749,7 @@ declare class UsersController {
|
|
|
5353
5749
|
}
|
|
5354
5750
|
declare const OpenApi: () => Promise<OpenAPIDocument>;
|
|
5355
5751
|
declare namespace PositionResponse_d_exports {
|
|
5356
|
-
export { PositionResponse, PositionWithReserved$1 as PositionWithReserved, from$
|
|
5752
|
+
export { PositionResponse, PositionWithReserved$1 as PositionWithReserved, from$2 as from };
|
|
5357
5753
|
}
|
|
5358
5754
|
type PositionResponse = {
|
|
5359
5755
|
chain_id: Id;
|
|
@@ -5369,7 +5765,7 @@ type PositionWithReserved$1 = getByUser.PositionWithReserved;
|
|
|
5369
5765
|
* @param position - {@link PositionWithReserved}
|
|
5370
5766
|
* @returns The created `PositionResponse`. {@link PositionResponse}
|
|
5371
5767
|
*/
|
|
5372
|
-
declare function from$
|
|
5768
|
+
declare function from$2(position: PositionWithReserved$1): PositionResponse;
|
|
5373
5769
|
//#endregion
|
|
5374
5770
|
//#region src/api/Schema/requests.d.ts
|
|
5375
5771
|
declare const schemas: {
|
|
@@ -5406,11 +5802,11 @@ declare const schemas: {
|
|
|
5406
5802
|
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
5407
5803
|
limit: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>, z$1.ZodNumber>>>;
|
|
5408
5804
|
types: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodEnum<{
|
|
5409
|
-
|
|
5805
|
+
loan_token: "loan_token";
|
|
5410
5806
|
maturity: "maturity";
|
|
5411
5807
|
callback: "callback";
|
|
5412
|
-
loan_token: "loan_token";
|
|
5413
5808
|
collateral_token: "collateral_token";
|
|
5809
|
+
oracle: "oracle";
|
|
5414
5810
|
min_duration: "min_duration";
|
|
5415
5811
|
max_collaterals: "max_collaterals";
|
|
5416
5812
|
group_consistency: "group_consistency";
|
|
@@ -5556,18 +5952,17 @@ declare function getDocsHtml(): Promise<string>;
|
|
|
5556
5952
|
declare function getIntegratorDocsHtml(): Promise<string>;
|
|
5557
5953
|
//#endregion
|
|
5558
5954
|
//#region src/api/Controllers/getHealth.d.ts
|
|
5559
|
-
declare function getHealth(query: unknown,
|
|
5560
|
-
declare function getHealthChains(query: unknown,
|
|
5561
|
-
declare function getHealthCollectors(query: unknown,
|
|
5955
|
+
declare function getHealth(query: unknown, healthService: HealthService): Promise<Payload<paths["/v1/health"]["get"]["responses"]["200"]["content"]["application/json"]["data"]>>;
|
|
5956
|
+
declare function getHealthChains(query: unknown, healthService: HealthService): Promise<Payload<paths["/v1/health/chains"]["get"]["responses"]["200"]["content"]["application/json"]["data"]>>;
|
|
5957
|
+
declare function getHealthCollectors(query: unknown, healthService: HealthService): Promise<Payload<paths["/v1/health/collectors"]["get"]["responses"]["200"]["content"]["application/json"]["data"]>>;
|
|
5562
5958
|
//#endregion
|
|
5563
5959
|
//#region src/api/Controllers/getMetrics.d.ts
|
|
5564
5960
|
/**
|
|
5565
|
-
* Get router
|
|
5566
|
-
* @param
|
|
5567
|
-
* @param chainRegistry - Optional chain registry used to scope expected chains.
|
|
5961
|
+
* Get router metrics in Prometheus exposition format.
|
|
5962
|
+
* @param metricsService - Metrics service instance. {@link Metrics.MetricsService}
|
|
5568
5963
|
* @returns Prometheus exposition payload.
|
|
5569
5964
|
*/
|
|
5570
|
-
declare function getMetrics(
|
|
5965
|
+
declare function getMetrics(metricsService: MetricsService): Promise<string>;
|
|
5571
5966
|
//#endregion
|
|
5572
5967
|
//#region src/api/Controllers/getObligation.d.ts
|
|
5573
5968
|
declare function getObligation(params: object, db: Database): Promise<Payload<ObligationResponse>>;
|
|
@@ -5610,7 +6005,7 @@ declare function getOffers$1(queryParameters: object, db: Database): Promise<Pay
|
|
|
5610
6005
|
*/
|
|
5611
6006
|
declare function getUserPositions(queryParameters: object, db: Database): Promise<Payload<PositionResponse[]>>;
|
|
5612
6007
|
declare namespace Gatekeeper_d_exports {
|
|
5613
|
-
export { Gatekeeper, Rules, RulesFactory, create };
|
|
6008
|
+
export { Gatekeeper, Rules, RulesFactory, create$1 as create };
|
|
5614
6009
|
}
|
|
5615
6010
|
type Rules = readonly Rule<Offer, string>[];
|
|
5616
6011
|
type RulesFactory = (chainId: Id) => Rules;
|
|
@@ -5628,7 +6023,7 @@ type GatekeeperParameters = {
|
|
|
5628
6023
|
* @param parameters - Gatekeeper parameters. {@link GatekeeperParameters}
|
|
5629
6024
|
* @returns Gatekeeper instance. {@link Gatekeeper}
|
|
5630
6025
|
*/
|
|
5631
|
-
declare function create(parameters: GatekeeperParameters): Gatekeeper;
|
|
6026
|
+
declare function create$1(parameters: GatekeeperParameters): Gatekeeper;
|
|
5632
6027
|
//#endregion
|
|
5633
6028
|
//#region src/api/Controllers/validateOffers.d.ts
|
|
5634
6029
|
type ValidationIssue$1 = {
|
|
@@ -5648,8 +6043,74 @@ declare function validateOffers(body: object, gatekeeper: Gatekeeper): Promise<V
|
|
|
5648
6043
|
declare namespace index_d_exports$4 {
|
|
5649
6044
|
export { CONFIG_CONTRACT_NAMES, ConfigContract, ConfigContractName, GetOffersQueryParams, ValidationIssue$1 as ValidationIssue, getBook, getConfigContracts, getConfigRules, getDocsHtml, getHealth, getHealthChains, getHealthCollectors, getIntegratorDocsHtml, getMetrics, getObligation, getObligations$1 as getObligations, getOffers$1 as getOffers, getOffersQuery, getSwaggerJson, getUserPositions, validateOffers };
|
|
5650
6045
|
}
|
|
6046
|
+
//#endregion
|
|
6047
|
+
//#region src/api/Api.d.ts
|
|
6048
|
+
type RouterApi = {
|
|
6049
|
+
serve: () => ServerHandle;
|
|
6050
|
+
};
|
|
6051
|
+
type ServerHandle = {
|
|
6052
|
+
close: () => Promise<void>;
|
|
6053
|
+
};
|
|
6054
|
+
type ApiServices = {
|
|
6055
|
+
getOffers: (query: object) => ReturnType<typeof getOffers$1>;
|
|
6056
|
+
getObligations: (query: object) => ReturnType<typeof getObligations$1>;
|
|
6057
|
+
getObligation: (parameters: {
|
|
6058
|
+
obligation_id: string;
|
|
6059
|
+
}) => ReturnType<typeof getObligation>;
|
|
6060
|
+
getBook: (parameters: {
|
|
6061
|
+
obligation_id: string;
|
|
6062
|
+
side: string;
|
|
6063
|
+
cursor?: string;
|
|
6064
|
+
limit?: string;
|
|
6065
|
+
}) => ReturnType<typeof getBook>;
|
|
6066
|
+
validateOffers: GatekeeperClient["validate"];
|
|
6067
|
+
getUserPositions: (parameters: {
|
|
6068
|
+
user_address: string;
|
|
6069
|
+
cursor?: string;
|
|
6070
|
+
limit?: string;
|
|
6071
|
+
}) => ReturnType<typeof getUserPositions>;
|
|
6072
|
+
getHealth: (query: unknown) => ReturnType<typeof getHealth>;
|
|
6073
|
+
getHealthCollectors: (query: unknown) => ReturnType<typeof getHealthCollectors>;
|
|
6074
|
+
getHealthChains: (query: unknown) => ReturnType<typeof getHealthChains>;
|
|
6075
|
+
getMetrics: () => Promise<string>;
|
|
6076
|
+
getConfigContracts: (query: unknown) => ReturnType<typeof getConfigContracts>;
|
|
6077
|
+
getConfigRules: GatekeeperClient["getConfigRules"];
|
|
6078
|
+
observeHttpRequest: (observation: Observation) => void;
|
|
6079
|
+
};
|
|
6080
|
+
type CreateServicesParameters = {
|
|
6081
|
+
db: Database;
|
|
6082
|
+
gatekeeper: GatekeeperClient;
|
|
6083
|
+
chainRegistry: ChainRegistry;
|
|
6084
|
+
healthService: HealthService;
|
|
6085
|
+
metricsService: MetricsService;
|
|
6086
|
+
httpRequestMetrics: HttpRequestMetrics;
|
|
6087
|
+
};
|
|
6088
|
+
type ApiConfig = {
|
|
6089
|
+
services: ApiServices;
|
|
6090
|
+
port: number;
|
|
6091
|
+
};
|
|
6092
|
+
declare function from$1(config: ApiConfig): RouterApi;
|
|
6093
|
+
type CreateParameters = {
|
|
6094
|
+
services: ApiServices;
|
|
6095
|
+
port: number;
|
|
6096
|
+
};
|
|
6097
|
+
declare function create(params: CreateParameters): RouterApi;
|
|
6098
|
+
/**
|
|
6099
|
+
* Build router API endpoint services from infrastructure dependencies.
|
|
6100
|
+
* @param parameters - Router API dependencies.
|
|
6101
|
+
* @returns Endpoint service handlers consumed by {@link createApp}.
|
|
6102
|
+
*/
|
|
6103
|
+
declare function createServices(parameters: CreateServicesParameters): ApiServices;
|
|
6104
|
+
/**
|
|
6105
|
+
* Create the router API Hono app with all routes and middleware configured.
|
|
6106
|
+
* @param parameters - API construction parameters.
|
|
6107
|
+
* @returns Configured Hono app instance.
|
|
6108
|
+
*/
|
|
6109
|
+
declare function createApp(parameters: {
|
|
6110
|
+
services: ApiServices;
|
|
6111
|
+
}): Hono;
|
|
5651
6112
|
declare namespace RouterApi_d_exports {
|
|
5652
|
-
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
|
|
6113
|
+
export { ApiConfig, ApiServices, BookResponse_d_exports as BookResponse, BooksController, ChainHealth, ChainsHealthResponse, CollectorHealth, CollectorsHealthResponse, ConfigContractsController, ConfigRulesController, index_d_exports$4 as Controllers, CreateServicesParameters, HealthController, ObligationResponse_d_exports as ObligationResponse, ObligationsController, OfferResponse_d_exports as OfferResponse, OffersController, OpenApi, PositionResponse_d_exports as PositionResponse, RouterApi, RouterStatusResponse, ServerHandle, UsersController, ValidateController, create, createApp, createServices, from$1 as from, parse, safeParse };
|
|
5653
6114
|
}
|
|
5654
6115
|
declare namespace Client_d_exports$1 {
|
|
5655
6116
|
export { Client$3 as Client, ConnectOptions, HttpForbiddenError, HttpGetApiFailedError, HttpRateLimitError, HttpUnauthorizedError, InvalidUrlError, connect$1 as connect, getObligations, getOffers };
|
|
@@ -5785,7 +6246,7 @@ declare class HttpGetApiFailedError extends BaseError {
|
|
|
5785
6246
|
}
|
|
5786
6247
|
//#endregion
|
|
5787
6248
|
//#region src/database/drizzle/VERSION.d.ts
|
|
5788
|
-
declare const VERSION: "router_v1.
|
|
6249
|
+
declare const VERSION: "router_v1.15";
|
|
5789
6250
|
//#endregion
|
|
5790
6251
|
//#region src/database/drizzle/schema.d.ts
|
|
5791
6252
|
declare enum EnumTableName {
|
|
@@ -5803,6 +6264,7 @@ declare enum EnumTableName {
|
|
|
5803
6264
|
VALIDATIONS = "validations",
|
|
5804
6265
|
COLLECTORS = "collectors",
|
|
5805
6266
|
CHAINS = "chains",
|
|
6267
|
+
PENDING_LINKS = "pending_links",
|
|
5806
6268
|
LOTS = "lots",
|
|
5807
6269
|
LOTS_POSITIONS = "lots_positions",
|
|
5808
6270
|
OFFSETS = "offsets",
|
|
@@ -5810,12 +6272,12 @@ declare enum EnumTableName {
|
|
|
5810
6272
|
MERKLE_PATHS = "merkle_paths"
|
|
5811
6273
|
}
|
|
5812
6274
|
declare const TABLE_NAMES: readonly EnumTableName[];
|
|
5813
|
-
declare const VERSIONED_TABLE_NAMES: ("\"router_v1.
|
|
6275
|
+
declare const VERSIONED_TABLE_NAMES: ("\"router_v1.15\".\"obligations\"" | "\"router_v1.15\".\"obligation_id_keys\"" | "\"router_v1.15\".\"groups\"" | "\"router_v1.15\".\"consumed_events\"" | "\"router_v1.15\".\"obligation_collaterals_v2\"" | "\"router_v1.15\".\"oracles\"" | "\"router_v1.15\".\"offers\"" | "\"router_v1.15\".\"offers_callbacks\"" | "\"router_v1.15\".\"callbacks\"" | "\"router_v1.15\".\"positions\"" | "\"router_v1.15\".\"transfers\"" | "\"router_v1.15\".\"validations\"" | "\"router_v1.15\".\"collectors\"" | "\"router_v1.15\".\"chains\"" | "\"router_v1.15\".\"pending_links\"" | "\"router_v1.15\".\"lots\"" | "\"router_v1.15\".\"lots_positions\"" | "\"router_v1.15\".\"offsets\"" | "\"router_v1.15\".\"trees\"" | "\"router_v1.15\".\"merkle_paths\"")[];
|
|
5814
6276
|
type TableName = (typeof TABLE_NAMES)[number];
|
|
5815
6277
|
type VersionedTableName = `"${typeof VERSION}"."${TableName}"`;
|
|
5816
6278
|
declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5817
6279
|
name: EnumTableName.OBLIGATIONS;
|
|
5818
|
-
schema: "router_v1.
|
|
6280
|
+
schema: "router_v1.15";
|
|
5819
6281
|
columns: {
|
|
5820
6282
|
obligationKey: drizzle_orm_pg_core0.PgColumn<{
|
|
5821
6283
|
name: "obligation_key";
|
|
@@ -5872,12 +6334,29 @@ declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5872
6334
|
identity: undefined;
|
|
5873
6335
|
generated: undefined;
|
|
5874
6336
|
}, {}, {}>;
|
|
6337
|
+
rcfThreshold: drizzle_orm_pg_core0.PgColumn<{
|
|
6338
|
+
name: "rcf_threshold";
|
|
6339
|
+
tableName: EnumTableName.OBLIGATIONS;
|
|
6340
|
+
dataType: "string";
|
|
6341
|
+
columnType: "PgNumeric";
|
|
6342
|
+
data: string;
|
|
6343
|
+
driverParam: string;
|
|
6344
|
+
notNull: true;
|
|
6345
|
+
hasDefault: false;
|
|
6346
|
+
isPrimaryKey: false;
|
|
6347
|
+
isAutoincrement: false;
|
|
6348
|
+
hasRuntimeDefault: false;
|
|
6349
|
+
enumValues: undefined;
|
|
6350
|
+
baseColumn: never;
|
|
6351
|
+
identity: undefined;
|
|
6352
|
+
generated: undefined;
|
|
6353
|
+
}, {}, {}>;
|
|
5875
6354
|
};
|
|
5876
6355
|
dialect: "pg";
|
|
5877
6356
|
}>;
|
|
5878
6357
|
declare const obligationIdKeys: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5879
6358
|
name: EnumTableName.OBLIGATION_ID_KEYS;
|
|
5880
|
-
schema: "router_v1.
|
|
6359
|
+
schema: "router_v1.15";
|
|
5881
6360
|
columns: {
|
|
5882
6361
|
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
5883
6362
|
name: "obligation_id";
|
|
@@ -5896,7 +6375,7 @@ declare const obligationIdKeys: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5896
6375
|
identity: undefined;
|
|
5897
6376
|
generated: undefined;
|
|
5898
6377
|
}, {}, {
|
|
5899
|
-
length:
|
|
6378
|
+
length: 66;
|
|
5900
6379
|
}>;
|
|
5901
6380
|
obligationKey: drizzle_orm_pg_core0.PgColumn<{
|
|
5902
6381
|
name: "obligation_key";
|
|
@@ -5960,7 +6439,7 @@ declare const obligationIdKeys: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
5960
6439
|
}>;
|
|
5961
6440
|
declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
5962
6441
|
name: EnumTableName.GROUPS;
|
|
5963
|
-
schema: "router_v1.
|
|
6442
|
+
schema: "router_v1.15";
|
|
5964
6443
|
columns: {
|
|
5965
6444
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
5966
6445
|
name: "chain_id";
|
|
@@ -6075,7 +6554,7 @@ declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6075
6554
|
}>;
|
|
6076
6555
|
declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6077
6556
|
name: EnumTableName.CONSUMED_EVENTS;
|
|
6078
|
-
schema: "router_v1.
|
|
6557
|
+
schema: "router_v1.15";
|
|
6079
6558
|
columns: {
|
|
6080
6559
|
eventId: drizzle_orm_pg_core0.PgColumn<{
|
|
6081
6560
|
name: "event_id";
|
|
@@ -6209,7 +6688,7 @@ declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6209
6688
|
}>;
|
|
6210
6689
|
declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6211
6690
|
name: EnumTableName.OBLIGATION_COLLATERALS_V2;
|
|
6212
|
-
schema: "router_v1.
|
|
6691
|
+
schema: "router_v1.15";
|
|
6213
6692
|
columns: {
|
|
6214
6693
|
obligationKey: drizzle_orm_pg_core0.PgColumn<{
|
|
6215
6694
|
name: "obligation_key";
|
|
@@ -6285,6 +6764,23 @@ declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6285
6764
|
identity: undefined;
|
|
6286
6765
|
generated: undefined;
|
|
6287
6766
|
}, {}, {}>;
|
|
6767
|
+
maxLif: drizzle_orm_pg_core0.PgColumn<{
|
|
6768
|
+
name: "max_lif";
|
|
6769
|
+
tableName: EnumTableName.OBLIGATION_COLLATERALS_V2;
|
|
6770
|
+
dataType: "bigint";
|
|
6771
|
+
columnType: "PgBigInt64";
|
|
6772
|
+
data: bigint;
|
|
6773
|
+
driverParam: string;
|
|
6774
|
+
notNull: true;
|
|
6775
|
+
hasDefault: false;
|
|
6776
|
+
isPrimaryKey: false;
|
|
6777
|
+
isAutoincrement: false;
|
|
6778
|
+
hasRuntimeDefault: false;
|
|
6779
|
+
enumValues: undefined;
|
|
6780
|
+
baseColumn: never;
|
|
6781
|
+
identity: undefined;
|
|
6782
|
+
generated: undefined;
|
|
6783
|
+
}, {}, {}>;
|
|
6288
6784
|
collateralIndex: drizzle_orm_pg_core0.PgColumn<{
|
|
6289
6785
|
name: "collateral_index";
|
|
6290
6786
|
tableName: EnumTableName.OBLIGATION_COLLATERALS_V2;
|
|
@@ -6324,7 +6820,7 @@ declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6324
6820
|
}>;
|
|
6325
6821
|
declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6326
6822
|
name: EnumTableName.ORACLES;
|
|
6327
|
-
schema: "router_v1.
|
|
6823
|
+
schema: "router_v1.15";
|
|
6328
6824
|
columns: {
|
|
6329
6825
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6330
6826
|
name: "chain_id";
|
|
@@ -6420,7 +6916,7 @@ declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6420
6916
|
}>;
|
|
6421
6917
|
declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6422
6918
|
name: EnumTableName.OFFERS;
|
|
6423
|
-
schema: "router_v1.
|
|
6919
|
+
schema: "router_v1.15";
|
|
6424
6920
|
columns: {
|
|
6425
6921
|
hash: drizzle_orm_pg_core0.PgColumn<{
|
|
6426
6922
|
name: "hash";
|
|
@@ -6458,25 +6954,8 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6458
6954
|
identity: undefined;
|
|
6459
6955
|
generated: undefined;
|
|
6460
6956
|
}, {}, {
|
|
6461
|
-
length:
|
|
6957
|
+
length: 66;
|
|
6462
6958
|
}>;
|
|
6463
|
-
assets: drizzle_orm_pg_core0.PgColumn<{
|
|
6464
|
-
name: "assets";
|
|
6465
|
-
tableName: EnumTableName.OFFERS;
|
|
6466
|
-
dataType: "string";
|
|
6467
|
-
columnType: "PgNumeric";
|
|
6468
|
-
data: string;
|
|
6469
|
-
driverParam: string;
|
|
6470
|
-
notNull: true;
|
|
6471
|
-
hasDefault: false;
|
|
6472
|
-
isPrimaryKey: false;
|
|
6473
|
-
isAutoincrement: false;
|
|
6474
|
-
hasRuntimeDefault: false;
|
|
6475
|
-
enumValues: undefined;
|
|
6476
|
-
baseColumn: never;
|
|
6477
|
-
identity: undefined;
|
|
6478
|
-
generated: undefined;
|
|
6479
|
-
}, {}, {}>;
|
|
6480
6959
|
obligationUnits: drizzle_orm_pg_core0.PgColumn<{
|
|
6481
6960
|
name: "obligation_units";
|
|
6482
6961
|
tableName: EnumTableName.OFFERS;
|
|
@@ -6494,23 +6973,6 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6494
6973
|
identity: undefined;
|
|
6495
6974
|
generated: undefined;
|
|
6496
6975
|
}, {}, {}>;
|
|
6497
|
-
obligationShares: drizzle_orm_pg_core0.PgColumn<{
|
|
6498
|
-
name: "obligation_shares";
|
|
6499
|
-
tableName: EnumTableName.OFFERS;
|
|
6500
|
-
dataType: "string";
|
|
6501
|
-
columnType: "PgNumeric";
|
|
6502
|
-
data: string;
|
|
6503
|
-
driverParam: string;
|
|
6504
|
-
notNull: true;
|
|
6505
|
-
hasDefault: true;
|
|
6506
|
-
isPrimaryKey: false;
|
|
6507
|
-
isAutoincrement: false;
|
|
6508
|
-
hasRuntimeDefault: false;
|
|
6509
|
-
enumValues: undefined;
|
|
6510
|
-
baseColumn: never;
|
|
6511
|
-
identity: undefined;
|
|
6512
|
-
generated: undefined;
|
|
6513
|
-
}, {}, {}>;
|
|
6514
6976
|
tick: drizzle_orm_pg_core0.PgColumn<{
|
|
6515
6977
|
name: "tick";
|
|
6516
6978
|
tableName: EnumTableName.OFFERS;
|
|
@@ -6727,6 +7189,23 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6727
7189
|
}, {}, {
|
|
6728
7190
|
length: 42;
|
|
6729
7191
|
}>;
|
|
7192
|
+
exitOnly: drizzle_orm_pg_core0.PgColumn<{
|
|
7193
|
+
name: "exit_only";
|
|
7194
|
+
tableName: EnumTableName.OFFERS;
|
|
7195
|
+
dataType: "boolean";
|
|
7196
|
+
columnType: "PgBoolean";
|
|
7197
|
+
data: boolean;
|
|
7198
|
+
driverParam: boolean;
|
|
7199
|
+
notNull: true;
|
|
7200
|
+
hasDefault: true;
|
|
7201
|
+
isPrimaryKey: false;
|
|
7202
|
+
isAutoincrement: false;
|
|
7203
|
+
hasRuntimeDefault: false;
|
|
7204
|
+
enumValues: undefined;
|
|
7205
|
+
baseColumn: never;
|
|
7206
|
+
identity: undefined;
|
|
7207
|
+
generated: undefined;
|
|
7208
|
+
}, {}, {}>;
|
|
6730
7209
|
blockNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
6731
7210
|
name: "block_number";
|
|
6732
7211
|
tableName: EnumTableName.OFFERS;
|
|
@@ -6766,7 +7245,7 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6766
7245
|
}>;
|
|
6767
7246
|
declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6768
7247
|
name: EnumTableName.OFFERS_CALLBACKS;
|
|
6769
|
-
schema: "router_v1.
|
|
7248
|
+
schema: "router_v1.15";
|
|
6770
7249
|
columns: {
|
|
6771
7250
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
6772
7251
|
name: "offer_hash";
|
|
@@ -6804,7 +7283,7 @@ declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6804
7283
|
identity: undefined;
|
|
6805
7284
|
generated: undefined;
|
|
6806
7285
|
}, {}, {
|
|
6807
|
-
length:
|
|
7286
|
+
length: 66;
|
|
6808
7287
|
}>;
|
|
6809
7288
|
callbackId: drizzle_orm_pg_core0.PgColumn<{
|
|
6810
7289
|
name: "callback_id";
|
|
@@ -6831,7 +7310,7 @@ declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6831
7310
|
declare const CallbackTypes: drizzle_orm_pg_core0.PgEnum<[CallbackType, ...CallbackType[]]>;
|
|
6832
7311
|
declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6833
7312
|
name: EnumTableName.CALLBACKS;
|
|
6834
|
-
schema: "router_v1.
|
|
7313
|
+
schema: "router_v1.15";
|
|
6835
7314
|
columns: {
|
|
6836
7315
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
6837
7316
|
name: "id";
|
|
@@ -6948,7 +7427,7 @@ declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6948
7427
|
}>;
|
|
6949
7428
|
declare const lotsPositions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6950
7429
|
name: EnumTableName.LOTS_POSITIONS;
|
|
6951
|
-
schema: "router_v1.
|
|
7430
|
+
schema: "router_v1.15";
|
|
6952
7431
|
columns: {
|
|
6953
7432
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6954
7433
|
name: "chain_id";
|
|
@@ -7029,7 +7508,7 @@ declare const lotsPositions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7029
7508
|
}>;
|
|
7030
7509
|
declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7031
7510
|
name: EnumTableName.LOTS;
|
|
7032
|
-
schema: "router_v1.
|
|
7511
|
+
schema: "router_v1.15";
|
|
7033
7512
|
columns: {
|
|
7034
7513
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7035
7514
|
name: "chain_id";
|
|
@@ -7124,7 +7603,7 @@ declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7124
7603
|
identity: undefined;
|
|
7125
7604
|
generated: undefined;
|
|
7126
7605
|
}, {}, {
|
|
7127
|
-
length:
|
|
7606
|
+
length: 66;
|
|
7128
7607
|
}>;
|
|
7129
7608
|
lower: drizzle_orm_pg_core0.PgColumn<{
|
|
7130
7609
|
name: "lower";
|
|
@@ -7165,7 +7644,7 @@ declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7165
7644
|
}>;
|
|
7166
7645
|
declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7167
7646
|
name: EnumTableName.OFFSETS;
|
|
7168
|
-
schema: "router_v1.
|
|
7647
|
+
schema: "router_v1.15";
|
|
7169
7648
|
columns: {
|
|
7170
7649
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7171
7650
|
name: "chain_id";
|
|
@@ -7260,7 +7739,7 @@ declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7260
7739
|
identity: undefined;
|
|
7261
7740
|
generated: undefined;
|
|
7262
7741
|
}, {}, {
|
|
7263
|
-
length:
|
|
7742
|
+
length: 66;
|
|
7264
7743
|
}>;
|
|
7265
7744
|
value: drizzle_orm_pg_core0.PgColumn<{
|
|
7266
7745
|
name: "value";
|
|
@@ -7285,7 +7764,7 @@ declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7285
7764
|
declare const PositionTypes: drizzle_orm_pg_core0.PgEnum<[Type, ...Type[]]>;
|
|
7286
7765
|
declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7287
7766
|
name: "position_types";
|
|
7288
|
-
schema: "router_v1.
|
|
7767
|
+
schema: "router_v1.15";
|
|
7289
7768
|
columns: {
|
|
7290
7769
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
7291
7770
|
name: "id";
|
|
@@ -7326,7 +7805,7 @@ declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7326
7805
|
}>;
|
|
7327
7806
|
declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7328
7807
|
name: EnumTableName.POSITIONS;
|
|
7329
|
-
schema: "router_v1.
|
|
7808
|
+
schema: "router_v1.15";
|
|
7330
7809
|
columns: {
|
|
7331
7810
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7332
7811
|
name: "chain_id";
|
|
@@ -7477,7 +7956,7 @@ declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7477
7956
|
}>;
|
|
7478
7957
|
declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7479
7958
|
name: EnumTableName.TRANSFERS;
|
|
7480
|
-
schema: "router_v1.
|
|
7959
|
+
schema: "router_v1.15";
|
|
7481
7960
|
columns: {
|
|
7482
7961
|
eventId: drizzle_orm_pg_core0.PgColumn<{
|
|
7483
7962
|
name: "event_id";
|
|
@@ -7599,7 +8078,422 @@ declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7599
8078
|
data: number;
|
|
7600
8079
|
driverParam: string | number;
|
|
7601
8080
|
notNull: true;
|
|
7602
|
-
hasDefault: false;
|
|
8081
|
+
hasDefault: false;
|
|
8082
|
+
isPrimaryKey: false;
|
|
8083
|
+
isAutoincrement: false;
|
|
8084
|
+
hasRuntimeDefault: false;
|
|
8085
|
+
enumValues: undefined;
|
|
8086
|
+
baseColumn: never;
|
|
8087
|
+
identity: undefined;
|
|
8088
|
+
generated: undefined;
|
|
8089
|
+
}, {}, {}>;
|
|
8090
|
+
asset: drizzle_orm_pg_core0.PgColumn<{
|
|
8091
|
+
name: "asset";
|
|
8092
|
+
tableName: EnumTableName.TRANSFERS;
|
|
8093
|
+
dataType: "string";
|
|
8094
|
+
columnType: "PgVarchar";
|
|
8095
|
+
data: string;
|
|
8096
|
+
driverParam: string;
|
|
8097
|
+
notNull: true;
|
|
8098
|
+
hasDefault: false;
|
|
8099
|
+
isPrimaryKey: false;
|
|
8100
|
+
isAutoincrement: false;
|
|
8101
|
+
hasRuntimeDefault: false;
|
|
8102
|
+
enumValues: [string, ...string[]];
|
|
8103
|
+
baseColumn: never;
|
|
8104
|
+
identity: undefined;
|
|
8105
|
+
generated: undefined;
|
|
8106
|
+
}, {}, {
|
|
8107
|
+
length: 42;
|
|
8108
|
+
}>;
|
|
8109
|
+
blockNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
8110
|
+
name: "block_number";
|
|
8111
|
+
tableName: EnumTableName.TRANSFERS;
|
|
8112
|
+
dataType: "number";
|
|
8113
|
+
columnType: "PgBigInt53";
|
|
8114
|
+
data: number;
|
|
8115
|
+
driverParam: string | number;
|
|
8116
|
+
notNull: true;
|
|
8117
|
+
hasDefault: false;
|
|
8118
|
+
isPrimaryKey: false;
|
|
8119
|
+
isAutoincrement: false;
|
|
8120
|
+
hasRuntimeDefault: false;
|
|
8121
|
+
enumValues: undefined;
|
|
8122
|
+
baseColumn: never;
|
|
8123
|
+
identity: undefined;
|
|
8124
|
+
generated: undefined;
|
|
8125
|
+
}, {}, {}>;
|
|
8126
|
+
createdAt: drizzle_orm_pg_core0.PgColumn<{
|
|
8127
|
+
name: "created_at";
|
|
8128
|
+
tableName: EnumTableName.TRANSFERS;
|
|
8129
|
+
dataType: "date";
|
|
8130
|
+
columnType: "PgTimestamp";
|
|
8131
|
+
data: Date;
|
|
8132
|
+
driverParam: string;
|
|
8133
|
+
notNull: true;
|
|
8134
|
+
hasDefault: true;
|
|
8135
|
+
isPrimaryKey: false;
|
|
8136
|
+
isAutoincrement: false;
|
|
8137
|
+
hasRuntimeDefault: false;
|
|
8138
|
+
enumValues: undefined;
|
|
8139
|
+
baseColumn: never;
|
|
8140
|
+
identity: undefined;
|
|
8141
|
+
generated: undefined;
|
|
8142
|
+
}, {}, {}>;
|
|
8143
|
+
};
|
|
8144
|
+
dialect: "pg";
|
|
8145
|
+
}>;
|
|
8146
|
+
declare const StatusCode: drizzle_orm_pg_core0.PgEnum<[Status, ...Status[]]>;
|
|
8147
|
+
declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8148
|
+
name: "status";
|
|
8149
|
+
schema: "router_v1.15";
|
|
8150
|
+
columns: {
|
|
8151
|
+
id: drizzle_orm_pg_core0.PgColumn<{
|
|
8152
|
+
name: "id";
|
|
8153
|
+
tableName: "status";
|
|
8154
|
+
dataType: "number";
|
|
8155
|
+
columnType: "PgSerial";
|
|
8156
|
+
data: number;
|
|
8157
|
+
driverParam: number;
|
|
8158
|
+
notNull: true;
|
|
8159
|
+
hasDefault: true;
|
|
8160
|
+
isPrimaryKey: true;
|
|
8161
|
+
isAutoincrement: false;
|
|
8162
|
+
hasRuntimeDefault: false;
|
|
8163
|
+
enumValues: undefined;
|
|
8164
|
+
baseColumn: never;
|
|
8165
|
+
identity: undefined;
|
|
8166
|
+
generated: undefined;
|
|
8167
|
+
}, {}, {}>;
|
|
8168
|
+
code: drizzle_orm_pg_core0.PgColumn<{
|
|
8169
|
+
name: "code";
|
|
8170
|
+
tableName: "status";
|
|
8171
|
+
dataType: "string";
|
|
8172
|
+
columnType: "PgEnumColumn";
|
|
8173
|
+
data: Status;
|
|
8174
|
+
driverParam: string;
|
|
8175
|
+
notNull: false;
|
|
8176
|
+
hasDefault: false;
|
|
8177
|
+
isPrimaryKey: false;
|
|
8178
|
+
isAutoincrement: false;
|
|
8179
|
+
hasRuntimeDefault: false;
|
|
8180
|
+
enumValues: [Status, ...Status[]];
|
|
8181
|
+
baseColumn: never;
|
|
8182
|
+
identity: undefined;
|
|
8183
|
+
generated: undefined;
|
|
8184
|
+
}, {}, {}>;
|
|
8185
|
+
};
|
|
8186
|
+
dialect: "pg";
|
|
8187
|
+
}>;
|
|
8188
|
+
declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8189
|
+
name: "validations";
|
|
8190
|
+
schema: "router_v1.15";
|
|
8191
|
+
columns: {
|
|
8192
|
+
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
8193
|
+
name: "offer_hash";
|
|
8194
|
+
tableName: "validations";
|
|
8195
|
+
dataType: "string";
|
|
8196
|
+
columnType: "PgVarchar";
|
|
8197
|
+
data: string;
|
|
8198
|
+
driverParam: string;
|
|
8199
|
+
notNull: true;
|
|
8200
|
+
hasDefault: false;
|
|
8201
|
+
isPrimaryKey: false;
|
|
8202
|
+
isAutoincrement: false;
|
|
8203
|
+
hasRuntimeDefault: false;
|
|
8204
|
+
enumValues: [string, ...string[]];
|
|
8205
|
+
baseColumn: never;
|
|
8206
|
+
identity: undefined;
|
|
8207
|
+
generated: undefined;
|
|
8208
|
+
}, {}, {
|
|
8209
|
+
length: 66;
|
|
8210
|
+
}>;
|
|
8211
|
+
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
8212
|
+
name: "obligation_id";
|
|
8213
|
+
tableName: "validations";
|
|
8214
|
+
dataType: "string";
|
|
8215
|
+
columnType: "PgVarchar";
|
|
8216
|
+
data: string;
|
|
8217
|
+
driverParam: string;
|
|
8218
|
+
notNull: true;
|
|
8219
|
+
hasDefault: false;
|
|
8220
|
+
isPrimaryKey: false;
|
|
8221
|
+
isAutoincrement: false;
|
|
8222
|
+
hasRuntimeDefault: false;
|
|
8223
|
+
enumValues: [string, ...string[]];
|
|
8224
|
+
baseColumn: never;
|
|
8225
|
+
identity: undefined;
|
|
8226
|
+
generated: undefined;
|
|
8227
|
+
}, {}, {
|
|
8228
|
+
length: 66;
|
|
8229
|
+
}>;
|
|
8230
|
+
statusId: drizzle_orm_pg_core0.PgColumn<{
|
|
8231
|
+
name: "status_id";
|
|
8232
|
+
tableName: "validations";
|
|
8233
|
+
dataType: "number";
|
|
8234
|
+
columnType: "PgInteger";
|
|
8235
|
+
data: number;
|
|
8236
|
+
driverParam: string | number;
|
|
8237
|
+
notNull: true;
|
|
8238
|
+
hasDefault: false;
|
|
8239
|
+
isPrimaryKey: false;
|
|
8240
|
+
isAutoincrement: false;
|
|
8241
|
+
hasRuntimeDefault: false;
|
|
8242
|
+
enumValues: undefined;
|
|
8243
|
+
baseColumn: never;
|
|
8244
|
+
identity: undefined;
|
|
8245
|
+
generated: undefined;
|
|
8246
|
+
}, {}, {}>;
|
|
8247
|
+
updatedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
8248
|
+
name: "updated_at";
|
|
8249
|
+
tableName: "validations";
|
|
8250
|
+
dataType: "date";
|
|
8251
|
+
columnType: "PgTimestamp";
|
|
8252
|
+
data: Date;
|
|
8253
|
+
driverParam: string;
|
|
8254
|
+
notNull: true;
|
|
8255
|
+
hasDefault: true;
|
|
8256
|
+
isPrimaryKey: false;
|
|
8257
|
+
isAutoincrement: false;
|
|
8258
|
+
hasRuntimeDefault: false;
|
|
8259
|
+
enumValues: undefined;
|
|
8260
|
+
baseColumn: never;
|
|
8261
|
+
identity: undefined;
|
|
8262
|
+
generated: undefined;
|
|
8263
|
+
}, {}, {}>;
|
|
8264
|
+
};
|
|
8265
|
+
dialect: "pg";
|
|
8266
|
+
}>;
|
|
8267
|
+
declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8268
|
+
name: EnumTableName.COLLECTORS;
|
|
8269
|
+
schema: "router_v1.15";
|
|
8270
|
+
columns: {
|
|
8271
|
+
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
8272
|
+
name: "chain_id";
|
|
8273
|
+
tableName: EnumTableName.COLLECTORS;
|
|
8274
|
+
dataType: "number";
|
|
8275
|
+
columnType: "PgBigInt53";
|
|
8276
|
+
data: Id;
|
|
8277
|
+
driverParam: string | number;
|
|
8278
|
+
notNull: true;
|
|
8279
|
+
hasDefault: false;
|
|
8280
|
+
isPrimaryKey: false;
|
|
8281
|
+
isAutoincrement: false;
|
|
8282
|
+
hasRuntimeDefault: false;
|
|
8283
|
+
enumValues: undefined;
|
|
8284
|
+
baseColumn: never;
|
|
8285
|
+
identity: undefined;
|
|
8286
|
+
generated: undefined;
|
|
8287
|
+
}, {}, {
|
|
8288
|
+
$type: Id;
|
|
8289
|
+
}>;
|
|
8290
|
+
name: drizzle_orm_pg_core0.PgColumn<{
|
|
8291
|
+
name: "name";
|
|
8292
|
+
tableName: EnumTableName.COLLECTORS;
|
|
8293
|
+
dataType: "string";
|
|
8294
|
+
columnType: "PgText";
|
|
8295
|
+
data: "morpho_v2" | "offers" | "positions" | "prices";
|
|
8296
|
+
driverParam: string;
|
|
8297
|
+
notNull: true;
|
|
8298
|
+
hasDefault: false;
|
|
8299
|
+
isPrimaryKey: false;
|
|
8300
|
+
isAutoincrement: false;
|
|
8301
|
+
hasRuntimeDefault: false;
|
|
8302
|
+
enumValues: [string, ...string[]];
|
|
8303
|
+
baseColumn: never;
|
|
8304
|
+
identity: undefined;
|
|
8305
|
+
generated: undefined;
|
|
8306
|
+
}, {}, {
|
|
8307
|
+
$type: "morpho_v2" | "offers" | "positions" | "prices";
|
|
8308
|
+
}>;
|
|
8309
|
+
blockNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
8310
|
+
name: "block_number";
|
|
8311
|
+
tableName: EnumTableName.COLLECTORS;
|
|
8312
|
+
dataType: "number";
|
|
8313
|
+
columnType: "PgBigInt53";
|
|
8314
|
+
data: number;
|
|
8315
|
+
driverParam: string | number;
|
|
8316
|
+
notNull: true;
|
|
8317
|
+
hasDefault: false;
|
|
8318
|
+
isPrimaryKey: false;
|
|
8319
|
+
isAutoincrement: false;
|
|
8320
|
+
hasRuntimeDefault: false;
|
|
8321
|
+
enumValues: undefined;
|
|
8322
|
+
baseColumn: never;
|
|
8323
|
+
identity: undefined;
|
|
8324
|
+
generated: undefined;
|
|
8325
|
+
}, {}, {}>;
|
|
8326
|
+
epoch: drizzle_orm_pg_core0.PgColumn<{
|
|
8327
|
+
name: "epoch";
|
|
8328
|
+
tableName: EnumTableName.COLLECTORS;
|
|
8329
|
+
dataType: "string";
|
|
8330
|
+
columnType: "PgNumeric";
|
|
8331
|
+
data: string;
|
|
8332
|
+
driverParam: string;
|
|
8333
|
+
notNull: true;
|
|
8334
|
+
hasDefault: true;
|
|
8335
|
+
isPrimaryKey: false;
|
|
8336
|
+
isAutoincrement: false;
|
|
8337
|
+
hasRuntimeDefault: false;
|
|
8338
|
+
enumValues: undefined;
|
|
8339
|
+
baseColumn: never;
|
|
8340
|
+
identity: undefined;
|
|
8341
|
+
generated: undefined;
|
|
8342
|
+
}, {}, {}>;
|
|
8343
|
+
updatedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
8344
|
+
name: "updated_at";
|
|
8345
|
+
tableName: EnumTableName.COLLECTORS;
|
|
8346
|
+
dataType: "date";
|
|
8347
|
+
columnType: "PgTimestamp";
|
|
8348
|
+
data: Date;
|
|
8349
|
+
driverParam: string;
|
|
8350
|
+
notNull: true;
|
|
8351
|
+
hasDefault: true;
|
|
8352
|
+
isPrimaryKey: false;
|
|
8353
|
+
isAutoincrement: false;
|
|
8354
|
+
hasRuntimeDefault: false;
|
|
8355
|
+
enumValues: undefined;
|
|
8356
|
+
baseColumn: never;
|
|
8357
|
+
identity: undefined;
|
|
8358
|
+
generated: undefined;
|
|
8359
|
+
}, {}, {}>;
|
|
8360
|
+
};
|
|
8361
|
+
dialect: "pg";
|
|
8362
|
+
}>;
|
|
8363
|
+
declare const chains: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8364
|
+
name: EnumTableName.CHAINS;
|
|
8365
|
+
schema: "router_v1.15";
|
|
8366
|
+
columns: {
|
|
8367
|
+
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
8368
|
+
name: "chain_id";
|
|
8369
|
+
tableName: EnumTableName.CHAINS;
|
|
8370
|
+
dataType: "number";
|
|
8371
|
+
columnType: "PgBigInt53";
|
|
8372
|
+
data: Id;
|
|
8373
|
+
driverParam: string | number;
|
|
8374
|
+
notNull: true;
|
|
8375
|
+
hasDefault: false;
|
|
8376
|
+
isPrimaryKey: false;
|
|
8377
|
+
isAutoincrement: false;
|
|
8378
|
+
hasRuntimeDefault: false;
|
|
8379
|
+
enumValues: undefined;
|
|
8380
|
+
baseColumn: never;
|
|
8381
|
+
identity: undefined;
|
|
8382
|
+
generated: undefined;
|
|
8383
|
+
}, {}, {
|
|
8384
|
+
$type: Id;
|
|
8385
|
+
}>;
|
|
8386
|
+
blockNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
8387
|
+
name: "block_number";
|
|
8388
|
+
tableName: EnumTableName.CHAINS;
|
|
8389
|
+
dataType: "number";
|
|
8390
|
+
columnType: "PgBigInt53";
|
|
8391
|
+
data: number;
|
|
8392
|
+
driverParam: string | number;
|
|
8393
|
+
notNull: true;
|
|
8394
|
+
hasDefault: false;
|
|
8395
|
+
isPrimaryKey: false;
|
|
8396
|
+
isAutoincrement: false;
|
|
8397
|
+
hasRuntimeDefault: false;
|
|
8398
|
+
enumValues: undefined;
|
|
8399
|
+
baseColumn: never;
|
|
8400
|
+
identity: undefined;
|
|
8401
|
+
generated: undefined;
|
|
8402
|
+
}, {}, {}>;
|
|
8403
|
+
epoch: drizzle_orm_pg_core0.PgColumn<{
|
|
8404
|
+
name: "epoch";
|
|
8405
|
+
tableName: EnumTableName.CHAINS;
|
|
8406
|
+
dataType: "string";
|
|
8407
|
+
columnType: "PgNumeric";
|
|
8408
|
+
data: string;
|
|
8409
|
+
driverParam: string;
|
|
8410
|
+
notNull: true;
|
|
8411
|
+
hasDefault: true;
|
|
8412
|
+
isPrimaryKey: false;
|
|
8413
|
+
isAutoincrement: false;
|
|
8414
|
+
hasRuntimeDefault: false;
|
|
8415
|
+
enumValues: undefined;
|
|
8416
|
+
baseColumn: never;
|
|
8417
|
+
identity: undefined;
|
|
8418
|
+
generated: undefined;
|
|
8419
|
+
}, {}, {}>;
|
|
8420
|
+
checkpoints: drizzle_orm_pg_core0.PgColumn<{
|
|
8421
|
+
name: "checkpoints";
|
|
8422
|
+
tableName: EnumTableName.CHAINS;
|
|
8423
|
+
dataType: "string";
|
|
8424
|
+
columnType: "PgText";
|
|
8425
|
+
data: string;
|
|
8426
|
+
driverParam: string;
|
|
8427
|
+
notNull: true;
|
|
8428
|
+
hasDefault: true;
|
|
8429
|
+
isPrimaryKey: false;
|
|
8430
|
+
isAutoincrement: false;
|
|
8431
|
+
hasRuntimeDefault: false;
|
|
8432
|
+
enumValues: [string, ...string[]];
|
|
8433
|
+
baseColumn: never;
|
|
8434
|
+
identity: undefined;
|
|
8435
|
+
generated: undefined;
|
|
8436
|
+
}, {}, {}>;
|
|
8437
|
+
tipHash: drizzle_orm_pg_core0.PgColumn<{
|
|
8438
|
+
name: "tip_hash";
|
|
8439
|
+
tableName: EnumTableName.CHAINS;
|
|
8440
|
+
dataType: "string";
|
|
8441
|
+
columnType: "PgText";
|
|
8442
|
+
data: string;
|
|
8443
|
+
driverParam: string;
|
|
8444
|
+
notNull: false;
|
|
8445
|
+
hasDefault: false;
|
|
8446
|
+
isPrimaryKey: false;
|
|
8447
|
+
isAutoincrement: false;
|
|
8448
|
+
hasRuntimeDefault: false;
|
|
8449
|
+
enumValues: [string, ...string[]];
|
|
8450
|
+
baseColumn: never;
|
|
8451
|
+
identity: undefined;
|
|
8452
|
+
generated: undefined;
|
|
8453
|
+
}, {}, {}>;
|
|
8454
|
+
finalizedBlockNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
8455
|
+
name: "finalized_block_number";
|
|
8456
|
+
tableName: EnumTableName.CHAINS;
|
|
8457
|
+
dataType: "number";
|
|
8458
|
+
columnType: "PgBigInt53";
|
|
8459
|
+
data: number;
|
|
8460
|
+
driverParam: string | number;
|
|
8461
|
+
notNull: false;
|
|
8462
|
+
hasDefault: false;
|
|
8463
|
+
isPrimaryKey: false;
|
|
8464
|
+
isAutoincrement: false;
|
|
8465
|
+
hasRuntimeDefault: false;
|
|
8466
|
+
enumValues: undefined;
|
|
8467
|
+
baseColumn: never;
|
|
8468
|
+
identity: undefined;
|
|
8469
|
+
generated: undefined;
|
|
8470
|
+
}, {}, {}>;
|
|
8471
|
+
finalizedBlockHash: drizzle_orm_pg_core0.PgColumn<{
|
|
8472
|
+
name: "finalized_block_hash";
|
|
8473
|
+
tableName: EnumTableName.CHAINS;
|
|
8474
|
+
dataType: "string";
|
|
8475
|
+
columnType: "PgText";
|
|
8476
|
+
data: string;
|
|
8477
|
+
driverParam: string;
|
|
8478
|
+
notNull: false;
|
|
8479
|
+
hasDefault: false;
|
|
8480
|
+
isPrimaryKey: false;
|
|
8481
|
+
isAutoincrement: false;
|
|
8482
|
+
hasRuntimeDefault: false;
|
|
8483
|
+
enumValues: [string, ...string[]];
|
|
8484
|
+
baseColumn: never;
|
|
8485
|
+
identity: undefined;
|
|
8486
|
+
generated: undefined;
|
|
8487
|
+
}, {}, {}>;
|
|
8488
|
+
updatedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
8489
|
+
name: "updated_at";
|
|
8490
|
+
tableName: EnumTableName.CHAINS;
|
|
8491
|
+
dataType: "date";
|
|
8492
|
+
columnType: "PgTimestamp";
|
|
8493
|
+
data: Date;
|
|
8494
|
+
driverParam: string;
|
|
8495
|
+
notNull: true;
|
|
8496
|
+
hasDefault: true;
|
|
7603
8497
|
isPrimaryKey: false;
|
|
7604
8498
|
isAutoincrement: false;
|
|
7605
8499
|
hasRuntimeDefault: false;
|
|
@@ -7608,16 +8502,23 @@ declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7608
8502
|
identity: undefined;
|
|
7609
8503
|
generated: undefined;
|
|
7610
8504
|
}, {}, {}>;
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
8505
|
+
};
|
|
8506
|
+
dialect: "pg";
|
|
8507
|
+
}>;
|
|
8508
|
+
declare const pendingLinks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8509
|
+
name: EnumTableName.PENDING_LINKS;
|
|
8510
|
+
schema: "router_v1.15";
|
|
8511
|
+
columns: {
|
|
8512
|
+
key: drizzle_orm_pg_core0.PgColumn<{
|
|
8513
|
+
name: "key";
|
|
8514
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7614
8515
|
dataType: "string";
|
|
7615
8516
|
columnType: "PgVarchar";
|
|
7616
8517
|
data: string;
|
|
7617
8518
|
driverParam: string;
|
|
7618
8519
|
notNull: true;
|
|
7619
8520
|
hasDefault: false;
|
|
7620
|
-
isPrimaryKey:
|
|
8521
|
+
isPrimaryKey: true;
|
|
7621
8522
|
isAutoincrement: false;
|
|
7622
8523
|
hasRuntimeDefault: false;
|
|
7623
8524
|
enumValues: [string, ...string[]];
|
|
@@ -7625,94 +8526,64 @@ declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7625
8526
|
identity: undefined;
|
|
7626
8527
|
generated: undefined;
|
|
7627
8528
|
}, {}, {
|
|
7628
|
-
length:
|
|
8529
|
+
length: 191;
|
|
7629
8530
|
}>;
|
|
7630
|
-
|
|
7631
|
-
name: "
|
|
7632
|
-
tableName: EnumTableName.
|
|
7633
|
-
dataType: "
|
|
7634
|
-
columnType: "
|
|
7635
|
-
data:
|
|
7636
|
-
driverParam: string
|
|
8531
|
+
type: drizzle_orm_pg_core0.PgColumn<{
|
|
8532
|
+
name: "type";
|
|
8533
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
8534
|
+
dataType: "string";
|
|
8535
|
+
columnType: "PgText";
|
|
8536
|
+
data: string;
|
|
8537
|
+
driverParam: string;
|
|
7637
8538
|
notNull: true;
|
|
7638
8539
|
hasDefault: false;
|
|
7639
8540
|
isPrimaryKey: false;
|
|
7640
8541
|
isAutoincrement: false;
|
|
7641
8542
|
hasRuntimeDefault: false;
|
|
7642
|
-
enumValues:
|
|
8543
|
+
enumValues: [string, ...string[]];
|
|
7643
8544
|
baseColumn: never;
|
|
7644
8545
|
identity: undefined;
|
|
7645
8546
|
generated: undefined;
|
|
7646
8547
|
}, {}, {}>;
|
|
7647
|
-
|
|
7648
|
-
name: "
|
|
7649
|
-
tableName: EnumTableName.
|
|
7650
|
-
dataType: "
|
|
7651
|
-
columnType: "
|
|
7652
|
-
data:
|
|
8548
|
+
status: drizzle_orm_pg_core0.PgColumn<{
|
|
8549
|
+
name: "status";
|
|
8550
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
8551
|
+
dataType: "string";
|
|
8552
|
+
columnType: "PgText";
|
|
8553
|
+
data: string;
|
|
7653
8554
|
driverParam: string;
|
|
7654
8555
|
notNull: true;
|
|
7655
|
-
hasDefault:
|
|
8556
|
+
hasDefault: false;
|
|
7656
8557
|
isPrimaryKey: false;
|
|
7657
8558
|
isAutoincrement: false;
|
|
7658
8559
|
hasRuntimeDefault: false;
|
|
7659
|
-
enumValues:
|
|
8560
|
+
enumValues: [string, ...string[]];
|
|
7660
8561
|
baseColumn: never;
|
|
7661
8562
|
identity: undefined;
|
|
7662
8563
|
generated: undefined;
|
|
7663
8564
|
}, {}, {}>;
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
declare const StatusCode: drizzle_orm_pg_core0.PgEnum<[Status, ...Status[]]>;
|
|
7668
|
-
declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7669
|
-
name: "status";
|
|
7670
|
-
schema: "router_v1.13";
|
|
7671
|
-
columns: {
|
|
7672
|
-
id: drizzle_orm_pg_core0.PgColumn<{
|
|
7673
|
-
name: "id";
|
|
7674
|
-
tableName: "status";
|
|
8565
|
+
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
8566
|
+
name: "chain_id";
|
|
8567
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7675
8568
|
dataType: "number";
|
|
7676
|
-
columnType: "
|
|
7677
|
-
data:
|
|
7678
|
-
driverParam: number;
|
|
8569
|
+
columnType: "PgBigInt53";
|
|
8570
|
+
data: Id;
|
|
8571
|
+
driverParam: string | number;
|
|
7679
8572
|
notNull: true;
|
|
7680
|
-
hasDefault: true;
|
|
7681
|
-
isPrimaryKey: true;
|
|
7682
|
-
isAutoincrement: false;
|
|
7683
|
-
hasRuntimeDefault: false;
|
|
7684
|
-
enumValues: undefined;
|
|
7685
|
-
baseColumn: never;
|
|
7686
|
-
identity: undefined;
|
|
7687
|
-
generated: undefined;
|
|
7688
|
-
}, {}, {}>;
|
|
7689
|
-
code: drizzle_orm_pg_core0.PgColumn<{
|
|
7690
|
-
name: "code";
|
|
7691
|
-
tableName: "status";
|
|
7692
|
-
dataType: "string";
|
|
7693
|
-
columnType: "PgEnumColumn";
|
|
7694
|
-
data: Status;
|
|
7695
|
-
driverParam: string;
|
|
7696
|
-
notNull: false;
|
|
7697
8573
|
hasDefault: false;
|
|
7698
8574
|
isPrimaryKey: false;
|
|
7699
8575
|
isAutoincrement: false;
|
|
7700
8576
|
hasRuntimeDefault: false;
|
|
7701
|
-
enumValues:
|
|
8577
|
+
enumValues: undefined;
|
|
7702
8578
|
baseColumn: never;
|
|
7703
8579
|
identity: undefined;
|
|
7704
8580
|
generated: undefined;
|
|
7705
|
-
}, {}, {
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
schema: "router_v1.13";
|
|
7712
|
-
columns: {
|
|
7713
|
-
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
7714
|
-
name: "offer_hash";
|
|
7715
|
-
tableName: "validations";
|
|
8581
|
+
}, {}, {
|
|
8582
|
+
$type: Id;
|
|
8583
|
+
}>;
|
|
8584
|
+
eventId: drizzle_orm_pg_core0.PgColumn<{
|
|
8585
|
+
name: "event_id";
|
|
8586
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7716
8587
|
dataType: "string";
|
|
7717
8588
|
columnType: "PgVarchar";
|
|
7718
8589
|
data: string;
|
|
@@ -7727,11 +8598,11 @@ declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7727
8598
|
identity: undefined;
|
|
7728
8599
|
generated: undefined;
|
|
7729
8600
|
}, {}, {
|
|
7730
|
-
length:
|
|
8601
|
+
length: 128;
|
|
7731
8602
|
}>;
|
|
7732
8603
|
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
7733
8604
|
name: "obligation_id";
|
|
7734
|
-
tableName:
|
|
8605
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7735
8606
|
dataType: "string";
|
|
7736
8607
|
columnType: "PgVarchar";
|
|
7737
8608
|
data: string;
|
|
@@ -7746,11 +8617,11 @@ declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7746
8617
|
identity: undefined;
|
|
7747
8618
|
generated: undefined;
|
|
7748
8619
|
}, {}, {
|
|
7749
|
-
length:
|
|
8620
|
+
length: 66;
|
|
7750
8621
|
}>;
|
|
7751
|
-
|
|
7752
|
-
name: "
|
|
7753
|
-
tableName:
|
|
8622
|
+
collateralIndex: drizzle_orm_pg_core0.PgColumn<{
|
|
8623
|
+
name: "collateral_index";
|
|
8624
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7754
8625
|
dataType: "number";
|
|
7755
8626
|
columnType: "PgInteger";
|
|
7756
8627
|
data: number;
|
|
@@ -7765,71 +8636,45 @@ declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7765
8636
|
identity: undefined;
|
|
7766
8637
|
generated: undefined;
|
|
7767
8638
|
}, {}, {}>;
|
|
7768
|
-
|
|
7769
|
-
name: "
|
|
7770
|
-
tableName:
|
|
7771
|
-
dataType: "
|
|
7772
|
-
columnType: "
|
|
7773
|
-
data:
|
|
8639
|
+
user: drizzle_orm_pg_core0.PgColumn<{
|
|
8640
|
+
name: "user";
|
|
8641
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
8642
|
+
dataType: "string";
|
|
8643
|
+
columnType: "PgVarchar";
|
|
8644
|
+
data: string;
|
|
7774
8645
|
driverParam: string;
|
|
7775
8646
|
notNull: true;
|
|
7776
|
-
hasDefault: true;
|
|
7777
|
-
isPrimaryKey: false;
|
|
7778
|
-
isAutoincrement: false;
|
|
7779
|
-
hasRuntimeDefault: false;
|
|
7780
|
-
enumValues: undefined;
|
|
7781
|
-
baseColumn: never;
|
|
7782
|
-
identity: undefined;
|
|
7783
|
-
generated: undefined;
|
|
7784
|
-
}, {}, {}>;
|
|
7785
|
-
};
|
|
7786
|
-
dialect: "pg";
|
|
7787
|
-
}>;
|
|
7788
|
-
declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7789
|
-
name: EnumTableName.COLLECTORS;
|
|
7790
|
-
schema: "router_v1.13";
|
|
7791
|
-
columns: {
|
|
7792
|
-
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7793
|
-
name: "chain_id";
|
|
7794
|
-
tableName: EnumTableName.COLLECTORS;
|
|
7795
|
-
dataType: "number";
|
|
7796
|
-
columnType: "PgBigInt53";
|
|
7797
|
-
data: Id;
|
|
7798
|
-
driverParam: string | number;
|
|
7799
|
-
notNull: true;
|
|
7800
8647
|
hasDefault: false;
|
|
7801
8648
|
isPrimaryKey: false;
|
|
7802
8649
|
isAutoincrement: false;
|
|
7803
8650
|
hasRuntimeDefault: false;
|
|
7804
|
-
enumValues:
|
|
8651
|
+
enumValues: [string, ...string[]];
|
|
7805
8652
|
baseColumn: never;
|
|
7806
8653
|
identity: undefined;
|
|
7807
8654
|
generated: undefined;
|
|
7808
8655
|
}, {}, {
|
|
7809
|
-
|
|
8656
|
+
length: 42;
|
|
7810
8657
|
}>;
|
|
7811
|
-
|
|
7812
|
-
name: "
|
|
7813
|
-
tableName: EnumTableName.
|
|
8658
|
+
amount: drizzle_orm_pg_core0.PgColumn<{
|
|
8659
|
+
name: "amount";
|
|
8660
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7814
8661
|
dataType: "string";
|
|
7815
|
-
columnType: "
|
|
7816
|
-
data:
|
|
8662
|
+
columnType: "PgNumeric";
|
|
8663
|
+
data: string;
|
|
7817
8664
|
driverParam: string;
|
|
7818
8665
|
notNull: true;
|
|
7819
8666
|
hasDefault: false;
|
|
7820
8667
|
isPrimaryKey: false;
|
|
7821
8668
|
isAutoincrement: false;
|
|
7822
8669
|
hasRuntimeDefault: false;
|
|
7823
|
-
enumValues:
|
|
8670
|
+
enumValues: undefined;
|
|
7824
8671
|
baseColumn: never;
|
|
7825
8672
|
identity: undefined;
|
|
7826
8673
|
generated: undefined;
|
|
7827
|
-
}, {}, {
|
|
7828
|
-
$type: "morpho_v2" | "offers" | "positions" | "prices";
|
|
7829
|
-
}>;
|
|
8674
|
+
}, {}, {}>;
|
|
7830
8675
|
blockNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
7831
8676
|
name: "block_number";
|
|
7832
|
-
tableName: EnumTableName.
|
|
8677
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7833
8678
|
dataType: "number";
|
|
7834
8679
|
columnType: "PgBigInt53";
|
|
7835
8680
|
data: number;
|
|
@@ -7844,15 +8689,15 @@ declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7844
8689
|
identity: undefined;
|
|
7845
8690
|
generated: undefined;
|
|
7846
8691
|
}, {}, {}>;
|
|
7847
|
-
|
|
7848
|
-
name: "
|
|
7849
|
-
tableName: EnumTableName.
|
|
7850
|
-
dataType: "
|
|
7851
|
-
columnType: "
|
|
7852
|
-
data:
|
|
7853
|
-
driverParam: string;
|
|
8692
|
+
firstSeenBlock: drizzle_orm_pg_core0.PgColumn<{
|
|
8693
|
+
name: "first_seen_block";
|
|
8694
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
8695
|
+
dataType: "number";
|
|
8696
|
+
columnType: "PgBigInt53";
|
|
8697
|
+
data: number;
|
|
8698
|
+
driverParam: string | number;
|
|
7854
8699
|
notNull: true;
|
|
7855
|
-
hasDefault:
|
|
8700
|
+
hasDefault: false;
|
|
7856
8701
|
isPrimaryKey: false;
|
|
7857
8702
|
isAutoincrement: false;
|
|
7858
8703
|
hasRuntimeDefault: false;
|
|
@@ -7861,15 +8706,15 @@ declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7861
8706
|
identity: undefined;
|
|
7862
8707
|
generated: undefined;
|
|
7863
8708
|
}, {}, {}>;
|
|
7864
|
-
|
|
7865
|
-
name: "
|
|
7866
|
-
tableName: EnumTableName.
|
|
7867
|
-
dataType: "
|
|
7868
|
-
columnType: "
|
|
7869
|
-
data:
|
|
7870
|
-
driverParam: string;
|
|
7871
|
-
notNull:
|
|
7872
|
-
hasDefault:
|
|
8709
|
+
lastTriedBlock: drizzle_orm_pg_core0.PgColumn<{
|
|
8710
|
+
name: "last_tried_block";
|
|
8711
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
8712
|
+
dataType: "number";
|
|
8713
|
+
columnType: "PgBigInt53";
|
|
8714
|
+
data: number;
|
|
8715
|
+
driverParam: string | number;
|
|
8716
|
+
notNull: false;
|
|
8717
|
+
hasDefault: false;
|
|
7873
8718
|
isPrimaryKey: false;
|
|
7874
8719
|
isAutoincrement: false;
|
|
7875
8720
|
hasRuntimeDefault: false;
|
|
@@ -7878,22 +8723,15 @@ declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7878
8723
|
identity: undefined;
|
|
7879
8724
|
generated: undefined;
|
|
7880
8725
|
}, {}, {}>;
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
declare const chains: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7885
|
-
name: EnumTableName.CHAINS;
|
|
7886
|
-
schema: "router_v1.13";
|
|
7887
|
-
columns: {
|
|
7888
|
-
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7889
|
-
name: "chain_id";
|
|
7890
|
-
tableName: EnumTableName.CHAINS;
|
|
8726
|
+
attempts: drizzle_orm_pg_core0.PgColumn<{
|
|
8727
|
+
name: "attempts";
|
|
8728
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7891
8729
|
dataType: "number";
|
|
7892
|
-
columnType: "
|
|
7893
|
-
data:
|
|
8730
|
+
columnType: "PgInteger";
|
|
8731
|
+
data: number;
|
|
7894
8732
|
driverParam: string | number;
|
|
7895
8733
|
notNull: true;
|
|
7896
|
-
hasDefault:
|
|
8734
|
+
hasDefault: true;
|
|
7897
8735
|
isPrimaryKey: false;
|
|
7898
8736
|
isAutoincrement: false;
|
|
7899
8737
|
hasRuntimeDefault: false;
|
|
@@ -7901,35 +8739,33 @@ declare const chains: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7901
8739
|
baseColumn: never;
|
|
7902
8740
|
identity: undefined;
|
|
7903
8741
|
generated: undefined;
|
|
7904
|
-
}, {}, {
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
driverParam: string | number;
|
|
7914
|
-
notNull: true;
|
|
8742
|
+
}, {}, {}>;
|
|
8743
|
+
ignoredReason: drizzle_orm_pg_core0.PgColumn<{
|
|
8744
|
+
name: "ignored_reason";
|
|
8745
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
8746
|
+
dataType: "string";
|
|
8747
|
+
columnType: "PgText";
|
|
8748
|
+
data: string;
|
|
8749
|
+
driverParam: string;
|
|
8750
|
+
notNull: false;
|
|
7915
8751
|
hasDefault: false;
|
|
7916
8752
|
isPrimaryKey: false;
|
|
7917
8753
|
isAutoincrement: false;
|
|
7918
8754
|
hasRuntimeDefault: false;
|
|
7919
|
-
enumValues:
|
|
8755
|
+
enumValues: [string, ...string[]];
|
|
7920
8756
|
baseColumn: never;
|
|
7921
8757
|
identity: undefined;
|
|
7922
8758
|
generated: undefined;
|
|
7923
8759
|
}, {}, {}>;
|
|
7924
|
-
|
|
7925
|
-
name: "
|
|
7926
|
-
tableName: EnumTableName.
|
|
7927
|
-
dataType: "
|
|
7928
|
-
columnType: "
|
|
7929
|
-
data:
|
|
8760
|
+
resolvedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
8761
|
+
name: "resolved_at";
|
|
8762
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
8763
|
+
dataType: "date";
|
|
8764
|
+
columnType: "PgTimestamp";
|
|
8765
|
+
data: Date;
|
|
7930
8766
|
driverParam: string;
|
|
7931
|
-
notNull:
|
|
7932
|
-
hasDefault:
|
|
8767
|
+
notNull: false;
|
|
8768
|
+
hasDefault: false;
|
|
7933
8769
|
isPrimaryKey: false;
|
|
7934
8770
|
isAutoincrement: false;
|
|
7935
8771
|
hasRuntimeDefault: false;
|
|
@@ -7940,7 +8776,7 @@ declare const chains: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7940
8776
|
}, {}, {}>;
|
|
7941
8777
|
updatedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
7942
8778
|
name: "updated_at";
|
|
7943
|
-
tableName: EnumTableName.
|
|
8779
|
+
tableName: EnumTableName.PENDING_LINKS;
|
|
7944
8780
|
dataType: "date";
|
|
7945
8781
|
columnType: "PgTimestamp";
|
|
7946
8782
|
data: Date;
|
|
@@ -7960,7 +8796,7 @@ declare const chains: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7960
8796
|
}>;
|
|
7961
8797
|
declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7962
8798
|
name: EnumTableName.TREES;
|
|
7963
|
-
schema: "router_v1.
|
|
8799
|
+
schema: "router_v1.15";
|
|
7964
8800
|
columns: {
|
|
7965
8801
|
root: drizzle_orm_pg_core0.PgColumn<{
|
|
7966
8802
|
name: "root";
|
|
@@ -8022,7 +8858,7 @@ declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8022
8858
|
}>;
|
|
8023
8859
|
declare const merklePaths: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8024
8860
|
name: EnumTableName.MERKLE_PATHS;
|
|
8025
|
-
schema: "router_v1.
|
|
8861
|
+
schema: "router_v1.15";
|
|
8026
8862
|
columns: {
|
|
8027
8863
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
8028
8864
|
name: "offer_hash";
|
|
@@ -8060,7 +8896,7 @@ declare const merklePaths: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8060
8896
|
identity: undefined;
|
|
8061
8897
|
generated: undefined;
|
|
8062
8898
|
}, {}, {
|
|
8063
|
-
length:
|
|
8899
|
+
length: 66;
|
|
8064
8900
|
}>;
|
|
8065
8901
|
treeRoot: drizzle_orm_pg_core0.PgColumn<{
|
|
8066
8902
|
name: "tree_root";
|
|
@@ -8119,7 +8955,7 @@ declare const merklePaths: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8119
8955
|
dialect: "pg";
|
|
8120
8956
|
}>;
|
|
8121
8957
|
declare namespace index_d_exports$2 {
|
|
8122
|
-
export { CallbackTypes, PositionTypes, StatusCode, TABLE_NAMES, TableName, VERSION, VERSIONED_TABLE_NAMES, VersionedTableName, callbacks$1 as callbacks, chains, collectors, consumedEvents, groups, lots, lotsPositions, merklePaths, obligationCollateralsV2, obligationIdKeys, obligations, offers, offersCallbacks, offsets, oracles, positionTypes, positions, status, transfers, trees, validations };
|
|
8958
|
+
export { CallbackTypes, PositionTypes, StatusCode, TABLE_NAMES, TableName, VERSION, VERSIONED_TABLE_NAMES, VersionedTableName, callbacks$1 as callbacks, chains, collectors, consumedEvents, groups, lots, lotsPositions, merklePaths, obligationCollateralsV2, obligationIdKeys, obligations, offers, offersCallbacks, offsets, oracles, pendingLinks, positionTypes, positions, status, transfers, trees, validations };
|
|
8123
8959
|
}
|
|
8124
8960
|
//#endregion
|
|
8125
8961
|
//#region src/gatekeeper/morphoRules.d.ts
|
|
@@ -8131,7 +8967,7 @@ declare const morphoRules: (parameters: {
|
|
|
8131
8967
|
};
|
|
8132
8968
|
}) => Rule<Offer, string>[];
|
|
8133
8969
|
declare namespace Rules_d_exports {
|
|
8134
|
-
export {
|
|
8970
|
+
export { amountNonZero, callback, collateralToken, groupConsistency, groupImmutability, loanToken, maturity, maxCollaterals, minDuration, oracle, sameMaker };
|
|
8135
8971
|
}
|
|
8136
8972
|
declare const maturity: ({
|
|
8137
8973
|
maturities
|
|
@@ -8186,11 +9022,6 @@ declare const oracle: ({
|
|
|
8186
9022
|
* This rule is signing-agnostic; signer verification is handled at the collector level.
|
|
8187
9023
|
*/
|
|
8188
9024
|
declare const sameMaker: () => Rule<Offer, "mixed_maker">;
|
|
8189
|
-
/**
|
|
8190
|
-
* A validation rule that ensures mutual exclusivity of offer amount fields.
|
|
8191
|
-
* At most one of (assets, obligationUnits, obligationShares) can be non-zero.
|
|
8192
|
-
* Matches contract requirement: `atMostOneNonZero(offer.assets, offer.obligationUnits, offer.obligationShares)`.
|
|
8193
|
-
*/
|
|
8194
9025
|
/**
|
|
8195
9026
|
* A validation rule that checks if the offer duration (expiry - start) meets a minimum threshold.
|
|
8196
9027
|
* @param minSeconds - Minimum required duration in seconds.
|
|
@@ -8212,10 +9043,16 @@ declare const maxCollaterals: ({
|
|
|
8212
9043
|
}: {
|
|
8213
9044
|
max: number;
|
|
8214
9045
|
}) => Rule<Offer, "max_collaterals">;
|
|
8215
|
-
|
|
9046
|
+
/**
|
|
9047
|
+
* A validation rule that checks if the offer's obligationUnits is non-zero.
|
|
9048
|
+
* The contract requires a positive amount; this rule rejects early.
|
|
9049
|
+
* @returns The issue that was found. If the offer is valid, this will be undefined.
|
|
9050
|
+
*/
|
|
9051
|
+
declare const amountNonZero: () => Rule<Offer, "amount_non_zero">;
|
|
8216
9052
|
/**
|
|
8217
9053
|
* A batch validation rule that ensures all offers within the same group are consistent.
|
|
8218
|
-
* All offers sharing the same group must have the same loan token,
|
|
9054
|
+
* All offers sharing the same group must have the same loan token, obligationUnits,
|
|
9055
|
+
* and side (buy/sell). The contract tracks consumed per group and requires these to match.
|
|
8219
9056
|
*/
|
|
8220
9057
|
declare const groupConsistency: () => Rule<Offer, "group_consistency">;
|
|
8221
9058
|
/**
|
|
@@ -8397,6 +9234,20 @@ declare function lazy<T>(pollFn: (emit: (value: T) => void, {
|
|
|
8397
9234
|
stop: () => void;
|
|
8398
9235
|
}) => () => boolean): () => AsyncGenerator<Awaited<NonNullable<T>>, void, unknown>;
|
|
8399
9236
|
//#endregion
|
|
9237
|
+
//#region src/utils/mapWithConcurrency.d.ts
|
|
9238
|
+
/**
|
|
9239
|
+
* Map values with a bounded number of concurrent async workers.
|
|
9240
|
+
*
|
|
9241
|
+
* Result ordering always matches the input order.
|
|
9242
|
+
* @param parameters - Input values, concurrency limit, and async mapper.
|
|
9243
|
+
* @returns Mapped results in input order.
|
|
9244
|
+
*/
|
|
9245
|
+
declare function mapWithConcurrency<value, result>(parameters: {
|
|
9246
|
+
values: value[];
|
|
9247
|
+
limit: number;
|
|
9248
|
+
run: (value: value, index: number) => Promise<result>;
|
|
9249
|
+
}): Promise<result[]>;
|
|
9250
|
+
//#endregion
|
|
8400
9251
|
//#region src/utils/poll.d.ts
|
|
8401
9252
|
/**
|
|
8402
9253
|
* Polls a function at a specified interval.
|
|
@@ -8412,8 +9263,19 @@ declare function poll<data>(fn: ({
|
|
|
8412
9263
|
interval: () => Promise<number>;
|
|
8413
9264
|
}): () => boolean;
|
|
8414
9265
|
declare namespace Random_d_exports {
|
|
8415
|
-
export { address, bool, bytes, float, hex, int, seed, withSeed };
|
|
9266
|
+
export { SeededRng, address, bool, bytes, createRng, float, hex, int, seed, withSeed };
|
|
8416
9267
|
}
|
|
9268
|
+
/** Isolated RNG instance with convenience methods. */
|
|
9269
|
+
interface SeededRng {
|
|
9270
|
+
float(): number;
|
|
9271
|
+
int(maxExclusive: number, min?: number): number;
|
|
9272
|
+
bool(probability?: number): boolean;
|
|
9273
|
+
}
|
|
9274
|
+
/**
|
|
9275
|
+
* Creates an isolated seeded RNG instance — safe for concurrent use.
|
|
9276
|
+
* @param seed - Seed string used to derive the initial RNG state.
|
|
9277
|
+
*/
|
|
9278
|
+
declare function createRng(seed: string): SeededRng;
|
|
8417
9279
|
/**
|
|
8418
9280
|
* Runs a function with a deterministic RNG derived from the given seed.
|
|
8419
9281
|
*/
|
|
@@ -8455,10 +9317,19 @@ declare namespace time_d_exports {
|
|
|
8455
9317
|
declare function now(): number;
|
|
8456
9318
|
declare function max$1(): number;
|
|
8457
9319
|
//#endregion
|
|
9320
|
+
//#region src/utils/trim.d.ts
|
|
9321
|
+
/**
|
|
9322
|
+
* Keep the last `keep` entries from an array.
|
|
9323
|
+
* @param array - Source array.
|
|
9324
|
+
* @param keep - Number of entries to keep.
|
|
9325
|
+
* @returns Trimmed copy.
|
|
9326
|
+
*/
|
|
9327
|
+
declare const trimTail: <entry>(array: readonly entry[], keep: number) => entry[];
|
|
9328
|
+
//#endregion
|
|
8458
9329
|
//#region src/utils/wait.d.ts
|
|
8459
9330
|
declare function wait(time: number): Promise<unknown>;
|
|
8460
9331
|
declare namespace index_d_exports$3 {
|
|
8461
|
-
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$2 as max, min, poll, retry, stringifyBigint, toSnakeCase$1 as toSnakeCase, wait };
|
|
9332
|
+
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, mapWithConcurrency, max$2 as max, min, poll, retry, stringifyBigint, toSnakeCase$1 as toSnakeCase, trimTail, wait };
|
|
8462
9333
|
}
|
|
8463
9334
|
//#endregion
|
|
8464
9335
|
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, Id_d_exports as Id, 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, Tick_d_exports as Tick, 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 };
|