@compass-labs/api-sdk 2.2.105 → 2.2.107

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 (164) hide show
  1. package/README.md +6 -4
  2. package/codeSamples_typescript.yaml +7 -1
  3. package/dist/commonjs/funcs/creditCreditSwap.d.ts +23 -0
  4. package/dist/commonjs/funcs/creditCreditSwap.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/creditCreditSwap.js +124 -0
  6. package/dist/commonjs/funcs/creditCreditSwap.js.map +1 -0
  7. package/dist/commonjs/funcs/earnEarnSwap.d.ts +7 -7
  8. package/dist/commonjs/funcs/earnEarnSwap.js +7 -7
  9. package/dist/commonjs/lib/config.d.ts +2 -2
  10. package/dist/commonjs/lib/config.js +2 -2
  11. package/dist/commonjs/lib/config.js.map +1 -1
  12. package/dist/commonjs/models/components/chain.d.ts +1 -0
  13. package/dist/commonjs/models/components/chain.d.ts.map +1 -1
  14. package/dist/commonjs/models/components/chain.js +1 -0
  15. package/dist/commonjs/models/components/chain.js.map +1 -1
  16. package/dist/commonjs/models/components/creditswaprequest.d.ts +112 -0
  17. package/dist/commonjs/models/components/creditswaprequest.d.ts.map +1 -0
  18. package/dist/commonjs/models/components/creditswaprequest.js +101 -0
  19. package/dist/commonjs/models/components/creditswaprequest.js.map +1 -0
  20. package/dist/commonjs/models/components/creditswapresponse.d.ts +51 -0
  21. package/dist/commonjs/models/components/creditswapresponse.d.ts.map +1 -0
  22. package/dist/commonjs/models/components/creditswapresponse.js +74 -0
  23. package/dist/commonjs/models/components/creditswapresponse.js.map +1 -0
  24. package/dist/commonjs/models/components/earnswaprequest.d.ts +2 -3
  25. package/dist/commonjs/models/components/earnswaprequest.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/earnswaprequest.js.map +1 -1
  27. package/dist/commonjs/models/components/eulermarket.d.ts +12 -0
  28. package/dist/commonjs/models/components/eulermarket.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/eulermarket.js +6 -0
  30. package/dist/commonjs/models/components/eulermarket.js.map +1 -1
  31. package/dist/commonjs/models/components/eulermarketcollateral.d.ts +4 -0
  32. package/dist/commonjs/models/components/eulermarketcollateral.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/eulermarketcollateral.js +2 -0
  34. package/dist/commonjs/models/components/eulermarketcollateral.js.map +1 -1
  35. package/dist/commonjs/models/components/index.d.ts +2 -0
  36. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/index.js +2 -0
  38. package/dist/commonjs/models/components/index.js.map +1 -1
  39. package/dist/commonjs/models/operations/v2earnswapquote.d.ts +1 -0
  40. package/dist/commonjs/models/operations/v2earnswapquote.d.ts.map +1 -1
  41. package/dist/commonjs/models/operations/v2earnswapquote.js +1 -0
  42. package/dist/commonjs/models/operations/v2earnswapquote.js.map +1 -1
  43. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.d.ts +1 -0
  44. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.d.ts.map +1 -1
  45. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.js +1 -0
  46. package/dist/commonjs/models/operations/v2tokenizedassetsbalances.js.map +1 -1
  47. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.d.ts +1 -0
  48. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.d.ts.map +1 -1
  49. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.js +1 -0
  50. package/dist/commonjs/models/operations/v2tokenizedassetsmarketssymbol.js.map +1 -1
  51. package/dist/commonjs/models/operations/v2tokenizedassetspositions.d.ts +1 -0
  52. package/dist/commonjs/models/operations/v2tokenizedassetspositions.d.ts.map +1 -1
  53. package/dist/commonjs/models/operations/v2tokenizedassetspositions.js +1 -0
  54. package/dist/commonjs/models/operations/v2tokenizedassetspositions.js.map +1 -1
  55. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.d.ts +1 -0
  56. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.d.ts.map +1 -1
  57. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.js +1 -0
  58. package/dist/commonjs/models/operations/v2tokenizedassetsredemptions.js.map +1 -1
  59. package/dist/commonjs/sdk/credit.d.ts +12 -0
  60. package/dist/commonjs/sdk/credit.d.ts.map +1 -1
  61. package/dist/commonjs/sdk/credit.js +15 -0
  62. package/dist/commonjs/sdk/credit.js.map +1 -1
  63. package/dist/commonjs/sdk/earn.d.ts +7 -7
  64. package/dist/commonjs/sdk/earn.js +7 -7
  65. package/dist/esm/funcs/creditCreditSwap.d.ts +23 -0
  66. package/dist/esm/funcs/creditCreditSwap.d.ts.map +1 -0
  67. package/dist/esm/funcs/creditCreditSwap.js +88 -0
  68. package/dist/esm/funcs/creditCreditSwap.js.map +1 -0
  69. package/dist/esm/funcs/earnEarnSwap.d.ts +7 -7
  70. package/dist/esm/funcs/earnEarnSwap.js +7 -7
  71. package/dist/esm/lib/config.d.ts +2 -2
  72. package/dist/esm/lib/config.js +2 -2
  73. package/dist/esm/lib/config.js.map +1 -1
  74. package/dist/esm/models/components/chain.d.ts +1 -0
  75. package/dist/esm/models/components/chain.d.ts.map +1 -1
  76. package/dist/esm/models/components/chain.js +1 -0
  77. package/dist/esm/models/components/chain.js.map +1 -1
  78. package/dist/esm/models/components/creditswaprequest.d.ts +112 -0
  79. package/dist/esm/models/components/creditswaprequest.d.ts.map +1 -0
  80. package/dist/esm/models/components/creditswaprequest.js +62 -0
  81. package/dist/esm/models/components/creditswaprequest.js.map +1 -0
  82. package/dist/esm/models/components/creditswapresponse.d.ts +51 -0
  83. package/dist/esm/models/components/creditswapresponse.d.ts.map +1 -0
  84. package/dist/esm/models/components/creditswapresponse.js +37 -0
  85. package/dist/esm/models/components/creditswapresponse.js.map +1 -0
  86. package/dist/esm/models/components/earnswaprequest.d.ts +2 -3
  87. package/dist/esm/models/components/earnswaprequest.d.ts.map +1 -1
  88. package/dist/esm/models/components/earnswaprequest.js.map +1 -1
  89. package/dist/esm/models/components/eulermarket.d.ts +12 -0
  90. package/dist/esm/models/components/eulermarket.d.ts.map +1 -1
  91. package/dist/esm/models/components/eulermarket.js +6 -0
  92. package/dist/esm/models/components/eulermarket.js.map +1 -1
  93. package/dist/esm/models/components/eulermarketcollateral.d.ts +4 -0
  94. package/dist/esm/models/components/eulermarketcollateral.d.ts.map +1 -1
  95. package/dist/esm/models/components/eulermarketcollateral.js +2 -0
  96. package/dist/esm/models/components/eulermarketcollateral.js.map +1 -1
  97. package/dist/esm/models/components/index.d.ts +2 -0
  98. package/dist/esm/models/components/index.d.ts.map +1 -1
  99. package/dist/esm/models/components/index.js +2 -0
  100. package/dist/esm/models/components/index.js.map +1 -1
  101. package/dist/esm/models/operations/v2earnswapquote.d.ts +1 -0
  102. package/dist/esm/models/operations/v2earnswapquote.d.ts.map +1 -1
  103. package/dist/esm/models/operations/v2earnswapquote.js +1 -0
  104. package/dist/esm/models/operations/v2earnswapquote.js.map +1 -1
  105. package/dist/esm/models/operations/v2tokenizedassetsbalances.d.ts +1 -0
  106. package/dist/esm/models/operations/v2tokenizedassetsbalances.d.ts.map +1 -1
  107. package/dist/esm/models/operations/v2tokenizedassetsbalances.js +1 -0
  108. package/dist/esm/models/operations/v2tokenizedassetsbalances.js.map +1 -1
  109. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.d.ts +1 -0
  110. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.d.ts.map +1 -1
  111. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.js +1 -0
  112. package/dist/esm/models/operations/v2tokenizedassetsmarketssymbol.js.map +1 -1
  113. package/dist/esm/models/operations/v2tokenizedassetspositions.d.ts +1 -0
  114. package/dist/esm/models/operations/v2tokenizedassetspositions.d.ts.map +1 -1
  115. package/dist/esm/models/operations/v2tokenizedassetspositions.js +1 -0
  116. package/dist/esm/models/operations/v2tokenizedassetspositions.js.map +1 -1
  117. package/dist/esm/models/operations/v2tokenizedassetsredemptions.d.ts +1 -0
  118. package/dist/esm/models/operations/v2tokenizedassetsredemptions.d.ts.map +1 -1
  119. package/dist/esm/models/operations/v2tokenizedassetsredemptions.js +1 -0
  120. package/dist/esm/models/operations/v2tokenizedassetsredemptions.js.map +1 -1
  121. package/dist/esm/sdk/credit.d.ts +12 -0
  122. package/dist/esm/sdk/credit.d.ts.map +1 -1
  123. package/dist/esm/sdk/credit.js +15 -0
  124. package/dist/esm/sdk/credit.js.map +1 -1
  125. package/dist/esm/sdk/earn.d.ts +7 -7
  126. package/dist/esm/sdk/earn.js +7 -7
  127. package/docs/models/components/chain.md +1 -1
  128. package/docs/models/components/creditswaprequest.md +36 -0
  129. package/docs/models/components/creditswaprequestamountin.md +19 -0
  130. package/docs/models/components/creditswaprequestchain.md +17 -0
  131. package/docs/models/components/creditswaprequestpricing.md +17 -0
  132. package/docs/models/components/creditswaprequestslippage.md +19 -0
  133. package/docs/models/components/creditswapresponse.md +25 -0
  134. package/docs/models/components/creditswapresponseswapprovider.md +17 -0
  135. package/docs/models/components/earnswaprequest.md +2 -3
  136. package/docs/models/components/eulermarket.md +21 -18
  137. package/docs/models/components/eulermarketcollateral.md +11 -10
  138. package/docs/models/operations/v2earnswapquotechain.md +1 -1
  139. package/docs/models/operations/v2tokenizedassetsbalanceschain.md +2 -2
  140. package/docs/models/operations/v2tokenizedassetsmarketssymbolchain.md +2 -2
  141. package/docs/models/operations/v2tokenizedassetspositionschain.md +1 -1
  142. package/docs/models/operations/v2tokenizedassetsredemptionschain.md +1 -1
  143. package/docs/sdks/credit/README.md +94 -0
  144. package/docs/sdks/earn/README.md +7 -7
  145. package/docs/sdks/tokenizedassets/README.md +2 -2
  146. package/openapi_prepped_for_speakeasy.json +272 -3
  147. package/package.json +1 -1
  148. package/src/funcs/creditCreditSwap.ts +176 -0
  149. package/src/funcs/earnEarnSwap.ts +7 -7
  150. package/src/lib/config.ts +2 -2
  151. package/src/models/components/chain.ts +1 -0
  152. package/src/models/components/creditswaprequest.ts +186 -0
  153. package/src/models/components/creditswapresponse.ts +99 -0
  154. package/src/models/components/earnswaprequest.ts +2 -3
  155. package/src/models/components/eulermarket.ts +18 -0
  156. package/src/models/components/eulermarketcollateral.ts +6 -0
  157. package/src/models/components/index.ts +2 -0
  158. package/src/models/operations/v2earnswapquote.ts +1 -0
  159. package/src/models/operations/v2tokenizedassetsbalances.ts +1 -0
  160. package/src/models/operations/v2tokenizedassetsmarketssymbol.ts +1 -0
  161. package/src/models/operations/v2tokenizedassetspositions.ts +1 -0
  162. package/src/models/operations/v2tokenizedassetsredemptions.ts +1 -0
  163. package/src/sdk/credit.ts +23 -0
  164. package/src/sdk/earn.ts +7 -7
@@ -15,6 +15,7 @@
15
15
  * [creditUnloop](#creditunloop) - Unwind a leveraged loop
16
16
  * [creditRebalance](#creditrebalance) - Rebalance the leveraged credit book
17
17
  * [creditTransfer](#credittransfer) - Transfer tokens to/from Credit Account
18
+ * [creditSwap](#creditswap) - Swap tokens
18
19
  * [creditRepay](#creditrepay) - Repay debt and withdraw collateral
19
20
  * [creditBundle](#creditbundle) - Execute multiple credit actions
20
21
 
@@ -1009,6 +1010,99 @@ run();
1009
1010
  | errors.HTTPValidationError | 422 | application/json |
1010
1011
  | errors.APIError | 4XX, 5XX | \*/\* |
1011
1012
 
1013
+ ## creditSwap
1014
+
1015
+ Swap one token for another inside a Credit Account.
1016
+
1017
+ Exchanges tokens the Credit Account already holds in a single atomic
1018
+ transaction, so idle or borrowed balances can be converted without moving
1019
+ funds out first. Returns an unsigned transaction to sign, the expected
1020
+ output amount, and which route priced the swap.
1021
+
1022
+ ### Example Usage
1023
+
1024
+ <!-- UsageSnippet language="typescript" operationID="v2_credit_swap" method="post" path="/v2/credit/swap" -->
1025
+ ```typescript
1026
+ import { CompassApiSDK } from "@compass-labs/api-sdk";
1027
+
1028
+ const compassApiSDK = new CompassApiSDK({
1029
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
1030
+ });
1031
+
1032
+ async function run() {
1033
+ const result = await compassApiSDK.credit.creditSwap({
1034
+ tokenIn: "USDC",
1035
+ tokenOut: "USDT",
1036
+ amountIn: "0.01",
1037
+ slippage: "0.5",
1038
+ owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
1039
+ chain: "base",
1040
+ gasSponsorship: false,
1041
+ pricing: "auto",
1042
+ });
1043
+
1044
+ console.log(result);
1045
+ }
1046
+
1047
+ run();
1048
+ ```
1049
+
1050
+ ### Standalone function
1051
+
1052
+ The standalone function version of this method:
1053
+
1054
+ ```typescript
1055
+ import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
1056
+ import { creditCreditSwap } from "@compass-labs/api-sdk/funcs/creditCreditSwap.js";
1057
+
1058
+ // Use `CompassApiSDKCore` for best tree-shaking performance.
1059
+ // You can create one instance of it to use across an application.
1060
+ const compassApiSDK = new CompassApiSDKCore({
1061
+ apiKeyAuth: "<YOUR_API_KEY_HERE>",
1062
+ });
1063
+
1064
+ async function run() {
1065
+ const res = await creditCreditSwap(compassApiSDK, {
1066
+ tokenIn: "USDC",
1067
+ tokenOut: "USDT",
1068
+ amountIn: "0.01",
1069
+ slippage: "0.5",
1070
+ owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
1071
+ chain: "base",
1072
+ gasSponsorship: false,
1073
+ pricing: "auto",
1074
+ });
1075
+ if (res.ok) {
1076
+ const { value: result } = res;
1077
+ console.log(result);
1078
+ } else {
1079
+ console.log("creditCreditSwap failed:", res.error);
1080
+ }
1081
+ }
1082
+
1083
+ run();
1084
+ ```
1085
+
1086
+ ### Parameters
1087
+
1088
+ | Parameter | Type | Required | Description |
1089
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1090
+ | `request` | [components.CreditSwapRequest](../../models/components/creditswaprequest.md) | :heavy_check_mark: | The request object to use for the request. |
1091
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1092
+ | `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. |
1093
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1094
+
1095
+ ### Response
1096
+
1097
+ **Promise\<[components.CreditSwapResponse](../../models/components/creditswapresponse.md)\>**
1098
+
1099
+ ### Errors
1100
+
1101
+ | Error Type | Status Code | Content Type |
1102
+ | -------------------------- | -------------------------- | -------------------------- |
1103
+ | errors.HTTPValidationError | 422 | application/json |
1104
+ | errors.APIError | 4XX, 5XX | \*/\* |
1105
+
1012
1106
  ## creditRepay
1013
1107
 
1014
1108
  Repay an Aave debt and withdraw collateral from a Credit Account.
@@ -14,7 +14,7 @@
14
14
  * [earnCreateAccount](#earncreateaccount) - Create earn account
15
15
  * [earnTransfer](#earntransfer) - Transfer tokens to/from account
16
16
  * [earnManage](#earnmanage) - Manage earn position
17
- * [earnSwap](#earnswap) - Swap tokens within Earn Account
17
+ * [earnSwap](#earnswap) - Swap tokens
18
18
  * [earnBundle](#earnbundle) - Execute multiple earn actions
19
19
 
20
20
  ## earnPositions
@@ -899,13 +899,13 @@ run();
899
899
 
900
900
  ## earnSwap
901
901
 
902
- Swap tokens within an Earn Account.
902
+ Swap one token for another inside an Earn Account.
903
903
 
904
- Use this endpoint to exchange one token for another without transferring funds out of the Earn Account.
905
-
906
- The swap executes atomically within the Earn Account and can be combined with other actions using the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions). For example, swap ETH to USDC, then deposit USDC into a vault—all in one transaction.
907
-
908
- Returns either an unsigned transaction (when `gas_sponsorship=false`) or EIP-712 typed data for off-chain signing (when `gas_sponsorship=true`). For gas-sponsored swaps, submit the signed typed data to `/gas_sponsorship/prepare`.
904
+ Exchanges tokens the Earn Account already holds in a single atomic
905
+ transaction, so funds never leave it, and can be chained with other actions
906
+ through the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions)
907
+ (for example, swap ETH to USDC and deposit the USDC into a vault at once).
908
+ Returns an unsigned transaction to sign and the expected output amount.
909
909
 
910
910
  ### Example Usage
911
911
 
@@ -1265,7 +1265,7 @@ async function run() {
1265
1265
  amountIn: 8512.47,
1266
1266
  slippage: "0.5",
1267
1267
  owner: "<value>",
1268
- chain: "arbitrum",
1268
+ chain: "hyperevm",
1269
1269
  gasSponsorship: false,
1270
1270
  fee: {
1271
1271
  recipient: "<value>",
@@ -1301,7 +1301,7 @@ async function run() {
1301
1301
  amountIn: 8512.47,
1302
1302
  slippage: "0.5",
1303
1303
  owner: "<value>",
1304
- chain: "arbitrum",
1304
+ chain: "hyperevm",
1305
1305
  gasSponsorship: false,
1306
1306
  fee: {
1307
1307
  recipient: "<value>",
@@ -5374,6 +5374,7 @@
5374
5374
  "hyperevm",
5375
5375
  "tempo",
5376
5376
  "bsc",
5377
+ "robinhood",
5377
5378
  "ethereum_sepolia"
5378
5379
  ],
5379
5380
  "title": "Chain",
@@ -5684,8 +5685,8 @@
5684
5685
  "tags": [
5685
5686
  "Earn"
5686
5687
  ],
5687
- "summary": "Swap tokens within Earn Account",
5688
- "description": "Swap tokens within an Earn Account.\n\nUse this endpoint to exchange one token for another without transferring funds out of the Earn Account.\n\nThe swap executes atomically within the Earn Account and can be combined with other actions using the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions). For example, swap ETH to USDC, then deposit USDC into a vault\u2014all in one transaction.\n\nReturns either an unsigned transaction (when `gas_sponsorship=false`) or EIP-712 typed data for off-chain signing (when `gas_sponsorship=true`). For gas-sponsored swaps, submit the signed typed data to `/gas_sponsorship/prepare`.",
5688
+ "summary": "Swap tokens",
5689
+ "description": "Swap one token for another inside an Earn Account.\n\nExchanges tokens the Earn Account already holds in a single atomic\ntransaction, so funds never leave it, and can be chained with other actions\nthrough the [bundle endpoint](https://docs.compasslabs.ai/v2/api-reference/earn/execute-multiple-earn-actions)\n(for example, swap ETH to USDC and deposit the USDC into a vault at once).\nReturns an unsigned transaction to sign and the expected output amount.",
5689
5690
  "operationId": "v2_earn_swap",
5690
5691
  "requestBody": {
5691
5692
  "content": {
@@ -6498,6 +6499,49 @@
6498
6499
  "x-speakeasy-name-override": "credit_transfer"
6499
6500
  }
6500
6501
  },
6502
+ "/v2/credit/swap": {
6503
+ "post": {
6504
+ "tags": [
6505
+ "Credit"
6506
+ ],
6507
+ "summary": "Swap tokens",
6508
+ "description": "Swap one token for another inside a Credit Account.\n\nExchanges tokens the Credit Account already holds in a single atomic\ntransaction, so idle or borrowed balances can be converted without moving\nfunds out first. Returns an unsigned transaction to sign, the expected\noutput amount, and which route priced the swap.",
6509
+ "operationId": "v2_credit_swap",
6510
+ "requestBody": {
6511
+ "content": {
6512
+ "application/json": {
6513
+ "schema": {
6514
+ "$ref": "#/components/schemas/CreditSwapRequest"
6515
+ }
6516
+ }
6517
+ },
6518
+ "required": true
6519
+ },
6520
+ "responses": {
6521
+ "200": {
6522
+ "description": "Successful Response",
6523
+ "content": {
6524
+ "application/json": {
6525
+ "schema": {
6526
+ "$ref": "#/components/schemas/CreditSwapResponse"
6527
+ }
6528
+ }
6529
+ }
6530
+ },
6531
+ "422": {
6532
+ "description": "Validation Error",
6533
+ "content": {
6534
+ "application/json": {
6535
+ "schema": {
6536
+ "$ref": "#/components/schemas/HTTPValidationError"
6537
+ }
6538
+ }
6539
+ }
6540
+ }
6541
+ },
6542
+ "x-speakeasy-name-override": "credit_swap"
6543
+ }
6544
+ },
6501
6545
  "/v2/credit/repay": {
6502
6546
  "post": {
6503
6547
  "tags": [
@@ -7588,6 +7632,7 @@
7588
7632
  "hyperevm",
7589
7633
  "tempo",
7590
7634
  "bsc",
7635
+ "robinhood",
7591
7636
  "ethereum_sepolia"
7592
7637
  ],
7593
7638
  "title": "Chain",
@@ -7718,6 +7763,7 @@
7718
7763
  "hyperevm",
7719
7764
  "tempo",
7720
7765
  "bsc",
7766
+ "robinhood",
7721
7767
  "ethereum_sepolia"
7722
7768
  ],
7723
7769
  "title": "Chain",
@@ -7804,6 +7850,7 @@
7804
7850
  "hyperevm",
7805
7851
  "tempo",
7806
7852
  "bsc",
7853
+ "robinhood",
7807
7854
  "ethereum_sepolia"
7808
7855
  ],
7809
7856
  "title": "Chain",
@@ -7944,6 +7991,7 @@
7944
7991
  "hyperevm",
7945
7992
  "tempo",
7946
7993
  "bsc",
7994
+ "robinhood",
7947
7995
  "ethereum_sepolia"
7948
7996
  ],
7949
7997
  "title": "Chain",
@@ -11656,6 +11704,7 @@
11656
11704
  "hyperevm",
11657
11705
  "tempo",
11658
11706
  "bsc",
11707
+ "robinhood",
11659
11708
  "ethereum_sepolia"
11660
11709
  ],
11661
11710
  "title": "Chain",
@@ -13914,6 +13963,178 @@
13914
13963
  "title": "CreditSupplyParams",
13915
13964
  "description": "Supply collateral to Aave via Credit Account."
13916
13965
  },
13966
+ "CreditSwapRequest": {
13967
+ "properties": {
13968
+ "action_type": {
13969
+ "type": "string",
13970
+ "const": "V2_SWAP",
13971
+ "title": "Action Type",
13972
+ "description": "Action type identifier for swap operations.",
13973
+ "example": "V2_SWAP"
13974
+ },
13975
+ "token_in": {
13976
+ "type": "string",
13977
+ "title": "Token",
13978
+ "description": "Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address.",
13979
+ "example": "USDC"
13980
+ },
13981
+ "token_out": {
13982
+ "type": "string",
13983
+ "title": "Token",
13984
+ "description": "Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address.",
13985
+ "example": "USDT"
13986
+ },
13987
+ "amount_in": {
13988
+ "anyOf": [
13989
+ {
13990
+ "type": "number",
13991
+ "exclusiveMinimum": 0.0
13992
+ },
13993
+ {
13994
+ "type": "string",
13995
+ "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
13996
+ }
13997
+ ],
13998
+ "title": "Amount In",
13999
+ "description": "Human-readable amount of `token_in` to swap (token units, not wei).",
14000
+ "example": "0.01"
14001
+ },
14002
+ "slippage": {
14003
+ "anyOf": [
14004
+ {
14005
+ "type": "number",
14006
+ "maximum": 10.0,
14007
+ "minimum": 0.0
14008
+ },
14009
+ {
14010
+ "type": "string",
14011
+ "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
14012
+ }
14013
+ ],
14014
+ "title": "Slippage",
14015
+ "description": "Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Bounds the market route only; a firm quote fills exactly and ignores it.",
14016
+ "example": "0.5"
14017
+ },
14018
+ "owner": {
14019
+ "type": "string",
14020
+ "title": "Owner",
14021
+ "description": "The owner's wallet address. Their Credit Account must already exist (create it with `/v2/credit/create_account`) and hold `token_in` (deposit with `/v2/credit/transfer`).",
14022
+ "example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
14023
+ },
14024
+ "chain": {
14025
+ "type": "string",
14026
+ "enum": [
14027
+ "arbitrum",
14028
+ "base",
14029
+ "bsc",
14030
+ "ethereum",
14031
+ "hyperevm",
14032
+ "tempo"
14033
+ ],
14034
+ "title": "Chain",
14035
+ "description": "Target blockchain network where the swap will execute.",
14036
+ "example": "base"
14037
+ },
14038
+ "gas_sponsorship": {
14039
+ "type": "boolean",
14040
+ "title": "Gas Sponsorship",
14041
+ "description": "Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Gas-sponsored builds always execute at market rate.",
14042
+ "example": false
14043
+ },
14044
+ "pricing": {
14045
+ "type": "string",
14046
+ "enum": [
14047
+ "auto",
14048
+ "firm",
14049
+ "market"
14050
+ ],
14051
+ "title": "Pricing",
14052
+ "description": "Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).",
14053
+ "example": "auto"
14054
+ }
14055
+ },
14056
+ "type": "object",
14057
+ "required": [
14058
+ "token_in",
14059
+ "token_out",
14060
+ "amount_in",
14061
+ "owner",
14062
+ "chain"
14063
+ ],
14064
+ "title": "CreditSwapRequest",
14065
+ "description": "Swap one token held in the Credit Account for another, in a single\natomic transaction, at a firm quote where one covers the pair and at market\nrate otherwise.",
14066
+ "example": {
14067
+ "owner": "0x06A9aF046187895AcFc7258450B15397CAc67400",
14068
+ "chain": "base",
14069
+ "token_in": "USDC",
14070
+ "token_out": "USDT",
14071
+ "amount_in": "0.01",
14072
+ "slippage": "0.5",
14073
+ "gas_sponsorship": false,
14074
+ "pricing": "auto"
14075
+ }
14076
+ },
14077
+ "CreditSwapResponse": {
14078
+ "properties": {
14079
+ "transaction": {
14080
+ "anyOf": [
14081
+ {
14082
+ "$ref": "#/components/schemas/UnsignedTransaction"
14083
+ },
14084
+ {
14085
+ "type": "null"
14086
+ }
14087
+ ],
14088
+ "description": "Unsigned transaction for direct execution. Present when gas_sponsorship=false."
14089
+ },
14090
+ "eip_712": {
14091
+ "anyOf": [
14092
+ {
14093
+ "$ref": "#/components/schemas/BatchedSafeOperationsResponse-Output"
14094
+ },
14095
+ {
14096
+ "type": "null"
14097
+ }
14098
+ ],
14099
+ "description": "EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true."
14100
+ },
14101
+ "estimated_amount_out": {
14102
+ "type": "string",
14103
+ "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
14104
+ "title": "Estimated Amount Out",
14105
+ "description": "Estimated amount of output token received from the swap. Exact on firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits."
14106
+ },
14107
+ "swap_provider": {
14108
+ "type": "string",
14109
+ "enum": [
14110
+ "market",
14111
+ "firm"
14112
+ ],
14113
+ "title": "Swap Provider",
14114
+ "description": "Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.",
14115
+ "example": "market"
14116
+ },
14117
+ "quote_expires_at": {
14118
+ "anyOf": [
14119
+ {
14120
+ "type": "string",
14121
+ "format": "date-time"
14122
+ },
14123
+ {
14124
+ "type": "null"
14125
+ }
14126
+ ],
14127
+ "title": "Quote Expires At",
14128
+ "description": "Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds."
14129
+ }
14130
+ },
14131
+ "type": "object",
14132
+ "required": [
14133
+ "estimated_amount_out"
14134
+ ],
14135
+ "title": "CreditSwapResponse",
14136
+ "description": "The swap transaction to sign, plus which route priced it and how long\nthat price holds."
14137
+ },
13917
14138
  "CreditTransferRequest": {
13918
14139
  "properties": {
13919
14140
  "owner": {
@@ -15479,7 +15700,7 @@
15479
15700
  "chain"
15480
15701
  ],
15481
15702
  "title": "EarnSwapRequest",
15482
- "description": "Request model for swap endpoint.\n\nInherits swap params and adds context fields (owner, chain, gas_sponsorship).",
15703
+ "description": "Swap one token held in the Earn Account for another, in a single atomic\ntransaction.",
15483
15704
  "example": {
15484
15705
  "owner": "0x06A9aF046187895AcFc7258450B15397CAc67400",
15485
15706
  "chain": "base",
@@ -16307,6 +16528,18 @@
16307
16528
  "title": "Supply Apy",
16308
16529
  "description": "Current supply APY for this market (yield for supplying the asset), in percentage (e.g. 3.45 means 3.45%). Null if the rate is unavailable."
16309
16530
  },
16531
+ "intrinsic_apy": {
16532
+ "anyOf": [
16533
+ {
16534
+ "type": "string"
16535
+ },
16536
+ {
16537
+ "type": "null"
16538
+ }
16539
+ ],
16540
+ "title": "Intrinsic Apy",
16541
+ "description": "What the borrowable asset earns inside its own price, in percentage, trailing 7 days. Debt owed in such a token grows by this on top of borrow_apy \u2014 a borrower's true cost is their sum. Null means unmeasured, NOT zero."
16542
+ },
16310
16543
  "available_liquidity": {
16311
16544
  "type": "string",
16312
16545
  "title": "Available Liquidity",
@@ -16327,6 +16560,30 @@
16327
16560
  "title": "Utilization",
16328
16561
  "description": "Borrowed share of supplied assets, in percentage 0-100."
16329
16562
  },
16563
+ "tvl_usd": {
16564
+ "anyOf": [
16565
+ {
16566
+ "type": "string"
16567
+ },
16568
+ {
16569
+ "type": "null"
16570
+ }
16571
+ ],
16572
+ "title": "Tvl Usd",
16573
+ "description": "Total asset supplied to this market in USD (total_supply_assets priced by the shared request-time feed). Null when the price feed can't quote the asset \u2014 size in token units instead."
16574
+ },
16575
+ "liquidity_usd": {
16576
+ "anyOf": [
16577
+ {
16578
+ "type": "string"
16579
+ },
16580
+ {
16581
+ "type": "null"
16582
+ }
16583
+ ],
16584
+ "title": "Liquidity Usd",
16585
+ "description": "Asset available to borrow right now in USD (available_liquidity priced by the shared request-time feed; vault cash equals supplied minus borrowed). Null when the price feed can't quote the asset."
16586
+ },
16330
16587
  "supply_cap": {
16331
16588
  "anyOf": [
16332
16589
  {
@@ -16432,6 +16689,18 @@
16432
16689
  ],
16433
16690
  "title": "Supply Apy",
16434
16691
  "description": "Current supply APY earned on this collateral while it backs a loan, in percentage (e.g. 3.5 means 3.5%). Null if the rate is unavailable."
16692
+ },
16693
+ "intrinsic_apy": {
16694
+ "anyOf": [
16695
+ {
16696
+ "type": "string"
16697
+ },
16698
+ {
16699
+ "type": "null"
16700
+ }
16701
+ ],
16702
+ "title": "Intrinsic Apy",
16703
+ "description": "What the collateral token earns inside its own price, in percentage: an ERC-4626 share's vault yield, a staking token's rewards, or an RWA token's NAV accrual, trailing 7 days. Earned on top of supply_apy \u2014 the collateral leg's whole yield is their sum. Null means unmeasured, NOT zero: a plain token (USDC, cbBTC) earns nothing and a yield-bearing one may simply not be indexed yet."
16435
16704
  }
16436
16705
  },
16437
16706
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.105",
3
+ "version": "2.2.107",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {