@morpho-dev/router 0.0.12 → 0.0.13

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.
@@ -203,25 +203,25 @@ declare class HttpGetOffersFailedError extends Errors.BaseError {
203
203
  });
204
204
  }
205
205
 
206
- type index_Client = Client;
207
- type index_GetParameters = GetParameters;
208
- type index_HttpForbiddenError = HttpForbiddenError;
209
- declare const index_HttpForbiddenError: typeof HttpForbiddenError;
210
- type index_HttpGetOffersFailedError = HttpGetOffersFailedError;
211
- declare const index_HttpGetOffersFailedError: typeof HttpGetOffersFailedError;
212
- type index_HttpRateLimitError = HttpRateLimitError;
213
- declare const index_HttpRateLimitError: typeof HttpRateLimitError;
214
- type index_HttpUnauthorizedError = HttpUnauthorizedError;
215
- declare const index_HttpUnauthorizedError: typeof HttpUnauthorizedError;
216
- type index_InvalidUrlError = InvalidUrlError;
217
- declare const index_InvalidUrlError: typeof InvalidUrlError;
218
- type index_MatchParameters = MatchParameters;
219
- type index_RouterClientConfig = RouterClientConfig;
220
- declare const index_connect: typeof connect;
221
- declare const index_get: typeof get;
222
- declare const index_match: typeof match;
223
- declare namespace index {
224
- export { 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_InvalidUrlError as InvalidUrlError, type index_MatchParameters as MatchParameters, type index_RouterClientConfig as RouterClientConfig, index_connect as connect, index_get as get, index_match as match };
206
+ type Client$1_Client = Client;
207
+ type Client$1_GetParameters = GetParameters;
208
+ type Client$1_HttpForbiddenError = HttpForbiddenError;
209
+ declare const Client$1_HttpForbiddenError: typeof HttpForbiddenError;
210
+ type Client$1_HttpGetOffersFailedError = HttpGetOffersFailedError;
211
+ declare const Client$1_HttpGetOffersFailedError: typeof HttpGetOffersFailedError;
212
+ type Client$1_HttpRateLimitError = HttpRateLimitError;
213
+ declare const Client$1_HttpRateLimitError: typeof HttpRateLimitError;
214
+ type Client$1_HttpUnauthorizedError = HttpUnauthorizedError;
215
+ declare const Client$1_HttpUnauthorizedError: typeof HttpUnauthorizedError;
216
+ type Client$1_InvalidUrlError = InvalidUrlError;
217
+ declare const Client$1_InvalidUrlError: typeof InvalidUrlError;
218
+ type Client$1_MatchParameters = MatchParameters;
219
+ type Client$1_RouterClientConfig = RouterClientConfig;
220
+ declare const Client$1_connect: typeof connect;
221
+ declare const Client$1_get: typeof get;
222
+ declare const Client$1_match: typeof match;
223
+ declare namespace Client$1 {
224
+ export { type Client$1_Client as Client, type Client$1_GetParameters as GetParameters, Client$1_HttpForbiddenError as HttpForbiddenError, Client$1_HttpGetOffersFailedError as HttpGetOffersFailedError, Client$1_HttpRateLimitError as HttpRateLimitError, Client$1_HttpUnauthorizedError as HttpUnauthorizedError, Client$1_InvalidUrlError as InvalidUrlError, type Client$1_MatchParameters as MatchParameters, type Client$1_RouterClientConfig as RouterClientConfig, Client$1_connect as connect, Client$1_get as get, Client$1_match as match };
225
225
  }
226
226
 
227
227
  declare const types: readonly ["offer_created", "offer_matched", "offer_validation"];
@@ -278,6 +278,19 @@ declare namespace RouterEvent$1 {
278
278
  */
279
279
  declare function batch$1<T>(array: Array<T>, batchSize: number): Generator<T[], void, unknown>;
280
280
 
281
+ type Cursor = {
282
+ sort: "rate" | "maturity" | "expiry" | "amount";
283
+ dir: "asc" | "desc";
284
+ rate?: string;
285
+ maturity?: number;
286
+ expiry?: number;
287
+ assets?: string;
288
+ hash: string;
289
+ };
290
+ declare function validateCursor(cursor: unknown): cursor is Cursor;
291
+ declare function encodeCursor(c: Cursor): string;
292
+ declare function decodeCursor(token?: string): Cursor | null;
293
+
281
294
  /**
282
295
  * Polls a function at a specified interval.
283
296
  * Inspired by https://github.com/wevm/viem/blob/845994d20275d08ff892018e237a4b599eeefb6a/src/utils/poll.ts
@@ -537,4 +550,4 @@ declare namespace Validation {
537
550
  export { type Validation_Issue as Issue, type Validation_Result as Result, Validation_run as run };
538
551
  }
539
552
 
540
- export { Chain$1 as Chain, type Compute, index as Router, RouterEvent$1 as RouterEvent, RouterOffer$1 as RouterOffer, Validation, ValidationRule, batch$1 as batch, poll, wait };
553
+ export { Chain$1 as Chain, type Compute, type Cursor, Client$1 as Router, RouterEvent$1 as RouterEvent, RouterOffer$1 as RouterOffer, Validation, ValidationRule, batch$1 as batch, decodeCursor, encodeCursor, poll, validateCursor, wait };