@compass-labs/api-sdk 2.1.18-rc.1 → 2.1.18

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 (154) hide show
  1. package/README.md +3 -5
  2. package/codeSamples_typescript.yaml +0 -6
  3. package/dist/commonjs/funcs/earnEarnListAaveMarkets.d.ts +10 -4
  4. package/dist/commonjs/funcs/earnEarnListAaveMarkets.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/earnEarnListAaveMarkets.js +10 -4
  6. package/dist/commonjs/funcs/earnEarnListAaveMarkets.js.map +1 -1
  7. package/dist/commonjs/models/components/chainmarketinfo.d.ts +24 -0
  8. package/dist/commonjs/models/components/chainmarketinfo.d.ts.map +1 -0
  9. package/dist/commonjs/models/components/{aavemarketinfo.js → chainmarketinfo.js} +6 -7
  10. package/dist/commonjs/models/components/chainmarketinfo.js.map +1 -0
  11. package/dist/commonjs/models/components/index.d.ts +3 -6
  12. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/index.js +3 -6
  14. package/dist/commonjs/models/components/index.js.map +1 -1
  15. package/dist/commonjs/models/components/listaavemarketsresponse.d.ts +6 -9
  16. package/dist/commonjs/models/components/listaavemarketsresponse.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/listaavemarketsresponse.js +2 -9
  18. package/dist/commonjs/models/components/listaavemarketsresponse.js.map +1 -1
  19. package/dist/commonjs/models/components/maxsupplyapyinfo.d.ts +28 -0
  20. package/dist/commonjs/models/components/maxsupplyapyinfo.d.ts.map +1 -0
  21. package/dist/commonjs/models/components/{chainratedata.js → maxsupplyapyinfo.js} +12 -10
  22. package/dist/commonjs/models/components/maxsupplyapyinfo.js.map +1 -0
  23. package/dist/commonjs/models/components/tokenmarketdata.d.ts +24 -0
  24. package/dist/commonjs/models/components/tokenmarketdata.d.ts.map +1 -0
  25. package/dist/commonjs/models/components/{aaveusdcratesresponse.js → tokenmarketdata.js} +11 -13
  26. package/dist/commonjs/models/components/tokenmarketdata.js.map +1 -0
  27. package/dist/commonjs/models/operations/index.d.ts +0 -1
  28. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  29. package/dist/commonjs/models/operations/index.js +0 -1
  30. package/dist/commonjs/models/operations/index.js.map +1 -1
  31. package/dist/commonjs/sdk/earn.d.ts +9 -10
  32. package/dist/commonjs/sdk/earn.d.ts.map +1 -1
  33. package/dist/commonjs/sdk/earn.js +9 -13
  34. package/dist/commonjs/sdk/earn.js.map +1 -1
  35. package/dist/esm/funcs/earnEarnListAaveMarkets.d.ts +10 -4
  36. package/dist/esm/funcs/earnEarnListAaveMarkets.d.ts.map +1 -1
  37. package/dist/esm/funcs/earnEarnListAaveMarkets.js +10 -4
  38. package/dist/esm/funcs/earnEarnListAaveMarkets.js.map +1 -1
  39. package/dist/esm/models/components/chainmarketinfo.d.ts +24 -0
  40. package/dist/esm/models/components/chainmarketinfo.d.ts.map +1 -0
  41. package/dist/esm/models/components/{aavemarketinfo.js → chainmarketinfo.js} +4 -5
  42. package/dist/esm/models/components/chainmarketinfo.js.map +1 -0
  43. package/dist/esm/models/components/index.d.ts +3 -6
  44. package/dist/esm/models/components/index.d.ts.map +1 -1
  45. package/dist/esm/models/components/index.js +3 -6
  46. package/dist/esm/models/components/index.js.map +1 -1
  47. package/dist/esm/models/components/listaavemarketsresponse.d.ts +6 -9
  48. package/dist/esm/models/components/listaavemarketsresponse.d.ts.map +1 -1
  49. package/dist/esm/models/components/listaavemarketsresponse.js +2 -9
  50. package/dist/esm/models/components/listaavemarketsresponse.js.map +1 -1
  51. package/dist/esm/models/components/maxsupplyapyinfo.d.ts +28 -0
  52. package/dist/esm/models/components/maxsupplyapyinfo.d.ts.map +1 -0
  53. package/dist/esm/models/components/maxsupplyapyinfo.js +22 -0
  54. package/dist/esm/models/components/maxsupplyapyinfo.js.map +1 -0
  55. package/dist/esm/models/components/tokenmarketdata.d.ts +24 -0
  56. package/dist/esm/models/components/tokenmarketdata.d.ts.map +1 -0
  57. package/dist/esm/models/components/tokenmarketdata.js +21 -0
  58. package/dist/esm/models/components/tokenmarketdata.js.map +1 -0
  59. package/dist/esm/models/operations/index.d.ts +0 -1
  60. package/dist/esm/models/operations/index.d.ts.map +1 -1
  61. package/dist/esm/models/operations/index.js +0 -1
  62. package/dist/esm/models/operations/index.js.map +1 -1
  63. package/dist/esm/sdk/earn.d.ts +9 -10
  64. package/dist/esm/sdk/earn.d.ts.map +1 -1
  65. package/dist/esm/sdk/earn.js +9 -13
  66. package/dist/esm/sdk/earn.js.map +1 -1
  67. package/docs/models/components/chainmarketinfo.md +23 -0
  68. package/docs/models/components/listaavemarketsresponse.md +16 -13
  69. package/docs/models/components/maxsupplyapyinfo.md +25 -0
  70. package/docs/models/components/tokenmarketdata.md +26 -0
  71. package/docs/sdks/earn/README.md +9 -78
  72. package/package.json +1 -1
  73. package/src/funcs/earnEarnListAaveMarkets.ts +10 -4
  74. package/src/models/components/{aavemarketinfo.ts → chainmarketinfo.ts} +11 -16
  75. package/src/models/components/index.ts +3 -6
  76. package/src/models/components/listaavemarketsresponse.ts +7 -21
  77. package/src/models/components/maxsupplyapyinfo.ts +58 -0
  78. package/src/models/components/tokenmarketdata.ts +55 -0
  79. package/src/models/operations/index.ts +0 -1
  80. package/src/sdk/earn.ts +9 -21
  81. package/dist/commonjs/funcs/earnEarnAaveTokenRates.d.ts +0 -19
  82. package/dist/commonjs/funcs/earnEarnAaveTokenRates.d.ts.map +0 -1
  83. package/dist/commonjs/funcs/earnEarnAaveTokenRates.js +0 -122
  84. package/dist/commonjs/funcs/earnEarnAaveTokenRates.js.map +0 -1
  85. package/dist/commonjs/models/components/aavemarketinfo.d.ts +0 -28
  86. package/dist/commonjs/models/components/aavemarketinfo.d.ts.map +0 -1
  87. package/dist/commonjs/models/components/aavemarketinfo.js.map +0 -1
  88. package/dist/commonjs/models/components/aaveusdcratesresponse.d.ts +0 -30
  89. package/dist/commonjs/models/components/aaveusdcratesresponse.d.ts.map +0 -1
  90. package/dist/commonjs/models/components/aaveusdcratesresponse.js.map +0 -1
  91. package/dist/commonjs/models/components/chainaavemarkets.d.ts +0 -21
  92. package/dist/commonjs/models/components/chainaavemarkets.d.ts.map +0 -1
  93. package/dist/commonjs/models/components/chainaavemarkets.js +0 -52
  94. package/dist/commonjs/models/components/chainaavemarkets.js.map +0 -1
  95. package/dist/commonjs/models/components/chainratedata.d.ts +0 -20
  96. package/dist/commonjs/models/components/chainratedata.d.ts.map +0 -1
  97. package/dist/commonjs/models/components/chainratedata.js.map +0 -1
  98. package/dist/commonjs/models/components/maxsupplyapydata.d.ts +0 -21
  99. package/dist/commonjs/models/components/maxsupplyapydata.d.ts.map +0 -1
  100. package/dist/commonjs/models/components/maxsupplyapydata.js +0 -52
  101. package/dist/commonjs/models/components/maxsupplyapydata.js.map +0 -1
  102. package/dist/commonjs/models/components/maxsupplyapymarket.d.ts +0 -21
  103. package/dist/commonjs/models/components/maxsupplyapymarket.d.ts.map +0 -1
  104. package/dist/commonjs/models/components/maxsupplyapymarket.js +0 -52
  105. package/dist/commonjs/models/components/maxsupplyapymarket.js.map +0 -1
  106. package/dist/commonjs/models/operations/v2earnaavetokenrates.d.ts +0 -15
  107. package/dist/commonjs/models/operations/v2earnaavetokenrates.d.ts.map +0 -1
  108. package/dist/commonjs/models/operations/v2earnaavetokenrates.js +0 -49
  109. package/dist/commonjs/models/operations/v2earnaavetokenrates.js.map +0 -1
  110. package/dist/esm/funcs/earnEarnAaveTokenRates.d.ts +0 -19
  111. package/dist/esm/funcs/earnEarnAaveTokenRates.d.ts.map +0 -1
  112. package/dist/esm/funcs/earnEarnAaveTokenRates.js +0 -86
  113. package/dist/esm/funcs/earnEarnAaveTokenRates.js.map +0 -1
  114. package/dist/esm/models/components/aavemarketinfo.d.ts +0 -28
  115. package/dist/esm/models/components/aavemarketinfo.d.ts.map +0 -1
  116. package/dist/esm/models/components/aavemarketinfo.js.map +0 -1
  117. package/dist/esm/models/components/aaveusdcratesresponse.d.ts +0 -30
  118. package/dist/esm/models/components/aaveusdcratesresponse.d.ts.map +0 -1
  119. package/dist/esm/models/components/aaveusdcratesresponse.js +0 -23
  120. package/dist/esm/models/components/aaveusdcratesresponse.js.map +0 -1
  121. package/dist/esm/models/components/chainaavemarkets.d.ts +0 -21
  122. package/dist/esm/models/components/chainaavemarkets.d.ts.map +0 -1
  123. package/dist/esm/models/components/chainaavemarkets.js +0 -15
  124. package/dist/esm/models/components/chainaavemarkets.js.map +0 -1
  125. package/dist/esm/models/components/chainratedata.d.ts +0 -20
  126. package/dist/esm/models/components/chainratedata.d.ts.map +0 -1
  127. package/dist/esm/models/components/chainratedata.js +0 -20
  128. package/dist/esm/models/components/chainratedata.js.map +0 -1
  129. package/dist/esm/models/components/maxsupplyapydata.d.ts +0 -21
  130. package/dist/esm/models/components/maxsupplyapydata.d.ts.map +0 -1
  131. package/dist/esm/models/components/maxsupplyapydata.js +0 -15
  132. package/dist/esm/models/components/maxsupplyapydata.js.map +0 -1
  133. package/dist/esm/models/components/maxsupplyapymarket.d.ts +0 -21
  134. package/dist/esm/models/components/maxsupplyapymarket.d.ts.map +0 -1
  135. package/dist/esm/models/components/maxsupplyapymarket.js +0 -15
  136. package/dist/esm/models/components/maxsupplyapymarket.js.map +0 -1
  137. package/dist/esm/models/operations/v2earnaavetokenrates.d.ts +0 -15
  138. package/dist/esm/models/operations/v2earnaavetokenrates.d.ts.map +0 -1
  139. package/dist/esm/models/operations/v2earnaavetokenrates.js +0 -12
  140. package/dist/esm/models/operations/v2earnaavetokenrates.js.map +0 -1
  141. package/docs/models/components/aavemarketinfo.md +0 -25
  142. package/docs/models/components/aaveusdcratesresponse.md +0 -40
  143. package/docs/models/components/chainaavemarkets.md +0 -21
  144. package/docs/models/components/chainratedata.md +0 -21
  145. package/docs/models/components/maxsupplyapydata.md +0 -24
  146. package/docs/models/components/maxsupplyapymarket.md +0 -26
  147. package/docs/models/operations/v2earnaavetokenratesrequest.md +0 -17
  148. package/src/funcs/earnEarnAaveTokenRates.ts +0 -175
  149. package/src/models/components/aaveusdcratesresponse.ts +0 -62
  150. package/src/models/components/chainaavemarkets.ts +0 -46
  151. package/src/models/components/chainratedata.ts +0 -48
  152. package/src/models/components/maxsupplyapydata.ts +0 -43
  153. package/src/models/components/maxsupplyapymarket.ts +0 -46
  154. package/src/models/operations/v2earnaavetokenrates.ts +0 -36
@@ -1,7 +1,6 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import { earnEarnAaveTokenRates } from "../funcs/earnEarnAaveTokenRates.js";
5
4
  import { earnEarnBundle } from "../funcs/earnEarnBundle.js";
6
5
  import { earnEarnCreateAccount } from "../funcs/earnEarnCreateAccount.js";
7
6
  import { earnEarnListAaveMarkets } from "../funcs/earnEarnListAaveMarkets.js";
@@ -34,22 +33,19 @@ export class Earn extends ClientSDK {
34
33
  return unwrapAsync(earnEarnVaults(this, request, options));
35
34
  }
36
35
  /**
37
- * Get token rates on Aave
36
+ * List aave markets
38
37
  *
39
38
  * @remarks
40
- * This endpoint fetches token rates on Aave across Ethereum, Base, and Arbitrum.
41
- */
42
- async earnAaveTokenRates(request, options) {
43
- return unwrapAsync(earnEarnAaveTokenRates(this, request, options));
44
- }
45
- /**
46
- * List all Aave markets with rates
39
+ * List all aave markets with their supply and borrow rates.
47
40
  *
48
- * @remarks
49
- * List all Aave markets with their supply and borrow rates.
41
+ * Returns rates organized by token symbol, with chain-specific data for each token.
42
+ * Each token includes rates for all chains where it's available, plus information
43
+ * about which chain offers the highest supply APY.
44
+ *
45
+ * APY values are returned in percentage format (e.g., 4.5 means 4.5%). Tokens with
46
+ * zero APY on both supply and borrow are excluded.
50
47
  *
51
- * Returns rates for all supported tokens across Ethereum, Base, and Arbitrum.
52
- * Optionally filter by chain. Uses batch_multicall for efficient RPC usage.
48
+ * Optionally filter by chain.
53
49
  */
54
50
  async earnListAaveMarkets(request, options) {
55
51
  return unwrapAsync(earnEarnListAaveMarkets(this, request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C,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAmC,EACnC,OAAwB;QAExB,OAAO,WAAW,CAAC,YAAY,CAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,UAAU,CACd,OAAmC,EACnC,OAAwB;QAExB,OAAO,WAAW,CAAC,cAAc,CAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ # ChainMarketInfo
2
+
3
+ Rate information for a token on a specific chain.
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { ChainMarketInfo } from "@compass-labs/api-sdk/models/components";
9
+
10
+ let value: ChainMarketInfo = {
11
+ address: "9772 Kozey Knolls",
12
+ supplyApy: "<value>",
13
+ borrowApy: "<value>",
14
+ };
15
+ ```
16
+
17
+ ## Fields
18
+
19
+ | Field | Type | Required | Description |
20
+ | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
21
+ | `address` | *string* | :heavy_check_mark: | Token contract address on this chain. |
22
+ | `supplyApy` | *string* | :heavy_check_mark: | Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%). |
23
+ | `borrowApy` | *string* | :heavy_check_mark: | Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%). |
@@ -1,6 +1,6 @@
1
1
  # ListAaveMarketsResponse
2
2
 
3
- Response containing Aave market rates for all tokens across chains.
3
+ Response containing Aave market rates organized by token symbol.
4
4
 
5
5
  ## Example Usage
6
6
 
@@ -8,25 +8,28 @@ Response containing Aave market rates for all tokens across chains.
8
8
  import { ListAaveMarketsResponse } from "@compass-labs/api-sdk/models/components";
9
9
 
10
10
  let value: ListAaveMarketsResponse = {
11
- chains: [
12
- {
13
- chain: "<value>",
14
- markets: [
15
- {
16
- symbol: "<value>",
11
+ markets: {
12
+ "key": {
13
+ chains: {
14
+ "key": {
17
15
  address: "28502 Cherry Street",
18
16
  supplyApy: "<value>",
19
17
  borrowApy: "<value>",
20
18
  },
21
- ],
19
+ },
20
+ maxSupplyApy: {
21
+ chain: "<value>",
22
+ address: "6878 Goodwin Underpass",
23
+ supplyApy: "<value>",
24
+ borrowApy: "<value>",
25
+ },
22
26
  },
23
- ],
27
+ },
24
28
  };
25
29
  ```
26
30
 
27
31
  ## Fields
28
32
 
29
- | Field | Type | Required | Description |
30
- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
31
- | `chains` | [components.ChainAaveMarkets](../../models/components/chainaavemarkets.md)[] | :heavy_check_mark: | List of chains with their Aave market data. |
32
- | `maxSupplyApy` | [components.MaxSupplyApyMarket](../../models/components/maxsupplyapymarket.md) | :heavy_minus_sign: | The market with the highest supply APY across all queried chains. Only included when multiple chains are queried. |
33
+ | Field | Type | Required | Description |
34
+ | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | `markets` | Record<string, [components.TokenMarketData](../../models/components/tokenmarketdata.md)> | :heavy_check_mark: | Market data keyed by token symbol. Each token contains chain-specific data and information about which chain has the highest supply APY. |
@@ -0,0 +1,25 @@
1
+ # MaxSupplyApyInfo
2
+
3
+ Information about the chain with the highest supply APY for a token.
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { MaxSupplyApyInfo } from "@compass-labs/api-sdk/models/components";
9
+
10
+ let value: MaxSupplyApyInfo = {
11
+ chain: "<value>",
12
+ address: "995 Windler Ways",
13
+ supplyApy: "<value>",
14
+ borrowApy: "<value>",
15
+ };
16
+ ```
17
+
18
+ ## Fields
19
+
20
+ | Field | Type | Required | Description |
21
+ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- |
22
+ | `chain` | *string* | :heavy_check_mark: | Chain name with the highest supply APY for this token. |
23
+ | `address` | *string* | :heavy_check_mark: | Token contract address on the chain with highest supply APY. |
24
+ | `supplyApy` | *string* | :heavy_check_mark: | The highest supply APY for this token across all chains, in percentage. |
25
+ | `borrowApy` | *string* | :heavy_check_mark: | Borrow APY on the chain with the highest supply APY, in percentage. |
@@ -0,0 +1,26 @@
1
+ # TokenMarketData
2
+
3
+ Market data for a single token across all chains.
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { TokenMarketData } from "@compass-labs/api-sdk/models/components";
9
+
10
+ let value: TokenMarketData = {
11
+ chains: {},
12
+ maxSupplyApy: {
13
+ chain: "<value>",
14
+ address: "6878 Goodwin Underpass",
15
+ supplyApy: "<value>",
16
+ borrowApy: "<value>",
17
+ },
18
+ };
19
+ ```
20
+
21
+ ## Fields
22
+
23
+ | Field | Type | Required | Description |
24
+ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
25
+ | `chains` | Record<string, [components.ChainMarketInfo](../../models/components/chainmarketinfo.md)> | :heavy_check_mark: | Market data per chain. Keys are chain names (ethereum, base, arbitrum). |
26
+ | `maxSupplyApy` | [components.MaxSupplyApyInfo](../../models/components/maxsupplyapyinfo.md) | :heavy_check_mark: | Information about the chain with the highest supply APY for a token. |
@@ -6,8 +6,7 @@
6
6
 
7
7
  * [earnPositions](#earnpositions) - List earn positions
8
8
  * [earnVaults](#earnvaults) - List vaults
9
- * [earnAaveTokenRates](#earnaavetokenrates) - Get token rates on Aave
10
- * [earnListAaveMarkets](#earnlistaavemarkets) - List all Aave markets with rates
9
+ * [earnListAaveMarkets](#earnlistaavemarkets) - List aave markets
11
10
  * [earnCreateAccount](#earncreateaccount) - Create earn account
12
11
  * [earnTransfer](#earntransfer) - Transfer tokens to/from account
13
12
  * [earnManage](#earnmanage) - Manage earn position
@@ -178,86 +177,18 @@ run();
178
177
  | errors.HTTPValidationError | 422 | application/json |
179
178
  | errors.APIError | 4XX, 5XX | \*/\* |
180
179
 
181
- ## earnAaveTokenRates
182
-
183
- This endpoint fetches token rates on Aave across Ethereum, Base, and Arbitrum.
184
-
185
- ### Example Usage
186
-
187
- <!-- UsageSnippet language="typescript" operationID="v2_earn_aave_token_rates" method="get" path="/v2/earn/aave_token_rates" -->
188
- ```typescript
189
- import { CompassApiSDK } from "@compass-labs/api-sdk";
190
-
191
- const compassApiSDK = new CompassApiSDK({
192
- apiKeyAuth: "<YOUR_API_KEY_HERE>",
193
- });
194
-
195
- async function run() {
196
- const result = await compassApiSDK.earn.earnAaveTokenRates({
197
- token: "USDC",
198
- });
199
-
200
- console.log(result);
201
- }
202
-
203
- run();
204
- ```
205
-
206
- ### Standalone function
207
-
208
- The standalone function version of this method:
209
-
210
- ```typescript
211
- import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
212
- import { earnEarnAaveTokenRates } from "@compass-labs/api-sdk/funcs/earnEarnAaveTokenRates.js";
213
-
214
- // Use `CompassApiSDKCore` for best tree-shaking performance.
215
- // You can create one instance of it to use across an application.
216
- const compassApiSDK = new CompassApiSDKCore({
217
- apiKeyAuth: "<YOUR_API_KEY_HERE>",
218
- });
219
-
220
- async function run() {
221
- const res = await earnEarnAaveTokenRates(compassApiSDK, {
222
- token: "USDC",
223
- });
224
- if (res.ok) {
225
- const { value: result } = res;
226
- console.log(result);
227
- } else {
228
- console.log("earnEarnAaveTokenRates failed:", res.error);
229
- }
230
- }
231
-
232
- run();
233
- ```
234
-
235
- ### Parameters
236
-
237
- | Parameter | Type | Required | Description |
238
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
239
- | `request` | [operations.V2EarnAaveTokenRatesRequest](../../models/operations/v2earnaavetokenratesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
240
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
241
- | `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. |
242
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
243
-
244
- ### Response
245
-
246
- **Promise\<[components.AaveUsdcRatesResponse](../../models/components/aaveusdcratesresponse.md)\>**
247
-
248
- ### Errors
180
+ ## earnListAaveMarkets
249
181
 
250
- | Error Type | Status Code | Content Type |
251
- | -------------------------- | -------------------------- | -------------------------- |
252
- | errors.HTTPValidationError | 422 | application/json |
253
- | errors.APIError | 4XX, 5XX | \*/\* |
182
+ List all aave markets with their supply and borrow rates.
254
183
 
255
- ## earnListAaveMarkets
184
+ Returns rates organized by token symbol, with chain-specific data for each token.
185
+ Each token includes rates for all chains where it's available, plus information
186
+ about which chain offers the highest supply APY.
256
187
 
257
- List all Aave markets with their supply and borrow rates.
188
+ APY values are returned in percentage format (e.g., 4.5 means 4.5%). Tokens with
189
+ zero APY on both supply and borrow are excluded.
258
190
 
259
- Returns rates for all supported tokens across Ethereum, Base, and Arbitrum.
260
- Optionally filter by chain. Uses batch_multicall for efficient RPC usage.
191
+ Optionally filter by chain.
261
192
 
262
193
  ### Example Usage
263
194
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.1.18-rc.1",
3
+ "version": "2.1.18",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -27,13 +27,19 @@ import { APICall, APIPromise } from "../types/async.js";
27
27
  import { Result } from "../types/fp.js";
28
28
 
29
29
  /**
30
- * List all Aave markets with rates
30
+ * List aave markets
31
31
  *
32
32
  * @remarks
33
- * List all Aave markets with their supply and borrow rates.
33
+ * List all aave markets with their supply and borrow rates.
34
34
  *
35
- * Returns rates for all supported tokens across Ethereum, Base, and Arbitrum.
36
- * Optionally filter by chain. Uses batch_multicall for efficient RPC usage.
35
+ * Returns rates organized by token symbol, with chain-specific data for each token.
36
+ * Each token includes rates for all chains where it's available, plus information
37
+ * about which chain offers the highest supply APY.
38
+ *
39
+ * APY values are returned in percentage format (e.g., 4.5 means 4.5%). Tokens with
40
+ * zero APY on both supply and borrow are excluded.
41
+ *
42
+ * Optionally filter by chain.
37
43
  */
38
44
  export function earnEarnListAaveMarkets(
39
45
  client: CompassApiSDKCore,
@@ -9,34 +9,29 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  /**
12
- * Rate information for a single token on Aave.
12
+ * Rate information for a token on a specific chain.
13
13
  */
14
- export type AaveMarketInfo = {
14
+ export type ChainMarketInfo = {
15
15
  /**
16
- * Token symbol (e.g., 'USDC', 'WETH').
17
- */
18
- symbol: string;
19
- /**
20
- * Token contract address.
16
+ * Token contract address on this chain.
21
17
  */
22
18
  address: string;
23
19
  /**
24
- * Variable rate APY for deposits.
20
+ * Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%).
25
21
  */
26
22
  supplyApy: string;
27
23
  /**
28
- * Variable rate APY for loans.
24
+ * Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%).
29
25
  */
30
26
  borrowApy: string;
31
27
  };
32
28
 
33
29
  /** @internal */
34
- export const AaveMarketInfo$inboundSchema: z.ZodType<
35
- AaveMarketInfo,
30
+ export const ChainMarketInfo$inboundSchema: z.ZodType<
31
+ ChainMarketInfo,
36
32
  z.ZodTypeDef,
37
33
  unknown
38
34
  > = z.object({
39
- symbol: z.string(),
40
35
  address: z.string(),
41
36
  supply_apy: z.string(),
42
37
  borrow_apy: z.string(),
@@ -47,12 +42,12 @@ export const AaveMarketInfo$inboundSchema: z.ZodType<
47
42
  });
48
43
  });
49
44
 
50
- export function aaveMarketInfoFromJSON(
45
+ export function chainMarketInfoFromJSON(
51
46
  jsonString: string,
52
- ): SafeParseResult<AaveMarketInfo, SDKValidationError> {
47
+ ): SafeParseResult<ChainMarketInfo, SDKValidationError> {
53
48
  return safeParse(
54
49
  jsonString,
55
- (x) => AaveMarketInfo$inboundSchema.parse(JSON.parse(x)),
56
- `Failed to parse 'AaveMarketInfo' from JSON`,
50
+ (x) => ChainMarketInfo$inboundSchema.parse(JSON.parse(x)),
51
+ `Failed to parse 'ChainMarketInfo' from JSON`,
57
52
  );
58
53
  }
@@ -8,7 +8,6 @@ export * from "./aaveborrowrequest.js";
8
8
  export * from "./aavehistoricaltransactionsresponse.js";
9
9
  export * from "./aaveliquiditychangeresponse.js";
10
10
  export * from "./aavelooprequest.js";
11
- export * from "./aavemarketinfo.js";
12
11
  export * from "./aaveposition.js";
13
12
  export * from "./aaverateresponse.js";
14
13
  export * from "./aaverepayparams.js";
@@ -20,7 +19,6 @@ export * from "./aavesupplyrequest.js";
20
19
  export * from "./aavesupportedtokenmetadata.js";
21
20
  export * from "./aavesupportedtokensresponse.js";
22
21
  export * from "./aavetokenpriceresponse.js";
23
- export * from "./aaveusdcratesresponse.js";
24
22
  export * from "./aaveuserpositionpertokenresponse.js";
25
23
  export * from "./aaveuserpositionsummaryresponse.js";
26
24
  export * from "./aavevenue.js";
@@ -50,9 +48,8 @@ export * from "./batcheduseroperationsresponse.js";
50
48
  export * from "./borrow.js";
51
49
  export * from "./bundlertransactionresponse.js";
52
50
  export * from "./chain.js";
53
- export * from "./chainaavemarkets.js";
54
51
  export * from "./chaininfo.js";
55
- export * from "./chainratedata.js";
52
+ export * from "./chainmarketinfo.js";
56
53
  export * from "./compassapibackendv1modelsgenericreadresponseportfoliotokenbalance.js";
57
54
  export * from "./compassapibackendv1modelsmorphoreadresponsecheckuserpositionapydata.js";
58
55
  export * from "./compassapibackendv1modelsmorphoreadresponsecheckuserpositionasset.js";
@@ -113,8 +110,7 @@ export * from "./lpbalance.js";
113
110
  export * from "./market.js";
114
111
  export * from "./marketposition.js";
115
112
  export * from "./markettokens.js";
116
- export * from "./maxsupplyapydata.js";
117
- export * from "./maxsupplyapymarket.js";
113
+ export * from "./maxsupplyapyinfo.js";
118
114
  export * from "./mintpreparecompletedresponse.js";
119
115
  export * from "./mintpreparependingresponse.js";
120
116
  export * from "./mintpreparereadyresponse.js";
@@ -196,6 +192,7 @@ export * from "./syposition.js";
196
192
  export * from "./tokenbalanceresponse.js";
197
193
  export * from "./tokenconfig.js";
198
194
  export * from "./tokenlistresponse.js";
195
+ export * from "./tokenmarketdata.js";
199
196
  export * from "./tokenpermissions.js";
200
197
  export * from "./tokenpriceresponse.js";
201
198
  export * from "./tokentransferparams.js";
@@ -3,31 +3,22 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
6
  import { safeParse } from "../../lib/schemas.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
9
  import {
11
- ChainAaveMarkets,
12
- ChainAaveMarkets$inboundSchema,
13
- } from "./chainaavemarkets.js";
14
- import {
15
- MaxSupplyApyMarket,
16
- MaxSupplyApyMarket$inboundSchema,
17
- } from "./maxsupplyapymarket.js";
10
+ TokenMarketData,
11
+ TokenMarketData$inboundSchema,
12
+ } from "./tokenmarketdata.js";
18
13
 
19
14
  /**
20
- * Response containing Aave market rates for all tokens across chains.
15
+ * Response containing Aave market rates organized by token symbol.
21
16
  */
22
17
  export type ListAaveMarketsResponse = {
23
18
  /**
24
- * List of chains with their Aave market data.
25
- */
26
- chains: Array<ChainAaveMarkets>;
27
- /**
28
- * The market with the highest supply APY across all queried chains. Only included when multiple chains are queried.
19
+ * Market data keyed by token symbol. Each token contains chain-specific data and information about which chain has the highest supply APY.
29
20
  */
30
- maxSupplyApy?: MaxSupplyApyMarket | null | undefined;
21
+ markets: { [k: string]: TokenMarketData };
31
22
  };
32
23
 
33
24
  /** @internal */
@@ -36,12 +27,7 @@ export const ListAaveMarketsResponse$inboundSchema: z.ZodType<
36
27
  z.ZodTypeDef,
37
28
  unknown
38
29
  > = z.object({
39
- chains: z.array(ChainAaveMarkets$inboundSchema),
40
- max_supply_apy: z.nullable(MaxSupplyApyMarket$inboundSchema).optional(),
41
- }).transform((v) => {
42
- return remap$(v, {
43
- "max_supply_apy": "maxSupplyApy",
44
- });
30
+ markets: z.record(TokenMarketData$inboundSchema),
45
31
  });
46
32
 
47
33
  export function listAaveMarketsResponseFromJSON(
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Information about the chain with the highest supply APY for a token.
13
+ */
14
+ export type MaxSupplyApyInfo = {
15
+ /**
16
+ * Chain name with the highest supply APY for this token.
17
+ */
18
+ chain: string;
19
+ /**
20
+ * Token contract address on the chain with highest supply APY.
21
+ */
22
+ address: string;
23
+ /**
24
+ * The highest supply APY for this token across all chains, in percentage.
25
+ */
26
+ supplyApy: string;
27
+ /**
28
+ * Borrow APY on the chain with the highest supply APY, in percentage.
29
+ */
30
+ borrowApy: string;
31
+ };
32
+
33
+ /** @internal */
34
+ export const MaxSupplyApyInfo$inboundSchema: z.ZodType<
35
+ MaxSupplyApyInfo,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ chain: z.string(),
40
+ address: z.string(),
41
+ supply_apy: z.string(),
42
+ borrow_apy: z.string(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ "supply_apy": "supplyApy",
46
+ "borrow_apy": "borrowApy",
47
+ });
48
+ });
49
+
50
+ export function maxSupplyApyInfoFromJSON(
51
+ jsonString: string,
52
+ ): SafeParseResult<MaxSupplyApyInfo, SDKValidationError> {
53
+ return safeParse(
54
+ jsonString,
55
+ (x) => MaxSupplyApyInfo$inboundSchema.parse(JSON.parse(x)),
56
+ `Failed to parse 'MaxSupplyApyInfo' from JSON`,
57
+ );
58
+ }
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ChainMarketInfo,
12
+ ChainMarketInfo$inboundSchema,
13
+ } from "./chainmarketinfo.js";
14
+ import {
15
+ MaxSupplyApyInfo,
16
+ MaxSupplyApyInfo$inboundSchema,
17
+ } from "./maxsupplyapyinfo.js";
18
+
19
+ /**
20
+ * Market data for a single token across all chains.
21
+ */
22
+ export type TokenMarketData = {
23
+ /**
24
+ * Market data per chain. Keys are chain names (ethereum, base, arbitrum).
25
+ */
26
+ chains: { [k: string]: ChainMarketInfo };
27
+ /**
28
+ * Information about the chain with the highest supply APY for a token.
29
+ */
30
+ maxSupplyApy: MaxSupplyApyInfo;
31
+ };
32
+
33
+ /** @internal */
34
+ export const TokenMarketData$inboundSchema: z.ZodType<
35
+ TokenMarketData,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ chains: z.record(ChainMarketInfo$inboundSchema),
40
+ max_supply_apy: MaxSupplyApyInfo$inboundSchema,
41
+ }).transform((v) => {
42
+ return remap$(v, {
43
+ "max_supply_apy": "maxSupplyApy",
44
+ });
45
+ });
46
+
47
+ export function tokenMarketDataFromJSON(
48
+ jsonString: string,
49
+ ): SafeParseResult<TokenMarketData, SDKValidationError> {
50
+ return safeParse(
51
+ jsonString,
52
+ (x) => TokenMarketData$inboundSchema.parse(JSON.parse(x)),
53
+ `Failed to parse 'TokenMarketData' from JSON`,
54
+ );
55
+ }
@@ -41,7 +41,6 @@ export * from "./v1uniswapquotesellexactly.js";
41
41
  export * from "./v1vaultsvault.js";
42
42
  export * from "./v1wildcatmarket.js";
43
43
  export * from "./v2cctpmint.js";
44
- export * from "./v2earnaavetokenrates.js";
45
44
  export * from "./v2earnlistaavemarkets.js";
46
45
  export * from "./v2earnpositions.js";
47
46
  export * from "./v2earnvaults.js";