@compass-labs/api-sdk 2.2.83 → 2.2.84

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 (113) hide show
  1. package/dist/commonjs/models/components/accountsummary.d.ts +4 -0
  2. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  3. package/dist/commonjs/models/components/accountsummary.js +2 -0
  4. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  5. package/dist/commonjs/models/components/collateralposition.d.ts +4 -0
  6. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  7. package/dist/commonjs/models/components/collateralposition.js +2 -0
  8. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  9. package/dist/commonjs/models/components/creditborrowparams.d.ts +5 -0
  10. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  11. package/dist/commonjs/models/components/creditborrowparams.js +2 -0
  12. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  13. package/dist/commonjs/models/components/creditborrowrequest.d.ts +5 -0
  14. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/creditborrowrequest.js +2 -0
  16. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  17. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +5 -0
  18. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  19. package/dist/commonjs/models/components/creditenablecollateralparams.js +2 -0
  20. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  21. package/dist/commonjs/models/components/creditpositionsresponse.d.ts +5 -1
  22. package/dist/commonjs/models/components/creditpositionsresponse.d.ts.map +1 -1
  23. package/dist/commonjs/models/components/creditpositionsresponse.js +2 -0
  24. package/dist/commonjs/models/components/creditpositionsresponse.js.map +1 -1
  25. package/dist/commonjs/models/components/creditrepayparams.d.ts +5 -0
  26. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  27. package/dist/commonjs/models/components/creditrepayparams.js +2 -0
  28. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  29. package/dist/commonjs/models/components/creditrepayrequest.d.ts +5 -0
  30. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/creditrepayrequest.js +2 -0
  32. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  33. package/dist/commonjs/models/components/creditsupplyparams.d.ts +5 -0
  34. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/creditsupplyparams.js +2 -0
  36. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  37. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +5 -0
  38. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  39. package/dist/commonjs/models/components/creditwithdrawparams.js +2 -0
  40. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  41. package/dist/commonjs/models/components/debtposition.d.ts +4 -0
  42. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  43. package/dist/commonjs/models/components/debtposition.js +2 -0
  44. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  45. package/dist/esm/models/components/accountsummary.d.ts +4 -0
  46. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  47. package/dist/esm/models/components/accountsummary.js +2 -0
  48. package/dist/esm/models/components/accountsummary.js.map +1 -1
  49. package/dist/esm/models/components/collateralposition.d.ts +4 -0
  50. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  51. package/dist/esm/models/components/collateralposition.js +2 -0
  52. package/dist/esm/models/components/collateralposition.js.map +1 -1
  53. package/dist/esm/models/components/creditborrowparams.d.ts +5 -0
  54. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  55. package/dist/esm/models/components/creditborrowparams.js +2 -0
  56. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  57. package/dist/esm/models/components/creditborrowrequest.d.ts +5 -0
  58. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  59. package/dist/esm/models/components/creditborrowrequest.js +2 -0
  60. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  61. package/dist/esm/models/components/creditenablecollateralparams.d.ts +5 -0
  62. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  63. package/dist/esm/models/components/creditenablecollateralparams.js +2 -0
  64. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  65. package/dist/esm/models/components/creditpositionsresponse.d.ts +5 -1
  66. package/dist/esm/models/components/creditpositionsresponse.d.ts.map +1 -1
  67. package/dist/esm/models/components/creditpositionsresponse.js +2 -0
  68. package/dist/esm/models/components/creditpositionsresponse.js.map +1 -1
  69. package/dist/esm/models/components/creditrepayparams.d.ts +5 -0
  70. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  71. package/dist/esm/models/components/creditrepayparams.js +2 -0
  72. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  73. package/dist/esm/models/components/creditrepayrequest.d.ts +5 -0
  74. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  75. package/dist/esm/models/components/creditrepayrequest.js +2 -0
  76. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  77. package/dist/esm/models/components/creditsupplyparams.d.ts +5 -0
  78. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  79. package/dist/esm/models/components/creditsupplyparams.js +2 -0
  80. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  81. package/dist/esm/models/components/creditwithdrawparams.d.ts +5 -0
  82. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  83. package/dist/esm/models/components/creditwithdrawparams.js +2 -0
  84. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  85. package/dist/esm/models/components/debtposition.d.ts +4 -0
  86. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  87. package/dist/esm/models/components/debtposition.js +2 -0
  88. package/dist/esm/models/components/debtposition.js.map +1 -1
  89. package/docs/models/components/accountsummary.md +1 -0
  90. package/docs/models/components/collateralposition.md +1 -0
  91. package/docs/models/components/creditborrowparams.md +2 -0
  92. package/docs/models/components/creditborrowrequest.md +1 -0
  93. package/docs/models/components/creditenablecollateralparams.md +3 -1
  94. package/docs/models/components/creditpositionsresponse.md +11 -9
  95. package/docs/models/components/creditrepayparams.md +2 -0
  96. package/docs/models/components/creditrepayrequest.md +1 -0
  97. package/docs/models/components/creditsupplyparams.md +2 -0
  98. package/docs/models/components/credituseroperationbody.md +5 -0
  99. package/docs/models/components/creditwithdrawparams.md +2 -0
  100. package/docs/models/components/debtposition.md +1 -0
  101. package/openapi_prepped_for_speakeasy.json +102 -1
  102. package/package.json +1 -1
  103. package/src/models/components/accountsummary.ts +6 -0
  104. package/src/models/components/collateralposition.ts +6 -0
  105. package/src/models/components/creditborrowparams.ts +7 -0
  106. package/src/models/components/creditborrowrequest.ts +7 -0
  107. package/src/models/components/creditenablecollateralparams.ts +7 -0
  108. package/src/models/components/creditpositionsresponse.ts +7 -1
  109. package/src/models/components/creditrepayparams.ts +7 -0
  110. package/src/models/components/creditrepayrequest.ts +7 -0
  111. package/src/models/components/creditsupplyparams.ts +7 -0
  112. package/src/models/components/creditwithdrawparams.ts +7 -0
  113. package/src/models/components/debtposition.ts +6 -0
@@ -11,6 +11,7 @@ let value: CreditWithdrawParams = {
11
11
  actionType: "CREDIT_WITHDRAW",
12
12
  token: "<value>",
13
13
  amount: 6714.86,
14
+ subAccountId: 0,
14
15
  };
15
16
  ```
16
17
 
@@ -23,4 +24,5 @@ let value: CreditWithdrawParams = {
23
24
  | `amount` | *components.CreditWithdrawParamsAmount* | :heavy_check_mark: | Amount in token units to withdraw. | |
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. | |
25
26
  | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER. | |
27
+ | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: EVC sub-account (0–255) holding the collateral to withdraw. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho. | 0 |
26
28
  | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
@@ -23,6 +23,7 @@ let value: DebtPosition = {
23
23
  | `symbol` | *string* | :heavy_check_mark: | Symbol of the borrow token (e.g. WETH). | |
24
24
  | `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. | |
25
25
  | `vault` | *string* | :heavy_minus_sign: | Euler only: the EVK borrow vault this debt is owed to. | |
26
+ | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0–255) this debt belongs to. Each sub-account is an independent Euler position with its own health. Null for Aave/Morpho. | |
26
27
  | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 id of the isolated market this debt is owed to. | |
27
28
  | `healthFactor` | *string* | :heavy_minus_sign: | Morpho only: this market's health factor (markets are isolated, so health is per market — below 1 the position is liquidatable). Null for other protocols and when the oracle read fails. | |
28
29
  | `amountBorrowed` | *string* | :heavy_check_mark: | Current on-chain debt balance (the vault's underlying asset for Euler). | |
@@ -10120,6 +10120,18 @@
10120
10120
  "description": "Lending protocol this summary describes.",
10121
10121
  "example": "AAVE"
10122
10122
  },
10123
+ "sub_account_id": {
10124
+ "anyOf": [
10125
+ {
10126
+ "type": "integer"
10127
+ },
10128
+ {
10129
+ "type": "null"
10130
+ }
10131
+ ],
10132
+ "title": "Sub Account Id",
10133
+ "description": "Euler only: the EVC sub-account (0\u2013255) this summary describes. Euler health is per-sub-account. Null for Aave/Morpho."
10134
+ },
10123
10135
  "health_factor": {
10124
10136
  "type": "string",
10125
10137
  "title": "Health Factor",
@@ -11919,6 +11931,18 @@
11919
11931
  "title": "Vault",
11920
11932
  "description": "Euler only: the EVK collateral vault holding this position."
11921
11933
  },
11934
+ "sub_account_id": {
11935
+ "anyOf": [
11936
+ {
11937
+ "type": "integer"
11938
+ },
11939
+ {
11940
+ "type": "null"
11941
+ }
11942
+ ],
11943
+ "title": "Sub Account Id",
11944
+ "description": "Euler only: the EVC sub-account (0\u2013255) this position belongs to. Each sub-account is an independent Euler position with its own health. Null for Aave/Morpho."
11945
+ },
11922
11946
  "market_id": {
11923
11947
  "anyOf": [
11924
11948
  {
@@ -12391,6 +12415,14 @@
12391
12415
  "title": "Borrow Vault",
12392
12416
  "description": "Euler only: the EVK vault to borrow from. Required when protocol=EULER."
12393
12417
  },
12418
+ "sub_account_id": {
12419
+ "type": "integer",
12420
+ "maximum": 255.0,
12421
+ "minimum": 0.0,
12422
+ "title": "Sub Account Id",
12423
+ "description": "Euler only: EVC sub-account (0\u2013255) to borrow against. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.",
12424
+ "example": 0
12425
+ },
12394
12426
  "market_id": {
12395
12427
  "anyOf": [
12396
12428
  {
@@ -12466,6 +12498,14 @@
12466
12498
  "title": "Market Id",
12467
12499
  "description": "Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO."
12468
12500
  },
12501
+ "sub_account_id": {
12502
+ "type": "integer",
12503
+ "maximum": 255.0,
12504
+ "minimum": 0.0,
12505
+ "title": "Sub Account Id",
12506
+ "description": "Euler only: EVC sub-account (0\u2013255) to isolate this position. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health, letting one Credit Account hold multiple isolated Euler positions. Defaults to 0. Ignored for Aave/Morpho.",
12507
+ "example": 0
12508
+ },
12469
12509
  "token_in": {
12470
12510
  "anyOf": [
12471
12511
  {
@@ -12789,6 +12829,14 @@
12789
12829
  ],
12790
12830
  "title": "Collateral Vault",
12791
12831
  "description": "Euler only: the EVK collateral vault to enable. Required when protocol=EULER."
12832
+ },
12833
+ "sub_account_id": {
12834
+ "type": "integer",
12835
+ "maximum": 255.0,
12836
+ "minimum": 0.0,
12837
+ "title": "Sub Account Id",
12838
+ "description": "Euler only: EVC sub-account (0\u2013255) to enable the collateral for. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.",
12839
+ "example": 0
12792
12840
  }
12793
12841
  },
12794
12842
  "type": "object",
@@ -13199,6 +13247,15 @@
13199
13247
  "$ref": "#/components/schemas/AccountSummary",
13200
13248
  "description": "Aave account-level summary (health factor, LTV, etc.)."
13201
13249
  },
13250
+ "euler_account_summaries": {
13251
+ "items": {
13252
+ "$ref": "#/components/schemas/AccountSummary"
13253
+ },
13254
+ "type": "array",
13255
+ "title": "Euler Account Summaries",
13256
+ "description": "Euler account-level summaries \u2014 ONE PER ACTIVE EVC SUB-ACCOUNT (Euler health is per-sub-account, so an owner with positions on sub-accounts 0 and 3 gets two entries, each carrying its sub_account_id and independent health factor). Empty for accounts with no Euler positions. Supersedes the singular euler_account_summary.",
13257
+ "example": []
13258
+ },
13202
13259
  "euler_account_summary": {
13203
13260
  "anyOf": [
13204
13261
  {
@@ -13208,7 +13265,7 @@
13208
13265
  "type": "null"
13209
13266
  }
13210
13267
  ],
13211
- "description": "Euler account-level summary (health factor, LTV, etc.), present only when the account holds Euler positions. Null for Aave-only accounts."
13268
+ "description": "DEPRECATED (use euler_account_summaries): the sub-account-0 Euler account-level summary, kept for one release for backwards compatibility. Present only when the account holds Euler positions; for a multi-sub-account owner it reflects only sub-account 0 (or the first active sub-account if 0 is empty). Null for Aave-only accounts."
13212
13269
  },
13213
13270
  "euler_borrowable_tokens": {
13214
13271
  "items": {
@@ -13477,6 +13534,14 @@
13477
13534
  "title": "Borrow Vault",
13478
13535
  "description": "Euler only: the EVK vault the debt is owed to. Required when protocol=EULER."
13479
13536
  },
13537
+ "sub_account_id": {
13538
+ "type": "integer",
13539
+ "maximum": 255.0,
13540
+ "minimum": 0.0,
13541
+ "title": "Sub Account Id",
13542
+ "description": "Euler only: EVC sub-account (0\u2013255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.",
13543
+ "example": 0
13544
+ },
13480
13545
  "market_id": {
13481
13546
  "anyOf": [
13482
13547
  {
@@ -13552,6 +13617,14 @@
13552
13617
  "title": "Collateral Vault",
13553
13618
  "description": "Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER and withdrawing collateral."
13554
13619
  },
13620
+ "sub_account_id": {
13621
+ "type": "integer",
13622
+ "maximum": 255.0,
13623
+ "minimum": 0.0,
13624
+ "title": "Sub Account Id",
13625
+ "description": "Euler only: EVC sub-account (0\u2013255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.",
13626
+ "example": 0
13627
+ },
13555
13628
  "repay_token": {
13556
13629
  "type": "string",
13557
13630
  "title": "Token",
@@ -13791,6 +13864,14 @@
13791
13864
  "title": "Collateral Vault",
13792
13865
  "description": "Euler only: the EVK collateral vault to supply into. Required when protocol=EULER."
13793
13866
  },
13867
+ "sub_account_id": {
13868
+ "type": "integer",
13869
+ "maximum": 255.0,
13870
+ "minimum": 0.0,
13871
+ "title": "Sub Account Id",
13872
+ "description": "Euler only: EVC sub-account (0\u2013255) to isolate this position. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.",
13873
+ "example": 0
13874
+ },
13794
13875
  "market_id": {
13795
13876
  "anyOf": [
13796
13877
  {
@@ -14286,6 +14367,14 @@
14286
14367
  "title": "Collateral Vault",
14287
14368
  "description": "Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER."
14288
14369
  },
14370
+ "sub_account_id": {
14371
+ "type": "integer",
14372
+ "maximum": 255.0,
14373
+ "minimum": 0.0,
14374
+ "title": "Sub Account Id",
14375
+ "description": "Euler only: EVC sub-account (0\u2013255) holding the collateral to withdraw. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.",
14376
+ "example": 0
14377
+ },
14289
14378
  "market_id": {
14290
14379
  "anyOf": [
14291
14380
  {
@@ -14336,6 +14425,18 @@
14336
14425
  "title": "Vault",
14337
14426
  "description": "Euler only: the EVK borrow vault this debt is owed to."
14338
14427
  },
14428
+ "sub_account_id": {
14429
+ "anyOf": [
14430
+ {
14431
+ "type": "integer"
14432
+ },
14433
+ {
14434
+ "type": "null"
14435
+ }
14436
+ ],
14437
+ "title": "Sub Account Id",
14438
+ "description": "Euler only: the EVC sub-account (0\u2013255) this debt belongs to. Each sub-account is an independent Euler position with its own health. Null for Aave/Morpho."
14439
+ },
14339
14440
  "market_id": {
14340
14441
  "anyOf": [
14341
14442
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.83",
3
+ "version": "2.2.84",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -36,6 +36,10 @@ export type AccountSummary = {
36
36
  * endpoints reject it with a 422.
37
37
  */
38
38
  protocol?: CreditProtocol | undefined;
39
+ /**
40
+ * Euler only: the EVC sub-account (0–255) this summary describes. Euler health is per-sub-account. Null for Aave/Morpho.
41
+ */
42
+ subAccountId?: number | null | undefined;
39
43
  /**
40
44
  * Health factor. Above 1 is safe; below 1 risks liquidation.
41
45
  */
@@ -73,6 +77,7 @@ export const AccountSummary$inboundSchema: z.ZodType<
73
77
  unknown
74
78
  > = z.object({
75
79
  protocol: CreditProtocol$inboundSchema.optional(),
80
+ sub_account_id: z.nullable(z.number().int()).optional(),
76
81
  health_factor: z.string(),
77
82
  total_collateral_usd: z.string(),
78
83
  total_debt_usd: z.string(),
@@ -82,6 +87,7 @@ export const AccountSummary$inboundSchema: z.ZodType<
82
87
  emode_label: z.nullable(z.string()).optional(),
83
88
  }).transform((v) => {
84
89
  return remap$(v, {
90
+ "sub_account_id": "subAccountId",
85
91
  "health_factor": "healthFactor",
86
92
  "total_collateral_usd": "totalCollateralUsd",
87
93
  "total_debt_usd": "totalDebtUsd",
@@ -43,6 +43,10 @@ export type CollateralPosition = {
43
43
  * Euler only: the EVK collateral vault holding this position.
44
44
  */
45
45
  vault?: string | null | undefined;
46
+ /**
47
+ * Euler only: the EVC sub-account (0–255) this position belongs to. Each sub-account is an independent Euler position with its own health. Null for Aave/Morpho.
48
+ */
49
+ subAccountId?: number | null | undefined;
46
50
  /**
47
51
  * Morpho only: the bytes32 id of the isolated market holding this position.
48
52
  */
@@ -95,6 +99,7 @@ export const CollateralPosition$inboundSchema: z.ZodType<
95
99
  symbol: z.string(),
96
100
  protocol: CreditProtocol$inboundSchema.optional(),
97
101
  vault: z.nullable(z.string()).optional(),
102
+ sub_account_id: z.nullable(z.number().int()).optional(),
98
103
  market_id: z.nullable(z.string()).optional(),
99
104
  is_pure_supply: z.nullable(z.boolean()).optional(),
100
105
  amount_supplied: z.nullable(z.string()),
@@ -107,6 +112,7 @@ export const CollateralPosition$inboundSchema: z.ZodType<
107
112
  events: z.array(CreditEvent$inboundSchema).optional(),
108
113
  }).transform((v) => {
109
114
  return remap$(v, {
115
+ "sub_account_id": "subAccountId",
110
116
  "market_id": "marketId",
111
117
  "is_pure_supply": "isPureSupply",
112
118
  "amount_supplied": "amountSupplied",
@@ -66,6 +66,10 @@ export type CreditBorrowParams = {
66
66
  * Euler only: the EVK vault to borrow from. Required when protocol=EULER.
67
67
  */
68
68
  borrowVault?: string | null | undefined;
69
+ /**
70
+ * Euler only: EVC sub-account (0–255) to borrow against. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.
71
+ */
72
+ subAccountId?: number | undefined;
69
73
  /**
70
74
  * Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
71
75
  */
@@ -99,6 +103,7 @@ export type CreditBorrowParams$Outbound = {
99
103
  fee?: CreditFee$Outbound | null | undefined;
100
104
  protocol?: string | undefined;
101
105
  borrow_vault?: string | null | undefined;
106
+ sub_account_id?: number | undefined;
102
107
  market_id?: string | null | undefined;
103
108
  };
104
109
 
@@ -115,12 +120,14 @@ export const CreditBorrowParams$outboundSchema: z.ZodType<
115
120
  fee: z.nullable(CreditFee$outboundSchema).optional(),
116
121
  protocol: CreditProtocol$outboundSchema.optional(),
117
122
  borrowVault: z.nullable(z.string()).optional(),
123
+ subAccountId: z.number().int().optional(),
118
124
  marketId: z.nullable(z.string()).optional(),
119
125
  }).transform((v) => {
120
126
  return remap$(v, {
121
127
  actionType: "action_type",
122
128
  interestRateMode: "interest_rate_mode",
123
129
  borrowVault: "borrow_vault",
130
+ subAccountId: "sub_account_id",
124
131
  marketId: "market_id",
125
132
  });
126
133
  });
@@ -69,6 +69,10 @@ export type CreditBorrowRequest = {
69
69
  * Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
70
70
  */
71
71
  marketId?: string | null | undefined;
72
+ /**
73
+ * Euler only: EVC sub-account (0–255) to isolate this position. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health, letting one Credit Account hold multiple isolated Euler positions. Defaults to 0. Ignored for Aave/Morpho.
74
+ */
75
+ subAccountId?: number | undefined;
72
76
  /**
73
77
  * Token currently held in the Credit Account to use as input. If the same as collateral_token, no swap is performed. Omit together with amount_in and collateral_token to borrow against existing collateral.
74
78
  */
@@ -185,6 +189,7 @@ export type CreditBorrowRequest$Outbound = {
185
189
  collateral_vault?: string | null | undefined;
186
190
  borrow_vault?: string | null | undefined;
187
191
  market_id?: string | null | undefined;
192
+ sub_account_id?: number | undefined;
188
193
  token_in?: string | null | undefined;
189
194
  amount_in?: number | string | null | undefined;
190
195
  collateral_token?: string | null | undefined;
@@ -211,6 +216,7 @@ export const CreditBorrowRequest$outboundSchema: z.ZodType<
211
216
  collateralVault: z.nullable(z.string()).optional(),
212
217
  borrowVault: z.nullable(z.string()).optional(),
213
218
  marketId: z.nullable(z.string()).optional(),
219
+ subAccountId: z.number().int().optional(),
214
220
  tokenIn: z.nullable(z.string()).optional(),
215
221
  amountIn: z.nullable(z.union([z.number(), z.string()])).optional(),
216
222
  collateralToken: z.nullable(z.string()).optional(),
@@ -228,6 +234,7 @@ export const CreditBorrowRequest$outboundSchema: z.ZodType<
228
234
  collateralVault: "collateral_vault",
229
235
  borrowVault: "borrow_vault",
230
236
  marketId: "market_id",
237
+ subAccountId: "sub_account_id",
231
238
  tokenIn: "token_in",
232
239
  amountIn: "amount_in",
233
240
  collateralToken: "collateral_token",
@@ -41,6 +41,10 @@ export type CreditEnableCollateralParams = {
41
41
  * Euler only: the EVK collateral vault to enable. Required when protocol=EULER.
42
42
  */
43
43
  collateralVault?: string | null | undefined;
44
+ /**
45
+ * Euler only: EVC sub-account (0–255) to enable the collateral for. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.
46
+ */
47
+ subAccountId?: number | undefined;
44
48
  };
45
49
 
46
50
  /** @internal */
@@ -49,6 +53,7 @@ export type CreditEnableCollateralParams$Outbound = {
49
53
  token: string;
50
54
  protocol?: string | undefined;
51
55
  collateral_vault?: string | null | undefined;
56
+ sub_account_id?: number | undefined;
52
57
  };
53
58
 
54
59
  /** @internal */
@@ -61,10 +66,12 @@ export const CreditEnableCollateralParams$outboundSchema: z.ZodType<
61
66
  token: z.string(),
62
67
  protocol: CreditProtocol$outboundSchema.optional(),
63
68
  collateralVault: z.nullable(z.string()).optional(),
69
+ subAccountId: z.number().int().optional(),
64
70
  }).transform((v) => {
65
71
  return remap$(v, {
66
72
  actionType: "action_type",
67
73
  collateralVault: "collateral_vault",
74
+ subAccountId: "sub_account_id",
68
75
  });
69
76
  });
70
77
 
@@ -44,7 +44,11 @@ export type CreditPositionsResponse = {
44
44
  */
45
45
  accountSummary: AccountSummary;
46
46
  /**
47
- * Euler account-level summary (health factor, LTV, etc.), present only when the account holds Euler positions. Null for Aave-only accounts.
47
+ * Euler account-level summaries — ONE PER ACTIVE EVC SUB-ACCOUNT (Euler health is per-sub-account, so an owner with positions on sub-accounts 0 and 3 gets two entries, each carrying its sub_account_id and independent health factor). Empty for accounts with no Euler positions. Supersedes the singular euler_account_summary.
48
+ */
49
+ eulerAccountSummaries?: Array<AccountSummary> | undefined;
50
+ /**
51
+ * DEPRECATED (use euler_account_summaries): the sub-account-0 Euler account-level summary, kept for one release for backwards compatibility. Present only when the account holds Euler positions; for a multi-sub-account owner it reflects only sub-account 0 (or the first active sub-account if 0 is empty). Null for Aave-only accounts.
48
52
  */
49
53
  eulerAccountSummary?: AccountSummary | null | undefined;
50
54
  /**
@@ -70,6 +74,7 @@ export const CreditPositionsResponse$inboundSchema: z.ZodType<
70
74
  collateral_positions: z.array(CollateralPosition$inboundSchema).optional(),
71
75
  debt_positions: z.array(DebtPosition$inboundSchema).optional(),
72
76
  account_summary: AccountSummary$inboundSchema,
77
+ euler_account_summaries: z.array(AccountSummary$inboundSchema).optional(),
73
78
  euler_account_summary: z.nullable(AccountSummary$inboundSchema).optional(),
74
79
  euler_borrowable_tokens: z.array(BorrowableToken$inboundSchema).optional(),
75
80
  borrowable_tokens: z.array(BorrowableToken$inboundSchema).optional(),
@@ -79,6 +84,7 @@ export const CreditPositionsResponse$inboundSchema: z.ZodType<
79
84
  "collateral_positions": "collateralPositions",
80
85
  "debt_positions": "debtPositions",
81
86
  "account_summary": "accountSummary",
87
+ "euler_account_summaries": "eulerAccountSummaries",
82
88
  "euler_account_summary": "eulerAccountSummary",
83
89
  "euler_borrowable_tokens": "eulerBorrowableTokens",
84
90
  "borrowable_tokens": "borrowableTokens",
@@ -57,6 +57,10 @@ export type CreditRepayParams = {
57
57
  * Euler only: the EVK vault the debt is owed to. Required when protocol=EULER.
58
58
  */
59
59
  borrowVault?: string | null | undefined;
60
+ /**
61
+ * Euler only: EVC sub-account (0–255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.
62
+ */
63
+ subAccountId?: number | undefined;
60
64
  /**
61
65
  * Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
62
66
  */
@@ -89,6 +93,7 @@ export type CreditRepayParams$Outbound = {
89
93
  interest_rate_mode?: string | undefined;
90
94
  protocol?: string | undefined;
91
95
  borrow_vault?: string | null | undefined;
96
+ sub_account_id?: number | undefined;
92
97
  market_id?: string | null | undefined;
93
98
  };
94
99
 
@@ -104,12 +109,14 @@ export const CreditRepayParams$outboundSchema: z.ZodType<
104
109
  interestRateMode: InterestRateMode$outboundSchema.optional(),
105
110
  protocol: CreditProtocol$outboundSchema.optional(),
106
111
  borrowVault: z.nullable(z.string()).optional(),
112
+ subAccountId: z.number().int().optional(),
107
113
  marketId: z.nullable(z.string()).optional(),
108
114
  }).transform((v) => {
109
115
  return remap$(v, {
110
116
  actionType: "action_type",
111
117
  interestRateMode: "interest_rate_mode",
112
118
  borrowVault: "borrow_vault",
119
+ subAccountId: "sub_account_id",
113
120
  marketId: "market_id",
114
121
  });
115
122
  });
@@ -64,6 +64,10 @@ export type CreditRepayRequest = {
64
64
  * Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER and withdrawing collateral.
65
65
  */
66
66
  collateralVault?: string | null | undefined;
67
+ /**
68
+ * Euler only: EVC sub-account (0–255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.
69
+ */
70
+ subAccountId?: number | undefined;
67
71
  /**
68
72
  * The borrowed asset to repay (e.g. WETH). Must match the debt position's token.
69
73
  */
@@ -168,6 +172,7 @@ export type CreditRepayRequest$Outbound = {
168
172
  borrow_vault?: string | null | undefined;
169
173
  market_id?: string | null | undefined;
170
174
  collateral_vault?: string | null | undefined;
175
+ sub_account_id?: number | undefined;
171
176
  repay_token: string;
172
177
  repay_amount: number | string;
173
178
  interest_rate_mode?: string | undefined;
@@ -193,6 +198,7 @@ export const CreditRepayRequest$outboundSchema: z.ZodType<
193
198
  borrowVault: z.nullable(z.string()).optional(),
194
199
  marketId: z.nullable(z.string()).optional(),
195
200
  collateralVault: z.nullable(z.string()).optional(),
201
+ subAccountId: z.number().int().optional(),
196
202
  repayToken: z.string(),
197
203
  repayAmount: z.union([z.number(), z.string()]),
198
204
  interestRateMode: InterestRateMode$outboundSchema.optional(),
@@ -209,6 +215,7 @@ export const CreditRepayRequest$outboundSchema: z.ZodType<
209
215
  borrowVault: "borrow_vault",
210
216
  marketId: "market_id",
211
217
  collateralVault: "collateral_vault",
218
+ subAccountId: "sub_account_id",
212
219
  repayToken: "repay_token",
213
220
  repayAmount: "repay_amount",
214
221
  interestRateMode: "interest_rate_mode",
@@ -45,6 +45,10 @@ export type CreditSupplyParams = {
45
45
  * Euler only: the EVK collateral vault to supply into. Required when protocol=EULER.
46
46
  */
47
47
  collateralVault?: string | null | undefined;
48
+ /**
49
+ * Euler only: EVC sub-account (0–255) to isolate this position. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.
50
+ */
51
+ subAccountId?: number | undefined;
48
52
  /**
49
53
  * Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
50
54
  */
@@ -76,6 +80,7 @@ export type CreditSupplyParams$Outbound = {
76
80
  amount: number | string;
77
81
  protocol?: string | undefined;
78
82
  collateral_vault?: string | null | undefined;
83
+ sub_account_id?: number | undefined;
79
84
  market_id?: string | null | undefined;
80
85
  };
81
86
 
@@ -90,11 +95,13 @@ export const CreditSupplyParams$outboundSchema: z.ZodType<
90
95
  amount: z.union([z.number(), z.string()]),
91
96
  protocol: CreditProtocol$outboundSchema.optional(),
92
97
  collateralVault: z.nullable(z.string()).optional(),
98
+ subAccountId: z.number().int().optional(),
93
99
  marketId: z.nullable(z.string()).optional(),
94
100
  }).transform((v) => {
95
101
  return remap$(v, {
96
102
  actionType: "action_type",
97
103
  collateralVault: "collateral_vault",
104
+ subAccountId: "sub_account_id",
98
105
  marketId: "market_id",
99
106
  });
100
107
  });
@@ -45,6 +45,10 @@ export type CreditWithdrawParams = {
45
45
  * Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER.
46
46
  */
47
47
  collateralVault?: string | null | undefined;
48
+ /**
49
+ * Euler only: EVC sub-account (0–255) holding the collateral to withdraw. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho.
50
+ */
51
+ subAccountId?: number | undefined;
48
52
  /**
49
53
  * Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
50
54
  */
@@ -76,6 +80,7 @@ export type CreditWithdrawParams$Outbound = {
76
80
  amount: number | string;
77
81
  protocol?: string | undefined;
78
82
  collateral_vault?: string | null | undefined;
83
+ sub_account_id?: number | undefined;
79
84
  market_id?: string | null | undefined;
80
85
  };
81
86
 
@@ -90,11 +95,13 @@ export const CreditWithdrawParams$outboundSchema: z.ZodType<
90
95
  amount: z.union([z.number(), z.string()]),
91
96
  protocol: CreditProtocol$outboundSchema.optional(),
92
97
  collateralVault: z.nullable(z.string()).optional(),
98
+ subAccountId: z.number().int().optional(),
93
99
  marketId: z.nullable(z.string()).optional(),
94
100
  }).transform((v) => {
95
101
  return remap$(v, {
96
102
  actionType: "action_type",
97
103
  collateralVault: "collateral_vault",
104
+ subAccountId: "sub_account_id",
98
105
  marketId: "market_id",
99
106
  });
100
107
  });
@@ -43,6 +43,10 @@ export type DebtPosition = {
43
43
  * Euler only: the EVK borrow vault this debt is owed to.
44
44
  */
45
45
  vault?: string | null | undefined;
46
+ /**
47
+ * Euler only: the EVC sub-account (0–255) this debt belongs to. Each sub-account is an independent Euler position with its own health. Null for Aave/Morpho.
48
+ */
49
+ subAccountId?: number | null | undefined;
46
50
  /**
47
51
  * Morpho only: the bytes32 id of the isolated market this debt is owed to.
48
52
  */
@@ -91,6 +95,7 @@ export const DebtPosition$inboundSchema: z.ZodType<
91
95
  symbol: z.string(),
92
96
  protocol: CreditProtocol$inboundSchema.optional(),
93
97
  vault: z.nullable(z.string()).optional(),
98
+ sub_account_id: z.nullable(z.number().int()).optional(),
94
99
  market_id: z.nullable(z.string()).optional(),
95
100
  health_factor: z.nullable(z.string()).optional(),
96
101
  amount_borrowed: z.nullable(z.string()),
@@ -102,6 +107,7 @@ export const DebtPosition$inboundSchema: z.ZodType<
102
107
  events: z.array(CreditEvent$inboundSchema).optional(),
103
108
  }).transform((v) => {
104
109
  return remap$(v, {
110
+ "sub_account_id": "subAccountId",
105
111
  "market_id": "marketId",
106
112
  "health_factor": "healthFactor",
107
113
  "amount_borrowed": "amountBorrowed",