@compass-labs/api-sdk 0.1.2 → 0.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 (72) hide show
  1. package/FUNCTIONS.md +3 -4
  2. package/README.md +19 -25
  3. package/bin/mcp-server.js +15 -14
  4. package/bin/mcp-server.js.map +12 -12
  5. package/dist/commonjs/funcs/aaveV3AvgRate.d.ts +2 -2
  6. package/dist/commonjs/funcs/aaveV3AvgRate.js +2 -2
  7. package/dist/commonjs/funcs/aaveV3Rate.d.ts +1 -1
  8. package/dist/commonjs/funcs/aaveV3Rate.js +1 -1
  9. package/dist/commonjs/funcs/aaveV3StdRate.d.ts +3 -2
  10. package/dist/commonjs/funcs/aaveV3StdRate.d.ts.map +1 -1
  11. package/dist/commonjs/funcs/aaveV3StdRate.js +3 -2
  12. package/dist/commonjs/funcs/aaveV3StdRate.js.map +1 -1
  13. package/dist/commonjs/lib/config.d.ts +2 -2
  14. package/dist/commonjs/lib/config.js +2 -2
  15. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  16. package/dist/commonjs/mcp-server/server.js +3 -3
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js +2 -2
  19. package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.js.map +1 -1
  20. package/dist/commonjs/mcp-server/tools/aaveV3Rate.js +1 -1
  21. package/dist/commonjs/mcp-server/tools/aaveV3StdRate.d.ts.map +1 -1
  22. package/dist/commonjs/mcp-server/tools/aaveV3StdRate.js +3 -2
  23. package/dist/commonjs/mcp-server/tools/aaveV3StdRate.js.map +1 -1
  24. package/dist/commonjs/models/components/morphogetvaultresponse.d.ts +5 -2
  25. package/dist/commonjs/models/components/morphogetvaultresponse.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/morphogetvaultresponse.js +2 -2
  27. package/dist/commonjs/models/components/morphogetvaultresponse.js.map +1 -1
  28. package/dist/commonjs/sdk/aavev3.d.ts +26 -25
  29. package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/aavev3.js +29 -28
  31. package/dist/commonjs/sdk/aavev3.js.map +1 -1
  32. package/dist/esm/funcs/aaveV3AvgRate.d.ts +2 -2
  33. package/dist/esm/funcs/aaveV3AvgRate.js +2 -2
  34. package/dist/esm/funcs/aaveV3Rate.d.ts +1 -1
  35. package/dist/esm/funcs/aaveV3Rate.js +1 -1
  36. package/dist/esm/funcs/aaveV3StdRate.d.ts +3 -2
  37. package/dist/esm/funcs/aaveV3StdRate.d.ts.map +1 -1
  38. package/dist/esm/funcs/aaveV3StdRate.js +3 -2
  39. package/dist/esm/funcs/aaveV3StdRate.js.map +1 -1
  40. package/dist/esm/lib/config.d.ts +2 -2
  41. package/dist/esm/lib/config.js +2 -2
  42. package/dist/esm/mcp-server/mcp-server.js +1 -1
  43. package/dist/esm/mcp-server/server.js +3 -3
  44. package/dist/esm/mcp-server/server.js.map +1 -1
  45. package/dist/esm/mcp-server/tools/aaveV3AvgRate.js +2 -2
  46. package/dist/esm/mcp-server/tools/aaveV3AvgRate.js.map +1 -1
  47. package/dist/esm/mcp-server/tools/aaveV3Rate.js +1 -1
  48. package/dist/esm/mcp-server/tools/aaveV3StdRate.d.ts.map +1 -1
  49. package/dist/esm/mcp-server/tools/aaveV3StdRate.js +3 -2
  50. package/dist/esm/mcp-server/tools/aaveV3StdRate.js.map +1 -1
  51. package/dist/esm/models/components/morphogetvaultresponse.d.ts +5 -2
  52. package/dist/esm/models/components/morphogetvaultresponse.d.ts.map +1 -1
  53. package/dist/esm/models/components/morphogetvaultresponse.js +2 -2
  54. package/dist/esm/models/components/morphogetvaultresponse.js.map +1 -1
  55. package/dist/esm/sdk/aavev3.d.ts +26 -25
  56. package/dist/esm/sdk/aavev3.d.ts.map +1 -1
  57. package/dist/esm/sdk/aavev3.js +29 -28
  58. package/dist/esm/sdk/aavev3.js.map +1 -1
  59. package/docs/sdks/aavev3/README.md +49 -48
  60. package/jsr.json +1 -1
  61. package/package.json +1 -1
  62. package/src/funcs/aaveV3AvgRate.ts +2 -2
  63. package/src/funcs/aaveV3Rate.ts +1 -1
  64. package/src/funcs/aaveV3StdRate.ts +3 -2
  65. package/src/lib/config.ts +2 -2
  66. package/src/mcp-server/mcp-server.ts +1 -1
  67. package/src/mcp-server/server.ts +3 -3
  68. package/src/mcp-server/tools/aaveV3AvgRate.ts +2 -2
  69. package/src/mcp-server/tools/aaveV3Rate.ts +1 -1
  70. package/src/mcp-server/tools/aaveV3StdRate.ts +3 -2
  71. package/src/models/components/morphogetvaultresponse.ts +7 -4
  72. package/src/sdk/aavev3.ts +38 -37
@@ -5,10 +5,10 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [stdRate](#stdrate) - Standard deviation of interest rates
9
- * [avgRate](#avgrate) - Average interest rates
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
- ## stdRate
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
- Returns the standard deviation of Interest Rates for Aave Reserves over time.
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.stdRate({
37
- chain: "ethereum:mainnet",
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 { aaveV3StdRate } from "@compass-labs/api-sdk/funcs/aaveV3StdRate.js";
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 aaveV3StdRate(compassApiSDK, {
65
- chain: "ethereum:mainnet",
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.AaveStdRateRequest](../../models/operations/aavestdraterequest.md) | :heavy_check_mark: | The request object to use for the request. |
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.AaveSTDRateResponse](../../models/components/aavestdrateresponse.md)\>**
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
- Returns time averaged Interest Rates for Aave Reserves.
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
- ## reserveOverview
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
- See below for more info:
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.reserveOverview({
204
- chain: "arbitrum:mainnet",
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 { aaveV3ReserveOverview } from "@compass-labs/api-sdk/funcs/aaveV3ReserveOverview.js";
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 aaveV3ReserveOverview(compassApiSDK, {
231
- chain: "arbitrum:mainnet",
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.AaveReserveOverviewRequest](../../models/operations/aavereserveoverviewrequest.md) | :heavy_check_mark: | The request object to use for the request. |
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.AaveReserveOverviewResponse](../../models/components/aavereserveoverviewresponse.md)\>**
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
- ## rate
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
- **Annual percentage rate (APR)** is the yearly simple interest rate (no
281
- compounding).
279
+ Returns key metrics for Aave Reserves:
280
+ - Total Supplied (TVL) in USD
281
+ - Total Borrowed in USD
282
+ - Utilization Ratio
282
283
 
283
- For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
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.rate({
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 { aaveV3Rate } from "@compass-labs/api-sdk/funcs/aaveV3Rate.js";
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 aaveV3Rate(compassApiSDK, {
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.AaveRateRequest](../../models/operations/aaveraterequest.md) | :heavy_check_mark: | The request object to use for the request. |
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.AaveRateResponse](../../models/components/aaverateresponse.md)\>**
352
+ **Promise\<[components.AaveReserveOverviewResponse](../../models/components/aavereserveoverviewresponse.md)\>**
352
353
 
353
354
  ### Errors
354
355
 
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@compass-labs/api-sdk",
5
- "version": "0.1.2",
5
+ "version": "0.1.4",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Average interest rates
29
+ * Interest Rates: time average
30
30
  *
31
31
  * @remarks
32
- * Returns time averaged Interest Rates for Aave Reserves.
32
+ * Provides time-weighted averages of deposit and borrow rates for Aave reserves.
33
33
  */
34
34
  export function aaveV3AvgRate(
35
35
  client: CompassApiSDKCore,
@@ -26,7 +26,7 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Interest rates
29
+ * Interest Rates: now
30
30
  *
31
31
  * @remarks
32
32
  * Returns the latest APY and APR rates for a specified token on Aave, for both
@@ -26,10 +26,11 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Standard deviation of interest rates
29
+ * Interest Rates: standard deviation
30
30
  *
31
31
  * @remarks
32
- * Returns the standard deviation of Interest Rates for Aave Reserves over time.
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,
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.2",
60
+ sdkVersion: "0.1.4",
61
61
  genVersion: "2.605.6",
62
62
  userAgent:
63
- "speakeasy-sdk/typescript 0.1.2 2.605.6 0.0.1 @compass-labs/api-sdk",
63
+ "speakeasy-sdk/typescript 0.1.4 2.605.6 0.0.1 @compass-labs/api-sdk",
64
64
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.1.2",
22
+ currentVersion: "0.1.4",
23
23
  },
24
24
  });
25
25
 
@@ -89,7 +89,7 @@ export function createMCPServer(deps: {
89
89
  }) {
90
90
  const server = new McpServer({
91
91
  name: "CompassApiSDK",
92
- version: "0.1.2",
92
+ version: "0.1.4",
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$aaveV3StdRate);
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: `Average interest rates
15
+ description: `Interest Rates: time average
16
16
 
17
- Returns time averaged Interest Rates for Aave Reserves.`,
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 rates
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: `Standard deviation of interest rates
15
+ description: `Interest Rates: standard deviation
16
16
 
17
- Returns the standard deviation of Interest Rates for Aave Reserves over time.`,
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(
@@ -47,7 +47,10 @@ export type MorphoGetVaultResponse = {
47
47
  state: CompassApiBackendModelsMorphoReadResponseGetVaultVaultState;
48
48
  liquidity: Liquidity;
49
49
  asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset;
50
- metadata: Metadata;
50
+ /**
51
+ * Metadata of the vault.
52
+ */
53
+ metadata?: Metadata | null | undefined;
51
54
  };
52
55
 
53
56
  /** @internal */
@@ -63,7 +66,7 @@ export const MorphoGetVaultResponse$inboundSchema: z.ZodType<
63
66
  CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$inboundSchema,
64
67
  liquidity: Liquidity$inboundSchema,
65
68
  asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset$inboundSchema,
66
- metadata: Metadata$inboundSchema,
69
+ metadata: z.nullable(Metadata$inboundSchema).optional(),
67
70
  });
68
71
 
69
72
  /** @internal */
@@ -74,7 +77,7 @@ export type MorphoGetVaultResponse$Outbound = {
74
77
  state: CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$Outbound;
75
78
  liquidity: Liquidity$Outbound;
76
79
  asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset$Outbound;
77
- metadata: Metadata$Outbound;
80
+ metadata?: Metadata$Outbound | null | undefined;
78
81
  };
79
82
 
80
83
  /** @internal */
@@ -90,7 +93,7 @@ export const MorphoGetVaultResponse$outboundSchema: z.ZodType<
90
93
  CompassApiBackendModelsMorphoReadResponseGetVaultVaultState$outboundSchema,
91
94
  liquidity: Liquidity$outboundSchema,
92
95
  asset: CompassApiBackendModelsMorphoReadResponseGetVaultAsset$outboundSchema,
93
- metadata: Metadata$outboundSchema,
96
+ metadata: z.nullable(Metadata$outboundSchema).optional(),
94
97
  });
95
98
 
96
99
  /**
package/src/sdk/aavev3.ts CHANGED
@@ -22,16 +22,29 @@ import { unwrapAsync } from "../types/fp.js";
22
22
 
23
23
  export class AaveV3 extends ClientSDK {
24
24
  /**
25
- * Standard deviation of interest rates
25
+ * Interest Rates: now
26
26
  *
27
27
  * @remarks
28
- * Returns the standard deviation of Interest Rates for Aave Reserves over time.
28
+ * Returns the latest APY and APR rates for a specified token on Aave, for both
29
+ * deposits and loans.
30
+ *
31
+ * **Annual percentage yield (APY)** is the yearly return/cost after continuous
32
+ * compounding of the per-second rate stored on-chain. This value is the same value as
33
+ * seen the on [app.aave.com](
34
+ * https://app.aave.com/)
35
+ * but more up-to-date as it is taken directly from the
36
+ * blockchain every time this endpoint is called.
37
+ *
38
+ * **Annual percentage rate (APR)** is the yearly simple interest rate (no
39
+ * compounding).
40
+ *
41
+ * For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
29
42
  */
30
- async stdRate(
31
- request: operations.AaveStdRateRequest,
43
+ async rate(
44
+ request: operations.AaveRateRequest,
32
45
  options?: RequestOptions,
33
- ): Promise<components.AaveSTDRateResponse> {
34
- return unwrapAsync(aaveV3StdRate(
46
+ ): Promise<components.AaveRateResponse> {
47
+ return unwrapAsync(aaveV3Rate(
35
48
  this,
36
49
  request,
37
50
  options,
@@ -39,10 +52,10 @@ export class AaveV3 extends ClientSDK {
39
52
  }
40
53
 
41
54
  /**
42
- * Average interest rates
55
+ * Interest Rates: time average
43
56
  *
44
57
  * @remarks
45
- * Returns time averaged Interest Rates for Aave Reserves.
58
+ * Provides time-weighted averages of deposit and borrow rates for Aave reserves.
46
59
  */
47
60
  async avgRate(
48
61
  request: operations.AaveAvgRateRequest,
@@ -56,21 +69,17 @@ export class AaveV3 extends ClientSDK {
56
69
  }
57
70
 
58
71
  /**
59
- * Reserve overview
72
+ * Interest Rates: standard deviation
60
73
  *
61
74
  * @remarks
62
- * Returns key metrics for Aave Reserves:
63
- * - Total Supplied (TVL) in USD
64
- * - Total Borrowed in USD
65
- * - Utilization Ratio
66
- *
67
- * See below for more info:
75
+ * Returns the historical standard deviation of lending and borrowing rates for Aave
76
+ * reserves, illustrating market volatility.
68
77
  */
69
- async reserveOverview(
70
- request: operations.AaveReserveOverviewRequest,
78
+ async stdRate(
79
+ request: operations.AaveStdRateRequest,
71
80
  options?: RequestOptions,
72
- ): Promise<components.AaveReserveOverviewResponse> {
73
- return unwrapAsync(aaveV3ReserveOverview(
81
+ ): Promise<components.AaveSTDRateResponse> {
82
+ return unwrapAsync(aaveV3StdRate(
74
83
  this,
75
84
  request,
76
85
  options,
@@ -78,29 +87,21 @@ export class AaveV3 extends ClientSDK {
78
87
  }
79
88
 
80
89
  /**
81
- * Interest rates
90
+ * Reserve overview
82
91
  *
83
92
  * @remarks
84
- * Returns the latest APY and APR rates for a specified token on Aave, for both
85
- * deposits and loans.
86
- *
87
- * **Annual percentage yield (APY)** is the yearly return/cost after continuous
88
- * compounding of the per-second rate stored on-chain. This value is the same value as
89
- * seen the on [app.aave.com](
90
- * https://app.aave.com/)
91
- * but more up-to-date as it is taken directly from the
92
- * blockchain every time this endpoint is called.
93
- *
94
- * **Annual percentage rate (APR)** is the yearly simple interest rate (no
95
- * compounding).
93
+ * Returns key metrics for Aave Reserves:
94
+ * - Total Supplied (TVL) in USD
95
+ * - Total Borrowed in USD
96
+ * - Utilization Ratio
96
97
  *
97
- * For APY/APR on loans Aave offers both stable and fixed rates on certain tokens.
98
+ * See below for more info:
98
99
  */
99
- async rate(
100
- request: operations.AaveRateRequest,
100
+ async reserveOverview(
101
+ request: operations.AaveReserveOverviewRequest,
101
102
  options?: RequestOptions,
102
- ): Promise<components.AaveRateResponse> {
103
- return unwrapAsync(aaveV3Rate(
103
+ ): Promise<components.AaveReserveOverviewResponse> {
104
+ return unwrapAsync(aaveV3ReserveOverview(
104
105
  this,
105
106
  request,
106
107
  options,