@morpho-dev/router 0.7.2 → 0.9.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.
Files changed (68) hide show
  1. package/dist/cli.js +834 -334
  2. package/dist/drizzle/migrations/0000_setup_single_migration_folder.sql +64 -64
  3. package/dist/drizzle/migrations/0001_add-trigger-for-consumed-events.sql +5 -5
  4. package/dist/drizzle/migrations/0002_insert-status-code.sql +1 -1
  5. package/dist/drizzle/migrations/0003_update-triggers-for-consumed-events.sql +1 -1
  6. package/dist/drizzle/migrations/0004_drop-status-offers-foreign-key-constraint.sql +1 -1
  7. package/dist/drizzle/migrations/0005_add-index-to-boost-group-query-and-offer-hash.sql +1 -1
  8. package/dist/drizzle/migrations/0006_add-callbacks-and-positions-relations.sql +11 -11
  9. package/dist/drizzle/migrations/0008_validation.sql +10 -10
  10. package/dist/drizzle/migrations/0009_add-transfers-table.sql +4 -4
  11. package/dist/drizzle/migrations/0010_add-price.sql +1 -1
  12. package/dist/drizzle/migrations/0011_nullable-callback-amount.sql +1 -1
  13. package/dist/drizzle/migrations/0012_add-position-asset.sql +1 -1
  14. package/dist/drizzle/migrations/0013_remove-depecrated-domains.sql +13 -13
  15. package/dist/drizzle/migrations/0014_rename-offers-v2-into-offers.sql +19 -19
  16. package/dist/drizzle/migrations/0015_add-lots-table.sql +3 -3
  17. package/dist/drizzle/migrations/0016_merkle-metadata.sql +7 -7
  18. package/dist/drizzle/migrations/0017_dusty_the_hunter.sql +1 -1
  19. package/dist/drizzle/migrations/0018_add_chain_collector_constraints.sql +3 -3
  20. package/dist/drizzle/migrations/0019_add-obligation-units-shares.sql +2 -2
  21. package/dist/drizzle/migrations/0020_add-session.sql +1 -1
  22. package/dist/drizzle/migrations/0021_drop_chain_collector_epoch_indexes.sql +2 -2
  23. package/dist/drizzle/migrations/0021_migrate-rate-to-price.sql +6 -6
  24. package/dist/drizzle/migrations/0022_consolidate-price.sql +5 -5
  25. package/dist/drizzle/migrations/0023_remove-block-number-for-collaterals.sql +1 -1
  26. package/dist/drizzle/migrations/0024_add-obligation-id-to-lots.sql +8 -0
  27. package/dist/drizzle/migrations/0025_rename-price-to-tick.sql +202 -0
  28. package/dist/drizzle/migrations/0026_add-receiver-if-maker-is-seller.sql +1 -0
  29. package/dist/drizzle/migrations/meta/0000_snapshot.json +48 -48
  30. package/dist/drizzle/migrations/meta/0001_snapshot.json +48 -48
  31. package/dist/drizzle/migrations/meta/0002_snapshot.json +48 -48
  32. package/dist/drizzle/migrations/meta/0003_snapshot.json +48 -48
  33. package/dist/drizzle/migrations/meta/0004_snapshot.json +47 -47
  34. package/dist/drizzle/migrations/meta/0005_snapshot.json +47 -47
  35. package/dist/drizzle/migrations/meta/0006_snapshot.json +61 -61
  36. package/dist/drizzle/migrations/meta/0008_snapshot.json +62 -62
  37. package/dist/drizzle/migrations/meta/0009_snapshot.json +66 -66
  38. package/dist/drizzle/migrations/meta/0010_snapshot.json +66 -66
  39. package/dist/drizzle/migrations/meta/0013_snapshot.json +48 -48
  40. package/dist/drizzle/migrations/meta/0014_snapshot.json +48 -48
  41. package/dist/drizzle/migrations/meta/0015_snapshot.json +52 -52
  42. package/dist/drizzle/migrations/meta/0016_snapshot.json +61 -61
  43. package/dist/drizzle/migrations/meta/0017_snapshot.json +61 -61
  44. package/dist/drizzle/migrations/meta/0018_snapshot.json +62 -62
  45. package/dist/drizzle/migrations/meta/0019_snapshot.json +62 -62
  46. package/dist/drizzle/migrations/meta/0023_snapshot.json +62 -62
  47. package/dist/drizzle/migrations/meta/0024_snapshot.json +1448 -0
  48. package/dist/drizzle/migrations/meta/0025_snapshot.json +1448 -0
  49. package/dist/drizzle/migrations/meta/0026_snapshot.json +1454 -0
  50. package/dist/drizzle/migrations/meta/_journal.json +21 -0
  51. package/dist/evm/bytecode/morpho.txt +1 -1
  52. package/dist/index.browser.d.mts +206 -77
  53. package/dist/index.browser.d.mts.map +1 -1
  54. package/dist/index.browser.d.ts +206 -77
  55. package/dist/index.browser.d.ts.map +1 -1
  56. package/dist/index.browser.js +445 -197
  57. package/dist/index.browser.js.map +1 -1
  58. package/dist/index.browser.mjs +440 -198
  59. package/dist/index.browser.mjs.map +1 -1
  60. package/dist/index.node.d.mts +347 -119
  61. package/dist/index.node.d.mts.map +1 -1
  62. package/dist/index.node.d.ts +347 -119
  63. package/dist/index.node.d.ts.map +1 -1
  64. package/dist/index.node.js +865 -312
  65. package/dist/index.node.js.map +1 -1
  66. package/dist/index.node.mjs +861 -314
  67. package/dist/index.node.mjs.map +1 -1
  68. package/package.json +1 -1
@@ -510,7 +510,7 @@ declare const MorphoV2: readonly [{
510
510
  readonly stateMutability: "nonpayable";
511
511
  readonly inputs: readonly [{
512
512
  readonly type: "address";
513
- readonly name: "recipient";
513
+ readonly name: "feeRecipient";
514
514
  }];
515
515
  readonly outputs: readonly [];
516
516
  }, {
@@ -590,6 +590,15 @@ declare const MorphoV2: readonly [{
590
590
  }, {
591
591
  readonly type: "address";
592
592
  readonly name: "taker";
593
+ }, {
594
+ readonly type: "address";
595
+ readonly name: "takerCallback";
596
+ }, {
597
+ readonly type: "bytes";
598
+ readonly name: "takerCallbackData";
599
+ }, {
600
+ readonly type: "address";
601
+ readonly name: "receiverIfTakerIsSeller";
593
602
  }, {
594
603
  readonly type: "tuple";
595
604
  readonly components: readonly [{
@@ -651,6 +660,9 @@ declare const MorphoV2: readonly [{
651
660
  }, {
652
661
  readonly type: "bytes";
653
662
  readonly name: "callbackData";
663
+ }, {
664
+ readonly type: "address";
665
+ readonly name: "receiverIfMakerIsSeller";
654
666
  }];
655
667
  readonly name: "offer";
656
668
  }, {
@@ -672,12 +684,6 @@ declare const MorphoV2: readonly [{
672
684
  }, {
673
685
  readonly type: "bytes32[]";
674
686
  readonly name: "proof";
675
- }, {
676
- readonly type: "address";
677
- readonly name: "takerCallback";
678
- }, {
679
- readonly type: "bytes";
680
- readonly name: "takerCallbackData";
681
687
  }];
682
688
  readonly outputs: readonly [{
683
689
  readonly type: "uint256";
@@ -799,6 +805,9 @@ declare const MorphoV2: readonly [{
799
805
  }, {
800
806
  readonly type: "address";
801
807
  readonly name: "onBehalf";
808
+ }, {
809
+ readonly type: "address";
810
+ readonly name: "receiver";
802
811
  }];
803
812
  readonly outputs: readonly [{
804
813
  readonly type: "uint256";
@@ -841,6 +850,9 @@ declare const MorphoV2: readonly [{
841
850
  }, {
842
851
  readonly type: "address";
843
852
  readonly name: "onBehalf";
853
+ }, {
854
+ readonly type: "address";
855
+ readonly name: "receiver";
844
856
  }];
845
857
  readonly outputs: readonly [];
846
858
  }, {
@@ -1028,7 +1040,7 @@ declare const MorphoV2: readonly [{
1028
1040
  readonly type: "event";
1029
1041
  readonly inputs: readonly [{
1030
1042
  readonly type: "address";
1031
- readonly name: "recipient";
1043
+ readonly name: "feeRecipient";
1032
1044
  readonly indexed: true;
1033
1045
  }];
1034
1046
  }, {
@@ -1103,6 +1115,9 @@ declare const MorphoV2: readonly [{
1103
1115
  }, {
1104
1116
  readonly type: "bool";
1105
1117
  readonly name: "sellerIsBorrower";
1118
+ }, {
1119
+ readonly type: "address";
1120
+ readonly name: "sellerReceiver";
1106
1121
  }, {
1107
1122
  readonly type: "bytes32";
1108
1123
  readonly name: "group";
@@ -1116,7 +1131,6 @@ declare const MorphoV2: readonly [{
1116
1131
  readonly inputs: readonly [{
1117
1132
  readonly type: "address";
1118
1133
  readonly name: "caller";
1119
- readonly indexed: true;
1120
1134
  }, {
1121
1135
  readonly type: "bytes32";
1122
1136
  readonly name: "id";
@@ -1131,6 +1145,10 @@ declare const MorphoV2: readonly [{
1131
1145
  readonly type: "address";
1132
1146
  readonly name: "onBehalf";
1133
1147
  readonly indexed: true;
1148
+ }, {
1149
+ readonly type: "address";
1150
+ readonly name: "receiver";
1151
+ readonly indexed: true;
1134
1152
  }];
1135
1153
  }, {
1136
1154
  readonly name: "WithdrawCollateral";
@@ -1153,6 +1171,9 @@ declare const MorphoV2: readonly [{
1153
1171
  readonly type: "address";
1154
1172
  readonly name: "onBehalf";
1155
1173
  readonly indexed: true;
1174
+ }, {
1175
+ readonly type: "address";
1176
+ readonly name: "receiver";
1156
1177
  }];
1157
1178
  }];
1158
1179
  type MorphoV2 = typeof MorphoV2;
@@ -1872,8 +1893,8 @@ type Offer = {
1872
1893
  /** The address that made the offer. */readonly maker: Address; /** The amount of assets offered. Mutually exclusive with obligationUnits and obligationShares. */
1873
1894
  readonly assets: bigint; /** The max debt units to trade. Mutually exclusive with assets and obligationShares. */
1874
1895
  readonly obligationUnits: bigint; /** The max lending shares to trade. Mutually exclusive with assets and obligationUnits. */
1875
- readonly obligationShares: bigint; /** The price (18 decimals). */
1876
- readonly price: bigint; /** The date at which all interests will be paid. */
1896
+ readonly obligationShares: bigint; /** The offer tick. */
1897
+ readonly tick: number; /** The date at which all interests will be paid. */
1877
1898
  readonly maturity: Maturity; /** The date at which the offer will expire. */
1878
1899
  readonly expiry: number; /** The date at which the offer will start. */
1879
1900
  readonly start: number; /** The group. Used for OCO (One-Cancelled-Other) mechanism. */
@@ -1886,7 +1907,8 @@ type Offer = {
1886
1907
  readonly callback: {
1887
1908
  readonly address: Address;
1888
1909
  readonly data: Hex;
1889
- };
1910
+ }; /** Receiver of loan token proceeds when maker is seller on `take()`. */
1911
+ readonly receiverIfMakerIsSeller: Address;
1890
1912
  };
1891
1913
  declare enum Status {
1892
1914
  VALID = "VALID",
@@ -1901,7 +1923,7 @@ declare const OfferSchema: () => z$1.ZodObject<{
1901
1923
  assets: z$1.ZodBigInt;
1902
1924
  obligationUnits: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
1903
1925
  obligationShares: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
1904
- price: z$1.ZodBigInt;
1926
+ tick: z$1.ZodCoercedNumber<unknown>;
1905
1927
  maturity: z$1.ZodPipe<z$1.ZodNumber, z$1.ZodTransform<Maturity, number>>;
1906
1928
  expiry: z$1.ZodNumber;
1907
1929
  start: z$1.ZodNumber;
@@ -1919,6 +1941,7 @@ declare const OfferSchema: () => z$1.ZodObject<{
1919
1941
  address: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
1920
1942
  data: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
1921
1943
  }, z$1.core.$strip>;
1944
+ receiverIfMakerIsSeller: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
1922
1945
  }, z$1.core.$strip>;
1923
1946
  /**
1924
1947
  * Input type for creating offers. Accepts flexible group types that will be coerced to Hex.
@@ -1931,12 +1954,13 @@ declare const OfferSchema: () => z$1.ZodObject<{
1931
1954
  *
1932
1955
  * All values validated to be non-negative and within bytes32 range.
1933
1956
  */
1934
- type OfferInput = Compute<Omit<Offer, "chainId" | "group" | "session" | "obligationUnits" | "obligationShares"> & {
1957
+ type OfferInput = Compute<Omit<Offer, "chainId" | "group" | "session" | "obligationUnits" | "obligationShares" | "receiverIfMakerIsSeller"> & {
1935
1958
  chainId: number;
1936
1959
  group: Hex | bigint | number | string; /** Optional: defaults to zero bytes32. */
1937
1960
  session?: Hex | bigint | number | string; /** Optional: defaults to 0n. Mutually exclusive with assets and obligationShares. */
1938
1961
  obligationUnits?: bigint; /** Optional: defaults to 0n. Mutually exclusive with assets and obligationUnits. */
1939
- obligationShares?: bigint;
1962
+ obligationShares?: bigint; /** Optional: defaults to maker for backward compatibility. */
1963
+ receiverIfMakerIsSeller?: Address;
1940
1964
  }>;
1941
1965
  /**
1942
1966
  * Creates an offer from a plain object.
@@ -1954,9 +1978,9 @@ declare namespace from$13 {
1954
1978
  * @param input - The offer to create.
1955
1979
  * @returns The created offer.
1956
1980
  */
1957
- declare function fromSnakeCase$1(input: Snake<Omit<Offer, "chainId" | "session"> & {
1958
- chainId: number;
1959
- session: string;
1981
+ declare function fromSnakeCase$1(input: Snake<Omit<Offer, "session" | "receiverIfMakerIsSeller"> & {
1982
+ session?: Hex;
1983
+ receiverIfMakerIsSeller?: Address;
1960
1984
  }>): Offer;
1961
1985
  /**
1962
1986
  * Converts an offer to a snake case object.
@@ -1976,7 +2000,7 @@ declare const serialize: (offer: Offer) => {
1976
2000
  assets: string;
1977
2001
  obligationUnits: string;
1978
2002
  obligationShares: string;
1979
- price: string;
2003
+ tick: number;
1980
2004
  maturity: number;
1981
2005
  expiry: number;
1982
2006
  start: number;
@@ -1994,6 +2018,7 @@ declare const serialize: (offer: Offer) => {
1994
2018
  address: `0x${string}`;
1995
2019
  data: `0x${string}`;
1996
2020
  };
2021
+ receiverIfMakerIsSeller: `0x${string}`;
1997
2022
  hash: `0x${string}`;
1998
2023
  };
1999
2024
  type RandomConfig = {
@@ -2011,11 +2036,12 @@ type RandomConfig = {
2011
2036
  expiry?: number;
2012
2037
  group?: Hex | bigint | number | string;
2013
2038
  session?: Hex | bigint | number | string;
2014
- price?: bigint;
2039
+ tick?: number;
2015
2040
  callback?: {
2016
2041
  address: Address;
2017
2042
  data: Hex;
2018
2043
  };
2044
+ receiverIfMakerIsSeller?: Address;
2019
2045
  collaterals?: readonly Collateral[];
2020
2046
  };
2021
2047
  /**
@@ -2060,7 +2086,7 @@ declare const types: {
2060
2086
  readonly name: "obligationShares";
2061
2087
  readonly type: "uint256";
2062
2088
  }, {
2063
- readonly name: "price";
2089
+ readonly name: "tick";
2064
2090
  readonly type: "uint256";
2065
2091
  }, {
2066
2092
  readonly name: "maturity";
@@ -2086,6 +2112,9 @@ declare const types: {
2086
2112
  }, {
2087
2113
  readonly name: "callback";
2088
2114
  readonly type: "Callback";
2115
+ }, {
2116
+ readonly name: "receiverIfMakerIsSeller";
2117
+ readonly type: "address";
2089
2118
  }];
2090
2119
  readonly Collateral: readonly [{
2091
2120
  readonly name: "asset";
@@ -2184,6 +2213,11 @@ declare const takeEvent: {
2184
2213
  readonly type: "bool";
2185
2214
  readonly indexed: false;
2186
2215
  readonly internalType: "bool";
2216
+ }, {
2217
+ readonly name: "sellerReceiver";
2218
+ readonly type: "address";
2219
+ readonly indexed: false;
2220
+ readonly internalType: "address";
2187
2221
  }, {
2188
2222
  readonly name: "group";
2189
2223
  readonly type: "bytes32";
@@ -2387,26 +2421,26 @@ declare namespace from$11 {
2387
2421
  type ReturnType = Position;
2388
2422
  }
2389
2423
  declare namespace Quote_d_exports {
2390
- export { InvalidQuoteError, Quote, QuoteSchema, from$10 as from, fromSnakeCase, random };
2424
+ export { InvalidQuoteError, Quote, QuoteInput, Side, from$10 as from, fromSnakeCase, random };
2391
2425
  }
2392
- type Quote = {
2426
+ type Side = {
2427
+ /** The best side tick, or null when no active quote exists. */tick: number | null; /** The side price for the obligation. (18 decimals). */
2428
+ price: bigint;
2429
+ };
2430
+ type QuoteInput = {
2393
2431
  /** The obligation id. */obligationId: Hex;
2394
2432
  ask: {
2395
- /** The ask price for the obligation. (18 decimals). */price: bigint;
2433
+ /** The best ask tick, or null when there is no active ask quote. */tick: number | null;
2396
2434
  };
2397
2435
  bid: {
2398
- /** The bid price for the obligation. (18 decimals). */price: bigint;
2436
+ /** The best bid tick, or null when there is no active bid quote. */tick: number | null;
2399
2437
  };
2400
2438
  };
2401
- declare const QuoteSchema: z$1.ZodObject<{
2402
- obligationId: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
2403
- ask: z$1.ZodObject<{
2404
- price: z$1.ZodBigInt;
2405
- }, z$1.core.$strip>;
2406
- bid: z$1.ZodObject<{
2407
- price: z$1.ZodBigInt;
2408
- }, z$1.core.$strip>;
2409
- }, z$1.core.$strip>;
2439
+ type Quote = {
2440
+ /** The obligation id. */obligationId: Hex;
2441
+ ask: Side;
2442
+ bid: Side;
2443
+ };
2410
2444
  /**
2411
2445
  * Creates a quote for a given obligation.
2412
2446
  * @constructor
@@ -2416,12 +2450,12 @@ declare const QuoteSchema: z$1.ZodObject<{
2416
2450
  *
2417
2451
  * @example
2418
2452
  * ```ts
2419
- * const quote = Quote.from({ obligationId: "0x123", ask: { price: 100n }, bid: { price: 100n } });
2453
+ * const quote = Quote.from({ obligationId: "0x123", ask: { tick: 500 }, bid: { tick: 510 } });
2420
2454
  * ```
2421
2455
  */
2422
2456
  declare function from$10(parameters: from$10.Parameters): from$10.ReturnType;
2423
2457
  declare namespace from$10 {
2424
- type Parameters = Quote;
2458
+ type Parameters = QuoteInput;
2425
2459
  type ReturnType = Quote;
2426
2460
  type ErrorType = InvalidQuoteError;
2427
2461
  }
@@ -2433,7 +2467,7 @@ declare namespace from$10 {
2433
2467
  */
2434
2468
  declare function fromSnakeCase(snake: fromSnakeCase.Parameters): fromSnakeCase.ReturnType;
2435
2469
  declare namespace fromSnakeCase {
2436
- type Parameters = Snake<Quote>;
2470
+ type Parameters = Snake<QuoteInput>;
2437
2471
  type ReturnType = Quote;
2438
2472
  type ErrorType = from$10.ErrorType;
2439
2473
  }
@@ -2456,6 +2490,41 @@ declare class InvalidQuoteError extends BaseError<z$1.ZodError | Error> {
2456
2490
  readonly name = "Quote.InvalidQuoteError";
2457
2491
  constructor(error: z$1.ZodError | Error);
2458
2492
  }
2493
+ declare namespace Tick_d_exports {
2494
+ export { InvalidPriceError, InvalidTickError, MAX_PRICE, TICK_RANGE, priceToTick, tickToPrice };
2495
+ }
2496
+ /** Tick domain supported by Morpho V2. */
2497
+ declare const TICK_RANGE = 990;
2498
+ /** Max allowed price (1e18 in wad). */
2499
+ declare const MAX_PRICE: bigint;
2500
+ /**
2501
+ * Converts a tick to a wad price using the same approximation and rounding as TickLib.
2502
+ * @param tick - Tick value in the inclusive range [0, 990].
2503
+ * @returns The price in wad units.
2504
+ * @throws {@link InvalidTickError} If tick is not an integer in range [0, 990].
2505
+ */
2506
+ declare function tickToPrice(tick: number): bigint;
2507
+ declare namespace tickToPrice {
2508
+ type ErrorType = InvalidTickError;
2509
+ }
2510
+ /**
2511
+ * Returns the lowest tick with a higher-or-equal price.
2512
+ * @param price - Price in wad units.
2513
+ * @returns The first tick whose {@link tickToPrice} is greater than or equal to `price`.
2514
+ * @throws {@link InvalidPriceError} If price is outside [0, 1e18].
2515
+ */
2516
+ declare function priceToTick(price: bigint): number;
2517
+ declare namespace priceToTick {
2518
+ type ErrorType = InvalidPriceError;
2519
+ }
2520
+ declare class InvalidTickError extends BaseError {
2521
+ readonly name = "Tick.InvalidTickError";
2522
+ constructor(tick: number);
2523
+ }
2524
+ declare class InvalidPriceError extends BaseError {
2525
+ readonly name = "Tick.InvalidPriceError";
2526
+ constructor(price: bigint);
2527
+ }
2459
2528
  declare namespace TradingFee_d_exports {
2460
2529
  export { BREAKPOINTS, Fees, InvalidFeeError, InvalidFeesLengthError, TradingFee, WAD, activate, compute, deactivate, from$9 as from, getFees, isActivated };
2461
2530
  }
@@ -2869,7 +2938,7 @@ type Row = {
2869
2938
  assets: bigint;
2870
2939
  obligationUnits: bigint;
2871
2940
  obligationShares: bigint;
2872
- price: bigint;
2941
+ tick: number;
2873
2942
  maturity: Maturity;
2874
2943
  expiry: number;
2875
2944
  start: number;
@@ -2883,6 +2952,7 @@ type Row = {
2883
2952
  address: Address;
2884
2953
  data: Hex;
2885
2954
  };
2955
+ receiverIfMakerIsSeller: Address;
2886
2956
  consumed: bigint;
2887
2957
  available: bigint;
2888
2958
  takeable: bigint;
@@ -2902,18 +2972,6 @@ type OffersDomain = {
2902
2972
  get: (parameters?: GetOffersParams) => Promise<{
2903
2973
  rows: Row[];
2904
2974
  nextCursor: string | null;
2905
- }>; /** Get obligations */
2906
- getObligations: (parameters?: {
2907
- ids?: Hex[];
2908
- chainId?: Id[];
2909
- loanToken?: Address[];
2910
- collateralToken?: Address[];
2911
- maturity?: number[];
2912
- cursor?: string;
2913
- limit?: number;
2914
- }) => Promise<{
2915
- obligations: Obligation[];
2916
- nextCursor: string | null;
2917
2975
  }>; /** Get quotes for given obligations. */
2918
2976
  getQuotes: (parameters: {
2919
2977
  obligationIds: Hex[];
@@ -2940,8 +2998,8 @@ declare namespace get$4 {
2940
2998
  limit?: number;
2941
2999
  };
2942
3000
  type Level = {
2943
- /** The computed price for this level (interpolated at query time) */price: bigint; /** Sum of takeable amounts at this price */
2944
- assets: bigint; /** Number of offers at this price */
3001
+ /** The offer tick for this level */tick: number; /** Sum of takeable amounts at this tick */
3002
+ assets: bigint; /** Number of offers at this tick */
2945
3003
  count: number;
2946
3004
  };
2947
3005
  type ReturnType = {
@@ -3030,6 +3088,7 @@ type Lot = {
3030
3088
  user: Address;
3031
3089
  contract: Address;
3032
3090
  group: string;
3091
+ obligationId: string;
3033
3092
  lower: bigint;
3034
3093
  upper: bigint;
3035
3094
  };
@@ -3052,6 +3111,7 @@ declare namespace create$5 {
3052
3111
  positionContract: Address;
3053
3112
  positionUser: Address;
3054
3113
  group: string;
3114
+ obligationId: string;
3055
3115
  size: bigint;
3056
3116
  };
3057
3117
  type Parameters = OfferLotInfo[];
@@ -3063,6 +3123,7 @@ declare namespace get$3 {
3063
3123
  user?: Address;
3064
3124
  contract?: Address;
3065
3125
  group?: string;
3126
+ obligationId?: string;
3066
3127
  };
3067
3128
  type ReturnType = Lot[];
3068
3129
  }
@@ -3075,6 +3136,14 @@ type ObligationsDomain = {
3075
3136
  * @param obligations - Obligations to insert. {@link Obligation.Obligation}
3076
3137
  */
3077
3138
  create: (obligations: Obligation[]) => Promise<void>;
3139
+ /**
3140
+ * Get active obligations with optional chain filters.
3141
+ * @param parameters - Optional chain filters.
3142
+ * @returns Matching obligations.
3143
+ */
3144
+ get: (parameters?: {
3145
+ chainId?: Id[];
3146
+ }) => Promise<Obligation[]>;
3078
3147
  };
3079
3148
  //#endregion
3080
3149
  //#region src/database/domains/Offsets.d.ts
@@ -3083,6 +3152,7 @@ type Offset = {
3083
3152
  user: Address;
3084
3153
  contract: Address;
3085
3154
  group: string;
3155
+ obligationId: string;
3086
3156
  value: bigint;
3087
3157
  };
3088
3158
  type OffsetsDomain = {
@@ -3097,6 +3167,7 @@ declare namespace get$2 {
3097
3167
  user?: Address;
3098
3168
  contract?: Address;
3099
3169
  group?: string;
3170
+ obligationId?: string;
3100
3171
  };
3101
3172
  type ReturnType = Offset[];
3102
3173
  }
@@ -3175,7 +3246,8 @@ declare namespace getByUser {
3175
3246
  chainId: Id;
3176
3247
  contract: Address;
3177
3248
  user: Address;
3178
- blockNumber: number; /** The amount reserved by active offers: max(lot.upper) - offset - consumed */
3249
+ blockNumber: number; /** The obligation this reserved amount belongs to, or null if no lots exist */
3250
+ obligationId: string | null; /** The amount reserved by active offers: max(lot.upper) - offset - consumed */
3179
3251
  reserved: bigint;
3180
3252
  };
3181
3253
  type ReturnType = {
@@ -3263,8 +3335,36 @@ type ValidationsDomain = {
3263
3335
  */
3264
3336
  upsert: (validations: Validation[]) => Promise<void>;
3265
3337
  };
3338
+ //#endregion
3339
+ //#region src/database/readers/ObligationsListing.d.ts
3340
+ type ListObligationsParameters = {
3341
+ ids?: Hex[];
3342
+ chainId?: Id[];
3343
+ loanToken?: Address[];
3344
+ collateralToken?: Address[];
3345
+ maturity?: number[];
3346
+ sort?: string[];
3347
+ cursor?: string;
3348
+ limit?: number;
3349
+ };
3350
+ type ListedObligation = {
3351
+ obligation: Obligation;
3352
+ quote: Quote;
3353
+ };
3354
+ type ListObligationsResult = {
3355
+ obligations: ListedObligation[];
3356
+ nextCursor: string | null;
3357
+ };
3358
+ type ObligationsListingReader = {
3359
+ /**
3360
+ * Lists obligations with SQL keyset pagination and opaque cursor handling.
3361
+ * @param parameters - Optional filters, sorting, and pagination cursor.
3362
+ * @returns Listed obligations with associated quotes and a next cursor.
3363
+ */
3364
+ list: (parameters?: ListObligationsParameters) => Promise<ListObligationsResult>;
3365
+ };
3266
3366
  declare namespace Database_d_exports {
3267
- export { Core, Database, Driver, WithDomains, connect$2 as connect };
3367
+ export { Core, Database, Driver, WithDomains, connect$2 as connect, getSchemaNamesForMigration };
3268
3368
  }
3269
3369
  type Driver = ReturnType<typeof drizzle> | ReturnType<typeof drizzle$1>;
3270
3370
  type Domains = {
@@ -3283,7 +3383,13 @@ type Domains = {
3283
3383
  positions: PositionsDomain;
3284
3384
  transfers: TransfersDomain;
3285
3385
  };
3286
- type WithDomains<D extends Driver> = D & Domains;
3386
+ type Readers = {
3387
+ obligations: ObligationsListingReader;
3388
+ };
3389
+ type DatabaseFacade = Domains & {
3390
+ readers: Readers;
3391
+ };
3392
+ type WithDomains<D extends Driver> = D & DatabaseFacade;
3287
3393
  type Core = Omit<WithDomains<Driver>, "transaction"> & {
3288
3394
  transaction<T>(fn: (tx: WithDomains<Driver>) => Promise<T>): Promise<T>;
3289
3395
  };
@@ -3300,6 +3406,12 @@ type Database = Core & {
3300
3406
  * @returns The database client {@link connect.ReturnType}
3301
3407
  */
3302
3408
  declare function connect$2(chainRegistry: ChainRegistry, connectionString?: string): Database;
3409
+ /**
3410
+ * Build the list of router schemas that should exist before running migrations.
3411
+ * @param version - Current schema version (e.g. `router_v1.8`).
3412
+ * @returns Ordered schema names from `router_v1.7` to current, or just current if parsing fails.
3413
+ */
3414
+ declare function getSchemaNamesForMigration(version: string): string[];
3303
3415
  declare namespace Gate_d_exports {
3304
3416
  export { Batch, Issue, Result, Rule, RuleNames, Single, batch$1 as batch, run, single };
3305
3417
  }
@@ -3384,6 +3496,10 @@ type ConfigRule = {
3384
3496
  type: "loan_token";
3385
3497
  chain_id: Id;
3386
3498
  address: Address;
3499
+ } | {
3500
+ type: "collateral_token";
3501
+ chain_id: Id;
3502
+ address: Address;
3387
3503
  } | {
3388
3504
  type: "oracle";
3389
3505
  chain_id: Id;
@@ -3556,15 +3672,17 @@ declare namespace BookResponse_d_exports {
3556
3672
  export { BookLevelResponse, from$4 as from };
3557
3673
  }
3558
3674
  type BookLevelResponse = {
3675
+ tick: number;
3559
3676
  price: string;
3560
3677
  assets: string;
3561
3678
  count: number;
3562
3679
  };
3563
- declare function from$4(level: {
3564
- price: bigint;
3680
+ type Input$1 = {
3681
+ tick: number;
3565
3682
  assets: bigint;
3566
3683
  count: number;
3567
- }): BookLevelResponse;
3684
+ };
3685
+ declare function from$4(level: Input$1): BookLevelResponse;
3568
3686
  //#endregion
3569
3687
  //#region src/api/Schema/health.d.ts
3570
3688
  declare const CollectorHealth: z.ZodObject<{
@@ -3638,13 +3756,13 @@ interface paths {
3638
3756
  };
3639
3757
  /**
3640
3758
  * Get aggregated book
3641
- * @description Returns aggregated book data for a given obligation and side. Offers are grouped by computed price with summed takeable amounts. Book levels are sorted by price (ascending for buy side, descending for sell side).
3759
+ * @description Returns aggregated book data for a given obligation and side. Offers are grouped by tick with summed takeable amounts, and each level includes the corresponding wad-scaled price. Book levels are sorted by tick (ascending for sell side, descending for buy side).
3642
3760
  */
3643
3761
  get: {
3644
3762
  parameters: {
3645
3763
  query?: {
3646
3764
  /**
3647
- * @description Maximum number of price levels to return.
3765
+ * @description Maximum number of tick levels to return.
3648
3766
  * @example 10
3649
3767
  */
3650
3768
  limit?: number;
@@ -3760,7 +3878,7 @@ interface paths {
3760
3878
  };
3761
3879
  /**
3762
3880
  * Get config rules
3763
- * @description Returns configured rules (maturities, loan tokens, oracles) for supported chains.
3881
+ * @description Returns configured rules (maturities, loan tokens, collateral tokens, oracles) for supported chains.
3764
3882
  */
3765
3883
  get: {
3766
3884
  parameters: {
@@ -3772,7 +3890,7 @@ interface paths {
3772
3890
  chains?: number[];
3773
3891
  /**
3774
3892
  * @description Filter by rule types (comma-separated).
3775
- * @example maturity,loan_token,oracle
3893
+ * @example maturity,loan_token,collateral_token,oracle
3776
3894
  */
3777
3895
  types?: string[];
3778
3896
  /**
@@ -3891,11 +4009,16 @@ interface paths {
3891
4009
  };
3892
4010
  /**
3893
4011
  * List all obligations
3894
- * @description Returns a list of obligations with their current best ask and bid. Obligations are sorted by their id in ascending order by default.
4012
+ * @description Returns a list of obligations with their current best ask and bid. Sorting is customizable with the sort parameter and defaults to id ascending.
3895
4013
  */
3896
4014
  get: {
3897
4015
  parameters: {
3898
4016
  query?: {
4017
+ /**
4018
+ * @description Sort order as comma-separated fields (`id`, `ask`, `bid`, `maturity`). Prefix with `-` for descending order. Max 3 fields.
4019
+ * @example -ask,bid,maturity
4020
+ */
4021
+ sort?: string;
3899
4022
  /**
3900
4023
  * @description Filter by exact maturity timestamps (comma-separated, unix seconds).
3901
4024
  * @example 1761922800,1764524800
@@ -3922,8 +4045,8 @@ interface paths {
3922
4045
  */
3923
4046
  limit?: number;
3924
4047
  /**
3925
- * @description Obligation id cursor for pagination.
3926
- * @example 0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc
4048
+ * @description Pagination cursor in base64url-encoded format.
4049
+ * @example eyJzb3J0IjpbImlkIl0sImlkIjoiMHgxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAiLCJhc2siOiIwIiwiYmlkIjoiMCIsIm1hdHVyaXR5IjoxNzYxOTIyODAwfQ
3927
4050
  */
3928
4051
  cursor?: string;
3929
4052
  };
@@ -4152,7 +4275,7 @@ interface paths {
4152
4275
  };
4153
4276
  /**
4154
4277
  * Get user positions
4155
- * @description Returns positions for a user with reserved balance. The reserved balance is the amount locked by active offers (max lot upper - offset - consumed).
4278
+ * @description Returns positions for a user with reserved balance per obligation. Each (position, obligation) pair is returned as a separate row. Positions with no lots return a single row with obligation_id = null and reserved = 0.
4156
4279
  */
4157
4280
  get: {
4158
4281
  parameters: {
@@ -4261,14 +4384,19 @@ interface components {
4261
4384
  schemas: {
4262
4385
  BookListResponse: {
4263
4386
  meta: components["schemas"]["Meta"]; /** @example eyJvZmZzZXQiOjEwMH0 */
4264
- cursor: string | null; /** @description Aggregated book levels grouped by computed price. */
4387
+ cursor: string | null; /** @description Aggregated book levels grouped by offer tick. */
4265
4388
  data: components["schemas"]["BookLevelResponse"][];
4266
4389
  };
4267
4390
  Meta: {
4268
4391
  /** @example 2024-01-01T12:00:00.000Z */timestamp: string;
4269
4392
  };
4270
4393
  BookLevelResponse: {
4271
- /** @example 2750000000000000000 */price: string; /** @example 369216000000000000000000 */
4394
+ /** @example 495 */tick: number;
4395
+ /**
4396
+ * @description Price derived from tick, scaled by 1e18.
4397
+ * @example 500000000000000000
4398
+ */
4399
+ price: string; /** @example 369216000000000000000000 */
4272
4400
  assets: string; /** @example 5 */
4273
4401
  count: number;
4274
4402
  };
@@ -4345,6 +4473,11 @@ interface components {
4345
4473
  * "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
4346
4474
  * },
4347
4475
  * {
4476
+ * "type": "collateral_token",
4477
+ * "chain_id": 1,
4478
+ * "address": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"
4479
+ * },
4480
+ * {
4348
4481
  * "type": "oracle",
4349
4482
  * "chain_id": 1,
4350
4483
  * "address": "0xDddd770BADd886dF3864029e4B377B5F6a2B6b83"
@@ -4394,11 +4527,12 @@ interface components {
4394
4527
  * "obligation_shares": "0",
4395
4528
  * "start": 1761922790,
4396
4529
  * "expiry": 1761922799,
4397
- * "price": "2750000000000000000",
4530
+ * "tick": 495,
4398
4531
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
4399
4532
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
4400
4533
  * "callback": "0x0000000000000000000000000000000000000000",
4401
- * "callback_data": "0x"
4534
+ * "callback_data": "0x",
4535
+ * "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
4402
4536
  * },
4403
4537
  * "offer_hash": "0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427",
4404
4538
  * "obligation_id": "0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc",
@@ -4438,11 +4572,12 @@ interface components {
4438
4572
  * "obligation_shares": "0",
4439
4573
  * "start": 1761922790,
4440
4574
  * "expiry": 1761922799,
4441
- * "price": "2750000000000000000",
4575
+ * "tick": 495,
4442
4576
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
4443
4577
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
4444
4578
  * "callback": "0x0000000000000000000000000000000000000000",
4445
- * "callback_data": "0x"
4579
+ * "callback_data": "0x",
4580
+ * "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
4446
4581
  * }
4447
4582
  */
4448
4583
  offer: components["schemas"]["OfferDataResponse"]; /** @example 0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427 */
@@ -4483,12 +4618,13 @@ interface components {
4483
4618
  obligation_units: string; /** @example 0 */
4484
4619
  obligation_shares: string; /** @example 1761922790 */
4485
4620
  start: number; /** @example 1761922799 */
4486
- expiry: number; /** @example 2750000000000000000 */
4487
- price: string; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
4621
+ expiry: number; /** @example 495 */
4622
+ tick: number; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
4488
4623
  group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
4489
4624
  session: string; /** @example 0x0000000000000000000000000000000000000000 */
4490
4625
  callback: string; /** @example 0x */
4491
- callback_data: string;
4626
+ callback_data: string; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
4627
+ receiver_if_maker_is_seller: string;
4492
4628
  };
4493
4629
  ObligationOfferResponse: {
4494
4630
  /** @example 0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078 */loan_token: string;
@@ -4510,7 +4646,7 @@ interface components {
4510
4646
  oracle: string;
4511
4647
  };
4512
4648
  ObligationListResponse: {
4513
- meta: components["schemas"]["Meta"]; /** @example 0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc */
4649
+ meta: components["schemas"]["Meta"]; /** @example eyJzb3J0IjpbImlkIl0sImlkIjoiMHgxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAiLCJhc2siOiIwIiwiYmlkIjoiMCIsIm1hdHVyaXR5IjoxNzYxOTIyODAwfQ */
4514
4650
  cursor: string | null; /** @description List of obligations with takable offers. */
4515
4651
  data: components["schemas"]["ObligationResponse"][];
4516
4652
  };
@@ -4524,10 +4660,20 @@ interface components {
4524
4660
  bid: components["schemas"]["BidResponse"];
4525
4661
  };
4526
4662
  AskResponse: {
4527
- /** @example 1000000000000000000 */price: string;
4663
+ /**
4664
+ * @description Best ask tick. Null when there is no active ask quote.
4665
+ * @example 500
4666
+ */
4667
+ tick: number | null; /** @example 1000000000000000000 */
4668
+ price: string;
4528
4669
  };
4529
4670
  BidResponse: {
4530
- /** @example 1000000000000000000 */price: string;
4671
+ /**
4672
+ * @description Best bid tick. Null when there is no active bid quote.
4673
+ * @example 500
4674
+ */
4675
+ tick: number | null; /** @example 1000000000000000000 */
4676
+ price: string;
4531
4677
  };
4532
4678
  ObligationSingleSuccessResponse: {
4533
4679
  meta: components["schemas"]["Meta"]; /** @example null */
@@ -4633,6 +4779,7 @@ interface components {
4633
4779
  * "chain_id": 1,
4634
4780
  * "contract": "0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078",
4635
4781
  * "user": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
4782
+ * "obligation_id": "0x12590ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9f67",
4636
4783
  * "reserved": "200000000000000000000",
4637
4784
  * "block_number": 21345678
4638
4785
  * }
@@ -4643,7 +4790,12 @@ interface components {
4643
4790
  PositionListItemResponse: {
4644
4791
  /** @example 1 */chain_id: number; /** @example 0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078 */
4645
4792
  contract: string; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
4646
- user: string; /** @example 200000000000000000000 */
4793
+ user: string;
4794
+ /**
4795
+ * @description Obligation id this reserved amount belongs to, or null if no lots exist.
4796
+ * @example 0x12590ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9f67
4797
+ */
4798
+ obligation_id: string | null; /** @example 200000000000000000000 */
4647
4799
  reserved: string; /** @example 21345678 */
4648
4800
  block_number: number;
4649
4801
  };
@@ -4654,8 +4806,8 @@ interface components {
4654
4806
  /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */maker: string; /** @example 369216000000000000000000 */
4655
4807
  assets: string; /** @example 0 */
4656
4808
  obligation_units?: string; /** @example 0 */
4657
- obligation_shares?: string; /** @example 2750000000000000000 */
4658
- price: string; /** @example 1761922799 */
4809
+ obligation_shares?: string; /** @example 495 */
4810
+ tick: number; /** @example 1761922799 */
4659
4811
  maturity: number; /** @example 1761922799 */
4660
4812
  expiry: number; /** @example 1761922790 */
4661
4813
  start: number; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
@@ -4680,7 +4832,8 @@ interface components {
4680
4832
  * "data": "0x"
4681
4833
  * }
4682
4834
  */
4683
- callback: components["schemas"]["ValidateCallbackRequest"];
4835
+ callback: components["schemas"]["ValidateCallbackRequest"]; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
4836
+ receiver_if_maker_is_seller: string;
4684
4837
  };
4685
4838
  ValidateCollateralRequest: {
4686
4839
  /** @example 0x34Cf890dB685FC536E05652FB41f02090c3fb751 */asset: string; /** @example 0x45093658BE7f90B63D7c359e8f408e503c2D9401 */
@@ -4723,6 +4876,7 @@ type ObligationResponse = paths["/v1/obligations"]["get"]["responses"]["200"]["c
4723
4876
  * Creates an `ObligationResponse` from a `Obligation`.
4724
4877
  * @constructor
4725
4878
  * @param obligation - {@link Obligation}
4879
+ * @param quote - {@link Quote}
4726
4880
  * @returns The created `ObligationResponse`. {@link ObligationResponse}
4727
4881
  */
4728
4882
  declare function from$3(obligation: Obligation, quote: Quote): ObligationResponse;
@@ -4736,7 +4890,7 @@ type Input = Readonly<{
4736
4890
  assets: bigint;
4737
4891
  obligationUnits: bigint;
4738
4892
  obligationShares: bigint;
4739
- price: bigint;
4893
+ tick: number;
4740
4894
  maturity: number;
4741
4895
  expiry: number;
4742
4896
  start: number;
@@ -4754,6 +4908,7 @@ type Input = Readonly<{
4754
4908
  address: Address;
4755
4909
  data: Hex;
4756
4910
  };
4911
+ receiverIfMakerIsSeller: Address;
4757
4912
  root?: Hex | undefined;
4758
4913
  proof?: Hex[] | undefined;
4759
4914
  signature?: Hex | undefined;
@@ -4805,6 +4960,7 @@ type PositionResponse = {
4805
4960
  chain_id: Id;
4806
4961
  contract: Address;
4807
4962
  user: Address;
4963
+ obligation_id: string | null;
4808
4964
  reserved: string;
4809
4965
  block_number: number;
4810
4966
  };
@@ -4855,6 +5011,7 @@ declare const schemas: {
4855
5011
  maturity: "maturity";
4856
5012
  callback: "callback";
4857
5013
  loan_token: "loan_token";
5014
+ collateral_token: "collateral_token";
4858
5015
  }>>>>;
4859
5016
  chains: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>>>>;
4860
5017
  }, z$1.core.$strip>;
@@ -4886,6 +5043,7 @@ declare const schemas: {
4886
5043
  loan_tokens: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>>>>;
4887
5044
  collateral_tokens: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>>>>;
4888
5045
  maturities: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>>>>;
5046
+ sort: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodString>>>;
4889
5047
  limit: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>, z$1.ZodNumber>>>;
4890
5048
  }, z$1.core.$strip>;
4891
5049
  readonly get_obligation: z$1.ZodObject<{
@@ -5156,13 +5314,16 @@ declare namespace getOffers {
5156
5314
  }
5157
5315
  declare function getObligations(apiClient: Client$1<paths>, parameters?: getObligations.Parameters): Promise<getObligations.ReturnType>;
5158
5316
  declare namespace getObligations {
5317
+ type SortField = "id" | "ask" | "bid" | "maturity";
5318
+ type SortEntry = SortField | `-${SortField}`;
5159
5319
  type Parameters = {
5160
- /** Pagination cursor is a 32-byte hex string. */cursor?: Hex; /** Maximum number of obligations to return. @default 20 */
5320
+ /** Pagination cursor in base64url-encoded format. */cursor?: string; /** Maximum number of obligations to return. @default 20 */
5161
5321
  limit?: number; /** Filter by chain IDs (comma-separated). */
5162
5322
  chainIds?: number[]; /** Filter by loan token addresses (comma-separated). */
5163
5323
  loanTokens?: Address[]; /** Filter by collateral tokens (comma-separated, matches any collateral). */
5164
5324
  collateralTokens?: Address[]; /** Filter by exact maturity timestamps (comma-separated, unix seconds). */
5165
- maturities?: number[];
5325
+ maturities?: number[]; /** Sort order entries in priority order. Prefix with '-' for descending. Max 3 fields. */
5326
+ sort?: SortEntry[];
5166
5327
  };
5167
5328
  type ReturnType = {
5168
5329
  obligations: Compute<{
@@ -5199,7 +5360,7 @@ declare class HttpGetApiFailedError extends BaseError {
5199
5360
  }
5200
5361
  //#endregion
5201
5362
  //#region src/database/drizzle/VERSION.d.ts
5202
- declare const VERSION: "router_v1.6";
5363
+ declare const VERSION: "router_v1.8";
5203
5364
  //#endregion
5204
5365
  //#region src/database/drizzle/schema.d.ts
5205
5366
  declare enum EnumTableName {
@@ -5222,12 +5383,12 @@ declare enum EnumTableName {
5222
5383
  MERKLE_PATHS = "merkle_paths"
5223
5384
  }
5224
5385
  declare const TABLE_NAMES: readonly EnumTableName[];
5225
- declare const VERSIONED_TABLE_NAMES: ("\"router_v1.6\".\"obligations\"" | "\"router_v1.6\".\"groups\"" | "\"router_v1.6\".\"consumed_events\"" | "\"router_v1.6\".\"obligation_collaterals_v2\"" | "\"router_v1.6\".\"oracles\"" | "\"router_v1.6\".\"offers\"" | "\"router_v1.6\".\"offers_callbacks\"" | "\"router_v1.6\".\"callbacks\"" | "\"router_v1.6\".\"positions\"" | "\"router_v1.6\".\"transfers\"" | "\"router_v1.6\".\"validations\"" | "\"router_v1.6\".\"collectors\"" | "\"router_v1.6\".\"chains\"" | "\"router_v1.6\".\"lots\"" | "\"router_v1.6\".\"offsets\"" | "\"router_v1.6\".\"trees\"" | "\"router_v1.6\".\"merkle_paths\"")[];
5386
+ declare const VERSIONED_TABLE_NAMES: ("\"router_v1.8\".\"obligations\"" | "\"router_v1.8\".\"groups\"" | "\"router_v1.8\".\"consumed_events\"" | "\"router_v1.8\".\"obligation_collaterals_v2\"" | "\"router_v1.8\".\"oracles\"" | "\"router_v1.8\".\"offers\"" | "\"router_v1.8\".\"offers_callbacks\"" | "\"router_v1.8\".\"callbacks\"" | "\"router_v1.8\".\"positions\"" | "\"router_v1.8\".\"transfers\"" | "\"router_v1.8\".\"validations\"" | "\"router_v1.8\".\"collectors\"" | "\"router_v1.8\".\"chains\"" | "\"router_v1.8\".\"lots\"" | "\"router_v1.8\".\"offsets\"" | "\"router_v1.8\".\"trees\"" | "\"router_v1.8\".\"merkle_paths\"")[];
5226
5387
  type TableName = (typeof TABLE_NAMES)[number];
5227
5388
  type VersionedTableName = `"${typeof VERSION}"."${TableName}"`;
5228
5389
  declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
5229
5390
  name: EnumTableName.OBLIGATIONS;
5230
- schema: "router_v1.6";
5391
+ schema: "router_v1.8";
5231
5392
  columns: {
5232
5393
  obligationId: drizzle_orm_pg_core0.PgColumn<{
5233
5394
  name: "obligation_id";
@@ -5308,7 +5469,7 @@ declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
5308
5469
  }>;
5309
5470
  declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
5310
5471
  name: EnumTableName.GROUPS;
5311
- schema: "router_v1.6";
5472
+ schema: "router_v1.8";
5312
5473
  columns: {
5313
5474
  chainId: drizzle_orm_pg_core0.PgColumn<{
5314
5475
  name: "chain_id";
@@ -5423,7 +5584,7 @@ declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
5423
5584
  }>;
5424
5585
  declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
5425
5586
  name: EnumTableName.CONSUMED_EVENTS;
5426
- schema: "router_v1.6";
5587
+ schema: "router_v1.8";
5427
5588
  columns: {
5428
5589
  eventId: drizzle_orm_pg_core0.PgColumn<{
5429
5590
  name: "event_id";
@@ -5557,7 +5718,7 @@ declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
5557
5718
  }>;
5558
5719
  declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
5559
5720
  name: EnumTableName.OBLIGATION_COLLATERALS_V2;
5560
- schema: "router_v1.6";
5721
+ schema: "router_v1.8";
5561
5722
  columns: {
5562
5723
  obligationId: drizzle_orm_pg_core0.PgColumn<{
5563
5724
  name: "obligation_id";
@@ -5674,7 +5835,7 @@ declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
5674
5835
  }>;
5675
5836
  declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
5676
5837
  name: EnumTableName.ORACLES;
5677
- schema: "router_v1.6";
5838
+ schema: "router_v1.8";
5678
5839
  columns: {
5679
5840
  chainId: drizzle_orm_pg_core0.PgColumn<{
5680
5841
  name: "chain_id";
@@ -5770,7 +5931,7 @@ declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
5770
5931
  }>;
5771
5932
  declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
5772
5933
  name: EnumTableName.OFFERS;
5773
- schema: "router_v1.6";
5934
+ schema: "router_v1.8";
5774
5935
  columns: {
5775
5936
  hash: drizzle_orm_pg_core0.PgColumn<{
5776
5937
  name: "hash";
@@ -5861,13 +6022,13 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
5861
6022
  identity: undefined;
5862
6023
  generated: undefined;
5863
6024
  }, {}, {}>;
5864
- price: drizzle_orm_pg_core0.PgColumn<{
5865
- name: "price";
6025
+ tick: drizzle_orm_pg_core0.PgColumn<{
6026
+ name: "tick";
5866
6027
  tableName: EnumTableName.OFFERS;
5867
- dataType: "string";
5868
- columnType: "PgNumeric";
5869
- data: string;
5870
- driverParam: string;
6028
+ dataType: "number";
6029
+ columnType: "PgInteger";
6030
+ data: number;
6031
+ driverParam: string | number;
5871
6032
  notNull: true;
5872
6033
  hasDefault: false;
5873
6034
  isPrimaryKey: false;
@@ -6058,6 +6219,25 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
6058
6219
  identity: undefined;
6059
6220
  generated: undefined;
6060
6221
  }, {}, {}>;
6222
+ receiverIfMakerIsSeller: drizzle_orm_pg_core0.PgColumn<{
6223
+ name: "receiver_if_maker_is_seller";
6224
+ tableName: EnumTableName.OFFERS;
6225
+ dataType: "string";
6226
+ columnType: "PgVarchar";
6227
+ data: string;
6228
+ driverParam: string;
6229
+ notNull: false;
6230
+ hasDefault: false;
6231
+ isPrimaryKey: false;
6232
+ isAutoincrement: false;
6233
+ hasRuntimeDefault: false;
6234
+ enumValues: [string, ...string[]];
6235
+ baseColumn: never;
6236
+ identity: undefined;
6237
+ generated: undefined;
6238
+ }, {}, {
6239
+ length: 42;
6240
+ }>;
6061
6241
  blockNumber: drizzle_orm_pg_core0.PgColumn<{
6062
6242
  name: "block_number";
6063
6243
  tableName: EnumTableName.OFFERS;
@@ -6097,7 +6277,7 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
6097
6277
  }>;
6098
6278
  declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
6099
6279
  name: EnumTableName.OFFERS_CALLBACKS;
6100
- schema: "router_v1.6";
6280
+ schema: "router_v1.8";
6101
6281
  columns: {
6102
6282
  offerHash: drizzle_orm_pg_core0.PgColumn<{
6103
6283
  name: "offer_hash";
@@ -6142,7 +6322,7 @@ declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
6142
6322
  }>;
6143
6323
  declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
6144
6324
  name: EnumTableName.CALLBACKS;
6145
- schema: "router_v1.6";
6325
+ schema: "router_v1.8";
6146
6326
  columns: {
6147
6327
  id: drizzle_orm_pg_core0.PgColumn<{
6148
6328
  name: "id";
@@ -6242,7 +6422,7 @@ declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
6242
6422
  }>;
6243
6423
  declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
6244
6424
  name: EnumTableName.LOTS;
6245
- schema: "router_v1.6";
6425
+ schema: "router_v1.8";
6246
6426
  columns: {
6247
6427
  chainId: drizzle_orm_pg_core0.PgColumn<{
6248
6428
  name: "chain_id";
@@ -6320,6 +6500,25 @@ declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
6320
6500
  }, {}, {
6321
6501
  length: 66;
6322
6502
  }>;
6503
+ obligationId: drizzle_orm_pg_core0.PgColumn<{
6504
+ name: "obligation_id";
6505
+ tableName: EnumTableName.LOTS;
6506
+ dataType: "string";
6507
+ columnType: "PgVarchar";
6508
+ data: string;
6509
+ driverParam: string;
6510
+ notNull: true;
6511
+ hasDefault: false;
6512
+ isPrimaryKey: false;
6513
+ isAutoincrement: false;
6514
+ hasRuntimeDefault: false;
6515
+ enumValues: [string, ...string[]];
6516
+ baseColumn: never;
6517
+ identity: undefined;
6518
+ generated: undefined;
6519
+ }, {}, {
6520
+ length: 66;
6521
+ }>;
6323
6522
  lower: drizzle_orm_pg_core0.PgColumn<{
6324
6523
  name: "lower";
6325
6524
  tableName: EnumTableName.LOTS;
@@ -6359,7 +6558,7 @@ declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
6359
6558
  }>;
6360
6559
  declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
6361
6560
  name: EnumTableName.OFFSETS;
6362
- schema: "router_v1.6";
6561
+ schema: "router_v1.8";
6363
6562
  columns: {
6364
6563
  chainId: drizzle_orm_pg_core0.PgColumn<{
6365
6564
  name: "chain_id";
@@ -6437,6 +6636,25 @@ declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
6437
6636
  }, {}, {
6438
6637
  length: 66;
6439
6638
  }>;
6639
+ obligationId: drizzle_orm_pg_core0.PgColumn<{
6640
+ name: "obligation_id";
6641
+ tableName: EnumTableName.OFFSETS;
6642
+ dataType: "string";
6643
+ columnType: "PgVarchar";
6644
+ data: string;
6645
+ driverParam: string;
6646
+ notNull: true;
6647
+ hasDefault: false;
6648
+ isPrimaryKey: false;
6649
+ isAutoincrement: false;
6650
+ hasRuntimeDefault: false;
6651
+ enumValues: [string, ...string[]];
6652
+ baseColumn: never;
6653
+ identity: undefined;
6654
+ generated: undefined;
6655
+ }, {}, {
6656
+ length: 66;
6657
+ }>;
6440
6658
  value: drizzle_orm_pg_core0.PgColumn<{
6441
6659
  name: "value";
6442
6660
  tableName: EnumTableName.OFFSETS;
@@ -6460,7 +6678,7 @@ declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
6460
6678
  declare const PositionTypes: drizzle_orm_pg_core0.PgEnum<[Type, ...Type[]]>;
6461
6679
  declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
6462
6680
  name: "position_types";
6463
- schema: "router_v1.6";
6681
+ schema: "router_v1.8";
6464
6682
  columns: {
6465
6683
  id: drizzle_orm_pg_core0.PgColumn<{
6466
6684
  name: "id";
@@ -6501,7 +6719,7 @@ declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
6501
6719
  }>;
6502
6720
  declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
6503
6721
  name: EnumTableName.POSITIONS;
6504
- schema: "router_v1.6";
6722
+ schema: "router_v1.8";
6505
6723
  columns: {
6506
6724
  chainId: drizzle_orm_pg_core0.PgColumn<{
6507
6725
  name: "chain_id";
@@ -6652,7 +6870,7 @@ declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
6652
6870
  }>;
6653
6871
  declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
6654
6872
  name: EnumTableName.TRANSFERS;
6655
- schema: "router_v1.6";
6873
+ schema: "router_v1.8";
6656
6874
  columns: {
6657
6875
  eventId: drizzle_orm_pg_core0.PgColumn<{
6658
6876
  name: "event_id";
@@ -6806,7 +7024,7 @@ declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
6806
7024
  declare const StatusCode: drizzle_orm_pg_core0.PgEnum<[Status, ...Status[]]>;
6807
7025
  declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
6808
7026
  name: "status";
6809
- schema: "router_v1.6";
7027
+ schema: "router_v1.8";
6810
7028
  columns: {
6811
7029
  id: drizzle_orm_pg_core0.PgColumn<{
6812
7030
  name: "id";
@@ -6847,7 +7065,7 @@ declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
6847
7065
  }>;
6848
7066
  declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
6849
7067
  name: "validations";
6850
- schema: "router_v1.6";
7068
+ schema: "router_v1.8";
6851
7069
  columns: {
6852
7070
  offerHash: drizzle_orm_pg_core0.PgColumn<{
6853
7071
  name: "offer_hash";
@@ -6907,7 +7125,7 @@ declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
6907
7125
  }>;
6908
7126
  declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
6909
7127
  name: EnumTableName.COLLECTORS;
6910
- schema: "router_v1.6";
7128
+ schema: "router_v1.8";
6911
7129
  columns: {
6912
7130
  chainId: drizzle_orm_pg_core0.PgColumn<{
6913
7131
  name: "chain_id";
@@ -7003,7 +7221,7 @@ declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
7003
7221
  }>;
7004
7222
  declare const chains$1: drizzle_orm_pg_core0.PgTableWithColumns<{
7005
7223
  name: EnumTableName.CHAINS;
7006
- schema: "router_v1.6";
7224
+ schema: "router_v1.8";
7007
7225
  columns: {
7008
7226
  chainId: drizzle_orm_pg_core0.PgColumn<{
7009
7227
  name: "chain_id";
@@ -7080,7 +7298,7 @@ declare const chains$1: drizzle_orm_pg_core0.PgTableWithColumns<{
7080
7298
  }>;
7081
7299
  declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
7082
7300
  name: EnumTableName.TREES;
7083
- schema: "router_v1.6";
7301
+ schema: "router_v1.8";
7084
7302
  columns: {
7085
7303
  root: drizzle_orm_pg_core0.PgColumn<{
7086
7304
  name: "root";
@@ -7142,7 +7360,7 @@ declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
7142
7360
  }>;
7143
7361
  declare const merklePaths: drizzle_orm_pg_core0.PgTableWithColumns<{
7144
7362
  name: EnumTableName.MERKLE_PATHS;
7145
- schema: "router_v1.6";
7363
+ schema: "router_v1.8";
7146
7364
  columns: {
7147
7365
  offerHash: drizzle_orm_pg_core0.PgColumn<{
7148
7366
  name: "offer_hash";
@@ -7224,9 +7442,9 @@ declare namespace index_d_exports$2 {
7224
7442
  }
7225
7443
  //#endregion
7226
7444
  //#region src/gatekeeper/morphoRules.d.ts
7227
- declare const morphoRules: (chains: Chain$1[]) => (Rule<Offer, "mixed_maker"> | Rule<Offer, "amount_mutual_exclusivity"> | Rule<Offer, "chain_ids"> | Rule<Offer, "maturity"> | Rule<Offer, "callback"> | Rule<Offer, "token"> | Rule<Offer, "oracle">)[];
7445
+ declare const morphoRules: (chains: Chain$1[]) => (Rule<Offer, "mixed_maker"> | Rule<Offer, "amount_mutual_exclusivity"> | Rule<Offer, "chain_ids"> | Rule<Offer, "maturity"> | Rule<Offer, "callback"> | Rule<Offer, "loan_token"> | Rule<Offer, "collateral_token"> | Rule<Offer, "oracle">)[];
7228
7446
  declare namespace Rules_d_exports {
7229
- export { ValidityParameters, amountMutualExclusivity, callback, chains, maturity, oracle, sameMaker, token, validity };
7447
+ export { ValidityParameters, amountMutualExclusivity, callback, chains, collateralToken, loanToken, maturity, oracle, sameMaker, validity };
7230
7448
  }
7231
7449
  type ValidityParameters = {
7232
7450
  client: PublicClient<Transport, Chain$1>;
@@ -7255,15 +7473,25 @@ declare const callback: ({
7255
7473
  allowedAddresses: Address[];
7256
7474
  }) => Rule<Offer, "callback">;
7257
7475
  /**
7258
- * A validation rule that checks if the offer's tokens are allowed for its chain.
7259
- * @param assetsByChainId - Allowed assets indexed by chain id.
7476
+ * A validation rule that checks if the offer's loan token is allowed for its chain.
7477
+ * @param assetsByChainId - Allowed loan tokens indexed by chain id.
7260
7478
  * @returns The issue that was found. If the offer is valid, this will be undefined.
7261
7479
  */
7262
- declare const token: ({
7480
+ declare const loanToken: ({
7263
7481
  assetsByChainId
7264
7482
  }: {
7265
7483
  assetsByChainId: Partial<Record<Id, Address[]>>;
7266
- }) => Rule<Offer, "token">;
7484
+ }) => Rule<Offer, "loan_token">;
7485
+ /**
7486
+ * A validation rule that checks if the offer's collateral tokens are allowed for its chain.
7487
+ * @param collateralAssetsByChainId - Allowed collateral tokens indexed by chain id.
7488
+ * @returns The issue that was found. If the offer is valid, this will be undefined.
7489
+ */
7490
+ declare const collateralToken: ({
7491
+ collateralAssetsByChainId
7492
+ }: {
7493
+ collateralAssetsByChainId: Partial<Record<Id, Address[]>>;
7494
+ }) => Rule<Offer, "collateral_token">;
7267
7495
  /**
7268
7496
  * A validation rule that checks if the offer's oracle addresses are allowed for its chain.
7269
7497
  * @param oraclesByChainId - Allowed oracles indexed by chain id.
@@ -7520,5 +7748,5 @@ declare namespace index_d_exports$3 {
7520
7748
  export { BaseError, GlobalErrorType, Group_d_exports as Group, Random_d_exports as Random, ReorgError, Snake, time_d_exports as Time, atMostOneNonZero, batch, batchMulticall, fromSnakeCase$3 as fromSnakeCase, lazy, max$1 as max, min, poll, retry, stringifyBigint, toSnakeCase$1 as toSnakeCase, wait };
7521
7749
  }
7522
7750
  //#endregion
7523
- export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, time_d_exports as Time, TradingFee_d_exports as TradingFee, Transfer_d_exports as Transfer, Tree_d_exports as Tree, UsersController, index_d_exports$3 as Utils, ValidateController, ValidateOffersData, ValidateOffersIssues, ValidateOffersSuccess, Gate_d_exports as Validation, ValidationIssue, morphoRules, parse, safeParse };
7751
+ export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, 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 };
7524
7752
  //# sourceMappingURL=index.node.d.ts.map