@compass-labs/api-sdk 2.2.101 → 2.2.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/commonjs/funcs/creditCreditBorrow.d.ts +1 -1
  2. package/dist/commonjs/funcs/creditCreditBorrow.js +1 -1
  3. package/dist/commonjs/funcs/creditCreditLoop.d.ts +8 -22
  4. package/dist/commonjs/funcs/creditCreditLoop.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/creditCreditLoop.js +8 -22
  6. package/dist/commonjs/funcs/creditCreditLoop.js.map +1 -1
  7. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts +8 -7
  8. package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
  9. package/dist/commonjs/funcs/creditCreditLoopedPositions.js +8 -7
  10. package/dist/commonjs/funcs/creditCreditLoopedPositions.js.map +1 -1
  11. package/dist/commonjs/funcs/creditCreditRebalance.d.ts +11 -34
  12. package/dist/commonjs/funcs/creditCreditRebalance.d.ts.map +1 -1
  13. package/dist/commonjs/funcs/creditCreditRebalance.js +11 -34
  14. package/dist/commonjs/funcs/creditCreditRebalance.js.map +1 -1
  15. package/dist/commonjs/funcs/creditCreditRepay.d.ts +1 -1
  16. package/dist/commonjs/funcs/creditCreditRepay.js +1 -1
  17. package/dist/commonjs/funcs/creditCreditUnloop.d.ts +7 -38
  18. package/dist/commonjs/funcs/creditCreditUnloop.d.ts.map +1 -1
  19. package/dist/commonjs/funcs/creditCreditUnloop.js +7 -38
  20. package/dist/commonjs/funcs/creditCreditUnloop.js.map +1 -1
  21. package/dist/commonjs/lib/config.d.ts +2 -2
  22. package/dist/commonjs/lib/config.js +2 -2
  23. package/dist/commonjs/models/components/accountsummary.d.ts +18 -5
  24. package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
  25. package/dist/commonjs/models/components/accountsummary.js.map +1 -1
  26. package/dist/commonjs/models/components/collateralposition.d.ts +18 -5
  27. package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/collateralposition.js.map +1 -1
  29. package/dist/commonjs/models/components/creditborrowparams.d.ts +18 -5
  30. package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
  32. package/dist/commonjs/models/components/creditborrowrequest.d.ts +18 -5
  33. package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
  35. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +18 -5
  36. package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
  38. package/dist/commonjs/models/components/creditlooprequest.d.ts +27 -14
  39. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/creditlooprequest.js +1 -1
  41. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  42. package/dist/commonjs/models/components/creditloopresponse.d.ts +5 -5
  43. package/dist/commonjs/models/components/creditloopresponse.js +1 -1
  44. package/dist/commonjs/models/components/creditprotocol.d.ts +36 -10
  45. package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
  46. package/dist/commonjs/models/components/creditprotocol.js +18 -5
  47. package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
  48. package/dist/commonjs/models/components/creditrepayparams.d.ts +18 -5
  49. package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
  50. package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
  51. package/dist/commonjs/models/components/creditrepayrequest.d.ts +18 -5
  52. package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
  54. package/dist/commonjs/models/components/creditsupplyparams.d.ts +18 -5
  55. package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
  56. package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
  57. package/dist/commonjs/models/components/creditunlooprequest.d.ts +23 -10
  58. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  59. package/dist/commonjs/models/components/creditunlooprequest.js +1 -1
  60. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  61. package/dist/commonjs/models/components/creditunloopresponse.d.ts +5 -5
  62. package/dist/commonjs/models/components/creditunloopresponse.js +1 -1
  63. package/dist/commonjs/models/components/creditwithdrawparams.d.ts +18 -5
  64. package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
  66. package/dist/commonjs/models/components/debtposition.d.ts +18 -5
  67. package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/debtposition.js.map +1 -1
  69. package/dist/commonjs/models/components/loopedposition.d.ts +18 -5
  70. package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
  71. package/dist/commonjs/models/components/loopedposition.js.map +1 -1
  72. package/dist/commonjs/models/components/rebalancetarget.d.ts +18 -5
  73. package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
  74. package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
  75. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +18 -5
  76. package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
  78. package/dist/commonjs/models/components/swapinfo.d.ts +2 -2
  79. package/dist/commonjs/sdk/credit.d.ts +44 -111
  80. package/dist/commonjs/sdk/credit.d.ts.map +1 -1
  81. package/dist/commonjs/sdk/credit.js +44 -111
  82. package/dist/commonjs/sdk/credit.js.map +1 -1
  83. package/dist/esm/funcs/creditCreditBorrow.d.ts +1 -1
  84. package/dist/esm/funcs/creditCreditBorrow.js +1 -1
  85. package/dist/esm/funcs/creditCreditLoop.d.ts +8 -22
  86. package/dist/esm/funcs/creditCreditLoop.d.ts.map +1 -1
  87. package/dist/esm/funcs/creditCreditLoop.js +8 -22
  88. package/dist/esm/funcs/creditCreditLoop.js.map +1 -1
  89. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts +8 -7
  90. package/dist/esm/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
  91. package/dist/esm/funcs/creditCreditLoopedPositions.js +8 -7
  92. package/dist/esm/funcs/creditCreditLoopedPositions.js.map +1 -1
  93. package/dist/esm/funcs/creditCreditRebalance.d.ts +11 -34
  94. package/dist/esm/funcs/creditCreditRebalance.d.ts.map +1 -1
  95. package/dist/esm/funcs/creditCreditRebalance.js +11 -34
  96. package/dist/esm/funcs/creditCreditRebalance.js.map +1 -1
  97. package/dist/esm/funcs/creditCreditRepay.d.ts +1 -1
  98. package/dist/esm/funcs/creditCreditRepay.js +1 -1
  99. package/dist/esm/funcs/creditCreditUnloop.d.ts +7 -38
  100. package/dist/esm/funcs/creditCreditUnloop.d.ts.map +1 -1
  101. package/dist/esm/funcs/creditCreditUnloop.js +7 -38
  102. package/dist/esm/funcs/creditCreditUnloop.js.map +1 -1
  103. package/dist/esm/lib/config.d.ts +2 -2
  104. package/dist/esm/lib/config.js +2 -2
  105. package/dist/esm/models/components/accountsummary.d.ts +18 -5
  106. package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
  107. package/dist/esm/models/components/accountsummary.js.map +1 -1
  108. package/dist/esm/models/components/collateralposition.d.ts +18 -5
  109. package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
  110. package/dist/esm/models/components/collateralposition.js.map +1 -1
  111. package/dist/esm/models/components/creditborrowparams.d.ts +18 -5
  112. package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
  113. package/dist/esm/models/components/creditborrowparams.js.map +1 -1
  114. package/dist/esm/models/components/creditborrowrequest.d.ts +18 -5
  115. package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
  116. package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
  117. package/dist/esm/models/components/creditenablecollateralparams.d.ts +18 -5
  118. package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
  119. package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
  120. package/dist/esm/models/components/creditlooprequest.d.ts +27 -14
  121. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  122. package/dist/esm/models/components/creditlooprequest.js +1 -1
  123. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  124. package/dist/esm/models/components/creditloopresponse.d.ts +5 -5
  125. package/dist/esm/models/components/creditloopresponse.js +1 -1
  126. package/dist/esm/models/components/creditprotocol.d.ts +36 -10
  127. package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
  128. package/dist/esm/models/components/creditprotocol.js +18 -5
  129. package/dist/esm/models/components/creditprotocol.js.map +1 -1
  130. package/dist/esm/models/components/creditrepayparams.d.ts +18 -5
  131. package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
  132. package/dist/esm/models/components/creditrepayparams.js.map +1 -1
  133. package/dist/esm/models/components/creditrepayrequest.d.ts +18 -5
  134. package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
  135. package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
  136. package/dist/esm/models/components/creditsupplyparams.d.ts +18 -5
  137. package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
  138. package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
  139. package/dist/esm/models/components/creditunlooprequest.d.ts +23 -10
  140. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  141. package/dist/esm/models/components/creditunlooprequest.js +1 -1
  142. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  143. package/dist/esm/models/components/creditunloopresponse.d.ts +5 -5
  144. package/dist/esm/models/components/creditunloopresponse.js +1 -1
  145. package/dist/esm/models/components/creditwithdrawparams.d.ts +18 -5
  146. package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
  147. package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
  148. package/dist/esm/models/components/debtposition.d.ts +18 -5
  149. package/dist/esm/models/components/debtposition.d.ts.map +1 -1
  150. package/dist/esm/models/components/debtposition.js.map +1 -1
  151. package/dist/esm/models/components/loopedposition.d.ts +18 -5
  152. package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
  153. package/dist/esm/models/components/loopedposition.js.map +1 -1
  154. package/dist/esm/models/components/rebalancetarget.d.ts +18 -5
  155. package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
  156. package/dist/esm/models/components/rebalancetarget.js.map +1 -1
  157. package/dist/esm/models/components/rebalancetargetpreview.d.ts +18 -5
  158. package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
  159. package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
  160. package/dist/esm/models/components/swapinfo.d.ts +2 -2
  161. package/dist/esm/sdk/credit.d.ts +44 -111
  162. package/dist/esm/sdk/credit.d.ts.map +1 -1
  163. package/dist/esm/sdk/credit.js +44 -111
  164. package/dist/esm/sdk/credit.js.map +1 -1
  165. package/docs/models/components/accountsummary.md +11 -11
  166. package/docs/models/components/collateralposition.md +17 -17
  167. package/docs/models/components/creditborrowparams.md +11 -11
  168. package/docs/models/components/creditborrowrequest.md +21 -21
  169. package/docs/models/components/creditenablecollateralparams.md +7 -7
  170. package/docs/models/components/creditlooprequest.md +19 -19
  171. package/docs/models/components/creditlooprequestchain.md +1 -1
  172. package/docs/models/components/creditlooprequestinitialcollateralamount.md +1 -1
  173. package/docs/models/components/creditlooprequestloantovalue.md +1 -1
  174. package/docs/models/components/creditloopresponse.md +8 -8
  175. package/docs/models/components/creditloopresponseswapprovider.md +1 -1
  176. package/docs/models/components/creditprotocol.md +18 -5
  177. package/docs/models/components/creditrepayparams.md +10 -10
  178. package/docs/models/components/creditrepayrequest.md +20 -20
  179. package/docs/models/components/creditsupplyparams.md +9 -9
  180. package/docs/models/components/creditunlooprequest.md +17 -17
  181. package/docs/models/components/creditunlooprequestchain.md +1 -1
  182. package/docs/models/components/creditunloopresponse.md +8 -8
  183. package/docs/models/components/creditunloopresponseswapprovider.md +1 -1
  184. package/docs/models/components/creditwithdrawparams.md +9 -9
  185. package/docs/models/components/debtposition.md +16 -16
  186. package/docs/models/components/loopedposition.md +14 -14
  187. package/docs/models/components/rebalancetarget.md +10 -10
  188. package/docs/models/components/rebalancetargetpreview.md +16 -16
  189. package/docs/models/components/swapinfo.md +10 -10
  190. package/docs/sdks/credit/README.md +40 -107
  191. package/openapi_prepped_for_speakeasy.json +26 -26
  192. package/package.json +1 -1
  193. package/src/funcs/creditCreditBorrow.ts +1 -1
  194. package/src/funcs/creditCreditLoop.ts +8 -22
  195. package/src/funcs/creditCreditLoopedPositions.ts +8 -7
  196. package/src/funcs/creditCreditRebalance.ts +11 -34
  197. package/src/funcs/creditCreditRepay.ts +1 -1
  198. package/src/funcs/creditCreditUnloop.ts +7 -38
  199. package/src/lib/config.ts +2 -2
  200. package/src/models/components/accountsummary.ts +18 -5
  201. package/src/models/components/collateralposition.ts +18 -5
  202. package/src/models/components/creditborrowparams.ts +18 -5
  203. package/src/models/components/creditborrowrequest.ts +18 -5
  204. package/src/models/components/creditenablecollateralparams.ts +18 -5
  205. package/src/models/components/creditlooprequest.ts +27 -14
  206. package/src/models/components/creditloopresponse.ts +5 -5
  207. package/src/models/components/creditprotocol.ts +36 -10
  208. package/src/models/components/creditrepayparams.ts +18 -5
  209. package/src/models/components/creditrepayrequest.ts +18 -5
  210. package/src/models/components/creditsupplyparams.ts +18 -5
  211. package/src/models/components/creditunlooprequest.ts +23 -10
  212. package/src/models/components/creditunloopresponse.ts +5 -5
  213. package/src/models/components/creditwithdrawparams.ts +18 -5
  214. package/src/models/components/debtposition.ts +18 -5
  215. package/src/models/components/loopedposition.ts +18 -5
  216. package/src/models/components/rebalancetarget.ts +18 -5
  217. package/src/models/components/rebalancetargetpreview.ts +18 -5
  218. package/src/models/components/swapinfo.ts +2 -2
  219. package/src/sdk/credit.ts +44 -111
@@ -21,24 +21,24 @@ let value: CreditBorrowRequest = {
21
21
 
22
22
  ## Fields
23
23
 
24
- | Field | Type | Required | Description | Example |
25
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
- | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0xfeEb60eBf707DAA8248277058eb8D28EaeCF5425 |
27
- | `chain` | [components.CreditBorrowRequestChain](../../models/components/creditborrowrequestchain.md) | :heavy_check_mark: | Blockchain network. | base |
28
- | `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. | |
29
- | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to supply into. Required when protocol=EULER and supplying collateral. | |
30
- | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault to borrow from. Required when protocol=EULER. | |
31
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
32
- | `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, letting one Credit Account hold multiple isolated Euler positions. Defaults to 0. Ignored for Aave/Morpho. | 0 |
33
- | `tokenIn` | *string* | :heavy_minus_sign: | 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. | USDC |
34
- | `amountIn` | *components.CreditBorrowRequestAmountIn* | :heavy_minus_sign: | Amount of token_in to use (in token units, not wei). Omit together with token_in and collateral_token for borrow-only mode. | 100 |
35
- | `collateralToken` | *string* | :heavy_minus_sign: | Aave reserve token to supply as collateral. Omit together with token_in and amount_in for borrow-only mode. | USDC |
36
- | `borrowToken` | *string* | :heavy_check_mark: | Asset to borrow from Aave. | WETH |
37
- | `borrowAmount` | *components.BorrowAmount* | :heavy_check_mark: | Amount to borrow (in token units, not wei). | 0.01 |
38
- | `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. | |
39
- | `slippage` | *components.CreditBorrowRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed. | 0.5 |
40
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 signature data instead of an unsigned transaction. | false |
41
- | `fee` | [components.CreditFee](../../models/components/creditfee.md) | :heavy_minus_sign: | Optional fee configuration. If provided, a fee will be deducted from the borrowed amount and sent to the specified recipient address. | |
42
- | `permit2Signature` | *string* | :heavy_minus_sign: | The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the borrow bundle will first pull token_in from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data. | |
43
- | `permit2Nonce` | *number* | :heavy_minus_sign: | The nonce used in the Permit2 signature (from the signed typed data). | |
44
- | `permit2Deadline` | *number* | :heavy_minus_sign: | The deadline timestamp used in the Permit2 signature (from the signed typed data). | |
24
+ | Field | Type | Required | Description | Example |
25
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
26
+ | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0xfeEb60eBf707DAA8248277058eb8D28EaeCF5425 |
27
+ | `chain` | [components.CreditBorrowRequestChain](../../models/components/creditborrowrequestchain.md) | :heavy_check_mark: | Blockchain network. | base |
28
+ | `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; markets are named by token<br/>symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32<br/>``market_id``. ``EULER`` identifies Euler V2 markets by their EVK<br/>``collateral_vault`` + ``borrow_vault`` addresses and supports isolated<br/>per-sub-account positions (``sub_account_id``).<br/><br/>Deployment is per chain, so a valid protocol can still 422 on a given chain:<br/>AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the<br/>chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM<br/>(where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.<br/><br/>All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does<br/>NOT: ``/v2/credit/rebalance`` rejects it with a 422, and<br/>``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is<br/>silently absent there rather than an error, so read it from<br/>``/v2/credit/positions`` instead. (EULER still appears in the<br/>``looped_positions`` response enum because this enum is shared; it is never<br/>emitted.) | |
29
+ | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to supply into. Required when protocol=EULER and supplying collateral. | |
30
+ | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault to borrow from. Required when protocol=EULER. | |
31
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
32
+ | `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, letting one Credit Account hold multiple isolated Euler positions. Defaults to 0. Ignored for Aave/Morpho. | 0 |
33
+ | `tokenIn` | *string* | :heavy_minus_sign: | 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. | USDC |
34
+ | `amountIn` | *components.CreditBorrowRequestAmountIn* | :heavy_minus_sign: | Amount of token_in to use (in token units, not wei). Omit together with token_in and collateral_token for borrow-only mode. | 100 |
35
+ | `collateralToken` | *string* | :heavy_minus_sign: | Aave reserve token to supply as collateral. Omit together with token_in and amount_in for borrow-only mode. | USDC |
36
+ | `borrowToken` | *string* | :heavy_check_mark: | Asset to borrow from Aave. | WETH |
37
+ | `borrowAmount` | *components.BorrowAmount* | :heavy_check_mark: | Amount to borrow (in token units, not wei). | 0.01 |
38
+ | `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. | |
39
+ | `slippage` | *components.CreditBorrowRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed. | 0.5 |
40
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 signature data instead of an unsigned transaction. | false |
41
+ | `fee` | [components.CreditFee](../../models/components/creditfee.md) | :heavy_minus_sign: | Optional fee configuration. If provided, a fee will be deducted from the borrowed amount and sent to the specified recipient address. | |
42
+ | `permit2Signature` | *string* | :heavy_minus_sign: | The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the borrow bundle will first pull token_in from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data. | |
43
+ | `permit2Nonce` | *number* | :heavy_minus_sign: | The nonce used in the Permit2 signature (from the signed typed data). | |
44
+ | `permit2Deadline` | *number* | :heavy_minus_sign: | The deadline timestamp used in the Permit2 signature (from the signed typed data). | |