@compass-labs/api-sdk 2.2.110 → 2.2.111

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 (137) hide show
  1. package/dist/commonjs/models/components/accountsummary.d.ts +2 -3
  2. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  3. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  4. package/dist/commonjs/models/components/collateralposition.d.ts +2 -3
  5. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  6. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  7. package/dist/commonjs/models/components/creditborrowparams.d.ts +2 -3
  8. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  10. package/dist/commonjs/models/components/creditborrowrequest.d.ts +2 -3
  11. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  13. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +2 -3
  14. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  16. package/dist/commonjs/models/components/creditlooprequest.d.ts +2 -3
  17. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  19. package/dist/commonjs/models/components/creditprotocol.d.ts +4 -6
  20. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  21. package/dist/commonjs/models/components/creditprotocol.js +2 -3
  22. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  23. package/dist/commonjs/models/components/creditrepayparams.d.ts +2 -3
  24. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  26. package/dist/commonjs/models/components/creditrepayrequest.d.ts +2 -3
  27. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  29. package/dist/commonjs/models/components/creditsupplyparams.d.ts +2 -3
  30. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  32. package/dist/commonjs/models/components/creditunlooprequest.d.ts +2 -3
  33. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  35. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +2 -3
  36. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  38. package/dist/commonjs/models/components/debtposition.d.ts +2 -3
  39. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  41. package/dist/commonjs/models/components/loopedposition.d.ts +2 -3
  42. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  43. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  44. package/dist/commonjs/models/components/rebalancetarget.d.ts +17 -3
  45. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  46. package/dist/commonjs/models/components/rebalancetarget.js +6 -0
  47. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  48. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +17 -6
  49. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  50. package/dist/commonjs/models/components/rebalancetargetpreview.js +7 -1
  51. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  52. package/dist/esm/models/components/accountsummary.d.ts +2 -3
  53. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  54. package/dist/esm/models/components/accountsummary.js.map +1 -1
  55. package/dist/esm/models/components/collateralposition.d.ts +2 -3
  56. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  57. package/dist/esm/models/components/collateralposition.js.map +1 -1
  58. package/dist/esm/models/components/creditborrowparams.d.ts +2 -3
  59. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  60. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  61. package/dist/esm/models/components/creditborrowrequest.d.ts +2 -3
  62. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  63. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  64. package/dist/esm/models/components/creditenablecollateralparams.d.ts +2 -3
  65. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  66. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  67. package/dist/esm/models/components/creditlooprequest.d.ts +2 -3
  68. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  69. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  70. package/dist/esm/models/components/creditprotocol.d.ts +4 -6
  71. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  72. package/dist/esm/models/components/creditprotocol.js +2 -3
  73. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  74. package/dist/esm/models/components/creditrepayparams.d.ts +2 -3
  75. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  76. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  77. package/dist/esm/models/components/creditrepayrequest.d.ts +2 -3
  78. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  79. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  80. package/dist/esm/models/components/creditsupplyparams.d.ts +2 -3
  81. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  82. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  83. package/dist/esm/models/components/creditunlooprequest.d.ts +2 -3
  84. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  85. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  86. package/dist/esm/models/components/creditwithdrawparams.d.ts +2 -3
  87. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  88. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  89. package/dist/esm/models/components/debtposition.d.ts +2 -3
  90. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  91. package/dist/esm/models/components/debtposition.js.map +1 -1
  92. package/dist/esm/models/components/loopedposition.d.ts +2 -3
  93. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  94. package/dist/esm/models/components/loopedposition.js.map +1 -1
  95. package/dist/esm/models/components/rebalancetarget.d.ts +17 -3
  96. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  97. package/dist/esm/models/components/rebalancetarget.js +6 -0
  98. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  99. package/dist/esm/models/components/rebalancetargetpreview.d.ts +17 -6
  100. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  101. package/dist/esm/models/components/rebalancetargetpreview.js +7 -1
  102. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  103. package/docs/models/components/accountsummary.md +11 -11
  104. package/docs/models/components/collateralposition.md +17 -17
  105. package/docs/models/components/creditborrowparams.md +11 -11
  106. package/docs/models/components/creditborrowrequest.md +21 -21
  107. package/docs/models/components/creditenablecollateralparams.md +7 -7
  108. package/docs/models/components/creditlooprequest.md +19 -19
  109. package/docs/models/components/creditprotocol.md +2 -3
  110. package/docs/models/components/creditrepayparams.md +10 -10
  111. package/docs/models/components/creditrepayrequest.md +20 -20
  112. package/docs/models/components/creditsupplyparams.md +9 -9
  113. package/docs/models/components/creditunlooprequest.md +17 -17
  114. package/docs/models/components/creditwithdrawparams.md +9 -9
  115. package/docs/models/components/debtposition.md +16 -16
  116. package/docs/models/components/loopedposition.md +17 -17
  117. package/docs/models/components/rebalancetarget.md +13 -10
  118. package/docs/models/components/rebalancetargetpreview.md +19 -16
  119. package/docs/models/components/rebalancetargetpreviewhealthfactorscope.md +1 -1
  120. package/openapi_prepped_for_speakeasy.json +78 -4
  121. package/package.json +1 -1
  122. package/src/models/components/accountsummary.ts +2 -3
  123. package/src/models/components/collateralposition.ts +2 -3
  124. package/src/models/components/creditborrowparams.ts +2 -3
  125. package/src/models/components/creditborrowrequest.ts +2 -3
  126. package/src/models/components/creditenablecollateralparams.ts +2 -3
  127. package/src/models/components/creditlooprequest.ts +2 -3
  128. package/src/models/components/creditprotocol.ts +4 -6
  129. package/src/models/components/creditrepayparams.ts +2 -3
  130. package/src/models/components/creditrepayrequest.ts +2 -3
  131. package/src/models/components/creditsupplyparams.ts +2 -3
  132. package/src/models/components/creditunlooprequest.ts +2 -3
  133. package/src/models/components/creditwithdrawparams.ts +2 -3
  134. package/src/models/components/debtposition.ts +2 -3
  135. package/src/models/components/loopedposition.ts +2 -3
  136. package/src/models/components/rebalancetarget.ts +23 -3
  137. package/src/models/components/rebalancetargetpreview.ts +23 -6
@@ -40,9 +40,8 @@ export type CreditEnableCollateralParams = {
40
40
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
41
41
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
42
42
  *
43
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
44
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
45
- * which rejects EULER with a 422.
43
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
44
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
46
45
  */
47
46
  protocol?: CreditProtocol | undefined;
48
47
  /**
@@ -94,9 +94,8 @@ export type CreditLoopRequest = {
94
94
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
95
95
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
96
96
  *
97
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
98
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
99
- * which rejects EULER with a 422.
97
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
98
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
100
99
  */
101
100
  protocol?: CreditProtocol | undefined;
102
101
  /**
@@ -22,9 +22,8 @@ import { ClosedEnum } from "../../types/enums.js";
22
22
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
23
23
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
24
24
  *
25
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
26
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
27
- * which rejects EULER with a 422.
25
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
26
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
28
27
  */
29
28
  export const CreditProtocol = {
30
29
  Aave: "AAVE",
@@ -48,9 +47,8 @@ export const CreditProtocol = {
48
47
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
49
48
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
50
49
  *
51
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
52
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
53
- * which rejects EULER with a 422.
50
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
51
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
54
52
  */
55
53
  export type CreditProtocol = ClosedEnum<typeof CreditProtocol>;
56
54
 
@@ -56,9 +56,8 @@ export type CreditRepayParams = {
56
56
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
57
57
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
58
58
  *
59
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
60
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
61
- * which rejects EULER with a 422.
59
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
60
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
62
61
  */
63
62
  protocol?: CreditProtocol | undefined;
64
63
  /**
@@ -73,9 +73,8 @@ export type CreditRepayRequest = {
73
73
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
74
74
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
75
75
  *
76
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
77
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
78
- * which rejects EULER with a 422.
76
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
77
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
79
78
  */
80
79
  protocol?: CreditProtocol | undefined;
81
80
  /**
@@ -44,9 +44,8 @@ export type CreditSupplyParams = {
44
44
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
45
45
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
46
46
  *
47
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
48
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
49
- * which rejects EULER with a 422.
47
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
48
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
50
49
  */
51
50
  protocol?: CreditProtocol | undefined;
52
51
  /**
@@ -86,9 +86,8 @@ export type CreditUnloopRequest = {
86
86
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
87
87
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
88
88
  *
89
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
90
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
91
- * which rejects EULER with a 422.
89
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
90
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
92
91
  */
93
92
  protocol?: CreditProtocol | undefined;
94
93
  /**
@@ -44,9 +44,8 @@ export type CreditWithdrawParams = {
44
44
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
45
45
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
46
46
  *
47
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
48
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
49
- * which rejects EULER with a 422.
47
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
48
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
50
49
  */
51
50
  protocol?: CreditProtocol | undefined;
52
51
  /**
@@ -42,9 +42,8 @@ export type DebtPosition = {
42
42
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
43
43
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
44
44
  *
45
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
46
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
47
- * which rejects EULER with a 422.
45
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
46
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
48
47
  */
49
48
  protocol?: CreditProtocol | undefined;
50
49
  /**
@@ -58,9 +58,8 @@ export type LoopedPosition = {
58
58
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
59
59
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
60
60
  *
61
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
62
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
63
- * which rejects EULER with a 422.
61
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
62
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
64
63
  */
65
64
  protocol: CreditProtocol;
66
65
  /**
@@ -51,15 +51,26 @@ export type RebalanceTarget = {
51
51
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
52
52
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
53
53
  *
54
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
55
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
56
- * which rejects EULER with a 422.
54
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
55
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
57
56
  */
58
57
  protocol?: CreditProtocol | undefined;
59
58
  /**
60
59
  * Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
61
60
  */
62
61
  marketId?: string | null | undefined;
62
+ /**
63
+ * Euler only: the EVK vault the collateral is supplied to (from /v2/credit/euler_markets). Required when protocol=EULER.
64
+ */
65
+ collateralVault?: string | null | undefined;
66
+ /**
67
+ * Euler only: the EVK vault borrowed from (the sub-account's controller). Required when protocol=EULER.
68
+ */
69
+ borrowVault?: string | null | undefined;
70
+ /**
71
+ * Euler only: the EVC sub-account (0-255) this position lives in. Omit it and the plan resolves it from the live book: the sub-account already holding this vault pair, else the lowest free sub-account for a new position. The resolved id is echoed in the preview. Pass it explicitly when the same pair is open on several sub-accounts.
72
+ */
73
+ subAccountId?: number | null | undefined;
63
74
  /**
64
75
  * Token supplied as collateral for this position. For MORPHO it must be the market's collateral token.
65
76
  */
@@ -146,6 +157,9 @@ export function rebalanceTargetMaxSlippagePercentToJSON(
146
157
  export type RebalanceTarget$Outbound = {
147
158
  protocol?: string | undefined;
148
159
  market_id?: string | null | undefined;
160
+ collateral_vault?: string | null | undefined;
161
+ borrow_vault?: string | null | undefined;
162
+ sub_account_id?: number | null | undefined;
149
163
  collateral_token: string;
150
164
  borrow_token: string;
151
165
  target_equity_usd?: number | string | null | undefined;
@@ -162,6 +176,9 @@ export const RebalanceTarget$outboundSchema: z.ZodType<
162
176
  > = z.object({
163
177
  protocol: CreditProtocol$outboundSchema.optional(),
164
178
  marketId: z.nullable(z.string()).optional(),
179
+ collateralVault: z.nullable(z.string()).optional(),
180
+ borrowVault: z.nullable(z.string()).optional(),
181
+ subAccountId: z.nullable(z.number().int()).optional(),
165
182
  collateralToken: z.string(),
166
183
  borrowToken: z.string(),
167
184
  targetEquityUsd: z.nullable(z.union([z.number(), z.string()])).optional(),
@@ -171,6 +188,9 @@ export const RebalanceTarget$outboundSchema: z.ZodType<
171
188
  }).transform((v) => {
172
189
  return remap$(v, {
173
190
  marketId: "market_id",
191
+ collateralVault: "collateral_vault",
192
+ borrowVault: "borrow_vault",
193
+ subAccountId: "sub_account_id",
174
194
  collateralToken: "collateral_token",
175
195
  borrowToken: "borrow_token",
176
196
  targetEquityUsd: "target_equity_usd",
@@ -26,14 +26,14 @@ import {
26
26
  } from "./unlooplegpreview.js";
27
27
 
28
28
  /**
29
- * '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.
29
+ * 'market' for Morpho and Euler (isolated health: per Morpho market, per Euler EVC sub-account). '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.
30
30
  */
31
31
  export const RebalanceTargetPreviewHealthFactorScope = {
32
32
  Market: "market",
33
33
  Account: "account",
34
34
  } as const;
35
35
  /**
36
- * '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.
36
+ * 'market' for Morpho and Euler (isolated health: per Morpho market, per Euler EVC sub-account). '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.
37
37
  */
38
38
  export type RebalanceTargetPreviewHealthFactorScope = ClosedEnum<
39
39
  typeof RebalanceTargetPreviewHealthFactorScope
@@ -60,15 +60,26 @@ export type RebalanceTargetPreview = {
60
60
  * chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
61
61
  * (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
62
62
  *
63
- * All three support ``/v2/credit/loop``, ``/v2/credit/unloop`` and
64
- * ``/v2/credit/looped_positions``. The one gap is ``/v2/credit/rebalance``,
65
- * which rejects EULER with a 422.
63
+ * All three support ``/v2/credit/loop``, ``/v2/credit/unloop``,
64
+ * ``/v2/credit/looped_positions`` and ``/v2/credit/rebalance``.
66
65
  */
67
66
  protocol: CreditProtocol;
68
67
  /**
69
68
  * Morpho only: the bytes32 market id of this position.
70
69
  */
71
70
  marketId?: string | null | undefined;
71
+ /**
72
+ * Euler only: the EVC sub-account (0-255) this position lives in — the id the request named, or the one the plan resolved when the target omitted it. Feed it back to /v2/credit/unloop and match it on /v2/credit/looped_positions.
73
+ */
74
+ subAccountId?: number | null | undefined;
75
+ /**
76
+ * Euler only: the EVK vault holding the collateral (echoes the request target).
77
+ */
78
+ collateralVault?: string | null | undefined;
79
+ /**
80
+ * Euler only: the EVK controller vault the debt is owed to (echoes the request target).
81
+ */
82
+ borrowVault?: string | null | undefined;
72
83
  /**
73
84
  * Collateral token address (echoes the request target; joins against /v2/credit/looped_positions).
74
85
  */
@@ -110,7 +121,7 @@ export type RebalanceTargetPreview = {
110
121
  */
111
122
  resultingHealthFactor: string;
112
123
  /**
113
- * '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.
124
+ * 'market' for Morpho and Euler (isolated health: per Morpho market, per Euler EVC sub-account). '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.
114
125
  */
115
126
  healthFactorScope: RebalanceTargetPreviewHealthFactorScope;
116
127
  /**
@@ -132,6 +143,9 @@ export const RebalanceTargetPreview$inboundSchema: z.ZodType<
132
143
  > = z.object({
133
144
  protocol: CreditProtocol$inboundSchema,
134
145
  market_id: z.nullable(z.string()).optional(),
146
+ sub_account_id: z.nullable(z.number().int()).optional(),
147
+ collateral_vault: z.nullable(z.string()).optional(),
148
+ borrow_vault: z.nullable(z.string()).optional(),
135
149
  collateral_token: z.string(),
136
150
  borrow_token: z.string(),
137
151
  direction: RebalanceDirection$inboundSchema,
@@ -147,6 +161,9 @@ export const RebalanceTargetPreview$inboundSchema: z.ZodType<
147
161
  }).transform((v) => {
148
162
  return remap$(v, {
149
163
  "market_id": "marketId",
164
+ "sub_account_id": "subAccountId",
165
+ "collateral_vault": "collateralVault",
166
+ "borrow_vault": "borrowVault",
150
167
  "collateral_token": "collateralToken",
151
168
  "borrow_token": "borrowToken",
152
169
  "unloop_legs": "unloopLegs",