@morpho-dev/router 0.5.0 → 0.6.0
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/dist/cli.js +2147 -989
- package/dist/drizzle/migrations/0023_remove-block-number-for-collaterals.sql +1 -0
- package/dist/drizzle/migrations/meta/0023_snapshot.json +1436 -0
- package/dist/drizzle/migrations/meta/_journal.json +7 -0
- package/dist/index.browser.d.mts +497 -162
- package/dist/index.browser.d.mts.map +1 -1
- package/dist/index.browser.d.ts +497 -162
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +881 -426
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +888 -427
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +579 -174
- package/dist/index.node.d.mts.map +1 -1
- package/dist/index.node.d.ts +578 -173
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +6671 -5605
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +6659 -5599
- package/dist/index.node.mjs.map +1 -1
- package/docs/integrator.md +7 -1
- package/package.json +2 -2
package/docs/integrator.md
CHANGED
|
@@ -12,6 +12,12 @@ These checks serve the same goal: **minimize take-time failures**. Validity chec
|
|
|
12
12
|
|
|
13
13
|
To run these checks and validate your offers, call **`POST /v1/validate`**. If validation fails, the response includes `data.issues` describing what needs to be fixed.
|
|
14
14
|
|
|
15
|
+
## Discover supported rules
|
|
16
|
+
|
|
17
|
+
The router publishes configured rules (maturities, callbacks, and loan tokens) by chain. These rules are enforced by the gatekeeper when validating offers.
|
|
18
|
+
|
|
19
|
+
Call **`GET /v1/config/rules`** to retrieve the current rules (with pagination). Use the `types` and `chains` query params to filter which rules are returned. The response includes `meta.checksum` so integrators can detect updates.
|
|
20
|
+
|
|
15
21
|
## Push offers to the mempool
|
|
16
22
|
|
|
17
23
|
Once your offer is valid, you must **publish it on-chain** to make it available to all mempool consumers. The router is one consumer of the mempool, but anyone can publish to it or listen to it.
|
|
@@ -75,4 +81,4 @@ The router enforces a simple rule: **liquidity promised by a group of offers is
|
|
|
75
81
|
|
|
76
82
|
The same concept applies to exit intents (shares and debt): the router prevents overcommitting those balances as well.
|
|
77
83
|
|
|
78
|
-
To get the amount already reserved on a position you can query the user’s positions via `/v1/users/[:userAddress]/positions`.
|
|
84
|
+
To get the amount already reserved on a position you can query the user’s positions via `/v1/users/[:userAddress]/positions`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-dev/router",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Router package for Morpho protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"openapi:generate": "node --import tsx src/cli/dump-swagger.ts && pnpm openapi-typescript src/api/Schema/generated/swagger.json -o src/api/Schema/generated/swagger.d.ts && biome check --write src/api/Schema/generated",
|
|
95
95
|
"test": "vitest run",
|
|
96
96
|
"test:e2e": "./scripts/e2e-run.sh",
|
|
97
|
-
"test:tenderly": "vitest --config vitest.
|
|
97
|
+
"test:tenderly": "vitest --config vitest.e2e.config.ts run",
|
|
98
98
|
"test:ui": "vitest --ui",
|
|
99
99
|
"test:watch": "vitest watch",
|
|
100
100
|
"e2e:setup": "./scripts/e2e-setup.sh",
|