@morpho-dev/router 0.8.0 → 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.
@@ -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;
@@ -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",
@@ -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.
@@ -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 = {
@@ -2016,6 +2041,7 @@ type RandomConfig = {
2016
2041
  address: Address;
2017
2042
  data: Hex;
2018
2043
  };
2044
+ receiverIfMakerIsSeller?: Address;
2019
2045
  collaterals?: readonly Collateral[];
2020
2046
  };
2021
2047
  /**
@@ -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
  }
@@ -2918,6 +2952,7 @@ type Row = {
2918
2952
  address: Address;
2919
2953
  data: Hex;
2920
2954
  };
2955
+ receiverIfMakerIsSeller: Address;
2921
2956
  consumed: bigint;
2922
2957
  available: bigint;
2923
2958
  takeable: bigint;
@@ -2937,18 +2972,6 @@ type OffersDomain = {
2937
2972
  get: (parameters?: GetOffersParams) => Promise<{
2938
2973
  rows: Row[];
2939
2974
  nextCursor: string | null;
2940
- }>; /** Get obligations */
2941
- getObligations: (parameters?: {
2942
- ids?: Hex[];
2943
- chainId?: Id[];
2944
- loanToken?: Address[];
2945
- collateralToken?: Address[];
2946
- maturity?: number[];
2947
- cursor?: string;
2948
- limit?: number;
2949
- }) => Promise<{
2950
- obligations: Obligation[];
2951
- nextCursor: string | null;
2952
2975
  }>; /** Get quotes for given obligations. */
2953
2976
  getQuotes: (parameters: {
2954
2977
  obligationIds: Hex[];
@@ -3113,6 +3136,14 @@ type ObligationsDomain = {
3113
3136
  * @param obligations - Obligations to insert. {@link Obligation.Obligation}
3114
3137
  */
3115
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[]>;
3116
3147
  };
3117
3148
  //#endregion
3118
3149
  //#region src/database/domains/Offsets.d.ts
@@ -3304,6 +3335,34 @@ type ValidationsDomain = {
3304
3335
  */
3305
3336
  upsert: (validations: Validation[]) => Promise<void>;
3306
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
+ };
3307
3366
  declare namespace Database_d_exports {
3308
3367
  export { Core, Database, Driver, WithDomains, connect$2 as connect, getSchemaNamesForMigration };
3309
3368
  }
@@ -3324,7 +3383,13 @@ type Domains = {
3324
3383
  positions: PositionsDomain;
3325
3384
  transfers: TransfersDomain;
3326
3385
  };
3327
- 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;
3328
3393
  type Core = Omit<WithDomains<Driver>, "transaction"> & {
3329
3394
  transaction<T>(fn: (tx: WithDomains<Driver>) => Promise<T>): Promise<T>;
3330
3395
  };
@@ -3944,11 +4009,16 @@ interface paths {
3944
4009
  };
3945
4010
  /**
3946
4011
  * List all obligations
3947
- * @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.
3948
4013
  */
3949
4014
  get: {
3950
4015
  parameters: {
3951
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;
3952
4022
  /**
3953
4023
  * @description Filter by exact maturity timestamps (comma-separated, unix seconds).
3954
4024
  * @example 1761922800,1764524800
@@ -3975,8 +4045,8 @@ interface paths {
3975
4045
  */
3976
4046
  limit?: number;
3977
4047
  /**
3978
- * @description Obligation id cursor for pagination.
3979
- * @example 0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc
4048
+ * @description Pagination cursor in base64url-encoded format.
4049
+ * @example eyJzb3J0IjpbImlkIl0sImlkIjoiMHgxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAiLCJhc2siOiIwIiwiYmlkIjoiMCIsIm1hdHVyaXR5IjoxNzYxOTIyODAwfQ
3980
4050
  */
3981
4051
  cursor?: string;
3982
4052
  };
@@ -4461,7 +4531,8 @@ interface components {
4461
4531
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
4462
4532
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
4463
4533
  * "callback": "0x0000000000000000000000000000000000000000",
4464
- * "callback_data": "0x"
4534
+ * "callback_data": "0x",
4535
+ * "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
4465
4536
  * },
4466
4537
  * "offer_hash": "0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427",
4467
4538
  * "obligation_id": "0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc",
@@ -4505,7 +4576,8 @@ interface components {
4505
4576
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
4506
4577
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
4507
4578
  * "callback": "0x0000000000000000000000000000000000000000",
4508
- * "callback_data": "0x"
4579
+ * "callback_data": "0x",
4580
+ * "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
4509
4581
  * }
4510
4582
  */
4511
4583
  offer: components["schemas"]["OfferDataResponse"]; /** @example 0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427 */
@@ -4551,7 +4623,8 @@ interface components {
4551
4623
  group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
4552
4624
  session: string; /** @example 0x0000000000000000000000000000000000000000 */
4553
4625
  callback: string; /** @example 0x */
4554
- callback_data: string;
4626
+ callback_data: string; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
4627
+ receiver_if_maker_is_seller: string;
4555
4628
  };
4556
4629
  ObligationOfferResponse: {
4557
4630
  /** @example 0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078 */loan_token: string;
@@ -4573,7 +4646,7 @@ interface components {
4573
4646
  oracle: string;
4574
4647
  };
4575
4648
  ObligationListResponse: {
4576
- meta: components["schemas"]["Meta"]; /** @example 0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc */
4649
+ meta: components["schemas"]["Meta"]; /** @example eyJzb3J0IjpbImlkIl0sImlkIjoiMHgxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAiLCJhc2siOiIwIiwiYmlkIjoiMCIsIm1hdHVyaXR5IjoxNzYxOTIyODAwfQ */
4577
4650
  cursor: string | null; /** @description List of obligations with takable offers. */
4578
4651
  data: components["schemas"]["ObligationResponse"][];
4579
4652
  };
@@ -4587,10 +4660,20 @@ interface components {
4587
4660
  bid: components["schemas"]["BidResponse"];
4588
4661
  };
4589
4662
  AskResponse: {
4590
- /** @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;
4591
4669
  };
4592
4670
  BidResponse: {
4593
- /** @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;
4594
4677
  };
4595
4678
  ObligationSingleSuccessResponse: {
4596
4679
  meta: components["schemas"]["Meta"]; /** @example null */
@@ -4749,7 +4832,8 @@ interface components {
4749
4832
  * "data": "0x"
4750
4833
  * }
4751
4834
  */
4752
- callback: components["schemas"]["ValidateCallbackRequest"];
4835
+ callback: components["schemas"]["ValidateCallbackRequest"]; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
4836
+ receiver_if_maker_is_seller: string;
4753
4837
  };
4754
4838
  ValidateCollateralRequest: {
4755
4839
  /** @example 0x34Cf890dB685FC536E05652FB41f02090c3fb751 */asset: string; /** @example 0x45093658BE7f90B63D7c359e8f408e503c2D9401 */
@@ -4792,6 +4876,7 @@ type ObligationResponse = paths["/v1/obligations"]["get"]["responses"]["200"]["c
4792
4876
  * Creates an `ObligationResponse` from a `Obligation`.
4793
4877
  * @constructor
4794
4878
  * @param obligation - {@link Obligation}
4879
+ * @param quote - {@link Quote}
4795
4880
  * @returns The created `ObligationResponse`. {@link ObligationResponse}
4796
4881
  */
4797
4882
  declare function from$3(obligation: Obligation, quote: Quote): ObligationResponse;
@@ -4823,6 +4908,7 @@ type Input = Readonly<{
4823
4908
  address: Address;
4824
4909
  data: Hex;
4825
4910
  };
4911
+ receiverIfMakerIsSeller: Address;
4826
4912
  root?: Hex | undefined;
4827
4913
  proof?: Hex[] | undefined;
4828
4914
  signature?: Hex | undefined;
@@ -4957,6 +5043,7 @@ declare const schemas: {
4957
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>>>>>;
4958
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>>>>>;
4959
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>>>;
4960
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>>>;
4961
5048
  }, z$1.core.$strip>;
4962
5049
  readonly get_obligation: z$1.ZodObject<{
@@ -5227,13 +5314,16 @@ declare namespace getOffers {
5227
5314
  }
5228
5315
  declare function getObligations(apiClient: Client$1<paths>, parameters?: getObligations.Parameters): Promise<getObligations.ReturnType>;
5229
5316
  declare namespace getObligations {
5317
+ type SortField = "id" | "ask" | "bid" | "maturity";
5318
+ type SortEntry = SortField | `-${SortField}`;
5230
5319
  type Parameters = {
5231
- /** 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 */
5232
5321
  limit?: number; /** Filter by chain IDs (comma-separated). */
5233
5322
  chainIds?: number[]; /** Filter by loan token addresses (comma-separated). */
5234
5323
  loanTokens?: Address[]; /** Filter by collateral tokens (comma-separated, matches any collateral). */
5235
5324
  collateralTokens?: Address[]; /** Filter by exact maturity timestamps (comma-separated, unix seconds). */
5236
- maturities?: number[];
5325
+ maturities?: number[]; /** Sort order entries in priority order. Prefix with '-' for descending. Max 3 fields. */
5326
+ sort?: SortEntry[];
5237
5327
  };
5238
5328
  type ReturnType = {
5239
5329
  obligations: Compute<{
@@ -6129,6 +6219,25 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
6129
6219
  identity: undefined;
6130
6220
  generated: undefined;
6131
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
+ }>;
6132
6241
  blockNumber: drizzle_orm_pg_core0.PgColumn<{
6133
6242
  name: "block_number";
6134
6243
  tableName: EnumTableName.OFFERS;