@morpho-dev/router 0.1.10 → 0.1.11

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.
@@ -276,6 +276,7 @@ type LiquidityQueue = {
276
276
  queueId: string;
277
277
  availableLiquidityPoolId: string;
278
278
  index: number;
279
+ callbackAmount: string;
279
280
  updatedAt: Date;
280
281
  };
281
282
  type LiquidityPool = {
@@ -298,7 +299,7 @@ declare function fetch(parameters: {
298
299
  type: CallbackType;
299
300
  pairs: Array<{
300
301
  user: Address;
301
- contract: Address;
302
+ loanToken: Address;
302
303
  }>;
303
304
  options?: {
304
305
  batchSize?: number;
@@ -326,15 +327,29 @@ declare enum CallbackType {
326
327
  SellWithdrawFromWallet = "sell_withdraw_from_wallet"
327
328
  }
328
329
  declare const WhitelistedCallbackAddresses: Record<CallbackType, readonly string[]>;
329
- declare function buildLiquidity(parameters: {
330
- type: CallbackType;
331
- user: string;
332
- contract: string;
333
- chainId: bigint;
334
- amount: string | bigint;
330
+ type BuildLiquidityParameters = {
331
+ type: CallbackType.BuyWithEmptyCallback;
332
+ user: Address;
333
+ loanToken: Address;
334
+ chainId: Chain.Id;
335
+ amount: bigint;
335
336
  index?: number;
336
337
  updatedAt?: Date;
337
- }): Liquidity;
338
+ } | {
339
+ type: CallbackType.SellWithdrawFromWallet;
340
+ user: Address;
341
+ termId: string;
342
+ chainId: Chain.Id;
343
+ amount: bigint;
344
+ collaterals: Array<{
345
+ collateralAddress: Address;
346
+ balance: bigint;
347
+ callbackAmount: bigint;
348
+ }>;
349
+ index?: number;
350
+ updatedAt?: Date;
351
+ };
352
+ declare function buildLiquidity(parameters: BuildLiquidityParameters): Liquidity;
338
353
  declare function getCallbackIdForOffer(offer: Offer.Offer): string | null;
339
354
  declare function decode$1(parameters: {
340
355
  type: CallbackType;
@@ -587,6 +602,7 @@ declare function createChainReorgsCollector(parameters: {
587
602
  options?: {
588
603
  maxBatchSize?: number;
589
604
  interval?: number;
605
+ maxBlockNumber?: number;
590
606
  };
591
607
  }): Collector<"chain_reorgs">;
592
608
 
@@ -645,7 +661,7 @@ declare namespace Cursor$1 {
645
661
  export { type Cursor$1_Cursor as Cursor, Cursor$1_decode as decode, Cursor$1_encode as encode, Cursor$1_validate as validate };
646
662
  }
647
663
 
648
- declare const LogLevelValues: readonly ["silent", "trace", "debug", "info", "warn", "error", "fatal"];
664
+ declare const LogLevelValues: readonly ["trace", "debug", "info", "warn", "error", "fatal", "silent"];
649
665
  type LogLevel = (typeof LogLevelValues)[number];
650
666
  type LogEntry = Compute<{
651
667
  msg: string;
@@ -1487,6 +1503,23 @@ declare const availableLiquidityQueues: drizzle_orm_pg_core.PgTableWithColumns<{
1487
1503
  identity: undefined;
1488
1504
  generated: undefined;
1489
1505
  }, {}, {}>;
1506
+ callbackAmount: drizzle_orm_pg_core.PgColumn<{
1507
+ name: "callback_amount";
1508
+ tableName: "available_liquidity_queues";
1509
+ dataType: "string";
1510
+ columnType: "PgNumeric";
1511
+ data: string;
1512
+ driverParam: string;
1513
+ notNull: true;
1514
+ hasDefault: true;
1515
+ isPrimaryKey: false;
1516
+ isAutoincrement: false;
1517
+ hasRuntimeDefault: false;
1518
+ enumValues: undefined;
1519
+ baseColumn: never;
1520
+ identity: undefined;
1521
+ generated: undefined;
1522
+ }, {}, {}>;
1490
1523
  updatedAt: drizzle_orm_pg_core.PgColumn<{
1491
1524
  name: "updated_at";
1492
1525
  tableName: "available_liquidity_queues";
@@ -276,6 +276,7 @@ type LiquidityQueue = {
276
276
  queueId: string;
277
277
  availableLiquidityPoolId: string;
278
278
  index: number;
279
+ callbackAmount: string;
279
280
  updatedAt: Date;
280
281
  };
281
282
  type LiquidityPool = {
@@ -298,7 +299,7 @@ declare function fetch(parameters: {
298
299
  type: CallbackType;
299
300
  pairs: Array<{
300
301
  user: Address;
301
- contract: Address;
302
+ loanToken: Address;
302
303
  }>;
303
304
  options?: {
304
305
  batchSize?: number;
@@ -326,15 +327,29 @@ declare enum CallbackType {
326
327
  SellWithdrawFromWallet = "sell_withdraw_from_wallet"
327
328
  }
328
329
  declare const WhitelistedCallbackAddresses: Record<CallbackType, readonly string[]>;
329
- declare function buildLiquidity(parameters: {
330
- type: CallbackType;
331
- user: string;
332
- contract: string;
333
- chainId: bigint;
334
- amount: string | bigint;
330
+ type BuildLiquidityParameters = {
331
+ type: CallbackType.BuyWithEmptyCallback;
332
+ user: Address;
333
+ loanToken: Address;
334
+ chainId: Chain.Id;
335
+ amount: bigint;
335
336
  index?: number;
336
337
  updatedAt?: Date;
337
- }): Liquidity;
338
+ } | {
339
+ type: CallbackType.SellWithdrawFromWallet;
340
+ user: Address;
341
+ termId: string;
342
+ chainId: Chain.Id;
343
+ amount: bigint;
344
+ collaterals: Array<{
345
+ collateralAddress: Address;
346
+ balance: bigint;
347
+ callbackAmount: bigint;
348
+ }>;
349
+ index?: number;
350
+ updatedAt?: Date;
351
+ };
352
+ declare function buildLiquidity(parameters: BuildLiquidityParameters): Liquidity;
338
353
  declare function getCallbackIdForOffer(offer: Offer.Offer): string | null;
339
354
  declare function decode$1(parameters: {
340
355
  type: CallbackType;
@@ -587,6 +602,7 @@ declare function createChainReorgsCollector(parameters: {
587
602
  options?: {
588
603
  maxBatchSize?: number;
589
604
  interval?: number;
605
+ maxBlockNumber?: number;
590
606
  };
591
607
  }): Collector<"chain_reorgs">;
592
608
 
@@ -645,7 +661,7 @@ declare namespace Cursor$1 {
645
661
  export { type Cursor$1_Cursor as Cursor, Cursor$1_decode as decode, Cursor$1_encode as encode, Cursor$1_validate as validate };
646
662
  }
647
663
 
648
- declare const LogLevelValues: readonly ["silent", "trace", "debug", "info", "warn", "error", "fatal"];
664
+ declare const LogLevelValues: readonly ["trace", "debug", "info", "warn", "error", "fatal", "silent"];
649
665
  type LogLevel = (typeof LogLevelValues)[number];
650
666
  type LogEntry = Compute<{
651
667
  msg: string;
@@ -1487,6 +1503,23 @@ declare const availableLiquidityQueues: drizzle_orm_pg_core.PgTableWithColumns<{
1487
1503
  identity: undefined;
1488
1504
  generated: undefined;
1489
1505
  }, {}, {}>;
1506
+ callbackAmount: drizzle_orm_pg_core.PgColumn<{
1507
+ name: "callback_amount";
1508
+ tableName: "available_liquidity_queues";
1509
+ dataType: "string";
1510
+ columnType: "PgNumeric";
1511
+ data: string;
1512
+ driverParam: string;
1513
+ notNull: true;
1514
+ hasDefault: true;
1515
+ isPrimaryKey: false;
1516
+ isAutoincrement: false;
1517
+ hasRuntimeDefault: false;
1518
+ enumValues: undefined;
1519
+ baseColumn: never;
1520
+ identity: undefined;
1521
+ generated: undefined;
1522
+ }, {}, {}>;
1490
1523
  updatedAt: drizzle_orm_pg_core.PgColumn<{
1491
1524
  name: "updated_at";
1492
1525
  tableName: "available_liquidity_queues";