@compass-labs/api-sdk 2.2.102 → 2.2.104

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 (211) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/lib/encodings.d.ts +10 -9
  4. package/dist/commonjs/lib/encodings.d.ts.map +1 -1
  5. package/dist/commonjs/lib/encodings.js +29 -13
  6. package/dist/commonjs/lib/encodings.js.map +1 -1
  7. package/dist/commonjs/models/components/accountsummary.d.ts +3 -7
  8. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  10. package/dist/commonjs/models/components/builder.d.ts +1 -1
  11. package/dist/commonjs/models/components/collateralposition.d.ts +3 -7
  12. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  14. package/dist/commonjs/models/components/creditborrowparams.d.ts +3 -7
  15. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  17. package/dist/commonjs/models/components/creditborrowrequest.d.ts +3 -7
  18. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  19. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  20. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +3 -7
  21. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  23. package/dist/commonjs/models/components/creditloopedpositionsresponse.d.ts +3 -3
  24. package/dist/commonjs/models/components/creditlooprequest.d.ts +3 -7
  25. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  27. package/dist/commonjs/models/components/creditloopresponse.d.ts +5 -5
  28. package/dist/commonjs/models/components/creditloopresponse.js +3 -3
  29. package/dist/commonjs/models/components/creditloopresponse.js.map +1 -1
  30. package/dist/commonjs/models/components/creditprotocol.d.ts +6 -14
  31. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/creditprotocol.js +3 -7
  33. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  34. package/dist/commonjs/models/components/creditrepayparams.d.ts +3 -7
  35. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  37. package/dist/commonjs/models/components/creditrepayrequest.d.ts +3 -7
  38. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  39. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  40. package/dist/commonjs/models/components/creditsupplyparams.d.ts +3 -7
  41. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  42. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  43. package/dist/commonjs/models/components/creditunlooprequest.d.ts +3 -7
  44. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  46. package/dist/commonjs/models/components/creditunloopresponse.d.ts +5 -5
  47. package/dist/commonjs/models/components/creditunloopresponse.js +3 -3
  48. package/dist/commonjs/models/components/creditunloopresponse.js.map +1 -1
  49. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +3 -7
  50. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  52. package/dist/commonjs/models/components/debtposition.d.ts +3 -7
  53. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  54. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  55. package/dist/commonjs/models/components/loopedposition.d.ts +15 -7
  56. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/loopedposition.js +6 -0
  58. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  59. package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts +3 -3
  60. package/dist/commonjs/models/components/loopedpositioncurrentstate.js +1 -1
  61. package/dist/commonjs/models/components/rebalancetarget.d.ts +3 -7
  62. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  63. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  64. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +3 -7
  65. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  66. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  67. package/dist/esm/lib/config.d.ts +2 -2
  68. package/dist/esm/lib/config.js +2 -2
  69. package/dist/esm/lib/encodings.d.ts +10 -9
  70. package/dist/esm/lib/encodings.d.ts.map +1 -1
  71. package/dist/esm/lib/encodings.js +29 -13
  72. package/dist/esm/lib/encodings.js.map +1 -1
  73. package/dist/esm/models/components/accountsummary.d.ts +3 -7
  74. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  75. package/dist/esm/models/components/accountsummary.js.map +1 -1
  76. package/dist/esm/models/components/builder.d.ts +1 -1
  77. package/dist/esm/models/components/collateralposition.d.ts +3 -7
  78. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  79. package/dist/esm/models/components/collateralposition.js.map +1 -1
  80. package/dist/esm/models/components/creditborrowparams.d.ts +3 -7
  81. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  82. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  83. package/dist/esm/models/components/creditborrowrequest.d.ts +3 -7
  84. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  85. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  86. package/dist/esm/models/components/creditenablecollateralparams.d.ts +3 -7
  87. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  88. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  89. package/dist/esm/models/components/creditloopedpositionsresponse.d.ts +3 -3
  90. package/dist/esm/models/components/creditlooprequest.d.ts +3 -7
  91. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  92. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  93. package/dist/esm/models/components/creditloopresponse.d.ts +5 -5
  94. package/dist/esm/models/components/creditloopresponse.js +3 -3
  95. package/dist/esm/models/components/creditloopresponse.js.map +1 -1
  96. package/dist/esm/models/components/creditprotocol.d.ts +6 -14
  97. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  98. package/dist/esm/models/components/creditprotocol.js +3 -7
  99. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  100. package/dist/esm/models/components/creditrepayparams.d.ts +3 -7
  101. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  102. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  103. package/dist/esm/models/components/creditrepayrequest.d.ts +3 -7
  104. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  105. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  106. package/dist/esm/models/components/creditsupplyparams.d.ts +3 -7
  107. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  108. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  109. package/dist/esm/models/components/creditunlooprequest.d.ts +3 -7
  110. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  111. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  112. package/dist/esm/models/components/creditunloopresponse.d.ts +5 -5
  113. package/dist/esm/models/components/creditunloopresponse.js +3 -3
  114. package/dist/esm/models/components/creditunloopresponse.js.map +1 -1
  115. package/dist/esm/models/components/creditwithdrawparams.d.ts +3 -7
  116. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  117. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  118. package/dist/esm/models/components/debtposition.d.ts +3 -7
  119. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  120. package/dist/esm/models/components/debtposition.js.map +1 -1
  121. package/dist/esm/models/components/loopedposition.d.ts +15 -7
  122. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  123. package/dist/esm/models/components/loopedposition.js +6 -0
  124. package/dist/esm/models/components/loopedposition.js.map +1 -1
  125. package/dist/esm/models/components/loopedpositioncurrentstate.d.ts +3 -3
  126. package/dist/esm/models/components/loopedpositioncurrentstate.js +1 -1
  127. package/dist/esm/models/components/rebalancetarget.d.ts +3 -7
  128. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  129. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  130. package/dist/esm/models/components/rebalancetargetpreview.d.ts +3 -7
  131. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  132. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  133. package/docs/models/components/accountsummary.md +11 -11
  134. package/docs/models/components/builder.md +4 -4
  135. package/docs/models/components/collateralposition.md +17 -17
  136. package/docs/models/components/creditborrowparams.md +11 -11
  137. package/docs/models/components/creditborrowrequest.md +21 -21
  138. package/docs/models/components/creditenablecollateralparams.md +7 -7
  139. package/docs/models/components/creditloopedpositionsresponse.md +6 -6
  140. package/docs/models/components/creditlooprequest.md +19 -19
  141. package/docs/models/components/creditloopresponse.md +9 -9
  142. package/docs/models/components/creditloopresponseswapprovider.md +3 -3
  143. package/docs/models/components/creditprotocol.md +3 -7
  144. package/docs/models/components/creditrepayparams.md +10 -10
  145. package/docs/models/components/creditrepayrequest.md +20 -20
  146. package/docs/models/components/creditsupplyparams.md +9 -9
  147. package/docs/models/components/creditunlooprequest.md +17 -17
  148. package/docs/models/components/creditunloopresponse.md +9 -9
  149. package/docs/models/components/creditunloopresponseswapprovider.md +3 -3
  150. package/docs/models/components/creditwithdrawparams.md +9 -9
  151. package/docs/models/components/debtposition.md +16 -16
  152. package/docs/models/components/loopedposition.md +17 -14
  153. package/docs/models/components/loopedpositioncurrentstate.md +1 -1
  154. package/docs/models/components/loopedpositioncurrentstatehealthfactorscope.md +1 -1
  155. package/docs/models/components/rebalancetarget.md +10 -10
  156. package/docs/models/components/rebalancetargetpreview.md +16 -16
  157. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +1 -1
  158. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -1
  159. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -1
  160. package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -1
  161. package/examples/node_modules/tsx/dist/cli.cjs +1 -1
  162. package/examples/node_modules/tsx/dist/cli.mjs +1 -1
  163. package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -1
  164. package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -1
  165. package/examples/node_modules/tsx/dist/esm/index.cjs +1 -1
  166. package/examples/node_modules/tsx/dist/esm/index.mjs +1 -1
  167. package/examples/node_modules/tsx/dist/index-D1vYaNWZ.cjs +14 -0
  168. package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +14 -0
  169. package/examples/node_modules/tsx/dist/loader.cjs +1 -1
  170. package/examples/node_modules/tsx/dist/loader.mjs +1 -1
  171. package/examples/node_modules/tsx/dist/package-B1lIY_Tn.cjs +1 -0
  172. package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +1 -0
  173. package/examples/node_modules/tsx/dist/{register-C9AniqUt.mjs → register-DHgpdRjs.mjs} +1 -1
  174. package/examples/node_modules/tsx/dist/{register-Ciecs-Zx.cjs → register-DjPW2kSr.cjs} +2 -2
  175. package/examples/node_modules/tsx/dist/{register-C557imBs.cjs → register-OY9cqBEN.cjs} +1 -1
  176. package/examples/node_modules/tsx/dist/{register-C4vWVmug.mjs → register-SoqaU4rg.mjs} +1 -1
  177. package/examples/node_modules/tsx/dist/repl.cjs +1 -1
  178. package/examples/node_modules/tsx/dist/repl.mjs +1 -1
  179. package/examples/node_modules/tsx/dist/{require-DDxgG93A.cjs → require-Blr_8TcJ.cjs} +1 -1
  180. package/examples/node_modules/tsx/dist/{require-CywAB2e6.mjs → require-Cuv-0BLU.mjs} +1 -1
  181. package/examples/node_modules/tsx/package.json +1 -1
  182. package/examples/package-lock.json +3 -3
  183. package/openapi_prepped_for_speakeasy.json +51 -15
  184. package/package.json +1 -1
  185. package/src/lib/config.ts +2 -2
  186. package/src/lib/encodings.ts +58 -23
  187. package/src/models/components/accountsummary.ts +3 -7
  188. package/src/models/components/builder.ts +1 -1
  189. package/src/models/components/collateralposition.ts +3 -7
  190. package/src/models/components/creditborrowparams.ts +3 -7
  191. package/src/models/components/creditborrowrequest.ts +3 -7
  192. package/src/models/components/creditenablecollateralparams.ts +3 -7
  193. package/src/models/components/creditloopedpositionsresponse.ts +3 -3
  194. package/src/models/components/creditlooprequest.ts +3 -7
  195. package/src/models/components/creditloopresponse.ts +5 -5
  196. package/src/models/components/creditprotocol.ts +6 -14
  197. package/src/models/components/creditrepayparams.ts +3 -7
  198. package/src/models/components/creditrepayrequest.ts +3 -7
  199. package/src/models/components/creditsupplyparams.ts +3 -7
  200. package/src/models/components/creditunlooprequest.ts +3 -7
  201. package/src/models/components/creditunloopresponse.ts +5 -5
  202. package/src/models/components/creditwithdrawparams.ts +3 -7
  203. package/src/models/components/debtposition.ts +3 -7
  204. package/src/models/components/loopedposition.ts +21 -7
  205. package/src/models/components/loopedpositioncurrentstate.ts +3 -3
  206. package/src/models/components/rebalancetarget.ts +3 -7
  207. package/src/models/components/rebalancetargetpreview.ts +3 -7
  208. package/examples/node_modules/tsx/dist/index-6kqi0x0U.cjs +0 -14
  209. package/examples/node_modules/tsx/dist/index-DQtFPMc2.mjs +0 -14
  210. package/examples/node_modules/tsx/dist/package-B13bX4zz.mjs +0 -1
  211. package/examples/node_modules/tsx/dist/package-sd2gMcZx.cjs +0 -1
@@ -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 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): a DEX AGGREGATOR (iterative loop across pool liquidity, slippage-bounded floors) or a FIRM provider (zero-slippage quotes, one per swap leg, each partially filled at the leg's size exact fills, zero dust). On preview=true responses a firm value 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. | 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 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. | |
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
- Identifies which route priced the swap leg(s): a DEX AGGREGATOR (iterative loop across pool liquidity, slippage-bounded floors) or a FIRM provider (zero-slippage quotes, one per swap leg, each partially filled at the leg's size exact fills, zero dust). On preview=true responses a firm value 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.
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
  ```
@@ -14,13 +14,9 @@ AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
14
14
  chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
15
15
  (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
16
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.)
17
+ All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
18
+ ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
19
+ which rejects EULER with a 422.
24
20
 
25
21
  ## Example Usage
26
22
 
@@ -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; 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. | |
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``, ``/v2/credit/unloop`` and<br/>``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,<br/>which rejects EULER with a 422. | |
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. | |