@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
|
@@ -44,11 +44,24 @@ const z = __importStar(require("zod/v3"));
|
|
|
44
44
|
* @remarks
|
|
45
45
|
*
|
|
46
46
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
47
|
-
* field) keep hitting the unchanged Aave code path
|
|
48
|
-
* Blue lending markets by their bytes32
|
|
49
|
-
* V2 markets by their EVK
|
|
50
|
-
*
|
|
51
|
-
*
|
|
47
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
48
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
49
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
50
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
51
|
+
* per-sub-account positions (``sub_account_id``).
|
|
52
|
+
*
|
|
53
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
54
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
55
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
56
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
57
|
+
*
|
|
58
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
59
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
60
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
61
|
+
* silently absent there rather than an error, so read it from
|
|
62
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
63
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
64
|
+
* emitted.)
|
|
52
65
|
*/
|
|
53
66
|
exports.CreditProtocol = {
|
|
54
67
|
Aave: "AAVE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditprotocol.js","sourceRoot":"","sources":["../../../../src/models/components/creditprotocol.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAG5B
|
|
1
|
+
{"version":3,"file":"creditprotocol.js","sourceRoot":"","sources":["../../../../src/models/components/creditprotocol.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA4B;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACU,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACR,CAAC;AA4BX,gBAAgB;AACH,QAAA,4BAA4B,GAErC,CAAC,CAAC,UAAU,CAAC,sBAAc,CAAC,CAAC;AACjC,gBAAgB;AACH,QAAA,6BAA6B,GAEtC,oCAA4B,CAAC"}
|
|
@@ -32,11 +32,24 @@ export type CreditRepayParams = {
|
|
|
32
32
|
* @remarks
|
|
33
33
|
*
|
|
34
34
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
35
|
-
* field) keep hitting the unchanged Aave code path
|
|
36
|
-
* Blue lending markets by their bytes32
|
|
37
|
-
* V2 markets by their EVK
|
|
38
|
-
*
|
|
39
|
-
*
|
|
35
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
36
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
37
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
38
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
39
|
+
* per-sub-account positions (``sub_account_id``).
|
|
40
|
+
*
|
|
41
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
42
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
43
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
44
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
45
|
+
*
|
|
46
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
47
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
48
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
49
|
+
* silently absent there rather than an error, so read it from
|
|
50
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
51
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
52
|
+
* emitted.)
|
|
40
53
|
*/
|
|
41
54
|
protocol?: CreditProtocol | undefined;
|
|
42
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditrepayparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditrepayparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,cAAc,CAAC;IAC3B;;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
|
|
1
|
+
{"version":3,"file":"creditrepayparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditrepayparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,gBAAg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IR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditrepayparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditrepayparams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"creditrepayparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditrepayparams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFH,sEAMC;AAsCD,0DAMC;AAzID,0CAA4B;AAC5B,2DAA0D;AAC1D,2DAG6B;AAC7B,+DAG+B;AAuE/B,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,SAAgB,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,8CAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC;AAcD,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,gBAAgB,EAAE,qDAA+B,CAAC,QAAQ,EAAE;IAC5D,QAAQ,EAAE,iDAA6B,CAAC,QAAQ,EAAE;IAClD,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,oBAAoB;QACtC,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,WAAW;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -44,11 +44,24 @@ export type CreditRepayRequest = {
|
|
|
44
44
|
* @remarks
|
|
45
45
|
*
|
|
46
46
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
47
|
-
* field) keep hitting the unchanged Aave code path
|
|
48
|
-
* Blue lending markets by their bytes32
|
|
49
|
-
* V2 markets by their EVK
|
|
50
|
-
*
|
|
51
|
-
*
|
|
47
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
48
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
49
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
50
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
51
|
+
* per-sub-account positions (``sub_account_id``).
|
|
52
|
+
*
|
|
53
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
54
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
55
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
56
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
57
|
+
*
|
|
58
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
59
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
60
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
61
|
+
* silently absent there rather than an error, so read it from
|
|
62
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
63
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
64
|
+
* emitted.)
|
|
52
65
|
*/
|
|
53
66
|
protocol?: CreditProtocol | undefined;
|
|
54
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditrepayrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditrepayrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;CAO1B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAC9C,OAAO,uBAAuB,CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;IAC/B
|
|
1
|
+
{"version":3,"file":"creditrepayrequest.d.ts","sourceRoot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gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAqClB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditrepayrequest.js","sourceRoot":"","sources":["../../../../src/models/components/creditrepayrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"creditrepayrequest.js","sourceRoot":"","sources":["../../../../src/models/components/creditrepayrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmKH,8CAEC;AAYD,oDAEC;AAYD,4EAMC;AAmED,4DAMC;AA5QD,0CAA4B;AAC5B,2DAA0D;AAE1D,2DAG6B;AAC7B,+DAG+B;AAE/B;;GAEG;AACU,QAAA,uBAAuB,GAAG;IACrC,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;AA4HX,gBAAgB;AACH,QAAA,sCAAsC,GAE/C,CAAC,CAAC,UAAU,CAAC,+BAAuB,CAAC,CAAC;AAK1C,gBAAgB;AACH,QAAA,0BAA0B,GAInC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAEtC,SAAgB,iBAAiB,CAAC,WAAwB;IACxD,OAAO,IAAI,CAAC,SAAS,CAAC,kCAA0B,CAAC,KAAK,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AAc;QAC3B,gBAAgB,EAAE,oBAAoB;QACtC,aAAa,EAAE,gBAAgB;QAC/B,cAAc,EAAE,iBAAiB;QACjC,QAAQ,EAAE,WAAW;QACrB,cAAc,EAAE,iBAAiB;QACjC,gBAAgB,EAAE,mBAAmB;QACrC,YAAY,EAAE,eAAe;QAC7B,eAAe,EAAE,kBAAkB;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -23,11 +23,24 @@ export type CreditSupplyParams = {
|
|
|
23
23
|
* @remarks
|
|
24
24
|
*
|
|
25
25
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
26
|
-
* field) keep hitting the unchanged Aave code path
|
|
27
|
-
* Blue lending markets by their bytes32
|
|
28
|
-
* V2 markets by their EVK
|
|
29
|
-
*
|
|
30
|
-
*
|
|
26
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
27
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
28
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
29
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
30
|
+
* per-sub-account positions (``sub_account_id``).
|
|
31
|
+
*
|
|
32
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
33
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
34
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
35
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
36
|
+
*
|
|
37
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
38
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
39
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
40
|
+
* silently absent there rather than an error, so read it from
|
|
41
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
42
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
43
|
+
* emitted.)
|
|
31
44
|
*/
|
|
32
45
|
protocol?: CreditProtocol | undefined;
|
|
33
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditsupplyparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditsupplyparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;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
|
|
1
|
+
{"version":3,"file":"creditsupplyparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditsupplyparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;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;;;;;;;;;;;;;;;;;;;;;;;;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;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhE,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CACW,CAAC;AAEtC,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,eAAe,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,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;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAgBlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditsupplyparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditsupplyparams.ts"],"names":[],"mappings":";AA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EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,eAAe,EAAE,kBAAkB;QACnC,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,WAAW;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,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 CreditUnloopRequestChain: {
|
|
8
8
|
readonly Arbitrum: "arbitrum";
|
|
@@ -13,7 +13,7 @@ export declare const CreditUnloopRequestChain: {
|
|
|
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 CreditUnloopRequestChain = ClosedEnum<typeof CreditUnloopRequestChain>;
|
|
19
19
|
/**
|
|
@@ -24,6 +24,18 @@ export type CreditUnloopRequestTargetMultiplier = number | string;
|
|
|
24
24
|
* Per-swap slippage tolerance in percent. Unwind dust is bounded by this per iteration, so tighter slippage means less dust.
|
|
25
25
|
*/
|
|
26
26
|
export type CreditUnloopRequestMaxSlippagePercent = number | string;
|
|
27
|
+
/**
|
|
28
|
+
* 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 the firm venue cannot serve return the firm_available 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. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
|
|
29
|
+
*/
|
|
30
|
+
export declare const CreditUnloopRequestPricing: {
|
|
31
|
+
readonly Auto: "auto";
|
|
32
|
+
readonly Firm: "firm";
|
|
33
|
+
readonly Market: "market";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
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 the firm venue cannot serve return the firm_available 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. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
|
|
37
|
+
*/
|
|
38
|
+
export type CreditUnloopRequestPricing = ClosedEnum<typeof CreditUnloopRequestPricing>;
|
|
27
39
|
/**
|
|
28
40
|
* Unwind a leveraged loop: repeatedly withdraw collateral, swap it back to
|
|
29
41
|
*
|
|
@@ -37,7 +49,7 @@ export type CreditUnloopRequest = {
|
|
|
37
49
|
*/
|
|
38
50
|
owner: string;
|
|
39
51
|
/**
|
|
40
|
-
* Blockchain network.
|
|
52
|
+
* 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.
|
|
41
53
|
*/
|
|
42
54
|
chain: CreditUnloopRequestChain;
|
|
43
55
|
/**
|
|
@@ -46,11 +58,24 @@ export type CreditUnloopRequest = {
|
|
|
46
58
|
* @remarks
|
|
47
59
|
*
|
|
48
60
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
49
|
-
* field) keep hitting the unchanged Aave code path
|
|
50
|
-
* Blue lending markets by their bytes32
|
|
51
|
-
* V2 markets by their EVK
|
|
52
|
-
*
|
|
53
|
-
*
|
|
61
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
62
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
63
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
64
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
65
|
+
* per-sub-account positions (``sub_account_id``).
|
|
66
|
+
*
|
|
67
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
68
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
69
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
70
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
71
|
+
*
|
|
72
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
73
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
74
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
75
|
+
* silently absent there rather than an error, so read it from
|
|
76
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
77
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
78
|
+
* emitted.)
|
|
54
79
|
*/
|
|
55
80
|
protocol?: CreditProtocol | undefined;
|
|
56
81
|
/**
|
|
@@ -86,7 +111,7 @@ export type CreditUnloopRequest = {
|
|
|
86
111
|
*/
|
|
87
112
|
maxSlippagePercent?: number | string | undefined;
|
|
88
113
|
/**
|
|
89
|
-
* If the target cannot be reached in one transaction (
|
|
114
|
+
* If the target cannot be reached in one transaction, return the maximum-progress plan (preview.fully_unwound=false) instead of a 400. This can happen because every withdrawal is sized to keep the health factor at or above 1.02 at that step, so a position opened very close to its liquidation threshold runs out of headroom before the target is met. A second unloop call, now from a much lower leverage, finishes the job.
|
|
90
115
|
*/
|
|
91
116
|
allowPartial?: boolean | undefined;
|
|
92
117
|
/**
|
|
@@ -94,9 +119,13 @@ export type CreditUnloopRequest = {
|
|
|
94
119
|
*/
|
|
95
120
|
gasSponsorship?: boolean | undefined;
|
|
96
121
|
/**
|
|
97
|
-
* If true, build a display estimate only: the
|
|
122
|
+
* If true, build a display estimate only — no single-use firm quote is ever spent. NOTE that this guarantees only that no firm quote was spent — it does not guarantee an absent transaction: on an unwind no firm provider covers, and under pricing=market, the call still falls through to the aggregator and returns a signable transaction. On a firm-covered unwind (pricing 'auto' or 'firm') the numbers are firm-INDICATIVE, priced off the firm provider's live maker levels; otherwise they are market-priced with slippage-bounded floors. Under pricing='firm' a preview no firm provider can serve returns the advisory alone (preview=null + firm_available). Set it on every parameter-exploration call and omit it only on the build the user is about to sign.
|
|
98
123
|
*/
|
|
99
124
|
preview?: boolean | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* 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 the firm venue cannot serve return the firm_available 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. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
|
|
127
|
+
*/
|
|
128
|
+
pricing?: CreditUnloopRequestPricing | undefined;
|
|
100
129
|
};
|
|
101
130
|
/** @internal */
|
|
102
131
|
export declare const CreditUnloopRequestChain$outboundSchema: z.ZodNativeEnum<typeof CreditUnloopRequestChain>;
|
|
@@ -111,6 +140,8 @@ export type CreditUnloopRequestMaxSlippagePercent$Outbound = number | string;
|
|
|
111
140
|
export declare const CreditUnloopRequestMaxSlippagePercent$outboundSchema: z.ZodType<CreditUnloopRequestMaxSlippagePercent$Outbound, z.ZodTypeDef, CreditUnloopRequestMaxSlippagePercent>;
|
|
112
141
|
export declare function creditUnloopRequestMaxSlippagePercentToJSON(creditUnloopRequestMaxSlippagePercent: CreditUnloopRequestMaxSlippagePercent): string;
|
|
113
142
|
/** @internal */
|
|
143
|
+
export declare const CreditUnloopRequestPricing$outboundSchema: z.ZodNativeEnum<typeof CreditUnloopRequestPricing>;
|
|
144
|
+
/** @internal */
|
|
114
145
|
export type CreditUnloopRequest$Outbound = {
|
|
115
146
|
owner: string;
|
|
116
147
|
chain: string;
|
|
@@ -126,6 +157,7 @@ export type CreditUnloopRequest$Outbound = {
|
|
|
126
157
|
allow_partial?: boolean | undefined;
|
|
127
158
|
gas_sponsorship?: boolean | undefined;
|
|
128
159
|
preview?: boolean | undefined;
|
|
160
|
+
pricing?: string | undefined;
|
|
129
161
|
};
|
|
130
162
|
/** @internal */
|
|
131
163
|
export declare const CreditUnloopRequest$outboundSchema: z.ZodType<CreditUnloopRequest$Outbound, z.ZodTypeDef, CreditUnloopRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditunlooprequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditunlooprequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;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,mCAAmC,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,wBAAwB,CAAC;IAChC
|
|
1
|
+
{"version":3,"file":"creditunlooprequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditunlooprequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;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,mCAAmC,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAI7B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,wBAAwB,CAAC;IAChC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACx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M,yCAAyC,EAAE,CAAC,CAAC,aAAa,CACrE,OAAO,0BAA0B,CACS,CAAC;AAE7C,gBAAgB;AAChB,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACnD,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,mBAAmB,CA8BnB,CAAC;AAEH,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,mBAAmB,GACvC,MAAM,CAIR"}
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.CreditUnloopRequest$outboundSchema = exports.CreditUnloopRequestMaxSlippagePercent$outboundSchema = exports.CreditUnloopRequestTargetMultiplier$outboundSchema = exports.CreditUnloopRequestChain$outboundSchema = exports.CreditUnloopRequestChain = void 0;
|
|
39
|
+
exports.CreditUnloopRequest$outboundSchema = exports.CreditUnloopRequestPricing$outboundSchema = exports.CreditUnloopRequestMaxSlippagePercent$outboundSchema = exports.CreditUnloopRequestTargetMultiplier$outboundSchema = exports.CreditUnloopRequestChain$outboundSchema = exports.CreditUnloopRequestPricing = exports.CreditUnloopRequestChain = void 0;
|
|
40
40
|
exports.creditUnloopRequestTargetMultiplierToJSON = creditUnloopRequestTargetMultiplierToJSON;
|
|
41
41
|
exports.creditUnloopRequestMaxSlippagePercentToJSON = creditUnloopRequestMaxSlippagePercentToJSON;
|
|
42
42
|
exports.creditUnloopRequestToJSON = creditUnloopRequestToJSON;
|
|
@@ -44,7 +44,7 @@ const z = __importStar(require("zod/v3"));
|
|
|
44
44
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
45
45
|
const creditprotocol_js_1 = require("./creditprotocol.js");
|
|
46
46
|
/**
|
|
47
|
-
* Blockchain network.
|
|
47
|
+
* 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.
|
|
48
48
|
*/
|
|
49
49
|
exports.CreditUnloopRequestChain = {
|
|
50
50
|
Arbitrum: "arbitrum",
|
|
@@ -54,6 +54,14 @@ exports.CreditUnloopRequestChain = {
|
|
|
54
54
|
Hyperevm: "hyperevm",
|
|
55
55
|
Tempo: "tempo",
|
|
56
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* 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 the firm venue cannot serve return the firm_available 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. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
|
|
59
|
+
*/
|
|
60
|
+
exports.CreditUnloopRequestPricing = {
|
|
61
|
+
Auto: "auto",
|
|
62
|
+
Firm: "firm",
|
|
63
|
+
Market: "market",
|
|
64
|
+
};
|
|
57
65
|
/** @internal */
|
|
58
66
|
exports.CreditUnloopRequestChain$outboundSchema = z.nativeEnum(exports.CreditUnloopRequestChain);
|
|
59
67
|
/** @internal */
|
|
@@ -67,6 +75,8 @@ function creditUnloopRequestMaxSlippagePercentToJSON(creditUnloopRequestMaxSlipp
|
|
|
67
75
|
return JSON.stringify(exports.CreditUnloopRequestMaxSlippagePercent$outboundSchema.parse(creditUnloopRequestMaxSlippagePercent));
|
|
68
76
|
}
|
|
69
77
|
/** @internal */
|
|
78
|
+
exports.CreditUnloopRequestPricing$outboundSchema = z.nativeEnum(exports.CreditUnloopRequestPricing);
|
|
79
|
+
/** @internal */
|
|
70
80
|
exports.CreditUnloopRequest$outboundSchema = z.object({
|
|
71
81
|
owner: z.string(),
|
|
72
82
|
chain: exports.CreditUnloopRequestChain$outboundSchema,
|
|
@@ -82,6 +92,7 @@ exports.CreditUnloopRequest$outboundSchema = z.object({
|
|
|
82
92
|
allowPartial: z.boolean().optional(),
|
|
83
93
|
gasSponsorship: z.boolean().optional(),
|
|
84
94
|
preview: z.boolean().optional(),
|
|
95
|
+
pricing: exports.CreditUnloopRequestPricing$outboundSchema.optional(),
|
|
85
96
|
}).transform((v) => {
|
|
86
97
|
return (0, primitives_js_1.remap)(v, {
|
|
87
98
|
marketId: "market_id",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditunlooprequest.js","sourceRoot":"","sources":["../../../../src/models/components/creditunlooprequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"creditunlooprequest.js","sourceRoot":"","sources":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B,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;QACrB,eAAe,EAAE,kBAAkB;QACnC,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,gBAAgB;QAC9B,eAAe,EAAE,kBAAkB;QACnC,WAAW,EAAE,cAAc;QAC3B,gBAAgB,EAAE,mBAAmB;QACrC,kBAAkB,EAAE,sBAAsB;QAC1C,YAAY,EAAE,eAAe;QAC7B,cAAc,EAAE,iBAAiB;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,yBAAyB,CACvC,mBAAwC;IAExC,OAAO,IAAI,CAAC,SAAS,CACnB,0CAAkC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAC9D,CAAC;AACJ,CAAC"}
|
|
@@ -6,14 +6,14 @@ import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresp
|
|
|
6
6
|
import { CreditUnloopPreview } from "./creditunlooppreview.js";
|
|
7
7
|
import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Identifies which route priced the swap leg(s): a DEX AGGREGATOR (pool liquidity, slippage-bounded floors) or a FIRM provider (quotes, one per swap leg, each partially filled at the leg's size). On preview=true responses a firm value means the numbers are INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED (under 'auto' a firm build can fall back to market transparently), and `quote_expires_at` is absent on every preview — so neither substitutes for this field.
|
|
10
10
|
*/
|
|
11
11
|
export declare const CreditUnloopResponseSwapProvider: {
|
|
12
12
|
readonly OneInch: "one_inch";
|
|
13
13
|
readonly Bebop: "bebop";
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Identifies which route priced the swap leg(s): a DEX AGGREGATOR (pool liquidity, slippage-bounded floors) or a FIRM provider (quotes, one per swap leg, each partially filled at the leg's size). On preview=true responses a firm value means the numbers are INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED (under 'auto' a firm build can fall back to market transparently), and `quote_expires_at` is absent on every preview — so neither substitutes for this field.
|
|
17
17
|
*/
|
|
18
18
|
export type CreditUnloopResponseSwapProvider = ClosedEnum<typeof CreditUnloopResponseSwapProvider>;
|
|
19
19
|
/**
|
|
@@ -21,7 +21,7 @@ export type CreditUnloopResponseSwapProvider = ClosedEnum<typeof CreditUnloopRes
|
|
|
21
21
|
*/
|
|
22
22
|
export type CreditUnloopResponse = {
|
|
23
23
|
/**
|
|
24
|
-
* Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false — except firm-priced previews (preview=true
|
|
24
|
+
* Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false — except firm-priced previews (preview=true on a firm-priced build), which carry numbers only: the firm quotes are fetched at execution time, so there is no payload to sign yet.
|
|
25
25
|
*/
|
|
26
26
|
transaction?: UnsignedTransaction | null | undefined;
|
|
27
27
|
/**
|
|
@@ -29,19 +29,19 @@ export type CreditUnloopResponse = {
|
|
|
29
29
|
*/
|
|
30
30
|
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
31
31
|
/**
|
|
32
|
-
* Projected end state
|
|
32
|
+
* Projected end state, computed on guaranteed swap floors. Null only on pricing='firm' preview responses whose unwind the firm venue cannot serve: no leg was priced on any venue, and the response carries the firm_available advisory alone.
|
|
33
33
|
*/
|
|
34
|
-
preview: CreditUnloopPreview;
|
|
34
|
+
preview: CreditUnloopPreview | null;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Identifies which route priced the swap leg(s): a DEX AGGREGATOR (pool liquidity, slippage-bounded floors) or a FIRM provider (quotes, one per swap leg, each partially filled at the leg's size). On preview=true responses a firm value means the numbers are INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED (under 'auto' a firm build can fall back to market transparently), and `quote_expires_at` is absent on every preview — so neither substitutes for this field.
|
|
37
37
|
*/
|
|
38
38
|
swapProvider?: CreditUnloopResponseSwapProvider | undefined;
|
|
39
39
|
/**
|
|
40
|
-
* Deadline of the firm swap quotes (the earliest across the unwind's swap legs) — sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Present only on executable
|
|
40
|
+
* Deadline of the firm swap quotes (the earliest across the unwind's swap legs) — sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Present only on executable firm-priced builds; null on previews (no quote is spent for a preview).
|
|
41
41
|
*/
|
|
42
42
|
quoteExpiresAt?: Date | null | undefined;
|
|
43
43
|
/**
|
|
44
|
-
* Preview-only advisory: whether a firm-quote venue can serve this unwind's swap legs (estimated without spending any quote). Present only on preview=true responses; null otherwise.
|
|
44
|
+
* Preview-only advisory: whether a firm-quote venue can serve this unwind's swap legs (estimated without spending any quote). Present only on preview=true responses; null otherwise. Computed on every policy — including pricing='market', whose preview numbers stay market-priced — so a client that opted out can keep the boundary visible.
|
|
45
45
|
*/
|
|
46
46
|
firmAvailable?: boolean | null | undefined;
|
|
47
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditunloopresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditunloopresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;CAGnC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,UAAU,CACvD,OAAO,gCAAgC,CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,OAAO,EAAE,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"creditunloopresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditunloopresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;CAGnC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,UAAU,CACvD,OAAO,gCAAgC,CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,gCAAgC,GAAG,SAAS,CAAC;IAC5D;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,aAAa,CAC1E,OAAO,gCAAgC,CACS,CAAC;AAEnD,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,oBAAoB,EACpB,CAAC,CAAC,UAAU,EACZ,OAAO,CAkBP,CAAC;AAEH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAM3D"}
|
|
@@ -45,7 +45,7 @@ const batchedsafeoperationsresponseoutput_js_1 = require("./batchedsafeoperation
|
|
|
45
45
|
const creditunlooppreview_js_1 = require("./creditunlooppreview.js");
|
|
46
46
|
const unsignedtransaction_js_1 = require("./unsignedtransaction.js");
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Identifies which route priced the swap leg(s): a DEX AGGREGATOR (pool liquidity, slippage-bounded floors) or a FIRM provider (quotes, one per swap leg, each partially filled at the leg's size). On preview=true responses a firm value means the numbers are INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED (under 'auto' a firm build can fall back to market transparently), and `quote_expires_at` is absent on every preview — so neither substitutes for this field.
|
|
49
49
|
*/
|
|
50
50
|
exports.CreditUnloopResponseSwapProvider = {
|
|
51
51
|
OneInch: "one_inch",
|
|
@@ -58,7 +58,7 @@ exports.CreditUnloopResponse$inboundSchema = z.object({
|
|
|
58
58
|
transaction: z.nullable(unsignedtransaction_js_1.UnsignedTransaction$inboundSchema).optional(),
|
|
59
59
|
eip_712: z.nullable(batchedsafeoperationsresponseoutput_js_1.BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
60
60
|
.optional(),
|
|
61
|
-
preview: creditunlooppreview_js_1.CreditUnloopPreview$inboundSchema,
|
|
61
|
+
preview: z.nullable(creditunlooppreview_js_1.CreditUnloopPreview$inboundSchema),
|
|
62
62
|
swap_provider: exports.CreditUnloopResponseSwapProvider$inboundSchema.optional(),
|
|
63
63
|
quote_expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
64
64
|
firm_available: z.nullable(z.boolean()).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditunloopresponse.js","sourceRoot":"","sources":["../../../../src/models/components/creditunloopresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FH,oEAQC;AApGD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAIjD,qGAGkD;AAClD,qEAGkC;AAClC,qEAGkC;AAElC;;GAEG;AACU,QAAA,gCAAgC,GAAG;IAC9C,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,OAAO;CACN,CAAC;AAsCX,gBAAgB;AACH,QAAA,8CAA8C,GAEvD,CAAC,CAAC,UAAU,CAAC,wCAAgC,CAAC,CAAC;AAEnD,gBAAgB;AACH,QAAA,kCAAkC,GAI3C,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,0DAAiC,CAAC,CAAC,QAAQ,EAAE;IACrE,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,0FAAiD,CAAC;SACnE,QAAQ,EAAE;IACb,OAAO,EAAE,0DAAiC;
|
|
1
|
+
{"version":3,"file":"creditunloopresponse.js","sourceRoot":"","sources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e;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,4BAA4B,CAC1C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0CAAkC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9D,kDAAkD,CACnD,CAAC;AACJ,CAAC"}
|
|
@@ -23,11 +23,24 @@ export type CreditWithdrawParams = {
|
|
|
23
23
|
* @remarks
|
|
24
24
|
*
|
|
25
25
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
26
|
-
* field) keep hitting the unchanged Aave code path
|
|
27
|
-
* Blue lending markets by their bytes32
|
|
28
|
-
* V2 markets by their EVK
|
|
29
|
-
*
|
|
30
|
-
*
|
|
26
|
+
* field) keep hitting the unchanged Aave code path; markets are named by token
|
|
27
|
+
* symbol. ``MORPHO`` identifies Morpho Blue lending markets by their bytes32
|
|
28
|
+
* ``market_id``. ``EULER`` identifies Euler V2 markets by their EVK
|
|
29
|
+
* ``collateral_vault`` + ``borrow_vault`` addresses and supports isolated
|
|
30
|
+
* per-sub-account positions (``sub_account_id``).
|
|
31
|
+
*
|
|
32
|
+
* Deployment is per chain, so a valid protocol can still 422 on a given chain:
|
|
33
|
+
* AAVE on Ethereum, Base, Arbitrum, BSC and HyperEVM (where it is Hyperlend, the
|
|
34
|
+
* chain's Aave V3 deployment); MORPHO on Ethereum, Base, Arbitrum and HyperEVM
|
|
35
|
+
* (where it is Felix); EULER on Ethereum, Base, Arbitrum and BSC.
|
|
36
|
+
*
|
|
37
|
+
* All three support ``/v2/credit/loop`` and ``/v2/credit/unloop``. EULER does
|
|
38
|
+
* NOT: ``/v2/credit/rebalance`` rejects it with a 422, and
|
|
39
|
+
* ``/v2/credit/looped_positions`` covers only AAVE and MORPHO — an Euler loop is
|
|
40
|
+
* silently absent there rather than an error, so read it from
|
|
41
|
+
* ``/v2/credit/positions`` instead. (EULER still appears in the
|
|
42
|
+
* ``looped_positions`` response enum because this enum is shared; it is never
|
|
43
|
+
* emitted.)
|
|
31
44
|
*/
|
|
32
45
|
protocol?: CreditProtocol | undefined;
|
|
33
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditwithdrawparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditwithdrawparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB
|
|
1
|
+
{"version":3,"file":"creditwithdrawparams.d.ts","sourceRoot":"","sources":["../../../../src/models/components/creditwithdrawparams.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;;;;;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;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,mCAAmC,GAAG,MAAM,GAAG,MAAM,CAAC;AAElE,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAC/D,mCAAmC,EACnC,CAAC,CAAC,UAAU,EACZ,0BAA0B,CACS,CAAC;AAEtC,wBAAgB,gCAAgC,CAC9C,0BAA0B,EAAE,0BAA0B,GACrD,MAAM,CAIR;AAED,gBAAgB;AAChB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,WAAW,EAAE,iBAAiB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,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;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,6BAA6B,EAC7B,CAAC,CAAC,UAAU,EACZ,oBAAoB,CAgBpB,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,oBAAoB,EAAE,oBAAoB,GACzC,MAAM,CAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditwithdrawparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditwithdrawparams.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"creditwithdrawparams.js","sourceRoot":"","sources":["../../../../src/models/components/creditwithdrawpar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tB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,0BAA0B,CACxC,oBAA0C;IAE1C,OAAO,IAAI,CAAC,SAAS,CACnB,2CAAmC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAChE,CAAC;AACJ,CAAC"}
|
|
@@ -21,11 +21,24 @@ export type DebtPosition = {
|
|
|
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
|
/**
|