@morpho-dev/router 0.5.0 → 0.7.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.
@@ -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.5.0",
3
+ "version": "0.7.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.tenderly.config.ts run",
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",