@compass-labs/api-sdk 0.1.1 → 0.1.3
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/FUNCTIONS.md +3 -4
- package/README.md +19 -25
- package/bin/mcp-server.js +3893 -4025
- package/bin/mcp-server.js.map +29 -30
- package/dist/commonjs/funcs/aaveV3AvgRate.d.ts +2 -2
- package/dist/commonjs/funcs/aaveV3AvgRate.js +2 -2
- package/dist/commonjs/funcs/aaveV3Rate.d.ts +1 -1
- package/dist/commonjs/funcs/aaveV3Rate.js +1 -1
- package/dist/commonjs/funcs/aaveV3StdRate.d.ts +3 -2
- package/dist/commonjs/funcs/aaveV3StdRate.d.ts.map +1 -1
- package/dist/commonjs/funcs/aaveV3StdRate.js +3 -2
- package/dist/commonjs/funcs/aaveV3StdRate.js.map +1 -1
- package/dist/commonjs/funcs/morphoMarket.d.ts +9 -0
- package/dist/commonjs/funcs/morphoMarket.d.ts.map +1 -1
- package/dist/commonjs/funcs/morphoMarket.js +9 -0
- package/dist/commonjs/funcs/morphoMarket.js.map +1 -1
- package/dist/commonjs/funcs/morphoUserPosition.d.ts +3 -0
- package/dist/commonjs/funcs/morphoUserPosition.d.ts.map +1 -1
- package/dist/commonjs/funcs/morphoUserPosition.js +3 -0
- package/dist/commonjs/funcs/morphoUserPosition.js.map +1 -1
- package/dist/commonjs/funcs/morphoVault.d.ts +7 -0
- package/dist/commonjs/funcs/morphoVault.d.ts.map +1 -1
- package/dist/commonjs/funcs/morphoVault.js +7 -0
- package/dist/commonjs/funcs/morphoVault.js.map +1 -1
- package/dist/commonjs/funcs/morphoVaults.d.ts +1 -1
- package/dist/commonjs/funcs/morphoVaults.js +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -3
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js +2 -2
- package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3Rate.js +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3StdRate.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3StdRate.js +3 -2
- package/dist/commonjs/mcp-server/tools/aaveV3StdRate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoMarket.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoMarket.js +10 -1
- package/dist/commonjs/mcp-server/tools/morphoMarket.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoUserPosition.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoUserPosition.js +4 -1
- package/dist/commonjs/mcp-server/tools/morphoUserPosition.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoVault.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoVault.js +8 -1
- package/dist/commonjs/mcp-server/tools/morphoVault.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/morphoVaults.js +1 -1
- package/dist/commonjs/sdk/aavev3.d.ts +26 -25
- package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
- package/dist/commonjs/sdk/aavev3.js +29 -28
- package/dist/commonjs/sdk/aavev3.js.map +1 -1
- package/dist/commonjs/sdk/morpho.d.ts +20 -1
- package/dist/commonjs/sdk/morpho.d.ts.map +1 -1
- package/dist/commonjs/sdk/morpho.js +20 -1
- package/dist/commonjs/sdk/morpho.js.map +1 -1
- package/dist/esm/funcs/aaveV3AvgRate.d.ts +2 -2
- package/dist/esm/funcs/aaveV3AvgRate.js +2 -2
- package/dist/esm/funcs/aaveV3Rate.d.ts +1 -1
- package/dist/esm/funcs/aaveV3Rate.js +1 -1
- package/dist/esm/funcs/aaveV3StdRate.d.ts +3 -2
- package/dist/esm/funcs/aaveV3StdRate.d.ts.map +1 -1
- package/dist/esm/funcs/aaveV3StdRate.js +3 -2
- package/dist/esm/funcs/aaveV3StdRate.js.map +1 -1
- package/dist/esm/funcs/morphoMarket.d.ts +9 -0
- package/dist/esm/funcs/morphoMarket.d.ts.map +1 -1
- package/dist/esm/funcs/morphoMarket.js +9 -0
- package/dist/esm/funcs/morphoMarket.js.map +1 -1
- package/dist/esm/funcs/morphoUserPosition.d.ts +3 -0
- package/dist/esm/funcs/morphoUserPosition.d.ts.map +1 -1
- package/dist/esm/funcs/morphoUserPosition.js +3 -0
- package/dist/esm/funcs/morphoUserPosition.js.map +1 -1
- package/dist/esm/funcs/morphoVault.d.ts +7 -0
- package/dist/esm/funcs/morphoVault.d.ts.map +1 -1
- package/dist/esm/funcs/morphoVault.js +7 -0
- package/dist/esm/funcs/morphoVault.js.map +1 -1
- package/dist/esm/funcs/morphoVaults.d.ts +1 -1
- package/dist/esm/funcs/morphoVaults.js +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +3 -3
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3AvgRate.js +2 -2
- package/dist/esm/mcp-server/tools/aaveV3AvgRate.js.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3Rate.js +1 -1
- package/dist/esm/mcp-server/tools/aaveV3StdRate.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3StdRate.js +3 -2
- package/dist/esm/mcp-server/tools/aaveV3StdRate.js.map +1 -1
- package/dist/esm/mcp-server/tools/morphoMarket.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/morphoMarket.js +10 -1
- package/dist/esm/mcp-server/tools/morphoMarket.js.map +1 -1
- package/dist/esm/mcp-server/tools/morphoUserPosition.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/morphoUserPosition.js +4 -1
- package/dist/esm/mcp-server/tools/morphoUserPosition.js.map +1 -1
- package/dist/esm/mcp-server/tools/morphoVault.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/morphoVault.js +8 -1
- package/dist/esm/mcp-server/tools/morphoVault.js.map +1 -1
- package/dist/esm/mcp-server/tools/morphoVaults.js +1 -1
- package/dist/esm/sdk/aavev3.d.ts +26 -25
- package/dist/esm/sdk/aavev3.d.ts.map +1 -1
- package/dist/esm/sdk/aavev3.js +29 -28
- package/dist/esm/sdk/aavev3.js.map +1 -1
- package/dist/esm/sdk/morpho.d.ts +20 -1
- package/dist/esm/sdk/morpho.d.ts.map +1 -1
- package/dist/esm/sdk/morpho.js +20 -1
- package/dist/esm/sdk/morpho.js.map +1 -1
- package/docs/sdks/aavev3/README.md +49 -48
- package/docs/sdks/morpho/README.md +20 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/aaveV3AvgRate.ts +2 -2
- package/src/funcs/aaveV3Rate.ts +1 -1
- package/src/funcs/aaveV3StdRate.ts +3 -2
- package/src/funcs/morphoMarket.ts +9 -0
- package/src/funcs/morphoUserPosition.ts +3 -0
- package/src/funcs/morphoVault.ts +7 -0
- package/src/funcs/morphoVaults.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -3
- package/src/mcp-server/tools/aaveV3AvgRate.ts +2 -2
- package/src/mcp-server/tools/aaveV3Rate.ts +1 -1
- package/src/mcp-server/tools/aaveV3StdRate.ts +3 -2
- package/src/mcp-server/tools/morphoMarket.ts +10 -1
- package/src/mcp-server/tools/morphoUserPosition.ts +4 -1
- package/src/mcp-server/tools/morphoVault.ts +8 -1
- package/src/mcp-server/tools/morphoVaults.ts +1 -1
- package/src/sdk/aavev3.ts +38 -37
- package/src/sdk/morpho.ts +20 -1
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [
|
|
9
|
-
* [avgRate](#avgrate) -
|
|
8
|
+
* [rate](#rate) - Interest Rates: now
|
|
9
|
+
* [avgRate](#avgrate) - Interest Rates: time average
|
|
10
|
+
* [stdRate](#stdrate) - Interest Rates: standard deviation
|
|
10
11
|
* [reserveOverview](#reserveoverview) - Reserve overview
|
|
11
|
-
* [rate](#rate) - Interest rates
|
|
12
12
|
* [tokenPrice](#tokenprice) - Token prices
|
|
13
13
|
* [liquidityChange](#liquiditychange) - Liquidity index
|
|
14
14
|
* [userPositionSummary](#userpositionsummary) - Positions - total
|
|
@@ -19,9 +19,22 @@
|
|
|
19
19
|
* [repay](#repay) - Repay loans
|
|
20
20
|
* [withdraw](#withdraw) - Unstake
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## rate
|
|
23
|
+
|
|
24
|
+
Returns the latest APY and APR rates for a specified token on Aave, for both
|
|
25
|
+
deposits and loans.
|
|
26
|
+
|
|
27
|
+
**Annual percentage yield (APY)** is the yearly return/cost after continuous
|
|
28
|
+
compounding of the per-second rate stored on-chain. This value is the same value as
|
|
29
|
+
seen the on [app.aave.com](
|
|
30
|
+
https://app.aave.com/)
|
|
31
|
+
but more up-to-date as it is taken directly from the
|
|
32
|
+
blockchain every time this endpoint is called.
|
|
33
|
+
|
|
34
|
+
**Annual percentage rate (APR)** is the yearly simple interest rate (no
|
|
35
|
+
compounding).
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
|
|
25
38
|
|
|
26
39
|
### Example Usage
|
|
27
40
|
|
|
@@ -33,10 +46,9 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
33
46
|
});
|
|
34
47
|
|
|
35
48
|
async function run() {
|
|
36
|
-
const result = await compassApiSDK.aaveV3.
|
|
37
|
-
chain: "
|
|
49
|
+
const result = await compassApiSDK.aaveV3.rate({
|
|
50
|
+
chain: "arbitrum:mainnet",
|
|
38
51
|
token: "USDC",
|
|
39
|
-
days: 7,
|
|
40
52
|
});
|
|
41
53
|
|
|
42
54
|
// Handle the result
|
|
@@ -52,7 +64,7 @@ The standalone function version of this method:
|
|
|
52
64
|
|
|
53
65
|
```typescript
|
|
54
66
|
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
55
|
-
import {
|
|
67
|
+
import { aaveV3Rate } from "@compass-labs/api-sdk/funcs/aaveV3Rate.js";
|
|
56
68
|
|
|
57
69
|
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
58
70
|
// You can create one instance of it to use across an application.
|
|
@@ -61,10 +73,9 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
61
73
|
});
|
|
62
74
|
|
|
63
75
|
async function run() {
|
|
64
|
-
const res = await
|
|
65
|
-
chain: "
|
|
76
|
+
const res = await aaveV3Rate(compassApiSDK, {
|
|
77
|
+
chain: "arbitrum:mainnet",
|
|
66
78
|
token: "USDC",
|
|
67
|
-
days: 7,
|
|
68
79
|
});
|
|
69
80
|
|
|
70
81
|
if (!res.ok) {
|
|
@@ -84,14 +95,14 @@ run();
|
|
|
84
95
|
|
|
85
96
|
| Parameter | Type | Required | Description |
|
|
86
97
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
87
|
-
| `request` | [operations.
|
|
98
|
+
| `request` | [operations.AaveRateRequest](../../models/operations/aaveraterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
88
99
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
89
100
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
90
101
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
91
102
|
|
|
92
103
|
### Response
|
|
93
104
|
|
|
94
|
-
**Promise\<[components.
|
|
105
|
+
**Promise\<[components.AaveRateResponse](../../models/components/aaverateresponse.md)\>**
|
|
95
106
|
|
|
96
107
|
### Errors
|
|
97
108
|
|
|
@@ -102,7 +113,7 @@ run();
|
|
|
102
113
|
|
|
103
114
|
## avgRate
|
|
104
115
|
|
|
105
|
-
|
|
116
|
+
Provides time-weighted averages of deposit and borrow rates for Aave reserves.
|
|
106
117
|
|
|
107
118
|
### Example Usage
|
|
108
119
|
|
|
@@ -181,14 +192,10 @@ run();
|
|
|
181
192
|
| errors.HTTPValidationError | 422 | application/json |
|
|
182
193
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
183
194
|
|
|
184
|
-
##
|
|
185
|
-
|
|
186
|
-
Returns key metrics for Aave Reserves:
|
|
187
|
-
- Total Supplied (TVL) in USD
|
|
188
|
-
- Total Borrowed in USD
|
|
189
|
-
- Utilization Ratio
|
|
195
|
+
## stdRate
|
|
190
196
|
|
|
191
|
-
|
|
197
|
+
Returns the historical standard deviation of lending and borrowing rates for Aave
|
|
198
|
+
reserves, illustrating market volatility.
|
|
192
199
|
|
|
193
200
|
### Example Usage
|
|
194
201
|
|
|
@@ -200,9 +207,10 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
200
207
|
});
|
|
201
208
|
|
|
202
209
|
async function run() {
|
|
203
|
-
const result = await compassApiSDK.aaveV3.
|
|
204
|
-
chain: "
|
|
210
|
+
const result = await compassApiSDK.aaveV3.stdRate({
|
|
211
|
+
chain: "ethereum:mainnet",
|
|
205
212
|
token: "USDC",
|
|
213
|
+
days: 7,
|
|
206
214
|
});
|
|
207
215
|
|
|
208
216
|
// Handle the result
|
|
@@ -218,7 +226,7 @@ The standalone function version of this method:
|
|
|
218
226
|
|
|
219
227
|
```typescript
|
|
220
228
|
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
221
|
-
import {
|
|
229
|
+
import { aaveV3StdRate } from "@compass-labs/api-sdk/funcs/aaveV3StdRate.js";
|
|
222
230
|
|
|
223
231
|
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
224
232
|
// You can create one instance of it to use across an application.
|
|
@@ -227,9 +235,10 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
227
235
|
});
|
|
228
236
|
|
|
229
237
|
async function run() {
|
|
230
|
-
const res = await
|
|
231
|
-
chain: "
|
|
238
|
+
const res = await aaveV3StdRate(compassApiSDK, {
|
|
239
|
+
chain: "ethereum:mainnet",
|
|
232
240
|
token: "USDC",
|
|
241
|
+
days: 7,
|
|
233
242
|
});
|
|
234
243
|
|
|
235
244
|
if (!res.ok) {
|
|
@@ -249,14 +258,14 @@ run();
|
|
|
249
258
|
|
|
250
259
|
| Parameter | Type | Required | Description |
|
|
251
260
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
252
|
-
| `request` | [operations.
|
|
261
|
+
| `request` | [operations.AaveStdRateRequest](../../models/operations/aavestdraterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
253
262
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
254
263
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
255
264
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
256
265
|
|
|
257
266
|
### Response
|
|
258
267
|
|
|
259
|
-
**Promise\<[components.
|
|
268
|
+
**Promise\<[components.AaveSTDRateResponse](../../models/components/aavestdrateresponse.md)\>**
|
|
260
269
|
|
|
261
270
|
### Errors
|
|
262
271
|
|
|
@@ -265,22 +274,14 @@ run();
|
|
|
265
274
|
| errors.HTTPValidationError | 422 | application/json |
|
|
266
275
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
267
276
|
|
|
268
|
-
##
|
|
269
|
-
|
|
270
|
-
Returns the latest APY and APR rates for a specified token on Aave, for both
|
|
271
|
-
deposits and loans.
|
|
272
|
-
|
|
273
|
-
**Annual percentage yield (APY)** is the yearly return/cost after continuous
|
|
274
|
-
compounding of the per-second rate stored on-chain. This value is the same value as
|
|
275
|
-
seen the on [app.aave.com](
|
|
276
|
-
https://app.aave.com/)
|
|
277
|
-
but more up-to-date as it is taken directly from the
|
|
278
|
-
blockchain every time this endpoint is called.
|
|
277
|
+
## reserveOverview
|
|
279
278
|
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
Returns key metrics for Aave Reserves:
|
|
280
|
+
- Total Supplied (TVL) in USD
|
|
281
|
+
- Total Borrowed in USD
|
|
282
|
+
- Utilization Ratio
|
|
282
283
|
|
|
283
|
-
|
|
284
|
+
See below for more info:
|
|
284
285
|
|
|
285
286
|
### Example Usage
|
|
286
287
|
|
|
@@ -292,7 +293,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
292
293
|
});
|
|
293
294
|
|
|
294
295
|
async function run() {
|
|
295
|
-
const result = await compassApiSDK.aaveV3.
|
|
296
|
+
const result = await compassApiSDK.aaveV3.reserveOverview({
|
|
296
297
|
chain: "arbitrum:mainnet",
|
|
297
298
|
token: "USDC",
|
|
298
299
|
});
|
|
@@ -310,7 +311,7 @@ The standalone function version of this method:
|
|
|
310
311
|
|
|
311
312
|
```typescript
|
|
312
313
|
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
313
|
-
import {
|
|
314
|
+
import { aaveV3ReserveOverview } from "@compass-labs/api-sdk/funcs/aaveV3ReserveOverview.js";
|
|
314
315
|
|
|
315
316
|
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
316
317
|
// You can create one instance of it to use across an application.
|
|
@@ -319,7 +320,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
319
320
|
});
|
|
320
321
|
|
|
321
322
|
async function run() {
|
|
322
|
-
const res = await
|
|
323
|
+
const res = await aaveV3ReserveOverview(compassApiSDK, {
|
|
323
324
|
chain: "arbitrum:mainnet",
|
|
324
325
|
token: "USDC",
|
|
325
326
|
});
|
|
@@ -341,14 +342,14 @@ run();
|
|
|
341
342
|
|
|
342
343
|
| Parameter | Type | Required | Description |
|
|
343
344
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
344
|
-
| `request` | [operations.
|
|
345
|
+
| `request` | [operations.AaveReserveOverviewRequest](../../models/operations/aavereserveoverviewrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
345
346
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
346
347
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
347
348
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
348
349
|
|
|
349
350
|
### Response
|
|
350
351
|
|
|
351
|
-
**Promise\<[components.
|
|
352
|
+
**Promise\<[components.AaveReserveOverviewResponse](../../models/components/aavereserveoverviewresponse.md)\>**
|
|
352
353
|
|
|
353
354
|
### Errors
|
|
354
355
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
## vaults
|
|
24
24
|
|
|
25
|
-
Query a list of
|
|
25
|
+
Query a list of vaults you can deposit into.
|
|
26
26
|
|
|
27
27
|
Each vault has one unique token that can be deposited. In exchange for depositing
|
|
28
28
|
tokens into a vault you receive shares. You earn yield on these shares by their
|
|
@@ -105,6 +105,13 @@ run();
|
|
|
105
105
|
|
|
106
106
|
Get data & metrics for a specific Morpho vault.
|
|
107
107
|
|
|
108
|
+
Including:
|
|
109
|
+
- Current, daily, weekly, monthly, yearly APY
|
|
110
|
+
- Underlying asset data
|
|
111
|
+
- Total liquidity
|
|
112
|
+
- Pertinent metadata
|
|
113
|
+
- Whitelist status
|
|
114
|
+
|
|
108
115
|
### Example Usage
|
|
109
116
|
|
|
110
117
|
```typescript
|
|
@@ -346,6 +353,15 @@ run();
|
|
|
346
353
|
|
|
347
354
|
Get data & metrics for a specific Morpho market.
|
|
348
355
|
|
|
356
|
+
Including:
|
|
357
|
+
- Current, daily, weekly, monthly, yearly APY
|
|
358
|
+
- Collateral & loan asset data
|
|
359
|
+
- Liquidation loan-to-value ratio
|
|
360
|
+
- Collateral, borrow & liquidity value
|
|
361
|
+
- Utilization ratio
|
|
362
|
+
- Pertinent metadata
|
|
363
|
+
- Whitelist status
|
|
364
|
+
|
|
349
365
|
### Example Usage
|
|
350
366
|
|
|
351
367
|
```typescript
|
|
@@ -507,6 +523,9 @@ run();
|
|
|
507
523
|
|
|
508
524
|
Check user's overall position across the entire Morpho ecosystem.
|
|
509
525
|
|
|
526
|
+
Inlcuding all vault and market position metrics and relavant metadata of said vaults
|
|
527
|
+
and markets.
|
|
528
|
+
|
|
510
529
|
### Example Usage
|
|
511
530
|
|
|
512
531
|
```typescript
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Interest Rates: time average
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
32
|
+
* Provides time-weighted averages of deposit and borrow rates for Aave reserves.
|
|
33
33
|
*/
|
|
34
34
|
export function aaveV3AvgRate(
|
|
35
35
|
client: CompassApiSDKCore,
|
package/src/funcs/aaveV3Rate.ts
CHANGED
|
@@ -26,10 +26,11 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Interest Rates: standard deviation
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Returns the standard deviation of
|
|
32
|
+
* Returns the historical standard deviation of lending and borrowing rates for Aave
|
|
33
|
+
* reserves, illustrating market volatility.
|
|
33
34
|
*/
|
|
34
35
|
export function aaveV3StdRate(
|
|
35
36
|
client: CompassApiSDKCore,
|
|
@@ -30,6 +30,15 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get data & metrics for a specific Morpho market.
|
|
33
|
+
*
|
|
34
|
+
* Including:
|
|
35
|
+
* - Current, daily, weekly, monthly, yearly APY
|
|
36
|
+
* - Collateral & loan asset data
|
|
37
|
+
* - Liquidation loan-to-value ratio
|
|
38
|
+
* - Collateral, borrow & liquidity value
|
|
39
|
+
* - Utilization ratio
|
|
40
|
+
* - Pertinent metadata
|
|
41
|
+
* - Whitelist status
|
|
33
42
|
*/
|
|
34
43
|
export function morphoMarket(
|
|
35
44
|
client: CompassApiSDKCore,
|
|
@@ -30,6 +30,9 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Check user's overall position across the entire Morpho ecosystem.
|
|
33
|
+
*
|
|
34
|
+
* Inlcuding all vault and market position metrics and relavant metadata of said vaults
|
|
35
|
+
* and markets.
|
|
33
36
|
*/
|
|
34
37
|
export function morphoUserPosition(
|
|
35
38
|
client: CompassApiSDKCore,
|
package/src/funcs/morphoVault.ts
CHANGED
|
@@ -30,6 +30,13 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Get data & metrics for a specific Morpho vault.
|
|
33
|
+
*
|
|
34
|
+
* Including:
|
|
35
|
+
* - Current, daily, weekly, monthly, yearly APY
|
|
36
|
+
* - Underlying asset data
|
|
37
|
+
* - Total liquidity
|
|
38
|
+
* - Pertinent metadata
|
|
39
|
+
* - Whitelist status
|
|
33
40
|
*/
|
|
34
41
|
export function morphoVault(
|
|
35
42
|
client: CompassApiSDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Get Vaults
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Query a list of
|
|
32
|
+
* Query a list of vaults you can deposit into.
|
|
33
33
|
*
|
|
34
34
|
* Each vault has one unique token that can be deposited. In exchange for depositing
|
|
35
35
|
* tokens into a vault you receive shares. You earn yield on these shares by their
|
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.1",
|
|
60
|
-
sdkVersion: "0.1.
|
|
60
|
+
sdkVersion: "0.1.3",
|
|
61
61
|
genVersion: "2.605.6",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.1.
|
|
63
|
+
"speakeasy-sdk/typescript 0.1.3 2.605.6 0.0.1 @compass-labs/api-sdk",
|
|
64
64
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -89,7 +89,7 @@ export function createMCPServer(deps: {
|
|
|
89
89
|
}) {
|
|
90
90
|
const server = new McpServer({
|
|
91
91
|
name: "CompassApiSDK",
|
|
92
|
-
version: "0.1.
|
|
92
|
+
version: "0.1.3",
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
const client = new CompassApiSDKCore({
|
|
@@ -119,10 +119,10 @@ export function createMCPServer(deps: {
|
|
|
119
119
|
const register = { tool, resource, resourceTemplate, prompt };
|
|
120
120
|
void register; // suppress unused warnings
|
|
121
121
|
|
|
122
|
-
tool(tool$
|
|
122
|
+
tool(tool$aaveV3Rate);
|
|
123
123
|
tool(tool$aaveV3AvgRate);
|
|
124
|
+
tool(tool$aaveV3StdRate);
|
|
124
125
|
tool(tool$aaveV3ReserveOverview);
|
|
125
|
-
tool(tool$aaveV3Rate);
|
|
126
126
|
tool(tool$aaveV3TokenPrice);
|
|
127
127
|
tool(tool$aaveV3LiquidityChange);
|
|
128
128
|
tool(tool$aaveV3UserPositionSummary);
|
|
@@ -12,9 +12,9 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$aaveV3AvgRate: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "aave-v3-avg-rate",
|
|
15
|
-
description: `
|
|
15
|
+
description: `Interest Rates: time average
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Provides time-weighted averages of deposit and borrow rates for Aave reserves.`,
|
|
18
18
|
args,
|
|
19
19
|
tool: async (client, args, ctx) => {
|
|
20
20
|
const [result, apiCall] = await aaveV3AvgRate(
|
|
@@ -12,7 +12,7 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$aaveV3Rate: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "aave-v3-rate",
|
|
15
|
-
description: `Interest
|
|
15
|
+
description: `Interest Rates: now
|
|
16
16
|
|
|
17
17
|
Returns the latest APY and APR rates for a specified token on Aave, for both
|
|
18
18
|
deposits and loans.
|
|
@@ -12,9 +12,10 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$aaveV3StdRate: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "aave-v3-std-rate",
|
|
15
|
-
description: `
|
|
15
|
+
description: `Interest Rates: standard deviation
|
|
16
16
|
|
|
17
|
-
Returns the standard deviation of
|
|
17
|
+
Returns the historical standard deviation of lending and borrowing rates for Aave
|
|
18
|
+
reserves, illustrating market volatility.`,
|
|
18
19
|
args,
|
|
19
20
|
tool: async (client, args, ctx) => {
|
|
20
21
|
const [result, apiCall] = await aaveV3StdRate(
|
|
@@ -14,7 +14,16 @@ export const tool$morphoMarket: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "morpho-market",
|
|
15
15
|
description: `Get Market
|
|
16
16
|
|
|
17
|
-
Get data & metrics for a specific Morpho market
|
|
17
|
+
Get data & metrics for a specific Morpho market.
|
|
18
|
+
|
|
19
|
+
Including:
|
|
20
|
+
- Current, daily, weekly, monthly, yearly APY
|
|
21
|
+
- Collateral & loan asset data
|
|
22
|
+
- Liquidation loan-to-value ratio
|
|
23
|
+
- Collateral, borrow & liquidity value
|
|
24
|
+
- Utilization ratio
|
|
25
|
+
- Pertinent metadata
|
|
26
|
+
- Whitelist status`,
|
|
18
27
|
args,
|
|
19
28
|
tool: async (client, args, ctx) => {
|
|
20
29
|
const [result, apiCall] = await morphoMarket(
|
|
@@ -14,7 +14,10 @@ export const tool$morphoUserPosition: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "morpho-user-position",
|
|
15
15
|
description: `Check User Position
|
|
16
16
|
|
|
17
|
-
Check user's overall position across the entire Morpho ecosystem
|
|
17
|
+
Check user's overall position across the entire Morpho ecosystem.
|
|
18
|
+
|
|
19
|
+
Inlcuding all vault and market position metrics and relavant metadata of said vaults
|
|
20
|
+
and markets.`,
|
|
18
21
|
args,
|
|
19
22
|
tool: async (client, args, ctx) => {
|
|
20
23
|
const [result, apiCall] = await morphoUserPosition(
|
|
@@ -14,7 +14,14 @@ export const tool$morphoVault: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "morpho-vault",
|
|
15
15
|
description: `Get Vault
|
|
16
16
|
|
|
17
|
-
Get data & metrics for a specific Morpho vault
|
|
17
|
+
Get data & metrics for a specific Morpho vault.
|
|
18
|
+
|
|
19
|
+
Including:
|
|
20
|
+
- Current, daily, weekly, monthly, yearly APY
|
|
21
|
+
- Underlying asset data
|
|
22
|
+
- Total liquidity
|
|
23
|
+
- Pertinent metadata
|
|
24
|
+
- Whitelist status`,
|
|
18
25
|
args,
|
|
19
26
|
tool: async (client, args, ctx) => {
|
|
20
27
|
const [result, apiCall] = await morphoVault(
|
|
@@ -14,7 +14,7 @@ export const tool$morphoVaults: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "morpho-vaults",
|
|
15
15
|
description: `Get Vaults
|
|
16
16
|
|
|
17
|
-
Query a list of
|
|
17
|
+
Query a list of vaults you can deposit into.
|
|
18
18
|
|
|
19
19
|
Each vault has one unique token that can be deposited. In exchange for depositing
|
|
20
20
|
tokens into a vault you receive shares. You earn yield on these shares by their
|