@compass-labs/api-sdk 2.2.82 → 2.2.83
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/creditCreditUnloop.d.ts +4 -0
- package/dist/commonjs/funcs/creditCreditUnloop.d.ts.map +1 -1
- package/dist/commonjs/funcs/creditCreditUnloop.js +4 -0
- package/dist/commonjs/funcs/creditCreditUnloop.js.map +1 -1
- package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts +4 -4
- package/dist/commonjs/sdk/credit.d.ts +4 -0
- package/dist/commonjs/sdk/credit.d.ts.map +1 -1
- package/dist/commonjs/sdk/credit.js +4 -0
- package/dist/commonjs/sdk/credit.js.map +1 -1
- package/dist/esm/funcs/creditCreditUnloop.d.ts +4 -0
- package/dist/esm/funcs/creditCreditUnloop.d.ts.map +1 -1
- package/dist/esm/funcs/creditCreditUnloop.js +4 -0
- package/dist/esm/funcs/creditCreditUnloop.js.map +1 -1
- package/dist/esm/models/components/loopedpositioncurrentstate.d.ts +4 -4
- package/dist/esm/sdk/credit.d.ts +4 -0
- package/dist/esm/sdk/credit.d.ts.map +1 -1
- package/dist/esm/sdk/credit.js +4 -0
- package/dist/esm/sdk/credit.js.map +1 -1
- package/docs/models/components/loopedpositioncurrentstate.md +10 -10
- package/docs/sdks/credit/README.md +4 -0
- package/openapi_prepped_for_speakeasy.json +5 -5
- package/package.json +1 -1
- package/src/funcs/creditCreditUnloop.ts +4 -0
- package/src/models/components/loopedpositioncurrentstate.ts +4 -4
- package/src/sdk/credit.ts +4 -0
|
@@ -40,6 +40,10 @@ import { Result } from "../types/fp.js";
|
|
|
40
40
|
* residual below the router's minimum routable size never fails the call, it is
|
|
41
41
|
* reported honestly in the preview (fully_unwound=false).
|
|
42
42
|
*
|
|
43
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
44
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
45
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
46
|
+
*
|
|
43
47
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
44
48
|
* open loops via /v2/credit/looped_positions.
|
|
45
49
|
*/
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;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"}
|
|
@@ -79,6 +79,10 @@ const async_js_1 = require("../types/async.js");
|
|
|
79
79
|
* residual below the router's minimum routable size never fails the call, it is
|
|
80
80
|
* reported honestly in the preview (fully_unwound=false).
|
|
81
81
|
*
|
|
82
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
83
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
84
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
85
|
+
*
|
|
82
86
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
83
87
|
* open loops via /v2/credit/looped_positions.
|
|
84
88
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creditCreditUnloop.js","sourceRoot":"","sources":["../../../src/funcs/creditCreditUnloop.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"creditCreditUnloop.js","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,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -18,7 +18,7 @@ export type LoopedPositionCurrentStateHealthFactorScope = ClosedEnum<typeof Loop
|
|
|
18
18
|
*/
|
|
19
19
|
export type LoopedPositionCurrentState = {
|
|
20
20
|
/**
|
|
21
|
-
* Current on-chain collateral amount for this position.
|
|
21
|
+
* Current on-chain collateral amount for this position. When multiple open Aave positions share one collateral reserve (Aave holds a single pooled aToken balance per reserve), that pooled balance is attributed across them pro-rata by each position's event-ledger contribution — bookkeeping, not protocol truth; liquidation sees the pooled account, not this per-position split.
|
|
22
22
|
*/
|
|
23
23
|
collateralAmount: string | null;
|
|
24
24
|
/**
|
|
@@ -26,7 +26,7 @@ export type LoopedPositionCurrentState = {
|
|
|
26
26
|
*/
|
|
27
27
|
debtAmount: string | null;
|
|
28
28
|
/**
|
|
29
|
-
* Collateral value in USD (null if unpriced).
|
|
29
|
+
* Collateral value in USD (null if unpriced). Derived from the attributed collateral_amount for shared-reserve Aave positions.
|
|
30
30
|
*/
|
|
31
31
|
collateralUsd?: string | null | undefined;
|
|
32
32
|
/**
|
|
@@ -34,11 +34,11 @@ export type LoopedPositionCurrentState = {
|
|
|
34
34
|
*/
|
|
35
35
|
debtUsd?: string | null | undefined;
|
|
36
36
|
/**
|
|
37
|
-
* Net position value in USD (collateral - debt); null if unpriced.
|
|
37
|
+
* Net position value in USD (collateral - debt); null if unpriced. For shared-reserve Aave positions the collateral side uses the pro-rata attributed balance (bookkeeping, not protocol truth).
|
|
38
38
|
*/
|
|
39
39
|
netUsdValue?: string | null | undefined;
|
|
40
40
|
/**
|
|
41
|
-
* Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive.
|
|
41
|
+
* Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive. For shared-reserve Aave positions this is derived from the pro-rata attributed collateral (bookkeeping, not protocol truth).
|
|
42
42
|
*/
|
|
43
43
|
leverage?: string | null | undefined;
|
|
44
44
|
/**
|
|
@@ -144,6 +144,10 @@ export declare class Credit extends ClientSDK {
|
|
|
144
144
|
* residual below the router's minimum routable size never fails the call, it is
|
|
145
145
|
* reported honestly in the preview (fully_unwound=false).
|
|
146
146
|
*
|
|
147
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
148
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
149
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
150
|
+
*
|
|
147
151
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
148
152
|
* open loops via /v2/credit/looped_positions.
|
|
149
153
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit.d.ts","sourceRoot":"","sources":["../../../src/sdk/credit.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,MAAO,SAAQ,SAAS;IACnC;;;;;;;;OAQG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAQ9C;;;;;;;;OAQG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;OAYG;IACG,qBAAqB,CACzB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,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,oBAAoB,CAAC;IAQ3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAQ9C;;;;;;;;;;;;;;;OAeG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;;OAaG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;;;;OAQG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;CAO5C"}
|
|
@@ -178,6 +178,10 @@ class Credit extends sdks_js_1.ClientSDK {
|
|
|
178
178
|
* residual below the router's minimum routable size never fails the call, it is
|
|
179
179
|
* reported honestly in the preview (fully_unwound=false).
|
|
180
180
|
*
|
|
181
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
182
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
183
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
184
|
+
*
|
|
181
185
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
182
186
|
* open loops via /v2/credit/looped_positions.
|
|
183
187
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit.js","sourceRoot":"","sources":["../../../src/sdk/credit.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAwE;AACxE,0EAAoE;AACpE,0EAAoE;AACpE,wFAAkF;AACl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IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAAgB,EACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"credit.js","sourceRoot":"","sources":["../../../src/sdk/credit.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAAwE;AACxE,0EAAoE;AACpE,0EAAoE;AACpE,wFAAkF;AAClF,sFAAgF;AAChF,sEAAgE;AAChE,4FAAsF;AACtF,wFAAkF;AAClF,gFAA0E;AAC1E,gFAA0E;AAC1E,wEAAkE;AAClE,8EAAwE;AACxE,0EAAoE;AACpE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,MAAO,SAAQ,mBAAS;IACnC;;;;;;;;OAQG;IACH,KAAK,CAAC,eAAe,CACnB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,cAAc,CAClB,OAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,qBAAqB,CACzB,OAAkD,EAClD,OAAwB;QAExB,OAAO,IAA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AC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,eAAe,CACnB,OAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA1WD,wBA0WC"}
|
|
@@ -40,6 +40,10 @@ import { Result } from "../types/fp.js";
|
|
|
40
40
|
* residual below the router's minimum routable size never fails the call, it is
|
|
41
41
|
* reported honestly in the preview (fully_unwound=false).
|
|
42
42
|
*
|
|
43
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
44
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
45
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
46
|
+
*
|
|
43
47
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
44
48
|
* open loops via /v2/credit/looped_positions.
|
|
45
49
|
*/
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;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"}
|
|
@@ -43,6 +43,10 @@ import { APIPromise } from "../types/async.js";
|
|
|
43
43
|
* residual below the router's minimum routable size never fails the call, it is
|
|
44
44
|
* reported honestly in the preview (fully_unwound=false).
|
|
45
45
|
*
|
|
46
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
47
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
48
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
49
|
+
*
|
|
46
50
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
47
51
|
* open loops via /v2/credit/looped_positions.
|
|
48
52
|
*/
|
|
@@ -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,EAA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AAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,kCAAkC,CAAC,EAC1D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -18,7 +18,7 @@ export type LoopedPositionCurrentStateHealthFactorScope = ClosedEnum<typeof Loop
|
|
|
18
18
|
*/
|
|
19
19
|
export type LoopedPositionCurrentState = {
|
|
20
20
|
/**
|
|
21
|
-
* Current on-chain collateral amount for this position.
|
|
21
|
+
* Current on-chain collateral amount for this position. When multiple open Aave positions share one collateral reserve (Aave holds a single pooled aToken balance per reserve), that pooled balance is attributed across them pro-rata by each position's event-ledger contribution — bookkeeping, not protocol truth; liquidation sees the pooled account, not this per-position split.
|
|
22
22
|
*/
|
|
23
23
|
collateralAmount: string | null;
|
|
24
24
|
/**
|
|
@@ -26,7 +26,7 @@ export type LoopedPositionCurrentState = {
|
|
|
26
26
|
*/
|
|
27
27
|
debtAmount: string | null;
|
|
28
28
|
/**
|
|
29
|
-
* Collateral value in USD (null if unpriced).
|
|
29
|
+
* Collateral value in USD (null if unpriced). Derived from the attributed collateral_amount for shared-reserve Aave positions.
|
|
30
30
|
*/
|
|
31
31
|
collateralUsd?: string | null | undefined;
|
|
32
32
|
/**
|
|
@@ -34,11 +34,11 @@ export type LoopedPositionCurrentState = {
|
|
|
34
34
|
*/
|
|
35
35
|
debtUsd?: string | null | undefined;
|
|
36
36
|
/**
|
|
37
|
-
* Net position value in USD (collateral - debt); null if unpriced.
|
|
37
|
+
* Net position value in USD (collateral - debt); null if unpriced. For shared-reserve Aave positions the collateral side uses the pro-rata attributed balance (bookkeeping, not protocol truth).
|
|
38
38
|
*/
|
|
39
39
|
netUsdValue?: string | null | undefined;
|
|
40
40
|
/**
|
|
41
|
-
* Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive.
|
|
41
|
+
* Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive. For shared-reserve Aave positions this is derived from the pro-rata attributed collateral (bookkeeping, not protocol truth).
|
|
42
42
|
*/
|
|
43
43
|
leverage?: string | null | undefined;
|
|
44
44
|
/**
|
package/dist/esm/sdk/credit.d.ts
CHANGED
|
@@ -144,6 +144,10 @@ export declare class Credit extends ClientSDK {
|
|
|
144
144
|
* residual below the router's minimum routable size never fails the call, it is
|
|
145
145
|
* reported honestly in the preview (fully_unwound=false).
|
|
146
146
|
*
|
|
147
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
148
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
149
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
150
|
+
*
|
|
147
151
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
148
152
|
* open loops via /v2/credit/looped_positions.
|
|
149
153
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit.d.ts","sourceRoot":"","sources":["../../../src/sdk/credit.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,g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esm/sdk/credit.js
CHANGED
|
@@ -175,6 +175,10 @@ export class Credit extends ClientSDK {
|
|
|
175
175
|
* residual below the router's minimum routable size never fails the call, it is
|
|
176
176
|
* reported honestly in the preview (fully_unwound=false).
|
|
177
177
|
*
|
|
178
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
179
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
180
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
181
|
+
*
|
|
178
182
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
179
183
|
* open loops via /v2/credit/looped_positions.
|
|
180
184
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit.js","sourceRoot":"","sources":["../../../src/sdk/credit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,SAAS,EA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CAAC,gBAAgB,CACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,eAAe,CACnB,OAA0C,EAC1C,OAAwB;QAExB,OAAO,WAAW,CAAC,qBAAqB,CACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,oBAAoB,CACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,WAAW,CACf,OAAsC,EACtC,OAAwB;QAExB,OAAO,WAAW,CAAC,iBAAiB,CAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAChB,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,kBAAkB,CACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -16,13 +16,13 @@ let value: LoopedPositionCurrentState = {
|
|
|
16
16
|
|
|
17
17
|
## Fields
|
|
18
18
|
|
|
19
|
-
| Field
|
|
20
|
-
|
|
|
21
|
-
| `collateralAmount`
|
|
22
|
-
| `debtAmount`
|
|
23
|
-
| `collateralUsd`
|
|
24
|
-
| `debtUsd`
|
|
25
|
-
| `netUsdValue`
|
|
26
|
-
| `leverage`
|
|
27
|
-
| `healthFactor`
|
|
28
|
-
| `healthFactorScope`
|
|
19
|
+
| Field | Type | Required | Description |
|
|
20
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `collateralAmount` | *string* | :heavy_check_mark: | Current on-chain collateral amount for this position. When multiple open Aave positions share one collateral reserve (Aave holds a single pooled aToken balance per reserve), that pooled balance is attributed across them pro-rata by each position's event-ledger contribution — bookkeeping, not protocol truth; liquidation sees the pooled account, not this per-position split. |
|
|
22
|
+
| `debtAmount` | *string* | :heavy_check_mark: | Current on-chain debt amount for this position. |
|
|
23
|
+
| `collateralUsd` | *string* | :heavy_minus_sign: | Collateral value in USD (null if unpriced). Derived from the attributed collateral_amount for shared-reserve Aave positions. |
|
|
24
|
+
| `debtUsd` | *string* | :heavy_minus_sign: | Debt value in USD (null if unpriced). |
|
|
25
|
+
| `netUsdValue` | *string* | :heavy_minus_sign: | Net position value in USD (collateral - debt); null if unpriced. For shared-reserve Aave positions the collateral side uses the pro-rata attributed balance (bookkeeping, not protocol truth). |
|
|
26
|
+
| `leverage` | *string* | :heavy_minus_sign: | Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive. For shared-reserve Aave positions this is derived from the pro-rata attributed collateral (bookkeeping, not protocol truth). |
|
|
27
|
+
| `healthFactor` | *string* | :heavy_minus_sign: | Health factor. Above 1 is safe; below 1 risks liquidation. See health_factor_scope for what it covers. |
|
|
28
|
+
| `healthFactorScope` | [components.LoopedPositionCurrentStateHealthFactorScope](../../models/components/loopedpositioncurrentstatehealthfactorscope.md) | :heavy_check_mark: | 'market' for Morpho (isolated per-market health). 'account' for Aave: collateral is pooled, so all collateral backs all debt and this health factor is shared by every Aave position on the account — see aave_account_summary for the account-level figures. |
|
|
@@ -740,6 +740,10 @@ surpluses (or the Credit Account's idle balance) cover the remainder — a
|
|
|
740
740
|
residual below the router's minimum routable size never fails the call, it is
|
|
741
741
|
reported honestly in the preview (fully_unwound=false).
|
|
742
742
|
|
|
743
|
+
When other open Aave loops share this position's collateral reserve, a full
|
|
744
|
+
close withdraws only this position's attributed share of the pooled collateral
|
|
745
|
+
(event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
746
|
+
|
|
743
747
|
For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
744
748
|
open loops via /v2/credit/looped_positions.
|
|
745
749
|
|
|
@@ -6313,7 +6313,7 @@
|
|
|
6313
6313
|
"Credit"
|
|
6314
6314
|
],
|
|
6315
6315
|
"summary": "Unwind a leveraged loop",
|
|
6316
|
-
"description": "Unwind an Aave or Morpho loop in ONE atomic transaction.\n\nRepeatedly withdraws collateral, swaps it to the borrow token at a GUARANTEED\nminimum output (enforced on-chain), and repays. The floor discipline means a\nswap filling anywhere within the slippage tolerance can never break a later\nstep; any positive surplus stays in the Credit Account as borrow-token dust\n(the preview reports the bound as estimated_max_dust).\n\nOmit target_multiplier for a full close: the debt is cleared exactly \u2014\naccrued interest included \u2014 and the pair collateral is returned to the Credit\nAccount. Pass 1 to clear the debt but keep the collateral supplied, or a value\nabove 1 to delever to that multiplier (it must be below the position's current\nmultiplier).\n\nEach withdrawal is sized to keep the position's health factor \u2265 1.02 at that\nstep, so a position opened very close to the liquidation threshold may need\nmore than one transaction to fully close \u2014 set allow_partial=true to return\nthe maximum single-transaction progress (preview.fully_unwound=false), then\ncall unloop again to finish. Very large unwinds relative to pool depth can\nstill exceed the slippage tolerance through their own cumulative price impact.\n\nPositions are unwound as far as the swap router can route; on a router-minimum\nstop the engine still withdraws all collateral not needed to back the residual,\nand completes a true full close whenever the unwind's own guaranteed swap\nsurpluses (or the Credit Account's idle balance) cover the remainder \u2014 a\nresidual below the router's minimum routable size never fails the call, it is\nreported honestly in the preview (fully_unwound=false).\n\nFor protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect\nopen loops via /v2/credit/looped_positions.",
|
|
6316
|
+
"description": "Unwind an Aave or Morpho loop in ONE atomic transaction.\n\nRepeatedly withdraws collateral, swaps it to the borrow token at a GUARANTEED\nminimum output (enforced on-chain), and repays. The floor discipline means a\nswap filling anywhere within the slippage tolerance can never break a later\nstep; any positive surplus stays in the Credit Account as borrow-token dust\n(the preview reports the bound as estimated_max_dust).\n\nOmit target_multiplier for a full close: the debt is cleared exactly \u2014\naccrued interest included \u2014 and the pair collateral is returned to the Credit\nAccount. Pass 1 to clear the debt but keep the collateral supplied, or a value\nabove 1 to delever to that multiplier (it must be below the position's current\nmultiplier).\n\nEach withdrawal is sized to keep the position's health factor \u2265 1.02 at that\nstep, so a position opened very close to the liquidation threshold may need\nmore than one transaction to fully close \u2014 set allow_partial=true to return\nthe maximum single-transaction progress (preview.fully_unwound=false), then\ncall unloop again to finish. Very large unwinds relative to pool depth can\nstill exceed the slippage tolerance through their own cumulative price impact.\n\nPositions are unwound as far as the swap router can route; on a router-minimum\nstop the engine still withdraws all collateral not needed to back the residual,\nand completes a true full close whenever the unwind's own guaranteed swap\nsurpluses (or the Credit Account's idle balance) cover the remainder \u2014 a\nresidual below the router's minimum routable size never fails the call, it is\nreported honestly in the preview (fully_unwound=false).\n\nWhen other open Aave loops share this position's collateral reserve, a full\nclose withdraws only this position's attributed share of the pooled collateral\n(event-ledger bookkeeping), leaving the rest supplied for the other positions.\n\nFor protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect\nopen loops via /v2/credit/looped_positions.",
|
|
6317
6317
|
"operationId": "v2_credit_unloop",
|
|
6318
6318
|
"requestBody": {
|
|
6319
6319
|
"content": {
|
|
@@ -17748,7 +17748,7 @@
|
|
|
17748
17748
|
}
|
|
17749
17749
|
],
|
|
17750
17750
|
"title": "Collateral Amount",
|
|
17751
|
-
"description": "Current on-chain collateral amount for this position."
|
|
17751
|
+
"description": "Current on-chain collateral amount for this position. When multiple open Aave positions share one collateral reserve (Aave holds a single pooled aToken balance per reserve), that pooled balance is attributed across them pro-rata by each position's event-ledger contribution \u2014 bookkeeping, not protocol truth; liquidation sees the pooled account, not this per-position split."
|
|
17752
17752
|
},
|
|
17753
17753
|
"debt_amount": {
|
|
17754
17754
|
"anyOf": [
|
|
@@ -17772,7 +17772,7 @@
|
|
|
17772
17772
|
}
|
|
17773
17773
|
],
|
|
17774
17774
|
"title": "Collateral Usd",
|
|
17775
|
-
"description": "Collateral value in USD (null if unpriced)."
|
|
17775
|
+
"description": "Collateral value in USD (null if unpriced). Derived from the attributed collateral_amount for shared-reserve Aave positions."
|
|
17776
17776
|
},
|
|
17777
17777
|
"debt_usd": {
|
|
17778
17778
|
"anyOf": [
|
|
@@ -17796,7 +17796,7 @@
|
|
|
17796
17796
|
}
|
|
17797
17797
|
],
|
|
17798
17798
|
"title": "Net Usd Value",
|
|
17799
|
-
"description": "Net position value in USD (collateral - debt); null if unpriced."
|
|
17799
|
+
"description": "Net position value in USD (collateral - debt); null if unpriced. For shared-reserve Aave positions the collateral side uses the pro-rata attributed balance (bookkeeping, not protocol truth)."
|
|
17800
17800
|
},
|
|
17801
17801
|
"leverage": {
|
|
17802
17802
|
"anyOf": [
|
|
@@ -17808,7 +17808,7 @@
|
|
|
17808
17808
|
}
|
|
17809
17809
|
],
|
|
17810
17810
|
"title": "Leverage",
|
|
17811
|
-
"description": "Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive."
|
|
17811
|
+
"description": "Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive. For shared-reserve Aave positions this is derived from the pro-rata attributed collateral (bookkeeping, not protocol truth)."
|
|
17812
17812
|
},
|
|
17813
17813
|
"health_factor": {
|
|
17814
17814
|
"anyOf": [
|
package/package.json
CHANGED
|
@@ -58,6 +58,10 @@ import { Result } from "../types/fp.js";
|
|
|
58
58
|
* residual below the router's minimum routable size never fails the call, it is
|
|
59
59
|
* reported honestly in the preview (fully_unwound=false).
|
|
60
60
|
*
|
|
61
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
62
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
63
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
64
|
+
*
|
|
61
65
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
62
66
|
* open loops via /v2/credit/looped_positions.
|
|
63
67
|
*/
|
|
@@ -28,7 +28,7 @@ export type LoopedPositionCurrentStateHealthFactorScope = ClosedEnum<
|
|
|
28
28
|
*/
|
|
29
29
|
export type LoopedPositionCurrentState = {
|
|
30
30
|
/**
|
|
31
|
-
* Current on-chain collateral amount for this position.
|
|
31
|
+
* Current on-chain collateral amount for this position. When multiple open Aave positions share one collateral reserve (Aave holds a single pooled aToken balance per reserve), that pooled balance is attributed across them pro-rata by each position's event-ledger contribution — bookkeeping, not protocol truth; liquidation sees the pooled account, not this per-position split.
|
|
32
32
|
*/
|
|
33
33
|
collateralAmount: string | null;
|
|
34
34
|
/**
|
|
@@ -36,7 +36,7 @@ export type LoopedPositionCurrentState = {
|
|
|
36
36
|
*/
|
|
37
37
|
debtAmount: string | null;
|
|
38
38
|
/**
|
|
39
|
-
* Collateral value in USD (null if unpriced).
|
|
39
|
+
* Collateral value in USD (null if unpriced). Derived from the attributed collateral_amount for shared-reserve Aave positions.
|
|
40
40
|
*/
|
|
41
41
|
collateralUsd?: string | null | undefined;
|
|
42
42
|
/**
|
|
@@ -44,11 +44,11 @@ export type LoopedPositionCurrentState = {
|
|
|
44
44
|
*/
|
|
45
45
|
debtUsd?: string | null | undefined;
|
|
46
46
|
/**
|
|
47
|
-
* Net position value in USD (collateral - debt); null if unpriced.
|
|
47
|
+
* Net position value in USD (collateral - debt); null if unpriced. For shared-reserve Aave positions the collateral side uses the pro-rata attributed balance (bookkeeping, not protocol truth).
|
|
48
48
|
*/
|
|
49
49
|
netUsdValue?: string | null | undefined;
|
|
50
50
|
/**
|
|
51
|
-
* Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive.
|
|
51
|
+
* Leverage multiplier: collateral_usd / (collateral_usd - debt_usd). Null when unpriced or net value is non-positive. For shared-reserve Aave positions this is derived from the pro-rata attributed collateral (bookkeeping, not protocol truth).
|
|
52
52
|
*/
|
|
53
53
|
leverage?: string | null | undefined;
|
|
54
54
|
/**
|
package/src/sdk/credit.ts
CHANGED
|
@@ -243,6 +243,10 @@ export class Credit extends ClientSDK {
|
|
|
243
243
|
* residual below the router's minimum routable size never fails the call, it is
|
|
244
244
|
* reported honestly in the preview (fully_unwound=false).
|
|
245
245
|
*
|
|
246
|
+
* When other open Aave loops share this position's collateral reserve, a full
|
|
247
|
+
* close withdraws only this position's attributed share of the pooled collateral
|
|
248
|
+
* (event-ledger bookkeeping), leaving the rest supplied for the other positions.
|
|
249
|
+
*
|
|
246
250
|
* For protocol=MORPHO pass a market_id from /v2/credit/morpho_markets; inspect
|
|
247
251
|
* open loops via /v2/credit/looped_positions.
|
|
248
252
|
*/
|