@morpho-dev/router 0.7.0 → 0.7.1

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.
@@ -2,10 +2,10 @@ import { AbiEvent, Account, Address, ChainContract, ChainFormatters, Client, Get
2
2
  import { Chain } from "viem/chains";
3
3
  import * as z$1 from "zod";
4
4
  import { StandardMerkleTree } from "@openzeppelin/merkle-tree";
5
+ import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
5
6
  import { z } from "zod/v4";
6
7
  import "reflect-metadata";
7
8
  import { OpenAPIDocument } from "openapi-metadata";
8
- import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
9
9
  import { Client as Client$1 } from "openapi-fetch";
10
10
  import { PGlite } from "@electric-sql/pglite";
11
11
  import { drizzle } from "drizzle-orm/node-postgres";
@@ -273,94 +273,19 @@ declare const Morpho: readonly [{
273
273
  }];
274
274
  readonly stateMutability: "view";
275
275
  }];
276
- //#endregion
277
- //#region src/core/types.d.ts
278
- /** Combines members of an intersection into a readable type. */
279
- type Compute<type> = { [key in keyof type]: type[key] } & unknown;
280
- declare const BrandTypeId: unique symbol;
281
- type Brand<in out ID extends string | symbol> = {
282
- readonly [BrandTypeId]: { readonly [id in ID]: ID };
283
- };
284
276
  declare namespace Callback_d_exports {
285
- export { BuyERC20Data, BuyVaultV1CallbackData, Callback, CallbackPosition, SellERC20CallbackData, Type$1 as Type, decode$2 as decode, decodeBuyERC20, decodeBuyVaultV1Callback, decodeSellERC20Callback, encode$2 as encode, encodeBuyERC20, encodeBuyVaultV1Callback, encodeSellERC20Callback, isEmptyCallback };
277
+ export { Callback, Type$1 as Type, isEmptyCallback };
286
278
  }
287
- /** A position decoded from callback data. */
288
- type CallbackPosition = {
289
- /** The ERC20 token contract address. */contract: Address; /** The maximum amount available from this position. */
290
- amount: bigint;
291
- };
292
279
  type Callback = {
293
280
  type: Type$1.BuyWithEmptyCallback;
294
- } | (({
295
- /** The address of the callback contract. */address: Address; /** The ABI-encoded callback data. */
296
- data: Hex;
297
- } & {
298
- type: Type$1.BuyERC20; /** The decoded callback inputs. */
299
- inputs: {
300
- /** The ERC20 positions available for the callback. */positions: CallbackPosition[];
301
- };
302
- }) & Brand<"Callback">);
281
+ } | {
282
+ type: Type$1.SellWithEmptyCallback;
283
+ };
303
284
  declare enum Type$1 {
304
285
  BuyWithEmptyCallback = "buy_with_empty_callback",
305
- BuyERC20 = "buy_erc20",
306
- BuyVaultV1Callback = "buy_vault_v1_callback",
307
- SellERC20Callback = "sell_erc20_callback"
286
+ SellWithEmptyCallback = "sell_with_empty_callback"
308
287
  }
309
288
  declare const isEmptyCallback: (offer: Offer) => boolean;
310
- declare function decode$2(type: Type$1, data: Hex): {
311
- contract: Address;
312
- amount: bigint;
313
- }[];
314
- type BuyERC20Data = {
315
- tokens: Address[];
316
- amounts: bigint[];
317
- };
318
- type BuyVaultV1CallbackData = {
319
- vaults: Address[];
320
- amounts: bigint[];
321
- };
322
- type SellERC20CallbackData = {
323
- collaterals: Address[];
324
- amounts: bigint[];
325
- };
326
- declare function encode$2(type: Type$1.BuyERC20, data: BuyERC20Data): Hex;
327
- declare function encode$2(type: Type$1.BuyVaultV1Callback, data: BuyVaultV1CallbackData): Hex;
328
- declare function encode$2(type: Type$1.SellERC20Callback, data: SellERC20CallbackData): Hex;
329
- /**
330
- * Decodes BuyERC20 callback data into positions.
331
- * @param data - The ABI-encoded callback data containing token addresses and amounts.
332
- * @returns Array of positions with contract address and amount.
333
- * @throws If data is empty, malformed, or arrays have mismatched lengths.
334
- */
335
- declare function decodeBuyERC20(data: Hex): Array<{
336
- contract: Address;
337
- amount: bigint;
338
- }>;
339
- /**
340
- * Encodes BuyERC20 callback parameters into ABI-encoded data.
341
- * @param parameters - The tokens and amounts to encode.
342
- * @returns ABI-encoded hex string.
343
- */
344
- declare function encodeBuyERC20(parameters: {
345
- tokens: Address[];
346
- amounts: bigint[];
347
- }): Hex;
348
- declare function decodeBuyVaultV1Callback(data: Hex): Array<{
349
- contract: Address;
350
- amount: bigint;
351
- }>;
352
- declare function decodeSellERC20Callback(data: Hex): Array<{
353
- contract: Address;
354
- amount: bigint;
355
- }>;
356
- declare function encodeBuyVaultV1Callback(parameters: {
357
- vaults: Address[];
358
- amounts: bigint[];
359
- }): Hex;
360
- declare function encodeSellERC20Callback(parameters: {
361
- collaterals: Address[];
362
- amounts: bigint[];
363
- }): Hex;
364
289
  declare namespace Errors_d_exports {
365
290
  export { BaseError, GlobalErrorType, ReorgError };
366
291
  }
@@ -480,6 +405,14 @@ type ChainRegistry = {
480
405
  * @returns A registry for looking up chains by ID. {@link ChainRegistry}
481
406
  */
482
407
  declare function create$6(chains: Chain$1[]): ChainRegistry;
408
+ //#endregion
409
+ //#region src/core/types.d.ts
410
+ /** Combines members of an intersection into a readable type. */
411
+ type Compute<type> = { [key in keyof type]: type[key] } & unknown;
412
+ declare const BrandTypeId: unique symbol;
413
+ type Brand<in out ID extends string | symbol> = {
414
+ readonly [BrandTypeId]: { readonly [id in ID]: ID };
415
+ };
483
416
  declare namespace LLTV_d_exports {
484
417
  export { InvalidLLTVError, InvalidOptionError$1 as InvalidOptionError, LLTV, LLTVSchema, Options, from$17 as from };
485
418
  }
@@ -626,7 +559,7 @@ declare class DenominatorIsZeroError extends BaseError {
626
559
  constructor();
627
560
  }
628
561
  declare namespace Liquidity_d_exports {
629
- export { LiquidityLink, LiquidityPool, OfferLiquidityPool, calculateMaxDebt, generateAllowancePoolId, generateBalancePoolId, generateBuyVaultCallbackPoolId, generateDebtPoolId, generateMarketLiquidityPoolId, generateObligationCollateralPoolId, generateSellERC20CallbackPoolId, generateUserVaultPositionPoolId, generateVaultPositionPoolId };
562
+ export { LiquidityLink, LiquidityPool, OfferLiquidityPool, calculateMaxDebt, generateAllowancePoolId, generateBalancePoolId, generateDebtPoolId, generateMarketLiquidityPoolId, generateObligationCollateralPoolId, generateUserVaultPositionPoolId, generateVaultPositionPoolId };
630
563
  }
631
564
  /**
632
565
  * Represents a liquidity pool with a unique ID and amount.
@@ -651,10 +584,7 @@ type OfferLiquidityPool = {
651
584
  poolId: string;
652
585
  /**
653
586
  * The available capacity/liquidity from this pool for this offer.
654
- * Meaning varies by pool type:
655
- * - BuyWithEmptyCallback: Matches allowance amount from pool bellow
656
- * - SellERC20Callback: Sell Callback/Predeposited -> Maximum debt capacity calculated from collateral (collateralAmount * oraclePrice * lltv)
657
- * - SellERC20Callback: Existing debt as negative value (reduces available capacity)
587
+ * Matches allowance amount from pool below.
658
588
  */
659
589
  amount: bigint;
660
590
  };
@@ -682,17 +612,6 @@ declare function generateAllowancePoolId(parameters: {
682
612
  chainId: Id;
683
613
  token: Address;
684
614
  }): string;
685
- /**
686
- * Generate pool ID for sell ERC20 callback pools.
687
- * Each offer has its own callback pool to prevent liquidity conflicts.
688
- */
689
- declare function generateSellERC20CallbackPoolId(parameters: {
690
- user: Address;
691
- chainId: Id;
692
- obligationId: Hex;
693
- token: Address;
694
- offerHash: Hex;
695
- }): string;
696
615
  /**
697
616
  * Generate pool ID for obligation collateral pools.
698
617
  * Obligation collateral pools represent collateral already deposited in the obligation.
@@ -704,15 +623,6 @@ declare function generateObligationCollateralPoolId(parameters: {
704
623
  obligationId: Hex;
705
624
  token: Address;
706
625
  }): string;
707
- /**
708
- * Generate pool ID for buy vault callback pools.
709
- */
710
- declare function generateBuyVaultCallbackPoolId(parameters: {
711
- user: Address;
712
- chainId: Id;
713
- vault: Address;
714
- offerHash: Hex;
715
- }): string;
716
626
  /**
717
627
  * Generate pool ID for debt pools.
718
628
  */
@@ -949,7 +859,7 @@ declare class CollateralsAreNotSortedError extends BaseError {
949
859
  constructor();
950
860
  }
951
861
  declare namespace Offer_d_exports {
952
- export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, domain, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, obligationId, random$1 as random, serialize, toSnakeCase, types };
862
+ export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, domain, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, obligationId, random$1 as random, serialize, takeEvent, toSnakeCase, types };
953
863
  }
954
864
  type Offer = {
955
865
  /** The address that made the offer. */readonly maker: Address; /** The amount of assets offered. Mutually exclusive with obligationUnits and obligationShares. */
@@ -1206,6 +1116,80 @@ type OfferConsumed = {
1206
1116
  amount: bigint;
1207
1117
  blockNumber: number;
1208
1118
  };
1119
+ /**
1120
+ * ABI for the Take event emitted by the Morpho V2 contract.
1121
+ */
1122
+ declare const takeEvent: {
1123
+ readonly type: "event";
1124
+ readonly name: "Take";
1125
+ readonly inputs: readonly [{
1126
+ readonly name: "caller";
1127
+ readonly type: "address";
1128
+ readonly indexed: false;
1129
+ readonly internalType: "address";
1130
+ }, {
1131
+ readonly name: "id";
1132
+ readonly type: "bytes32";
1133
+ readonly indexed: true;
1134
+ readonly internalType: "bytes32";
1135
+ }, {
1136
+ readonly name: "maker";
1137
+ readonly type: "address";
1138
+ readonly indexed: true;
1139
+ readonly internalType: "address";
1140
+ }, {
1141
+ readonly name: "taker";
1142
+ readonly type: "address";
1143
+ readonly indexed: true;
1144
+ readonly internalType: "address";
1145
+ }, {
1146
+ readonly name: "offerIsBuy";
1147
+ readonly type: "bool";
1148
+ readonly indexed: false;
1149
+ readonly internalType: "bool";
1150
+ }, {
1151
+ readonly name: "buyerAssets";
1152
+ readonly type: "uint256";
1153
+ readonly indexed: false;
1154
+ readonly internalType: "uint256";
1155
+ }, {
1156
+ readonly name: "sellerAssets";
1157
+ readonly type: "uint256";
1158
+ readonly indexed: false;
1159
+ readonly internalType: "uint256";
1160
+ }, {
1161
+ readonly name: "obligationUnits";
1162
+ readonly type: "uint256";
1163
+ readonly indexed: false;
1164
+ readonly internalType: "uint256";
1165
+ }, {
1166
+ readonly name: "obligationShares";
1167
+ readonly type: "uint256";
1168
+ readonly indexed: false;
1169
+ readonly internalType: "uint256";
1170
+ }, {
1171
+ readonly name: "buyerIsLender";
1172
+ readonly type: "bool";
1173
+ readonly indexed: false;
1174
+ readonly internalType: "bool";
1175
+ }, {
1176
+ readonly name: "sellerIsBorrower";
1177
+ readonly type: "bool";
1178
+ readonly indexed: false;
1179
+ readonly internalType: "bool";
1180
+ }, {
1181
+ readonly name: "group";
1182
+ readonly type: "bytes32";
1183
+ readonly indexed: false;
1184
+ readonly internalType: "bytes32";
1185
+ }, {
1186
+ readonly name: "consumed";
1187
+ readonly type: "uint256";
1188
+ readonly indexed: false;
1189
+ readonly internalType: "uint256";
1190
+ }];
1191
+ readonly anonymous: false;
1192
+ };
1209
1193
  /**
1210
1194
  * ABI for the Consume event emitted by the Obligation contract.
1211
1195
  */
@@ -2411,16 +2395,6 @@ type ValidateOffersIssues = {
2411
2395
  issues: ValidationIssue[];
2412
2396
  };
2413
2397
  type ValidateOffersData = ValidateOffersSuccess | ValidateOffersIssues;
2414
- type CallbackType = Type$1 | "not_supported";
2415
- type CallbackTypesRequest = {
2416
- callbacks: Array<{
2417
- chain_id: Id;
2418
- addresses: Address[];
2419
- }>;
2420
- };
2421
- type CallbackTypesResponse = Array<{
2422
- chain_id: Id;
2423
- } & Partial<Record<CallbackType, Address[]>>>;
2424
2398
  type ConfigRulesPayload = SuccessPayload<ConfigRule[]> | ErrorPayload;
2425
2399
  type SuccessPayload<T> = {
2426
2400
  meta: {
@@ -2457,8 +2431,7 @@ type GatekeeperClient = {
2457
2431
  statusCode: number;
2458
2432
  body: ConfigRulesPayload;
2459
2433
  }>; /** Validate offers and return decision results. */
2460
- isAllowed: (offers: Offer[]) => Promise<Result<Offer, string>>; /** Resolve callback types for callback addresses. */
2461
- getCallbackTypes: (request: CallbackTypesRequest) => Promise<CallbackTypesResponse>; /** Base URL for the gatekeeper service. */
2434
+ isAllowed: (offers: Offer[]) => Promise<Result<Offer, string>>; /** Base URL for the gatekeeper service. */
2462
2435
  baseUrl: string;
2463
2436
  };
2464
2437
  type ClientConfig = {
@@ -2780,7 +2753,7 @@ interface paths {
2780
2753
  };
2781
2754
  /**
2782
2755
  * Get config rules
2783
- * @description Returns configured rules for supported chains.
2756
+ * @description Returns configured rules (maturities, loan tokens, oracles) for supported chains.
2784
2757
  */
2785
2758
  get: {
2786
2759
  parameters: {
@@ -3237,7 +3210,7 @@ interface paths {
3237
3210
  put?: never;
3238
3211
  /**
3239
3212
  * Validate offers
3240
- * @description Validates offers against router validation rules. Returns unsigned payload + root on success, or issues only on validation failure.
3213
+ * @description Validates offers against router validation rules. Only empty callbacks (zero address, 0x data) are accepted. Returns unsigned payload + root on success, or issues only on validation failure.
3241
3214
  */
3242
3215
  post: {
3243
3216
  parameters: {
@@ -3276,56 +3249,6 @@ interface paths {
3276
3249
  patch?: never;
3277
3250
  trace?: never;
3278
3251
  };
3279
- "/v1/callbacks": {
3280
- parameters: {
3281
- query?: never;
3282
- header?: never;
3283
- path?: never;
3284
- cookie?: never;
3285
- };
3286
- get?: never;
3287
- put?: never;
3288
- /**
3289
- * Resolve callback types
3290
- * @description Returns callback types for callback addresses grouped by chain.
3291
- */
3292
- post: {
3293
- parameters: {
3294
- query?: never;
3295
- header?: never;
3296
- path?: never;
3297
- cookie?: never;
3298
- };
3299
- requestBody?: {
3300
- content: {
3301
- "application/json": components["schemas"]["CallbackTypesRequest"];
3302
- };
3303
- };
3304
- responses: {
3305
- /** @description Success */200: {
3306
- headers: {
3307
- [name: string]: unknown;
3308
- };
3309
- content: {
3310
- "application/json": components["schemas"]["CallbackTypesSuccessResponse"];
3311
- };
3312
- }; /** @description Bad Request */
3313
- 400: {
3314
- headers: {
3315
- [name: string]: unknown;
3316
- };
3317
- content: {
3318
- "application/json": components["schemas"]["BadRequestResponse"];
3319
- };
3320
- };
3321
- };
3322
- };
3323
- delete?: never;
3324
- options?: never;
3325
- head?: never;
3326
- patch?: never;
3327
- trace?: never;
3328
- };
3329
3252
  }
3330
3253
  interface components {
3331
3254
  schemas: {
@@ -3410,12 +3333,6 @@ interface components {
3410
3333
  * "timestamp": 1730415600
3411
3334
  * },
3412
3335
  * {
3413
- * "type": "callback",
3414
- * "chain_id": 1,
3415
- * "address": "0x1111111111111111111111111111111111111111",
3416
- * "callback_type": "sell_erc20_callback"
3417
- * },
3418
- * {
3419
3336
  * "type": "loan_token",
3420
3337
  * "chain_id": 1,
3421
3338
  * "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
@@ -3437,9 +3354,8 @@ interface components {
3437
3354
  /** @example maturity */type: string; /** @example 1 */
3438
3355
  chain_id: number; /** @example end_of_next_month */
3439
3356
  name?: string; /** @example 1730415600 */
3440
- timestamp?: number; /** @example 0x1111111111111111111111111111111111111111 */
3441
- address?: string; /** @example sell_erc20_callback */
3442
- callback_type?: string;
3357
+ timestamp?: number; /** @example 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 */
3358
+ address?: string;
3443
3359
  };
3444
3360
  OfferListResponse: {
3445
3361
  meta: components["schemas"]["Meta"];
@@ -3474,8 +3390,8 @@ interface components {
3474
3390
  * "price": "2750000000000000000",
3475
3391
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
3476
3392
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
3477
- * "callback": "0x1111111111111111111111111111111111111111",
3478
- * "callback_data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000"
3393
+ * "callback": "0x0000000000000000000000000000000000000000",
3394
+ * "callback_data": "0x"
3479
3395
  * },
3480
3396
  * "offer_hash": "0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427",
3481
3397
  * "obligation_id": "0x25690ae1aee324a005be565f3bcdd16dbf8daf7969b26c181c8b8f467dad9abc",
@@ -3518,8 +3434,8 @@ interface components {
3518
3434
  * "price": "2750000000000000000",
3519
3435
  * "group": "0x000000000000000000000000000000000000000000000000000000000008b8f4",
3520
3436
  * "session": "0x0000000000000000000000000000000000000000000000000000000000000000",
3521
- * "callback": "0x1111111111111111111111111111111111111111",
3522
- * "callback_data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000"
3437
+ * "callback": "0x0000000000000000000000000000000000000000",
3438
+ * "callback_data": "0x"
3523
3439
  * }
3524
3440
  */
3525
3441
  offer: components["schemas"]["OfferDataResponse"]; /** @example 0xac4bd8318ec914f89f8af913f162230575b0ac0696a19256bc12138c5cfe1427 */
@@ -3563,8 +3479,8 @@ interface components {
3563
3479
  expiry: number; /** @example 2750000000000000000 */
3564
3480
  price: string; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
3565
3481
  group: string; /** @example 0x0000000000000000000000000000000000000000000000000000000000000000 */
3566
- session: string; /** @example 0x1111111111111111111111111111111111111111 */
3567
- callback: string; /** @example 0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000 */
3482
+ session: string; /** @example 0x0000000000000000000000000000000000000000 */
3483
+ callback: string; /** @example 0x */
3568
3484
  callback_data: string;
3569
3485
  };
3570
3486
  ObligationOfferResponse: {
@@ -3753,8 +3669,8 @@ interface components {
3753
3669
  collaterals: components["schemas"]["ValidateCollateralRequest"][];
3754
3670
  /**
3755
3671
  * @example {
3756
- * "address": "0x1111111111111111111111111111111111111111",
3757
- * "data": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000"
3672
+ * "address": "0x0000000000000000000000000000000000000000",
3673
+ * "data": "0x"
3758
3674
  * }
3759
3675
  */
3760
3676
  callback: components["schemas"]["ValidateCallbackRequest"];
@@ -3765,7 +3681,7 @@ interface components {
3765
3681
  lltv: string;
3766
3682
  };
3767
3683
  ValidateCallbackRequest: {
3768
- /** @example 0x1111111111111111111111111111111111111111 */address: string; /** @example 0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000034cf890db685fc536e05652fb41f02090c3fb751000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000108e644e3ab01184155270aa92a00000000000 */
3684
+ /** @example 0x0000000000000000000000000000000000000000 */address: string; /** @example 0x */
3769
3685
  data: string;
3770
3686
  };
3771
3687
  ValidationSuccessResponse: {
@@ -3785,84 +3701,6 @@ interface components {
3785
3701
  */
3786
3702
  root: string;
3787
3703
  };
3788
- CallbackTypesRequest: {
3789
- /**
3790
- * @example [
3791
- * {
3792
- * "chain_id": 1,
3793
- * "addresses": [
3794
- * "0x1111111111111111111111111111111111111111",
3795
- * "0x3333333333333333333333333333333333333333",
3796
- * "0x9999999999999999999999999999999999999999"
3797
- * ]
3798
- * }
3799
- * ]
3800
- */
3801
- callbacks: components["schemas"]["CallbackTypesChainRequest"][];
3802
- };
3803
- CallbackTypesChainRequest: {
3804
- /** @example 1 */chain_id: number;
3805
- /**
3806
- * @example [
3807
- * "0x1111111111111111111111111111111111111111",
3808
- * "0x3333333333333333333333333333333333333333",
3809
- * "0x9999999999999999999999999999999999999999"
3810
- * ]
3811
- */
3812
- addresses: string[];
3813
- };
3814
- CallbackTypesSuccessResponse: {
3815
- meta: components["schemas"]["Meta"]; /** @example maturity:1:1730415600:end_of_next_month */
3816
- cursor: string | null;
3817
- /**
3818
- * @description Callback types grouped by chain.
3819
- * @example [
3820
- * {
3821
- * "chain_id": 1,
3822
- * "sell_erc20_callback": [
3823
- * "0x1111111111111111111111111111111111111111"
3824
- * ],
3825
- * "buy_erc20": [
3826
- * "0x5555555555555555555555555555555555555555"
3827
- * ],
3828
- * "buy_vault_v1_callback": [
3829
- * "0x3333333333333333333333333333333333333333"
3830
- * ],
3831
- * "not_supported": [
3832
- * "0x9999999999999999999999999999999999999999"
3833
- * ]
3834
- * }
3835
- * ]
3836
- */
3837
- data: components["schemas"]["CallbackTypesChainResponse"][];
3838
- };
3839
- CallbackTypesChainResponse: {
3840
- /** @example 1 */chain_id: number;
3841
- /**
3842
- * @example [
3843
- * "0x3333333333333333333333333333333333333333"
3844
- * ]
3845
- */
3846
- buy_vault_v1_callback?: string[];
3847
- /**
3848
- * @example [
3849
- * "0x1111111111111111111111111111111111111111"
3850
- * ]
3851
- */
3852
- sell_erc20_callback?: string[];
3853
- /**
3854
- * @example [
3855
- * "0x5555555555555555555555555555555555555555"
3856
- * ]
3857
- */
3858
- buy_erc20?: string[];
3859
- /**
3860
- * @example [
3861
- * "0x9999999999999999999999999999999999999999"
3862
- * ]
3863
- */
3864
- not_supported: string[];
3865
- };
3866
3704
  };
3867
3705
  responses: never;
3868
3706
  parameters: never;
@@ -3931,9 +3769,6 @@ declare class BooksController {
3931
3769
  declare class ValidateController {
3932
3770
  validateOffers(): Promise<void>;
3933
3771
  }
3934
- declare class CallbacksController {
3935
- resolveCallbackTypes(): Promise<void>;
3936
- }
3937
3772
  declare class OffersController {
3938
3773
  getOffers(): Promise<void>;
3939
3774
  }
@@ -3980,25 +3815,25 @@ declare const schemas: {
3980
3815
  strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
3981
3816
  0: "0";
3982
3817
  1: "1";
3983
- false: "false";
3984
3818
  true: "true";
3985
- }>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
3819
+ false: "false";
3820
+ }>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
3986
3821
  }, z$1.core.$strip>;
3987
3822
  readonly get_health_collectors: z$1.ZodObject<{
3988
3823
  strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
3989
3824
  0: "0";
3990
3825
  1: "1";
3991
- false: "false";
3992
3826
  true: "true";
3993
- }>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
3827
+ false: "false";
3828
+ }>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
3994
3829
  }, z$1.core.$strip>;
3995
3830
  readonly get_health_chains: z$1.ZodObject<{
3996
3831
  strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
3997
3832
  0: "0";
3998
3833
  1: "1";
3999
- false: "false";
4000
3834
  true: "true";
4001
- }>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
3835
+ false: "false";
3836
+ }>, z$1.ZodTransform<boolean, "0" | "1" | "true" | "false">>>;
4002
3837
  }, z$1.core.$strip>;
4003
3838
  readonly get_config_contracts: z$1.ZodObject<{
4004
3839
  cursor: z$1.ZodOptional<z$1.ZodString>;
@@ -4061,12 +3896,6 @@ declare const schemas: {
4061
3896
  readonly validate_offers: z$1.ZodObject<{
4062
3897
  offers: z$1.ZodArray<z$1.ZodUnknown>;
4063
3898
  }, z$1.core.$strict>;
4064
- readonly callback_types: z$1.ZodObject<{
4065
- callbacks: z$1.ZodArray<z$1.ZodObject<{
4066
- chain_id: z$1.ZodNumber;
4067
- addresses: z$1.ZodArray<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>>;
4068
- }, z$1.core.$strict>>;
4069
- }, z$1.core.$strict>;
4070
3899
  readonly get_user_positions: z$1.ZodObject<{
4071
3900
  user_address: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
4072
3901
  cursor: z$1.ZodOptional<z$1.ZodString>;
@@ -4194,16 +4023,6 @@ declare function getOffers$1(queryParameters: object, db: Database): Promise<Pay
4194
4023
  * @returns Paginated list of positions with remaining balances.
4195
4024
  */
4196
4025
  declare function getUserPositions(queryParameters: object, db: Database): Promise<Payload<PositionResponse[]>>;
4197
- //#endregion
4198
- //#region src/api/Controllers/resolveCallbackTypes.d.ts
4199
- type CallbackTypesPayload = SuccessPayload$1<CallbackTypesResponse>;
4200
- /**
4201
- * Resolve callback types for a list of callback addresses grouped by chain.
4202
- * @param body - Request body with callback addresses. {@link CallbackTypesRequest}
4203
- * @param chains - Chains to resolve callback types against. {@link Chain.Chain}
4204
- * @returns Callback types grouped by chain. {@link CallbackTypesPayload}
4205
- */
4206
- declare function resolveCallbackTypes(body: object, chains: Chain$1[]): Promise<CallbackTypesPayload | ErrorPayload$1>;
4207
4026
  declare namespace Gatekeeper_d_exports {
4208
4027
  export { Gatekeeper, Rules, create };
4209
4028
  }
@@ -4237,10 +4056,10 @@ type ValidateOffersIssuesPayload = SuccessPayload$1<{
4237
4056
  type ValidateOffersResponse = ValidateOffersSuccessPayload | ValidateOffersIssuesPayload;
4238
4057
  declare function validateOffers(body: object, gatekeeper: Gatekeeper): Promise<ValidateOffersResponse | ErrorPayload$1>;
4239
4058
  declare namespace index_d_exports$4 {
4240
- export { CONFIG_CONTRACT_NAMES, ConfigContract, ConfigContractName, GetOffersQueryParams, ValidationIssue$1 as ValidationIssue, getBook, getConfigContracts, getConfigRules, getDocsHtml, getHealth, getHealthChains, getHealthCollectors, getIntegratorDocsHtml, getObligation, getObligations$1 as getObligations, getOffers$1 as getOffers, getOffersQuery, getSwaggerJson, getUserPositions, resolveCallbackTypes, validateOffers };
4059
+ export { CONFIG_CONTRACT_NAMES, ConfigContract, ConfigContractName, GetOffersQueryParams, ValidationIssue$1 as ValidationIssue, getBook, getConfigContracts, getConfigRules, getDocsHtml, getHealth, getHealthChains, getHealthCollectors, getIntegratorDocsHtml, getObligation, getObligations$1 as getObligations, getOffers$1 as getOffers, getOffersQuery, getSwaggerJson, getUserPositions, validateOffers };
4241
4060
  }
4242
4061
  declare namespace RouterApi_d_exports {
4243
- export { ApiConfig, BookResponse_d_exports as BookResponse, BooksController, CallbacksController, ChainHealth, ChainsHealthResponse, CollectorHealth, CollectorsHealthResponse, ConfigContractsController, ConfigRulesController, index_d_exports$4 as Controllers, HealthController, ObligationResponse_d_exports as ObligationResponse, ObligationsController, OfferResponse_d_exports as OfferResponse, OffersController, OpenApi, PositionResponse_d_exports as PositionResponse, RouterApi, RouterStatusResponse, UsersController, ValidateController, create$1 as create, from$5 as from, parse, safeParse };
4062
+ export { ApiConfig, BookResponse_d_exports as BookResponse, BooksController, ChainHealth, ChainsHealthResponse, CollectorHealth, CollectorsHealthResponse, ConfigContractsController, ConfigRulesController, index_d_exports$4 as Controllers, HealthController, ObligationResponse_d_exports as ObligationResponse, ObligationsController, OfferResponse_d_exports as OfferResponse, OffersController, OpenApi, PositionResponse_d_exports as PositionResponse, RouterApi, RouterStatusResponse, UsersController, ValidateController, create$1 as create, from$5 as from, parse, safeParse };
4244
4063
  }
4245
4064
  declare namespace Client_d_exports$1 {
4246
4065
  export { Client$3 as Client, ConnectOptions, HttpForbiddenError, HttpGetApiFailedError, HttpRateLimitError, HttpUnauthorizedError, InvalidUrlError, connect$1 as connect, getObligations, getOffers };
@@ -6407,10 +6226,10 @@ type ValidityParameters = {
6407
6226
  /**
6408
6227
  * set of rules to validate offers.
6409
6228
  *
6410
- * @param parameters - Validity parameters with chain and client
6229
+ * @param _parameters - Validity parameters with chain and client
6411
6230
  * @returns Array of validation rules to evaluate against offers
6412
6231
  */
6413
- declare function validity(parameters: ValidityParameters): (Rule<Offer, "expiry"> | Rule<Offer, "sell_erc20_callback_invalid"> | Rule<Offer, "buy_offers_callback_vault_invalid">)[];
6232
+ declare function validity(_parameters: ValidityParameters): Rule<Offer, "expiry">[];
6414
6233
  declare const chains: ({
6415
6234
  chains
6416
6235
  }: {
@@ -6422,8 +6241,7 @@ declare const maturity: ({
6422
6241
  maturities: MaturityType[];
6423
6242
  }) => Rule<Offer, "maturity">;
6424
6243
  declare const callback: ({
6425
- callbacks,
6426
- allowedAddresses
6244
+ callbacks
6427
6245
  }: {
6428
6246
  callbacks: Type$1[];
6429
6247
  allowedAddresses: Address[];
@@ -6694,5 +6512,5 @@ declare namespace index_d_exports$3 {
6694
6512
  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 };
6695
6513
  }
6696
6514
  //#endregion
6697
- export { index_d_exports as Abi, BookResponse_d_exports as BookResponse, BooksController, Brand, BrandTypeId, Callback_d_exports as Callback, CallbackType, CallbackTypesRequest, CallbackTypesResponse, CallbacksController, Chain_d_exports as Chain, ChainHealth, ChainRegistry_d_exports as ChainRegistry, ChainsHealthResponse, Collateral_d_exports as Collateral, CollectorHealth, CollectorsHealthResponse, Compute, ConfigContractsController, ConfigRule, ConfigRulesController, ConfigRulesPayload, Database_d_exports as Database, ERC4626_d_exports as ERC4626, ErrorPayload, Errors_d_exports as Errors, Format_d_exports as Format, Gatekeeper_d_exports as Gatekeeper, Client_d_exports as GatekeeperClient, Health_d_exports as Health, HealthController, Indexer_d_exports as Indexer, LLTV_d_exports as LLTV, Liquidity_d_exports as Liquidity, Logger_d_exports as Logger, Maturity_d_exports as Maturity, index_d_exports$1 as Mempool, Obligation_d_exports as Obligation, ObligationResponse_d_exports as ObligationResponse, ObligationsController, Offer_d_exports as Offer, OfferResponse_d_exports as OfferResponse, OffersController, index_d_exports$2 as OffersSchema, OpenApi, Oracle_d_exports as Oracle, Position_d_exports as Position, PositionResponse_d_exports as PositionResponse, Quote_d_exports as Quote, RouterApi_d_exports as RouterApi, Client_d_exports$1 as RouterClient, RouterStatusResponse, Rules_d_exports as Rules, SuccessPayload, time_d_exports as Time, TradingFee_d_exports as TradingFee, Transfer_d_exports as Transfer, Tree_d_exports as Tree, UsersController, index_d_exports$3 as Utils, ValidateController, ValidateOffersData, ValidateOffersIssues, ValidateOffersSuccess, Gate_d_exports as Validation, ValidationIssue, morphoRules, parse, safeParse };
6515
+ 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 };
6698
6516
  //# sourceMappingURL=index.node.d.mts.map