@compass-labs/api-sdk 2.2.87-rc.0 → 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.
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/accountsummary.d.ts +5 -6
- package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/accountsummary.js.map +1 -1
- package/dist/commonjs/models/components/collateralposition.d.ts +5 -6
- package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/collateralposition.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.d.ts +5 -6
- package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +5 -6
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +5 -6
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/commonjs/models/components/creditlooprequest.d.ts +20 -6
- package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditlooprequest.js +6 -0
- package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.d.ts +10 -12
- package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.js +5 -6
- package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts +5 -6
- package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +5 -6
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts +5 -6
- package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
- package/dist/commonjs/models/components/creditunlooprequest.d.ts +20 -6
- package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditunlooprequest.js +6 -0
- package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +5 -6
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/commonjs/models/components/debtposition.d.ts +5 -6
- package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/debtposition.js.map +1 -1
- package/dist/commonjs/models/components/loopedposition.d.ts +5 -6
- package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/loopedposition.js.map +1 -1
- package/dist/commonjs/models/components/rebalancetarget.d.ts +5 -6
- package/dist/commonjs/models/components/rebalancetarget.d.ts.map +1 -1
- package/dist/commonjs/models/components/rebalancetarget.js.map +1 -1
- package/dist/commonjs/models/components/rebalancetargetpreview.d.ts +5 -6
- package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
- package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/accountsummary.d.ts +5 -6
- package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
- package/dist/esm/models/components/accountsummary.js.map +1 -1
- package/dist/esm/models/components/collateralposition.d.ts +5 -6
- package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
- package/dist/esm/models/components/collateralposition.js.map +1 -1
- package/dist/esm/models/components/creditborrowparams.d.ts +5 -6
- package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowparams.js.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +5 -6
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.d.ts +5 -6
- package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/esm/models/components/creditlooprequest.d.ts +20 -6
- package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditlooprequest.js +6 -0
- package/dist/esm/models/components/creditlooprequest.js.map +1 -1
- package/dist/esm/models/components/creditprotocol.d.ts +10 -12
- package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/esm/models/components/creditprotocol.js +5 -6
- package/dist/esm/models/components/creditprotocol.js.map +1 -1
- package/dist/esm/models/components/creditrepayparams.d.ts +5 -6
- package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayparams.js.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +5 -6
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts +5 -6
- package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
- package/dist/esm/models/components/creditunlooprequest.d.ts +20 -6
- package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditunlooprequest.js +6 -0
- package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +5 -6
- package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/esm/models/components/debtposition.d.ts +5 -6
- package/dist/esm/models/components/debtposition.d.ts.map +1 -1
- package/dist/esm/models/components/debtposition.js.map +1 -1
- package/dist/esm/models/components/loopedposition.d.ts +5 -6
- package/dist/esm/models/components/loopedposition.d.ts.map +1 -1
- package/dist/esm/models/components/loopedposition.js.map +1 -1
- package/dist/esm/models/components/rebalancetarget.d.ts +5 -6
- package/dist/esm/models/components/rebalancetarget.d.ts.map +1 -1
- package/dist/esm/models/components/rebalancetarget.js.map +1 -1
- package/dist/esm/models/components/rebalancetargetpreview.d.ts +5 -6
- package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
- package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
- package/docs/models/components/accountsummary.md +11 -11
- package/docs/models/components/collateralposition.md +17 -17
- package/docs/models/components/creditborrowparams.md +11 -11
- package/docs/models/components/creditborrowrequest.md +21 -21
- package/docs/models/components/creditenablecollateralparams.md +7 -7
- package/docs/models/components/creditlooprequest.md +17 -14
- package/docs/models/components/creditprotocol.md +5 -6
- package/docs/models/components/creditrepayparams.md +10 -10
- package/docs/models/components/creditrepayrequest.md +20 -20
- package/docs/models/components/creditsupplyparams.md +9 -9
- package/docs/models/components/creditunlooprequest.md +15 -12
- package/docs/models/components/creditwithdrawparams.md +9 -9
- package/docs/models/components/debtposition.md +16 -16
- package/docs/models/components/loopedposition.md +14 -14
- package/docs/models/components/rebalancetarget.md +10 -10
- package/docs/models/components/rebalancetargetpreview.md +16 -16
- package/openapi_prepped_for_speakeasy.json +67 -3
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/accountsummary.ts +5 -6
- package/src/models/components/collateralposition.ts +5 -6
- package/src/models/components/creditborrowparams.ts +5 -6
- package/src/models/components/creditborrowrequest.ts +5 -6
- package/src/models/components/creditenablecollateralparams.ts +5 -6
- package/src/models/components/creditlooprequest.ts +26 -6
- package/src/models/components/creditprotocol.ts +10 -12
- package/src/models/components/creditrepayparams.ts +5 -6
- package/src/models/components/creditrepayrequest.ts +5 -6
- package/src/models/components/creditsupplyparams.ts +5 -6
- package/src/models/components/creditunlooprequest.ts +26 -6
- package/src/models/components/creditwithdrawparams.ts +5 -6
- package/src/models/components/debtposition.ts +5 -6
- package/src/models/components/loopedposition.ts +5 -6
- package/src/models/components/rebalancetarget.ts +5 -6
- package/src/models/components/rebalancetargetpreview.ts +5 -6
|
@@ -25,17 +25,20 @@ let value: CreditLoopRequest = {
|
|
|
25
25
|
|
|
26
26
|
## Fields
|
|
27
27
|
|
|
28
|
-
| Field
|
|
29
|
-
|
|
|
30
|
-
| `owner`
|
|
31
|
-
| `chain`
|
|
32
|
-
| `protocol`
|
|
33
|
-
| `marketId`
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
28
|
+
| Field | Type | Required | Description | Example |
|
|
29
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x5e5b00ed886A6879C2B934612D2312975427fcAf |
|
|
31
|
+
| `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
|
|
32
|
+
| `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. | |
|
|
33
|
+
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
|
|
34
|
+
| `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault address collateral is supplied to (from /v2/credit/euler_markets). Required when protocol=EULER. | |
|
|
35
|
+
| `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault address borrowed from (the sub-account's controller). Required when protocol=EULER. | |
|
|
36
|
+
| `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0-255) holding this isolated looped position. 0 is the Credit Account itself. | 0 |
|
|
37
|
+
| `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral each iteration. Must already be in the Credit Account for the initial amount. For MORPHO it must be the market's collateral token. | WETH |
|
|
38
|
+
| `borrowToken` | *string* | :heavy_check_mark: | Token borrowed each iteration and swapped back to the collateral token. For MORPHO it must be the market's loan token. | USDC |
|
|
39
|
+
| `initialCollateralAmount` | *components.CreditLoopRequestInitialCollateralAmount* | :heavy_check_mark: | Collateral (in token units) already held in the Credit Account to seed the loop. | 1 |
|
|
40
|
+
| `multiplier` | *components.CreditLoopRequestMultiplier* | :heavy_check_mark: | Target leverage: total collateral exposure = multiplier × initial_collateral_amount. Must be achievable at the requested loan_to_value (max ≈ 0.9 / (1 − LTV)). | 2 |
|
|
41
|
+
| `loanToValue` | *components.CreditLoopRequestLoanToValue* | :heavy_check_mark: | Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary. | 70 |
|
|
42
|
+
| `maxSlippagePercent` | *components.CreditLoopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
|
|
43
|
+
| `emodeCategory` | *number* | :heavy_minus_sign: | Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated). | |
|
|
44
|
+
| `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
Which lending protocol a credit action targets.
|
|
4
4
|
|
|
5
5
|
``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
6
|
-
field) keep hitting the unchanged Aave code path. ``
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
endpoints reject it with a 422.
|
|
6
|
+
field) keep hitting the unchanged Aave code path. ``MORPHO`` identifies Morpho
|
|
7
|
+
Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler
|
|
8
|
+
V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and
|
|
9
|
+
supports isolated per-sub-account positions (``sub_account_id``). All three
|
|
10
|
+
support the loop/unloop leverage endpoints.
|
|
12
11
|
|
|
13
12
|
## Example Usage
|
|
14
13
|
|
|
@@ -17,13 +17,13 @@ let value: CreditRepayParams = {
|
|
|
17
17
|
|
|
18
18
|
## Fields
|
|
19
19
|
|
|
20
|
-
| Field
|
|
21
|
-
|
|
|
22
|
-
| `actionType`
|
|
23
|
-
| `token`
|
|
24
|
-
| `amount`
|
|
25
|
-
| `interestRateMode`
|
|
26
|
-
| `protocol`
|
|
27
|
-
| `borrowVault`
|
|
28
|
-
| `subAccountId`
|
|
29
|
-
| `marketId`
|
|
20
|
+
| Field | Type | Required | Description | Example |
|
|
21
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| `actionType` | *"CREDIT_REPAY"* | :heavy_check_mark: | N/A | CREDIT_REPAY |
|
|
23
|
+
| `token` | *string* | :heavy_check_mark: | Token to repay. | |
|
|
24
|
+
| `amount` | *components.CreditRepayParamsAmount* | :heavy_check_mark: | Amount in token units to repay. | |
|
|
25
|
+
| `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. | |
|
|
26
|
+
| `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. | |
|
|
27
|
+
| `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the debt is owed to. Required when protocol=EULER. | |
|
|
28
|
+
| `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 |
|
|
29
|
+
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
|