@gearbox-protocol/sdk 18.2.0-next.1 → 18.2.0-next.11
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/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.js +179 -0
- package/dist/cjs/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.js +534 -0
- package/dist/cjs/abi/router/treehouseWorker.js +885 -0
- package/dist/cjs/dev/AccountOpener.js +1 -1
- package/dist/cjs/dev/withdrawalUtils.js +1 -1
- package/dist/cjs/history/trace/extractTransfers.js +1 -1
- package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +2 -2
- package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +1 -1
- package/dist/cjs/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -2
- package/dist/cjs/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -2
- package/dist/cjs/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -2
- package/dist/cjs/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
- package/dist/cjs/onchain/base/TokensMeta.js +3 -3
- package/dist/cjs/onchain/core/createAddressProvider.js +1 -1
- package/dist/cjs/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +3 -0
- package/dist/cjs/onchain/market/adapters/contracts/AccountMigratorAdapterContract.js +1 -1
- package/dist/cjs/onchain/market/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/cjs/onchain/market/adapters/types.js +3 -0
- package/dist/cjs/onchain/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/cjs/onchain/market/pool/PoolV310Contract.js +1 -1
- package/dist/cjs/onchain/market/rwa/createDegenNFT.js +1 -1
- package/dist/cjs/onchain/market/zapper/IETHZapperContract.js +1 -2
- package/dist/cjs/onchain/market/zapper/ZapperContract.js +1 -1
- package/dist/cjs/onchain/preview/preview/previewPoolPositionOperation.js +2 -2
- package/dist/cjs/onchain/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/cjs/permissionless/api/index.js +26 -0
- package/dist/cjs/permissionless/api/oracles/PermissionlessOracles.js +585 -47
- package/dist/cjs/permissionless/api/oracles/enrich.js +99 -0
- package/dist/cjs/permissionless/api/oracles/index.js +28 -0
- package/dist/cjs/permissionless/api/oracles/schemas.js +102 -35
- package/dist/cjs/permissionless/api/oracles/score/formula.js +99 -0
- package/dist/cjs/permissionless/api/oracles/score/index.js +8 -0
- package/dist/cjs/permissionless/api/oracles/score/run.js +88 -0
- package/dist/cjs/permissionless/api/oracles/score/types.js +1 -0
- package/dist/cjs/permissionless/api/oracles/stress/classify.js +258 -0
- package/dist/cjs/permissionless/api/oracles/stress/index.js +22 -0
- package/dist/cjs/permissionless/api/oracles/stress/override.js +125 -0
- package/dist/cjs/permissionless/api/oracles/stress/run.js +432 -0
- package/dist/cjs/permissionless/api/oracles/stress/score.js +98 -0
- package/dist/cjs/permissionless/api/oracles/stress/types.js +1 -0
- package/dist/cjs/permissionless/api/schemas.js +0 -3
- package/dist/cjs/permissionless/bindings/index.js +1 -1
- package/dist/cjs/permissionless/index.js +29 -1
- package/dist/cjs/permissionless/utils/index.js +2 -0
- package/dist/cjs/permissionless/utils/price-update/get-prices.js +64 -0
- package/dist/cjs/permissionless/utils/price-update/index.js +2 -0
- package/dist/cjs/testnets/TestnetsAPI.js +179 -0
- package/dist/cjs/testnets/errors/TestnetNotFoundError.js +15 -0
- package/dist/cjs/testnets/errors/TestnetRequestFailedError.js +24 -0
- package/dist/cjs/testnets/errors/TestnetStatusError.js +19 -0
- package/dist/cjs/testnets/errors/TestnetValidationError.js +24 -0
- package/dist/cjs/testnets/errors/TestnetWaitTimeoutError.js +30 -0
- package/dist/cjs/testnets/errors/TestnetsError.js +34 -0
- package/dist/cjs/testnets/errors/index.js +13 -0
- package/dist/cjs/testnets/index.js +32 -0
- package/dist/cjs/testnets/package.json +1 -0
- package/dist/cjs/testnets/schemas.js +242 -0
- package/dist/cjs/testnets/types.js +1 -0
- package/dist/esm/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.js +178 -0
- package/dist/esm/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.js +533 -0
- package/dist/esm/abi/router/treehouseWorker.js +884 -0
- package/dist/esm/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +3 -0
- package/dist/esm/onchain/market/adapters/types.js +3 -0
- package/dist/esm/permissionless/api/index.js +7 -1
- package/dist/esm/permissionless/api/oracles/PermissionlessOracles.js +587 -49
- package/dist/esm/permissionless/api/oracles/enrich.js +94 -0
- package/dist/esm/permissionless/api/oracles/index.js +10 -1
- package/dist/esm/permissionless/api/oracles/schemas.js +95 -35
- package/dist/esm/permissionless/api/oracles/score/formula.js +96 -0
- package/dist/esm/permissionless/api/oracles/score/index.js +4 -0
- package/dist/esm/permissionless/api/oracles/score/run.js +87 -0
- package/dist/esm/permissionless/api/oracles/score/types.js +1 -0
- package/dist/esm/permissionless/api/oracles/stress/classify.js +256 -0
- package/dist/esm/permissionless/api/oracles/stress/index.js +6 -0
- package/dist/esm/permissionless/api/oracles/stress/override.js +119 -0
- package/dist/esm/permissionless/api/oracles/stress/run.js +427 -0
- package/dist/esm/permissionless/api/oracles/stress/score.js +95 -0
- package/dist/esm/permissionless/api/oracles/stress/types.js +1 -0
- package/dist/esm/permissionless/api/schemas.js +2 -4
- package/dist/esm/permissionless/bindings/index.js +1 -1
- package/dist/esm/permissionless/index.js +9 -3
- package/dist/esm/permissionless/utils/index.js +2 -2
- package/dist/esm/permissionless/utils/price-update/get-prices.js +63 -1
- package/dist/esm/permissionless/utils/price-update/index.js +2 -2
- package/dist/esm/testnets/TestnetsAPI.js +178 -0
- package/dist/esm/testnets/errors/TestnetNotFoundError.js +14 -0
- package/dist/esm/testnets/errors/TestnetRequestFailedError.js +23 -0
- package/dist/esm/testnets/errors/TestnetStatusError.js +18 -0
- package/dist/esm/testnets/errors/TestnetValidationError.js +23 -0
- package/dist/esm/testnets/errors/TestnetWaitTimeoutError.js +29 -0
- package/dist/esm/testnets/errors/TestnetsError.js +33 -0
- package/dist/esm/testnets/errors/index.js +7 -0
- package/dist/esm/testnets/index.js +11 -0
- package/dist/esm/testnets/package.json +1 -0
- package/dist/esm/testnets/schemas.js +228 -0
- package/dist/esm/testnets/types.js +1 -0
- package/dist/types/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.d.ts +148 -0
- package/dist/types/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.d.ts +440 -0
- package/dist/types/abi/router/treehouseWorker.d.ts +728 -0
- package/dist/types/onchain/market/adapters/types.d.ts +4 -1
- package/dist/types/permissionless/api/index.d.ts +10 -2
- package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +232 -35
- package/dist/types/permissionless/api/oracles/enrich.d.ts +59 -0
- package/dist/types/permissionless/api/oracles/index.d.ts +12 -2
- package/dist/types/permissionless/api/oracles/schemas.d.ts +209 -22
- package/dist/types/permissionless/api/oracles/score/formula.d.ts +46 -0
- package/dist/types/permissionless/api/oracles/score/index.d.ts +4 -0
- package/dist/types/permissionless/api/oracles/score/run.d.ts +21 -0
- package/dist/types/permissionless/api/oracles/score/types.d.ts +85 -0
- package/dist/types/permissionless/api/oracles/stress/classify.d.ts +57 -0
- package/dist/types/permissionless/api/oracles/stress/index.d.ts +6 -0
- package/dist/types/permissionless/api/oracles/stress/override.d.ts +59 -0
- package/dist/types/permissionless/api/oracles/stress/run.d.ts +73 -0
- package/dist/types/permissionless/api/oracles/stress/score.d.ts +57 -0
- package/dist/types/permissionless/api/oracles/stress/types.d.ts +272 -0
- package/dist/types/permissionless/api/oracles/types.d.ts +408 -63
- package/dist/types/permissionless/api/schemas.d.ts +0 -2
- package/dist/types/permissionless/index.d.ts +11 -3
- package/dist/types/permissionless/utils/index.d.ts +2 -2
- package/dist/types/permissionless/utils/price-update/get-prices.d.ts +33 -0
- package/dist/types/permissionless/utils/price-update/index.d.ts +2 -2
- package/dist/types/testnets/TestnetsAPI.d.ts +108 -0
- package/dist/types/testnets/errors/TestnetNotFoundError.d.ts +12 -0
- package/dist/types/testnets/errors/TestnetRequestFailedError.d.ts +11 -0
- package/dist/types/testnets/errors/TestnetStatusError.d.ts +15 -0
- package/dist/types/testnets/errors/TestnetValidationError.d.ts +16 -0
- package/dist/types/testnets/errors/TestnetWaitTimeoutError.d.ts +21 -0
- package/dist/types/testnets/errors/TestnetsError.d.ts +47 -0
- package/dist/types/testnets/errors/index.d.ts +7 -0
- package/dist/types/testnets/index.d.ts +11 -0
- package/dist/types/testnets/schemas.d.ts +554 -0
- package/dist/types/testnets/types.d.ts +717 -0
- package/package.json +9 -3
|
@@ -15,7 +15,7 @@ export interface IAdapterContract extends IBaseContract {
|
|
|
15
15
|
openingCalls(): Promise<MultiCall[]>;
|
|
16
16
|
}
|
|
17
17
|
export type VersionedAbi = Record<number, readonly AbiParameter[]>;
|
|
18
|
-
export type AdapterContractType = "ADAPTER::ACCOUNT_MIGRATOR" | "ADAPTER::BALANCER_V3_ROUTER" | "ADAPTER::BALANCER_V3_WRAPPER" | "ADAPTER::CAMELOT_V3_ROUTER" | "ADAPTER::CURVE_STABLE_NG" | "ADAPTER::CURVE_V1_2ASSETS" | "ADAPTER::CURVE_V1_3ASSETS" | "ADAPTER::CURVE_V1_4ASSETS" | "ADAPTER::CURVE_V1_STECRV_POOL" | "ADAPTER::CVX_V1_BASE_REWARD_POOL" | "ADAPTER::CVX_V1_BOOSTER" | "ADAPTER::DAI_USDS_EXCHANGE" | "ADAPTER::ERC4626_VAULT" | "ADAPTER::ERC4626_VAULT_REFERRAL" | "ADAPTER::FLUID_DEX" | "ADAPTER::INFINIFI_GATEWAY" | "ADAPTER::INFINIFI_UNWINDING" | "ADAPTER::KELP_DEPOSIT_POOL" | "ADAPTER::KELP_WITHDRAWAL" | "ADAPTER::LIDO_V1" | "ADAPTER::LIDO_WSTETH_V1" | "ADAPTER::MELLOW_CLAIMER" | "ADAPTER::MELLOW_DVV" | "ADAPTER::MELLOW_ERC4626_VAULT" | "ADAPTER::MELLOW_WRAPPER" | "ADAPTER::MIDAS_GATEWAY" | "ADAPTER::MIDAS_ISSUANCE_VAULT" | "ADAPTER::MIDAS_REDEMPTION_VAULT" | "ADAPTER::PENDLE_ROUTER" | "ADAPTER::SECURITIZE_ONRAMP" | "ADAPTER::SECURITIZE_REDEMPTION" | "ADAPTER::STAKING_REWARDS" | "ADAPTER::TRADERJOE_ROUTER" | "ADAPTER::UNISWAP_V2_ROUTER" | "ADAPTER::UNISWAP_V3_ROUTER" | "ADAPTER::UNISWAP_V4_GATEWAY" | "ADAPTER::UPSHIFT_VAULT" | "ADAPTER::VELODROME_V2_ROUTER";
|
|
18
|
+
export type AdapterContractType = "ADAPTER::ACCOUNT_MIGRATOR" | "ADAPTER::BALANCER_V3_ROUTER" | "ADAPTER::BALANCER_V3_WRAPPER" | "ADAPTER::CAMELOT_V3_ROUTER" | "ADAPTER::CURVE_STABLE_NG" | "ADAPTER::CURVE_V1_2ASSETS" | "ADAPTER::CURVE_V1_3ASSETS" | "ADAPTER::CURVE_V1_4ASSETS" | "ADAPTER::CURVE_V1_STECRV_POOL" | "ADAPTER::CVX_V1_BASE_REWARD_POOL" | "ADAPTER::CVX_V1_BOOSTER" | "ADAPTER::DAI_USDS_EXCHANGE" | "ADAPTER::ERC4626_VAULT" | "ADAPTER::ERC4626_VAULT_REFERRAL" | "ADAPTER::FLUID_DEX" | "ADAPTER::INFINIFI_GATEWAY" | "ADAPTER::INFINIFI_UNWINDING" | "ADAPTER::KELP_DEPOSIT_POOL" | "ADAPTER::KELP_WITHDRAWAL" | "ADAPTER::LIDO_V1" | "ADAPTER::LIDO_WSTETH_V1" | "ADAPTER::MELLOW_CLAIMER" | "ADAPTER::MELLOW_DVV" | "ADAPTER::MELLOW_ERC4626_VAULT" | "ADAPTER::MELLOW_WRAPPER" | "ADAPTER::MIDAS_GATEWAY" | "ADAPTER::MIDAS_ISSUANCE_VAULT" | "ADAPTER::MIDAS_REDEMPTION_VAULT" | "ADAPTER::PENDLE_ROUTER" | "ADAPTER::SECURITIZE_ONRAMP" | "ADAPTER::SECURITIZE_REDEMPTION" | "ADAPTER::STAKING_REWARDS" | "ADAPTER::TRADERJOE_ROUTER" | "ADAPTER::TREEHOUSE_FASTLANE" | "ADAPTER::TREEHOUSE_GATEWAY" | "ADAPTER::TREEHOUSE_ROUTER" | "ADAPTER::UNISWAP_V2_ROUTER" | "ADAPTER::UNISWAP_V3_ROUTER" | "ADAPTER::UNISWAP_V4_GATEWAY" | "ADAPTER::UPSHIFT_VAULT" | "ADAPTER::VELODROME_V2_ROUTER";
|
|
19
19
|
export declare enum AdapterType {
|
|
20
20
|
ACCOUNT_MIGRATOR = "ACCOUNT_MIGRATOR",
|
|
21
21
|
BALANCER_V3_ROUTER = "BALANCER_V3_ROUTER",
|
|
@@ -50,6 +50,9 @@ export declare enum AdapterType {
|
|
|
50
50
|
SECURITIZE_REDEMPTION = "SECURITIZE_REDEMPTION",
|
|
51
51
|
STAKING_REWARDS = "STAKING_REWARDS",
|
|
52
52
|
TRADERJOE_ROUTER = "TRADERJOE_ROUTER",
|
|
53
|
+
TREEHOUSE_FASTLANE = "TREEHOUSE_FASTLANE",
|
|
54
|
+
TREEHOUSE_GATEWAY = "TREEHOUSE_GATEWAY",
|
|
55
|
+
TREEHOUSE_ROUTER = "TREEHOUSE_ROUTER",
|
|
53
56
|
UNISWAP_V2_ROUTER = "UNISWAP_V2_ROUTER",
|
|
54
57
|
UNISWAP_V3_ROUTER = "UNISWAP_V3_ROUTER",
|
|
55
58
|
UNISWAP_V4_GATEWAY = "UNISWAP_V4_GATEWAY",
|
|
@@ -5,7 +5,9 @@ import { AttachChainsArgs, ChainScope, ChainSummaryArgs, PermissionlessChain, Pe
|
|
|
5
5
|
import { ChainsNamespace } from "./chains/ChainsNamespace.js";
|
|
6
6
|
import { DeployArgs, DeployContractArgs, DeployPriceFeedArgs, PreparedDeployment, PreparedPriceFeedDeployment } from "./deploy/types.js";
|
|
7
7
|
import { DEFAULT_DEPLOY_SALT, PermissionlessDeploy, priceFeedSalt } from "./deploy/PermissionlessDeploy.js";
|
|
8
|
-
import {
|
|
8
|
+
import { AssetScore, AssetScoresArgs, MarketScore, ScoredFeed } from "./oracles/score/types.js";
|
|
9
|
+
import { BreakingPoint, FeedOutcome, GroupReport, GroupScenarioOutcome, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs } from "./oracles/stress/types.js";
|
|
10
|
+
import { AssetArgs, AssetCap, AssetsArgs, FeedCap, MarketCap, PermissionlessAsset, PermissionlessAssetDetails, PermissionlessAssetMarket, PermissionlessAssetMarketFeed, PermissionlessAssetQuota, PermissionlessAssetSummary, PermissionlessIndexedAssetDetails, PermissionlessIndexedAssetSummary, PermissionlessIndexedPriceFeedDetails, PermissionlessIndexedPriceFeedMarket, PermissionlessMarket, PermissionlessMarketSlot, PermissionlessPriceFeedAsset, PermissionlessPriceFeedDetails, PermissionlessPriceFeedMarket, PermissionlessPriceFeedStore, PermissionlessQuotaTotals, PriceFeedArgs, PriceFeedDecimals, PriceFeedPrice, PriceFeedRef } from "./oracles/types.js";
|
|
9
11
|
import { GET_PRICES_CHUNK_SIZE, GET_PRICES_GAS_LIMIT_BY_CHAIN_ID, PermissionlessOracles } from "./oracles/PermissionlessOracles.js";
|
|
10
12
|
import { AddFeedsArgs, ChangeNamesArgs, ChangeStalenessPeriodsArgs, ForbidFeedsArgs, InstanceTxsArgs, PriceFeedPair } from "./transactions/types.js";
|
|
11
13
|
import { InstanceOwnerTransactions } from "./transactions/InstanceOwnerTransactions.js";
|
|
@@ -15,6 +17,12 @@ import "./chains/index.js";
|
|
|
15
17
|
import { deriveEffectiveStalenessPeriod } from "./deploy/effective-staleness.js";
|
|
16
18
|
import "./deploy/index.js";
|
|
17
19
|
import { PermissionlessChainUnreachableError, PermissionlessNotAttachedError, PriceFeedNotInStoreError, PriceFeedSaltMissingError, PriceFeedStalenessUnknownError } from "./errors.js";
|
|
20
|
+
import { BOUND_WEIGHT, INDEPENDENCE_WEIGHT, ScoreSource, scoreMarket } from "./oracles/score/formula.js";
|
|
21
|
+
import { runAssetScores } from "./oracles/score/run.js";
|
|
22
|
+
import { TreeNode, classifySources, sourcesByFeed } from "./oracles/stress/classify.js";
|
|
23
|
+
import { UNBOUNDED_DOWN, UNBOUNDED_UP, groupOverride, perturb, rateStub, roundDataStub } from "./oracles/stress/override.js";
|
|
24
|
+
import { DEFAULT_SCENARIOS, RATE_FEED_TYPE, readForest, readRateTargets, runStressTest } from "./oracles/stress/run.js";
|
|
25
|
+
import { scoreGroup, slotHarm, verdictOf } from "./oracles/stress/score.js";
|
|
18
26
|
import "./oracles/index.js";
|
|
19
27
|
import "./transactions/index.js";
|
|
20
|
-
export { AddFeedsArgs, AttachChainsArgs, ChainScope, ChainSummaryArgs, ChainsNamespace, ChangeNamesArgs, ChangeStalenessPeriodsArgs, DEFAULT_DEPLOY_SALT, DeployArgs, DeployContractArgs, DeployPriceFeedArgs, ForbidFeedsArgs, GET_PRICES_CHUNK_SIZE, GET_PRICES_GAS_LIMIT_BY_CHAIN_ID, GearboxPermissionless, GearboxPermissionlessOptions,
|
|
28
|
+
export { AddFeedsArgs, AssetArgs, AssetCap, AssetScore, AssetScoresArgs, AssetsArgs, AttachChainsArgs, BOUND_WEIGHT, BreakingPoint, ChainScope, ChainSummaryArgs, ChainsNamespace, ChangeNamesArgs, ChangeStalenessPeriodsArgs, DEFAULT_DEPLOY_SALT, DEFAULT_SCENARIOS, DeployArgs, DeployContractArgs, DeployPriceFeedArgs, FeedCap, FeedOutcome, ForbidFeedsArgs, GET_PRICES_CHUNK_SIZE, GET_PRICES_GAS_LIMIT_BY_CHAIN_ID, GearboxPermissionless, GearboxPermissionlessOptions, GroupReport, GroupScenarioOutcome, INDEPENDENCE_WEIGHT, InstanceOwnerTransactions, InstanceTxsArgs, MarketCap, MarketScore, PermissionlessAnalytics, PermissionlessAsset, PermissionlessAssetDetails, PermissionlessAssetMarket, PermissionlessAssetMarketFeed, PermissionlessAssetQuota, PermissionlessAssetSummary, PermissionlessChain, PermissionlessChainSummary, PermissionlessChainUnreachableError, PermissionlessDeploy, PermissionlessIndexedAssetDetails, PermissionlessIndexedAssetSummary, PermissionlessIndexedPriceFeedDetails, PermissionlessIndexedPriceFeedMarket, PermissionlessMarket, PermissionlessMarketSlot, PermissionlessNotAttachedError, PermissionlessOracles, PermissionlessPriceFeedAsset, PermissionlessPriceFeedDetails, PermissionlessPriceFeedMarket, PermissionlessPriceFeedStore, PermissionlessQuotaTotals, PreparedDeployment, PreparedPriceFeedDeployment, PriceChartArgs, PriceFeedArgs, PriceFeedChartPoint, PriceFeedDecimals, PriceFeedNotInStoreError, PriceFeedPair, PriceFeedPrice, PriceFeedPriceChart, PriceFeedRef, PriceFeedSaltMissingError, PriceFeedStalenessUnknownError, RATE_FEED_TYPE, ScoreSource, ScoredFeed, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs, TreeNode, UNBOUNDED_DOWN, UNBOUNDED_UP, classifySources, deriveEffectiveStalenessPeriod, groupOverride, perturb, priceFeedSalt, rateStub, readForest, readRateTargets, roundDataStub, runAssetScores, runStressTest, scoreGroup, scoreMarket, slotHarm, sourcesByFeed, verdictOf };
|
|
@@ -2,8 +2,9 @@ import { PriceFeedData } from "../../../model/opportunities.js";
|
|
|
2
2
|
import { AbstractOffchainNamespace } from "../../../offchain/AbstractOffchainNamespace.js";
|
|
3
3
|
import { GearboxPermissionlessOptions } from "../types.js";
|
|
4
4
|
import { ChainsNamespace } from "../chains/ChainsNamespace.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { AssetScore, AssetScoresArgs } from "./score/types.js";
|
|
6
|
+
import { StressReport, StressTestArgs } from "./stress/types.js";
|
|
7
|
+
import { AssetArgs, AssetCap, AssetsArgs, FeedCap, MarketCap, PermissionlessAssetDetails, PermissionlessAssetSummary, PermissionlessMarketSlot, PermissionlessPriceFeedDetails, PermissionlessPriceFeedStore, PriceFeedArgs, PriceFeedDecimals, PriceFeedPrice, PriceFeedRef } from "./types.js";
|
|
7
8
|
//#region src/permissionless/api/oracles/PermissionlessOracles.d.ts
|
|
8
9
|
export declare const GET_PRICES_GAS_LIMIT_BY_CHAIN_ID: Record<number, bigint>;
|
|
9
10
|
export declare const GET_PRICES_CHUNK_SIZE = 200;
|
|
@@ -13,9 +14,17 @@ export declare const GET_PRICES_CHUNK_SIZE = 200;
|
|
|
13
14
|
*
|
|
14
15
|
* ```ts
|
|
15
16
|
* const store = await permissionless.oracles.store({ chainId: 1 });
|
|
16
|
-
* const
|
|
17
|
+
* const prices = await permissionless.oracles.getPrices(
|
|
18
|
+
* store.priceFeeds.map(({ address }) => ({ chainId: 1, address })),
|
|
19
|
+
* );
|
|
17
20
|
* ```
|
|
18
21
|
*
|
|
22
|
+
* The backend answers what it has indexed; anything that is only true at a
|
|
23
|
+
* block — a price, a market cap, a quota in one currency, the period an
|
|
24
|
+
* oracle holds for a slot — is read here, off the chain, and folded into what
|
|
25
|
+
* it answered. That is why these reads mix a request with a multicall rather
|
|
26
|
+
* than being either one.
|
|
27
|
+
*
|
|
19
28
|
* Read-only. What the store carries is decided on chain, so putting a feed
|
|
20
29
|
* there is a batch the instance owner executes — see
|
|
21
30
|
* {@link InstanceOwnerTransactions} — not a row a client writes here.
|
|
@@ -25,10 +34,52 @@ export declare class PermissionlessOracles extends AbstractOffchainNamespace {
|
|
|
25
34
|
constructor(options: GearboxPermissionlessOptions, chains: ChainsNamespace);
|
|
26
35
|
/**
|
|
27
36
|
* The store with the assets and feeds of one chain.
|
|
37
|
+
*
|
|
38
|
+
* {@link stores} narrowed to one and unwrapped, which is the whole of it:
|
|
39
|
+
* there is one route either way, and a chain the backend does not serve has
|
|
40
|
+
* no store to answer with rather than an empty one.
|
|
41
|
+
*
|
|
42
|
+
* @throws When the backend serves no store for the chain.
|
|
28
43
|
**/
|
|
29
44
|
store({ chainId }: {
|
|
30
45
|
chainId: number;
|
|
31
46
|
}): Promise<PermissionlessPriceFeedStore>;
|
|
47
|
+
/**
|
|
48
|
+
* The same stores for every chain the backend serves.
|
|
49
|
+
*
|
|
50
|
+
* One request rather than {@link store} per chain, which is what a page
|
|
51
|
+
* showing all of them would otherwise do: the backend assembles them in the
|
|
52
|
+
* same few queries it assembles one in, so the chains cost little more than
|
|
53
|
+
* the largest of them.
|
|
54
|
+
*
|
|
55
|
+
* Each entry names its own chain, so a store is never attributed by
|
|
56
|
+
* position. `chainId` narrows it to one, for a caller that wants the list
|
|
57
|
+
* shape either way.
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* const stores = await permissionless.oracles.stores();
|
|
61
|
+
* ```
|
|
62
|
+
**/
|
|
63
|
+
stores({ chainId }?: AssetsArgs): Promise<PermissionlessPriceFeedStore[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Every market slot in force, with the feed holding it and what the market
|
|
66
|
+
* has riding on it.
|
|
67
|
+
*
|
|
68
|
+
* The chain's whole slot table, which {@link feed} and {@link asset} answer
|
|
69
|
+
* one subject's slice of. What reads it this way is analysis over every
|
|
70
|
+
* market at once — which feed holds which slot, and what breaks if it
|
|
71
|
+
* lies — and asking a feed at a time would be a few hundred requests for
|
|
72
|
+
* the same rows.
|
|
73
|
+
*
|
|
74
|
+
* Served as indexed, with nothing folded in: the quotas are in each
|
|
75
|
+
* market's own underlying, as everywhere else, and pricing them is
|
|
76
|
+
* {@link getPrices} over the `underlyingPriceFeed` column.
|
|
77
|
+
*
|
|
78
|
+
* ```ts
|
|
79
|
+
* const slots = await permissionless.oracles.slots({ chainId: 1 });
|
|
80
|
+
* ```
|
|
81
|
+
**/
|
|
82
|
+
slots({ chainId }?: AssetsArgs): Promise<PermissionlessMarketSlot[]>;
|
|
32
83
|
/**
|
|
33
84
|
* One feed of the store: what it is, which assets it may price, and which
|
|
34
85
|
* market slots it currently fills.
|
|
@@ -44,10 +95,127 @@ export declare class PermissionlessOracles extends AbstractOffchainNamespace {
|
|
|
44
95
|
* });
|
|
45
96
|
* ```
|
|
46
97
|
*
|
|
98
|
+
* Each market row also carries the staleness period that market's own
|
|
99
|
+
* oracle holds for the slot, read off the chain here — see
|
|
100
|
+
* {@link PermissionlessPriceFeedMarket.marketStalenessPeriod}.
|
|
101
|
+
*
|
|
47
102
|
* @throws When the store does not carry the feed. A private draft is not
|
|
48
103
|
* here — it lives in whichever app wrote it.
|
|
49
104
|
**/
|
|
50
105
|
feed({ chainId, address }: PriceFeedArgs): Promise<PermissionlessPriceFeedDetails>;
|
|
106
|
+
/**
|
|
107
|
+
* One asset of the store: the feeds allowed for it, and the markets that
|
|
108
|
+
* take it as collateral.
|
|
109
|
+
*
|
|
110
|
+
* The mirror of {@link feed}, and the call to reach for when the question is
|
|
111
|
+
* "what prices this token and what is it backing" rather than "where is this
|
|
112
|
+
* feed used". Both read the same market slots; which end they are indexed
|
|
113
|
+
* from is the difference.
|
|
114
|
+
*
|
|
115
|
+
* ```ts
|
|
116
|
+
* const { priceFeeds, markets, quotaUsedUsd } =
|
|
117
|
+
* await permissionless.oracles.asset({ chainId: 1, address: token });
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* The quota totals are worked out here, over the very market rows this
|
|
121
|
+
* answers with — see {@link PermissionlessQuotaTotals}.
|
|
122
|
+
*
|
|
123
|
+
* @throws When the chain has no metadata for the address. An asset nothing
|
|
124
|
+
* was indexed for has no symbol or decimals, so there is no row to answer.
|
|
125
|
+
**/
|
|
126
|
+
asset({ chainId, address }: AssetArgs): Promise<PermissionlessAssetDetails>;
|
|
127
|
+
/**
|
|
128
|
+
* Every asset the store carries, with what its markets make of it.
|
|
129
|
+
*
|
|
130
|
+
* Enough on its own to render a list of assets: the alternative is the
|
|
131
|
+
* store's whole read for the names plus a call per row for the quotas, and
|
|
132
|
+
* this is one request either way you scope it.
|
|
133
|
+
*
|
|
134
|
+
* Ordered by how central each asset is — the markets it underlies first,
|
|
135
|
+
* then what is quoted against it, then what it is allowed — so a consumer
|
|
136
|
+
* renders the rows as they arrive. Omit `chainId` for every chain the
|
|
137
|
+
* backend serves, ordered the same way across all of them.
|
|
138
|
+
*
|
|
139
|
+
* Each row also carries its quota totals and what this SDK's tables say the
|
|
140
|
+
* asset is, neither of which is served — see
|
|
141
|
+
* {@link PermissionlessAssetSummary}. The totals are what the last two terms
|
|
142
|
+
* of the order are over, so this waits for them rather than handing back a
|
|
143
|
+
* list that would reshuffle a moment later.
|
|
144
|
+
*
|
|
145
|
+
* ```ts
|
|
146
|
+
* const assets = await permissionless.oracles.assets({ chainId: 1 });
|
|
147
|
+
* const everywhere = await permissionless.oracles.assets();
|
|
148
|
+
* ```
|
|
149
|
+
**/
|
|
150
|
+
assets({ chainId }?: AssetsArgs): Promise<PermissionlessAssetSummary[]>;
|
|
151
|
+
/**
|
|
152
|
+
* What each source of price information can do to the chain's markets if it
|
|
153
|
+
* lies.
|
|
154
|
+
*
|
|
155
|
+
* The feeds under a chain's oracles are partitioned by where their numbers
|
|
156
|
+
* actually come from — Chainlink, Redstone, Pyth, Lido, Curve, each vault's
|
|
157
|
+
* own issuer — on the grounds that a source fails as a whole: whoever
|
|
158
|
+
* trusts one Chainlink aggregator trusts the operator behind all of them.
|
|
159
|
+
* Each group is then made to report a multiple of what it reports now, and
|
|
160
|
+
* every feed the markets read is read again inside that same call.
|
|
161
|
+
*
|
|
162
|
+
* No fork and no harness. The lie is a state override on an `eth_call`, so
|
|
163
|
+
* the composite feeds above it, their bounds and the oracle's own checks all
|
|
164
|
+
* run as deployed, against real state, at the current block — what comes
|
|
165
|
+
* back is what the market would have read.
|
|
166
|
+
*
|
|
167
|
+
* Each slot is scored by how its collateral moved *against its market's own
|
|
168
|
+
* underlying*, because that is what an account is valued by: a group that
|
|
169
|
+
* moves both legs has moved nothing. Beyond the two unbounded ends, each
|
|
170
|
+
* group is bisected for the multiple at which something first breaks, which
|
|
171
|
+
* is the figure that separates a source held in check by a bound from one
|
|
172
|
+
* nothing is checking.
|
|
173
|
+
*
|
|
174
|
+
* ```ts
|
|
175
|
+
* const report = await permissionless.oracles.stressTest({ chainId: 1 });
|
|
176
|
+
* for (const group of report.groups) {
|
|
177
|
+
* console.log(group.verdict);
|
|
178
|
+
* }
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* Report {@link StressReport.unidentifiedUsd} alongside anything taken from
|
|
182
|
+
* this: it is the quota priced through a source the partition could only
|
|
183
|
+
* name after its own description, and nothing says what that fails with.
|
|
184
|
+
*
|
|
185
|
+
* Reads the chain directly, so the client has to have attached — see
|
|
186
|
+
* {@link GearboxPermissionless.attach}. Costs one request for the slots and
|
|
187
|
+
* then, per group, one `eth_call` per scenario plus the bisection's; a whole
|
|
188
|
+
* chain comes to a minute or so, and `thresholds: false` cuts it to seconds.
|
|
189
|
+
*
|
|
190
|
+
* @throws When the client has not attached, when the chain has no client
|
|
191
|
+
* configured, or when no PriceFeedCompressor is deployed on it — none of the
|
|
192
|
+
* three leaves anything to simulate.
|
|
193
|
+
**/
|
|
194
|
+
/**
|
|
195
|
+
* Every asset's score out of 10 for how its markets guard its price.
|
|
196
|
+
*
|
|
197
|
+
* A market scores 10 when its reserve feed is a second feed on other
|
|
198
|
+
* sources than the main one, and one of the two is bounded — a
|
|
199
|
+
* `BoundedPriceFeed` or a Gearbox LP feed. It loses 6 points as the two
|
|
200
|
+
* feeds' sources overlap — all of them if there is no reserve, it is a
|
|
201
|
+
* `ZeroPriceFeed`, or it is the main feed again — and 5 if neither is
|
|
202
|
+
* bounded. An asset scores its worst running market that takes it as
|
|
203
|
+
* collateral.
|
|
204
|
+
*
|
|
205
|
+
* Read off the chain, one multicall of feed trees per chain, so the score
|
|
206
|
+
* is of the trees as they stand rather than as last indexed. A chain with
|
|
207
|
+
* no client configured is left out with a warning rather than failing the
|
|
208
|
+
* rest.
|
|
209
|
+
*
|
|
210
|
+
* ```ts
|
|
211
|
+
* const scores = await permissionless.oracles.assetScores({ chainId: 1 });
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* @throws {PermissionlessNotAttachedError} before
|
|
215
|
+
* {@link GearboxPermissionless.attach} has resolved.
|
|
216
|
+
**/
|
|
217
|
+
assetScores({ chainId }?: AssetScoresArgs): Promise<AssetScore[]>;
|
|
218
|
+
stressTest({ chainId, ...options }: StressTestArgs): Promise<StressReport>;
|
|
51
219
|
/**
|
|
52
220
|
* The feeds one feed reads from, recursively.
|
|
53
221
|
*
|
|
@@ -64,54 +232,83 @@ export declare class PermissionlessOracles extends AbstractOffchainNamespace {
|
|
|
64
232
|
**/
|
|
65
233
|
dependencies({ chainId, address }: PriceFeedArgs): Promise<PriceFeedData>;
|
|
66
234
|
/**
|
|
67
|
-
* What the
|
|
235
|
+
* What the named feeds price, read off the chain.
|
|
236
|
+
*
|
|
237
|
+
* Prices exactly what is asked for, at the current block, across as many
|
|
238
|
+
* chains as the list names — one read per chain, so a screen listing every
|
|
239
|
+
* chain's feeds pays per chain and not per row. A feed the store does not
|
|
240
|
+
* carry prices the same way, which is what makes this the call to reach for
|
|
241
|
+
* after a deploy, or while a form is still choosing between candidates.
|
|
242
|
+
*
|
|
243
|
+
* Read in two passes. The first asks every feed what it reports as it
|
|
244
|
+
* stands, which is one multicall per chain; a feed that will not answer
|
|
245
|
+
* until it has been given a fresh one is then priced inside a simulation
|
|
246
|
+
* that updates it first, so a push-based feed prices as readily as a
|
|
247
|
+
* pull-based one. The second pass costs an `OnchainSDK` to attach, hence
|
|
248
|
+
* only the feeds that need it rather than all of them.
|
|
68
249
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* one price lookup and one multicall over the feed's own assets.
|
|
250
|
+
* `null` is a feed neither pass could read, and a chain with no client
|
|
251
|
+
* configured is every one of its feeds reading `null` rather than a failed
|
|
252
|
+
* call — the figures built on them are floors either way.
|
|
73
253
|
*
|
|
74
254
|
* ```ts
|
|
75
|
-
* const {
|
|
76
|
-
* chainId: 1,
|
|
77
|
-
*
|
|
78
|
-
* });
|
|
255
|
+
* const [{ price }] = await permissionless.oracles.getPrices([
|
|
256
|
+
* { chainId: 1, address: feed },
|
|
257
|
+
* ]);
|
|
79
258
|
* ```
|
|
259
|
+
*
|
|
260
|
+
* @returns One entry per feed asked for, in the order asked, each price in
|
|
261
|
+
* the 8 decimals every Gearbox feed reports.
|
|
80
262
|
**/
|
|
81
|
-
|
|
263
|
+
getPrices(feeds: PriceFeedRef[]): Promise<PriceFeedPrice[]>;
|
|
82
264
|
/**
|
|
83
|
-
*
|
|
84
|
-
* indexer has not seen are read off the chain by the backend, so the store
|
|
85
|
-
* is priced whole.
|
|
265
|
+
* The scale each of the named feeds answers in.
|
|
86
266
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
267
|
+
* The companion to {@link getPrices} for the callers whose feeds are not
|
|
268
|
+
* all an oracle's: everything an oracle holds reports 8 decimals, but the
|
|
269
|
+
* feeds under a composite are whatever was deployed, and a rate leg at 18
|
|
270
|
+
* read as 8 is wrong by ten orders of magnitude rather than visibly wrong.
|
|
271
|
+
*
|
|
272
|
+
* Separate from the price because the two keep different company: this is
|
|
273
|
+
* fixed for the life of the contract and worth caching for the session,
|
|
274
|
+
* while a price is re-read whenever the reader asks. One multicall per
|
|
275
|
+
* chain either way.
|
|
276
|
+
*
|
|
277
|
+
* `null` is a feed that would not answer, or one on a chain with no client
|
|
278
|
+
* configured.
|
|
279
|
+
*
|
|
280
|
+
* ```ts
|
|
281
|
+
* const [{ decimals }] = await permissionless.oracles.getDecimals([
|
|
282
|
+
* { chainId: 1, address: feed },
|
|
283
|
+
* ]);
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* @returns One entry per feed asked for, in the order asked.
|
|
89
287
|
**/
|
|
90
|
-
|
|
91
|
-
chainId: number;
|
|
92
|
-
}): Promise<PermissionlessPrices>;
|
|
288
|
+
getDecimals(feeds: PriceFeedRef[]): Promise<PriceFeedDecimals[]>;
|
|
93
289
|
/**
|
|
94
|
-
*
|
|
290
|
+
* What one chain's feeds value one chain's assets at: `price × totalSupply`
|
|
291
|
+
* per pair.
|
|
95
292
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* form is still choosing between candidates.
|
|
293
|
+
* Asked from whichever side the caller is looking at — one asset through
|
|
294
|
+
* each of its feeds, or one feed over each of the assets it prices — because
|
|
295
|
+
* a screen shows one row per feed or one row per asset, never the full
|
|
296
|
+
* cross product. Both answer the same pairs in the same shape.
|
|
101
297
|
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
298
|
+
* Two reads per chain: the prices, and one multicall for the assets'
|
|
299
|
+
* supplies and decimals. Several scopes can be asked at once, which is how a
|
|
300
|
+
* table of every asset's feeds pays per chain rather than per row; the pairs
|
|
301
|
+
* come back in the order the scopes named them. A pair neither read could
|
|
302
|
+
* resolve has a `null` cap, which is not a zero.
|
|
105
303
|
*
|
|
106
304
|
* ```ts
|
|
107
|
-
* const
|
|
305
|
+
* const caps = await permissionless.oracles.getMarketCap({
|
|
108
306
|
* chainId: 1,
|
|
109
|
-
*
|
|
307
|
+
* asset: token,
|
|
308
|
+
* priceFeeds: [main, reserve],
|
|
110
309
|
* });
|
|
111
310
|
* ```
|
|
112
|
-
*
|
|
113
|
-
* @returns A price per feed, in the 8 decimals every Gearbox feed reports.
|
|
114
311
|
**/
|
|
115
|
-
|
|
312
|
+
getMarketCap(scope: AssetCap | FeedCap | Array<AssetCap | FeedCap>): Promise<MarketCap[]>;
|
|
116
313
|
}
|
|
117
314
|
//#endregion
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { PermissionlessAssetQuota, PermissionlessIndexedAssetSummary, PermissionlessQuotaTotals, PriceFeedPrice } from "./types.js";
|
|
2
|
+
import { Address } from "viem";
|
|
3
|
+
//#region src/permissionless/api/oracles/enrich.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* What the oracles namespace works out for itself once the backend has
|
|
6
|
+
* answered.
|
|
7
|
+
*
|
|
8
|
+
* All of it used to be the backend's, and all of it needs the chain: a quota
|
|
9
|
+
* is denominated in its market's own underlying and a market cap is a supply
|
|
10
|
+
* times a price, so none of these can be indexed — they can only be read at
|
|
11
|
+
* the block the reader is on. Keeping them here means one description of each
|
|
12
|
+
* rule rather than one per service that wants it, and a backend that holds no
|
|
13
|
+
* viem client at all.
|
|
14
|
+
**/
|
|
15
|
+
/** Identifies a feed across chains, since an address alone does not. */
|
|
16
|
+
export declare function feedKey(chainId: number, address: Address): string;
|
|
17
|
+
/** Prices looked up the way {@link totalQuotas} and the caps need them. */
|
|
18
|
+
export declare function pricesByFeed(prices: PriceFeedPrice[]): Map<string, bigint | null>;
|
|
19
|
+
/**
|
|
20
|
+
* The asset's quota across its markets, totalled in USD.
|
|
21
|
+
*
|
|
22
|
+
* Each market's figures are converted at the price that market's own oracle
|
|
23
|
+
* holds for its underlying, which is the same number that market's accounting
|
|
24
|
+
* uses.
|
|
25
|
+
*
|
|
26
|
+
* Limits count only the markets still running, because a shut down market's
|
|
27
|
+
* limit is not borrowable; what is already quoted counts everywhere, because
|
|
28
|
+
* debt outstanding is exposure either way. A market whose underlying could not
|
|
29
|
+
* be priced is skipped, which makes both figures floors, and `null` is nothing
|
|
30
|
+
* to total rather than a zero.
|
|
31
|
+
*
|
|
32
|
+
* @param priceOf - The price each underlying feed reports, in the 8 decimals
|
|
33
|
+
* every Gearbox feed uses.
|
|
34
|
+
*/
|
|
35
|
+
export declare function totalQuotas(quotas: PermissionlessAssetQuota[], priceOf: (feed: Address) => bigint | null | undefined): PermissionlessQuotaTotals;
|
|
36
|
+
/**
|
|
37
|
+
* What one feed values one asset's supply at: `price × totalSupply`.
|
|
38
|
+
*
|
|
39
|
+
* Multiplied as integers and formatted once, rather than through two floats:
|
|
40
|
+
* an 8-decimal price times an 18-decimal supply loses its small end to a JS
|
|
41
|
+
* number long before it loses the large one, and the figure is a total rather
|
|
42
|
+
* than an estimate.
|
|
43
|
+
*
|
|
44
|
+
* `null` if either side could not be read — an asset nobody could price is
|
|
45
|
+
* not an asset worth nothing.
|
|
46
|
+
*/
|
|
47
|
+
export declare function toCap(price: bigint | null | undefined, totalSupply: bigint | null | undefined, decimals: number): string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Assets ordered the way a reader scans them: what the protocol is built on
|
|
50
|
+
* first, then what is actually borrowed against it, then what it is merely
|
|
51
|
+
* allowed to be borrowed against.
|
|
52
|
+
*
|
|
53
|
+
* Applied here and not by the backend because the two middle terms are the
|
|
54
|
+
* converted quotas, which only exist once the chain has been read. The
|
|
55
|
+
* backend orders by the first term and the tie-breakers, so a caller reading
|
|
56
|
+
* the route directly still gets a stable order; this refines it.
|
|
57
|
+
*/
|
|
58
|
+
export declare function byCentrality<T extends PermissionlessIndexedAssetSummary & PermissionlessQuotaTotals>(a: T, b: T): number;
|
|
59
|
+
//#endregion
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssetScore, AssetScoresArgs, MarketScore, ScoredFeed } from "./score/types.js";
|
|
2
|
+
import { BreakingPoint, FeedOutcome, GroupReport, GroupScenarioOutcome, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs } from "./stress/types.js";
|
|
3
|
+
import { AssetArgs, AssetCap, AssetsArgs, FeedCap, MarketCap, PermissionlessAsset, PermissionlessAssetDetails, PermissionlessAssetMarket, PermissionlessAssetMarketFeed, PermissionlessAssetQuota, PermissionlessAssetSummary, PermissionlessIndexedAssetDetails, PermissionlessIndexedAssetSummary, PermissionlessIndexedPriceFeedDetails, PermissionlessIndexedPriceFeedMarket, PermissionlessMarket, PermissionlessMarketSlot, PermissionlessPriceFeedAsset, PermissionlessPriceFeedDetails, PermissionlessPriceFeedMarket, PermissionlessPriceFeedStore, PermissionlessQuotaTotals, PriceFeedArgs, PriceFeedDecimals, PriceFeedPrice, PriceFeedRef } from "./types.js";
|
|
2
4
|
import { GET_PRICES_CHUNK_SIZE, GET_PRICES_GAS_LIMIT_BY_CHAIN_ID, PermissionlessOracles } from "./PermissionlessOracles.js";
|
|
3
|
-
|
|
5
|
+
import { BOUND_WEIGHT, INDEPENDENCE_WEIGHT, ScoreSource, scoreMarket } from "./score/formula.js";
|
|
6
|
+
import { runAssetScores } from "./score/run.js";
|
|
7
|
+
import "./score/index.js";
|
|
8
|
+
import { TreeNode, classifySources, sourcesByFeed } from "./stress/classify.js";
|
|
9
|
+
import { UNBOUNDED_DOWN, UNBOUNDED_UP, groupOverride, perturb, rateStub, roundDataStub } from "./stress/override.js";
|
|
10
|
+
import { DEFAULT_SCENARIOS, RATE_FEED_TYPE, readForest, readRateTargets, runStressTest } from "./stress/run.js";
|
|
11
|
+
import { scoreGroup, slotHarm, verdictOf } from "./stress/score.js";
|
|
12
|
+
import "./stress/index.js";
|
|
13
|
+
export { AssetArgs, AssetCap, AssetScore, AssetScoresArgs, AssetsArgs, BOUND_WEIGHT, BreakingPoint, DEFAULT_SCENARIOS, FeedCap, FeedOutcome, GET_PRICES_CHUNK_SIZE, GET_PRICES_GAS_LIMIT_BY_CHAIN_ID, GroupReport, GroupScenarioOutcome, INDEPENDENCE_WEIGHT, MarketCap, MarketScore, PermissionlessAsset, PermissionlessAssetDetails, PermissionlessAssetMarket, PermissionlessAssetMarketFeed, PermissionlessAssetQuota, PermissionlessAssetSummary, PermissionlessIndexedAssetDetails, PermissionlessIndexedAssetSummary, PermissionlessIndexedPriceFeedDetails, PermissionlessIndexedPriceFeedMarket, PermissionlessMarket, PermissionlessMarketSlot, PermissionlessOracles, PermissionlessPriceFeedAsset, PermissionlessPriceFeedDetails, PermissionlessPriceFeedMarket, PermissionlessPriceFeedStore, PermissionlessQuotaTotals, PriceFeedArgs, PriceFeedDecimals, PriceFeedPrice, PriceFeedRef, RATE_FEED_TYPE, ScoreSource, ScoredFeed, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs, TreeNode, UNBOUNDED_DOWN, UNBOUNDED_UP, classifySources, groupOverride, perturb, rateStub, readForest, readRateTargets, roundDataStub, runAssetScores, runStressTest, scoreGroup, scoreMarket, slotHarm, sourcesByFeed, verdictOf };
|