@babylonlabs-io/ts-sdk 0.55.0 → 0.55.1

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.
@@ -0,0 +1,16 @@
1
+ declare const _default: [
2
+ {
3
+ "type": "function",
4
+ "name": "getReserveTotalDebt",
5
+ "inputs": [
6
+ { "name": "reserveId", "type": "uint256", "internalType": "uint256" }
7
+ ],
8
+ "outputs": [
9
+ { "name": "totalDebt", "type": "uint256", "internalType": "uint256" }
10
+ ],
11
+ "stateMutability": "view"
12
+ }
13
+ ]
14
+ ;
15
+
16
+ export default _default;
@@ -78,7 +78,7 @@ declare const _default: [
78
78
  },
79
79
  {
80
80
  "type": "function",
81
- "name": "BTC_VAULT_CORE_VAULT_BTC_RESERVE_ID",
81
+ "name": "VAULT_BTC_RESERVE_ID",
82
82
  "inputs": [],
83
83
  "outputs": [
84
84
  {
@@ -91,7 +91,7 @@ declare const _default: [
91
91
  },
92
92
  {
93
93
  "type": "function",
94
- "name": "BTC_VAULT_CORE_WBTC_RESERVE_ID",
94
+ "name": "WBTC_RESERVE_ID",
95
95
  "inputs": [],
96
96
  "outputs": [
97
97
  {
@@ -1,5 +1,6 @@
1
1
  export { getPosition, getPositionSizeParams, } from './query.js';
2
2
  export { getDynamicReserveConfig, getReserve, getTargetHealthFactor, getUserAccountData, getUserPosition, getUserPositionAndAccountData, getUserPositions, getUserTotalDebt, getUserTotalDebts, hasCollateral, hasDebt, } from './spoke.js';
3
+ export { getPositionReserveTotalDebt } from './positionProxy.js';
3
4
  export { getOracleAddress, getReservesPrices, getReservesPricesSafe, type ReservePriceResult, } from './oracle.js';
4
5
  export { getAssetDrawnRatesSafe, type AssetDrawnRateRequest, type AssetDrawnRateResult, } from './hub.js';
5
6
  export { buildBorrowTx, buildReorderVaultsTx, buildRepayTx, buildWithdrawCollateralsTx, } from './transaction.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,OAAO,GACR,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,sBAAsB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,OAAO,GACR,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,sBAAsB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Address, PublicClient } from 'viem';
2
+ /**
3
+ * Fee-inclusive total debt of the position held by `proxyContract` for
4
+ * `reserveId`: Spoke debt plus the adapter's uncollected interest fee
5
+ * (rounded up), computed lazily at the current block.
6
+ */
7
+ export declare function getPositionReserveTotalDebt(publicClient: PublicClient, proxyContract: Address, reserveId: bigint): Promise<bigint>;
8
+ //# sourceMappingURL=positionProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"positionProxy.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/positionProxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIlD;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,OAAO,EACtB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAejB"}
@@ -95,8 +95,9 @@ export declare function hasCollateral(publicClient: PublicClient, spokeAddress:
95
95
  /**
96
96
  * Get user's exact total debt in a reserve (token units, not shares).
97
97
  *
98
- * Returns the precise amount owed including accrued interest. Essential for full repayment.
99
- * Debt accrues interest every block, so this must be fetched live from the contract.
98
+ * Returns the Spoke-side amount owed including accrued interest — but NOT the
99
+ * adapter's uncollected interest fee. Display/routing only; for full repayment
100
+ * see the remarks below. Debt accrues interest every block, so fetch it live.
100
101
  *
101
102
  * @param publicClient - Viem public client for reading contracts
102
103
  * @param spokeAddress - AAVE Spoke contract address
@@ -106,7 +107,7 @@ export declare function hasCollateral(publicClient: PublicClient, spokeAddress:
106
107
  *
107
108
  * @example
108
109
  * ```typescript
109
- * import { getUserTotalDebt, FULL_REPAY_BUFFER_DIVISOR } from "@babylonlabs-io/ts-sdk/tbv/integrations/aave";
110
+ * import { getUserTotalDebt } from "@babylonlabs-io/ts-sdk/tbv/integrations/aave";
110
111
  * import { formatUnits } from "viem";
111
112
  *
112
113
  * const totalDebt = await getUserTotalDebt(
@@ -116,17 +117,17 @@ export declare function hasCollateral(publicClient: PublicClient, spokeAddress:
116
117
  * proxyAddress
117
118
  * );
118
119
  *
119
- * // For full repayment, add buffer to account for interest accrual
120
- * const repayAmount = totalDebt + (totalDebt / FULL_REPAY_BUFFER_DIVISOR);
121
- *
122
120
  * console.log("Debt:", formatUnits(totalDebt, 6), "USDC");
123
121
  * ```
124
122
  *
125
123
  * @remarks
126
- * **Important for full repayment:**
127
- * - Add `FULL_REPAY_BUFFER_DIVISOR` buffer to account for interest between fetch and tx execution
128
- * - Contract only takes what's owed; excess stays in wallet
129
- * - For partial repayment, use any amount less than total debt
124
+ * **Important for full repayment:** do NOT repay a plain amount derived from
125
+ * this quote — it excludes the adapter's interest fee, and rounding can leave
126
+ * residual debt shares (dust). Send the repay-all sentinel
127
+ * (`type(uint256).max`) with an approval sized from the position proxy's
128
+ * fee-inclusive `getPositionReserveTotalDebt` plus
129
+ * `FULL_REPAY_BUFFER_DIVISOR` headroom; the adapter pulls only what's owed.
130
+ * For partial repayment, use any amount less than total debt.
130
131
  */
131
132
  export declare function getUserTotalDebt(publicClient: PublicClient, spokeAddress: Address, reserveId: bigint, userAddress: Address): Promise<bigint>;
132
133
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"spoke.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/spoke.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAO,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEvD,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAoDrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,WAAW,EAAE,OAAO,GACnB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E,OAAO,EACrB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,0BAA0B,CAAC,CAQrC"}
@@ -83,7 +83,12 @@ export declare function buildBorrowTx(contractAddress: Address, debtReserveId: b
83
83
  * @param contractAddress - AaveIntegrationAdapter contract address
84
84
  * @param borrower - Borrower's address (for self-repay, use connected wallet address)
85
85
  * @param debtReserveId - AAVE reserve ID for the debt asset
86
- * @param amount - Amount to repay in token units. Can repay partial or full debt. For full repay, use `getUserTotalDebt()` to get exact amount.
86
+ * @param amount - Amount to repay in token units for a partial repay. For a
87
+ * FULL repay, pass `type(uint256).max` (the repay-all sentinel): the adapter
88
+ * resolves it to the position's fee-inclusive debt in the same transaction
89
+ * and pulls exactly that. Size the prior approval from
90
+ * `getPositionReserveTotalDebt()` plus ceiling-divided
91
+ * `FULL_REPAY_BUFFER_DIVISOR` headroom.
87
92
  * @returns Unsigned transaction parameters for execution with viem wallet
88
93
  *
89
94
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAsB,MAAM,MAAM,CAAC;AAGlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,OAAO,EACxB,gBAAgB,EAAE,GAAG,EAAE,GACtB,iBAAiB,CAWnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,OAAO,EACxB,QAAQ,EAAE,GAAG,EAAE,GACd,iBAAiB,CAWnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,aAAa,CAC3B,eAAe,EAAE,OAAO,EACxB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,OAAO,GAChB,iBAAiB,CAWnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,YAAY,CAC1B,eAAe,EAAE,OAAO,EACxB,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,iBAAiB,CAWnB"}
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAsB,MAAM,MAAM,CAAC;AAGlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,OAAO,EACxB,gBAAgB,EAAE,GAAG,EAAE,GACtB,iBAAiB,CAWnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,OAAO,EACxB,QAAQ,EAAE,GAAG,EAAE,GACd,iBAAiB,CAWnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,aAAa,CAC3B,eAAe,EAAE,OAAO,EACxB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,OAAO,GAChB,iBAAiB,CAWnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,YAAY,CAC1B,eAAe,EAAE,OAAO,EACxB,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,GACb,iBAAiB,CAWnB"}
@@ -80,22 +80,14 @@ export declare const HEALTH_FACTOR_WARNING_THRESHOLD = 1.5;
80
80
  */
81
81
  export declare const MIN_HEALTH_FACTOR_FOR_BORROW = 1.05;
82
82
  /**
83
- * Buffer for full repayment to account for interest accrual
84
- * between fetching debt and transaction execution.
83
+ * Approval headroom for repay-all, sized against interest accrual between
84
+ * quoting the debt and transaction execution.
85
85
  *
86
86
  * 0.5% buffer (50 basis points). Sized to absorb hours of execution delay
87
- * (e.g. Safe-multisig quorum collection) without leaving residual dust.
88
- * The adapter only pulls what's actually owed; excess approval/balance
89
- * stays with the user.
90
- *
91
- * Users whose wallet balance covers the debt but not the full buffer are
92
- * routed through the "max-capped" repay path instead of `repayFull`, so
93
- * a larger buffer never blocks a legitimate max-repay.
87
+ * (e.g. Safe-multisig quorum collection). The repay itself sends the
88
+ * repay-all sentinel and the adapter pulls only what's actually owed; the
89
+ * buffer only pads the approval cap, and the cap is additionally bounded by
90
+ * the user's balance, so a larger buffer never blocks a legitimate repay.
94
91
  */
95
92
  export declare const FULL_REPAY_BUFFER_DIVISOR = 200n;
96
- /**
97
- * Same buffer as `FULL_REPAY_BUFFER_DIVISOR`, expressed as a float fraction
98
- * for UI-side comparisons that operate in `number` rather than `bigint`.
99
- */
100
- export declare const FULL_REPAY_BUFFER_FRACTION: number;
101
93
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tbv/integrations/aave/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B,kEAAkE;;IAElE,sCAAsC;;IAEtC,wCAAwC;;IAExC,6DAA6D;;CAErD,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B;;;GAGG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,SA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