@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.
- package/README.md +15 -0
- package/dist/drizzle/0000_add-offers-table.sql +37 -0
- package/dist/drizzle/0001_create_offer_status_relation.sql +10 -0
- package/dist/drizzle/0002_add_created_at_in_offer_status_relation.sql +3 -0
- package/dist/drizzle/0003_add-cursor-indices-to-offers.sql +6 -0
- package/dist/drizzle/0004_offer-start.sql +1 -0
- package/dist/drizzle/0005_rename-price-token-buy.sql +8 -0
- package/dist/drizzle/0006_rename-buy.sql +3 -0
- package/dist/drizzle/0007_rename-offering.sql +3 -0
- package/dist/drizzle/meta/0000_snapshot.json +344 -0
- package/dist/drizzle/meta/0001_snapshot.json +426 -0
- package/dist/drizzle/meta/0002_snapshot.json +439 -0
- package/dist/drizzle/meta/0003_snapshot.json +553 -0
- package/dist/drizzle/meta/0004_snapshot.json +559 -0
- package/dist/drizzle/meta/0005_snapshot.json +559 -0
- package/dist/drizzle/meta/0006_snapshot.json +559 -0
- package/dist/drizzle/meta/0007_snapshot.json +559 -0
- package/dist/drizzle/meta/_journal.json +62 -0
- package/dist/index.browser.d.cts +33 -20
- package/dist/index.browser.d.ts +33 -20
- package/dist/index.browser.js +623 -54
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +620 -54
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.cts +735 -2
- package/dist/index.node.d.ts +735 -2
- package/dist/index.node.js +2117 -4771
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +2109 -4772
- package/dist/index.node.mjs.map +1 -1
- package/package.json +17 -3
package/dist/index.browser.d.ts
CHANGED
|
@@ -203,25 +203,25 @@ declare class HttpGetOffersFailedError extends Errors.BaseError {
|
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
type
|
|
207
|
-
type
|
|
208
|
-
type
|
|
209
|
-
declare const
|
|
210
|
-
type
|
|
211
|
-
declare const
|
|
212
|
-
type
|
|
213
|
-
declare const
|
|
214
|
-
type
|
|
215
|
-
declare const
|
|
216
|
-
type
|
|
217
|
-
declare const
|
|
218
|
-
type
|
|
219
|
-
type
|
|
220
|
-
declare const
|
|
221
|
-
declare const
|
|
222
|
-
declare const
|
|
223
|
-
declare namespace
|
|
224
|
-
export { type
|
|
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,
|
|
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 };
|