@morpho-dev/router 0.1.2 → 0.1.4

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.
@@ -1,15 +1,132 @@
1
1
  import * as _morpho_dev_mempool from '@morpho-dev/mempool';
2
2
  import { Offer, Errors, Format, Maturity, LLTV, Compute, Chain } from '@morpho-dev/mempool';
3
3
  export * from '@morpho-dev/mempool';
4
+ import * as viem from 'viem';
5
+ import { PublicActions, Address, Hex } from 'viem';
4
6
  import * as node_modules_zod_openapi_dist_components_DkyUTLcs_js from 'node_modules/zod-openapi/dist/components-DkyUTLcs.js';
5
7
  import { z, ZodError } from 'zod/v4';
6
- import * as viem from 'viem';
7
- import { Address, Hex, PublicClient } from 'viem';
8
8
  import * as hono_utils_types from 'hono/utils/types';
9
9
  import * as hono from 'hono';
10
10
  import { Context } from 'hono';
11
11
  import * as hono_utils_http_status from 'hono/utils/http-status';
12
12
 
13
+ declare function fetchBalancesAndAllowances(parameters: {
14
+ client: Pick<PublicActions, "multicall">;
15
+ spender: Address;
16
+ pairs: Array<{
17
+ user: Address;
18
+ token: Address;
19
+ }>;
20
+ options?: {
21
+ batchSize?: number;
22
+ retryAttempts?: number;
23
+ retryDelayMs?: number;
24
+ blockNumber?: number;
25
+ };
26
+ }): Promise<Map<Address, Map<Address, {
27
+ balance: bigint;
28
+ allowance: bigint;
29
+ }>>>;
30
+ type LiquidityUserPosition = {
31
+ id: string;
32
+ availableLiquidityQueueId: string;
33
+ user: string;
34
+ chainId: bigint;
35
+ amount: string;
36
+ updatedAt: Date;
37
+ };
38
+ type LiquidityQueue = {
39
+ queueId: string;
40
+ availableLiquidityPoolId: string;
41
+ index: number;
42
+ updatedAt: Date;
43
+ };
44
+ type LiquidityPool = {
45
+ id: string;
46
+ amount: string;
47
+ updatedAt: Date;
48
+ };
49
+ type LiquidityQueueWithPool = {
50
+ queue: LiquidityQueue;
51
+ pool: LiquidityPool;
52
+ };
53
+ type Liquidity = {
54
+ userPosition: LiquidityUserPosition;
55
+ queues: LiquidityQueueWithPool[];
56
+ };
57
+ declare function fetch(parameters: {
58
+ client: Pick<PublicActions, "multicall">;
59
+ chainId: bigint;
60
+ spender: Address;
61
+ type: CallbackType;
62
+ pairs: Array<{
63
+ user: Address;
64
+ contract: Address;
65
+ }>;
66
+ options?: {
67
+ batchSize?: number;
68
+ retryAttempts?: number;
69
+ retryDelayMs?: number;
70
+ blockNumber?: number;
71
+ };
72
+ }): Promise<Liquidity[]>;
73
+ declare function serialize(liquidity: Liquidity): string;
74
+
75
+ type Liquidity$1_Liquidity = Liquidity;
76
+ type Liquidity$1_LiquidityPool = LiquidityPool;
77
+ type Liquidity$1_LiquidityQueue = LiquidityQueue;
78
+ type Liquidity$1_LiquidityQueueWithPool = LiquidityQueueWithPool;
79
+ type Liquidity$1_LiquidityUserPosition = LiquidityUserPosition;
80
+ declare const Liquidity$1_fetch: typeof fetch;
81
+ declare const Liquidity$1_fetchBalancesAndAllowances: typeof fetchBalancesAndAllowances;
82
+ declare const Liquidity$1_serialize: typeof serialize;
83
+ declare namespace Liquidity$1 {
84
+ export { type Liquidity$1_Liquidity as Liquidity, type Liquidity$1_LiquidityPool as LiquidityPool, type Liquidity$1_LiquidityQueue as LiquidityQueue, type Liquidity$1_LiquidityQueueWithPool as LiquidityQueueWithPool, type Liquidity$1_LiquidityUserPosition as LiquidityUserPosition, Liquidity$1_fetch as fetch, Liquidity$1_fetchBalancesAndAllowances as fetchBalancesAndAllowances, Liquidity$1_serialize as serialize };
85
+ }
86
+
87
+ declare enum CallbackType {
88
+ BuyWithEmptyCallback = "buy_with_empty_callback"
89
+ }
90
+ declare function buildLiquidity(parameters: {
91
+ type: CallbackType;
92
+ user: string;
93
+ contract: string;
94
+ chainId: bigint;
95
+ amount: string | bigint;
96
+ index?: number;
97
+ updatedAt?: Date;
98
+ }): Liquidity;
99
+ declare function getCallbackIdForOffer(offer: Offer.Offer): string | null;
100
+
101
+ type Callback_CallbackType = CallbackType;
102
+ declare const Callback_CallbackType: typeof CallbackType;
103
+ declare const Callback_buildLiquidity: typeof buildLiquidity;
104
+ declare const Callback_getCallbackIdForOffer: typeof getCallbackIdForOffer;
105
+ declare namespace Callback {
106
+ export { Callback_CallbackType as CallbackType, Callback_buildLiquidity as buildLiquidity, Callback_getCallbackIdForOffer as getCallbackIdForOffer };
107
+ }
108
+
109
+ type Cursor = {
110
+ sort: "rate" | "maturity" | "expiry" | "amount";
111
+ dir: "asc" | "desc";
112
+ rate?: string;
113
+ maturity?: number;
114
+ expiry?: number;
115
+ assets?: string;
116
+ hash: string;
117
+ };
118
+ declare function validate(cursor: unknown): cursor is Cursor;
119
+ declare function encode(c: Cursor): string;
120
+ declare function decode(token?: string): Cursor | null;
121
+
122
+ type Cursor$1_Cursor = Cursor;
123
+ declare const Cursor$1_decode: typeof decode;
124
+ declare const Cursor$1_encode: typeof encode;
125
+ declare const Cursor$1_validate: typeof validate;
126
+ declare namespace Cursor$1 {
127
+ export { type Cursor$1_Cursor as Cursor, Cursor$1_decode as decode, Cursor$1_encode as encode, Cursor$1_validate as validate };
128
+ }
129
+
13
130
  declare const OpenApi: node_modules_zod_openapi_dist_components_DkyUTLcs_js.OpenAPIObject;
14
131
 
15
132
  declare const schemas: {
@@ -70,7 +187,6 @@ declare const schemas: {
70
187
  max_maturity: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
71
188
  loan_token: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
72
189
  creator: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
73
- status: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<("valid" | "callback_not_supported" | "callback_error" | "unverified")[], string>>>;
74
190
  cursor: z.ZodOptional<z.ZodString>;
75
191
  limit: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>>>;
76
192
  }, z.core.$strip>;
@@ -162,8 +278,8 @@ declare const consumedEvent: {
162
278
  * @param input - The router offer to create.
163
279
  * @returns The created router offer with its hash.
164
280
  */
165
- declare function from$1(input: Omit<RouterOffer, "hash">): RouterOffer;
166
- declare namespace from$1 {
281
+ declare function from(input: Omit<RouterOffer, "hash">): RouterOffer;
282
+ declare namespace from {
167
283
  type ErrorType = InvalidRouterOfferError;
168
284
  }
169
285
  /**
@@ -206,12 +322,13 @@ declare const RouterOffer$1_OfferStatusValues: typeof OfferStatusValues;
206
322
  type RouterOffer$1_RouterOffer = RouterOffer;
207
323
  declare const RouterOffer$1_RouterOfferSchema: typeof RouterOfferSchema;
208
324
  declare const RouterOffer$1_consumedEvent: typeof consumedEvent;
325
+ declare const RouterOffer$1_from: typeof from;
209
326
  declare const RouterOffer$1_fromConsumedLog: typeof fromConsumedLog;
210
327
  declare const RouterOffer$1_fromSnakeCase: typeof fromSnakeCase;
211
328
  declare const RouterOffer$1_random: typeof random;
212
329
  declare const RouterOffer$1_toSnakeCase: typeof toSnakeCase;
213
330
  declare namespace RouterOffer$1 {
214
- export { RouterOffer$1_InvalidRouterOfferError as InvalidRouterOfferError, type RouterOffer$1_OfferConsumed as OfferConsumed, type RouterOffer$1_OfferMetadata as OfferMetadata, type RouterOffer$1_OfferStatus as OfferStatus, RouterOffer$1_OfferStatusValues as OfferStatusValues, type RouterOffer$1_RouterOffer as RouterOffer, RouterOffer$1_RouterOfferSchema as RouterOfferSchema, RouterOffer$1_consumedEvent as consumedEvent, from$1 as from, RouterOffer$1_fromConsumedLog as fromConsumedLog, RouterOffer$1_fromSnakeCase as fromSnakeCase, RouterOffer$1_random as random, RouterOffer$1_toSnakeCase as toSnakeCase };
331
+ export { RouterOffer$1_InvalidRouterOfferError as InvalidRouterOfferError, type RouterOffer$1_OfferConsumed as OfferConsumed, type RouterOffer$1_OfferMetadata as OfferMetadata, type RouterOffer$1_OfferStatus as OfferStatus, RouterOffer$1_OfferStatusValues as OfferStatusValues, type RouterOffer$1_RouterOffer as RouterOffer, RouterOffer$1_RouterOfferSchema as RouterOfferSchema, RouterOffer$1_consumedEvent as consumedEvent, RouterOffer$1_from as from, RouterOffer$1_fromConsumedLog as fromConsumedLog, RouterOffer$1_fromSnakeCase as fromSnakeCase, RouterOffer$1_random as random, RouterOffer$1_toSnakeCase as toSnakeCase };
215
332
  }
216
333
 
217
334
  type OfferResponse = {
@@ -233,14 +350,14 @@ declare function toResponse(routerOffer: RouterOffer): OfferResponse;
233
350
  */
234
351
  declare function fromResponse(offerResponse: OfferResponse): RouterOffer;
235
352
 
236
- type index$3_OfferResponse = OfferResponse;
237
- declare const index$3_OpenApi: typeof OpenApi;
238
- declare const index$3_fromResponse: typeof fromResponse;
239
- declare const index$3_parse: typeof parse;
240
- declare const index$3_safeParse: typeof safeParse;
241
- declare const index$3_toResponse: typeof toResponse;
242
- declare namespace index$3 {
243
- export { type index$3_OfferResponse as OfferResponse, index$3_OpenApi as OpenApi, index$3_fromResponse as fromResponse, index$3_parse as parse, index$3_safeParse as safeParse, index$3_toResponse as toResponse };
353
+ type index$2_OfferResponse = OfferResponse;
354
+ declare const index$2_OpenApi: typeof OpenApi;
355
+ declare const index$2_fromResponse: typeof fromResponse;
356
+ declare const index$2_parse: typeof parse;
357
+ declare const index$2_safeParse: typeof safeParse;
358
+ declare const index$2_toResponse: typeof toResponse;
359
+ declare namespace index$2 {
360
+ export { type index$2_OfferResponse as OfferResponse, index$2_OpenApi as OpenApi, index$2_fromResponse as fromResponse, index$2_parse as parse, index$2_safeParse as safeParse, index$2_toResponse as toResponse };
244
361
  }
245
362
 
246
363
  type GetParameters = {
@@ -480,8 +597,6 @@ type FindMatchingOffersParams = {
480
597
  maxMaturity?: number;
481
598
  loanToken?: string;
482
599
  creator?: string;
483
- /** Filter by offer status; if omitted defaults to ["valid"] */
484
- status?: OfferStatus[];
485
600
  /** Cursor string returned by a previous call, for pagination */
486
601
  cursor?: string;
487
602
  /** Page size; defaults to 20 */
@@ -499,13 +614,13 @@ declare function memory(parameters: {
499
614
  filled: Map<Chain.Id, Map<Address, Map<bigint, bigint>>>;
500
615
  }): OfferStore;
501
616
 
502
- type index$2_FindMatchingOffersParams = FindMatchingOffersParams;
503
- type index$2_GetAllParams = GetAllParams;
504
- type index$2_GetOffersFilters = GetOffersFilters;
505
- type index$2_OfferStore = OfferStore;
506
- declare const index$2_memory: typeof memory;
507
- declare namespace index$2 {
508
- export { type index$2_FindMatchingOffersParams as FindMatchingOffersParams, type index$2_GetAllParams as GetAllParams, type index$2_GetOffersFilters as GetOffersFilters, type index$2_OfferStore as OfferStore, index$2_memory as memory };
617
+ type index$1_FindMatchingOffersParams = FindMatchingOffersParams;
618
+ type index$1_GetAllParams = GetAllParams;
619
+ type index$1_GetOffersFilters = GetOffersFilters;
620
+ type index$1_OfferStore = OfferStore;
621
+ declare const index$1_memory: typeof memory;
622
+ declare namespace index$1 {
623
+ export { type index$1_FindMatchingOffersParams as FindMatchingOffersParams, type index$1_GetAllParams as GetAllParams, type index$1_GetOffersFilters as GetOffersFilters, type index$1_OfferStore as OfferStore, index$1_memory as memory };
509
624
  }
510
625
 
511
626
  /**
@@ -604,39 +719,39 @@ declare class BadRequestError extends APIError {
604
719
  }
605
720
  declare function handleZodError(error: z.ZodError): ValidationError;
606
721
 
607
- type index$1_APIError = APIError;
608
- declare const index$1_APIError: typeof APIError;
609
- type index$1_BadRequestError = BadRequestError;
610
- declare const index$1_BadRequestError: typeof BadRequestError;
611
- type index$1_Client = Client;
612
- type index$1_GetParameters = GetParameters;
613
- type index$1_HttpForbiddenError = HttpForbiddenError;
614
- declare const index$1_HttpForbiddenError: typeof HttpForbiddenError;
615
- type index$1_HttpGetOffersFailedError = HttpGetOffersFailedError;
616
- declare const index$1_HttpGetOffersFailedError: typeof HttpGetOffersFailedError;
617
- type index$1_HttpRateLimitError = HttpRateLimitError;
618
- declare const index$1_HttpRateLimitError: typeof HttpRateLimitError;
619
- type index$1_HttpUnauthorizedError = HttpUnauthorizedError;
620
- declare const index$1_HttpUnauthorizedError: typeof HttpUnauthorizedError;
621
- type index$1_InternalServerError = InternalServerError;
622
- declare const index$1_InternalServerError: typeof InternalServerError;
623
- type index$1_InvalidUrlError = InvalidUrlError;
624
- declare const index$1_InvalidUrlError: typeof InvalidUrlError;
625
- type index$1_MatchParameters = MatchParameters;
626
- type index$1_NotFoundError = NotFoundError;
627
- declare const index$1_NotFoundError: typeof NotFoundError;
628
- type index$1_RouterClientConfig = RouterClientConfig;
629
- type index$1_ValidationError = ValidationError;
630
- declare const index$1_ValidationError: typeof ValidationError;
631
- declare const index$1_connect: typeof connect;
632
- declare const index$1_error: typeof error;
633
- declare const index$1_get: typeof get;
634
- declare const index$1_handleZodError: typeof handleZodError;
635
- declare const index$1_match: typeof match;
636
- declare const index$1_serve: typeof serve;
637
- declare const index$1_success: typeof success;
638
- declare namespace index$1 {
639
- export { index$1_APIError as APIError, index$1_BadRequestError as BadRequestError, type index$1_Client as Client, type index$1_GetParameters as GetParameters, index$1_HttpForbiddenError as HttpForbiddenError, index$1_HttpGetOffersFailedError as HttpGetOffersFailedError, index$1_HttpRateLimitError as HttpRateLimitError, index$1_HttpUnauthorizedError as HttpUnauthorizedError, index$1_InternalServerError as InternalServerError, index$1_InvalidUrlError as InvalidUrlError, type index$1_MatchParameters as MatchParameters, index$1_NotFoundError as NotFoundError, type index$1_RouterClientConfig as RouterClientConfig, index$1_ValidationError as ValidationError, index$1_connect as connect, index$1_error as error, index$1_get as get, index$1_handleZodError as handleZodError, index$1_match as match, index$1_serve as serve, index$1_success as success };
722
+ type index_APIError = APIError;
723
+ declare const index_APIError: typeof APIError;
724
+ type index_BadRequestError = BadRequestError;
725
+ declare const index_BadRequestError: typeof BadRequestError;
726
+ type index_Client = Client;
727
+ type index_GetParameters = GetParameters;
728
+ type index_HttpForbiddenError = HttpForbiddenError;
729
+ declare const index_HttpForbiddenError: typeof HttpForbiddenError;
730
+ type index_HttpGetOffersFailedError = HttpGetOffersFailedError;
731
+ declare const index_HttpGetOffersFailedError: typeof HttpGetOffersFailedError;
732
+ type index_HttpRateLimitError = HttpRateLimitError;
733
+ declare const index_HttpRateLimitError: typeof HttpRateLimitError;
734
+ type index_HttpUnauthorizedError = HttpUnauthorizedError;
735
+ declare const index_HttpUnauthorizedError: typeof HttpUnauthorizedError;
736
+ type index_InternalServerError = InternalServerError;
737
+ declare const index_InternalServerError: typeof InternalServerError;
738
+ type index_InvalidUrlError = InvalidUrlError;
739
+ declare const index_InvalidUrlError: typeof InvalidUrlError;
740
+ type index_MatchParameters = MatchParameters;
741
+ type index_NotFoundError = NotFoundError;
742
+ declare const index_NotFoundError: typeof NotFoundError;
743
+ type index_RouterClientConfig = RouterClientConfig;
744
+ type index_ValidationError = ValidationError;
745
+ declare const index_ValidationError: typeof ValidationError;
746
+ declare const index_connect: typeof connect;
747
+ declare const index_error: typeof error;
748
+ declare const index_get: typeof get;
749
+ declare const index_handleZodError: typeof handleZodError;
750
+ declare const index_match: typeof match;
751
+ declare const index_serve: typeof serve;
752
+ declare const index_success: typeof success;
753
+ declare namespace index {
754
+ export { index_APIError as APIError, index_BadRequestError as BadRequestError, type index_Client as Client, type index_GetParameters as GetParameters, index_HttpForbiddenError as HttpForbiddenError, index_HttpGetOffersFailedError as HttpGetOffersFailedError, index_HttpRateLimitError as HttpRateLimitError, index_HttpUnauthorizedError as HttpUnauthorizedError, index_InternalServerError as InternalServerError, index_InvalidUrlError as InvalidUrlError, type index_MatchParameters as MatchParameters, index_NotFoundError as NotFoundError, type index_RouterClientConfig as RouterClientConfig, index_ValidationError as ValidationError, index_connect as connect, index_error as error, index_get as get, index_handleZodError as handleZodError, index_match as match, index_serve as serve, index_success as success };
640
755
  }
641
756
 
642
757
  declare const LogLevelValues: readonly ["silent", "trace", "debug", "info", "warn", "error", "fatal"];
@@ -671,89 +786,6 @@ declare namespace Logger$1 {
671
786
  export { type Logger$1_LogFn as LogFn, type Logger$1_LogLevel as LogLevel, Logger$1_LogLevelValues as LogLevelValues, type Logger$1_Logger as Logger, Logger$1_defaultLogger as defaultLogger, Logger$1_getLogger as getLogger, Logger$1_runWithLogger as runWithLogger, Logger$1_silentLogger as silentLogger };
672
787
  }
673
788
 
674
- declare const types: readonly ["offer_created", "offer_consumed", "offer_validation"];
675
- type Type = (typeof types)[number];
676
- type BaseEvent<type extends Type = Type> = {
677
- readonly id: string;
678
- readonly type: type;
679
- };
680
- type RouterEvent<type extends Type = Type> = type extends "offer_consumed" ? Compute<BaseEvent<type> & {
681
- readonly offerConsumed: OfferConsumed;
682
- }> : type extends "offer_created" | "offer_validation" ? Compute<BaseEvent<type> & {
683
- readonly offer: Offer.Offer;
684
- }> : never;
685
- /**
686
- * Creates a RouterEvent with a deterministic id.
687
- */
688
- declare function from<T extends Type = Type>(base: Omit<RouterEvent<T>, "id" | "type"> & {
689
- type: T;
690
- }): Compute<RouterEvent<T>>;
691
-
692
- type RouterEvent$1_RouterEvent<type extends Type = Type> = RouterEvent<type>;
693
- type RouterEvent$1_Type = Type;
694
- declare const RouterEvent$1_from: typeof from;
695
- declare const RouterEvent$1_types: typeof types;
696
- declare namespace RouterEvent$1 {
697
- export { type RouterEvent$1_RouterEvent as RouterEvent, type RouterEvent$1_Type as Type, RouterEvent$1_from as from, RouterEvent$1_types as types };
698
- }
699
-
700
- /**
701
- * Splits an array into batches of a specified size.
702
- * @param array The array to split.
703
- * @param batchSize The size of each batch.
704
- * @returns An iterator that yields each batch.
705
- * @example
706
- * ```typescript
707
- * const array = [1, 2, 3, 4, 5];
708
- * for (const batch of batch(array, 2)) {
709
- * console.log(batch);
710
- * }
711
- * // Output:
712
- * // [1, 2]
713
- * // [3, 4]
714
- * // [5]
715
- * ```
716
- */
717
- declare function batch$1<T>(array: Array<T>, batchSize: number): Generator<T[], void, unknown>;
718
-
719
- type Cursor = {
720
- sort: "rate" | "maturity" | "expiry" | "amount";
721
- dir: "asc" | "desc";
722
- rate?: string;
723
- maturity?: number;
724
- expiry?: number;
725
- assets?: string;
726
- hash: string;
727
- };
728
- declare function validateCursor(cursor: unknown): cursor is Cursor;
729
- declare function encodeCursor(c: Cursor): string;
730
- declare function decodeCursor(token?: string): Cursor | null;
731
-
732
- /**
733
- * Polls a function at a specified interval.
734
- * Inspired by https://github.com/wevm/viem/blob/845994d20275d08ff892018e237a4b599eeefb6a/src/utils/poll.ts
735
- */
736
- declare function poll<data>(fn: ({ unpoll }: {
737
- unpoll: () => void;
738
- }) => Promise<data | undefined>, { interval }: {
739
- interval: number;
740
- }): () => boolean;
741
-
742
- declare const retry: <T>(fn: () => Promise<T>, attempts?: number, delayMs?: number) => Promise<T>;
743
-
744
- declare function wait(time: number): Promise<unknown>;
745
-
746
- type index_Cursor = Cursor;
747
- declare const index_decodeCursor: typeof decodeCursor;
748
- declare const index_encodeCursor: typeof encodeCursor;
749
- declare const index_poll: typeof poll;
750
- declare const index_retry: typeof retry;
751
- declare const index_validateCursor: typeof validateCursor;
752
- declare const index_wait: typeof wait;
753
- declare namespace index {
754
- export { type index_Cursor as Cursor, batch$1 as batch, index_decodeCursor as decodeCursor, index_encodeCursor as encodeCursor, index_poll as poll, index_retry as retry, index_validateCursor as validateCursor, index_wait as wait };
755
- }
756
-
757
789
  /**
758
790
  * A validation rule.
759
791
  */
@@ -798,11 +830,9 @@ declare function single<Name extends string, T, Ctx = void>(name: Name, run: Sin
798
830
  */
799
831
  declare function batch<Name extends string, T, Ctx = void>(name: Name, run: Batch<T, Name, Ctx>): Rule<T, Name, Ctx>;
800
832
  type MorphoContext = {
801
- publicClients: Partial<Record<Chain.ChainName, PublicClient>>;
833
+ chain: Chain.Chain;
802
834
  };
803
- declare function morpho(parameters: {
804
- whitelistedChains: Chain.Chain[];
805
- }): (Rule<{
835
+ declare function morpho(): (Rule<{
806
836
  readonly offering: Address;
807
837
  readonly assets: bigint;
808
838
  readonly rate: bigint;
@@ -898,55 +928,7 @@ declare function morpho(parameters: {
898
928
  readonly hash: viem.Hex;
899
929
  signature?: viem.Hex;
900
930
  createdAt?: number;
901
- }, "empty_callback", MorphoContext> | Rule<{
902
- readonly offering: Address;
903
- readonly assets: bigint;
904
- readonly rate: bigint;
905
- readonly maturity: number & _morpho_dev_mempool.Brand<"Maturity">;
906
- readonly expiry: number;
907
- readonly nonce: bigint;
908
- readonly buy: boolean;
909
- readonly chainId: bigint;
910
- readonly loanToken: Address;
911
- readonly start: number;
912
- readonly collaterals: readonly {
913
- asset: Address;
914
- oracle: Address;
915
- lltv: bigint & _morpho_dev_mempool.Brand<"LLTV">;
916
- }[];
917
- readonly callback: {
918
- readonly address: Address;
919
- readonly data: viem.Hex;
920
- readonly gasLimit: bigint;
921
- };
922
- readonly hash: viem.Hex;
923
- signature?: viem.Hex;
924
- createdAt?: number;
925
- }, "sell_offers_empty_callback", MorphoContext> | Rule<{
926
- readonly offering: Address;
927
- readonly assets: bigint;
928
- readonly rate: bigint;
929
- readonly maturity: number & _morpho_dev_mempool.Brand<"Maturity">;
930
- readonly expiry: number;
931
- readonly nonce: bigint;
932
- readonly buy: boolean;
933
- readonly chainId: bigint;
934
- readonly loanToken: Address;
935
- readonly start: number;
936
- readonly collaterals: readonly {
937
- asset: Address;
938
- oracle: Address;
939
- lltv: bigint & _morpho_dev_mempool.Brand<"LLTV">;
940
- }[];
941
- readonly callback: {
942
- readonly address: Address;
943
- readonly data: viem.Hex;
944
- readonly gasLimit: bigint;
945
- };
946
- readonly hash: viem.Hex;
947
- signature?: viem.Hex;
948
- createdAt?: number;
949
- }, "buy_offers_empty_callback", MorphoContext>)[];
931
+ }, "empty_callback", MorphoContext>)[];
950
932
 
951
933
  type ValidationRule_Batch<T, RuleName extends string, Ctx = void> = Batch<T, RuleName, Ctx>;
952
934
  type ValidationRule_MorphoContext = MorphoContext;
@@ -1001,4 +983,4 @@ declare namespace Validation {
1001
983
  export { type Validation_Issue as Issue, type Validation_Result as Result, Validation_run as run };
1002
984
  }
1003
985
 
1004
- export { index$3 as ApiSchema, Logger$1 as Logger, index$2 as OfferStore, index$1 as Router, RouterEvent$1 as RouterEvent, RouterOffer$1 as RouterOffer, index as Utils, Validation, ValidationRule };
986
+ export { index$2 as ApiSchema, Callback, Cursor$1 as Cursor, Liquidity$1 as Liquidity, Logger$1 as Logger, index$1 as OfferStore, index as Router, RouterOffer$1 as RouterOffer, Validation, ValidationRule };