@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.
@@ -509,7 +509,7 @@ declare const MorphoV2: readonly [{
509
509
  readonly stateMutability: "nonpayable";
510
510
  readonly inputs: readonly [{
511
511
  readonly type: "address";
512
- readonly name: "recipient";
512
+ readonly name: "feeRecipient";
513
513
  }];
514
514
  readonly outputs: readonly [];
515
515
  }, {
@@ -589,6 +589,15 @@ declare const MorphoV2: readonly [{
589
589
  }, {
590
590
  readonly type: "address";
591
591
  readonly name: "taker";
592
+ }, {
593
+ readonly type: "address";
594
+ readonly name: "takerCallback";
595
+ }, {
596
+ readonly type: "bytes";
597
+ readonly name: "takerCallbackData";
598
+ }, {
599
+ readonly type: "address";
600
+ readonly name: "receiverIfTakerIsSeller";
592
601
  }, {
593
602
  readonly type: "tuple";
594
603
  readonly components: readonly [{
@@ -650,6 +659,9 @@ declare const MorphoV2: readonly [{
650
659
  }, {
651
660
  readonly type: "bytes";
652
661
  readonly name: "callbackData";
662
+ }, {
663
+ readonly type: "address";
664
+ readonly name: "receiverIfMakerIsSeller";
653
665
  }];
654
666
  readonly name: "offer";
655
667
  }, {
@@ -671,12 +683,6 @@ declare const MorphoV2: readonly [{
671
683
  }, {
672
684
  readonly type: "bytes32[]";
673
685
  readonly name: "proof";
674
- }, {
675
- readonly type: "address";
676
- readonly name: "takerCallback";
677
- }, {
678
- readonly type: "bytes";
679
- readonly name: "takerCallbackData";
680
686
  }];
681
687
  readonly outputs: readonly [{
682
688
  readonly type: "uint256";
@@ -798,6 +804,9 @@ declare const MorphoV2: readonly [{
798
804
  }, {
799
805
  readonly type: "address";
800
806
  readonly name: "onBehalf";
807
+ }, {
808
+ readonly type: "address";
809
+ readonly name: "receiver";
801
810
  }];
802
811
  readonly outputs: readonly [{
803
812
  readonly type: "uint256";
@@ -840,6 +849,9 @@ declare const MorphoV2: readonly [{
840
849
  }, {
841
850
  readonly type: "address";
842
851
  readonly name: "onBehalf";
852
+ }, {
853
+ readonly type: "address";
854
+ readonly name: "receiver";
843
855
  }];
844
856
  readonly outputs: readonly [];
845
857
  }, {
@@ -1027,7 +1039,7 @@ declare const MorphoV2: readonly [{
1027
1039
  readonly type: "event";
1028
1040
  readonly inputs: readonly [{
1029
1041
  readonly type: "address";
1030
- readonly name: "recipient";
1042
+ readonly name: "feeRecipient";
1031
1043
  readonly indexed: true;
1032
1044
  }];
1033
1045
  }, {
@@ -1102,6 +1114,9 @@ declare const MorphoV2: readonly [{
1102
1114
  }, {
1103
1115
  readonly type: "bool";
1104
1116
  readonly name: "sellerIsBorrower";
1117
+ }, {
1118
+ readonly type: "address";
1119
+ readonly name: "sellerReceiver";
1105
1120
  }, {
1106
1121
  readonly type: "bytes32";
1107
1122
  readonly name: "group";
@@ -1115,7 +1130,6 @@ declare const MorphoV2: readonly [{
1115
1130
  readonly inputs: readonly [{
1116
1131
  readonly type: "address";
1117
1132
  readonly name: "caller";
1118
- readonly indexed: true;
1119
1133
  }, {
1120
1134
  readonly type: "bytes32";
1121
1135
  readonly name: "id";
@@ -1130,6 +1144,10 @@ declare const MorphoV2: readonly [{
1130
1144
  readonly type: "address";
1131
1145
  readonly name: "onBehalf";
1132
1146
  readonly indexed: true;
1147
+ }, {
1148
+ readonly type: "address";
1149
+ readonly name: "receiver";
1150
+ readonly indexed: true;
1133
1151
  }];
1134
1152
  }, {
1135
1153
  readonly name: "WithdrawCollateral";
@@ -1152,6 +1170,9 @@ declare const MorphoV2: readonly [{
1152
1170
  readonly type: "address";
1153
1171
  readonly name: "onBehalf";
1154
1172
  readonly indexed: true;
1173
+ }, {
1174
+ readonly type: "address";
1175
+ readonly name: "receiver";
1155
1176
  }];
1156
1177
  }];
1157
1178
  type MorphoV2 = typeof MorphoV2;
@@ -1885,7 +1906,8 @@ type Offer = {
1885
1906
  readonly callback: {
1886
1907
  readonly address: Address;
1887
1908
  readonly data: Hex;
1888
- };
1909
+ }; /** Receiver of loan token proceeds when maker is seller on `take()`. */
1910
+ readonly receiverIfMakerIsSeller: Address;
1889
1911
  };
1890
1912
  declare enum Status {
1891
1913
  VALID = "VALID",
@@ -1918,6 +1940,7 @@ declare const OfferSchema: () => z$1.ZodObject<{
1918
1940
  address: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
1919
1941
  data: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
1920
1942
  }, z$1.core.$strip>;
1943
+ receiverIfMakerIsSeller: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
1921
1944
  }, z$1.core.$strip>;
1922
1945
  /**
1923
1946
  * Input type for creating offers. Accepts flexible group types that will be coerced to Hex.
@@ -1930,12 +1953,13 @@ declare const OfferSchema: () => z$1.ZodObject<{
1930
1953
  *
1931
1954
  * All values validated to be non-negative and within bytes32 range.
1932
1955
  */
1933
- type OfferInput = Compute<Omit<Offer, "chainId" | "group" | "session" | "obligationUnits" | "obligationShares"> & {
1956
+ type OfferInput = Compute<Omit<Offer, "chainId" | "group" | "session" | "obligationUnits" | "obligationShares" | "receiverIfMakerIsSeller"> & {
1934
1957
  chainId: number;
1935
1958
  group: Hex | bigint | number | string; /** Optional: defaults to zero bytes32. */
1936
1959
  session?: Hex | bigint | number | string; /** Optional: defaults to 0n. Mutually exclusive with assets and obligationShares. */
1937
1960
  obligationUnits?: bigint; /** Optional: defaults to 0n. Mutually exclusive with assets and obligationUnits. */
1938
- obligationShares?: bigint;
1961
+ obligationShares?: bigint; /** Optional: defaults to maker for backward compatibility. */
1962
+ receiverIfMakerIsSeller?: Address;
1939
1963
  }>;
1940
1964
  /**
1941
1965
  * Creates an offer from a plain object.
@@ -1953,9 +1977,9 @@ declare namespace from$13 {
1953
1977
  * @param input - The offer to create.
1954
1978
  * @returns The created offer.
1955
1979
  */
1956
- declare function fromSnakeCase$1(input: Snake<Omit<Offer, "chainId" | "session"> & {
1957
- chainId: number;
1958
- session: string;
1980
+ declare function fromSnakeCase$1(input: Snake<Omit<Offer, "session" | "receiverIfMakerIsSeller"> & {
1981
+ session?: Hex;
1982
+ receiverIfMakerIsSeller?: Address;
1959
1983
  }>): Offer;
1960
1984
  /**
1961
1985
  * Converts an offer to a snake case object.
@@ -1993,6 +2017,7 @@ declare const serialize: (offer: Offer) => {
1993
2017
  address: `0x${string}`;
1994
2018
  data: `0x${string}`;
1995
2019
  };
2020
+ receiverIfMakerIsSeller: `0x${string}`;
1996
2021
  hash: `0x${string}`;
1997
2022
  };
1998
2023
  type RandomConfig = {
@@ -2015,6 +2040,7 @@ type RandomConfig = {
2015
2040
  address: Address;
2016
2041
  data: Hex;
2017
2042
  };
2043
+ receiverIfMakerIsSeller?: Address;
2018
2044
  collaterals?: readonly Collateral[];
2019
2045
  };
2020
2046
  /**
@@ -2085,6 +2111,9 @@ declare const types: {
2085
2111
  }, {
2086
2112
  readonly name: "callback";
2087
2113
  readonly type: "Callback";
2114
+ }, {
2115
+ readonly name: "receiverIfMakerIsSeller";
2116
+ readonly type: "address";
2088
2117
  }];
2089
2118
  readonly Collateral: readonly [{
2090
2119
  readonly name: "asset";
@@ -2183,6 +2212,11 @@ declare const takeEvent: {
2183
2212
  readonly type: "bool";
2184
2213
  readonly indexed: false;
2185
2214
  readonly internalType: "bool";
2215
+ }, {
2216
+ readonly name: "sellerReceiver";
2217
+ readonly type: "address";
2218
+ readonly indexed: false;
2219
+ readonly internalType: "address";
2186
2220
  }, {
2187
2221
  readonly name: "group";
2188
2222
  readonly type: "bytes32";
@@ -2386,26 +2420,26 @@ declare namespace from$11 {
2386
2420
  type ReturnType = Position;
2387
2421
  }
2388
2422
  declare namespace Quote_d_exports {
2389
- export { InvalidQuoteError, Quote, QuoteSchema, from$10 as from, fromSnakeCase, random };
2423
+ export { InvalidQuoteError, Quote, QuoteInput, Side, from$10 as from, fromSnakeCase, random };
2390
2424
  }
2391
- type Quote = {
2425
+ type Side = {
2426
+ /** The best side tick, or null when no active quote exists. */tick: number | null; /** The side price for the obligation. (18 decimals). */
2427
+ price: bigint;
2428
+ };
2429
+ type QuoteInput = {
2392
2430
  /** The obligation id. */obligationId: Hex;
2393
2431
  ask: {
2394
- /** The ask price for the obligation. (18 decimals). */price: bigint;
2432
+ /** The best ask tick, or null when there is no active ask quote. */tick: number | null;
2395
2433
  };
2396
2434
  bid: {
2397
- /** The bid price for the obligation. (18 decimals). */price: bigint;
2435
+ /** The best bid tick, or null when there is no active bid quote. */tick: number | null;
2398
2436
  };
2399
2437
  };
2400
- declare const QuoteSchema: z$1.ZodObject<{
2401
- obligationId: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
2402
- ask: z$1.ZodObject<{
2403
- price: z$1.ZodBigInt;
2404
- }, z$1.core.$strip>;
2405
- bid: z$1.ZodObject<{
2406
- price: z$1.ZodBigInt;
2407
- }, z$1.core.$strip>;
2408
- }, z$1.core.$strip>;
2438
+ type Quote = {
2439
+ /** The obligation id. */obligationId: Hex;
2440
+ ask: Side;
2441
+ bid: Side;
2442
+ };
2409
2443
  /**
2410
2444
  * Creates a quote for a given obligation.
2411
2445
  * @constructor
@@ -2415,12 +2449,12 @@ declare const QuoteSchema: z$1.ZodObject<{
2415
2449
  *
2416
2450
  * @example
2417
2451
  * ```ts
2418
- * const quote = Quote.from({ obligationId: "0x123", ask: { price: 100n }, bid: { price: 100n } });
2452
+ * const quote = Quote.from({ obligationId: "0x123", ask: { tick: 500 }, bid: { tick: 510 } });
2419
2453
  * ```
2420
2454
  */
2421
2455
  declare function from$10(parameters: from$10.Parameters): from$10.ReturnType;
2422
2456
  declare namespace from$10 {
2423
- type Parameters = Quote;
2457
+ type Parameters = QuoteInput;
2424
2458
  type ReturnType = Quote;
2425
2459
  type ErrorType = InvalidQuoteError;
2426
2460
  }
@@ -2432,7 +2466,7 @@ declare namespace from$10 {
2432
2466
  */
2433
2467
  declare function fromSnakeCase(snake: fromSnakeCase.Parameters): fromSnakeCase.ReturnType;
2434
2468
  declare namespace fromSnakeCase {
2435
- type Parameters = Snake<Quote>;
2469
+ type Parameters = Snake<QuoteInput>;
2436
2470
  type ReturnType = Quote;
2437
2471
  type ErrorType = from$10.ErrorType;
2438
2472
  }
@@ -2917,6 +2951,7 @@ type Row = {
2917
2951
  address: Address;
2918
2952
  data: Hex;
2919
2953
  };
2954
+ receiverIfMakerIsSeller: Address;
2920
2955
  consumed: bigint;
2921
2956
  available: bigint;
2922
2957
  takeable: bigint;
@@ -2936,18 +2971,6 @@ type OffersDomain = {
2936
2971
  get: (parameters?: GetOffersParams) => Promise<{
2937
2972
  rows: Row[];
2938
2973
  nextCursor: string | null;
2939
- }>; /** Get obligations */
2940
- getObligations: (parameters?: {
2941
- ids?: Hex[];
2942
- chainId?: Id[];
2943
- loanToken?: Address[];
2944
- collateralToken?: Address[];
2945
- maturity?: number[];
2946
- cursor?: string;
2947
- limit?: number;
2948
- }) => Promise<{
2949
- obligations: Obligation[];
2950
- nextCursor: string | null;
2951
2974
  }>; /** Get quotes for given obligations. */
2952
2975
  getQuotes: (parameters: {
2953
2976
  obligationIds: Hex[];
@@ -3112,6 +3135,14 @@ type ObligationsDomain = {
3112
3135
  * @param obligations - Obligations to insert. {@link Obligation.Obligation}
3113
3136
  */
3114
3137
  create: (obligations: Obligation[]) => Promise<void>;
3138
+ /**
3139
+ * Get active obligations with optional chain filters.
3140
+ * @param parameters - Optional chain filters.
3141
+ * @returns Matching obligations.
3142
+ */
3143
+ get: (parameters?: {
3144
+ chainId?: Id[];
3145
+ }) => Promise<Obligation[]>;
3115
3146
  };
3116
3147
  //#endregion
3117
3148
  //#region src/database/domains/Offsets.d.ts
@@ -3303,6 +3334,34 @@ type ValidationsDomain = {
3303
3334
  */
3304
3335
  upsert: (validations: Validation[]) => Promise<void>;
3305
3336
  };
3337
+ //#endregion
3338
+ //#region src/database/readers/ObligationsListing.d.ts
3339
+ type ListObligationsParameters = {
3340
+ ids?: Hex[];
3341
+ chainId?: Id[];
3342
+ loanToken?: Address[];
3343
+ collateralToken?: Address[];
3344
+ maturity?: number[];
3345
+ sort?: string[];
3346
+ cursor?: string;
3347
+ limit?: number;
3348
+ };
3349
+ type ListedObligation = {
3350
+ obligation: Obligation;
3351
+ quote: Quote;
3352
+ };
3353
+ type ListObligationsResult = {
3354
+ obligations: ListedObligation[];
3355
+ nextCursor: string | null;
3356
+ };
3357
+ type ObligationsListingReader = {
3358
+ /**
3359
+ * Lists obligations with SQL keyset pagination and opaque cursor handling.
3360
+ * @param parameters - Optional filters, sorting, and pagination cursor.
3361
+ * @returns Listed obligations with associated quotes and a next cursor.
3362
+ */
3363
+ list: (parameters?: ListObligationsParameters) => Promise<ListObligationsResult>;
3364
+ };
3306
3365
  declare namespace Database_d_exports {
3307
3366
  export { Core, Database, Driver, WithDomains, connect$2 as connect, getSchemaNamesForMigration };
3308
3367
  }
@@ -3323,7 +3382,13 @@ type Domains = {
3323
3382
  positions: PositionsDomain;
3324
3383
  transfers: TransfersDomain;
3325
3384
  };
3326
- type WithDomains<D extends Driver> = D & Domains;
3385
+ type Readers = {
3386
+ obligations: ObligationsListingReader;
3387
+ };
3388
+ type DatabaseFacade = Domains & {
3389
+ readers: Readers;
3390
+ };
3391
+ type WithDomains<D extends Driver> = D & DatabaseFacade;
3327
3392
  type Core = Omit<WithDomains<Driver>, "transaction"> & {
3328
3393
  transaction<T>(fn: (tx: WithDomains<Driver>) => Promise<T>): Promise<T>;
3329
3394
  };
@@ -3943,11 +4008,16 @@ interface paths {
3943
4008
  };
3944
4009
  /**
3945
4010
  * List all obligations
3946
- * @description Returns a list of obligations with their current best ask and bid. Obligations are sorted by their id in ascending order by default.
4011
+ * @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.
3947
4012
  */
3948
4013
  get: {
3949
4014
  parameters: {
3950
4015
  query?: {
4016
+ /**
4017
+ * @description Sort order as comma-separated fields (`id`, `ask`, `bid`, `maturity`). Prefix with `-` for descending order. Max 3 fields.
4018
+ * @example -ask,bid,maturity
4019
+ */
4020
+ sort?: string;
3951
4021
  /**
3952
4022
  * @description Filter by exact maturity timestamps (comma-separated, unix seconds).
3953
4023
  * @example 1761922800,1764524800
@@ -3974,8 +4044,8 @@ interface paths {
3974
4044
  */
3975
4045
  limit?: number;
3976
4046
  /**
3977
- * @description Obligation id cursor for pagination.
3978
- * @example 0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc
4047
+ * @description Pagination cursor in base64url-encoded format.
4048
+ * @example eyJzb3J0IjpbImlkIl0sImlkIjoiMHgxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAiLCJhc2siOiIwIiwiYmlkIjoiMCIsIm1hdHVyaXR5IjoxNzYxOTIyODAwfQ
3979
4049
  */
3980
4050
  cursor?: string;
3981
4051
  };
@@ -4460,7 +4530,8 @@ interface components {
4460
4530
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
4461
4531
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
4462
4532
  * "callback": "0x0000000000000000000000000000000000000000",
4463
- * "callback_data": "0x"
4533
+ * "callback_data": "0x",
4534
+ * "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
4464
4535
  * },
4465
4536
  * "offer_hash": "0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427",
4466
4537
  * "obligation_id": "0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc",
@@ -4504,7 +4575,8 @@ interface components {
4504
4575
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
4505
4576
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
4506
4577
  * "callback": "0x0000000000000000000000000000000000000000",
4507
- * "callback_data": "0x"
4578
+ * "callback_data": "0x",
4579
+ * "receiver_if_maker_is_seller": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401"
4508
4580
  * }
4509
4581
  */
4510
4582
  offer: components["schemas"]["OfferDataResponse"]; /** @example 0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427 */
@@ -4550,7 +4622,8 @@ interface components {
4550
4622
  group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
4551
4623
  session: string; /** @example 0x0000000000000000000000000000000000000000 */
4552
4624
  callback: string; /** @example 0x */
4553
- callback_data: string;
4625
+ callback_data: string; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
4626
+ receiver_if_maker_is_seller: string;
4554
4627
  };
4555
4628
  ObligationOfferResponse: {
4556
4629
  /** @example 0xC9A9C45C0eB717f8b5F193Af6bAa05A1c0Ac5078 */loan_token: string;
@@ -4572,7 +4645,7 @@ interface components {
4572
4645
  oracle: string;
4573
4646
  };
4574
4647
  ObligationListResponse: {
4575
- meta: components["schemas"]["Meta"]; /** @example 0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc */
4648
+ meta: components["schemas"]["Meta"]; /** @example eyJzb3J0IjpbImlkIl0sImlkIjoiMHgxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAiLCJhc2siOiIwIiwiYmlkIjoiMCIsIm1hdHVyaXR5IjoxNzYxOTIyODAwfQ */
4576
4649
  cursor: string | null; /** @description List of obligations with takable offers. */
4577
4650
  data: components["schemas"]["ObligationResponse"][];
4578
4651
  };
@@ -4586,10 +4659,20 @@ interface components {
4586
4659
  bid: components["schemas"]["BidResponse"];
4587
4660
  };
4588
4661
  AskResponse: {
4589
- /** @example 1000000000000000000 */price: string;
4662
+ /**
4663
+ * @description Best ask tick. Null when there is no active ask quote.
4664
+ * @example 500
4665
+ */
4666
+ tick: number | null; /** @example 1000000000000000000 */
4667
+ price: string;
4590
4668
  };
4591
4669
  BidResponse: {
4592
- /** @example 1000000000000000000 */price: string;
4670
+ /**
4671
+ * @description Best bid tick. Null when there is no active bid quote.
4672
+ * @example 500
4673
+ */
4674
+ tick: number | null; /** @example 1000000000000000000 */
4675
+ price: string;
4593
4676
  };
4594
4677
  ObligationSingleSuccessResponse: {
4595
4678
  meta: components["schemas"]["Meta"]; /** @example null */
@@ -4748,7 +4831,8 @@ interface components {
4748
4831
  * "data": "0x"
4749
4832
  * }
4750
4833
  */
4751
- callback: components["schemas"]["ValidateCallbackRequest"];
4834
+ callback: components["schemas"]["ValidateCallbackRequest"]; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
4835
+ receiver_if_maker_is_seller: string;
4752
4836
  };
4753
4837
  ValidateCollateralRequest: {
4754
4838
  /** @example 0x34Cf890dB685FC536E05652FB41f02090c3fb751 */asset: string; /** @example 0x45093658BE7f90B63D7c359e8f408e503c2D9401 */
@@ -4791,6 +4875,7 @@ type ObligationResponse = paths["/v1/obligations"]["get"]["responses"]["200"]["c
4791
4875
  * Creates an `ObligationResponse` from a `Obligation`.
4792
4876
  * @constructor
4793
4877
  * @param obligation - {@link Obligation}
4878
+ * @param quote - {@link Quote}
4794
4879
  * @returns The created `ObligationResponse`. {@link ObligationResponse}
4795
4880
  */
4796
4881
  declare function from$3(obligation: Obligation, quote: Quote): ObligationResponse;
@@ -4822,6 +4907,7 @@ type Input = Readonly<{
4822
4907
  address: Address;
4823
4908
  data: Hex;
4824
4909
  };
4910
+ receiverIfMakerIsSeller: Address;
4825
4911
  root?: Hex | undefined;
4826
4912
  proof?: Hex[] | undefined;
4827
4913
  signature?: Hex | undefined;
@@ -4956,6 +5042,7 @@ declare const schemas: {
4956
5042
  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>>>>>;
4957
5043
  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>>>>>;
4958
5044
  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>>>>>;
5045
+ sort: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodString>>>;
4959
5046
  limit: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>, z$1.ZodNumber>>>;
4960
5047
  }, z$1.core.$strip>;
4961
5048
  readonly get_obligation: z$1.ZodObject<{
@@ -5226,13 +5313,16 @@ declare namespace getOffers {
5226
5313
  }
5227
5314
  declare function getObligations(apiClient: Client$1<paths>, parameters?: getObligations.Parameters): Promise<getObligations.ReturnType>;
5228
5315
  declare namespace getObligations {
5316
+ type SortField = "id" | "ask" | "bid" | "maturity";
5317
+ type SortEntry = SortField | `-${SortField}`;
5229
5318
  type Parameters = {
5230
- /** Pagination cursor is a 32-byte hex string. */cursor?: Hex; /** Maximum number of obligations to return. @default 20 */
5319
+ /** Pagination cursor in base64url-encoded format. */cursor?: string; /** Maximum number of obligations to return. @default 20 */
5231
5320
  limit?: number; /** Filter by chain IDs (comma-separated). */
5232
5321
  chainIds?: number[]; /** Filter by loan token addresses (comma-separated). */
5233
5322
  loanTokens?: Address[]; /** Filter by collateral tokens (comma-separated, matches any collateral). */
5234
5323
  collateralTokens?: Address[]; /** Filter by exact maturity timestamps (comma-separated, unix seconds). */
5235
- maturities?: number[];
5324
+ maturities?: number[]; /** Sort order entries in priority order. Prefix with '-' for descending. Max 3 fields. */
5325
+ sort?: SortEntry[];
5236
5326
  };
5237
5327
  type ReturnType = {
5238
5328
  obligations: Compute<{
@@ -6128,6 +6218,25 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
6128
6218
  identity: undefined;
6129
6219
  generated: undefined;
6130
6220
  }, {}, {}>;
6221
+ receiverIfMakerIsSeller: drizzle_orm_pg_core0.PgColumn<{
6222
+ name: "receiver_if_maker_is_seller";
6223
+ tableName: EnumTableName.OFFERS;
6224
+ dataType: "string";
6225
+ columnType: "PgVarchar";
6226
+ data: string;
6227
+ driverParam: string;
6228
+ notNull: false;
6229
+ hasDefault: false;
6230
+ isPrimaryKey: false;
6231
+ isAutoincrement: false;
6232
+ hasRuntimeDefault: false;
6233
+ enumValues: [string, ...string[]];
6234
+ baseColumn: never;
6235
+ identity: undefined;
6236
+ generated: undefined;
6237
+ }, {}, {
6238
+ length: 42;
6239
+ }>;
6131
6240
  blockNumber: drizzle_orm_pg_core0.PgColumn<{
6132
6241
  name: "block_number";
6133
6242
  tableName: EnumTableName.OFFERS;