@compass-labs/api-sdk 2.2.87 → 2.2.88-rc.0

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 (141) 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/models/components/accountsummary.d.ts +5 -6
  4. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  5. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  6. package/dist/commonjs/models/components/collateralposition.d.ts +5 -6
  7. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  8. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  9. package/dist/commonjs/models/components/creditborrowparams.d.ts +5 -6
  10. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  11. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  12. package/dist/commonjs/models/components/creditborrowrequest.d.ts +5 -6
  13. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  14. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  15. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +5 -6
  16. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  18. package/dist/commonjs/models/components/creditlooprequest.d.ts +20 -6
  19. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/creditlooprequest.js +6 -0
  21. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  22. package/dist/commonjs/models/components/creditprotocol.d.ts +10 -12
  23. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/creditprotocol.js +5 -6
  25. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  26. package/dist/commonjs/models/components/creditrepayparams.d.ts +5 -6
  27. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  29. package/dist/commonjs/models/components/creditrepayrequest.d.ts +5 -6
  30. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  32. package/dist/commonjs/models/components/creditsupplyparams.d.ts +5 -6
  33. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  35. package/dist/commonjs/models/components/creditunlooprequest.d.ts +20 -6
  36. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/creditunlooprequest.js +6 -0
  38. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  39. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +5 -6
  40. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  41. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  42. package/dist/commonjs/models/components/debtposition.d.ts +5 -6
  43. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  45. package/dist/commonjs/models/components/loopedposition.d.ts +5 -6
  46. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  48. package/dist/commonjs/models/components/rebalancetarget.d.ts +5 -6
  49. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  50. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  51. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +5 -6
  52. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  54. package/dist/esm/lib/config.d.ts +2 -2
  55. package/dist/esm/lib/config.js +2 -2
  56. package/dist/esm/models/components/accountsummary.d.ts +5 -6
  57. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  58. package/dist/esm/models/components/accountsummary.js.map +1 -1
  59. package/dist/esm/models/components/collateralposition.d.ts +5 -6
  60. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  61. package/dist/esm/models/components/collateralposition.js.map +1 -1
  62. package/dist/esm/models/components/creditborrowparams.d.ts +5 -6
  63. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  64. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  65. package/dist/esm/models/components/creditborrowrequest.d.ts +5 -6
  66. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  67. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  68. package/dist/esm/models/components/creditenablecollateralparams.d.ts +5 -6
  69. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  70. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  71. package/dist/esm/models/components/creditlooprequest.d.ts +20 -6
  72. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  73. package/dist/esm/models/components/creditlooprequest.js +6 -0
  74. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  75. package/dist/esm/models/components/creditprotocol.d.ts +10 -12
  76. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  77. package/dist/esm/models/components/creditprotocol.js +5 -6
  78. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  79. package/dist/esm/models/components/creditrepayparams.d.ts +5 -6
  80. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  81. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  82. package/dist/esm/models/components/creditrepayrequest.d.ts +5 -6
  83. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  84. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  85. package/dist/esm/models/components/creditsupplyparams.d.ts +5 -6
  86. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  87. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  88. package/dist/esm/models/components/creditunlooprequest.d.ts +20 -6
  89. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  90. package/dist/esm/models/components/creditunlooprequest.js +6 -0
  91. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  92. package/dist/esm/models/components/creditwithdrawparams.d.ts +5 -6
  93. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  94. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  95. package/dist/esm/models/components/debtposition.d.ts +5 -6
  96. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  97. package/dist/esm/models/components/debtposition.js.map +1 -1
  98. package/dist/esm/models/components/loopedposition.d.ts +5 -6
  99. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  100. package/dist/esm/models/components/loopedposition.js.map +1 -1
  101. package/dist/esm/models/components/rebalancetarget.d.ts +5 -6
  102. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  103. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  104. package/dist/esm/models/components/rebalancetargetpreview.d.ts +5 -6
  105. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  106. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  107. package/docs/models/components/accountsummary.md +11 -11
  108. package/docs/models/components/collateralposition.md +17 -17
  109. package/docs/models/components/creditborrowparams.md +11 -11
  110. package/docs/models/components/creditborrowrequest.md +21 -21
  111. package/docs/models/components/creditenablecollateralparams.md +7 -7
  112. package/docs/models/components/creditlooprequest.md +17 -14
  113. package/docs/models/components/creditprotocol.md +5 -6
  114. package/docs/models/components/creditrepayparams.md +10 -10
  115. package/docs/models/components/creditrepayrequest.md +20 -20
  116. package/docs/models/components/creditsupplyparams.md +9 -9
  117. package/docs/models/components/creditunlooprequest.md +15 -12
  118. package/docs/models/components/creditwithdrawparams.md +9 -9
  119. package/docs/models/components/debtposition.md +16 -16
  120. package/docs/models/components/loopedposition.md +14 -14
  121. package/docs/models/components/rebalancetarget.md +10 -10
  122. package/docs/models/components/rebalancetargetpreview.md +16 -16
  123. package/openapi_prepped_for_speakeasy.json +67 -3
  124. package/package.json +1 -1
  125. package/src/lib/config.ts +2 -2
  126. package/src/models/components/accountsummary.ts +5 -6
  127. package/src/models/components/collateralposition.ts +5 -6
  128. package/src/models/components/creditborrowparams.ts +5 -6
  129. package/src/models/components/creditborrowrequest.ts +5 -6
  130. package/src/models/components/creditenablecollateralparams.ts +5 -6
  131. package/src/models/components/creditlooprequest.ts +26 -6
  132. package/src/models/components/creditprotocol.ts +10 -12
  133. package/src/models/components/creditrepayparams.ts +5 -6
  134. package/src/models/components/creditrepayrequest.ts +5 -6
  135. package/src/models/components/creditsupplyparams.ts +5 -6
  136. package/src/models/components/creditunlooprequest.ts +26 -6
  137. package/src/models/components/creditwithdrawparams.ts +5 -6
  138. package/src/models/components/debtposition.ts +5 -6
  139. package/src/models/components/loopedposition.ts +5 -6
  140. package/src/models/components/rebalancetarget.ts +5 -6
  141. package/src/models/components/rebalancetargetpreview.ts +5 -6
@@ -20,13 +20,13 @@ let value: RebalanceTarget = {
20
20
 
21
21
  ## Fields
22
22
 
23
- | Field | Type | Required | Description | Example |
24
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
25
- | `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. ``EULER`` opts in to the<br/>Euler V2 path, where the market is identified by EVK vault address(es).<br/>``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is<br/>currently read-only: positions and market discovery only — transaction<br/>builders land with the looping work (COM-7106/7107/7108), so transact<br/>endpoints reject it with a 422. | |
26
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
27
- | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral for this position. For MORPHO it must be the market's collateral token. | |
28
- | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed against the collateral for this position. For MORPHO it must be the market's loan token. | |
29
- | `targetEquityUsd` | *components.TargetEquityUsd* | :heavy_minus_sign: | SIZE knob: the net value (collateral − debt, in USD) to commit to this position; total collateral ≈ target_equity_usd × target_multiplier. To remove a position use close=true, never target_equity_usd=0. | |
30
- | `targetMultiplier` | *components.RebalanceTargetTargetMultiplier* | :heavy_minus_sign: | LEVERAGE knob: total collateral exposure ÷ equity. 1 means unlevered supplied collateral. The protocol maximum is enforced when the plan is built. | |
31
- | `close` | *boolean* | :heavy_minus_sign: | If true, fully unwind this position: the debt is cleared exactly (accrued interest included) and the pair collateral is returned to the Credit Account. | false |
32
- | `maxSlippagePercent` | *components.RebalanceTargetMaxSlippagePercent* | :heavy_minus_sign: | Per-target override of the request-level per-swap slippage tolerance in percent. | |
23
+ | Field | Type | Required | Description | Example |
24
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho<br/>Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler<br/>V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and<br/>supports isolated per-sub-account positions (``sub_account_id``). All three<br/>support the loop/unloop leverage endpoints. | |
26
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
27
+ | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral for this position. For MORPHO it must be the market's collateral token. | |
28
+ | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed against the collateral for this position. For MORPHO it must be the market's loan token. | |
29
+ | `targetEquityUsd` | *components.TargetEquityUsd* | :heavy_minus_sign: | SIZE knob: the net value (collateral − debt, in USD) to commit to this position; total collateral ≈ target_equity_usd × target_multiplier. To remove a position use close=true, never target_equity_usd=0. | |
30
+ | `targetMultiplier` | *components.RebalanceTargetTargetMultiplier* | :heavy_minus_sign: | LEVERAGE knob: total collateral exposure ÷ equity. 1 means unlevered supplied collateral. The protocol maximum is enforced when the plan is built. | |
31
+ | `close` | *boolean* | :heavy_minus_sign: | If true, fully unwind this position: the debt is cleared exactly (accrued interest included) and the pair collateral is returned to the Credit Account. | false |
32
+ | `maxSlippagePercent` | *components.RebalanceTargetMaxSlippagePercent* | :heavy_minus_sign: | Per-target override of the request-level per-swap slippage tolerance in percent. | |
@@ -26,19 +26,19 @@ let value: RebalanceTargetPreview = {
26
26
 
27
27
  ## Fields
28
28
 
29
- | Field | Type | Required | Description | Example |
30
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
31
- | `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_check_mark: | 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. ``EULER`` opts in to the<br/>Euler V2 path, where the market is identified by EVK vault address(es).<br/>``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is<br/>currently read-only: positions and market discovery only — transaction<br/>builders land with the looping work (COM-7106/7107/7108), so transact<br/>endpoints reject it with a 422. | |
32
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id of this position. | |
33
- | `collateralToken` | *string* | :heavy_check_mark: | Collateral token address (echoes the request target; joins against /v2/credit/looped_positions). | |
34
- | `borrowToken` | *string* | :heavy_check_mark: | Borrow token address (echoes the request target). | |
35
- | `direction` | [components.RebalanceDirection](../../models/components/rebalancedirection.md) | :heavy_check_mark: | What the plan does to one named target. | |
36
- | `legs` | *number* | :heavy_check_mark: | On-chain legs planned for this target (loop + unloop iterations); 0 for a noop. | |
37
- | `unloopLegs` | [components.UnloopLegPreview](../../models/components/unlooplegpreview.md)[] | :heavy_minus_sign: | Per-iteration unwind breakdown — populated for releasers (close / shrink / lever_down). | [] |
38
- | `loopLegs` | [components.LoopLegPreview](../../models/components/looplegpreview.md)[] | :heavy_minus_sign: | Per-iteration loop breakdown — populated for consumers (open / grow / lever_up). | [] |
39
- | `resultingCollateral` | *string* | :heavy_check_mark: | Guaranteed minimum collateral supplied to this position after the rebalance (token units). | |
40
- | `resultingDebt` | *string* | :heavy_check_mark: | Projected debt owed by this position after the rebalance (borrow-token units); 0 on a close. | |
41
- | `resultingMultiplier` | *string* | :heavy_check_mark: | Projected leverage of this position after the rebalance; 1 when the debt is cleared. Never promises more leverage (or, when deleveraging, more deleverage) than is guaranteed. | |
42
- | `resultingHealthFactor` | *string* | :heavy_check_mark: | Projected health factor of this position after the rebalance. Never overstated at the 1.0 boundary — a liquidatable position is never presented as safe. See health_factor_scope for what it covers. | |
43
- | `healthFactorScope` | [components.RebalanceTargetPreviewHealthFactorScope](../../models/components/rebalancetargetpreviewhealthfactorscope.md) | :heavy_check_mark: | 'market' for Morpho (isolated per-market health). 'account' for Aave: collateral is pooled, so all collateral backs all debt and this health factor is shared by every Aave position on the account. | |
44
- | `estimatedMaxDust` | *string* | :heavy_check_mark: | Upper bound of surplus this target's own swaps can leave in the Credit Account (sum of each swap's quote minus its guaranteed floor). Routing swaps are counted book-level, not here. It accumulates in the Credit Account, is recoverable, and is never lost. | |
29
+ | Field | Type | Required | Description | Example |
30
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31
+ | `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_check_mark: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho<br/>Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler<br/>V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and<br/>supports isolated per-sub-account positions (``sub_account_id``). All three<br/>support the loop/unloop leverage endpoints. | |
32
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id of this position. | |
33
+ | `collateralToken` | *string* | :heavy_check_mark: | Collateral token address (echoes the request target; joins against /v2/credit/looped_positions). | |
34
+ | `borrowToken` | *string* | :heavy_check_mark: | Borrow token address (echoes the request target). | |
35
+ | `direction` | [components.RebalanceDirection](../../models/components/rebalancedirection.md) | :heavy_check_mark: | What the plan does to one named target. | |
36
+ | `legs` | *number* | :heavy_check_mark: | On-chain legs planned for this target (loop + unloop iterations); 0 for a noop. | |
37
+ | `unloopLegs` | [components.UnloopLegPreview](../../models/components/unlooplegpreview.md)[] | :heavy_minus_sign: | Per-iteration unwind breakdown — populated for releasers (close / shrink / lever_down). | [] |
38
+ | `loopLegs` | [components.LoopLegPreview](../../models/components/looplegpreview.md)[] | :heavy_minus_sign: | Per-iteration loop breakdown — populated for consumers (open / grow / lever_up). | [] |
39
+ | `resultingCollateral` | *string* | :heavy_check_mark: | Guaranteed minimum collateral supplied to this position after the rebalance (token units). | |
40
+ | `resultingDebt` | *string* | :heavy_check_mark: | Projected debt owed by this position after the rebalance (borrow-token units); 0 on a close. | |
41
+ | `resultingMultiplier` | *string* | :heavy_check_mark: | Projected leverage of this position after the rebalance; 1 when the debt is cleared. Never promises more leverage (or, when deleveraging, more deleverage) than is guaranteed. | |
42
+ | `resultingHealthFactor` | *string* | :heavy_check_mark: | Projected health factor of this position after the rebalance. Never overstated at the 1.0 boundary — a liquidatable position is never presented as safe. See health_factor_scope for what it covers. | |
43
+ | `healthFactorScope` | [components.RebalanceTargetPreviewHealthFactorScope](../../models/components/rebalancetargetpreviewhealthfactorscope.md) | :heavy_check_mark: | 'market' for Morpho (isolated per-market health). 'account' for Aave: collateral is pooled, so all collateral backs all debt and this health factor is shared by every Aave position on the account. | |
44
+ | `estimatedMaxDust` | *string* | :heavy_check_mark: | Upper bound of surplus this target's own swaps can leave in the Credit Account (sum of each swap's quote minus its guaranteed floor). Routing swaps are counted book-level, not here. It accumulates in the Credit Account, is recoverable, and is never lost. | |
@@ -13086,7 +13086,7 @@
13086
13086
  },
13087
13087
  "protocol": {
13088
13088
  "$ref": "#/components/schemas/CreditProtocol",
13089
- "description": "Lending protocol to loop into: AAVE or MORPHO. EULER looping is not available yet.",
13089
+ "description": "Lending protocol to loop into: AAVE, MORPHO, or EULER.",
13090
13090
  "example": "AAVE"
13091
13091
  },
13092
13092
  "market_id": {
@@ -13101,6 +13101,38 @@
13101
13101
  "title": "Market Id",
13102
13102
  "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
13103
13103
  },
13104
+ "collateral_vault": {
13105
+ "anyOf": [
13106
+ {
13107
+ "type": "string"
13108
+ },
13109
+ {
13110
+ "type": "null"
13111
+ }
13112
+ ],
13113
+ "title": "Collateral Vault",
13114
+ "description": "Euler only: the EVK vault address collateral is supplied to (from /v2/credit/euler_markets). Required when protocol=EULER."
13115
+ },
13116
+ "borrow_vault": {
13117
+ "anyOf": [
13118
+ {
13119
+ "type": "string"
13120
+ },
13121
+ {
13122
+ "type": "null"
13123
+ }
13124
+ ],
13125
+ "title": "Borrow Vault",
13126
+ "description": "Euler only: the EVK vault address borrowed from (the sub-account's controller). Required when protocol=EULER."
13127
+ },
13128
+ "sub_account_id": {
13129
+ "type": "integer",
13130
+ "maximum": 255.0,
13131
+ "minimum": 0.0,
13132
+ "title": "Sub Account Id",
13133
+ "description": "Euler only: the EVC sub-account (0-255) holding this isolated looped position. 0 is the Credit Account itself.",
13134
+ "example": 0
13135
+ },
13104
13136
  "collateral_token": {
13105
13137
  "type": "string",
13106
13138
  "title": "Token",
@@ -13381,7 +13413,7 @@
13381
13413
  "MORPHO"
13382
13414
  ],
13383
13415
  "title": "CreditProtocol",
13384
- "description": "Which lending protocol a credit action targets.\n\n``AAVE`` is the default so existing callers (which never send a ``protocol``\nfield) keep hitting the unchanged Aave code path. ``EULER`` opts in to the\nEuler V2 path, where the market is identified by EVK vault address(es).\n``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is\ncurrently read-only: positions and market discovery only \u2014 transaction\nbuilders land with the looping work (COM-7106/7107/7108), so transact\nendpoints reject it with a 422."
13416
+ "description": "Which lending protocol a credit action targets.\n\n``AAVE`` is the default so existing callers (which never send a ``protocol``\nfield) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho\nBlue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler\nV2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and\nsupports isolated per-sub-account positions (``sub_account_id``). All three\nsupport the loop/unloop leverage endpoints."
13385
13417
  },
13386
13418
  "CreditRebalancePreview": {
13387
13419
  "properties": {
@@ -14207,7 +14239,7 @@
14207
14239
  },
14208
14240
  "protocol": {
14209
14241
  "$ref": "#/components/schemas/CreditProtocol",
14210
- "description": "Lending protocol to unwind: AAVE or MORPHO. EULER unlooping is not available yet.",
14242
+ "description": "Lending protocol to unwind: AAVE, MORPHO, or EULER.",
14211
14243
  "example": "AAVE"
14212
14244
  },
14213
14245
  "market_id": {
@@ -14222,6 +14254,38 @@
14222
14254
  "title": "Market Id",
14223
14255
  "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
14224
14256
  },
14257
+ "collateral_vault": {
14258
+ "anyOf": [
14259
+ {
14260
+ "type": "string"
14261
+ },
14262
+ {
14263
+ "type": "null"
14264
+ }
14265
+ ],
14266
+ "title": "Collateral Vault",
14267
+ "description": "Euler only: the EVK vault the loop's collateral is in. Required when protocol=EULER."
14268
+ },
14269
+ "borrow_vault": {
14270
+ "anyOf": [
14271
+ {
14272
+ "type": "string"
14273
+ },
14274
+ {
14275
+ "type": "null"
14276
+ }
14277
+ ],
14278
+ "title": "Borrow Vault",
14279
+ "description": "Euler only: the EVK vault the loop borrowed from (the sub-account's controller). Required when protocol=EULER."
14280
+ },
14281
+ "sub_account_id": {
14282
+ "type": "integer",
14283
+ "maximum": 255.0,
14284
+ "minimum": 0.0,
14285
+ "title": "Sub Account Id",
14286
+ "description": "Euler only: the EVC sub-account (0-255) holding the looped position to unwind. 0 is the Credit Account itself.",
14287
+ "example": 0
14288
+ },
14225
14289
  "collateral_token": {
14226
14290
  "type": "string",
14227
14291
  "title": "Token",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.87",
3
+ "version": "2.2.88-rc.0",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
package/src/lib/config.ts CHANGED
@@ -62,7 +62,7 @@ export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
64
  sdkVersion: "2.0.0",
65
- genVersion: "2.916.4",
65
+ genVersion: "2.917.0",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 2.0.0 2.916.4 0.0.1 @compass-labs/api-sdk",
67
+ "speakeasy-sdk/typescript 2.0.0 2.917.0 0.0.1 @compass-labs/api-sdk",
68
68
  } as const;
@@ -28,12 +28,11 @@ export type AccountSummary = {
28
28
  * @remarks
29
29
  *
30
30
  * ``AAVE`` is the default so existing callers (which never send a ``protocol``
31
- * field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
32
- * Euler V2 path, where the market is identified by EVK vault address(es).
33
- * ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
34
- * currently read-only: positions and market discovery only — transaction
35
- * builders land with the looping work (COM-7106/7107/7108), so transact
36
- * endpoints reject it with a 422.
31
+ * field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
32
+ * Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
33
+ * V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
34
+ * supports isolated per-sub-account positions (``sub_account_id``). All three
35
+ * support the loop/unloop leverage endpoints.
37
36
  */
38
37
  protocol?: CreditProtocol | undefined;
39
38
  /**
@@ -31,12 +31,11 @@ export type CollateralPosition = {
31
31
  * @remarks
32
32
  *
33
33
  * ``AAVE`` is the default so existing callers (which never send a ``protocol``
34
- * field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
35
- * Euler V2 path, where the market is identified by EVK vault address(es).
36
- * ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
37
- * currently read-only: positions and market discovery only — transaction
38
- * builders land with the looping work (COM-7106/7107/7108), so transact
39
- * endpoints reject it with a 422.
34
+ * field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
35
+ * Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
36
+ * V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
37
+ * supports isolated per-sub-account positions (``sub_account_id``). All three
38
+ * support the loop/unloop leverage endpoints.
40
39
  */
41
40
  protocol?: CreditProtocol | undefined;
42
41
  /**
@@ -54,12 +54,11 @@ export type CreditBorrowParams = {
54
54
  * @remarks
55
55
  *
56
56
  * ``AAVE`` is the default so existing callers (which never send a ``protocol``
57
- * field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
58
- * Euler V2 path, where the market is identified by EVK vault address(es).
59
- * ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
60
- * currently read-only: positions and market discovery only — transaction
61
- * builders land with the looping work (COM-7106/7107/7108), so transact
62
- * endpoints reject it with a 422.
57
+ * field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
58
+ * Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
59
+ * V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
60
+ * supports isolated per-sub-account positions (``sub_account_id``). All three
61
+ * support the loop/unloop leverage endpoints.
63
62
  */
64
63
  protocol?: CreditProtocol | undefined;
65
64
  /**
@@ -49,12 +49,11 @@ export type CreditBorrowRequest = {
49
49
  * @remarks
50
50
  *
51
51
  * ``AAVE`` is the default so existing callers (which never send a ``protocol``
52
- * field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
53
- * Euler V2 path, where the market is identified by EVK vault address(es).
54
- * ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
55
- * currently read-only: positions and market discovery only — transaction
56
- * builders land with the looping work (COM-7106/7107/7108), so transact
57
- * endpoints reject it with a 422.
52
+ * field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
53
+ * Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
54
+ * V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
55
+ * supports isolated per-sub-account positions (``sub_account_id``). All three
56
+ * support the loop/unloop leverage endpoints.
58
57
  */
59
58
  protocol?: CreditProtocol | undefined;
60
59
  /**
@@ -29,12 +29,11 @@ export type CreditEnableCollateralParams = {
29
29
  * @remarks
30
30
  *
31
31
  * ``AAVE`` is the default so existing callers (which never send a ``protocol``
32
- * field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
33
- * Euler V2 path, where the market is identified by EVK vault address(es).
34
- * ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
35
- * currently read-only: positions and market discovery only — transaction
36
- * builders land with the looping work (COM-7106/7107/7108), so transact
37
- * endpoints reject it with a 422.
32
+ * field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
33
+ * Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
34
+ * V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
35
+ * supports isolated per-sub-account positions (``sub_account_id``). All three
36
+ * support the loop/unloop leverage endpoints.
38
37
  */
39
38
  protocol?: CreditProtocol | undefined;
40
39
  /**