@agether/agether 3.1.3 → 3.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.ts +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agether/agether",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "OpenClaw plugin for Agether — onchain credit for AI agents on Ethereum & Base",
5
5
  "main": "src/index.ts",
6
6
  "openclaw": {
@@ -9,7 +9,7 @@
9
9
  ]
10
10
  },
11
11
  "dependencies": {
12
- "@agether/sdk": "^2.17.2",
12
+ "@agether/sdk": "file:../sdk",
13
13
  "axios": "^1.6.0",
14
14
  "ethers": "^6.9.0"
15
15
  },
package/src/index.ts CHANGED
@@ -1811,19 +1811,20 @@ export default function register(api: any) {
1811
1811
  // ═══════════════════════════════════════════════════════
1812
1812
  api.registerTool({
1813
1813
  name: "morpho_yield_spread",
1814
- description: "Analyze yield spread between LST/LRT collateral yield and Morpho borrow rates. Shows profitable carry trades.",
1814
+ description: "Analyze yield spread between LST/LRT collateral yield and Morpho borrow rates. Shows profitable carry trades with real liquidity.",
1815
1815
  parameters: {
1816
1816
  type: "object",
1817
1817
  properties: {
1818
1818
  token: { type: "string", description: "Filter by collateral token (e.g. 'wstETH'). Omit for all LST markets." },
1819
+ minLiquidity: { type: "number", description: "Minimum market liquidity in USD (default: 10000). Set to 0 to include empty markets." },
1819
1820
  },
1820
1821
  },
1821
- async execute(_id: string, params: { token?: string }) {
1822
+ async execute(_id: string, params: { token?: string; minLiquidity?: number }) {
1822
1823
  try {
1823
1824
  const cfg = getConfig(api);
1824
1825
  requireChain(cfg);
1825
1826
  const client = createMorphoClient(cfg);
1826
- const spreads = await client.getYieldSpread();
1827
+ const spreads = await client.getYieldSpread(params.minLiquidity ?? 10000);
1827
1828
  const filtered = params.token
1828
1829
  ? spreads.filter((s: any) => s.collateralToken.toLowerCase() === params.token!.toLowerCase())
1829
1830
  : spreads;