@gearbox-protocol/sdk 14.12.0-next.76 → 14.12.0-next.77
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/model/curators.js +1 -0
- package/dist/cjs/model/curators.schema.js +38 -0
- package/dist/cjs/model/index.js +4 -1
- package/dist/cjs/model/opportunities.schema.js +3 -1
- package/dist/cjs/model/primitives.schema.js +0 -9
- package/dist/cjs/sdk/chain/chains.js +1 -1
- package/dist/cjs/sdk/market/MarketConfiguratorContract.js +2 -14
- package/dist/cjs/sdk/market/MarketSuite.js +1 -0
- package/dist/esm/dev/AccountOpener.js +1 -1
- package/dist/esm/dev/withdrawalUtils.js +1 -1
- package/dist/esm/model/curators.js +1 -0
- package/dist/esm/model/curators.schema.js +36 -0
- package/dist/esm/model/index.js +4 -2
- package/dist/esm/model/opportunities.schema.js +3 -1
- package/dist/esm/model/primitives.schema.js +1 -9
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
- package/dist/esm/preview/trace/extractTransfers.js +1 -1
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +2 -2
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
- package/dist/esm/sdk/base/TokensMeta.js +2 -2
- package/dist/esm/sdk/chain/chains.js +1 -1
- package/dist/esm/sdk/chain/detectNetwork.js +1 -1
- package/dist/esm/sdk/core/createAddressProvider.js +1 -1
- package/dist/esm/sdk/market/MarketConfiguratorContract.js +2 -14
- package/dist/esm/sdk/market/MarketSuite.js +1 -0
- package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +1 -1
- package/dist/esm/sdk/market/zapper/IETHZapperContract.js +1 -1
- package/dist/esm/sdk/market/zapper/ZapperContract.js +1 -1
- package/dist/esm/sdk/pools/PoolService.js +1 -1
- package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/types/model/curators.d.ts +33 -0
- package/dist/types/model/curators.schema.d.ts +50 -0
- package/dist/types/model/index.d.ts +5 -3
- package/dist/types/model/opportunities.d.ts +6 -1
- package/dist/types/model/opportunities.schema.d.ts +160 -9
- package/dist/types/model/primitives.d.ts +1 -25
- package/dist/types/model/primitives.schema.d.ts +1 -9
- package/dist/types/sdk/chain/chains.d.ts +7 -11
- package/dist/types/sdk/chain/index.d.ts +2 -2
- package/dist/types/sdk/index.d.ts +2 -2
- package/dist/types/sdk/market/MarketConfiguratorContract.d.ts +2 -7
- package/dist/types/sdk/market/MarketSuite.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_sdk_utils_zod = require("../sdk/utils/zod.js");
|
|
3
|
+
let zod_v4 = require("zod/v4");
|
|
4
|
+
//#region src/model/curators.schema.ts
|
|
5
|
+
/**
|
|
6
|
+
* Runtime schemas for {@link ./curators.js}, see the note in
|
|
7
|
+
* `primitives.schema.ts` on why they are written by hand.
|
|
8
|
+
**/
|
|
9
|
+
/**
|
|
10
|
+
* {@link CuratorName}
|
|
11
|
+
**/
|
|
12
|
+
const curatorNameSchema = zod_v4.z.enum([
|
|
13
|
+
"Chaos Labs",
|
|
14
|
+
"K3",
|
|
15
|
+
"cp0x",
|
|
16
|
+
"Re7",
|
|
17
|
+
"Invariant Group",
|
|
18
|
+
"Tulipa",
|
|
19
|
+
"M11 Credit",
|
|
20
|
+
"KPK",
|
|
21
|
+
"Hyperithm",
|
|
22
|
+
"UltraYield",
|
|
23
|
+
"TelosC",
|
|
24
|
+
"Gami Labs",
|
|
25
|
+
"Securitize",
|
|
26
|
+
"Testnet Curator"
|
|
27
|
+
]);
|
|
28
|
+
/**
|
|
29
|
+
* {@link Curator}
|
|
30
|
+
**/
|
|
31
|
+
const curatorSchema = zod_v4.z.object({
|
|
32
|
+
address: require_sdk_utils_zod.ZodAddress(),
|
|
33
|
+
name: curatorNameSchema.optional(),
|
|
34
|
+
url: zod_v4.z.string().nullable()
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.curatorNameSchema = curatorNameSchema;
|
|
38
|
+
exports.curatorSchema = curatorSchema;
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("./curators.js");
|
|
3
|
+
const require_model_curators_schema = require("./curators.schema.js");
|
|
2
4
|
const require_model_history = require("./history.js");
|
|
3
5
|
const require_model_primitives_schema = require("./primitives.schema.js");
|
|
4
6
|
const require_model_opportunities_schema = require("./opportunities.schema.js");
|
|
@@ -18,7 +20,8 @@ exports.apyBreakdownSchema = require_model_opportunities_schema.apyBreakdownSche
|
|
|
18
20
|
exports.assetTypeSchema = require_model_primitives_schema.assetTypeSchema;
|
|
19
21
|
exports.bpsSchema = require_model_primitives_schema.bpsSchema;
|
|
20
22
|
exports.chainIdSchema = require_model_primitives_schema.chainIdSchema;
|
|
21
|
-
exports.
|
|
23
|
+
exports.curatorNameSchema = require_model_curators_schema.curatorNameSchema;
|
|
24
|
+
exports.curatorSchema = require_model_curators_schema.curatorSchema;
|
|
22
25
|
exports.delayedReceivedAssetSchema = require_model_liquidations_schema.delayedReceivedAssetSchema;
|
|
23
26
|
exports.historyChartMetadataSchema = require_model_history_schema.historyChartMetadataSchema;
|
|
24
27
|
exports.historyMetricSchema = require_model_history_schema.historyMetricSchema;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_sdk_utils_zod = require("../sdk/utils/zod.js");
|
|
3
|
+
const require_model_curators_schema = require("./curators.schema.js");
|
|
3
4
|
const require_model_primitives_schema = require("./primitives.schema.js");
|
|
4
5
|
let zod_v4 = require("zod/v4");
|
|
5
6
|
//#region src/model/opportunities.schema.ts
|
|
@@ -53,7 +54,7 @@ const apyBreakdownSchema = zod_v4.z.object({
|
|
|
53
54
|
const opportunityBaseSchema = zod_v4.z.object({
|
|
54
55
|
chainId: require_model_primitives_schema.chainIdSchema,
|
|
55
56
|
name: zod_v4.z.string(),
|
|
56
|
-
curator:
|
|
57
|
+
curator: require_model_curators_schema.curatorSchema,
|
|
57
58
|
underlyingToken: require_model_primitives_schema.tokenSchema,
|
|
58
59
|
totalBorrow: require_model_primitives_schema.amountSchema,
|
|
59
60
|
collateralTokens: zod_v4.z.array(require_model_primitives_schema.tokenSchema),
|
|
@@ -69,6 +70,7 @@ const poolOpportunitySchema = zod_v4.z.object({
|
|
|
69
70
|
kind: zod_v4.z.literal("pool"),
|
|
70
71
|
pool: require_sdk_utils_zod.ZodAddress(),
|
|
71
72
|
totalSupply: require_model_primitives_schema.amountSchema,
|
|
73
|
+
availableLiquidity: require_model_primitives_schema.amountSchema,
|
|
72
74
|
utilization: require_model_primitives_schema.bpsSchema,
|
|
73
75
|
supplyApy: apyBreakdownSchema
|
|
74
76
|
});
|
|
@@ -64,20 +64,11 @@ const txCallSchema = zod_v4.z.object({
|
|
|
64
64
|
callData: require_sdk_utils_zod.ZodHex(),
|
|
65
65
|
value: zod_v4.z.bigint().optional()
|
|
66
66
|
});
|
|
67
|
-
/**
|
|
68
|
-
* {@link Curator}
|
|
69
|
-
**/
|
|
70
|
-
const curatorSchema = zod_v4.z.object({
|
|
71
|
-
address: require_sdk_utils_zod.ZodAddress(),
|
|
72
|
-
name: zod_v4.z.string(),
|
|
73
|
-
url: zod_v4.z.string().nullable()
|
|
74
|
-
});
|
|
75
67
|
//#endregion
|
|
76
68
|
exports.amountSchema = amountSchema;
|
|
77
69
|
exports.assetTypeSchema = assetTypeSchema;
|
|
78
70
|
exports.bpsSchema = bpsSchema;
|
|
79
71
|
exports.chainIdSchema = chainIdSchema;
|
|
80
|
-
exports.curatorSchema = curatorSchema;
|
|
81
72
|
exports.leverageSchema = leverageSchema;
|
|
82
73
|
exports.timestampSchema = timestampSchema;
|
|
83
74
|
exports.tokenAmountSchema = tokenAmountSchema;
|
|
@@ -375,7 +375,7 @@ function isPublicNetwork(networkOrChainId) {
|
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
|
-
* Looks up the {@link
|
|
378
|
+
* Looks up the {@link CuratorName} name for a market configurator address.
|
|
379
379
|
*
|
|
380
380
|
* Searches default and test market configurators across all chains, or
|
|
381
381
|
* a single network if provided.
|
|
@@ -9,7 +9,6 @@ let viem = require("viem");
|
|
|
9
9
|
//#region src/sdk/market/MarketConfiguratorContract.ts
|
|
10
10
|
const abi = require_abi_310_generated.iMarketConfiguratorV310Abi;
|
|
11
11
|
var MarketConfiguratorContract = class extends require_sdk_base_BaseContract.BaseContract {
|
|
12
|
-
#curatorName;
|
|
13
12
|
constructor(options, address) {
|
|
14
13
|
super(options, {
|
|
15
14
|
abi,
|
|
@@ -18,24 +17,13 @@ var MarketConfiguratorContract = class extends require_sdk_base_BaseContract.Bas
|
|
|
18
17
|
version: 0
|
|
19
18
|
});
|
|
20
19
|
}
|
|
21
|
-
async loadCuratorName() {
|
|
22
|
-
this.#curatorName = await this.client.readContract({
|
|
23
|
-
address: this.address,
|
|
24
|
-
abi: this.abi,
|
|
25
|
-
functionName: "curatorName"
|
|
26
|
-
});
|
|
27
|
-
this.register.setAddressLabel(this.address, `Market configurator ${this.#curatorName}`);
|
|
28
|
-
}
|
|
29
20
|
/**
|
|
30
|
-
* The entity operating this configurator
|
|
31
|
-
* it. The curated per-chain table wins over the name the contract reports,
|
|
32
|
-
* because the two sources must agree across services and only the table is
|
|
33
|
-
* shared with the backend.
|
|
21
|
+
* The entity operating this configurator
|
|
34
22
|
*/
|
|
35
23
|
get curator() {
|
|
36
24
|
return {
|
|
37
25
|
address: this.address,
|
|
38
|
-
name: require_sdk_chain_chains.getCuratorName(this.address, this.networkType)
|
|
26
|
+
name: require_sdk_chain_chains.getCuratorName(this.address, this.networkType),
|
|
39
27
|
url: null
|
|
40
28
|
};
|
|
41
29
|
}
|
|
@@ -223,6 +223,7 @@ var MarketSuite = class extends require_sdk_base_SDKConstruct.SDKConstruct {
|
|
|
223
223
|
curator: this.curator,
|
|
224
224
|
underlyingToken: this.underlyingToken,
|
|
225
225
|
totalSupply: oracle.toAmount(pool.underlying, pool.totalAssets),
|
|
226
|
+
availableLiquidity: oracle.toAmount(pool.underlying, pool.availableLiquidity),
|
|
226
227
|
totalBorrow: oracle.toAmount(pool.underlying, pool.totalBorrowed),
|
|
227
228
|
utilization: pool.utilization,
|
|
228
229
|
supplyApy: { organicApy: require_sdk_market_math.rayToBps(pool.supplyRate) },
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ierc20Abi } from "../abi/iERC20.js";
|
|
2
1
|
import { iCreditFacadeV310Abi } from "../abi/310/generated.js";
|
|
3
2
|
import { AddressMap } from "../sdk/utils/AddressMap.js";
|
|
4
3
|
import { AddressSet } from "../sdk/utils/AddressSet.js";
|
|
5
4
|
import { AssetsMap } from "../sdk/utils/AssetsMap.js";
|
|
6
5
|
import { childLogger } from "../sdk/utils/childLogger.js";
|
|
6
|
+
import { ierc20Abi } from "../abi/iERC20.js";
|
|
7
7
|
import "../sdk/constants/addresses.js";
|
|
8
8
|
import { MAX_UINT256, PERCENTAGE_FACTOR } from "../sdk/constants/math.js";
|
|
9
9
|
import { SDKConstruct } from "../sdk/base/SDKConstruct.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { iWithdrawalCompressorV313Abi } from "../abi/IWithdrawalCompressorV313.js";
|
|
2
1
|
import { getNetworkType } from "../sdk/chain/chains.js";
|
|
3
2
|
import { getWithdrawalCompressorAddress } from "../sdk/accounts/withdrawal-compressor/addresses.js";
|
|
3
|
+
import { iWithdrawalCompressorV313Abi } from "../abi/IWithdrawalCompressorV313.js";
|
|
4
4
|
import "../sdk/index.js";
|
|
5
5
|
import { iMidasDataFeedAbi, iMidasRedemptionVaultAbi, midasGatewayAbi, midasRedeemerAbi, midasRedemptionVaultPhantomTokenAbi, securitizeRedeemerAbi, securitizeRedemptionGatewayAbi, securitizeRedemptionPhantomTokenAbi } from "./withdrawalAbi.js";
|
|
6
6
|
import { erc20Abi, hexToString, parseAbi, parseEther } from "viem";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ZodAddress } from "../sdk/utils/zod.js";
|
|
2
|
+
import { z } from "zod/v4";
|
|
3
|
+
//#region src/model/curators.schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* Runtime schemas for {@link ./curators.js}, see the note in
|
|
6
|
+
* `primitives.schema.ts` on why they are written by hand.
|
|
7
|
+
**/
|
|
8
|
+
/**
|
|
9
|
+
* {@link CuratorName}
|
|
10
|
+
**/
|
|
11
|
+
const curatorNameSchema = z.enum([
|
|
12
|
+
"Chaos Labs",
|
|
13
|
+
"K3",
|
|
14
|
+
"cp0x",
|
|
15
|
+
"Re7",
|
|
16
|
+
"Invariant Group",
|
|
17
|
+
"Tulipa",
|
|
18
|
+
"M11 Credit",
|
|
19
|
+
"KPK",
|
|
20
|
+
"Hyperithm",
|
|
21
|
+
"UltraYield",
|
|
22
|
+
"TelosC",
|
|
23
|
+
"Gami Labs",
|
|
24
|
+
"Securitize",
|
|
25
|
+
"Testnet Curator"
|
|
26
|
+
]);
|
|
27
|
+
/**
|
|
28
|
+
* {@link Curator}
|
|
29
|
+
**/
|
|
30
|
+
const curatorSchema = z.object({
|
|
31
|
+
address: ZodAddress(),
|
|
32
|
+
name: curatorNameSchema.optional(),
|
|
33
|
+
url: z.string().nullable()
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { curatorNameSchema, curatorSchema };
|
package/dist/esm/model/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import "./curators.js";
|
|
2
|
+
import { curatorNameSchema, curatorSchema } from "./curators.schema.js";
|
|
1
3
|
import { POOL_HISTORY_METRICS, POOL_POSITION_HISTORY_METRICS, STRATEGY_HISTORY_METRICS, STRATEGY_POSITION_HISTORY_METRICS } from "./history.js";
|
|
2
|
-
import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema,
|
|
4
|
+
import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema } from "./primitives.schema.js";
|
|
3
5
|
import { apyBreakdownSchema, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pointRewardsSchema, pointsProgramSchema, poolOpportunityDetailSchema, poolOpportunityKeySchema, poolOpportunitySchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, rewardsSchema, strategyOpportunityDetailSchema, strategyOpportunityKeySchema, strategyOpportunitySchema, tokenRewardsSchema } from "./opportunities.schema.js";
|
|
4
6
|
import { delayedReceivedAssetSchema, instantReceivedAssetSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionSchema, receivedAssetSchema } from "./liquidations.schema.js";
|
|
5
7
|
import { pnlBreakdownSchema, pointsProgramPnLSchema, pointsRewardsPnLSchema, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionKeySchema, positionKindSchema, positionSchema, rewardsPnLSchema, strategyPositionKeySchema, strategyPositionSchema, tokenRewardsPnLSchema } from "./positions.schema.js";
|
|
@@ -8,4 +10,4 @@ import { matchesLiquidatableAccountFilter } from "./liquidations.js";
|
|
|
8
10
|
import { matchesOpportunityFilter, opportunityId, poolOpportunityId, strategyOpportunityId } from "./opportunities.js";
|
|
9
11
|
import { liquidationPositionId, matchesPositionFilter, poolPositionId, positionId, strategyPositionId } from "./positions.js";
|
|
10
12
|
import "./primitives.js";
|
|
11
|
-
export { POOL_HISTORY_METRICS, POOL_POSITION_HISTORY_METRICS, STRATEGY_HISTORY_METRICS, STRATEGY_POSITION_HISTORY_METRICS, amountSchema, apyBreakdownSchema, assetTypeSchema, bpsSchema, chainIdSchema, curatorSchema, delayedReceivedAssetSchema, historyChartMetadataSchema, historyMetricSchema, historyPointSchema, historyRangeSchema, historySeriesSchema, instantReceivedAssetSchema, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityHistoryQuerySchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolHistoryMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionHistoryMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionHistoryMetricSchema, positionHistoryQuerySchema, positionId, positionKeySchema, positionKindSchema, positionSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, rewardsPnLSchema, rewardsSchema, strategyHistoryMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionHistoryMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, txCallSchema };
|
|
13
|
+
export { POOL_HISTORY_METRICS, POOL_POSITION_HISTORY_METRICS, STRATEGY_HISTORY_METRICS, STRATEGY_POSITION_HISTORY_METRICS, amountSchema, apyBreakdownSchema, assetTypeSchema, bpsSchema, chainIdSchema, curatorNameSchema, curatorSchema, delayedReceivedAssetSchema, historyChartMetadataSchema, historyMetricSchema, historyPointSchema, historyRangeSchema, historySeriesSchema, instantReceivedAssetSchema, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityHistoryQuerySchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolHistoryMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionHistoryMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionHistoryMetricSchema, positionHistoryQuerySchema, positionId, positionKeySchema, positionKindSchema, positionSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, rewardsPnLSchema, rewardsSchema, strategyHistoryMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionHistoryMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, txCallSchema };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ZodAddress } from "../sdk/utils/zod.js";
|
|
2
|
-
import {
|
|
2
|
+
import { curatorSchema } from "./curators.schema.js";
|
|
3
|
+
import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenSchema } from "./primitives.schema.js";
|
|
3
4
|
import { z } from "zod/v4";
|
|
4
5
|
//#region src/model/opportunities.schema.ts
|
|
5
6
|
/**
|
|
@@ -68,6 +69,7 @@ const poolOpportunitySchema = z.object({
|
|
|
68
69
|
kind: z.literal("pool"),
|
|
69
70
|
pool: ZodAddress(),
|
|
70
71
|
totalSupply: amountSchema,
|
|
72
|
+
availableLiquidity: amountSchema,
|
|
71
73
|
utilization: bpsSchema,
|
|
72
74
|
supplyApy: apyBreakdownSchema
|
|
73
75
|
});
|
|
@@ -63,13 +63,5 @@ const txCallSchema = z.object({
|
|
|
63
63
|
callData: ZodHex(),
|
|
64
64
|
value: z.bigint().optional()
|
|
65
65
|
});
|
|
66
|
-
/**
|
|
67
|
-
* {@link Curator}
|
|
68
|
-
**/
|
|
69
|
-
const curatorSchema = z.object({
|
|
70
|
-
address: ZodAddress(),
|
|
71
|
-
name: z.string(),
|
|
72
|
-
url: z.string().nullable()
|
|
73
|
-
});
|
|
74
66
|
//#endregion
|
|
75
|
-
export { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema,
|
|
67
|
+
export { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ierc4626AdapterAbi } from "../../../abi/ierc4626Adapter.js";
|
|
2
1
|
import { MissingSerializedParamsError } from "../../../sdk/base/errors.js";
|
|
2
|
+
import { ierc4626AdapterAbi } from "../../../abi/ierc4626Adapter.js";
|
|
3
3
|
import "../../../sdk/index.js";
|
|
4
4
|
import { fnSigToName, swapFromTransfers } from "../transferHelpers.js";
|
|
5
5
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { iZapperAbi } from "../../abi/iZapper.js";
|
|
2
1
|
import { iPoolV310Abi } from "../../abi/310/generated.js";
|
|
2
|
+
import { iZapperAbi } from "../../abi/iZapper.js";
|
|
3
3
|
import { asPreviewSimulationError } from "./errors.js";
|
|
4
4
|
//#region src/preview/simulate/simulatePoolOperation.ts
|
|
5
5
|
function previewRead(operation) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ierc20Abi } from "../../abi/iERC20.js";
|
|
2
1
|
import { iCreditFacadeV310Abi } from "../../abi/310/generated.js";
|
|
3
2
|
import { AddressMap } from "../../sdk/utils/AddressMap.js";
|
|
3
|
+
import { ierc20Abi } from "../../abi/iERC20.js";
|
|
4
4
|
import "../../sdk/index.js";
|
|
5
5
|
import { UnexpectedFacadeEventOrderError } from "./errors.js";
|
|
6
6
|
import { getAddress, isAddressEqual, parseEventLogs } from "viem";
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { iBaseRewardPoolAbi } from "../../abi/iBaseRewardPool.js";
|
|
2
|
-
import { ierc4626AdapterAbi } from "../../abi/ierc4626Adapter.js";
|
|
3
1
|
import { AP_REWARDS_COMPRESSOR } from "../constants/address-provider.js";
|
|
4
2
|
import { ADDRESS_0X0 } from "../constants/addresses.js";
|
|
5
3
|
import { MAX_UINT256 } from "../constants/math.js";
|
|
@@ -10,6 +8,8 @@ import "../base/index.js";
|
|
|
10
8
|
import { AccountBotsService } from "./bots/AccountBotsService.js";
|
|
11
9
|
import "./bots/index.js";
|
|
12
10
|
import { rewardsCompressorAbi } from "../../abi/compressors/rewardsCompressor.js";
|
|
11
|
+
import { iBaseRewardPoolAbi } from "../../abi/iBaseRewardPool.js";
|
|
12
|
+
import { ierc4626AdapterAbi } from "../../abi/ierc4626Adapter.js";
|
|
13
13
|
import { CreditAccountCompressor } from "./credit-account-compressor/CreditAccountCompressor.js";
|
|
14
14
|
import "./credit-account-compressor/index.js";
|
|
15
15
|
import { extractPriceUpdates, extractQuotaTokens, mergePriceUpdates } from "./multicall-utils.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
|
|
2
1
|
import { AddressSet } from "../../utils/AddressSet.js";
|
|
3
2
|
import { bytes32ToString } from "../../utils/bytes32ToString.js";
|
|
4
3
|
import { ADDRESS_0X0 } from "../../constants/addresses.js";
|
|
@@ -20,6 +19,7 @@ import { SecuritizeLiquidatorContract } from "../../market/rwa/securitize/Securi
|
|
|
20
19
|
import "../../market/rwa/securitize/index.js";
|
|
21
20
|
import "../../market/index.js";
|
|
22
21
|
import { LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS } from "./constants.js";
|
|
22
|
+
import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
|
|
23
23
|
//#region src/sdk/accounts/liquidations/LiquidationsService.ts
|
|
24
24
|
/**
|
|
25
25
|
* Service for discovering liquidatable credit accounts and previewing manual
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { iRedemptionLoggerV310Abi } from "../../../abi/iRedemptionLoggerV310.js";
|
|
2
1
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
3
2
|
import "../../base/index.js";
|
|
4
3
|
import { decodeDelayedIntent } from "./intent-codec.js";
|
|
4
|
+
import { iRedemptionLoggerV310Abi } from "../../../abi/iRedemptionLoggerV310.js";
|
|
5
5
|
import { InvalidDelayedIntentError } from "./errors.js";
|
|
6
6
|
//#region src/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.ts
|
|
7
7
|
const abi = iRedemptionLoggerV310Abi;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { iWithdrawalCompressorV310Abi } from "../../../abi/IWithdrawalCompressorV310.js";
|
|
2
1
|
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
|
+
import { iWithdrawalCompressorV310Abi } from "../../../abi/IWithdrawalCompressorV310.js";
|
|
3
3
|
//#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.ts
|
|
4
4
|
const abi = iWithdrawalCompressorV310Abi;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.js";
|
|
2
1
|
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
|
+
import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.js";
|
|
3
3
|
//#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.ts
|
|
4
4
|
const abi = iWithdrawalCompressorV311Abi;
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
|
|
2
1
|
import { encodeDelayedIntent } from "./intent-codec.js";
|
|
3
2
|
import { AbstractWithdrawalCompressorContract, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal } from "./AbstractWithdrawalCompressorContract.js";
|
|
3
|
+
import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
|
|
4
4
|
import { toWithdrawalStatus } from "./types.js";
|
|
5
5
|
//#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.ts
|
|
6
6
|
const abi = iWithdrawalCompressorV313Abi;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
|
|
2
|
-
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
3
1
|
import { AddressMap } from "../utils/AddressMap.js";
|
|
4
2
|
import { AddressSet } from "../utils/AddressSet.js";
|
|
5
3
|
import { bytes32ToString } from "../utils/bytes32ToString.js";
|
|
6
4
|
import { getAssetType } from "../chain/chains.js";
|
|
7
5
|
import { formatBN } from "../utils/formatter.js";
|
|
8
6
|
import "../utils/index.js";
|
|
7
|
+
import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
|
|
8
|
+
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
9
9
|
//#region src/sdk/base/TokensMeta.ts
|
|
10
10
|
/**
|
|
11
11
|
* Registry of token metadata (symbol, decimals, phantom type) keyed by address.
|
|
@@ -374,7 +374,7 @@ function isPublicNetwork(networkOrChainId) {
|
|
|
374
374
|
});
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
|
-
* Looks up the {@link
|
|
377
|
+
* Looks up the {@link CuratorName} name for a market configurator address.
|
|
378
378
|
*
|
|
379
379
|
* Searches default and test market configurators across all chains, or
|
|
380
380
|
* a single network if provided.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
2
1
|
import { AP_MARKET_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR } from "../constants/address-provider.js";
|
|
3
2
|
import { isV310 } from "../constants/versions.js";
|
|
4
3
|
import "../constants/index.js";
|
|
5
4
|
import { hexEq } from "../utils/hex.js";
|
|
5
|
+
import { iVersionAbi } from "../../abi/iVersion.js";
|
|
6
6
|
import { AddressProviderV310Contract } from "./AddressProviderV310Contract.js";
|
|
7
7
|
//#region src/sdk/core/createAddressProvider.ts
|
|
8
8
|
const OVERRIDE_ADDRESSES = { Mainnet: {
|
|
@@ -8,7 +8,6 @@ import { stringToHex } from "viem";
|
|
|
8
8
|
//#region src/sdk/market/MarketConfiguratorContract.ts
|
|
9
9
|
const abi = iMarketConfiguratorV310Abi;
|
|
10
10
|
var MarketConfiguratorContract = class extends BaseContract {
|
|
11
|
-
#curatorName;
|
|
12
11
|
constructor(options, address) {
|
|
13
12
|
super(options, {
|
|
14
13
|
abi,
|
|
@@ -17,24 +16,13 @@ var MarketConfiguratorContract = class extends BaseContract {
|
|
|
17
16
|
version: 0
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
|
-
async loadCuratorName() {
|
|
21
|
-
this.#curatorName = await this.client.readContract({
|
|
22
|
-
address: this.address,
|
|
23
|
-
abi: this.abi,
|
|
24
|
-
functionName: "curatorName"
|
|
25
|
-
});
|
|
26
|
-
this.register.setAddressLabel(this.address, `Market configurator ${this.#curatorName}`);
|
|
27
|
-
}
|
|
28
19
|
/**
|
|
29
|
-
* The entity operating this configurator
|
|
30
|
-
* it. The curated per-chain table wins over the name the contract reports,
|
|
31
|
-
* because the two sources must agree across services and only the table is
|
|
32
|
-
* shared with the backend.
|
|
20
|
+
* The entity operating this configurator
|
|
33
21
|
*/
|
|
34
22
|
get curator() {
|
|
35
23
|
return {
|
|
36
24
|
address: this.address,
|
|
37
|
-
name: getCuratorName(this.address, this.networkType)
|
|
25
|
+
name: getCuratorName(this.address, this.networkType),
|
|
38
26
|
url: null
|
|
39
27
|
};
|
|
40
28
|
}
|
|
@@ -222,6 +222,7 @@ var MarketSuite = class extends SDKConstruct {
|
|
|
222
222
|
curator: this.curator,
|
|
223
223
|
underlyingToken: this.underlyingToken,
|
|
224
224
|
totalSupply: oracle.toAmount(pool.underlying, pool.totalAssets),
|
|
225
|
+
availableLiquidity: oracle.toAmount(pool.underlying, pool.availableLiquidity),
|
|
225
226
|
totalBorrow: oracle.toAmount(pool.underlying, pool.totalBorrowed),
|
|
226
227
|
utilization: pool.utilization,
|
|
227
228
|
supplyApy: { organicApy: rayToBps(pool.supplyRate) },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
2
1
|
import { iCreditFacadeMulticallV310Abi, iCreditFacadeV310Abi } from "../../../abi/310/generated.js";
|
|
3
2
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
4
3
|
import "../../base/index.js";
|
|
4
|
+
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
5
5
|
//#region src/sdk/market/credit/CreditFacadeV310BaseContract.ts
|
|
6
6
|
const abi = [
|
|
7
7
|
...iCreditFacadeV310Abi,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
2
1
|
import { iPoolV310Abi } from "../../../abi/310/generated.js";
|
|
3
2
|
import { AddressMap } from "../../utils/AddressMap.js";
|
|
4
3
|
import { RAY } from "../../constants/math.js";
|
|
@@ -7,6 +6,7 @@ import { formatBN, formatBNvalue, percentFmt } from "../../utils/formatter.js";
|
|
|
7
6
|
import "../../utils/index.js";
|
|
8
7
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
9
8
|
import "../../base/index.js";
|
|
9
|
+
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
10
10
|
import { utilizationBps } from "../math.js";
|
|
11
11
|
//#region src/sdk/market/pool/PoolV310Contract.ts
|
|
12
12
|
const abi = [...iPoolV310Abi, ...iPausableAbi];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { iethZapperAbi } from "../../../abi/iETHZapper.js";
|
|
2
1
|
import { ZapperContract } from "./ZapperContract.js";
|
|
2
|
+
import { iethZapperAbi } from "../../../abi/iETHZapper.js";
|
|
3
3
|
//#region src/sdk/market/zapper/IETHZapperContract.ts
|
|
4
4
|
const abi = iethZapperAbi;
|
|
5
5
|
var IETHZapperContract = class extends ZapperContract {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { iZapperAbi } from "../../../abi/iZapper.js";
|
|
2
1
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
3
2
|
import "../../base/index.js";
|
|
3
|
+
import { iZapperAbi } from "../../../abi/iZapper.js";
|
|
4
4
|
import { UnsupportedZapperFunctionError } from "./errors.js";
|
|
5
5
|
//#region src/sdk/market/zapper/ZapperContract.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ierc20Abi } from "../../abi/iERC20.js";
|
|
2
1
|
import { AddressSet } from "../utils/AddressSet.js";
|
|
2
|
+
import { ierc20Abi } from "../../abi/iERC20.js";
|
|
3
3
|
import "../constants/addresses.js";
|
|
4
4
|
import { RAY } from "../constants/math.js";
|
|
5
5
|
import "../constants/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { errorAbis } from "../../../abi/errors.js";
|
|
2
|
-
import { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.js";
|
|
3
2
|
import { generateCastTraceCall } from "./cast.js";
|
|
3
|
+
import { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.js";
|
|
4
4
|
import { simulateMulticall } from "./simulateMulticall.js";
|
|
5
5
|
import { BaseError, CallExecutionError, ContractFunctionRevertedError, decodeFunctionData, decodeFunctionResult, encodeFunctionData, parseAbi } from "viem";
|
|
6
6
|
import { getAction, parseAccount } from "viem/utils";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
//#region src/model/curators.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Known curator names that manage Gearbox markets.
|
|
5
|
+
**/
|
|
6
|
+
type CuratorName = "Chaos Labs" | "K3" | "cp0x" | "Re7" | "Invariant Group" | "Tulipa" | "M11 Credit" | "KPK" | "Hyperithm" | "UltraYield" | "TelosC" | "Gami Labs" | "Securitize" | "Testnet Curator";
|
|
7
|
+
/**
|
|
8
|
+
* The entity that curates a market: sets risk parameters, picks collateral and
|
|
9
|
+
* operates the market configurator.
|
|
10
|
+
**/
|
|
11
|
+
interface Curator {
|
|
12
|
+
/**
|
|
13
|
+
* Address of the market configurator the curator operates. This is the
|
|
14
|
+
* on-chain identity of a curator, not a personal wallet.
|
|
15
|
+
**/
|
|
16
|
+
address: Address;
|
|
17
|
+
/**
|
|
18
|
+
* Display name from the curated per-chain table, or `undefined` when the
|
|
19
|
+
* market configurator is not a well-known curator.
|
|
20
|
+
*
|
|
21
|
+
* @example `"Chaos Labs"`
|
|
22
|
+
**/
|
|
23
|
+
name?: CuratorName;
|
|
24
|
+
/**
|
|
25
|
+
* Link to the curator's page, or `null` when unknown. The chain knows no
|
|
26
|
+
* URLs, so this is `null` for anything served from the on-chain source.
|
|
27
|
+
*
|
|
28
|
+
* @mode offchain
|
|
29
|
+
**/
|
|
30
|
+
url: string | null;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Curator, CuratorName };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
//#region src/model/curators.schema.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Runtime schemas for {@link ./curators.js}, see the note in
|
|
5
|
+
* `primitives.schema.ts` on why they are written by hand.
|
|
6
|
+
**/
|
|
7
|
+
/**
|
|
8
|
+
* {@link CuratorName}
|
|
9
|
+
**/
|
|
10
|
+
declare const curatorNameSchema: z.ZodEnum<{
|
|
11
|
+
"Chaos Labs": "Chaos Labs";
|
|
12
|
+
"Gami Labs": "Gami Labs";
|
|
13
|
+
Hyperithm: "Hyperithm";
|
|
14
|
+
"Invariant Group": "Invariant Group";
|
|
15
|
+
K3: "K3";
|
|
16
|
+
KPK: "KPK";
|
|
17
|
+
"M11 Credit": "M11 Credit";
|
|
18
|
+
Re7: "Re7";
|
|
19
|
+
Securitize: "Securitize";
|
|
20
|
+
TelosC: "TelosC";
|
|
21
|
+
"Testnet Curator": "Testnet Curator";
|
|
22
|
+
Tulipa: "Tulipa";
|
|
23
|
+
UltraYield: "UltraYield";
|
|
24
|
+
cp0x: "cp0x";
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* {@link Curator}
|
|
28
|
+
**/
|
|
29
|
+
declare const curatorSchema: z.ZodObject<{
|
|
30
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
31
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
"Chaos Labs": "Chaos Labs";
|
|
33
|
+
"Gami Labs": "Gami Labs";
|
|
34
|
+
Hyperithm: "Hyperithm";
|
|
35
|
+
"Invariant Group": "Invariant Group";
|
|
36
|
+
K3: "K3";
|
|
37
|
+
KPK: "KPK";
|
|
38
|
+
"M11 Credit": "M11 Credit";
|
|
39
|
+
Re7: "Re7";
|
|
40
|
+
Securitize: "Securitize";
|
|
41
|
+
TelosC: "TelosC";
|
|
42
|
+
"Testnet Curator": "Testnet Curator";
|
|
43
|
+
Tulipa: "Tulipa";
|
|
44
|
+
UltraYield: "UltraYield";
|
|
45
|
+
cp0x: "cp0x";
|
|
46
|
+
}>>;
|
|
47
|
+
url: z.ZodNullable<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { curatorNameSchema, curatorSchema };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Curator, CuratorName } from "./curators.js";
|
|
2
|
+
import { Amount, AssetType, Bps, ChainId, Leverage, Timestamp, Token, TokenAmount, TxCall } from "./primitives.js";
|
|
3
|
+
import { curatorNameSchema, curatorSchema } from "./curators.schema.js";
|
|
2
4
|
import { ApyBreakdown, Opportunity, OpportunityBase, OpportunityDetail, OpportunityFilter, OpportunityId, OpportunityKey, OpportunityKind, PointRewards, PointsProgram, PoolOpportunity, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, Rewards, StrategyOpportunity, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, TokenRewards, matchesOpportunityFilter, opportunityId, poolOpportunityId, strategyOpportunityId } from "./opportunities.js";
|
|
3
5
|
import { DelayedReceivedAsset, InstantReceivedAsset, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, ReceivedAsset, matchesLiquidatableAccountFilter } from "./liquidations.js";
|
|
4
6
|
import { PnlBreakdown, PointsProgramPnL, PointsRewardsPnL, PoolPosition, PoolPositionKey, PoolPositionRef, Position, PositionCollateral, PositionFilter, PositionId, PositionKey, PositionKind, RewardsPnL, StrategyPosition, StrategyPositionKey, StrategyPositionRef, TokenRewardsPnL, liquidationPositionId, matchesPositionFilter, poolPositionId, positionId, strategyPositionId } from "./positions.js";
|
|
@@ -7,5 +9,5 @@ import { historyChartMetadataSchema, historyMetricSchema, historyPointSchema, hi
|
|
|
7
9
|
import { delayedReceivedAssetSchema, instantReceivedAssetSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionSchema, receivedAssetSchema } from "./liquidations.schema.js";
|
|
8
10
|
import { apyBreakdownSchema, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pointRewardsSchema, pointsProgramSchema, poolOpportunityDetailSchema, poolOpportunityKeySchema, poolOpportunitySchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, rewardsSchema, strategyOpportunityDetailSchema, strategyOpportunityKeySchema, strategyOpportunitySchema, tokenRewardsSchema } from "./opportunities.schema.js";
|
|
9
11
|
import { pnlBreakdownSchema, pointsProgramPnLSchema, pointsRewardsPnLSchema, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionKeySchema, positionKindSchema, positionSchema, rewardsPnLSchema, strategyPositionKeySchema, strategyPositionSchema, tokenRewardsPnLSchema } from "./positions.schema.js";
|
|
10
|
-
import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema,
|
|
11
|
-
export { Amount, ApyBreakdown, AssetType, Bps, ChainId, Curator, DelayedReceivedAsset, HistoryChartMetadata, HistoryMetric, HistoryPoint, HistoryRange, HistorySeries, InstantReceivedAsset, Leverage, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, Opportunity, OpportunityBase, OpportunityDetail, OpportunityFilter, OpportunityHistoryQuery, OpportunityId, OpportunityKey, OpportunityKind, POOL_HISTORY_METRICS, POOL_POSITION_HISTORY_METRICS, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsRewardsPnL, PoolHistoryMetric, PoolOpportunity, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPosition, PoolPositionHistoryMetric, PoolPositionKey, PoolPositionRef, Position, PositionCollateral, PositionFilter, PositionHistoryMetric, PositionHistoryQuery, PositionId, PositionKey, PositionKind, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, ReceivedAsset, Rewards, RewardsPnL, STRATEGY_HISTORY_METRICS, STRATEGY_POSITION_HISTORY_METRICS, StrategyHistoryMetric, StrategyOpportunity, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionHistoryMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenRewards, TokenRewardsPnL, TxCall, amountSchema, apyBreakdownSchema, assetTypeSchema, bpsSchema, chainIdSchema, curatorSchema, delayedReceivedAssetSchema, historyChartMetadataSchema, historyMetricSchema, historyPointSchema, historyRangeSchema, historySeriesSchema, instantReceivedAssetSchema, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityHistoryQuerySchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolHistoryMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionHistoryMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionHistoryMetricSchema, positionHistoryQuerySchema, positionId, positionKeySchema, positionKindSchema, positionSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, rewardsPnLSchema, rewardsSchema, strategyHistoryMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionHistoryMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, txCallSchema };
|
|
12
|
+
import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema } from "./primitives.schema.js";
|
|
13
|
+
export { Amount, ApyBreakdown, AssetType, Bps, ChainId, Curator, CuratorName, DelayedReceivedAsset, HistoryChartMetadata, HistoryMetric, HistoryPoint, HistoryRange, HistorySeries, InstantReceivedAsset, Leverage, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, Opportunity, OpportunityBase, OpportunityDetail, OpportunityFilter, OpportunityHistoryQuery, OpportunityId, OpportunityKey, OpportunityKind, POOL_HISTORY_METRICS, POOL_POSITION_HISTORY_METRICS, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsRewardsPnL, PoolHistoryMetric, PoolOpportunity, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPosition, PoolPositionHistoryMetric, PoolPositionKey, PoolPositionRef, Position, PositionCollateral, PositionFilter, PositionHistoryMetric, PositionHistoryQuery, PositionId, PositionKey, PositionKind, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, ReceivedAsset, Rewards, RewardsPnL, STRATEGY_HISTORY_METRICS, STRATEGY_POSITION_HISTORY_METRICS, StrategyHistoryMetric, StrategyOpportunity, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionHistoryMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenRewards, TokenRewardsPnL, TxCall, amountSchema, apyBreakdownSchema, assetTypeSchema, bpsSchema, chainIdSchema, curatorNameSchema, curatorSchema, delayedReceivedAssetSchema, historyChartMetadataSchema, historyMetricSchema, historyPointSchema, historyRangeSchema, historySeriesSchema, instantReceivedAssetSchema, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityHistoryQuerySchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolHistoryMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionHistoryMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionHistoryMetricSchema, positionHistoryQuerySchema, positionId, positionKeySchema, positionKindSchema, positionSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, rewardsPnLSchema, rewardsSchema, strategyHistoryMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionHistoryMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, txCallSchema };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Curator } from "./curators.js";
|
|
2
|
+
import { Amount, AssetType, Bps, ChainId, Leverage, Timestamp, Token } from "./primitives.js";
|
|
2
3
|
import { Address } from "viem";
|
|
3
4
|
//#region src/model/opportunities.d.ts
|
|
4
5
|
/**
|
|
@@ -178,6 +179,10 @@ interface PoolOpportunity extends OpportunityBase {
|
|
|
178
179
|
* {@link OpportunityBase.totalBorrow}.
|
|
179
180
|
**/
|
|
180
181
|
totalSupply: Amount;
|
|
182
|
+
/**
|
|
183
|
+
* Pool available liquidity. Denominated in the underlying.
|
|
184
|
+
**/
|
|
185
|
+
availableLiquidity: Amount;
|
|
181
186
|
/**
|
|
182
187
|
* How much of the pool's capital is currently borrowed, in basis points.
|
|
183
188
|
*
|
|
@@ -101,7 +101,22 @@ declare const opportunityBaseSchema: z.ZodObject<{
|
|
|
101
101
|
name: z.ZodString;
|
|
102
102
|
curator: z.ZodObject<{
|
|
103
103
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
104
|
-
name: z.
|
|
104
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
"Chaos Labs": "Chaos Labs";
|
|
106
|
+
"Gami Labs": "Gami Labs";
|
|
107
|
+
Hyperithm: "Hyperithm";
|
|
108
|
+
"Invariant Group": "Invariant Group";
|
|
109
|
+
K3: "K3";
|
|
110
|
+
KPK: "KPK";
|
|
111
|
+
"M11 Credit": "M11 Credit";
|
|
112
|
+
Re7: "Re7";
|
|
113
|
+
Securitize: "Securitize";
|
|
114
|
+
TelosC: "TelosC";
|
|
115
|
+
"Testnet Curator": "Testnet Curator";
|
|
116
|
+
Tulipa: "Tulipa";
|
|
117
|
+
UltraYield: "UltraYield";
|
|
118
|
+
cp0x: "cp0x";
|
|
119
|
+
}>>;
|
|
105
120
|
url: z.ZodNullable<z.ZodString>;
|
|
106
121
|
}, z.core.$strip>;
|
|
107
122
|
underlyingToken: z.ZodObject<{
|
|
@@ -136,7 +151,22 @@ declare const poolOpportunitySchema: z.ZodObject<{
|
|
|
136
151
|
name: z.ZodString;
|
|
137
152
|
curator: z.ZodObject<{
|
|
138
153
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
139
|
-
name: z.
|
|
154
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
"Chaos Labs": "Chaos Labs";
|
|
156
|
+
"Gami Labs": "Gami Labs";
|
|
157
|
+
Hyperithm: "Hyperithm";
|
|
158
|
+
"Invariant Group": "Invariant Group";
|
|
159
|
+
K3: "K3";
|
|
160
|
+
KPK: "KPK";
|
|
161
|
+
"M11 Credit": "M11 Credit";
|
|
162
|
+
Re7: "Re7";
|
|
163
|
+
Securitize: "Securitize";
|
|
164
|
+
TelosC: "TelosC";
|
|
165
|
+
"Testnet Curator": "Testnet Curator";
|
|
166
|
+
Tulipa: "Tulipa";
|
|
167
|
+
UltraYield: "UltraYield";
|
|
168
|
+
cp0x: "cp0x";
|
|
169
|
+
}>>;
|
|
140
170
|
url: z.ZodNullable<z.ZodString>;
|
|
141
171
|
}, z.core.$strip>;
|
|
142
172
|
underlyingToken: z.ZodObject<{
|
|
@@ -168,6 +198,10 @@ declare const poolOpportunitySchema: z.ZodObject<{
|
|
|
168
198
|
value: z.ZodBigInt;
|
|
169
199
|
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
170
200
|
}, z.core.$strip>;
|
|
201
|
+
availableLiquidity: z.ZodObject<{
|
|
202
|
+
value: z.ZodBigInt;
|
|
203
|
+
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
204
|
+
}, z.core.$strip>;
|
|
171
205
|
utilization: z.ZodNumber;
|
|
172
206
|
supplyApy: z.ZodObject<{
|
|
173
207
|
totalApy: z.ZodOptional<z.ZodNumber>;
|
|
@@ -202,7 +236,22 @@ declare const strategyOpportunitySchema: z.ZodObject<{
|
|
|
202
236
|
name: z.ZodString;
|
|
203
237
|
curator: z.ZodObject<{
|
|
204
238
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
205
|
-
name: z.
|
|
239
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
"Chaos Labs": "Chaos Labs";
|
|
241
|
+
"Gami Labs": "Gami Labs";
|
|
242
|
+
Hyperithm: "Hyperithm";
|
|
243
|
+
"Invariant Group": "Invariant Group";
|
|
244
|
+
K3: "K3";
|
|
245
|
+
KPK: "KPK";
|
|
246
|
+
"M11 Credit": "M11 Credit";
|
|
247
|
+
Re7: "Re7";
|
|
248
|
+
Securitize: "Securitize";
|
|
249
|
+
TelosC: "TelosC";
|
|
250
|
+
"Testnet Curator": "Testnet Curator";
|
|
251
|
+
Tulipa: "Tulipa";
|
|
252
|
+
UltraYield: "UltraYield";
|
|
253
|
+
cp0x: "cp0x";
|
|
254
|
+
}>>;
|
|
206
255
|
url: z.ZodNullable<z.ZodString>;
|
|
207
256
|
}, z.core.$strip>;
|
|
208
257
|
underlyingToken: z.ZodObject<{
|
|
@@ -311,7 +360,22 @@ declare const opportunitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
311
360
|
name: z.ZodString;
|
|
312
361
|
curator: z.ZodObject<{
|
|
313
362
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
314
|
-
name: z.
|
|
363
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
"Chaos Labs": "Chaos Labs";
|
|
365
|
+
"Gami Labs": "Gami Labs";
|
|
366
|
+
Hyperithm: "Hyperithm";
|
|
367
|
+
"Invariant Group": "Invariant Group";
|
|
368
|
+
K3: "K3";
|
|
369
|
+
KPK: "KPK";
|
|
370
|
+
"M11 Credit": "M11 Credit";
|
|
371
|
+
Re7: "Re7";
|
|
372
|
+
Securitize: "Securitize";
|
|
373
|
+
TelosC: "TelosC";
|
|
374
|
+
"Testnet Curator": "Testnet Curator";
|
|
375
|
+
Tulipa: "Tulipa";
|
|
376
|
+
UltraYield: "UltraYield";
|
|
377
|
+
cp0x: "cp0x";
|
|
378
|
+
}>>;
|
|
315
379
|
url: z.ZodNullable<z.ZodString>;
|
|
316
380
|
}, z.core.$strip>;
|
|
317
381
|
underlyingToken: z.ZodObject<{
|
|
@@ -343,6 +407,10 @@ declare const opportunitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
343
407
|
value: z.ZodBigInt;
|
|
344
408
|
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
345
409
|
}, z.core.$strip>;
|
|
410
|
+
availableLiquidity: z.ZodObject<{
|
|
411
|
+
value: z.ZodBigInt;
|
|
412
|
+
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
413
|
+
}, z.core.$strip>;
|
|
346
414
|
utilization: z.ZodNumber;
|
|
347
415
|
supplyApy: z.ZodObject<{
|
|
348
416
|
totalApy: z.ZodOptional<z.ZodNumber>;
|
|
@@ -373,7 +441,22 @@ declare const opportunitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
373
441
|
name: z.ZodString;
|
|
374
442
|
curator: z.ZodObject<{
|
|
375
443
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
376
|
-
name: z.
|
|
444
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
445
|
+
"Chaos Labs": "Chaos Labs";
|
|
446
|
+
"Gami Labs": "Gami Labs";
|
|
447
|
+
Hyperithm: "Hyperithm";
|
|
448
|
+
"Invariant Group": "Invariant Group";
|
|
449
|
+
K3: "K3";
|
|
450
|
+
KPK: "KPK";
|
|
451
|
+
"M11 Credit": "M11 Credit";
|
|
452
|
+
Re7: "Re7";
|
|
453
|
+
Securitize: "Securitize";
|
|
454
|
+
TelosC: "TelosC";
|
|
455
|
+
"Testnet Curator": "Testnet Curator";
|
|
456
|
+
Tulipa: "Tulipa";
|
|
457
|
+
UltraYield: "UltraYield";
|
|
458
|
+
cp0x: "cp0x";
|
|
459
|
+
}>>;
|
|
377
460
|
url: z.ZodNullable<z.ZodString>;
|
|
378
461
|
}, z.core.$strip>;
|
|
379
462
|
underlyingToken: z.ZodObject<{
|
|
@@ -563,7 +646,22 @@ declare const poolOpportunityDetailSchema: z.ZodObject<{
|
|
|
563
646
|
name: z.ZodString;
|
|
564
647
|
curator: z.ZodObject<{
|
|
565
648
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
566
|
-
name: z.
|
|
649
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
650
|
+
"Chaos Labs": "Chaos Labs";
|
|
651
|
+
"Gami Labs": "Gami Labs";
|
|
652
|
+
Hyperithm: "Hyperithm";
|
|
653
|
+
"Invariant Group": "Invariant Group";
|
|
654
|
+
K3: "K3";
|
|
655
|
+
KPK: "KPK";
|
|
656
|
+
"M11 Credit": "M11 Credit";
|
|
657
|
+
Re7: "Re7";
|
|
658
|
+
Securitize: "Securitize";
|
|
659
|
+
TelosC: "TelosC";
|
|
660
|
+
"Testnet Curator": "Testnet Curator";
|
|
661
|
+
Tulipa: "Tulipa";
|
|
662
|
+
UltraYield: "UltraYield";
|
|
663
|
+
cp0x: "cp0x";
|
|
664
|
+
}>>;
|
|
567
665
|
url: z.ZodNullable<z.ZodString>;
|
|
568
666
|
}, z.core.$strip>;
|
|
569
667
|
underlyingToken: z.ZodObject<{
|
|
@@ -595,6 +693,10 @@ declare const poolOpportunityDetailSchema: z.ZodObject<{
|
|
|
595
693
|
value: z.ZodBigInt;
|
|
596
694
|
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
597
695
|
}, z.core.$strip>;
|
|
696
|
+
availableLiquidity: z.ZodObject<{
|
|
697
|
+
value: z.ZodBigInt;
|
|
698
|
+
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
699
|
+
}, z.core.$strip>;
|
|
598
700
|
utilization: z.ZodNumber;
|
|
599
701
|
supplyApy: z.ZodObject<{
|
|
600
702
|
totalApy: z.ZodOptional<z.ZodNumber>;
|
|
@@ -656,7 +758,22 @@ declare const strategyOpportunityDetailSchema: z.ZodObject<{
|
|
|
656
758
|
name: z.ZodString;
|
|
657
759
|
curator: z.ZodObject<{
|
|
658
760
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
659
|
-
name: z.
|
|
761
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
762
|
+
"Chaos Labs": "Chaos Labs";
|
|
763
|
+
"Gami Labs": "Gami Labs";
|
|
764
|
+
Hyperithm: "Hyperithm";
|
|
765
|
+
"Invariant Group": "Invariant Group";
|
|
766
|
+
K3: "K3";
|
|
767
|
+
KPK: "KPK";
|
|
768
|
+
"M11 Credit": "M11 Credit";
|
|
769
|
+
Re7: "Re7";
|
|
770
|
+
Securitize: "Securitize";
|
|
771
|
+
TelosC: "TelosC";
|
|
772
|
+
"Testnet Curator": "Testnet Curator";
|
|
773
|
+
Tulipa: "Tulipa";
|
|
774
|
+
UltraYield: "UltraYield";
|
|
775
|
+
cp0x: "cp0x";
|
|
776
|
+
}>>;
|
|
660
777
|
url: z.ZodNullable<z.ZodString>;
|
|
661
778
|
}, z.core.$strip>;
|
|
662
779
|
underlyingToken: z.ZodObject<{
|
|
@@ -790,7 +907,22 @@ declare const opportunityDetailSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
790
907
|
name: z.ZodString;
|
|
791
908
|
curator: z.ZodObject<{
|
|
792
909
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
793
|
-
name: z.
|
|
910
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
911
|
+
"Chaos Labs": "Chaos Labs";
|
|
912
|
+
"Gami Labs": "Gami Labs";
|
|
913
|
+
Hyperithm: "Hyperithm";
|
|
914
|
+
"Invariant Group": "Invariant Group";
|
|
915
|
+
K3: "K3";
|
|
916
|
+
KPK: "KPK";
|
|
917
|
+
"M11 Credit": "M11 Credit";
|
|
918
|
+
Re7: "Re7";
|
|
919
|
+
Securitize: "Securitize";
|
|
920
|
+
TelosC: "TelosC";
|
|
921
|
+
"Testnet Curator": "Testnet Curator";
|
|
922
|
+
Tulipa: "Tulipa";
|
|
923
|
+
UltraYield: "UltraYield";
|
|
924
|
+
cp0x: "cp0x";
|
|
925
|
+
}>>;
|
|
794
926
|
url: z.ZodNullable<z.ZodString>;
|
|
795
927
|
}, z.core.$strip>;
|
|
796
928
|
underlyingToken: z.ZodObject<{
|
|
@@ -822,6 +954,10 @@ declare const opportunityDetailSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
822
954
|
value: z.ZodBigInt;
|
|
823
955
|
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
824
956
|
}, z.core.$strip>;
|
|
957
|
+
availableLiquidity: z.ZodObject<{
|
|
958
|
+
value: z.ZodBigInt;
|
|
959
|
+
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
960
|
+
}, z.core.$strip>;
|
|
825
961
|
utilization: z.ZodNumber;
|
|
826
962
|
supplyApy: z.ZodObject<{
|
|
827
963
|
totalApy: z.ZodOptional<z.ZodNumber>;
|
|
@@ -879,7 +1015,22 @@ declare const opportunityDetailSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
879
1015
|
name: z.ZodString;
|
|
880
1016
|
curator: z.ZodObject<{
|
|
881
1017
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
882
|
-
name: z.
|
|
1018
|
+
name: z.ZodOptional<z.ZodEnum<{
|
|
1019
|
+
"Chaos Labs": "Chaos Labs";
|
|
1020
|
+
"Gami Labs": "Gami Labs";
|
|
1021
|
+
Hyperithm: "Hyperithm";
|
|
1022
|
+
"Invariant Group": "Invariant Group";
|
|
1023
|
+
K3: "K3";
|
|
1024
|
+
KPK: "KPK";
|
|
1025
|
+
"M11 Credit": "M11 Credit";
|
|
1026
|
+
Re7: "Re7";
|
|
1027
|
+
Securitize: "Securitize";
|
|
1028
|
+
TelosC: "TelosC";
|
|
1029
|
+
"Testnet Curator": "Testnet Curator";
|
|
1030
|
+
Tulipa: "Tulipa";
|
|
1031
|
+
UltraYield: "UltraYield";
|
|
1032
|
+
cp0x: "cp0x";
|
|
1033
|
+
}>>;
|
|
883
1034
|
url: z.ZodNullable<z.ZodString>;
|
|
884
1035
|
}, z.core.$strip>;
|
|
885
1036
|
underlyingToken: z.ZodObject<{
|
|
@@ -166,29 +166,5 @@ interface TxCall {
|
|
|
166
166
|
**/
|
|
167
167
|
value?: bigint;
|
|
168
168
|
}
|
|
169
|
-
/**
|
|
170
|
-
* The entity that curates a market: sets risk parameters, picks collateral and
|
|
171
|
-
* operates the market configurator.
|
|
172
|
-
**/
|
|
173
|
-
interface Curator {
|
|
174
|
-
/**
|
|
175
|
-
* Address of the market configurator the curator operates. This is the
|
|
176
|
-
* on-chain identity of a curator, not a personal wallet.
|
|
177
|
-
**/
|
|
178
|
-
address: Address;
|
|
179
|
-
/**
|
|
180
|
-
* Display name.
|
|
181
|
-
*
|
|
182
|
-
* @example `"Chaos Labs"`
|
|
183
|
-
**/
|
|
184
|
-
name: string;
|
|
185
|
-
/**
|
|
186
|
-
* Link to the curator's page, or `null` when unknown. The chain knows no
|
|
187
|
-
* URLs, so this is `null` for anything served from the on-chain source.
|
|
188
|
-
*
|
|
189
|
-
* @mode offchain
|
|
190
|
-
**/
|
|
191
|
-
url: string | null;
|
|
192
|
-
}
|
|
193
169
|
//#endregion
|
|
194
|
-
export { Amount, AssetType, Bps, ChainId,
|
|
170
|
+
export { Amount, AssetType, Bps, ChainId, Leverage, Timestamp, Token, TokenAmount, TxCall };
|
|
@@ -69,13 +69,5 @@ declare const txCallSchema: z.ZodObject<{
|
|
|
69
69
|
callData: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
70
70
|
value: z.ZodOptional<z.ZodBigInt>;
|
|
71
71
|
}, z.core.$strip>;
|
|
72
|
-
/**
|
|
73
|
-
* {@link Curator}
|
|
74
|
-
**/
|
|
75
|
-
declare const curatorSchema: z.ZodObject<{
|
|
76
|
-
address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
77
|
-
name: z.ZodString;
|
|
78
|
-
url: z.ZodNullable<z.ZodString>;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
72
|
//#endregion
|
|
81
|
-
export { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema,
|
|
73
|
+
export { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema };
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
+
import { CuratorName } from "../../model/curators.js";
|
|
1
2
|
import { AssetType } from "../../model/primitives.js";
|
|
2
3
|
import { Address, Chain } from "viem";
|
|
3
4
|
import { z } from "zod/v4";
|
|
4
5
|
//#region src/sdk/chain/chains.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Known curator names that manage Gearbox markets.
|
|
7
|
-
*
|
|
8
|
-
**/
|
|
9
|
-
type Curator = "Chaos Labs" | "K3" | "cp0x" | "Re7" | "Invariant Group" | "Tulipa" | "M11 Credit" | "KPK" | "Hyperithm" | "UltraYield" | "TelosC" | "Gami Labs" | "Securitize" | "Testnet Curator";
|
|
10
6
|
/**
|
|
11
7
|
* One strategy of the sunset list, identified the same way a strategy
|
|
12
8
|
* opportunity is: the credit manager plus the collateral it is built around.
|
|
@@ -29,7 +25,7 @@ interface GearboxChain extends Chain {
|
|
|
29
25
|
/**
|
|
30
26
|
* Market configurator addresses operated by known curators on this chain.
|
|
31
27
|
**/
|
|
32
|
-
defaultMarketConfigurators: Record<Address,
|
|
28
|
+
defaultMarketConfigurators: Record<Address, CuratorName>;
|
|
33
29
|
/**
|
|
34
30
|
* Known RWA factory addresses on this chain
|
|
35
31
|
*/
|
|
@@ -37,7 +33,7 @@ interface GearboxChain extends Chain {
|
|
|
37
33
|
/**
|
|
38
34
|
* Market configurators used in test/staging environments.
|
|
39
35
|
**/
|
|
40
|
-
testMarketConfigurators?: Record<Address,
|
|
36
|
+
testMarketConfigurators?: Record<Address, CuratorName>;
|
|
41
37
|
/**
|
|
42
38
|
* Denomination class of the market underlyings on this chain.
|
|
43
39
|
*
|
|
@@ -145,7 +141,7 @@ declare function isSupportedNetwork(chainId: number | undefined): chainId is num
|
|
|
145
141
|
**/
|
|
146
142
|
declare function isPublicNetwork(networkOrChainId: NetworkType | number | bigint): boolean;
|
|
147
143
|
/**
|
|
148
|
-
* Looks up the {@link
|
|
144
|
+
* Looks up the {@link CuratorName} name for a market configurator address.
|
|
149
145
|
*
|
|
150
146
|
* Searches default and test market configurators across all chains, or
|
|
151
147
|
* a single network if provided.
|
|
@@ -154,7 +150,7 @@ declare function isPublicNetwork(networkOrChainId: NetworkType | number | bigint
|
|
|
154
150
|
* @param network - Optional network to restrict the search to.
|
|
155
151
|
* @returns The curator name, or `undefined` if not found.
|
|
156
152
|
**/
|
|
157
|
-
declare function getCuratorName(marketConfigurator: Address, network?: NetworkType):
|
|
153
|
+
declare function getCuratorName(marketConfigurator: Address, network?: NetworkType): CuratorName | undefined;
|
|
158
154
|
/**
|
|
159
155
|
* Finds the market configurator address for a given curator on a network.
|
|
160
156
|
*
|
|
@@ -163,7 +159,7 @@ declare function getCuratorName(marketConfigurator: Address, network?: NetworkTy
|
|
|
163
159
|
* @returns The market configurator address, or `undefined` if the curator
|
|
164
160
|
* has no configurator on this network.
|
|
165
161
|
**/
|
|
166
|
-
declare function findCuratorMarketConfigurator(curator:
|
|
162
|
+
declare function findCuratorMarketConfigurator(curator: CuratorName, network: NetworkType): Address | undefined;
|
|
167
163
|
/**
|
|
168
164
|
* Looks up the {@link AssetType} of a token in hardcoded classifier.
|
|
169
165
|
* Not all tokens are classified, only underlyings, so the default answer is `undefined`.
|
|
@@ -199,4 +195,4 @@ declare function isSunsetPool(pool: Address, network: NetworkType): boolean;
|
|
|
199
195
|
**/
|
|
200
196
|
declare function isSunsetStrategy(creditManager: Address, collateral: Address, network: NetworkType): boolean;
|
|
201
197
|
//#endregion
|
|
202
|
-
export {
|
|
198
|
+
export { GearboxChain, NetworkType, SUPPORTED_NETWORKS, SunsetStrategy, chains, findCuratorMarketConfigurator, getAssetType, getChain, getCuratorName, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GearboxChain, NetworkType, SUPPORTED_NETWORKS, SunsetStrategy, chains, findCuratorMarketConfigurator, getAssetType, getChain, getCuratorName, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork } from "./chains.js";
|
|
2
2
|
import { detectNetwork } from "./detectNetwork.js";
|
|
3
|
-
export {
|
|
3
|
+
export { GearboxChain, NetworkType, SUPPORTED_NETWORKS, SunsetStrategy, chains, detectNetwork, findCuratorMarketConfigurator, getAssetType, getChain, getCuratorName, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ILogger, LogFn } from "./types/logger.js";
|
|
2
|
-
import {
|
|
2
|
+
import { GearboxChain, NetworkType, SUPPORTED_NETWORKS, SunsetStrategy, chains, findCuratorMarketConfigurator, getAssetType, getChain, getCuratorName, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork } from "./chain/chains.js";
|
|
3
3
|
import { MultichainNetworkMeta, MultichainNetworkProps, MultichainNetworksProps, MultichainResult, WithMultichain } from "./types/multichain.js";
|
|
4
4
|
import { ClaimableWithdrawal, CurrentWithdrawals, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, PendingWithdrawal, RedemptionLog, RequestableWithdrawal, WithdrawableAsset, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, toWithdrawalStatus } from "./accounts/withdrawal-compressor/types.js";
|
|
5
5
|
import { detectNetwork } from "./chain/detectNetwork.js";
|
|
@@ -171,4 +171,4 @@ import { LiquidationsService } from "./accounts/liquidations/LiquidationsService
|
|
|
171
171
|
import { MultichainLiquidationsService } from "./accounts/liquidations/MultichainLiquidationsService.js";
|
|
172
172
|
import "./accounts/index.js";
|
|
173
173
|
import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./options.js";
|
|
174
|
-
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AdapterData, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BigIntMath, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, Curator, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type IntentPreviewResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallWithFailure, MultichainAttachOptions, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkMeta, type MultichainNetworkProps, type MultichainNetworksProps, MultichainOpportunitiesService, MultichainPositionsService, type MultichainResult, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithMultichain, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodHex, additionalBorrowApyBps, assetsMap, attachOptionsSchema, borrowApyBps, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
|
|
174
|
+
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AdapterData, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BigIntMath, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type IntentPreviewResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallWithFailure, MultichainAttachOptions, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkMeta, type MultichainNetworkProps, type MultichainNetworksProps, MultichainOpportunitiesService, MultichainPositionsService, type MultichainResult, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithMultichain, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodHex, additionalBorrowApyBps, assetsMap, attachOptionsSchema, borrowApyBps, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Curator } from "../../model/
|
|
1
|
+
import { Curator } from "../../model/curators.js";
|
|
2
2
|
import { PeripheryContract } from "../constants/periphery.js";
|
|
3
3
|
import "../constants/index.js";
|
|
4
4
|
import "../../model/index.js";
|
|
@@ -1533,14 +1533,9 @@ declare const abi: readonly [{
|
|
|
1533
1533
|
}];
|
|
1534
1534
|
type abi = typeof abi;
|
|
1535
1535
|
declare class MarketConfiguratorContract extends BaseContract<abi> {
|
|
1536
|
-
#private;
|
|
1537
1536
|
constructor(options: ConstructOptions, address: Address);
|
|
1538
|
-
loadCuratorName(): Promise<void>;
|
|
1539
1537
|
/**
|
|
1540
|
-
* The entity operating this configurator
|
|
1541
|
-
* it. The curated per-chain table wins over the name the contract reports,
|
|
1542
|
-
* because the two sources must agree across services and only the table is
|
|
1543
|
-
* shared with the backend.
|
|
1538
|
+
* The entity operating this configurator
|
|
1544
1539
|
*/
|
|
1545
1540
|
get curator(): Curator;
|
|
1546
1541
|
static getPeripheryContractBatch(configurators: MarketConfiguratorContract[], client: MarketConfiguratorContract["client"], contract: PeripheryContract, blockNumber?: bigint): Promise<({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Curator
|
|
1
|
+
import { Curator } from "../../model/curators.js";
|
|
2
|
+
import { Token } from "../../model/primitives.js";
|
|
2
3
|
import { MarketData } from "../base/types.js";
|
|
3
4
|
import { Opportunity, OpportunityFilter, PoolOpportunity, PoolOpportunityDetail, PriceFeedSummary, QuotaAsset, StrategyOpportunityDetail } from "../../model/opportunities.js";
|
|
4
5
|
import "../../model/index.js";
|