@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.
- 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
|
@@ -17,12 +17,12 @@ let value: CreditWithdrawParams = {
|
|
|
17
17
|
|
|
18
18
|
## Fields
|
|
19
19
|
|
|
20
|
-
| Field
|
|
21
|
-
|
|
|
22
|
-
| `actionType`
|
|
23
|
-
| `token`
|
|
24
|
-
| `amount`
|
|
25
|
-
| `protocol`
|
|
26
|
-
| `collateralVault`
|
|
27
|
-
| `subAccountId`
|
|
28
|
-
| `marketId`
|
|
20
|
+
| Field | Type | Required | Description | Example |
|
|
21
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| `actionType` | *"CREDIT_WITHDRAW"* | :heavy_check_mark: | N/A | CREDIT_WITHDRAW |
|
|
23
|
+
| `token` | *string* | :heavy_check_mark: | Collateral token to withdraw. | |
|
|
24
|
+
| `amount` | *components.CreditWithdrawParamsAmount* | :heavy_check_mark: | Amount in token units to withdraw. | |
|
|
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 withdraw from. Required when protocol=EULER. | |
|
|
27
|
+
| `subAccountId` | *number* | :heavy_minus_sign: | Euler only: EVC sub-account (0–255) holding the collateral to withdraw. Each sub-account is an independent Euler position with its own collateral, borrow controller, and health. Defaults to 0. Ignored for Aave/Morpho. | 0 |
|
|
28
|
+
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
|
|
@@ -17,19 +17,19 @@ let value: DebtPosition = {
|
|
|
17
17
|
|
|
18
18
|
## Fields
|
|
19
19
|
|
|
20
|
-
| Field
|
|
21
|
-
|
|
|
22
|
-
| `token`
|
|
23
|
-
| `symbol`
|
|
24
|
-
| `protocol`
|
|
25
|
-
| `vault`
|
|
26
|
-
| `subAccountId`
|
|
27
|
-
| `marketId`
|
|
28
|
-
| `healthFactor`
|
|
29
|
-
| `amountBorrowed`
|
|
30
|
-
| `usdValue`
|
|
31
|
-
| `borrowApy`
|
|
32
|
-
| `totalBorrowed`
|
|
33
|
-
| `totalRepaid`
|
|
34
|
-
| `interestPaid`
|
|
35
|
-
| `events`
|
|
20
|
+
| Field | Type | Required | Description | Example |
|
|
21
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| `token` | *string* | :heavy_check_mark: | Address of the borrow token. | |
|
|
23
|
+
| `symbol` | *string* | :heavy_check_mark: | Symbol of the borrow token (e.g. WETH). | |
|
|
24
|
+
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``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. | |
|
|
25
|
+
| `vault` | *string* | :heavy_minus_sign: | Euler only: the EVK borrow vault this debt is owed to. | |
|
|
26
|
+
| `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0–255) this debt belongs to. Each sub-account is an independent Euler position with its own health. Null for Aave/Morpho. | |
|
|
27
|
+
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 id of the isolated market this debt is owed to. | |
|
|
28
|
+
| `healthFactor` | *string* | :heavy_minus_sign: | Morpho only: this market's health factor (markets are isolated, so health is per market — below 1 the position is liquidatable). Null for other protocols and when the oracle read fails. | |
|
|
29
|
+
| `amountBorrowed` | *string* | :heavy_check_mark: | Current on-chain debt balance (the vault's underlying asset for Euler). | |
|
|
30
|
+
| `usdValue` | *string* | :heavy_minus_sign: | Debt value in USD. | |
|
|
31
|
+
| `borrowApy` | *string* | :heavy_minus_sign: | Current borrow APY in percentage (e.g. 4.5 means 4.5%). | |
|
|
32
|
+
| `totalBorrowed` | *string* | :heavy_minus_sign: | Total amount borrowed across all borrow events. | |
|
|
33
|
+
| `totalRepaid` | *string* | :heavy_minus_sign: | Total amount repaid across all repay events. | |
|
|
34
|
+
| `interestPaid` | *string* | :heavy_minus_sign: | Interest paid on debt: on_chain_balance + total_repaid - total_borrowed. | |
|
|
35
|
+
| `events` | [components.CreditEvent](../../models/components/creditevent.md)[] | :heavy_minus_sign: | All historical events for this debt reserve. | [] |
|
|
@@ -30,17 +30,17 @@ let value: LoopedPosition = {
|
|
|
30
30
|
|
|
31
31
|
## Fields
|
|
32
32
|
|
|
33
|
-
| Field
|
|
34
|
-
|
|
|
35
|
-
| `protocol`
|
|
36
|
-
| `marketId`
|
|
37
|
-
| `collateralToken`
|
|
38
|
-
| `collateralSymbol`
|
|
39
|
-
| `debtToken`
|
|
40
|
-
| `debtSymbol`
|
|
41
|
-
| `status`
|
|
42
|
-
| `openedAt`
|
|
43
|
-
| `closedAt`
|
|
44
|
-
| `current`
|
|
45
|
-
| `totals`
|
|
46
|
-
| `history`
|
|
33
|
+
| Field | Type | Required | Description | Example |
|
|
34
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
35
|
+
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_check_mark: | 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. | |
|
|
36
|
+
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 id of the isolated market. | |
|
|
37
|
+
| `collateralToken` | *string* | :heavy_check_mark: | Address of the collateral token. | |
|
|
38
|
+
| `collateralSymbol` | *string* | :heavy_check_mark: | Symbol of the collateral token. | |
|
|
39
|
+
| `debtToken` | *string* | :heavy_check_mark: | Address of the debt token. | |
|
|
40
|
+
| `debtSymbol` | *string* | :heavy_check_mark: | Symbol of the debt token. | |
|
|
41
|
+
| `status` | [components.LoopedPositionStatus](../../models/components/loopedpositionstatus.md) | :heavy_check_mark: | Whether the position is currently open or fully closed. | |
|
|
42
|
+
| `openedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Timestamp of the position's first transaction. | |
|
|
43
|
+
| `closedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Timestamp the position was fully closed; null while open. | |
|
|
44
|
+
| `current` | [components.LoopedPositionCurrentState](../../models/components/loopedpositioncurrentstate.md) | :heavy_minus_sign: | Live on-chain state; null for CLOSED positions. | |
|
|
45
|
+
| `totals` | [components.LoopedPositionTotals](../../models/components/loopedpositiontotals.md) | :heavy_check_mark: | Lifetime totals across all of a looped position's transactions. | |
|
|
46
|
+
| `history` | [components.LoopedPositionHistoryEntry](../../models/components/loopedpositionhistoryentry.md)[] | :heavy_minus_sign: | All transactions for this position, chronological. | [] |
|