@gearbox-protocol/sdk 14.12.0-next.73 → 14.12.0-next.75

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.
Files changed (91) hide show
  1. package/dist/cjs/dev/AccountOpener.js +2 -5
  2. package/dist/cjs/plugins/accounts-counter/AccountsCounterPlugin.js +1 -1
  3. package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +118 -974
  4. package/dist/cjs/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +280 -0
  5. package/dist/cjs/sdk/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.js +141 -0
  6. package/dist/cjs/sdk/accounts/credit-account-compressor/index.js +6 -0
  7. package/dist/cjs/sdk/accounts/credit-account-compressor/types.js +1 -0
  8. package/dist/cjs/sdk/accounts/index.js +5 -4
  9. package/dist/cjs/sdk/accounts/intents/operations/unwrap-rwa-collateral/index.js +1 -1
  10. package/dist/cjs/sdk/accounts/intents/operations/wrap-rwa-collateral/index.js +1 -1
  11. package/dist/cjs/sdk/accounts/intents/testing/sdk-mock.js +2 -2
  12. package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +3 -3
  13. package/dist/cjs/sdk/accounts/liquidations/constants.js +0 -2
  14. package/dist/cjs/sdk/accounts/liquidations/index.js +0 -2
  15. package/dist/cjs/sdk/constants/index.js +1 -0
  16. package/dist/cjs/sdk/constants/math.js +5 -0
  17. package/dist/cjs/sdk/index.js +12 -4
  18. package/dist/cjs/sdk/market/MarketRegister.js +10 -0
  19. package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +181 -0
  20. package/dist/cjs/sdk/market/credit/CreditSuite.js +107 -1
  21. package/dist/cjs/sdk/{accounts → market/credit}/dominantCollateral.js +18 -4
  22. package/dist/cjs/sdk/market/credit/index.js +3 -0
  23. package/dist/cjs/sdk/market/index.js +3 -0
  24. package/dist/cjs/sdk/market/math.js +59 -0
  25. package/dist/cjs/sdk/market/oracle/PriceOracleBaseContract.js +41 -1
  26. package/dist/cjs/sdk/market/oracle/PriceOracleV310Contract.js +0 -30
  27. package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +1 -1
  28. package/dist/cjs/sdk/opportunities/index.js +4 -0
  29. package/dist/esm/dev/AccountOpener.js +2 -5
  30. package/dist/esm/plugins/accounts-counter/AccountsCounterPlugin.js +1 -1
  31. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +121 -977
  32. package/dist/esm/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +279 -0
  33. package/dist/esm/sdk/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.js +141 -0
  34. package/dist/esm/sdk/accounts/credit-account-compressor/index.js +4 -0
  35. package/dist/esm/sdk/accounts/credit-account-compressor/types.js +1 -0
  36. package/dist/esm/sdk/accounts/index.js +4 -3
  37. package/dist/esm/sdk/accounts/intents/operations/unwrap-rwa-collateral/index.js +1 -1
  38. package/dist/esm/sdk/accounts/intents/operations/wrap-rwa-collateral/index.js +1 -1
  39. package/dist/esm/sdk/accounts/intents/testing/sdk-mock.js +2 -2
  40. package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +2 -2
  41. package/dist/esm/sdk/accounts/liquidations/constants.js +1 -2
  42. package/dist/esm/sdk/accounts/liquidations/index.js +1 -2
  43. package/dist/esm/sdk/constants/index.js +2 -2
  44. package/dist/esm/sdk/constants/math.js +5 -1
  45. package/dist/esm/sdk/index.js +6 -5
  46. package/dist/esm/sdk/market/MarketRegister.js +10 -0
  47. package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +181 -0
  48. package/dist/esm/sdk/market/credit/CreditSuite.js +108 -2
  49. package/dist/esm/sdk/{accounts → market/credit}/dominantCollateral.js +18 -5
  50. package/dist/esm/sdk/market/credit/index.js +2 -1
  51. package/dist/esm/sdk/market/index.js +2 -1
  52. package/dist/esm/sdk/market/math.js +56 -1
  53. package/dist/esm/sdk/market/oracle/PriceOracleBaseContract.js +41 -1
  54. package/dist/esm/sdk/market/oracle/PriceOracleV310Contract.js +1 -31
  55. package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +1 -1
  56. package/dist/esm/sdk/opportunities/index.js +2 -2
  57. package/dist/types/plugins/accounts/AccountsPlugin.d.ts +1 -1
  58. package/dist/types/sdk/OnchainSDK.d.ts +1 -1
  59. package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +23 -124
  60. package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressor.d.ts +60 -0
  61. package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts +879 -0
  62. package/dist/types/sdk/accounts/credit-account-compressor/index.d.ts +4 -0
  63. package/dist/types/sdk/accounts/credit-account-compressor/types.d.ts +164 -0
  64. package/dist/types/sdk/accounts/index.d.ts +7 -5
  65. package/dist/types/sdk/accounts/liquidations/constants.d.ts +1 -2
  66. package/dist/types/sdk/accounts/liquidations/index.d.ts +1 -2
  67. package/dist/types/sdk/accounts/types.d.ts +46 -457
  68. package/dist/types/sdk/base/index.d.ts +2 -2
  69. package/dist/types/sdk/base/types.d.ts +6 -1
  70. package/dist/types/sdk/constants/index.d.ts +2 -2
  71. package/dist/types/sdk/constants/math.d.ts +5 -1
  72. package/dist/types/sdk/index.d.ts +16 -14
  73. package/dist/types/sdk/market/MarketRegister.d.ts +7 -0
  74. package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +47 -2
  75. package/dist/types/sdk/market/credit/CreditSuite.d.ts +24 -2
  76. package/dist/types/sdk/{accounts → market/credit}/dominantCollateral.d.ts +13 -6
  77. package/dist/types/sdk/market/credit/index.d.ts +3 -2
  78. package/dist/types/sdk/market/credit/types.d.ts +112 -2
  79. package/dist/types/sdk/market/index.d.ts +4 -3
  80. package/dist/types/sdk/market/math.d.ts +60 -1
  81. package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +15 -4
  82. package/dist/types/sdk/market/oracle/PriceOracleV310Contract.d.ts +0 -10
  83. package/dist/types/sdk/market/oracle/index.d.ts +2 -2
  84. package/dist/types/sdk/market/oracle/types.d.ts +30 -14
  85. package/dist/types/sdk/market/rwa/securitize/SecuritizeRWAFactory.d.ts +1 -1
  86. package/dist/types/sdk/market/rwa/types.d.ts +1 -1
  87. package/dist/types/sdk/opportunities/index.d.ts +2 -2
  88. package/package.json +1 -1
  89. package/dist/cjs/sdk/accounts/constants.js +0 -12
  90. package/dist/esm/sdk/accounts/constants.js +0 -11
  91. package/dist/types/sdk/accounts/constants.d.ts +0 -11
@@ -98,5 +98,64 @@ declare function positionLeverage(totalDebt: bigint, totalValue: bigint): Levera
98
98
  * ```
99
99
  **/
100
100
  declare function additionalBorrowApyBps(quotaRate: Bps, leverage: Leverage): Bps;
101
+ /**
102
+ * {@link PERCENTAGE_FACTOR} less a 0.1% safety buffer.
103
+ *
104
+ * Partial liquidation amounts are computed off prices that can drift between
105
+ * quoting and execution, so both the seized and the repaid amount are pulled
106
+ * this far away from the boundary the contracts would revert on.
107
+ **/
108
+ declare const PARTIAL_LIQUIDATION_BUFFER_BPS = 9990n;
109
+ /**
110
+ * Minimum collateral a partial liquidation must seize for a given repayment,
111
+ * derived from the liquidation discount and buffered by
112
+ * {@link PARTIAL_LIQUIDATION_BUFFER_BPS}.
113
+ *
114
+ * @param tokenAmount - Repaid amount converted from underlying into the seized
115
+ * token by the oracle.
116
+ * @param liquidationDiscount - Discount in effect for this account, in basis
117
+ * points (the expired variant once the credit manager has expired).
118
+ **/
119
+ declare function minSeizedAmount(tokenAmount: bigint, liquidationDiscount: Bps): bigint;
120
+ /**
121
+ * Inputs of {@link optimalRepaidAmount}, all resolved against the account's
122
+ * market and credit manager by the caller.
123
+ **/
124
+ interface OptimalRepaidAmountProps {
125
+ /** Debt principal plus accrued interest and fees, in underlying. */
126
+ totalDebt: bigint;
127
+ /** Threshold-weighted value of the account, converted to underlying. */
128
+ twvUnderlying: bigint;
129
+ /** Credit facade's minimum debt, in underlying. */
130
+ minDebt: bigint;
131
+ /** Health factor to aim for, in basis points. */
132
+ optimalHF: bigint;
133
+ /** `liquidationDiscount - feeLiquidation`, in basis points. */
134
+ discount: bigint;
135
+ /** Liquidation threshold of the seized token, in basis points. */
136
+ ltTokenOut: bigint;
137
+ }
138
+ /**
139
+ * Amount of underlying whose repayment brings the account's health factor close
140
+ * to `optimalHF`, capped so the account keeps at least `minDebt` of debt.
141
+ *
142
+ * Ported from solidity:
143
+ * https://github.com/Gearbox-protocol/router-v3/blob/56e2d515ec6d9bb1e324e71c3708e59710779b24/contracts/liquidation/AbstractLiquidator.sol#L292
144
+ *
145
+ * @returns The repaid amount, or `0n` when the account is already healthy
146
+ * enough or carries less than the minimum debt.
147
+ * @throws If the discounted target health factor does not exceed the seized
148
+ * token's liquidation threshold, in which case no repayment improves the
149
+ * account.
150
+ **/
151
+ declare function optimalRepaidAmount({ totalDebt, twvUnderlying, minDebt, optimalHF, discount, ltTokenOut }: OptimalRepaidAmountProps): bigint;
152
+ /**
153
+ * Health factor a partial liquidation should target, in basis points: just
154
+ * above 1, by enough to cover up to 1% of borrow cost so the account does not
155
+ * fall back under water immediately.
156
+ *
157
+ * @param borrowRate - Blended borrow rate of the account, in basis points.
158
+ **/
159
+ declare function optimalHFForPartialLiquidation(borrowRate: bigint): bigint;
101
160
  //#endregion
102
- export { additionalBorrowApyBps, borrowApyBps, healthFactorBps, maxLeverage, positionLeverage, rayToBps, usdToNumber, utilizationBps };
161
+ export { OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, additionalBorrowApyBps, borrowApyBps, healthFactorBps, maxLeverage, minSeizedAmount, optimalHFForPartialLiquidation, optimalRepaidAmount, positionLeverage, rayToBps, usdToNumber, utilizationBps };
@@ -2,15 +2,15 @@ import { Amount, TokenAmount } from "../../../model/primitives.js";
2
2
  import { PriceFeedData, PriceFeedSummary } from "../../../model/opportunities.js";
3
3
  import "../../../model/index.js";
4
4
  import { AddressMap } from "../../utils/AddressMap.js";
5
- import { PriceOracleData } from "../../base/types.js";
5
+ import { CreditAccountTokensSlice, PriceOracleData } from "../../base/types.js";
6
6
  import { DelegatedMulticall } from "../../utils/viem/executeDelegatedMulticalls.js";
7
7
  import "../../utils/viem/index.js";
8
8
  import { PriceOracleStateHuman } from "../../types/state-human.js";
9
- import { IPriceFeedContract, UpdatePriceFeedsResult } from "../pricefeeds/types.js";
9
+ import { IPriceFeedContract, PriceUpdate, UpdatePriceFeedsResult } from "../pricefeeds/types.js";
10
10
  import { PriceFeedRef } from "../pricefeeds/PriceFeedRef.js";
11
11
  import "../pricefeeds/index.js";
12
12
  import PriceFeedAnswerMap from "./PriceFeedAnswerMap.js";
13
- import { IPriceOracleContract, OnDemandPriceUpdates, PriceFeedsForTokensOptions } from "./types.js";
13
+ import { IPriceOracleContract, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions } from "./types.js";
14
14
  import { OnchainSDK } from "../../OnchainSDK.js";
15
15
  import "../../utils/index.js";
16
16
  import "../../types/index.js";
@@ -51,7 +51,18 @@ declare abstract class PriceOracleBaseContract<abi extends Abi | readonly unknow
51
51
  * {@inheritDoc IPriceOracleContract.priceFeedsForTokens}
52
52
  **/
53
53
  priceFeedsForTokens(tokens: Address[], opts?: PriceFeedsForTokensOptions): IPriceFeedContract[];
54
- abstract onDemandPriceUpdates(creditFacade: Address, updates?: UpdatePriceFeedsResult): OnDemandPriceUpdates;
54
+ /**
55
+ * {@inheritDoc IPriceOracleContract.priceUpdateTxsForAccount}
56
+ **/
57
+ priceUpdateTxsForAccount(account: CreditAccountTokensSlice, opts?: PriceFeedsForAccountOptions): Promise<UpdatePriceFeedsResult>;
58
+ /**
59
+ * {@inheritDoc IPriceOracleContract.priceUpdatesForAccount}
60
+ **/
61
+ priceUpdatesForAccount(account: CreditAccountTokensSlice, opts?: PriceFeedsForAccountOptions): Promise<PriceUpdate[]>;
62
+ /**
63
+ * {@inheritDoc IPriceOracleContract.priceUpdatesForTokens}
64
+ **/
65
+ priceUpdatesForTokens(tokens: Address[], opts?: PriceFeedsForTokensOptions): Promise<PriceUpdate[]>;
55
66
  /**
56
67
  * {@inheritDoc IPriceOracleContract.mainPrice}
57
68
  **/
@@ -1,7 +1,4 @@
1
1
  import { PriceOracleData } from "../../base/types.js";
2
- import { UpdatePriceFeedsResult } from "../pricefeeds/types.js";
3
- import "../pricefeeds/index.js";
4
- import { OnDemandPriceUpdates } from "./types.js";
5
2
  import { PriceOracleBaseContract } from "./PriceOracleBaseContract.js";
6
3
  import { OnchainSDK } from "../../OnchainSDK.js";
7
4
  import "../../base/index.js";
@@ -345,13 +342,6 @@ declare const abi: readonly [{
345
342
  type abi = typeof abi;
346
343
  declare class PriceOracleV310Contract extends PriceOracleBaseContract<abi> {
347
344
  constructor(sdk: OnchainSDK, data: PriceOracleData);
348
- /**
349
- * Converts previously obtained price updates into CreditFacade multicall entry
350
- * @param creditFacade
351
- * @param updates
352
- * @returns
353
- */
354
- onDemandPriceUpdates(creditFacade: Address, updates?: UpdatePriceFeedsResult): OnDemandPriceUpdates;
355
345
  /**
356
346
  * {@inheritDoc IPriceOracleContract.updateAndConvert}
357
347
  **/
@@ -1,4 +1,4 @@
1
- import { IPriceOracleContract, OnDemandPriceUpdates, PriceFeedsForTokensOptions } from "./types.js";
1
+ import { IPriceOracleContract, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions } from "./types.js";
2
2
  import { createPriceOracle } from "./createPriceOracle.js";
3
3
  import { PriceOracleV310Contract } from "./PriceOracleV310Contract.js";
4
- export { IPriceOracleContract, OnDemandPriceUpdates, PriceFeedsForTokensOptions, PriceOracleV310Contract, createPriceOracle };
4
+ export { IPriceOracleContract, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleV310Contract, createPriceOracle };
@@ -2,7 +2,7 @@ import { Amount, TokenAmount } from "../../../model/primitives.js";
2
2
  import { PriceFeedData, PriceFeedSummary } from "../../../model/opportunities.js";
3
3
  import "../../../model/index.js";
4
4
  import { AddressMap } from "../../utils/AddressMap.js";
5
- import { IBaseContract } from "../../base/types.js";
5
+ import { CreditAccountTokensSlice, IBaseContract } from "../../base/types.js";
6
6
  import { DelegatedMulticall } from "../../utils/viem/executeDelegatedMulticalls.js";
7
7
  import "../../utils/viem/index.js";
8
8
  import { PriceOracleStateHuman } from "../../types/state-human.js";
@@ -10,7 +10,6 @@ import { IPriceFeedContract, PriceUpdate, UpdatePriceFeedsResult } from "../pric
10
10
  import { PriceFeedRef } from "../pricefeeds/PriceFeedRef.js";
11
11
  import "../pricefeeds/index.js";
12
12
  import PriceFeedAnswerMap from "./PriceFeedAnswerMap.js";
13
- import { MultiCall } from "../../types/transactions.js";
14
13
  import "../../utils/index.js";
15
14
  import "../../types/index.js";
16
15
  import "../../base/index.js";
@@ -33,12 +32,15 @@ interface PriceFeedsForTokensOptions {
33
32
  reserve?: boolean;
34
33
  }
35
34
  /**
36
- * On demand price updates acceptable by both credit facade multicall and
37
- * as raw PriceUpdate in liquidator calls.
38
- */
39
- interface OnDemandPriceUpdates {
40
- raw: PriceUpdate[];
41
- multicall: MultiCall[];
35
+ * Filter and extra inputs controlling which feeds to update for a credit
36
+ * account.
37
+ **/
38
+ interface PriceFeedsForAccountOptions extends PriceFeedsForTokensOptions {
39
+ /**
40
+ * Extra tokens to price alongside the account's underlying and its enabled
41
+ * non-dust balances.
42
+ **/
43
+ extraTokens?: Address[];
42
44
  }
43
45
  /**
44
46
  * Public interface for a Gearbox price oracle contract.
@@ -97,12 +99,26 @@ interface IPriceOracleContract extends IBaseContract {
97
99
  **/
98
100
  priceFeedsForTokens: (tokens: Address[], opts?: PriceFeedsForTokensOptions) => IPriceFeedContract[];
99
101
  /**
100
- * Converts previously obtained price updates into CreditFacade
101
- * multicall entries and raw `PriceUpdateV310` structures.
102
- * @param creditFacade - Address of the credit facade that will receive the multicall.
103
- * @param updates - Price update result to convert. When omitted, uses latest cached updates.
102
+ * Generates the price feed update transactions an account needs to be
103
+ * valued: one per feed of its underlying, of every enabled token it holds a
104
+ * non-dust balance of, and of any `extraTokens`.
105
+ * @param account - Account whose tokens to cover.
106
+ * @param opts - Feed type filter and extra tokens to price.
107
+ **/
108
+ priceUpdateTxsForAccount: (account: CreditAccountTokensSlice, opts?: PriceFeedsForAccountOptions) => Promise<UpdatePriceFeedsResult>;
109
+ /**
110
+ * Same as {@link priceUpdateTxsForAccount}, but returns raw price update
111
+ * structures instead of transactions.
112
+ * @param account - Account whose tokens to cover.
113
+ * @param opts - Feed type filter and extra tokens to price.
114
+ **/
115
+ priceUpdatesForAccount: (account: CreditAccountTokensSlice, opts?: PriceFeedsForAccountOptions) => Promise<PriceUpdate[]>;
116
+ /**
117
+ * Raw price update structures for the feeds of the given tokens.
118
+ * @param tokens - Token addresses to price.
119
+ * @param opts - Feed type filter.
104
120
  **/
105
- onDemandPriceUpdates: (creditFacade: Address, updates?: UpdatePriceFeedsResult) => OnDemandPriceUpdates;
121
+ priceUpdatesForTokens: (tokens: Address[], opts?: PriceFeedsForTokensOptions) => Promise<PriceUpdate[]>;
106
122
  /**
107
123
  * Converts an amount from one token to another using latest known prices.
108
124
  * @param from - Source token address.
@@ -188,4 +204,4 @@ interface IPriceOracleContract extends IBaseContract {
188
204
  stateHuman: (raw?: boolean) => PriceOracleStateHuman;
189
205
  }
190
206
  //#endregion
191
- export { IPriceOracleContract, OnDemandPriceUpdates, PriceFeedsForTokensOptions };
207
+ export { IPriceOracleContract, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions };
@@ -1,8 +1,8 @@
1
1
  import { RWA_FACTORY_SECURITIZE } from "./constants.js";
2
- import { GetOpenAccountRequirementsProps } from "../../../accounts/types.js";
3
2
  import { IRWAFactory, RWACompressorInvestorData, RWAFactoryData } from "../types.js";
4
3
  import { SecuritizeDegenNFT } from "./SecuritizeDegenNFT.js";
5
4
  import { DStokenData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman } from "./types.js";
5
+ import { GetOpenAccountRequirementsProps } from "../../../accounts/types.js";
6
6
  import { MultiCall, RawTx } from "../../../types/transactions.js";
7
7
  import { OnchainSDK } from "../../../OnchainSDK.js";
8
8
  import "../../../types/index.js";
@@ -1,9 +1,9 @@
1
1
  import { iRWACompressorAbi } from "../../../abi/rwa/iRWACompressor.js";
2
2
  import { IBaseContract, Unarray } from "../../base/types.js";
3
3
  import { RWA_FACTORY_SECURITIZE } from "./securitize/constants.js";
4
- import { GetOpenAccountRequirementsProps } from "../../accounts/types.js";
5
4
  import { SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman } from "./securitize/types.js";
6
5
  import "./securitize/index.js";
6
+ import { GetOpenAccountRequirementsProps } from "../../accounts/types.js";
7
7
  import { MultiCall, RawTx } from "../../types/transactions.js";
8
8
  import "../../types/index.js";
9
9
  import "../../base/index.js";
@@ -1,4 +1,4 @@
1
- import { additionalBorrowApyBps, borrowApyBps, healthFactorBps, maxLeverage, positionLeverage, rayToBps, usdToNumber, utilizationBps } from "../market/math.js";
1
+ import { OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, additionalBorrowApyBps, borrowApyBps, healthFactorBps, maxLeverage, minSeizedAmount, optimalHFForPartialLiquidation, optimalRepaidAmount, positionLeverage, rayToBps, usdToNumber, utilizationBps } from "../market/math.js";
2
2
  import { MultichainOpportunitiesService } from "./MultichainOpportunitiesService.js";
3
3
  import { OpportunitiesService } from "./OpportunitiesService.js";
4
- export { MultichainOpportunitiesService, OpportunitiesService, additionalBorrowApyBps, borrowApyBps, healthFactorBps, maxLeverage, positionLeverage, rayToBps, usdToNumber, utilizationBps };
4
+ export { MultichainOpportunitiesService, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, additionalBorrowApyBps, borrowApyBps, healthFactorBps, maxLeverage, minSeizedAmount, optimalHFForPartialLiquidation, optimalRepaidAmount, positionLeverage, rayToBps, usdToNumber, utilizationBps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.12.0-next.73",
3
+ "version": "14.12.0-next.75",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,12 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/sdk/accounts/constants.ts
3
- /**
4
- * Token balances at or below this threshold are treated as dust and ignored,
5
- * consistent with the rest of the SDK (see `filterDust`).
6
- *
7
- * Shared by every service that describes what a credit account holds, so that
8
- * a liquidation row and a position row agree on which balances exist at all.
9
- **/
10
- const DUST_THRESHOLD = 10n;
11
- //#endregion
12
- exports.DUST_THRESHOLD = DUST_THRESHOLD;
@@ -1,11 +0,0 @@
1
- //#region src/sdk/accounts/constants.ts
2
- /**
3
- * Token balances at or below this threshold are treated as dust and ignored,
4
- * consistent with the rest of the SDK (see `filterDust`).
5
- *
6
- * Shared by every service that describes what a credit account holds, so that
7
- * a liquidation row and a position row agree on which balances exist at all.
8
- **/
9
- const DUST_THRESHOLD = 10n;
10
- //#endregion
11
- export { DUST_THRESHOLD };
@@ -1,11 +0,0 @@
1
- //#region src/sdk/accounts/constants.d.ts
2
- /**
3
- * Token balances at or below this threshold are treated as dust and ignored,
4
- * consistent with the rest of the SDK (see `filterDust`).
5
- *
6
- * Shared by every service that describes what a credit account holds, so that
7
- * a liquidation row and a position row agree on which balances exist at all.
8
- **/
9
- declare const DUST_THRESHOLD = 10n;
10
- //#endregion
11
- export { DUST_THRESHOLD };