@compass-labs/api-sdk 2.2.101 → 2.2.103

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 (223) hide show
  1. package/dist/commonjs/funcs/creditCreditBorrow.d.ts +1 -1
  2. package/dist/commonjs/funcs/creditCreditBorrow.js +1 -1
  3. package/dist/commonjs/funcs/creditCreditLoop.d.ts +8 -22
  4. package/dist/commonjs/funcs/creditCreditLoop.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/creditCreditLoop.js +8 -22
  6. package/dist/commonjs/funcs/creditCreditLoop.js.map +1 -1
  7. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts +8 -7
  8. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
  9. package/dist/commonjs/funcs/creditCreditLoopedPositions.js +8 -7
  10. package/dist/commonjs/funcs/creditCreditLoopedPositions.js.map +1 -1
  11. package/dist/commonjs/funcs/creditCreditRebalance.d.ts +11 -34
  12. package/dist/commonjs/funcs/creditCreditRebalance.d.ts.map +1 -1
  13. package/dist/commonjs/funcs/creditCreditRebalance.js +11 -34
  14. package/dist/commonjs/funcs/creditCreditRebalance.js.map +1 -1
  15. package/dist/commonjs/funcs/creditCreditRepay.d.ts +1 -1
  16. package/dist/commonjs/funcs/creditCreditRepay.js +1 -1
  17. package/dist/commonjs/funcs/creditCreditUnloop.d.ts +7 -38
  18. package/dist/commonjs/funcs/creditCreditUnloop.d.ts.map +1 -1
  19. package/dist/commonjs/funcs/creditCreditUnloop.js +7 -38
  20. package/dist/commonjs/funcs/creditCreditUnloop.js.map +1 -1
  21. package/dist/commonjs/lib/config.d.ts +2 -2
  22. package/dist/commonjs/lib/config.js +2 -2
  23. package/dist/commonjs/models/components/accountsummary.d.ts +18 -5
  24. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  26. package/dist/commonjs/models/components/collateralposition.d.ts +18 -5
  27. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  29. package/dist/commonjs/models/components/creditborrowparams.d.ts +18 -5
  30. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  32. package/dist/commonjs/models/components/creditborrowrequest.d.ts +18 -5
  33. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  35. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +18 -5
  36. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  38. package/dist/commonjs/models/components/creditlooprequest.d.ts +27 -14
  39. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/creditlooprequest.js +1 -1
  41. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  42. package/dist/commonjs/models/components/creditloopresponse.d.ts +7 -7
  43. package/dist/commonjs/models/components/creditloopresponse.js +3 -3
  44. package/dist/commonjs/models/components/creditloopresponse.js.map +1 -1
  45. package/dist/commonjs/models/components/creditprotocol.d.ts +36 -10
  46. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/creditprotocol.js +18 -5
  48. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  49. package/dist/commonjs/models/components/creditrepayparams.d.ts +18 -5
  50. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  52. package/dist/commonjs/models/components/creditrepayrequest.d.ts +18 -5
  53. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  54. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  55. package/dist/commonjs/models/components/creditsupplyparams.d.ts +18 -5
  56. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  58. package/dist/commonjs/models/components/creditunlooprequest.d.ts +23 -10
  59. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  60. package/dist/commonjs/models/components/creditunlooprequest.js +1 -1
  61. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  62. package/dist/commonjs/models/components/creditunloopresponse.d.ts +7 -7
  63. package/dist/commonjs/models/components/creditunloopresponse.js +3 -3
  64. package/dist/commonjs/models/components/creditunloopresponse.js.map +1 -1
  65. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +18 -5
  66. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  67. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  68. package/dist/commonjs/models/components/debtposition.d.ts +18 -5
  69. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  70. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  71. package/dist/commonjs/models/components/loopedposition.d.ts +18 -5
  72. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  74. package/dist/commonjs/models/components/rebalancetarget.d.ts +18 -5
  75. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  76. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  77. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +18 -5
  78. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  79. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  80. package/dist/commonjs/models/components/swapinfo.d.ts +2 -2
  81. package/dist/commonjs/sdk/credit.d.ts +44 -111
  82. package/dist/commonjs/sdk/credit.d.ts.map +1 -1
  83. package/dist/commonjs/sdk/credit.js +44 -111
  84. package/dist/commonjs/sdk/credit.js.map +1 -1
  85. package/dist/esm/funcs/creditCreditBorrow.d.ts +1 -1
  86. package/dist/esm/funcs/creditCreditBorrow.js +1 -1
  87. package/dist/esm/funcs/creditCreditLoop.d.ts +8 -22
  88. package/dist/esm/funcs/creditCreditLoop.d.ts.map +1 -1
  89. package/dist/esm/funcs/creditCreditLoop.js +8 -22
  90. package/dist/esm/funcs/creditCreditLoop.js.map +1 -1
  91. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts +8 -7
  92. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
  93. package/dist/esm/funcs/creditCreditLoopedPositions.js +8 -7
  94. package/dist/esm/funcs/creditCreditLoopedPositions.js.map +1 -1
  95. package/dist/esm/funcs/creditCreditRebalance.d.ts +11 -34
  96. package/dist/esm/funcs/creditCreditRebalance.d.ts.map +1 -1
  97. package/dist/esm/funcs/creditCreditRebalance.js +11 -34
  98. package/dist/esm/funcs/creditCreditRebalance.js.map +1 -1
  99. package/dist/esm/funcs/creditCreditRepay.d.ts +1 -1
  100. package/dist/esm/funcs/creditCreditRepay.js +1 -1
  101. package/dist/esm/funcs/creditCreditUnloop.d.ts +7 -38
  102. package/dist/esm/funcs/creditCreditUnloop.d.ts.map +1 -1
  103. package/dist/esm/funcs/creditCreditUnloop.js +7 -38
  104. package/dist/esm/funcs/creditCreditUnloop.js.map +1 -1
  105. package/dist/esm/lib/config.d.ts +2 -2
  106. package/dist/esm/lib/config.js +2 -2
  107. package/dist/esm/models/components/accountsummary.d.ts +18 -5
  108. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  109. package/dist/esm/models/components/accountsummary.js.map +1 -1
  110. package/dist/esm/models/components/collateralposition.d.ts +18 -5
  111. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  112. package/dist/esm/models/components/collateralposition.js.map +1 -1
  113. package/dist/esm/models/components/creditborrowparams.d.ts +18 -5
  114. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  115. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  116. package/dist/esm/models/components/creditborrowrequest.d.ts +18 -5
  117. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  118. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  119. package/dist/esm/models/components/creditenablecollateralparams.d.ts +18 -5
  120. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  121. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  122. package/dist/esm/models/components/creditlooprequest.d.ts +27 -14
  123. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  124. package/dist/esm/models/components/creditlooprequest.js +1 -1
  125. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  126. package/dist/esm/models/components/creditloopresponse.d.ts +7 -7
  127. package/dist/esm/models/components/creditloopresponse.js +3 -3
  128. package/dist/esm/models/components/creditloopresponse.js.map +1 -1
  129. package/dist/esm/models/components/creditprotocol.d.ts +36 -10
  130. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  131. package/dist/esm/models/components/creditprotocol.js +18 -5
  132. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  133. package/dist/esm/models/components/creditrepayparams.d.ts +18 -5
  134. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  135. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  136. package/dist/esm/models/components/creditrepayrequest.d.ts +18 -5
  137. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  138. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  139. package/dist/esm/models/components/creditsupplyparams.d.ts +18 -5
  140. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  141. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  142. package/dist/esm/models/components/creditunlooprequest.d.ts +23 -10
  143. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  144. package/dist/esm/models/components/creditunlooprequest.js +1 -1
  145. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  146. package/dist/esm/models/components/creditunloopresponse.d.ts +7 -7
  147. package/dist/esm/models/components/creditunloopresponse.js +3 -3
  148. package/dist/esm/models/components/creditunloopresponse.js.map +1 -1
  149. package/dist/esm/models/components/creditwithdrawparams.d.ts +18 -5
  150. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  151. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  152. package/dist/esm/models/components/debtposition.d.ts +18 -5
  153. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  154. package/dist/esm/models/components/debtposition.js.map +1 -1
  155. package/dist/esm/models/components/loopedposition.d.ts +18 -5
  156. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  157. package/dist/esm/models/components/loopedposition.js.map +1 -1
  158. package/dist/esm/models/components/rebalancetarget.d.ts +18 -5
  159. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  160. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  161. package/dist/esm/models/components/rebalancetargetpreview.d.ts +18 -5
  162. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  163. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  164. package/dist/esm/models/components/swapinfo.d.ts +2 -2
  165. package/dist/esm/sdk/credit.d.ts +44 -111
  166. package/dist/esm/sdk/credit.d.ts.map +1 -1
  167. package/dist/esm/sdk/credit.js +44 -111
  168. package/dist/esm/sdk/credit.js.map +1 -1
  169. package/docs/models/components/accountsummary.md +11 -11
  170. package/docs/models/components/collateralposition.md +17 -17
  171. package/docs/models/components/creditborrowparams.md +11 -11
  172. package/docs/models/components/creditborrowrequest.md +21 -21
  173. package/docs/models/components/creditenablecollateralparams.md +7 -7
  174. package/docs/models/components/creditlooprequest.md +19 -19
  175. package/docs/models/components/creditlooprequestchain.md +1 -1
  176. package/docs/models/components/creditlooprequestinitialcollateralamount.md +1 -1
  177. package/docs/models/components/creditlooprequestloantovalue.md +1 -1
  178. package/docs/models/components/creditloopresponse.md +9 -9
  179. package/docs/models/components/creditloopresponseswapprovider.md +3 -3
  180. package/docs/models/components/creditprotocol.md +18 -5
  181. package/docs/models/components/creditrepayparams.md +10 -10
  182. package/docs/models/components/creditrepayrequest.md +20 -20
  183. package/docs/models/components/creditsupplyparams.md +9 -9
  184. package/docs/models/components/creditunlooprequest.md +17 -17
  185. package/docs/models/components/creditunlooprequestchain.md +1 -1
  186. package/docs/models/components/creditunloopresponse.md +9 -9
  187. package/docs/models/components/creditunloopresponseswapprovider.md +3 -3
  188. package/docs/models/components/creditwithdrawparams.md +9 -9
  189. package/docs/models/components/debtposition.md +16 -16
  190. package/docs/models/components/loopedposition.md +14 -14
  191. package/docs/models/components/rebalancetarget.md +10 -10
  192. package/docs/models/components/rebalancetargetpreview.md +16 -16
  193. package/docs/models/components/swapinfo.md +10 -10
  194. package/docs/sdks/credit/README.md +40 -107
  195. package/openapi_prepped_for_speakeasy.json +32 -32
  196. package/package.json +1 -1
  197. package/src/funcs/creditCreditBorrow.ts +1 -1
  198. package/src/funcs/creditCreditLoop.ts +8 -22
  199. package/src/funcs/creditCreditLoopedPositions.ts +8 -7
  200. package/src/funcs/creditCreditRebalance.ts +11 -34
  201. package/src/funcs/creditCreditRepay.ts +1 -1
  202. package/src/funcs/creditCreditUnloop.ts +7 -38
  203. package/src/lib/config.ts +2 -2
  204. package/src/models/components/accountsummary.ts +18 -5
  205. package/src/models/components/collateralposition.ts +18 -5
  206. package/src/models/components/creditborrowparams.ts +18 -5
  207. package/src/models/components/creditborrowrequest.ts +18 -5
  208. package/src/models/components/creditenablecollateralparams.ts +18 -5
  209. package/src/models/components/creditlooprequest.ts +27 -14
  210. package/src/models/components/creditloopresponse.ts +7 -7
  211. package/src/models/components/creditprotocol.ts +36 -10
  212. package/src/models/components/creditrepayparams.ts +18 -5
  213. package/src/models/components/creditrepayrequest.ts +18 -5
  214. package/src/models/components/creditsupplyparams.ts +18 -5
  215. package/src/models/components/creditunlooprequest.ts +23 -10
  216. package/src/models/components/creditunloopresponse.ts +7 -7
  217. package/src/models/components/creditwithdrawparams.ts +18 -5
  218. package/src/models/components/debtposition.ts +18 -5
  219. package/src/models/components/loopedposition.ts +18 -5
  220. package/src/models/components/rebalancetarget.ts +18 -5
  221. package/src/models/components/rebalancetargetpreview.ts +18 -5
  222. package/src/models/components/swapinfo.ts +2 -2
  223. package/src/sdk/credit.ts +44 -111
@@ -1,6 +1,6 @@
1
1
  # CreditLoopRequestChain
2
2
 
3
- Blockchain network.
3
+ Blockchain network. Not every protocol is deployed on every chain — see the protocol field — and a chain with no credit venue at all returns a 422 naming the chains that do.
4
4
 
5
5
  ## Example Usage
6
6
 
@@ -1,6 +1,6 @@
1
1
  # CreditLoopRequestInitialCollateralAmount
2
2
 
3
- Collateral (in token units) already held in the Credit Account to seed the loop.
3
+ Collateral (in token units) that the Credit Account must ALREADY hold when this is called — the loop never pulls from the owner's wallet mid-transaction. Fund the account first via /v2/credit/transfer (action=DEPOSIT).
4
4
 
5
5
 
6
6
  ## Supported Types
@@ -1,6 +1,6 @@
1
1
  # CreditLoopRequestLoanToValue
2
2
 
3
- Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.
3
+ Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin; Euler's borrow LTV for the collateral vault); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.
4
4
 
5
5
 
6
6
  ## Supported Types
@@ -19,17 +19,17 @@ let value: CreditLoopResponse = {
19
19
  estimatedSwapCost: "<value>",
20
20
  legs: [],
21
21
  },
22
- swapProvider: "one_inch",
22
+ swapProvider: "market",
23
23
  };
24
24
  ```
25
25
 
26
26
  ## Fields
27
27
 
28
- | Field | Type | Required | Description | Example |
29
- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
- | `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false — except firm-priced previews (preview=true with swap_provider='bebop'), which carry numbers only: the firm quotes are fetched at execution time, so there is no payload to sign yet. | |
31
- | `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. | |
32
- | `preview` | [components.CreditLoopPreview](../../models/components/creditlooppreview.md) | :heavy_check_mark: | Projected end state, computed on guaranteed swap floors. Null only on pricing='firm' preview responses whose target the firm venue cannot serve: no leg was priced on any venue, and the response carries the coverage advisory (max_firm_multiplier) alone. | |
33
- | `swapProvider` | [components.CreditLoopResponseSwapProvider](../../models/components/creditloopresponseswapprovider.md) | :heavy_minus_sign: | Which venue priced the swap leg(s): 'one_inch' (iterative loop, slippage-bounded floors) or 'bebop' (firm zero-slippage quotes, one per swap leg, each partially filled at the leg's size exact fills, zero dust). On preview=true responses, 'bebop' means the numbers are INDICATIVE, computed from the firm venue's live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. | one_inch |
34
- | `quoteExpiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Deadline of the firm swap quotes (the earliest across the loop's swap legs) — sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Present only on executable swap_provider='bebop' builds; null on previews (no quote is spent for a preview). | |
35
- | `maxFirmMultiplier` | *string* | :heavy_minus_sign: | Multiplier bound firm zero-slippage quotes can fill for the requested position size, LTV and target (estimated without spending any quote). The requested multiplier is firm-servable iff it is <= this value; above it the loop executes at market rate with slippage-bounded floors instead. Present only on preview=true responses when a firm-quote venue covers the pair; null otherwise. Recompute per parameter change - minimum-size floors make reachability target-dependent. | |
28
+ | Field | Type | Required | Description | Example |
29
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
+ | `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false — except firm-priced previews (preview=true on a firm-priced build), which carry numbers only: the firm quotes are fetched at execution time, so there is no payload to sign yet. | |
31
+ | `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. | |
32
+ | `preview` | [components.CreditLoopPreview](../../models/components/creditlooppreview.md) | :heavy_check_mark: | Projected end state, computed on guaranteed swap floors. Null only on pricing='firm' preview responses whose target the firm venue cannot serve: no leg was priced on any venue, and the response carries the coverage advisory (max_firm_multiplier) alone. | |
33
+ | `swapProvider` | [components.CreditLoopResponseSwapProvider](../../models/components/creditloopresponseswapprovider.md) | :heavy_minus_sign: | Identifies which route priced the swap leg(s): 'market' — a DEX aggregator (iterative loop across pool liquidity, slippage-bounded floors) or 'firm' zero-slippage quotes, one per swap leg, each partially filled at the leg's size (exact fills, zero dust). On preview=true responses 'firm' means the numbers are INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED (under 'auto' a firm build can fall back to market transparently), and `quote_expires_at` is absent on every preview — so neither substitutes for this field. | market |
34
+ | `quoteExpiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Deadline of the firm swap quotes (the earliest across the loop's swap legs) — sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Present only on executable firm-priced builds; null on previews (no quote is spent for a preview). | |
35
+ | `maxFirmMultiplier` | *string* | :heavy_minus_sign: | Multiplier bound firm zero-slippage quotes can fill for the requested position size, LTV and target (estimated without spending any quote). The requested multiplier is firm-servable iff it is <= this value; above it the loop executes at market rate with slippage-bounded floors instead. Present only on preview=true responses when a firm-quote venue covers the pair; null otherwise. Recompute per parameter change - minimum-size floors make reachability target-dependent. | |
@@ -1,17 +1,17 @@
1
1
  # CreditLoopResponseSwapProvider
2
2
 
3
- Which venue priced the swap leg(s): 'one_inch' (iterative loop, slippage-bounded floors) or 'bebop' (firm zero-slippage quotes, one per swap leg, each partially filled at the leg's size exact fills, zero dust). On preview=true responses, 'bebop' means the numbers are INDICATIVE, computed from the firm venue's live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks.
3
+ Identifies which route priced the swap leg(s): 'market' — a DEX aggregator (iterative loop across pool liquidity, slippage-bounded floors) or 'firm' zero-slippage quotes, one per swap leg, each partially filled at the leg's size (exact fills, zero dust). On preview=true responses 'firm' means the numbers are INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED (under 'auto' a firm build can fall back to market transparently), and `quote_expires_at` is absent on every preview — so neither substitutes for this field.
4
4
 
5
5
  ## Example Usage
6
6
 
7
7
  ```typescript
8
8
  import { CreditLoopResponseSwapProvider } from "@compass-labs/api-sdk/models/components";
9
9
 
10
- let value: CreditLoopResponseSwapProvider = "one_inch";
10
+ let value: CreditLoopResponseSwapProvider = "market";
11
11
  ```
12
12
 
13
13
  ## Values
14
14
 
15
15
  ```typescript
16
- "one_inch" | "bebop"
16
+ "market" | "firm"
17
17
  ```
@@ -3,11 +3,24 @@
3
3
  Which lending protocol a credit action targets.
4
4
 
5
5
  ``AAVE`` is the default so existing callers (which never send a ``protocol``
6
- field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
7
- Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
8
- V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
9
- supports isolated per-sub-account positions (``sub_account_id``). All three
10
- support the loop/unloop leverage endpoints.
6
+ field) keep hitting the unchanged Aave code path; markets are named by token
7
+ symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
8
+ ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
9
+ ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
10
+ per-sub-account positions (``sub_account_id``).
11
+
12
+ Deployment is per chain, so a valid protocol can still 422 on a given chain:
13
+ AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
14
+ chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
15
+ (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
16
+
17
+ All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
18
+ NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
19
+ ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
20
+ silently absent there rather than an error, so read it from
21
+ ``/v2/credit/positions`` instead. (EULER still appears in the
22
+ ``looped_positions`` response enum because this enum is shared; it is never
23
+ emitted.)
11
24
 
12
25
  ## Example Usage
13
26
 
@@ -17,13 +17,13 @@ let value: CreditRepayParams = {
17
17
 
18
18
  ## Fields
19
19
 
20
- | Field | Type | Required | Description | Example |
21
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
- | `actionType` | *"CREDIT_REPAY"* | :heavy_check_mark: | N/A | CREDIT_REPAY |
23
- | `token` | *string* | :heavy_check_mark: | Token to repay. | |
24
- | `amount` | *components.CreditRepayParamsAmount* | :heavy_check_mark: | Amount in token units to repay. | |
25
- | `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
26
- | `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho<br/>Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler<br/>V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and<br/>supports isolated per-sub-account positions (``sub_account_id``). All three<br/>support the loop/unloop leverage endpoints. | |
27
- | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the debt is owed to. Required when protocol=EULER. | |
28
- | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: EVC sub-account (0–255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho. | 0 |
29
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
20
+ | Field | Type | Required | Description | Example |
21
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
22
+ | `actionType` | *"CREDIT_REPAY"* | :heavy_check_mark: | N/A | CREDIT_REPAY |
23
+ | `token` | *string* | :heavy_check_mark: | Token to repay. | |
24
+ | `amount` | *components.CreditRepayParamsAmount* | :heavy_check_mark: | Amount in token units to repay. | |
25
+ | `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
26
+ | `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path; markets are named by token<br/>symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32<br/>``market_id``. ``EULER`` identifies Euler V2 markets by their EVK<br/>``collateral_vault`` + ``borrow_vault`` addresses and supports isolated<br/>per-sub-account positions (``sub_account_id``).<br/><br/>Deployment is per chain, so a valid protocol can still 422 on a given chain:<br/>AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the<br/>chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM<br/>(where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.<br/><br/>All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does<br/>NOT: ``/v2/credit/rebalance`` rejects it with a 422, and<br/>``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is<br/>silently absent there rather than an error, so read it from<br/>``/v2/credit/positions`` instead. (EULER still appears in the<br/>``looped_positions`` response enum because this enum is shared; it is never<br/>emitted.) | |
27
+ | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the debt is owed to. Required when protocol=EULER. | |
28
+ | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: EVC sub-account (0–255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho. | 0 |
29
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |