@compass-labs/api-sdk 2.2.101 → 2.2.102

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 (219) 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 +5 -5
  43. package/dist/commonjs/models/components/creditloopresponse.js +1 -1
  44. package/dist/commonjs/models/components/creditprotocol.d.ts +36 -10
  45. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  46. package/dist/commonjs/models/components/creditprotocol.js +18 -5
  47. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  48. package/dist/commonjs/models/components/creditrepayparams.d.ts +18 -5
  49. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  50. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  51. package/dist/commonjs/models/components/creditrepayrequest.d.ts +18 -5
  52. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  54. package/dist/commonjs/models/components/creditsupplyparams.d.ts +18 -5
  55. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  56. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  57. package/dist/commonjs/models/components/creditunlooprequest.d.ts +23 -10
  58. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  59. package/dist/commonjs/models/components/creditunlooprequest.js +1 -1
  60. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  61. package/dist/commonjs/models/components/creditunloopresponse.d.ts +5 -5
  62. package/dist/commonjs/models/components/creditunloopresponse.js +1 -1
  63. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +18 -5
  64. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  66. package/dist/commonjs/models/components/debtposition.d.ts +18 -5
  67. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  69. package/dist/commonjs/models/components/loopedposition.d.ts +18 -5
  70. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  71. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  72. package/dist/commonjs/models/components/rebalancetarget.d.ts +18 -5
  73. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  74. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  75. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +18 -5
  76. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  78. package/dist/commonjs/models/components/swapinfo.d.ts +2 -2
  79. package/dist/commonjs/sdk/credit.d.ts +44 -111
  80. package/dist/commonjs/sdk/credit.d.ts.map +1 -1
  81. package/dist/commonjs/sdk/credit.js +44 -111
  82. package/dist/commonjs/sdk/credit.js.map +1 -1
  83. package/dist/esm/funcs/creditCreditBorrow.d.ts +1 -1
  84. package/dist/esm/funcs/creditCreditBorrow.js +1 -1
  85. package/dist/esm/funcs/creditCreditLoop.d.ts +8 -22
  86. package/dist/esm/funcs/creditCreditLoop.d.ts.map +1 -1
  87. package/dist/esm/funcs/creditCreditLoop.js +8 -22
  88. package/dist/esm/funcs/creditCreditLoop.js.map +1 -1
  89. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts +8 -7
  90. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
  91. package/dist/esm/funcs/creditCreditLoopedPositions.js +8 -7
  92. package/dist/esm/funcs/creditCreditLoopedPositions.js.map +1 -1
  93. package/dist/esm/funcs/creditCreditRebalance.d.ts +11 -34
  94. package/dist/esm/funcs/creditCreditRebalance.d.ts.map +1 -1
  95. package/dist/esm/funcs/creditCreditRebalance.js +11 -34
  96. package/dist/esm/funcs/creditCreditRebalance.js.map +1 -1
  97. package/dist/esm/funcs/creditCreditRepay.d.ts +1 -1
  98. package/dist/esm/funcs/creditCreditRepay.js +1 -1
  99. package/dist/esm/funcs/creditCreditUnloop.d.ts +7 -38
  100. package/dist/esm/funcs/creditCreditUnloop.d.ts.map +1 -1
  101. package/dist/esm/funcs/creditCreditUnloop.js +7 -38
  102. package/dist/esm/funcs/creditCreditUnloop.js.map +1 -1
  103. package/dist/esm/lib/config.d.ts +2 -2
  104. package/dist/esm/lib/config.js +2 -2
  105. package/dist/esm/models/components/accountsummary.d.ts +18 -5
  106. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  107. package/dist/esm/models/components/accountsummary.js.map +1 -1
  108. package/dist/esm/models/components/collateralposition.d.ts +18 -5
  109. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  110. package/dist/esm/models/components/collateralposition.js.map +1 -1
  111. package/dist/esm/models/components/creditborrowparams.d.ts +18 -5
  112. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  113. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  114. package/dist/esm/models/components/creditborrowrequest.d.ts +18 -5
  115. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  116. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  117. package/dist/esm/models/components/creditenablecollateralparams.d.ts +18 -5
  118. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  119. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  120. package/dist/esm/models/components/creditlooprequest.d.ts +27 -14
  121. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  122. package/dist/esm/models/components/creditlooprequest.js +1 -1
  123. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  124. package/dist/esm/models/components/creditloopresponse.d.ts +5 -5
  125. package/dist/esm/models/components/creditloopresponse.js +1 -1
  126. package/dist/esm/models/components/creditprotocol.d.ts +36 -10
  127. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  128. package/dist/esm/models/components/creditprotocol.js +18 -5
  129. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  130. package/dist/esm/models/components/creditrepayparams.d.ts +18 -5
  131. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  132. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  133. package/dist/esm/models/components/creditrepayrequest.d.ts +18 -5
  134. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  135. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  136. package/dist/esm/models/components/creditsupplyparams.d.ts +18 -5
  137. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  138. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  139. package/dist/esm/models/components/creditunlooprequest.d.ts +23 -10
  140. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  141. package/dist/esm/models/components/creditunlooprequest.js +1 -1
  142. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  143. package/dist/esm/models/components/creditunloopresponse.d.ts +5 -5
  144. package/dist/esm/models/components/creditunloopresponse.js +1 -1
  145. package/dist/esm/models/components/creditwithdrawparams.d.ts +18 -5
  146. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  147. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  148. package/dist/esm/models/components/debtposition.d.ts +18 -5
  149. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  150. package/dist/esm/models/components/debtposition.js.map +1 -1
  151. package/dist/esm/models/components/loopedposition.d.ts +18 -5
  152. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  153. package/dist/esm/models/components/loopedposition.js.map +1 -1
  154. package/dist/esm/models/components/rebalancetarget.d.ts +18 -5
  155. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  156. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  157. package/dist/esm/models/components/rebalancetargetpreview.d.ts +18 -5
  158. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  159. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  160. package/dist/esm/models/components/swapinfo.d.ts +2 -2
  161. package/dist/esm/sdk/credit.d.ts +44 -111
  162. package/dist/esm/sdk/credit.d.ts.map +1 -1
  163. package/dist/esm/sdk/credit.js +44 -111
  164. package/dist/esm/sdk/credit.js.map +1 -1
  165. package/docs/models/components/accountsummary.md +11 -11
  166. package/docs/models/components/collateralposition.md +17 -17
  167. package/docs/models/components/creditborrowparams.md +11 -11
  168. package/docs/models/components/creditborrowrequest.md +21 -21
  169. package/docs/models/components/creditenablecollateralparams.md +7 -7
  170. package/docs/models/components/creditlooprequest.md +19 -19
  171. package/docs/models/components/creditlooprequestchain.md +1 -1
  172. package/docs/models/components/creditlooprequestinitialcollateralamount.md +1 -1
  173. package/docs/models/components/creditlooprequestloantovalue.md +1 -1
  174. package/docs/models/components/creditloopresponse.md +8 -8
  175. package/docs/models/components/creditloopresponseswapprovider.md +1 -1
  176. package/docs/models/components/creditprotocol.md +18 -5
  177. package/docs/models/components/creditrepayparams.md +10 -10
  178. package/docs/models/components/creditrepayrequest.md +20 -20
  179. package/docs/models/components/creditsupplyparams.md +9 -9
  180. package/docs/models/components/creditunlooprequest.md +17 -17
  181. package/docs/models/components/creditunlooprequestchain.md +1 -1
  182. package/docs/models/components/creditunloopresponse.md +8 -8
  183. package/docs/models/components/creditunloopresponseswapprovider.md +1 -1
  184. package/docs/models/components/creditwithdrawparams.md +9 -9
  185. package/docs/models/components/debtposition.md +16 -16
  186. package/docs/models/components/loopedposition.md +14 -14
  187. package/docs/models/components/rebalancetarget.md +10 -10
  188. package/docs/models/components/rebalancetargetpreview.md +16 -16
  189. package/docs/models/components/swapinfo.md +10 -10
  190. package/docs/sdks/credit/README.md +40 -107
  191. package/openapi_prepped_for_speakeasy.json +26 -26
  192. package/package.json +1 -1
  193. package/src/funcs/creditCreditBorrow.ts +1 -1
  194. package/src/funcs/creditCreditLoop.ts +8 -22
  195. package/src/funcs/creditCreditLoopedPositions.ts +8 -7
  196. package/src/funcs/creditCreditRebalance.ts +11 -34
  197. package/src/funcs/creditCreditRepay.ts +1 -1
  198. package/src/funcs/creditCreditUnloop.ts +7 -38
  199. package/src/lib/config.ts +2 -2
  200. package/src/models/components/accountsummary.ts +18 -5
  201. package/src/models/components/collateralposition.ts +18 -5
  202. package/src/models/components/creditborrowparams.ts +18 -5
  203. package/src/models/components/creditborrowrequest.ts +18 -5
  204. package/src/models/components/creditenablecollateralparams.ts +18 -5
  205. package/src/models/components/creditlooprequest.ts +27 -14
  206. package/src/models/components/creditloopresponse.ts +5 -5
  207. package/src/models/components/creditprotocol.ts +36 -10
  208. package/src/models/components/creditrepayparams.ts +18 -5
  209. package/src/models/components/creditrepayrequest.ts +18 -5
  210. package/src/models/components/creditsupplyparams.ts +18 -5
  211. package/src/models/components/creditunlooprequest.ts +23 -10
  212. package/src/models/components/creditunloopresponse.ts +5 -5
  213. package/src/models/components/creditwithdrawparams.ts +18 -5
  214. package/src/models/components/debtposition.ts +18 -5
  215. package/src/models/components/loopedposition.ts +18 -5
  216. package/src/models/components/rebalancetarget.ts +18 -5
  217. package/src/models/components/rebalancetargetpreview.ts +18 -5
  218. package/src/models/components/swapinfo.ts +2 -2
  219. package/src/sdk/credit.ts +44 -111
@@ -17,7 +17,7 @@ import { Result } from "../types/fp.js";
17
17
  * Bundles an optional swap, collateral supply, and borrow into a single atomic Safe transaction.
18
18
  *
19
19
  * - If `token_in` equals `collateral_token`, the tokens are supplied directly as collateral.
20
- * - If `token_in` differs from `collateral_token`, a swap is performed first via 1inch.
20
+ * - If `token_in` differs from `collateral_token`, a market swap is performed first.
21
21
  *
22
22
  * The Credit Account must already be created via `/v2/credit/create_account` and funded with `token_in`.
23
23
  */
@@ -56,7 +56,7 @@ const async_js_1 = require("../types/async.js");
56
56
  * Bundles an optional swap, collateral supply, and borrow into a single atomic Safe transaction.
57
57
  *
58
58
  * - If `token_in` equals `collateral_token`, the tokens are supplied directly as collateral.
59
- * - If `token_in` differs from `collateral_token`, a swap is performed first via 1inch.
59
+ * - If `token_in` differs from `collateral_token`, a market swap is performed first.
60
60
  *
61
61
  * The Credit Account must already be created via `/v2/credit/create_account` and funded with `token_in`.
62
62
  */
@@ -12,30 +12,16 @@ import { Result } from "../types/fp.js";
12
12
  * Open a leveraged loop
13
13
  *
14
14
  * @remarks
15
- * Open a leveraged loop into an Aave or Morpho market in ONE atomic transaction.
15
+ * Open a leveraged position in ONE atomic transaction.
16
16
  *
17
- * Repeatedly supplies collateral, borrows at the requested loan-to-value, and
18
- * swaps the borrow back to collateral. Each iteration's supply uses the swap's
19
- * GUARANTEED minimum output (enforced on-chain), so a fill anywhere within the
20
- * slippage tolerance can never break a later step; any positive surplus stays
21
- * in the Credit Account (the preview reports the bound as estimated_max_dust).
22
- * Very large loops relative to pool depth can still exceed the slippage
23
- * tolerance through their own cumulative price impact — size accordingly or
24
- * raise max_slippage_percent. Conversely, the geometric tail can shrink below
25
- * the swap router's minimum routable size; when it does the loop simply ends
26
- * early on that supply — the achieved multiplier is still guaranteed within
27
- * 0.5% of the request or the call returns a clean 400.
17
+ * Supply collateral, borrow against it, swap the borrowed token back to
18
+ * collateral, repeat until total collateral reaches multiplier x
19
+ * initial_collateral_amount. If any step fails the whole transaction reverts,
20
+ * so a position is never left half-built.
28
21
  *
29
- * When the collateral token is itself an ERC-4626 vault share (e.g. a Morpho
30
- * vault token like steakUSDC), each conversion swaps the borrow token to the
31
- * vault's underlying asset and mints the shares via the vault's own deposit at
32
- * net asset value instead of swapping the share token on a DEX — share tokens
33
- * have no honest DEX route. A direct share-token route is only ever used when
34
- * it prices within 1% of net asset value.
35
- *
36
- * The Credit Account must already hold initial_collateral_amount of
37
- * collateral_token. For protocol=MORPHO pass a market_id from
38
- * /v2/credit/morpho_markets.
22
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
23
+ * for chain coverage, market discovery, vault-share collateral, HyperEVM
24
+ * specifics and the full error list.
39
25
  */
40
26
  export declare function creditCreditLoop(client: CompassApiSDKCore, request: components.CreditLoopRequest, options?: RequestOptions): APIPromise<Result<components.CreditLoopResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
41
27
  //# sourceMappingURL=creditCreditLoop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditLoop.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditLoop.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,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ACzB,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,kBAAkB,EAC3B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -51,30 +51,16 @@ const async_js_1 = require("../types/async.js");
51
51
  * Open a leveraged loop
52
52
  *
53
53
  * @remarks
54
- * Open a leveraged loop into an Aave or Morpho market in ONE atomic transaction.
54
+ * Open a leveraged position in ONE atomic transaction.
55
55
  *
56
- * Repeatedly supplies collateral, borrows at the requested loan-to-value, and
57
- * swaps the borrow back to collateral. Each iteration's supply uses the swap's
58
- * GUARANTEED minimum output (enforced on-chain), so a fill anywhere within the
59
- * slippage tolerance can never break a later step; any positive surplus stays
60
- * in the Credit Account (the preview reports the bound as estimated_max_dust).
61
- * Very large loops relative to pool depth can still exceed the slippage
62
- * tolerance through their own cumulative price impact — size accordingly or
63
- * raise max_slippage_percent. Conversely, the geometric tail can shrink below
64
- * the swap router's minimum routable size; when it does the loop simply ends
65
- * early on that supply — the achieved multiplier is still guaranteed within
66
- * 0.5% of the request or the call returns a clean 400.
56
+ * Supply collateral, borrow against it, swap the borrowed token back to
57
+ * collateral, repeat until total collateral reaches multiplier x
58
+ * initial_collateral_amount. If any step fails the whole transaction reverts,
59
+ * so a position is never left half-built.
67
60
  *
68
- * When the collateral token is itself an ERC-4626 vault share (e.g. a Morpho
69
- * vault token like steakUSDC), each conversion swaps the borrow token to the
70
- * vault's underlying asset and mints the shares via the vault's own deposit at
71
- * net asset value instead of swapping the share token on a DEX — share tokens
72
- * have no honest DEX route. A direct share-token route is only ever used when
73
- * it prices within 1% of net asset value.
74
- *
75
- * The Credit Account must already hold initial_collateral_amount of
76
- * collateral_token. For protocol=MORPHO pass a market_id from
77
- * /v2/credit/morpho_markets.
61
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
62
+ * for chain coverage, market discovery, vault-share collateral, HyperEVM
63
+ * specifics and the full error list.
78
64
  */
79
65
  function creditCreditLoop(client, request, options) {
80
66
  return new async_js_1.APIPromise($do(client, request, options));
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditLoop.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditLoop.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDH,4CAuBC;AA3ED,sDAAiD;AACjD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,SAAgB,gBAAgB,CAC9B,MAAyB,EACzB,OAAqC,EACrC,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAAqC,EACrC,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,gCAAgC,CAAC,KAAK,CAAC,KAAK,CAAC,EACnE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,yBAAU,EAAC,MAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC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,gCAAgC,CAAC,EACxD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -13,14 +13,15 @@ import { Result } from "../types/fp.js";
13
13
  * List looped (leveraged) credit positions
14
14
  *
15
15
  * @remarks
16
- * List looped (leveraged) positions for a credit account owner.
16
+ * List the leveraged positions held by an owner's Credit Account.
17
17
  *
18
- * Detects loops from the account's on-chain history: a transaction containing
19
- * lending + borrowing + swap legs is a loop transaction. Returns one position
20
- * per Morpho market / Aave collateral+debt reserve pair, each with its complete
21
- * per-transaction history, lifetime totals, and live on-chain state (health
22
- * factor, USD values, leverage) for open positions. Covers Aave V3 and Morpho
23
- * Blue.
18
+ * Positions are reconstructed from on-chain history rather than from API calls,
19
+ * so a loop assembled by hand through /v2/credit/bundle is recognised the same
20
+ * way as one opened through /v2/credit/loop. Only activity inside the Credit
21
+ * Account is visible leverage the owner holds directly in their wallet is not.
22
+ *
23
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
24
+ * for protocol coverage and how to read leverage, health factor and net APY.
24
25
  */
25
26
  export declare function creditCreditLoopedPositions(client: CompassApiSDKCore, request: operations.V2CreditLoopedPositionsRequest, options?: RequestOptions): APIPromise<Result<components.CreditLoopedPositionsResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
26
27
  //# sourceMappingURL=creditCreditLoopedPositions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditLoopedPositions.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditLoopedPositions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,6BAA6B,EACtC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
1
+ {"version":3,"file":"creditCreditLoopedPositions.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditLoopedPositions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,6BAA6B,EACtC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -52,14 +52,15 @@ const async_js_1 = require("../types/async.js");
52
52
  * List looped (leveraged) credit positions
53
53
  *
54
54
  * @remarks
55
- * List looped (leveraged) positions for a credit account owner.
55
+ * List the leveraged positions held by an owner's Credit Account.
56
56
  *
57
- * Detects loops from the account's on-chain history: a transaction containing
58
- * lending + borrowing + swap legs is a loop transaction. Returns one position
59
- * per Morpho market / Aave collateral+debt reserve pair, each with its complete
60
- * per-transaction history, lifetime totals, and live on-chain state (health
61
- * factor, USD values, leverage) for open positions. Covers Aave V3 and Morpho
62
- * Blue.
57
+ * Positions are reconstructed from on-chain history rather than from API calls,
58
+ * so a loop assembled by hand through /v2/credit/bundle is recognised the same
59
+ * way as one opened through /v2/credit/loop. Only activity inside the Credit
60
+ * Account is visible leverage the owner holds directly in their wallet is not.
61
+ *
62
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
63
+ * for protocol coverage and how to read leverage, health factor and net APY.
63
64
  */
64
65
  function creditCreditLoopedPositions(client, request, options) {
65
66
  return new async_js_1.APIPromise($do(client, request, options));
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditLoopedPositions.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditLoopedPositions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCH,kEAuBC;AA5DD,sDAAsD;AACtD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;;;;;;;;GAYG;AACH,SAAgB,2BAA2B,CACzC,MAAyB,EACzB,OAAkD,EAClD,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAAkD,EAClD,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,6CAA6C,CAAC,KAAK,CAAC,KAAK,CAAC,EACvE,yBAA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IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,2CAA2C,CAAC,EACnE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -12,43 +12,20 @@ import { Result } from "../types/fp.js";
12
12
  * Rebalance the leveraged credit book
13
13
  *
14
14
  * @remarks
15
- * Rebalance the leveraged credit book in ONE atomic transaction.
15
+ * Move one or more leveraged positions to the state you want, in ONE atomic
16
+ * transaction.
16
17
  *
17
- * List only the positions to change anything not named is left untouched;
18
- * remove a position with close=true. Each target states an end state:
19
- * target_equity_usd (net USD committed) × target_multiplier.
18
+ * List the positions to change and the end state you want for each. The API
19
+ * works out whether that means opening, growing, shrinking, delevering or
20
+ * closing, and does them all together.
20
21
  *
21
- * Releasing targets run first (each unwind/delever frees tokens into the Credit
22
- * Account), the freed tokens are then routed by swaps at a GUARANTEED minimum
23
- * output (enforced on-chain), and consuming targets run last so moving a
24
- * levered position between markets, token pairs, or protocols (Aave ↔ Morpho) is
25
- * simply a close plus an open in the same transaction. Conversions involving an
26
- * ERC-4626 vault-share token (e.g. a Morpho vault token like steakUSDC) go
27
- * through the vault's own deposit/redeem at net asset value rather than a DEX
28
- * swap of the share token.
22
+ * Money freed by shrinking or closing one position pays for growing or opening
23
+ * another, so shifting funds between positions needs no new deposit. Any
24
+ * shortfall is taken from the Credit Account's idle balance, and the call
25
+ * returns 422 if that does not cover it either.
29
26
  *
30
- * Net book growth is funded from the Credit Account's existing idle balance —
31
- * fund it first via /v2/credit/transfer; a net release stays in the Credit
32
- * Account as idle balance. Any swap surplus above the guaranteed floors also
33
- * stays in the Credit Account (preview.estimated_max_dust) — recoverable, never
34
- * lost.
35
- *
36
- * A book already at its target returns transaction: null with the preview — the
37
- * call is idempotent and safe to drive from a converge-to-target loop.
38
- *
39
- * A rebalance too large for one transaction is rejected with a 422 — split it
40
- * into two calls. Every deleveraging step keeps the health factor ≥ 1.02 and
41
- * every leveraging step respects the protocol's borrow limits; Aave targets share
42
- * one account-level health factor, which the preview reports.
43
- *
44
- * Dust tails and routing swaps below the swap router's minimum routable size do
45
- * not fail the call: a releasing target that cannot fully unwind returns its
46
- * honest residual in the preview, and an unroutable routing swap is skipped
47
- * (its uncovered amount only 422s the rebalance if it breaches the funding
48
- * tolerance).
49
- *
50
- * For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect the
51
- * current book via /v2/credit/looped_positions.
27
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
28
+ * for protocol and chain coverage, capital routing and the full error list.
52
29
  */
53
30
  export declare function creditCreditRebalance(client: CompassApiSDKCore, request: components.CreditRebalanceRequest, options?: RequestOptions): APIPromise<Result<components.CreditRebalanceResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
54
31
  //# sourceMappingURL=creditCreditRebalance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditRebalance.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditRebalance.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,uBAAuB,EAChC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
1
+ {"version":3,"file":"creditCreditRebalance.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditRebalance.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,uBAAuB,EAChC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -51,43 +51,20 @@ const async_js_1 = require("../types/async.js");
51
51
  * Rebalance the leveraged credit book
52
52
  *
53
53
  * @remarks
54
- * Rebalance the leveraged credit book in ONE atomic transaction.
54
+ * Move one or more leveraged positions to the state you want, in ONE atomic
55
+ * transaction.
55
56
  *
56
- * List only the positions to change anything not named is left untouched;
57
- * remove a position with close=true. Each target states an end state:
58
- * target_equity_usd (net USD committed) × target_multiplier.
57
+ * List the positions to change and the end state you want for each. The API
58
+ * works out whether that means opening, growing, shrinking, delevering or
59
+ * closing, and does them all together.
59
60
  *
60
- * Releasing targets run first (each unwind/delever frees tokens into the Credit
61
- * Account), the freed tokens are then routed by swaps at a GUARANTEED minimum
62
- * output (enforced on-chain), and consuming targets run last so moving a
63
- * levered position between markets, token pairs, or protocols (Aave ↔ Morpho) is
64
- * simply a close plus an open in the same transaction. Conversions involving an
65
- * ERC-4626 vault-share token (e.g. a Morpho vault token like steakUSDC) go
66
- * through the vault's own deposit/redeem at net asset value rather than a DEX
67
- * swap of the share token.
61
+ * Money freed by shrinking or closing one position pays for growing or opening
62
+ * another, so shifting funds between positions needs no new deposit. Any
63
+ * shortfall is taken from the Credit Account's idle balance, and the call
64
+ * returns 422 if that does not cover it either.
68
65
  *
69
- * Net book growth is funded from the Credit Account's existing idle balance —
70
- * fund it first via /v2/credit/transfer; a net release stays in the Credit
71
- * Account as idle balance. Any swap surplus above the guaranteed floors also
72
- * stays in the Credit Account (preview.estimated_max_dust) — recoverable, never
73
- * lost.
74
- *
75
- * A book already at its target returns transaction: null with the preview — the
76
- * call is idempotent and safe to drive from a converge-to-target loop.
77
- *
78
- * A rebalance too large for one transaction is rejected with a 422 — split it
79
- * into two calls. Every deleveraging step keeps the health factor ≥ 1.02 and
80
- * every leveraging step respects the protocol's borrow limits; Aave targets share
81
- * one account-level health factor, which the preview reports.
82
- *
83
- * Dust tails and routing swaps below the swap router's minimum routable size do
84
- * not fail the call: a releasing target that cannot fully unwind returns its
85
- * honest residual in the preview, and an unroutable routing swap is skipped
86
- * (its uncovered amount only 422s the rebalance if it breaches the funding
87
- * tolerance).
88
- *
89
- * For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect the
90
- * current book via /v2/credit/looped_positions.
66
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
67
+ * for protocol and chain coverage, capital routing and the full error list.
91
68
  */
92
69
  function creditCreditRebalance(client, request, options) {
93
70
  return new async_js_1.APIPromise($do(client, request, options));
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditRebalance.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditRebalance.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEH,sDAuBC;AAxFD,sDAAiD;AACjD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,SAAgB,qBAAqB,CACnC,MAAyB,EACzB,OAA0C,EAC1C,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAA0C,EAC1C,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,qCAAqC,CAAC,KAAK,CAAC,KAAK,CAAC,EACxE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,yBAAU,EAAC,MAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5D,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,sBAAsB,CAAC,E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AAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
1
+ {"version":3,"file":"creditCreditRebalance.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditRebalance.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CH,sDAuBC;AAjED,sDAAiD;AACjD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,qBAAqB,CACnC,MAAyB,EACzB,OAA0C,EAC1C,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAA0C,EAC1C,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,qCAAqC,CAAC,KAAK,CAAC,KAAK,CAAC,EACxE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MA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M,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -17,7 +17,7 @@ import { Result } from "../types/fp.js";
17
17
  * Bundles repayment, collateral withdrawal, and an optional swap into a single atomic Safe transaction.
18
18
  *
19
19
  * - If `token_out` is None or equals `withdraw_token`, the withdrawn collateral is kept as-is.
20
- * - If `token_out` differs from `withdraw_token`, a swap is performed after withdrawal via 1inch.
20
+ * - If `token_out` differs from `withdraw_token`, a market swap is performed after withdrawal.
21
21
  *
22
22
  * The Credit Account must already have a borrow position created via `/v2/credit/borrow`.
23
23
  * The repay_token must be available in the Credit Account (or pulled from EOA via Permit2).
@@ -56,7 +56,7 @@ const async_js_1 = require("../types/async.js");
56
56
  * Bundles repayment, collateral withdrawal, and an optional swap into a single atomic Safe transaction.
57
57
  *
58
58
  * - If `token_out` is None or equals `withdraw_token`, the withdrawn collateral is kept as-is.
59
- * - If `token_out` differs from `withdraw_token`, a swap is performed after withdrawal via 1inch.
59
+ * - If `token_out` differs from `withdraw_token`, a market swap is performed after withdrawal.
60
60
  *
61
61
  * The Credit Account must already have a borrow position created via `/v2/credit/borrow`.
62
62
  * The repay_token must be available in the Credit Account (or pulled from EOA via Permit2).
@@ -12,46 +12,15 @@ import { Result } from "../types/fp.js";
12
12
  * Unwind a leveraged loop
13
13
  *
14
14
  * @remarks
15
- * Unwind an Aave or Morpho loop in ONE atomic transaction.
15
+ * Unwind a leveraged position in ONE atomic transaction.
16
16
  *
17
- * Repeatedly withdraws collateral, swaps it to the borrow token at a GUARANTEED
18
- * minimum output (enforced on-chain), and repays. The floor discipline means a
19
- * swap filling anywhere within the slippage tolerance can never break a later
20
- * step; any positive surplus stays in the Credit Account as borrow-token dust
21
- * (the preview reports the bound as estimated_max_dust).
17
+ * Withdraw collateral, swap it back to the borrow token, repay, repeat — until
18
+ * the position reaches target_multiplier, or until the debt is cleared exactly
19
+ * if you omit it. If any step fails the whole transaction reverts.
22
20
  *
23
- * When the collateral token is itself an ERC-4626 vault share (e.g. a Morpho
24
- * vault token like steakUSDC), each conversion redeems the shares through the
25
- * vault at net asset value and swaps the underlying asset to the borrow token
26
- * instead of swapping the share token on a DEX; a direct share-token route is
27
- * only ever used when it prices within 1% of net asset value.
28
- *
29
- * Omit target_multiplier for a full close: the debt is cleared exactly —
30
- * accrued interest included — and the pair collateral is returned to the Credit
31
- * Account. Pass 1 to clear the debt but keep the collateral supplied, or a value
32
- * above 1 to delever to that multiplier (it must be below the position's current
33
- * multiplier).
34
- *
35
- * Each withdrawal is sized to keep the position's health factor ≥ 1.02 at that
36
- * step, so a position opened very close to the liquidation threshold may need
37
- * more than one transaction to fully close — set allow_partial=true to return
38
- * the maximum single-transaction progress (preview.fully_unwound=false), then
39
- * call unloop again to finish. Very large unwinds relative to pool depth can
40
- * still exceed the slippage tolerance through their own cumulative price impact.
41
- *
42
- * Positions are unwound as far as the swap router can route; on a router-minimum
43
- * stop the engine still withdraws all collateral not needed to back the residual,
44
- * and completes a true full close whenever the unwind's own guaranteed swap
45
- * surpluses (or the Credit Account's idle balance) cover the remainder — a
46
- * residual below the router's minimum routable size never fails the call, it is
47
- * reported honestly in the preview (fully_unwound=false).
48
- *
49
- * When other open Aave loops share this position's collateral reserve, a full
50
- * close withdraws only this position's attributed share of the pooled collateral
51
- * (event-ledger bookkeeping), leaving the rest supplied for the other positions.
52
- *
53
- * For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
54
- * open loops via /v2/credit/looped_positions.
21
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
22
+ * for chain coverage, vault-share collateral, shared Aave reserves and the full
23
+ * error list.
55
24
  */
56
25
  export declare function creditCreditUnloop(client: CompassApiSDKCore, request: components.CreditUnloopRequest, options?: RequestOptions): APIPromise<Result<components.CreditUnloopResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
57
26
  //# sourceMappingURL=creditCreditUnloop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditUnloop.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditUnloop.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,iBAAiB,EAC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B,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -51,46 +51,15 @@ const async_js_1 = require("../types/async.js");
51
51
  * Unwind a leveraged loop
52
52
  *
53
53
  * @remarks
54
- * Unwind an Aave or Morpho loop in ONE atomic transaction.
54
+ * Unwind a leveraged position in ONE atomic transaction.
55
55
  *
56
- * Repeatedly withdraws collateral, swaps it to the borrow token at a GUARANTEED
57
- * minimum output (enforced on-chain), and repays. The floor discipline means a
58
- * swap filling anywhere within the slippage tolerance can never break a later
59
- * step; any positive surplus stays in the Credit Account as borrow-token dust
60
- * (the preview reports the bound as estimated_max_dust).
56
+ * Withdraw collateral, swap it back to the borrow token, repay, repeat — until
57
+ * the position reaches target_multiplier, or until the debt is cleared exactly
58
+ * if you omit it. If any step fails the whole transaction reverts.
61
59
  *
62
- * When the collateral token is itself an ERC-4626 vault share (e.g. a Morpho
63
- * vault token like steakUSDC), each conversion redeems the shares through the
64
- * vault at net asset value and swaps the underlying asset to the borrow token
65
- * instead of swapping the share token on a DEX; a direct share-token route is
66
- * only ever used when it prices within 1% of net asset value.
67
- *
68
- * Omit target_multiplier for a full close: the debt is cleared exactly —
69
- * accrued interest included — and the pair collateral is returned to the Credit
70
- * Account. Pass 1 to clear the debt but keep the collateral supplied, or a value
71
- * above 1 to delever to that multiplier (it must be below the position's current
72
- * multiplier).
73
- *
74
- * Each withdrawal is sized to keep the position's health factor ≥ 1.02 at that
75
- * step, so a position opened very close to the liquidation threshold may need
76
- * more than one transaction to fully close — set allow_partial=true to return
77
- * the maximum single-transaction progress (preview.fully_unwound=false), then
78
- * call unloop again to finish. Very large unwinds relative to pool depth can
79
- * still exceed the slippage tolerance through their own cumulative price impact.
80
- *
81
- * Positions are unwound as far as the swap router can route; on a router-minimum
82
- * stop the engine still withdraws all collateral not needed to back the residual,
83
- * and completes a true full close whenever the unwind's own guaranteed swap
84
- * surpluses (or the Credit Account's idle balance) cover the remainder — a
85
- * residual below the router's minimum routable size never fails the call, it is
86
- * reported honestly in the preview (fully_unwound=false).
87
- *
88
- * When other open Aave loops share this position's collateral reserve, a full
89
- * close withdraws only this position's attributed share of the pooled collateral
90
- * (event-ledger bookkeeping), leaving the rest supplied for the other positions.
91
- *
92
- * For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
93
- * open loops via /v2/credit/looped_positions.
60
+ * See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
61
+ * for chain coverage, vault-share collateral, shared Aave reserves and the full
62
+ * error list.
94
63
  */
95
64
  function creditCreditUnloop(client, request, options) {
96
65
  return new async_js_1.APIPromise($do(client, request, options));
@@ -1 +1 @@
1
- {"version":3,"file":"creditCreditUnloop.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditUnloop.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEH,gDAuBC;AA3FD,sDAAiD;AACjD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,SAAgB,kBAAkB,CAChC,MAAyB,EACzB,OAAuC,EACvC,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAAuC,EACvC,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EACrE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM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Ac,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,kCAAkC,CAAC,EAC1D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -32,7 +32,7 @@ export declare const SDK_METADATA: {
32
32
  readonly language: "typescript";
33
33
  readonly openapiDocVersion: "0.0.1";
34
34
  readonly sdkVersion: "2.0.0";
35
- readonly genVersion: "2.931.0";
36
- readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.931.0 0.0.1 @compass-labs/api-sdk";
35
+ readonly genVersion: "2.932.9";
36
+ readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.932.9 0.0.1 @compass-labs/api-sdk";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -32,7 +32,7 @@ exports.SDK_METADATA = {
32
32
  language: "typescript",
33
33
  openapiDocVersion: "0.0.1",
34
34
  sdkVersion: "2.0.0",
35
- genVersion: "2.931.0",
36
- userAgent: "speakeasy-sdk/typescript 2.0.0 2.931.0 0.0.1 @compass-labs/api-sdk",
35
+ genVersion: "2.932.9",
36
+ userAgent: "speakeasy-sdk/typescript 2.0.0 2.932.9 0.0.1 @compass-labs/api-sdk",
37
37
  };
38
38
  //# sourceMappingURL=config.js.map
@@ -18,11 +18,24 @@ export type AccountSummary = {
18
18
  * @remarks
19
19
  *
20
20
  * ``AAVE`` is the default so existing callers (which never send a ``protocol``
21
- * field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
22
- * Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
23
- * V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
24
- * supports isolated per-sub-account positions (``sub_account_id``). All three
25
- * support the loop/unloop leverage endpoints.
21
+ * field) keep hitting the unchanged Aave code path; markets are named by token
22
+ * symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
23
+ * ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
24
+ * ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
25
+ * per-sub-account positions (``sub_account_id``).
26
+ *
27
+ * Deployment is per chain, so a valid protocol can still 422 on a given chain:
28
+ * AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
29
+ * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
30
+ * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
31
+ *
32
+ * All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
33
+ * NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
34
+ * ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
35
+ * silently absent there rather than an error, so read it from
36
+ * ``/v2/credit/positions`` instead. (EULER still appears in the
37
+ * ``looped_positions`` response enum because this enum is shared; it is never
38
+ * emitted.)
26
39
  */
27
40
  protocol?: CreditProtocol | undefined;
28
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"accountsummary.d.ts","sourceRoot":"","sources":["../../../../src/models/components/accountsummary.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,cAAc,EACd,CAAC,CAAC,UAAU,EACZ,OAAO,CAqBP,CAAC;AAEH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAMrD"}
1
+ {"version":3,"file":"accountsummary.d.ts","sourceRoot":"","sources":["../../../../src/models/components/accountsummary.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,cAAc,EACd,CAAC,CAAC,UAAU,EACZ,OAAO,CAqBP,CAAC;AAEH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAMrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"accountsummary.js","sourceRoot":"","sources":["../../../../src/models/components/accountsummary.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGH,wDAQC;AAtGD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAGjD,2DAG6B;AA2D7B,gBAAgB;AACH,QAAA,4BAA4B,GAIrC,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,gDAA4B,CAAC,QAA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