@gearbox-protocol/sdk 14.12.0-next.66 → 14.12.0-next.67
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/cjs/common-utils/index.js +2 -2
- package/dist/cjs/common-utils/utils/apy/calculate-safe-borrow-rate.js +3 -3
- package/dist/cjs/common-utils/utils/assets-math.js +7 -7
- package/dist/cjs/common-utils/utils/creditAccount/calc-health-factor.js +2 -2
- package/dist/cjs/common-utils/utils/creditAccount/debt.js +2 -2
- package/dist/cjs/common-utils/utils/creditAccount/quota-utils.js +5 -5
- package/dist/cjs/common-utils/utils/index.js +2 -2
- package/dist/cjs/common-utils/utils/strategies/leverage/calculate-max-leverage-factor.js +2 -2
- package/dist/cjs/common-utils/utils/strategies/leverage/calculate-max-strategy-debt.js +5 -5
- package/dist/cjs/common-utils/utils/strategies/strategy-info/calculate-total-points.js +2 -2
- package/dist/cjs/common-utils/utils/strategies/strategy-info/get-cm-you-can-earn.js +2 -2
- package/dist/cjs/common-utils/utils/validation/validate-open-account-pool-status.js +4 -4
- package/dist/cjs/model/history.js +28 -0
- package/dist/cjs/model/history.schema.js +84 -0
- package/dist/cjs/model/index.js +64 -0
- package/dist/cjs/model/liquidations.js +23 -0
- package/dist/cjs/model/liquidations.schema.js +91 -0
- package/dist/cjs/model/opportunities.js +55 -0
- package/dist/cjs/model/opportunities.schema.js +220 -0
- package/dist/cjs/model/package.json +1 -0
- package/dist/cjs/model/positions.js +1 -0
- package/dist/cjs/model/primitives.js +1 -0
- package/dist/cjs/model/primitives.schema.js +85 -0
- package/dist/cjs/new-sdk/AbstractNamespace.js +158 -0
- package/dist/cjs/new-sdk/GearboxSDK.js +122 -0
- package/dist/cjs/new-sdk/index.js +11 -0
- package/dist/cjs/new-sdk/opportunities/OpportunitiesNamespace.js +122 -0
- package/dist/cjs/new-sdk/opportunities/index.js +4 -0
- package/dist/cjs/new-sdk/opportunities/types.js +1 -0
- package/dist/cjs/new-sdk/package.json +1 -0
- package/dist/cjs/new-sdk/types.js +22 -0
- package/dist/cjs/new-sdk/utils/history.js +1 -0
- package/dist/cjs/new-sdk/utils/index.js +2 -0
- package/dist/cjs/offchain/GearboxAPI.js +33 -0
- package/dist/cjs/offchain/index.js +8 -0
- package/dist/cjs/offchain/opportunities/OffchainOpportunities.js +97 -0
- package/dist/cjs/offchain/opportunities/index.js +4 -0
- package/dist/cjs/offchain/package.json +1 -0
- package/dist/cjs/offchain/types.js +1 -0
- package/dist/cjs/preview/preview/buildDelayedPreview.js +5 -5
- package/dist/cjs/rewards/rewards/api.js +2 -2
- package/dist/cjs/rewards/rewards/extra-apy.js +2 -2
- package/dist/cjs/sdk/MultichainSDK.js +18 -2
- package/dist/cjs/sdk/OnchainSDK.js +8 -1
- package/dist/cjs/sdk/accounts/index.js +2 -0
- package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +150 -106
- package/dist/cjs/sdk/accounts/liquidations/MultichainLiquidationsService.js +32 -38
- package/dist/cjs/sdk/accounts/liquidations/constants.js +13 -0
- package/dist/cjs/sdk/accounts/liquidations/index.js +2 -0
- package/dist/cjs/sdk/base/MultichainConstruct.js +80 -0
- package/dist/cjs/sdk/base/TokensMeta.js +51 -0
- package/dist/cjs/sdk/base/index.js +2 -0
- package/dist/cjs/sdk/chain/chains.js +76 -0
- package/dist/cjs/sdk/chain/index.js +4 -0
- package/dist/cjs/sdk/core/errors.js +13 -0
- package/dist/cjs/sdk/core/index.js +2 -1
- package/dist/cjs/sdk/index.js +25 -1
- package/dist/cjs/sdk/market/MarketConfiguratorContract.js +14 -0
- package/dist/cjs/sdk/market/MarketSuite.js +163 -0
- package/dist/cjs/sdk/market/credit/CreditManagerV310Contract.js +26 -0
- package/dist/cjs/sdk/market/credit/CreditSuite.js +102 -0
- package/dist/cjs/sdk/market/math.js +104 -0
- package/dist/cjs/sdk/market/oracle/PriceOracleBaseContract.js +52 -0
- package/dist/cjs/sdk/market/pool/LinearInterestRateModelContract.js +30 -0
- package/dist/cjs/sdk/market/pool/PoolQuotaKeeperV310Contract.js +26 -0
- package/dist/cjs/sdk/market/pool/PoolSuite.js +28 -0
- package/dist/cjs/sdk/market/pool/PoolV310Contract.js +27 -0
- package/dist/cjs/sdk/market/pool/math.js +44 -0
- package/dist/cjs/sdk/market/pricefeeds/AbstractPriceFeed.js +17 -0
- package/dist/cjs/sdk/opportunities/MultichainOpportunitiesService.js +60 -0
- package/dist/cjs/sdk/opportunities/OpportunitiesService.js +103 -0
- package/dist/cjs/sdk/opportunities/index.js +12 -0
- package/dist/cjs/sdk/types/multichain.js +1 -0
- package/dist/cjs/{common-utils → sdk}/utils/bigint-math.js +11 -11
- package/dist/cjs/sdk/utils/index.js +3 -0
- package/dist/cjs/sdk/utils/zod.js +12 -0
- package/dist/esm/common-utils/index.js +1 -1
- package/dist/esm/common-utils/utils/apy/calculate-safe-borrow-rate.js +1 -1
- package/dist/esm/common-utils/utils/assets-math.js +1 -1
- package/dist/esm/common-utils/utils/creditAccount/calc-health-factor.js +1 -1
- package/dist/esm/common-utils/utils/creditAccount/debt.js +1 -1
- package/dist/esm/common-utils/utils/creditAccount/quota-utils.js +1 -1
- package/dist/esm/common-utils/utils/index.js +1 -1
- package/dist/esm/common-utils/utils/strategies/leverage/calculate-max-leverage-factor.js +1 -1
- package/dist/esm/common-utils/utils/strategies/leverage/calculate-max-strategy-debt.js +1 -1
- package/dist/esm/common-utils/utils/strategies/strategy-info/calculate-total-points.js +1 -1
- package/dist/esm/common-utils/utils/strategies/strategy-info/get-cm-you-can-earn.js +1 -1
- package/dist/esm/common-utils/utils/validation/validate-open-account-pool-status.js +1 -1
- package/dist/esm/model/history.js +26 -0
- package/dist/esm/model/history.schema.js +76 -0
- package/dist/esm/model/index.js +9 -0
- package/dist/esm/model/liquidations.js +22 -0
- package/dist/esm/model/liquidations.schema.js +83 -0
- package/dist/esm/model/opportunities.js +51 -0
- package/dist/esm/model/opportunities.schema.js +198 -0
- package/dist/esm/model/package.json +1 -0
- package/dist/esm/model/positions.js +1 -0
- package/dist/esm/model/primitives.js +1 -0
- package/dist/esm/model/primitives.schema.js +75 -0
- package/dist/esm/new-sdk/AbstractNamespace.js +157 -0
- package/dist/esm/new-sdk/GearboxSDK.js +121 -0
- package/dist/esm/new-sdk/index.js +7 -0
- package/dist/esm/new-sdk/opportunities/OpportunitiesNamespace.js +121 -0
- package/dist/esm/new-sdk/opportunities/index.js +3 -0
- package/dist/esm/new-sdk/opportunities/types.js +1 -0
- package/dist/esm/new-sdk/package.json +1 -0
- package/dist/esm/new-sdk/types.js +21 -0
- package/dist/esm/new-sdk/utils/history.js +1 -0
- package/dist/esm/new-sdk/utils/index.js +2 -0
- package/dist/esm/offchain/GearboxAPI.js +32 -0
- package/dist/esm/offchain/index.js +5 -0
- package/dist/esm/offchain/opportunities/OffchainOpportunities.js +95 -0
- package/dist/esm/offchain/opportunities/index.js +2 -0
- package/dist/esm/offchain/package.json +1 -0
- package/dist/esm/offchain/types.js +1 -0
- package/dist/esm/preview/preview/buildDelayedPreview.js +1 -1
- package/dist/esm/rewards/rewards/api.js +1 -1
- package/dist/esm/rewards/rewards/extra-apy.js +1 -1
- package/dist/esm/sdk/MultichainSDK.js +18 -2
- package/dist/esm/sdk/OnchainSDK.js +8 -1
- package/dist/esm/sdk/accounts/index.js +2 -2
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +152 -108
- package/dist/esm/sdk/accounts/liquidations/MultichainLiquidationsService.js +32 -38
- package/dist/esm/sdk/accounts/liquidations/constants.js +12 -1
- package/dist/esm/sdk/accounts/liquidations/index.js +2 -2
- package/dist/esm/sdk/base/MultichainConstruct.js +79 -0
- package/dist/esm/sdk/base/TokensMeta.js +51 -0
- package/dist/esm/sdk/base/index.js +2 -1
- package/dist/esm/sdk/chain/chains.js +74 -2
- package/dist/esm/sdk/chain/index.js +2 -2
- package/dist/esm/sdk/core/errors.js +13 -1
- package/dist/esm/sdk/core/index.js +2 -2
- package/dist/esm/sdk/index.js +11 -5
- package/dist/esm/sdk/market/MarketConfiguratorContract.js +14 -0
- package/dist/esm/sdk/market/MarketSuite.js +163 -0
- package/dist/esm/sdk/market/credit/CreditManagerV310Contract.js +26 -0
- package/dist/esm/sdk/market/credit/CreditSuite.js +102 -0
- package/dist/esm/sdk/market/math.js +98 -0
- package/dist/esm/sdk/market/oracle/PriceOracleBaseContract.js +52 -0
- package/dist/esm/sdk/market/pool/LinearInterestRateModelContract.js +30 -0
- package/dist/esm/sdk/market/pool/PoolQuotaKeeperV310Contract.js +26 -0
- package/dist/esm/sdk/market/pool/PoolSuite.js +28 -0
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +27 -0
- package/dist/esm/sdk/market/pool/math.js +41 -0
- package/dist/esm/sdk/market/pricefeeds/AbstractPriceFeed.js +17 -0
- package/dist/esm/sdk/opportunities/MultichainOpportunitiesService.js +59 -0
- package/dist/esm/sdk/opportunities/OpportunitiesService.js +102 -0
- package/dist/esm/sdk/opportunities/index.js +4 -0
- package/dist/esm/sdk/types/multichain.js +1 -0
- package/dist/esm/{common-utils → sdk}/utils/bigint-math.js +11 -11
- package/dist/esm/sdk/utils/index.js +3 -2
- package/dist/esm/sdk/utils/zod.js +13 -2
- package/dist/types/common-utils/index.d.ts +1 -1
- package/dist/types/common-utils/utils/index.d.ts +1 -1
- package/dist/types/model/history.d.ts +105 -0
- package/dist/types/model/history.schema.d.ts +66 -0
- package/dist/types/model/index.d.ts +9 -0
- package/dist/types/model/liquidations.d.ts +230 -0
- package/dist/types/model/liquidations.schema.d.ts +292 -0
- package/dist/types/model/opportunities.d.ts +543 -0
- package/dist/types/model/opportunities.schema.d.ts +1066 -0
- package/dist/types/model/positions.d.ts +11 -0
- package/dist/types/model/primitives.d.ts +193 -0
- package/dist/types/model/primitives.schema.d.ts +81 -0
- package/dist/types/new-sdk/AbstractNamespace.d.ts +119 -0
- package/dist/types/new-sdk/GearboxSDK.d.ts +78 -0
- package/dist/types/new-sdk/index.d.ts +9 -0
- package/dist/types/new-sdk/opportunities/OpportunitiesNamespace.d.ts +69 -0
- package/dist/types/new-sdk/opportunities/index.d.ts +3 -0
- package/dist/types/new-sdk/opportunities/types.d.ts +66 -0
- package/dist/types/new-sdk/types.d.ts +149 -0
- package/dist/types/new-sdk/utils/history.d.ts +44 -0
- package/dist/types/new-sdk/utils/index.d.ts +2 -0
- package/dist/types/offchain/GearboxAPI.d.ts +31 -0
- package/dist/types/offchain/index.d.ts +5 -0
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +69 -0
- package/dist/types/offchain/opportunities/index.d.ts +2 -0
- package/dist/types/offchain/types.d.ts +50 -0
- package/dist/types/sdk/MultichainSDK.d.ts +15 -2
- package/dist/types/sdk/OnchainSDK.d.ts +9 -3
- package/dist/types/sdk/accounts/index.d.ts +3 -3
- package/dist/types/sdk/accounts/liquidations/LiquidationsService.d.ts +24 -16
- package/dist/types/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts +26 -20
- package/dist/types/sdk/accounts/liquidations/constants.d.ts +12 -1
- package/dist/types/sdk/accounts/liquidations/index.d.ts +3 -3
- package/dist/types/sdk/accounts/liquidations/types.d.ts +34 -309
- package/dist/types/sdk/base/MultichainConstruct.d.ts +57 -0
- package/dist/types/sdk/base/TokensMeta.d.ts +26 -0
- package/dist/types/sdk/base/index.d.ts +2 -1
- package/dist/types/sdk/chain/chains.d.ts +68 -1
- package/dist/types/sdk/chain/index.d.ts +2 -2
- package/dist/types/sdk/core/errors.d.ts +10 -1
- package/dist/types/sdk/core/index.d.ts +2 -2
- package/dist/types/sdk/index.d.ts +15 -8
- package/dist/types/sdk/market/MarketConfiguratorContract.d.ts +9 -0
- package/dist/types/sdk/market/MarketSuite.d.ts +109 -1
- package/dist/types/sdk/market/credit/CreditManagerV310Contract.d.ts +14 -0
- package/dist/types/sdk/market/credit/CreditSuite.d.ts +47 -0
- package/dist/types/sdk/market/credit/types.d.ts +22 -0
- package/dist/types/sdk/market/index.d.ts +2 -2
- package/dist/types/sdk/market/math.d.ts +74 -0
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +23 -0
- package/dist/types/sdk/market/oracle/types.d.ts +46 -0
- package/dist/types/sdk/market/pool/LinearInterestRateModelContract.d.ts +12 -0
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +22 -1
- package/dist/types/sdk/market/pool/PoolSuite.d.ts +23 -0
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +18 -0
- package/dist/types/sdk/market/pool/math.d.ts +57 -0
- package/dist/types/sdk/market/pool/types.d.ts +23 -0
- package/dist/types/sdk/market/pricefeeds/AbstractPriceFeed.d.ts +6 -0
- package/dist/types/sdk/market/pricefeeds/types.d.ts +10 -0
- package/dist/types/sdk/opportunities/MultichainOpportunitiesService.d.ts +40 -0
- package/dist/types/sdk/opportunities/OpportunitiesService.d.ts +47 -0
- package/dist/types/sdk/opportunities/index.d.ts +4 -0
- package/dist/types/sdk/types/index.d.ts +2 -1
- package/dist/types/sdk/types/multichain.d.ts +65 -0
- package/dist/types/sdk/types/state.d.ts +1 -1
- package/dist/types/sdk/types/transactions.d.ts +3 -0
- package/dist/types/{common-utils → sdk}/utils/bigint-math.d.ts +7 -11
- package/dist/types/sdk/utils/index.d.ts +3 -2
- package/dist/types/sdk/utils/zod.d.ts +6 -2
- package/package.json +16 -1
- package/dist/cjs/sdk/accounts/liquidations/helpers.js +0 -201
- package/dist/esm/sdk/accounts/liquidations/helpers.js +0 -192
- package/dist/types/sdk/accounts/liquidations/helpers.d.ts +0 -140
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_model_opportunities = require("../../model/opportunities.js");
|
|
3
|
+
require("../../model/index.js");
|
|
4
|
+
const require_new_sdk_AbstractNamespace = require("../AbstractNamespace.js");
|
|
5
|
+
//#region src/new-sdk/opportunities/OpportunitiesNamespace.ts
|
|
6
|
+
/**
|
|
7
|
+
* Fields the backend owns even when the chain also fills them.
|
|
8
|
+
*
|
|
9
|
+
* Empty of on-chain conflicts today — every yield group here is off-chain only,
|
|
10
|
+
* so onchain-first would already yield the backend's value. It is written out
|
|
11
|
+
* anyway so that adding an on-chain estimate of one of them is a deliberate
|
|
12
|
+
* change to this list rather than a silent regression.
|
|
13
|
+
**/
|
|
14
|
+
const OFFCHAIN_OWNED_FIELDS = /* @__PURE__ */ new Set(["supplyApy", "collateralApy"]);
|
|
15
|
+
/**
|
|
16
|
+
* The `opportunities` namespace of the combined SDK.
|
|
17
|
+
*
|
|
18
|
+
* A stateless router over the two sources, see {@link AbstractNamespace} for
|
|
19
|
+
* the routing itself. What is specific to opportunities is the reads below and
|
|
20
|
+
* the merge policy at the bottom of the class.
|
|
21
|
+
*
|
|
22
|
+
* The class implements the methods of every mode; {@link GearboxSDK} exposes it
|
|
23
|
+
* as its mode's slice of {@link OpportunitiesByMode}, so calling a method the
|
|
24
|
+
* mode does not have is a compile error rather than a runtime one.
|
|
25
|
+
**/
|
|
26
|
+
var OpportunitiesNamespace = class extends require_new_sdk_AbstractNamespace.AbstractNamespace {
|
|
27
|
+
constructor(onchain, offchain, logger) {
|
|
28
|
+
super("Opportunities", onchain, offchain, logger);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* {@inheritDoc OpportunitiesBase.list}
|
|
32
|
+
**/
|
|
33
|
+
async list(filter) {
|
|
34
|
+
return this.readList("list opportunities", async (sdk) => {
|
|
35
|
+
const { result, meta } = await sdk.opportunities.list(filter);
|
|
36
|
+
return {
|
|
37
|
+
value: result,
|
|
38
|
+
chains: meta
|
|
39
|
+
};
|
|
40
|
+
}, (api) => api.opportunities.list(filter));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* {@inheritDoc OpportunitiesBase.getPool}
|
|
44
|
+
**/
|
|
45
|
+
async getPool(key) {
|
|
46
|
+
return this.readOne("get pool opportunity", key.chainId, (sdk) => sdk.opportunities.getPool(key), (api) => api.opportunities.getPool(key));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* {@inheritDoc OpportunitiesBase.getStrategy}
|
|
50
|
+
**/
|
|
51
|
+
async getStrategy(key) {
|
|
52
|
+
return this.readOne("get strategy opportunity", key.chainId, (sdk) => sdk.opportunities.getStrategy(key), (api) => api.opportunities.getStrategy(key));
|
|
53
|
+
}
|
|
54
|
+
history(key) {
|
|
55
|
+
return { chart: (metric, range) => this.#chart(key, metric, range) };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Reads one chart of one opportunity from the backend.
|
|
59
|
+
*
|
|
60
|
+
* The metric a caller may name is gated by the reader's type, so the kind of
|
|
61
|
+
* the key is not re-checked here.
|
|
62
|
+
**/
|
|
63
|
+
async #chart(key, metric, range) {
|
|
64
|
+
const { result, meta } = await this.readOffchain(`get ${metric} history`, (api) => api.opportunities.getHistory({
|
|
65
|
+
opportunity: key,
|
|
66
|
+
range,
|
|
67
|
+
metric
|
|
68
|
+
}), {
|
|
69
|
+
metric,
|
|
70
|
+
points: [],
|
|
71
|
+
metadata: {}
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
data: result.points,
|
|
75
|
+
metadata: {
|
|
76
|
+
...result.metadata,
|
|
77
|
+
source: meta
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Merges the two versions of one opportunity.
|
|
83
|
+
*
|
|
84
|
+
* The chain wins every field it fills; the backend fills the rest and owns
|
|
85
|
+
* {@link OFFCHAIN_OWNED_FIELDS}.
|
|
86
|
+
*
|
|
87
|
+
* The rule is onchain-first, field-wise, and never deeper than one level: a
|
|
88
|
+
* group like `totalSupply` or `supplyApy` is taken whole from one source, so
|
|
89
|
+
* a row never mixes an on-chain token amount with a backend dollar value
|
|
90
|
+
* derived from a different block.
|
|
91
|
+
**/
|
|
92
|
+
mergeOne(onchain, offchain) {
|
|
93
|
+
const merged = { ...onchain };
|
|
94
|
+
for (const [field, value] of Object.entries(offchain)) {
|
|
95
|
+
if (value === void 0) continue;
|
|
96
|
+
if (OFFCHAIN_OWNED_FIELDS.has(field) || merged[field] === void 0) merged[field] = value;
|
|
97
|
+
}
|
|
98
|
+
return merged;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Unions the two lists by canonical opportunity id.
|
|
102
|
+
*
|
|
103
|
+
* Rows present in both are merged by {@link OpportunitiesNamespace.mergeOne}.
|
|
104
|
+
* Rows only the backend knows are appended: a chain the SDK does not cover,
|
|
105
|
+
* or a market it has not loaded, is a reason to show more rather than fewer
|
|
106
|
+
* opportunities.
|
|
107
|
+
**/
|
|
108
|
+
mergeList(onchain, offchain) {
|
|
109
|
+
const byId = /* @__PURE__ */ new Map();
|
|
110
|
+
for (const row of onchain) byId.set(require_model_opportunities.opportunityId(row), row);
|
|
111
|
+
const extra = [];
|
|
112
|
+
for (const row of offchain) {
|
|
113
|
+
const id = require_model_opportunities.opportunityId(row);
|
|
114
|
+
const existing = byId.get(id);
|
|
115
|
+
if (existing) byId.set(id, this.mergeOne(existing, row));
|
|
116
|
+
else extra.push(row);
|
|
117
|
+
}
|
|
118
|
+
return [...byId.values(), ...extra];
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
//#endregion
|
|
122
|
+
exports.OpportunitiesNamespace = OpportunitiesNamespace;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_new_sdk_opportunities_OpportunitiesNamespace = require("./OpportunitiesNamespace.js");
|
|
3
|
+
require("./types.js");
|
|
4
|
+
exports.OpportunitiesNamespace = require_new_sdk_opportunities_OpportunitiesNamespace.OpportunitiesNamespace;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "commonjs"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/new-sdk/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Thrown when a read had sources to ask and none of them answered.
|
|
5
|
+
*
|
|
6
|
+
* A read that partially succeeded never throws: it returns what it has and
|
|
7
|
+
* reports the rest in {@link SourceMeta}.
|
|
8
|
+
**/
|
|
9
|
+
var AllSourcesFailedError = class extends Error {
|
|
10
|
+
/**
|
|
11
|
+
* Outcome of every source the failed read asked.
|
|
12
|
+
**/
|
|
13
|
+
meta;
|
|
14
|
+
constructor(action, meta) {
|
|
15
|
+
const reasons = [...meta.chains.filter((c) => c.status === "error").map((c) => `${c.network}: ${c.error}`), ...meta.offchain?.status === "error" ? [`offchain: ${meta.offchain.error}`] : []];
|
|
16
|
+
super(`cannot ${action}, every source failed (${reasons.join("; ")})`);
|
|
17
|
+
this.name = "AllSourcesFailedError";
|
|
18
|
+
this.meta = meta;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.AllSourcesFailedError = AllSourcesFailedError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_offchain_opportunities_OffchainOpportunities = require("./opportunities/OffchainOpportunities.js");
|
|
3
|
+
require("./opportunities/index.js");
|
|
4
|
+
//#region src/offchain/GearboxAPI.ts
|
|
5
|
+
/**
|
|
6
|
+
* Client for the Gearbox backend, the off-chain source of the read model.
|
|
7
|
+
*
|
|
8
|
+
* It mirrors the namespace layout of the combined `GearboxSDK`, so the same
|
|
9
|
+
* call reads the same way against either source:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* const api = new GearboxAPI({ baseUrl: "https://api.gearbox.fi" });
|
|
13
|
+
* const { result } = await api.opportunities.list({ kind: "strategy" });
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* The backend imports the read model from this package and its endpoints
|
|
17
|
+
* return those types directly, so there is no wire DTO layer here — only
|
|
18
|
+
* transport and schema validation.
|
|
19
|
+
*
|
|
20
|
+
* The transport is not implemented yet; see {@link OffchainOpportunities} for
|
|
21
|
+
* what each stubbed endpoint currently answers.
|
|
22
|
+
**/
|
|
23
|
+
var GearboxAPI = class {
|
|
24
|
+
/**
|
|
25
|
+
* Namespace for pool and strategy opportunities.
|
|
26
|
+
**/
|
|
27
|
+
opportunities;
|
|
28
|
+
constructor(options) {
|
|
29
|
+
this.opportunities = new require_offchain_opportunities_OffchainOpportunities.OffchainOpportunities(options);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.GearboxAPI = GearboxAPI;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_offchain_opportunities_OffchainOpportunities = require("./opportunities/OffchainOpportunities.js");
|
|
3
|
+
require("./opportunities/index.js");
|
|
4
|
+
const require_offchain_GearboxAPI = require("./GearboxAPI.js");
|
|
5
|
+
require("./types.js");
|
|
6
|
+
exports.GearboxAPI = require_offchain_GearboxAPI.GearboxAPI;
|
|
7
|
+
exports.OffchainNotImplementedError = require_offchain_opportunities_OffchainOpportunities.OffchainNotImplementedError;
|
|
8
|
+
exports.OffchainOpportunities = require_offchain_opportunities_OffchainOpportunities.OffchainOpportunities;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/offchain/opportunities/OffchainOpportunities.ts
|
|
3
|
+
/**
|
|
4
|
+
* Thrown by the endpoints that have no stub answer, so that a caller in
|
|
5
|
+
* `offchain` mode fails loudly instead of reading an empty detail page as a
|
|
6
|
+
* missing opportunity.
|
|
7
|
+
**/
|
|
8
|
+
var OffchainNotImplementedError = class extends Error {
|
|
9
|
+
constructor(endpoint) {
|
|
10
|
+
super(`GearboxAPI: ${endpoint} is not implemented yet`);
|
|
11
|
+
this.name = "OffchainNotImplementedError";
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Backend counterpart of the `opportunities` namespace.
|
|
16
|
+
*
|
|
17
|
+
* This is a stub: the HTTP client is not written yet, so list reads answer with
|
|
18
|
+
* an empty list and detail reads throw. Every signature is already the final
|
|
19
|
+
* one, because the backend returns the read model types directly — there is no
|
|
20
|
+
* wire DTO and no mapper between the two.
|
|
21
|
+
*
|
|
22
|
+
* When the transport lands, each method will validate the response against the
|
|
23
|
+
* matching schema from `src/model` before returning it. A validation failure is
|
|
24
|
+
* a version-skew error and is handled exactly like a transport error: the
|
|
25
|
+
* combined SDK drops the backend's contribution in `both` mode and rethrows in
|
|
26
|
+
* `offchain` mode.
|
|
27
|
+
**/
|
|
28
|
+
var OffchainOpportunities = class {
|
|
29
|
+
#baseUrl;
|
|
30
|
+
#logger;
|
|
31
|
+
constructor(options) {
|
|
32
|
+
this.#baseUrl = options?.baseUrl;
|
|
33
|
+
this.#logger = options?.logger?.child?.({ name: "OffchainOpportunities" });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Base URL the client will call once the transport is implemented.
|
|
37
|
+
**/
|
|
38
|
+
get baseUrl() {
|
|
39
|
+
return this.#baseUrl;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* All opportunities the backend knows about, optionally narrowed by
|
|
43
|
+
* {@link OpportunityFilter}.
|
|
44
|
+
*
|
|
45
|
+
* @returns An empty list until the backend client is implemented.
|
|
46
|
+
**/
|
|
47
|
+
async list(filter) {
|
|
48
|
+
this.#logger?.debug({ filter }, "offchain opportunities list is not implemented, serving empty list");
|
|
49
|
+
return {
|
|
50
|
+
result: [],
|
|
51
|
+
meta: { status: "success" }
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Detailed view of one pool opportunity.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link OffchainNotImplementedError} until the backend client is
|
|
58
|
+
* implemented.
|
|
59
|
+
**/
|
|
60
|
+
async getPool(key) {
|
|
61
|
+
throw new OffchainNotImplementedError("opportunities.getPool");
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Detailed view of one strategy opportunity.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link OffchainNotImplementedError} until the backend client is
|
|
67
|
+
* implemented.
|
|
68
|
+
**/
|
|
69
|
+
async getStrategy(key) {
|
|
70
|
+
throw new OffchainNotImplementedError("opportunities.getStrategy");
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* One historical series of one opportunity. History exists only here:
|
|
74
|
+
* rebuilding it from the chain would mean an archive read per point.
|
|
75
|
+
*
|
|
76
|
+
* The requested metric types the response, so a caller asking for one metric
|
|
77
|
+
* does not have to narrow the union back down. When the transport lands,
|
|
78
|
+
* validation is what upholds it: a response carrying a different metric than
|
|
79
|
+
* the one asked for is a version-skew error like any other.
|
|
80
|
+
*
|
|
81
|
+
* @returns An empty series until the backend client is implemented.
|
|
82
|
+
**/
|
|
83
|
+
async getHistory(query) {
|
|
84
|
+
this.#logger?.debug({ query }, "offchain opportunities history is not implemented, serving empty series");
|
|
85
|
+
return {
|
|
86
|
+
result: {
|
|
87
|
+
metric: query.metric,
|
|
88
|
+
points: [],
|
|
89
|
+
metadata: {}
|
|
90
|
+
},
|
|
91
|
+
meta: { status: "success" }
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
exports.OffchainNotImplementedError = OffchainNotImplementedError;
|
|
97
|
+
exports.OffchainOpportunities = OffchainOpportunities;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_offchain_opportunities_OffchainOpportunities = require("./OffchainOpportunities.js");
|
|
3
|
+
exports.OffchainNotImplementedError = require_offchain_opportunities_OffchainOpportunities.OffchainNotImplementedError;
|
|
4
|
+
exports.OffchainOpportunities = require_offchain_opportunities_OffchainOpportunities.OffchainOpportunities;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "commonjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_sdk_utils_AssetsMap = require("../../sdk/utils/AssetsMap.js");
|
|
3
|
+
const require_sdk_utils_bigint_math = require("../../sdk/utils/bigint-math.js");
|
|
3
4
|
require("../../sdk/index.js");
|
|
4
|
-
const require_common_utils_utils_bigint_math = require("../../common-utils/utils/bigint-math.js");
|
|
5
5
|
require("../../common-utils/index.js");
|
|
6
6
|
const require_preview_preview_types = require("./types.js");
|
|
7
7
|
let viem = require("viem");
|
|
@@ -108,7 +108,7 @@ function applyWithdrawCollateral(post, request, intent, converter, collateralWit
|
|
|
108
108
|
const { withdrawToken, withdrawAmount, debtRepaid } = intent;
|
|
109
109
|
const { claimToken } = request;
|
|
110
110
|
const sameToken = (0, viem.isAddressEqual)(withdrawToken, claimToken);
|
|
111
|
-
const fromBalance =
|
|
111
|
+
const fromBalance = require_sdk_utils_bigint_math.BigIntMath.min(withdrawAmount, post.balances.getOrZero(withdrawToken));
|
|
112
112
|
post.balances.dec(withdrawToken, fromBalance);
|
|
113
113
|
let withdrawn = fromBalance;
|
|
114
114
|
const missing = withdrawAmount - fromBalance;
|
|
@@ -129,7 +129,7 @@ function applyWithdrawCollateral(post, request, intent, converter, collateralWit
|
|
|
129
129
|
const proceeds = converter.convert(claimToken, post.underlying, remaining);
|
|
130
130
|
post.balances.dec(claimToken, remaining);
|
|
131
131
|
post.balances.inc(post.underlying, proceeds);
|
|
132
|
-
post.repay(
|
|
132
|
+
post.repay(require_sdk_utils_bigint_math.BigIntMath.min(proceeds, debtRepaid));
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
@@ -138,7 +138,7 @@ function applyWithdrawCollateral(post, request, intent, converter, collateralWit
|
|
|
138
138
|
* with it.
|
|
139
139
|
*/
|
|
140
140
|
function repayFromClaim(post, claimToken, convert, amount) {
|
|
141
|
-
const spent =
|
|
141
|
+
const spent = require_sdk_utils_bigint_math.BigIntMath.min(amount, post.balances.getOrZero(claimToken));
|
|
142
142
|
if (spent <= 0n) return;
|
|
143
143
|
const received = convert(claimToken, post.underlying, spent);
|
|
144
144
|
post.balances.dec(claimToken, spent);
|
|
@@ -166,7 +166,7 @@ function buildClosePreview(post, converter, receivedToken) {
|
|
|
166
166
|
creditAccount: post.creditAccount,
|
|
167
167
|
receivedAmount: {
|
|
168
168
|
token: receivedToken,
|
|
169
|
-
balance:
|
|
169
|
+
balance: require_sdk_utils_bigint_math.BigIntMath.max(totalValue - post.totalDebt, 0n)
|
|
170
170
|
},
|
|
171
171
|
error: converter.error
|
|
172
172
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_sdk_utils_bigint_math = require("../../sdk/utils/bigint-math.js");
|
|
2
3
|
const require_sdk_chain_chains = require("../../sdk/chain/chains.js");
|
|
3
4
|
const require_sdk_utils_formatter = require("../../sdk/utils/formatter.js");
|
|
4
5
|
require("../../sdk/index.js");
|
|
5
|
-
const require_common_utils_utils_bigint_math = require("../../common-utils/utils/bigint-math.js");
|
|
6
6
|
require("../../common-utils/index.js");
|
|
7
7
|
const require_rewards_rewards_merkl_api = require("./merkl-api.js");
|
|
8
8
|
let viem = require("viem");
|
|
@@ -33,7 +33,7 @@ var RewardAmountAPI = class RewardAmountAPI {
|
|
|
33
33
|
const pool = poolByItsToken[poolToken];
|
|
34
34
|
const total = require_sdk_utils_formatter.toBigInt(reason.amount || 0);
|
|
35
35
|
const claimed = require_sdk_utils_formatter.toBigInt(reason.claimed || 0);
|
|
36
|
-
const claimable =
|
|
36
|
+
const claimable = require_sdk_utils_bigint_math.BigIntMath.max(total - claimed, 0n);
|
|
37
37
|
const key = [
|
|
38
38
|
pool,
|
|
39
39
|
poolToken,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_sdk_utils_bigint_math = require("../../sdk/utils/bigint-math.js");
|
|
3
4
|
const require_sdk_chain_chains = require("../../sdk/chain/chains.js");
|
|
4
5
|
const require_sdk_constants_math = require("../../sdk/constants/math.js");
|
|
5
6
|
const require_sdk_utils_formatter = require("../../sdk/utils/formatter.js");
|
|
6
7
|
require("../../sdk/index.js");
|
|
7
|
-
const require_common_utils_utils_bigint_math = require("../../common-utils/utils/bigint-math.js");
|
|
8
8
|
require("../../common-utils/index.js");
|
|
9
9
|
let axios = require("axios");
|
|
10
10
|
axios = require_runtime.__toESM(axios);
|
|
@@ -64,7 +64,7 @@ var PoolPointsAPI = class PoolPointsAPI {
|
|
|
64
64
|
const { decimals: underlyingDecimals = 18 } = tokensList.get(pool.pool.pool.underlying) || {};
|
|
65
65
|
const underlyingFactor = 10n ** BigInt(underlyingDecimals);
|
|
66
66
|
const points = (tokenBalanceInPool?.balance || 0n) * defaultPoints / (pool.pool.pool.expectedLiquidity * targetFactor / underlyingFactor);
|
|
67
|
-
return
|
|
67
|
+
return require_sdk_utils_bigint_math.BigIntMath.min(points, defaultPoints);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
//#endregion
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_sdk_chain_chains = require("./chain/chains.js");
|
|
3
|
+
const require_sdk_core_errors = require("./core/errors.js");
|
|
3
4
|
const require_sdk_market_pricefeeds_updates_PriceUpdatesCache = require("./market/pricefeeds/updates/PriceUpdatesCache.js");
|
|
4
5
|
require("./market/pricefeeds/updates/index.js");
|
|
5
6
|
const require_sdk_accounts_liquidations_MultichainLiquidationsService = require("./accounts/liquidations/MultichainLiquidationsService.js");
|
|
6
7
|
require("./accounts/index.js");
|
|
7
|
-
const require_sdk_core_errors = require("./core/errors.js");
|
|
8
8
|
require("./core/index.js");
|
|
9
|
+
const require_sdk_opportunities_MultichainOpportunitiesService = require("./opportunities/MultichainOpportunitiesService.js");
|
|
10
|
+
require("./opportunities/index.js");
|
|
9
11
|
const require_sdk_OnchainSDK = require("./OnchainSDK.js");
|
|
10
12
|
//#region src/sdk/MultichainSDK.ts
|
|
11
13
|
/**
|
|
@@ -23,6 +25,11 @@ var MultichainSDK = class {
|
|
|
23
25
|
* configured chains.
|
|
24
26
|
*/
|
|
25
27
|
liquidations;
|
|
28
|
+
/**
|
|
29
|
+
* Namespace for the pool and strategy opportunities of all configured
|
|
30
|
+
* chains.
|
|
31
|
+
*/
|
|
32
|
+
opportunities;
|
|
26
33
|
constructor(options) {
|
|
27
34
|
this.#chains = /* @__PURE__ */ new Map();
|
|
28
35
|
this.#logger = options.logger;
|
|
@@ -40,6 +47,7 @@ var MultichainSDK = class {
|
|
|
40
47
|
this.#chains.set(network, sdk);
|
|
41
48
|
}
|
|
42
49
|
this.liquidations = new require_sdk_accounts_liquidations_MultichainLiquidationsService.MultichainLiquidationsService(this);
|
|
50
|
+
this.opportunities = new require_sdk_opportunities_MultichainOpportunitiesService.MultichainOpportunitiesService(this);
|
|
43
51
|
}
|
|
44
52
|
/**
|
|
45
53
|
* Attach all configured chains in parallel.
|
|
@@ -128,7 +136,7 @@ var MultichainSDK = class {
|
|
|
128
136
|
if (typeof networkOrChainId === "number") network = require_sdk_chain_chains.getNetworkType(networkOrChainId);
|
|
129
137
|
else network = networkOrChainId;
|
|
130
138
|
const sdk = this.#chains.get(network);
|
|
131
|
-
if (!sdk) throw new
|
|
139
|
+
if (!sdk) throw new require_sdk_core_errors.ChainNotConfiguredError(networkOrChainId);
|
|
132
140
|
return sdk;
|
|
133
141
|
}
|
|
134
142
|
/**
|
|
@@ -138,6 +146,14 @@ var MultichainSDK = class {
|
|
|
138
146
|
return this.#chains;
|
|
139
147
|
}
|
|
140
148
|
/**
|
|
149
|
+
* Shared logger, used for messages that are not attributable to a single
|
|
150
|
+
* chain. Per-chain messages should use the logger of the corresponding
|
|
151
|
+
* {@link OnchainSDK}.
|
|
152
|
+
**/
|
|
153
|
+
get logger() {
|
|
154
|
+
return this.#logger;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
141
157
|
* Sync state for all chains in parallel.
|
|
142
158
|
*
|
|
143
159
|
* @param opts - Sync options.
|
|
@@ -9,6 +9,7 @@ const require_sdk_utils_formatter = require("./utils/formatter.js");
|
|
|
9
9
|
const require_sdk_utils_toAddress = require("./utils/toAddress.js");
|
|
10
10
|
require("./utils/index.js");
|
|
11
11
|
const require_sdk_base_ChainContractsRegister = require("./base/ChainContractsRegister.js");
|
|
12
|
+
const require_sdk_core_errors = require("./core/errors.js");
|
|
12
13
|
require("./base/index.js");
|
|
13
14
|
const require_sdk_utils_viem_executeDelegatedMulticalls = require("./utils/viem/executeDelegatedMulticalls.js");
|
|
14
15
|
require("./utils/viem/index.js");
|
|
@@ -23,8 +24,9 @@ const require_sdk_accounts_withdrawal_compressor_createRedemptionLogger = requir
|
|
|
23
24
|
const require_sdk_accounts_withdrawal_compressor_createWithdrawalCompressor = require("./accounts/withdrawal-compressor/createWithdrawalCompressor.js");
|
|
24
25
|
require("./accounts/index.js");
|
|
25
26
|
const require_sdk_core_createAddressProvider = require("./core/createAddressProvider.js");
|
|
26
|
-
const require_sdk_core_errors = require("./core/errors.js");
|
|
27
27
|
require("./core/index.js");
|
|
28
|
+
const require_sdk_opportunities_OpportunitiesService = require("./opportunities/OpportunitiesService.js");
|
|
29
|
+
require("./opportunities/index.js");
|
|
28
30
|
const require_sdk_plugins_errors = require("./plugins/errors.js");
|
|
29
31
|
require("./plugins/index.js");
|
|
30
32
|
const require_sdk_pools_PoolService = require("./pools/PoolService.js");
|
|
@@ -107,6 +109,10 @@ var OnchainSDK = class extends require_sdk_base_ChainContractsRegister.ChainCont
|
|
|
107
109
|
*/
|
|
108
110
|
liquidations;
|
|
109
111
|
/**
|
|
112
|
+
* Namespace for the pool and strategy opportunities of this chain.
|
|
113
|
+
*/
|
|
114
|
+
opportunities;
|
|
115
|
+
/**
|
|
110
116
|
* @param network - Gearbox network type (e.g. `"Mainnet"`, `"Monad"`).
|
|
111
117
|
* @param clientOptions - Connection options (RPC URLs, transport, or client).
|
|
112
118
|
* @param options - SDK configuration options.
|
|
@@ -127,6 +133,7 @@ var OnchainSDK = class extends require_sdk_base_ChainContractsRegister.ChainCont
|
|
|
127
133
|
this.accounts = new require_sdk_accounts_CreditAccountsServiceV310.CreditAccountsServiceV310(this);
|
|
128
134
|
this.pools = new require_sdk_pools_PoolService.PoolService(this);
|
|
129
135
|
this.liquidations = new require_sdk_accounts_liquidations_LiquidationsService.LiquidationsService(this);
|
|
136
|
+
this.opportunities = new require_sdk_opportunities_OpportunitiesService.OpportunitiesService(this);
|
|
130
137
|
this.#withdrawalCompressor = require_sdk_accounts_withdrawal_compressor_createWithdrawalCompressor.createWithdrawalCompressor(this);
|
|
131
138
|
}
|
|
132
139
|
/**
|
|
@@ -21,7 +21,9 @@ exports.AbstractWithdrawalCompressorContract = require_sdk_accounts_withdrawal_c
|
|
|
21
21
|
exports.CreditAccountsServiceV310 = require_sdk_accounts_CreditAccountsServiceV310.CreditAccountsServiceV310;
|
|
22
22
|
exports.DELAYED_INTENT_TYPES = require_sdk_accounts_withdrawal_compressor_intent_codec.DELAYED_INTENT_TYPES;
|
|
23
23
|
exports.DELAYED_INTENT_VERSION = require_sdk_accounts_withdrawal_compressor_intent_codec.DELAYED_INTENT_VERSION;
|
|
24
|
+
exports.DUST_THRESHOLD = require_sdk_accounts_liquidations_constants.DUST_THRESHOLD;
|
|
24
25
|
exports.InvalidDelayedIntentError = require_sdk_accounts_withdrawal_compressor_errors.InvalidDelayedIntentError;
|
|
26
|
+
exports.LIQUIDATION_APPROVAL_BUFFER = require_sdk_accounts_liquidations_constants.LIQUIDATION_APPROVAL_BUFFER;
|
|
25
27
|
exports.LIQUIDATION_COMPRESSOR_V313_ADDRESS = require_sdk_accounts_liquidations_constants.LIQUIDATION_COMPRESSOR_V313_ADDRESS;
|
|
26
28
|
exports.LiquidationsService = require_sdk_accounts_liquidations_LiquidationsService.LiquidationsService;
|
|
27
29
|
exports.MultichainLiquidationsService = require_sdk_accounts_liquidations_MultichainLiquidationsService.MultichainLiquidationsService;
|