@compass-labs/api-sdk 2.2.100 → 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.
- package/dist/commonjs/funcs/creditCreditBorrow.d.ts +1 -1
- package/dist/commonjs/funcs/creditCreditBorrow.js +1 -1
- package/dist/commonjs/funcs/creditCreditLoop.d.ts +8 -22
- package/dist/commonjs/funcs/creditCreditLoop.d.ts.map +1 -1
- package/dist/commonjs/funcs/creditCreditLoop.js +8 -22
- package/dist/commonjs/funcs/creditCreditLoop.js.map +1 -1
- package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts +8 -7
- package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
- package/dist/commonjs/funcs/creditCreditLoopedPositions.js +8 -7
- package/dist/commonjs/funcs/creditCreditLoopedPositions.js.map +1 -1
- package/dist/commonjs/funcs/creditCreditRebalance.d.ts +11 -34
- package/dist/commonjs/funcs/creditCreditRebalance.d.ts.map +1 -1
- package/dist/commonjs/funcs/creditCreditRebalance.js +11 -34
- package/dist/commonjs/funcs/creditCreditRebalance.js.map +1 -1
- package/dist/commonjs/funcs/creditCreditRepay.d.ts +1 -1
- package/dist/commonjs/funcs/creditCreditRepay.js +1 -1
- package/dist/commonjs/funcs/creditCreditUnloop.d.ts +7 -38
- package/dist/commonjs/funcs/creditCreditUnloop.d.ts.map +1 -1
- package/dist/commonjs/funcs/creditCreditUnloop.js +7 -38
- package/dist/commonjs/funcs/creditCreditUnloop.js.map +1 -1
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +31 -18
- package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditlooprequest.js +5 -6
- package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
- package/dist/commonjs/models/components/creditloopresponse.d.ts +5 -5
- package/dist/commonjs/models/components/creditloopresponse.js +1 -1
- package/dist/commonjs/models/components/creditprotocol.d.ts +36 -10
- package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.js +18 -5
- package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +42 -10
- package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditunlooprequest.js +13 -2
- package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
- package/dist/commonjs/models/components/creditunloopresponse.d.ts +8 -8
- package/dist/commonjs/models/components/creditunloopresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditunloopresponse.js +2 -2
- package/dist/commonjs/models/components/creditunloopresponse.js.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- package/dist/commonjs/models/components/rebalancetargetpreview.d.ts.map +1 -1
- package/dist/commonjs/models/components/rebalancetargetpreview.js.map +1 -1
- package/dist/commonjs/models/components/swapinfo.d.ts +2 -2
- package/dist/commonjs/sdk/credit.d.ts +44 -111
- package/dist/commonjs/sdk/credit.d.ts.map +1 -1
- package/dist/commonjs/sdk/credit.js +44 -111
- package/dist/commonjs/sdk/credit.js.map +1 -1
- package/dist/esm/funcs/creditCreditBorrow.d.ts +1 -1
- package/dist/esm/funcs/creditCreditBorrow.js +1 -1
- package/dist/esm/funcs/creditCreditLoop.d.ts +8 -22
- package/dist/esm/funcs/creditCreditLoop.d.ts.map +1 -1
- package/dist/esm/funcs/creditCreditLoop.js +8 -22
- package/dist/esm/funcs/creditCreditLoop.js.map +1 -1
- package/dist/esm/funcs/creditCreditLoopedPositions.d.ts +8 -7
- package/dist/esm/funcs/creditCreditLoopedPositions.d.ts.map +1 -1
- package/dist/esm/funcs/creditCreditLoopedPositions.js +8 -7
- package/dist/esm/funcs/creditCreditLoopedPositions.js.map +1 -1
- package/dist/esm/funcs/creditCreditRebalance.d.ts +11 -34
- package/dist/esm/funcs/creditCreditRebalance.d.ts.map +1 -1
- package/dist/esm/funcs/creditCreditRebalance.js +11 -34
- package/dist/esm/funcs/creditCreditRebalance.js.map +1 -1
- package/dist/esm/funcs/creditCreditRepay.d.ts +1 -1
- package/dist/esm/funcs/creditCreditRepay.js +1 -1
- package/dist/esm/funcs/creditCreditUnloop.d.ts +7 -38
- package/dist/esm/funcs/creditCreditUnloop.d.ts.map +1 -1
- package/dist/esm/funcs/creditCreditUnloop.js +7 -38
- package/dist/esm/funcs/creditCreditUnloop.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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +31 -18
- package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditlooprequest.js +4 -5
- package/dist/esm/models/components/creditlooprequest.js.map +1 -1
- package/dist/esm/models/components/creditloopresponse.d.ts +5 -5
- package/dist/esm/models/components/creditloopresponse.js +1 -1
- package/dist/esm/models/components/creditprotocol.d.ts +36 -10
- package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/esm/models/components/creditprotocol.js +18 -5
- package/dist/esm/models/components/creditprotocol.js.map +1 -1
- package/dist/esm/models/components/creditrepayparams.d.ts +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +42 -10
- package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditunlooprequest.js +12 -1
- package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
- package/dist/esm/models/components/creditunloopresponse.d.ts +8 -8
- package/dist/esm/models/components/creditunloopresponse.d.ts.map +1 -1
- package/dist/esm/models/components/creditunloopresponse.js +2 -2
- package/dist/esm/models/components/creditunloopresponse.js.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- 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 +18 -5
- package/dist/esm/models/components/rebalancetargetpreview.d.ts.map +1 -1
- package/dist/esm/models/components/rebalancetargetpreview.js.map +1 -1
- package/dist/esm/models/components/swapinfo.d.ts +2 -2
- package/dist/esm/sdk/credit.d.ts +44 -111
- package/dist/esm/sdk/credit.d.ts.map +1 -1
- package/dist/esm/sdk/credit.js +44 -111
- package/dist/esm/sdk/credit.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 +19 -19
- package/docs/models/components/creditlooprequestchain.md +1 -1
- package/docs/models/components/creditlooprequestinitialcollateralamount.md +1 -1
- package/docs/models/components/creditlooprequestloantovalue.md +1 -1
- package/docs/models/components/{pricing.md → creditlooprequestpricing.md} +3 -3
- package/docs/models/components/creditloopresponse.md +8 -8
- package/docs/models/components/creditloopresponseswapprovider.md +1 -1
- package/docs/models/components/creditprotocol.md +18 -5
- 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 +17 -16
- package/docs/models/components/creditunlooprequestchain.md +1 -1
- package/docs/models/components/creditunlooprequestpricing.md +17 -0
- package/docs/models/components/creditunloopresponse.md +10 -10
- package/docs/models/components/creditunloopresponseswapprovider.md +1 -1
- 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/docs/models/components/swapinfo.md +10 -10
- package/docs/sdks/credit/README.md +40 -107
- package/openapi_prepped_for_speakeasy.json +47 -29
- package/package.json +1 -1
- package/src/funcs/creditCreditBorrow.ts +1 -1
- package/src/funcs/creditCreditLoop.ts +8 -22
- package/src/funcs/creditCreditLoopedPositions.ts +8 -7
- package/src/funcs/creditCreditRebalance.ts +11 -34
- package/src/funcs/creditCreditRepay.ts +1 -1
- package/src/funcs/creditCreditUnloop.ts +7 -38
- package/src/lib/config.ts +2 -2
- package/src/models/components/accountsummary.ts +18 -5
- package/src/models/components/collateralposition.ts +18 -5
- package/src/models/components/creditborrowparams.ts +18 -5
- package/src/models/components/creditborrowrequest.ts +18 -5
- package/src/models/components/creditenablecollateralparams.ts +18 -5
- package/src/models/components/creditlooprequest.ts +36 -20
- package/src/models/components/creditloopresponse.ts +5 -5
- package/src/models/components/creditprotocol.ts +36 -10
- package/src/models/components/creditrepayparams.ts +18 -5
- package/src/models/components/creditrepayrequest.ts +18 -5
- package/src/models/components/creditsupplyparams.ts +18 -5
- package/src/models/components/creditunlooprequest.ts +49 -10
- package/src/models/components/creditunloopresponse.ts +9 -9
- package/src/models/components/creditwithdrawparams.ts +18 -5
- package/src/models/components/debtposition.ts +18 -5
- package/src/models/components/loopedposition.ts +18 -5
- package/src/models/components/rebalancetarget.ts +18 -5
- package/src/models/components/rebalancetargetpreview.ts +18 -5
- package/src/models/components/swapinfo.ts +2 -2
- package/src/sdk/credit.ts +44 -111
|
@@ -12,46 +12,15 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Unwind a leveraged loop
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Unwind
|
|
15
|
+
* Unwind a leveraged position in ONE atomic transaction.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* step; any positive surplus stays in the Credit Account as borrow-token dust
|
|
21
|
-
* (the preview reports the bound as estimated_max_dust).
|
|
17
|
+
* Withdraw collateral, swap it back to the borrow token, repay, repeat — until
|
|
18
|
+
* the position reaches target_multiplier, or until the debt is cleared exactly
|
|
19
|
+
* if you omit it. If any step fails the whole transaction reverts.
|
|
22
20
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* instead of swapping the share token on a DEX; a direct share-token route is
|
|
27
|
-
* only ever used when it prices within 1% of net asset value.
|
|
28
|
-
*
|
|
29
|
-
* Omit target_multiplier for a full close: the debt is cleared exactly —
|
|
30
|
-
* accrued interest included — and the pair collateral is returned to the Credit
|
|
31
|
-
* Account. Pass 1 to clear the debt but keep the collateral supplied, or a value
|
|
32
|
-
* above 1 to delever to that multiplier (it must be below the position's current
|
|
33
|
-
* multiplier).
|
|
34
|
-
*
|
|
35
|
-
* Each withdrawal is sized to keep the position's health factor ≥ 1.02 at that
|
|
36
|
-
* step, so a position opened very close to the liquidation threshold may need
|
|
37
|
-
* more than one transaction to fully close — set allow_partial=true to return
|
|
38
|
-
* the maximum single-transaction progress (preview.fully_unwound=false), then
|
|
39
|
-
* call unloop again to finish. Very large unwinds relative to pool depth can
|
|
40
|
-
* still exceed the slippage tolerance through their own cumulative price impact.
|
|
41
|
-
*
|
|
42
|
-
* Positions are unwound as far as the swap router can route; on a router-minimum
|
|
43
|
-
* stop the engine still withdraws all collateral not needed to back the residual,
|
|
44
|
-
* and completes a true full close whenever the unwind's own guaranteed swap
|
|
45
|
-
* surpluses (or the Credit Account's idle balance) cover the remainder — a
|
|
46
|
-
* residual below the router's minimum routable size never fails the call, it is
|
|
47
|
-
* reported honestly in the preview (fully_unwound=false).
|
|
48
|
-
*
|
|
49
|
-
* When other open Aave loops share this position's collateral reserve, a full
|
|
50
|
-
* close withdraws only this position's attributed share of the pooled collateral
|
|
51
|
-
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
52
|
-
*
|
|
53
|
-
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
54
|
-
* open loops via /v2/credit/looped_positions.
|
|
21
|
+
* See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
|
|
22
|
+
* for chain coverage, vault-share collateral, shared Aave reserves and the full
|
|
23
|
+
* error list.
|
|
55
24
|
*/
|
|
56
25
|
export declare function creditCreditUnloop(client: CompassApiSDKCore, request: components.CreditUnloopRequest, options?: RequestOptions): APIPromise<Result<components.CreditUnloopResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
57
26
|
//# sourceMappingURL=creditCreditUnloop.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditCreditUnloop.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditUnloop.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"creditCreditUnloop.d.ts","sourceRoot":"","sources":["../../../src/funcs/creditCreditUnloop.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,oBAAoB,EAC7B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -15,46 +15,15 @@ import { APIPromise } from "../types/async.js";
|
|
|
15
15
|
* Unwind a leveraged loop
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* Unwind
|
|
18
|
+
* Unwind a leveraged position in ONE atomic transaction.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* step; any positive surplus stays in the Credit Account as borrow-token dust
|
|
24
|
-
* (the preview reports the bound as estimated_max_dust).
|
|
20
|
+
* Withdraw collateral, swap it back to the borrow token, repay, repeat — until
|
|
21
|
+
* the position reaches target_multiplier, or until the debt is cleared exactly
|
|
22
|
+
* if you omit it. If any step fails the whole transaction reverts.
|
|
25
23
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* instead of swapping the share token on a DEX; a direct share-token route is
|
|
30
|
-
* only ever used when it prices within 1% of net asset value.
|
|
31
|
-
*
|
|
32
|
-
* Omit target_multiplier for a full close: the debt is cleared exactly —
|
|
33
|
-
* accrued interest included — and the pair collateral is returned to the Credit
|
|
34
|
-
* Account. Pass 1 to clear the debt but keep the collateral supplied, or a value
|
|
35
|
-
* above 1 to delever to that multiplier (it must be below the position's current
|
|
36
|
-
* multiplier).
|
|
37
|
-
*
|
|
38
|
-
* Each withdrawal is sized to keep the position's health factor ≥ 1.02 at that
|
|
39
|
-
* step, so a position opened very close to the liquidation threshold may need
|
|
40
|
-
* more than one transaction to fully close — set allow_partial=true to return
|
|
41
|
-
* the maximum single-transaction progress (preview.fully_unwound=false), then
|
|
42
|
-
* call unloop again to finish. Very large unwinds relative to pool depth can
|
|
43
|
-
* still exceed the slippage tolerance through their own cumulative price impact.
|
|
44
|
-
*
|
|
45
|
-
* Positions are unwound as far as the swap router can route; on a router-minimum
|
|
46
|
-
* stop the engine still withdraws all collateral not needed to back the residual,
|
|
47
|
-
* and completes a true full close whenever the unwind's own guaranteed swap
|
|
48
|
-
* surpluses (or the Credit Account's idle balance) cover the remainder — a
|
|
49
|
-
* residual below the router's minimum routable size never fails the call, it is
|
|
50
|
-
* reported honestly in the preview (fully_unwound=false).
|
|
51
|
-
*
|
|
52
|
-
* When other open Aave loops share this position's collateral reserve, a full
|
|
53
|
-
* close withdraws only this position's attributed share of the pooled collateral
|
|
54
|
-
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
55
|
-
*
|
|
56
|
-
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
57
|
-
* open loops via /v2/credit/looped_positions.
|
|
24
|
+
* See the [Leveraged Looping guide](https://docs.compasslabs.ai/v2/Products/Looping)
|
|
25
|
+
* for chain coverage, vault-share collateral, shared Aave reserves and the full
|
|
26
|
+
* error list.
|
|
58
27
|
*/
|
|
59
28
|
export function creditCreditUnloop(client, request, options) {
|
|
60
29
|
return new APIPromise($do(client, request, options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditCreditUnloop.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditUnloop.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAS5D,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD
|
|
1
|
+
{"version":3,"file":"creditCreditUnloop.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditUnloop.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C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,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare const SDK_METADATA: {
|
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "0.0.1";
|
|
34
34
|
readonly sdkVersion: "2.0.0";
|
|
35
|
-
readonly genVersion: "2.
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.
|
|
35
|
+
readonly genVersion: "2.932.9";
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.932.9 0.0.1 @compass-labs/api-sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -28,7 +28,7 @@ export const SDK_METADATA = {
|
|
|
28
28
|
language: "typescript",
|
|
29
29
|
openapiDocVersion: "0.0.1",
|
|
30
30
|
sdkVersion: "2.0.0",
|
|
31
|
-
genVersion: "2.
|
|
32
|
-
userAgent: "speakeasy-sdk/typescript 2.0.0 2.
|
|
31
|
+
genVersion: "2.932.9",
|
|
32
|
+
userAgent: "speakeasy-sdk/typescript 2.0.0 2.932.9 0.0.1 @compass-labs/api-sdk",
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=config.js.map
|
|
@@ -18,11 +18,24 @@ export type AccountSummary = {
|
|
|
18
18
|
* @remarks
|
|
19
19
|
*
|
|
20
20
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
21
|
-
* field) keep hitting the unchanged Aave code path
|
|
22
|
-
* Blue lending markets by their bytes32
|
|
23
|
-
* V2 markets by their EVK
|
|
24
|
-
*
|
|
25
|
-
*
|
|
21
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
22
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
23
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
24
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
25
|
+
* per-sub-account positions (``sub_account_id``).
|
|
26
|
+
*
|
|
27
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
28
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
29
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
30
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
31
|
+
*
|
|
32
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
33
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
34
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
35
|
+
* silently absent there rather than an error, so read it from
|
|
36
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
37
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
38
|
+
* emitted.)
|
|
26
39
|
*/
|
|
27
40
|
protocol?: CreditProtocol | undefined;
|
|
28
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsummary.d.ts","sourceRoot":"","sources":["../../../../src/models/components/accountsummary.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B
|
|
1
|
+
{"version":3,"file":"accountsummary.d.ts","sourceRoot":"","sources":["../../../../src/models/components/accountsummary.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,cAAc,EACd,CAAC,CAAC,UAAU,EACZ,OAAO,CAqBP,CAAC;AAEH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAMrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsummary.js","sourceRoot":"","sources":["../../../../src/models/components/accountsummary.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;A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mBAAmB,EAAE,iBAAiB;QACtC,aAAa,EAAE,YAAY;KAC5B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,sBAAsB,CACpC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4BAA4B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxD,4CAA4C,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -21,11 +21,24 @@ export type CollateralPosition = {
|
|
|
21
21
|
* @remarks
|
|
22
22
|
*
|
|
23
23
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
24
|
-
* field) keep hitting the unchanged Aave code path
|
|
25
|
-
* Blue lending markets by their bytes32
|
|
26
|
-
* V2 markets by their EVK
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
25
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
26
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
27
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
28
|
+
* per-sub-account positions (``sub_account_id``).
|
|
29
|
+
*
|
|
30
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
31
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
32
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
33
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
34
|
+
*
|
|
35
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
36
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
37
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
38
|
+
* silently absent there rather than an error, so read it from
|
|
39
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
40
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
41
|
+
* emitted.)
|
|
29
42
|
*/
|
|
30
43
|
protocol?: CreditProtocol | undefined;
|
|
31
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collateralposition.d.ts","sourceRoot":"","sources":["../../../../src/models/components/collateralposition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAA6B,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf
|
|
1
|
+
{"version":3,"file":"collateralposition.d.ts","sourceRoot":"","sources":["../../../../src/models/components/collateralposition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAA6B,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,OAAO,CA8BP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collateralposition.js","sourceRoot":"","sources":["../../../../src/models/components/collateralposition.ts"],"names":[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AC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -37,11 +37,24 @@ export type CreditBorrowParams = {
|
|
|
37
37
|
* @remarks
|
|
38
38
|
*
|
|
39
39
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
40
|
-
* field) keep hitting the unchanged Aave code path
|
|
41
|
-
* Blue lending markets by their bytes32
|
|
42
|
-
* V2 markets by their EVK
|
|
43
|
-
*
|
|
44
|
-
*
|
|
40
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
41
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
42
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
43
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
44
|
+
* per-sub-account positions (``sub_account_id``).
|
|
45
|
+
*
|
|
46
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
47
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
48
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
49
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
50
|
+
*
|
|
51
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
52
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
53
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
54
|
+
* silently absent there rather than an error, so read it from
|
|
55
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
56
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
57
|
+
* emitted.)
|
|
45
58
|
*/
|
|
46
59
|
protocol?: CreditProtocol | undefined;
|
|
47
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditborrowparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditborrowparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAChD;;OAEG;IACH,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC
|
|
1
|
+
{"version":3,"file":"creditborrowparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditborrowparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAA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ACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAmBlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditborrowparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditborrowparams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAGL,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"creditborrowparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditborrowparams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAGL,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;AA2E/B,gBAAgB;AAChB,MAAM,CAAC,MAAM,uCAAuC,GAIhD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,MAAM,UAAU,8BAA8B,CAC5C,wBAAkD;IAElD,OAAO,IAAI,CAAC,SAAS,CACnB,uCAAu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equest = {
|
|
|
45
45
|
* @remarks
|
|
46
46
|
*
|
|
47
47
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
48
|
-
* field) keep hitting the unchanged Aave code path
|
|
49
|
-
* Blue lending markets by their bytes32
|
|
50
|
-
* V2 markets by their EVK
|
|
51
|
-
*
|
|
52
|
-
*
|
|
48
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
49
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
50
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
51
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
52
|
+
* per-sub-account positions (``sub_account_id``).
|
|
53
|
+
*
|
|
54
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
55
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
56
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
57
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
58
|
+
*
|
|
59
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
60
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
61
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
62
|
+
* silently absent there rather than an error, so read it from
|
|
63
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
64
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
65
|
+
* emitted.)
|
|
53
66
|
*/
|
|
54
67
|
protocol?: CreditProtocol | undefined;
|
|
55
68
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditborrowrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditborrowrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,SAAS,EACT,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAO3B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,wBAAwB,CAAC;IAChC
|
|
1
|
+
{"version":3,"file":"creditborrowrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditborrowrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,SAAS,EACT,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAO3B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BA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|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditborrowrequest.js","sourceRoot":"","sources":["../../../../src/models/components/creditborrowrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAGL,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;
|
|
1
|
+
{"version":3,"file":"creditborrowrequest.js","sourceRoot":"","sources":["../../../../src/models/components/creditborrowrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAGL,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;AAgIX,gBAAgB;AAChB,MAAM,CAAC,MAA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CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrD,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,eAAe,EAAE,kBAAkB;QACnC,WAAW,EAAE,cAAc;QAC3B,QAAQ,EAAE,WAAW;QACrB,YAAY,EAAE,gBAAgB;QAC9B,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,WAAW;QACrB,eAAe,EAAE,kBAAkB;QACnC,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,eAAe;QAC7B,gBAAgB,EAAE,oBAAoB;QACtC,cAAc,EAAE,iBAAiB;QACjC,gBAAgB,EAAE,mBAAmB;QACrC,YAAY,EAAE,eAAe;QAC7B,eAAe,EAAE,kBAAkB;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,yBAAyB,CACvC,mBAAwC;IAExC,OAAO,IAAI,CAAC,SAAS,CACnB,kCAAkC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAC9D,CAAC;AACJ,CAAC"}
|
|
@@ -20,11 +20,24 @@ export type CreditEnableCollateralParams = {
|
|
|
20
20
|
* @remarks
|
|
21
21
|
*
|
|
22
22
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
23
|
-
* field) keep hitting the unchanged Aave code path
|
|
24
|
-
* Blue lending markets by their bytes32
|
|
25
|
-
* V2 markets by their EVK
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
24
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
25
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
26
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
27
|
+
* per-sub-account positions (``sub_account_id``).
|
|
28
|
+
*
|
|
29
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
30
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
31
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
32
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
33
|
+
*
|
|
34
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
35
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
36
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
37
|
+
* silently absent there rather than an error, so read it from
|
|
38
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
39
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
40
|
+
* emitted.)
|
|
28
41
|
*/
|
|
29
42
|
protocol?: CreditProtocol | undefined;
|
|
30
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditenablecollateralparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditenablecollateralparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,EAAE,0BAA0B,CAAC;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd
|
|
1
|
+
{"version":3,"file":"creditenablecollateralparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditenablecollateralparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,EAAE,0BAA0B,CAAC;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,qCAAqC,GAAG;IAClD,WAAW,EAAE,0BAA0B,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,OAAO,CACjE,qCAAqC,EACrC,CAAC,CAAC,UAAU,EACZ,4BAA4B,CAa5B,CAAC;AAEH,wBAAgB,kCAAkC,CAChD,4BAA4B,EAAE,4BAA4B,GACzD,MAAM,CAMR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditenablecollateralparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditenablecollateralparams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"creditenablecollateralparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditenablecollateralparams.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAEL,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AA6D7B,gBAAgB;AAChB,MAAM,CAAC,MAAM,2CAA2C,GAIpD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,QAAQ,EAAE,6BAA6B,CAAC,QAAQ,EAAE;IAClD,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,eAAe,EAAE,kBAAkB;QACnC,YAAY,EAAE,gBAAgB;KAC/B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,kCAAkC,CAChD,4BAA0D;IAE1D,OAAO,IAAI,CAAC,SAAS,CACnB,2CAA2C,CAAC,KAAK,CAC/C,4BAA4B,CAC7B,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v3";
|
|
|
2
2
|
import { ClosedEnum } from "../../types/enums.js";
|
|
3
3
|
import { CreditProtocol } from "./creditprotocol.js";
|
|
4
4
|
/**
|
|
5
|
-
* Blockchain network.
|
|
5
|
+
* Blockchain network. Not every protocol is deployed on every chain — see the protocol field — and a chain with no credit venue at all returns a 422 naming the chains that do.
|
|
6
6
|
*/
|
|
7
7
|
export declare const CreditLoopRequestChain: {
|
|
8
8
|
readonly Arbitrum: "arbitrum";
|
|
@@ -13,11 +13,11 @@ export declare const CreditLoopRequestChain: {
|
|
|
13
13
|
readonly Tempo: "tempo";
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Blockchain network.
|
|
16
|
+
* Blockchain network. Not every protocol is deployed on every chain — see the protocol field — and a chain with no credit venue at all returns a 422 naming the chains that do.
|
|
17
17
|
*/
|
|
18
18
|
export type CreditLoopRequestChain = ClosedEnum<typeof CreditLoopRequestChain>;
|
|
19
19
|
/**
|
|
20
|
-
* Collateral (in token units)
|
|
20
|
+
* Collateral (in token units) that the Credit Account must ALREADY hold when this is called — the loop never pulls from the owner's wallet mid-transaction. Fund the account first via /v2/credit/transfer (action=DEPOSIT).
|
|
21
21
|
*/
|
|
22
22
|
export type CreditLoopRequestInitialCollateralAmount = number | string;
|
|
23
23
|
/**
|
|
@@ -25,7 +25,7 @@ export type CreditLoopRequestInitialCollateralAmount = number | string;
|
|
|
25
25
|
*/
|
|
26
26
|
export type CreditLoopRequestMultiplier = number | string;
|
|
27
27
|
/**
|
|
28
|
-
* 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.
|
|
28
|
+
* 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; Euler's borrow LTV for the collateral vault); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.
|
|
29
29
|
*/
|
|
30
30
|
export type CreditLoopRequestLoanToValue = number | string;
|
|
31
31
|
/**
|
|
@@ -35,7 +35,7 @@ export type CreditLoopRequestMaxSlippagePercent = number | string;
|
|
|
35
35
|
/**
|
|
36
36
|
* Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing).
|
|
37
37
|
*/
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const CreditLoopRequestPricing: {
|
|
39
39
|
readonly Auto: "auto";
|
|
40
40
|
readonly Firm: "firm";
|
|
41
41
|
readonly Market: "market";
|
|
@@ -43,7 +43,7 @@ export declare const Pricing: {
|
|
|
43
43
|
/**
|
|
44
44
|
* Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing).
|
|
45
45
|
*/
|
|
46
|
-
export type
|
|
46
|
+
export type CreditLoopRequestPricing = ClosedEnum<typeof CreditLoopRequestPricing>;
|
|
47
47
|
/**
|
|
48
48
|
* Open a leveraged loop: repeatedly supply collateral, borrow, and swap the
|
|
49
49
|
*
|
|
@@ -57,7 +57,7 @@ export type CreditLoopRequest = {
|
|
|
57
57
|
*/
|
|
58
58
|
owner: string;
|
|
59
59
|
/**
|
|
60
|
-
* Blockchain network.
|
|
60
|
+
* Blockchain network. Not every protocol is deployed on every chain — see the protocol field — and a chain with no credit venue at all returns a 422 naming the chains that do.
|
|
61
61
|
*/
|
|
62
62
|
chain: CreditLoopRequestChain;
|
|
63
63
|
/**
|
|
@@ -66,11 +66,24 @@ export type CreditLoopRequest = {
|
|
|
66
66
|
* @remarks
|
|
67
67
|
*
|
|
68
68
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
69
|
-
* field) keep hitting the unchanged Aave code path
|
|
70
|
-
* Blue lending markets by their bytes32
|
|
71
|
-
* V2 markets by their EVK
|
|
72
|
-
*
|
|
73
|
-
*
|
|
69
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
70
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
71
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
72
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
73
|
+
* per-sub-account positions (``sub_account_id``).
|
|
74
|
+
*
|
|
75
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
76
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
77
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
78
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
79
|
+
*
|
|
80
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
81
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
82
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
83
|
+
* silently absent there rather than an error, so read it from
|
|
84
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
85
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
86
|
+
* emitted.)
|
|
74
87
|
*/
|
|
75
88
|
protocol?: CreditProtocol | undefined;
|
|
76
89
|
/**
|
|
@@ -98,7 +111,7 @@ export type CreditLoopRequest = {
|
|
|
98
111
|
*/
|
|
99
112
|
borrowToken: string;
|
|
100
113
|
/**
|
|
101
|
-
* Collateral (in token units)
|
|
114
|
+
* Collateral (in token units) that the Credit Account must ALREADY hold when this is called — the loop never pulls from the owner's wallet mid-transaction. Fund the account first via /v2/credit/transfer (action=DEPOSIT).
|
|
102
115
|
*/
|
|
103
116
|
initialCollateralAmount: number | string;
|
|
104
117
|
/**
|
|
@@ -106,7 +119,7 @@ export type CreditLoopRequest = {
|
|
|
106
119
|
*/
|
|
107
120
|
multiplier: number | string;
|
|
108
121
|
/**
|
|
109
|
-
* 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.
|
|
122
|
+
* 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; Euler's borrow LTV for the collateral vault); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.
|
|
110
123
|
*/
|
|
111
124
|
loanToValue: number | string;
|
|
112
125
|
/**
|
|
@@ -114,7 +127,7 @@ export type CreditLoopRequest = {
|
|
|
114
127
|
*/
|
|
115
128
|
maxSlippagePercent?: number | string | undefined;
|
|
116
129
|
/**
|
|
117
|
-
* Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated).
|
|
130
|
+
* Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated). Both tokens must belong to the category or the build returns a 422. On Hyperlend (chain=hyperevm) category 1 is the HYPE-correlated set covering wstHYPE and WHYPE.
|
|
118
131
|
*/
|
|
119
132
|
emodeCategory?: number | null | undefined;
|
|
120
133
|
/**
|
|
@@ -122,13 +135,13 @@ export type CreditLoopRequest = {
|
|
|
122
135
|
*/
|
|
123
136
|
gasSponsorship?: boolean | undefined;
|
|
124
137
|
/**
|
|
125
|
-
* If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null)
|
|
138
|
+
* If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null). NOTE that this guarantees only that no firm quote was spent — it does not guarantee an absent transaction: on a pair no firm provider covers, and under pricing=market, the call still falls through to the aggregator and returns a signable transaction. How the estimate is priced follows `pricing`: on a firm-covered pair under 'auto' or 'firm' it is computed from the firm provider's live price levels (indicative); otherwise swap legs are priced by the default aggregator. Set it on every call made while a user is exploring parameters, and leave it false only for the build they actually intend to sign — firm quotes are single-use maker commitments, and requesting them for displays that are never executed degrades the pricing this API is offered.
|
|
126
139
|
*/
|
|
127
140
|
preview?: boolean | undefined;
|
|
128
141
|
/**
|
|
129
142
|
* Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing).
|
|
130
143
|
*/
|
|
131
|
-
pricing?:
|
|
144
|
+
pricing?: CreditLoopRequestPricing | undefined;
|
|
132
145
|
};
|
|
133
146
|
/** @internal */
|
|
134
147
|
export declare const CreditLoopRequestChain$outboundSchema: z.ZodNativeEnum<typeof CreditLoopRequestChain>;
|
|
@@ -153,7 +166,7 @@ export type CreditLoopRequestMaxSlippagePercent$Outbound = number | string;
|
|
|
153
166
|
export declare const CreditLoopRequestMaxSlippagePercent$outboundSchema: z.ZodType<CreditLoopRequestMaxSlippagePercent$Outbound, z.ZodTypeDef, CreditLoopRequestMaxSlippagePercent>;
|
|
154
167
|
export declare function creditLoopRequestMaxSlippagePercentToJSON(creditLoopRequestMaxSlippagePercent: CreditLoopRequestMaxSlippagePercent): string;
|
|
155
168
|
/** @internal */
|
|
156
|
-
export declare const
|
|
169
|
+
export declare const CreditLoopRequestPricing$outboundSchema: z.ZodNativeEnum<typeof CreditLoopRequestPricing>;
|
|
157
170
|
/** @internal */
|
|
158
171
|
export type CreditLoopRequest$Outbound = {
|
|
159
172
|
owner: string;
|