@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,23 +20,23 @@ let value: CreditRepayRequest = {
20
20
 
21
21
  ## Fields
22
22
 
23
- | Field | Type | Required | Description | Example |
24
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
25
- | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x831Ad0C52C77708DA5D49dc8278C966dfdD4ddA1 |
26
- | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
27
- | `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. | |
28
- | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the debt is owed to (repay target). Required when protocol=EULER. | |
29
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
30
- | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER and withdrawing collateral. | |
31
- | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: EVC sub-account (0–255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho. | 0 |
32
- | `repayToken` | *string* | :heavy_check_mark: | The borrowed asset to repay (e.g. WETH). Must match the debt position's token. | WETH |
33
- | `repayAmount` | *components.RepayAmount* | :heavy_check_mark: | Amount of repay_token to repay (in token units, not wei). | 0.01 |
34
- | `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
35
- | `withdrawToken` | *string* | :heavy_minus_sign: | Collateral token to withdraw from Aave after repaying debt. Omit together with withdraw_amount for repay-only mode. | USDC |
36
- | `withdrawAmount` | *components.WithdrawAmount* | :heavy_minus_sign: | Amount of collateral to withdraw (in token units, not wei). Omit together with withdraw_token for repay-only mode. | 100 |
37
- | `tokenOut` | *string* | :heavy_minus_sign: | Desired output token. If different from withdraw_token, a swap is performed after withdrawal. If None, the withdrawn collateral is kept as-is. | |
38
- | `slippage` | *components.CreditRepayRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed. | 0.5 |
39
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 signature data instead of an unsigned transaction. | false |
40
- | `permit2Signature` | *string* | :heavy_minus_sign: | The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the repay bundle will first pull repay_token from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data. | |
41
- | `permit2Nonce` | *number* | :heavy_minus_sign: | The nonce used in the Permit2 signature (from the signed typed data). | |
42
- | `permit2Deadline` | *number* | :heavy_minus_sign: | The deadline timestamp used in the Permit2 signature (from the signed typed data). | |
23
+ | Field | Type | Required | Description | Example |
24
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x831Ad0C52C77708DA5D49dc8278C966dfdD4ddA1 |
26
+ | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
27
+ | `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. | |
28
+ | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the debt is owed to (repay target). Required when protocol=EULER. | |
29
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
30
+ | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER and withdrawing collateral. | |
31
+ | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: EVC sub-account (0–255) holding the debt to repay. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho. | 0 |
32
+ | `repayToken` | *string* | :heavy_check_mark: | The borrowed asset to repay (e.g. WETH). Must match the debt position's token. | WETH |
33
+ | `repayAmount` | *components.RepayAmount* | :heavy_check_mark: | Amount of repay_token to repay (in token units, not wei). | 0.01 |
34
+ | `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
35
+ | `withdrawToken` | *string* | :heavy_minus_sign: | Collateral token to withdraw from Aave after repaying debt. Omit together with withdraw_amount for repay-only mode. | USDC |
36
+ | `withdrawAmount` | *components.WithdrawAmount* | :heavy_minus_sign: | Amount of collateral to withdraw (in token units, not wei). Omit together with withdraw_token for repay-only mode. | 100 |
37
+ | `tokenOut` | *string* | :heavy_minus_sign: | Desired output token. If different from withdraw_token, a swap is performed after withdrawal. If None, the withdrawn collateral is kept as-is. | |
38
+ | `slippage` | *components.CreditRepayRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed. | 0.5 |
39
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 signature data instead of an unsigned transaction. | false |
40
+ | `permit2Signature` | *string* | :heavy_minus_sign: | The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the repay bundle will first pull repay_token from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data. | |
41
+ | `permit2Nonce` | *number* | :heavy_minus_sign: | The nonce used in the Permit2 signature (from the signed typed data). | |
42
+ | `permit2Deadline` | *number* | :heavy_minus_sign: | The deadline timestamp used in the Permit2 signature (from the signed typed data). | |
@@ -17,12 +17,12 @@ let value: CreditSupplyParams = {
17
17
 
18
18
  ## Fields
19
19
 
20
- | Field | Type | Required | Description | Example |
21
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
22
- | `actionType` | *"CREDIT_SUPPLY"* | :heavy_check_mark: | N/A | CREDIT_SUPPLY |
23
- | `token` | *string* | :heavy_check_mark: | Collateral token to supply. | |
24
- | `amount` | *components.CreditSupplyParamsAmount* | :heavy_check_mark: | Amount in token units to supply. | |
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
- | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to supply into. Required when protocol=EULER. | |
27
- | `subAccountId` | *number* | :heavy_minus_sign: | 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. | 0 |
28
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
20
+ | Field | Type | Required | Description | Example |
21
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | `actionType` | *"CREDIT_SUPPLY"* | :heavy_check_mark: | N/A | CREDIT_SUPPLY |
23
+ | `token` | *string* | :heavy_check_mark: | Collateral token to supply. | |
24
+ | `amount` | *components.CreditSupplyParamsAmount* | :heavy_check_mark: | Amount in token units to supply. | |
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
+ | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to supply into. Required when protocol=EULER. | |
27
+ | `subAccountId` | *number* | :heavy_minus_sign: | 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. | 0 |
28
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
@@ -23,15 +23,18 @@ let value: CreditUnloopRequest = {
23
23
 
24
24
  ## Fields
25
25
 
26
- | Field | Type | Required | Description | Example |
27
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
28
- | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x0E407CdeBD8e078E6966ef6740540d25F5897082 |
29
- | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
30
- | `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. | |
31
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
32
- | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral in the loop being unwound. For MORPHO it must be the market's collateral token. | WETH |
33
- | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed in the loop; withdrawn collateral is swapped back to it and used to repay. For MORPHO it must be the market's loan token. | USDC |
34
- | `targetMultiplier` | *components.CreditUnloopRequestTargetMultiplier* | :heavy_minus_sign: | Target leverage after the unwind. Omit (null) for a FULL unwind: the debt is cleared exactly accrued interest included — and all pair collateral is withdrawn back to the Credit Account. `1` runs the same exact debt close but leaves the collateral supplied (earning). A value greater than 1 delevers the position to that multiplier. Must be below the position's current multiplier. | |
35
- | `maxSlippagePercent` | *components.CreditUnloopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Unwind dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
36
- | `allowPartial` | *boolean* | :heavy_minus_sign: | If the target cannot be reached in one transaction (e.g. a position opened very close to the liquidation threshold), return the maximum-progress plan (preview.fully_unwound=false) instead of a 400. A second unloop call, now from a much lower leverage, finishes the job. | false |
37
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
26
+ | Field | Type | Required | Description | Example |
27
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x0E407CdeBD8e078E6966ef6740540d25F5897082 |
29
+ | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
30
+ | `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. | |
31
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
32
+ | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the loop's collateral is in. Required when protocol=EULER. | |
33
+ | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the loop borrowed from (the sub-account's controller). Required when protocol=EULER. | |
34
+ | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0-255) holding the looped position to unwind. 0 is the Credit Account itself. | 0 |
35
+ | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral in the loop being unwound. For MORPHO it must be the market's collateral token. | WETH |
36
+ | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed in the loop; withdrawn collateral is swapped back to it and used to repay. For MORPHO it must be the market's loan token. | USDC |
37
+ | `targetMultiplier` | *components.CreditUnloopRequestTargetMultiplier* | :heavy_minus_sign: | Target leverage after the unwind. Omit (null) for a FULL unwind: the debt is cleared exactly — accrued interest included — and all pair collateral is withdrawn back to the Credit Account. `1` runs the same exact debt close but leaves the collateral supplied (earning). A value greater than 1 delevers the position to that multiplier. Must be below the position's current multiplier. | |
38
+ | `maxSlippagePercent` | *components.CreditUnloopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Unwind dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
39
+ | `allowPartial` | *boolean* | :heavy_minus_sign: | If the target cannot be reached in one transaction (e.g. a position opened very close to the liquidation threshold), return the maximum-progress plan (preview.fully_unwound=false) instead of a 400. A second unloop call, now from a much lower leverage, finishes the job. | false |
40
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |