@gearbox-protocol/sdk 16.0.0-next.35 → 16.0.0-next.37
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/delayed-intent.schema.js +35 -0
- package/dist/cjs/model/index.js +5 -0
- package/dist/cjs/model/withdrawals.js +1 -0
- package/dist/cjs/model/withdrawals.schema.js +39 -0
- package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +0 -10
- package/dist/cjs/onchain/positions/MultichainPositionsService.js +14 -0
- package/dist/cjs/onchain/positions/PositionsService.js +60 -0
- package/dist/cjs/preview/index.js +2 -0
- package/dist/cjs/preview/preview/estimateClaimableAt.js +21 -0
- package/dist/cjs/preview/preview/index.js +2 -0
- package/dist/cjs/preview/preview/previewOperation.js +2 -0
- package/dist/cjs/sdk/positions/PositionsNamespace.js +6 -0
- package/dist/cjs/sdk/prepare/PrepareApi.js +22 -1
- package/dist/esm/model/delayed-intent.schema.js +34 -0
- package/dist/esm/model/index.js +3 -1
- package/dist/esm/model/withdrawals.js +1 -0
- package/dist/esm/model/withdrawals.schema.js +36 -0
- package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +0 -10
- package/dist/esm/onchain/positions/MultichainPositionsService.js +14 -0
- package/dist/esm/onchain/positions/PositionsService.js +60 -0
- package/dist/esm/preview/index.js +2 -1
- package/dist/esm/preview/preview/estimateClaimableAt.js +20 -0
- package/dist/esm/preview/preview/index.js +2 -1
- package/dist/esm/preview/preview/previewOperation.js +2 -0
- package/dist/esm/sdk/positions/PositionsNamespace.js +6 -0
- package/dist/esm/sdk/prepare/PrepareApi.js +22 -1
- package/dist/types/model/delayed-intent.schema.d.ts +28 -0
- package/dist/types/model/index.d.ts +3 -1
- package/dist/types/model/previews.d.ts +7 -1
- package/dist/types/model/withdrawals.d.ts +87 -0
- package/dist/types/model/withdrawals.schema.d.ts +243 -0
- package/dist/types/onchain/accounts/CreditAccountsServiceV310.d.ts +1 -5
- package/dist/types/onchain/accounts/index.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/types.d.ts +2 -1
- package/dist/types/onchain/accounts/types.d.ts +2 -27
- package/dist/types/onchain/index.d.ts +3 -3
- package/dist/types/onchain/positions/MultichainPositionsService.d.ts +7 -1
- package/dist/types/onchain/positions/PositionsService.d.ts +9 -1
- package/dist/types/onchain/positions/index.d.ts +2 -2
- package/dist/types/onchain/positions/types.d.ts +31 -2
- package/dist/types/preview/index.d.ts +2 -1
- package/dist/types/preview/preview/estimateClaimableAt.d.ts +19 -0
- package/dist/types/preview/preview/index.d.ts +2 -1
- package/dist/types/sdk/positions/PositionsNamespace.d.ts +8 -2
- package/dist/types/sdk/positions/types.d.ts +11 -3
- package/dist/types/sdk/prepare/types.d.ts +6 -5
- package/package.json +1 -1
|
@@ -199,7 +199,7 @@ import { ContractMethod, IPriceUpdateTx, MultiCall, RawTx } from "./types/transa
|
|
|
199
199
|
import { AddLiquidityProps, DepositMetadata, IPoolsService, ListPoolPositionsProps, MarketType, PoolServiceCall, PoolServiceCallResult, PoolSimulation, RemoveLiquidityProps, SimulatePoolOperationProps, WithdrawalMetadata } from "./pools/types.js";
|
|
200
200
|
import { PoolService, toShares, toSharesUp } from "./pools/PoolService.js";
|
|
201
201
|
import "./pools/index.js";
|
|
202
|
-
import { AccountSnapshot, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./positions/types.js";
|
|
202
|
+
import { AccountSnapshot, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./positions/types.js";
|
|
203
203
|
import { CalcBorrowRateProps, calcBorrowRate } from "./positions/calcBorrowRate.js";
|
|
204
204
|
import { CalcHealthFactorProps, calcHealthFactor } from "./positions/calcHealthFactor.js";
|
|
205
205
|
import { CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, calcLiquidationPriceForTarget } from "./positions/calcLiquidationPriceForTarget.js";
|
|
@@ -250,7 +250,7 @@ import { RedemptionLoggerV310Contract } from "./accounts/withdrawal-compressor/R
|
|
|
250
250
|
import { WithdrawalCompressorV310Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js";
|
|
251
251
|
import { WithdrawalCompressorV311Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js";
|
|
252
252
|
import { WithdrawalCompressorV313Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js";
|
|
253
|
-
import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps,
|
|
253
|
+
import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards } from "./accounts/types.js";
|
|
254
254
|
import { AccountToCheck, BotStatusCall, BotsDirectResponse, CMSlice, ConnectedBotsCall, ConnectedBotsPerAccount, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, MulticallWithFailure, SetBotProps, SetBotResult } from "./accounts/bots/types.js";
|
|
255
255
|
import { AccountBotsService } from "./accounts/bots/AccountBotsService.js";
|
|
256
256
|
import { PeripheryCompressorV310Contract } from "./accounts/bots/PeripheryCompressorV310Contract.js";
|
|
@@ -274,4 +274,4 @@ import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./opti
|
|
|
274
274
|
import { MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_SAFE_HEALTH_FACTOR_FORM, amountOf, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, isMalformedPreviewError } from "./validation/checks.js";
|
|
275
275
|
import { toToken, toTokenAmount } from "./validation/token.js";
|
|
276
276
|
import "./validation/index.js";
|
|
277
|
-
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, AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountMigratorAdapterContract, AccountSnapshot, AccountToCheck, AdapterContractStateHuman, AdapterContractType, AdapterData, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, type AddCollateralIntent, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetWithAmountInTarget, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BasicSwapCall, BigIntMath, type BlockNumberProps, BorrowLimitBinding, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcDefaultQuotaProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, CallTrace, CamelotPool, CamelotV3AdapterContract, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, 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, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DaiUsdsAdapterContract, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawalClaim, DelayedWithdrawalRequest, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, FluidDexAdapterContract, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetInvestorOptions, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetReward, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IMultichainOpportunitiesService, IMultichainPositionsService, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, type InstantRoute, IntentPreviewError, type IntentPreviewResult, type IntentRoutesResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LegacyAdapterOperation, type LeverageBand, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MakerDeposit, MakerRedeem, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, Methods, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OpenStrategyState, type OperationState, 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, type PathLossRate, PendingWithdrawal, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewRefusal, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, ProjectedPoolOptions, PythPriceFeed, QuotaKeeperState, QuotaMode, type QuotaParamsHuman, QuotaSlice, 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, RedemptionPhantomRename, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteRefusals, 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, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOnRampAdapterContract, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StakingRewardsAdapterContract, type StartIntent, StrategyCollateralProps, StrategyRateInputs, SupportedValue, Swap, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenAmount, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, type TumblerStateHuman, TypedObjectUtils, Unarray, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VERSION_RANGE_310, VaultDeposit, VelodromeV2RouterAdapterContract, VersionRange, VersionedAbi, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, type WithdrawAssetIntent, WithdrawCollateral, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, borrowable, botPermissionsToString, bpsToRay, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, childLogger, classifyCurveOperation, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, creditOperationMarket, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isDust, isLPPriceFeed, isMalformedPreviewError, isPhantomToken, isPublicNetwork, isRWAFactory, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, percentFmt, pickStrategyTargetCollateral, raise, rayToBps, rayToNumber, refuse, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, totalLiquidationDiscount, usdToNumber, watchBlocksAsync };
|
|
277
|
+
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, AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountMigratorAdapterContract, AccountSnapshot, AccountToCheck, AdapterContractStateHuman, AdapterContractType, AdapterData, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, type AddCollateralIntent, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetWithAmountInTarget, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BasicSwapCall, BigIntMath, type BlockNumberProps, BorrowLimitBinding, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcDefaultQuotaProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, CallTrace, CamelotPool, CamelotV3AdapterContract, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, 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, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DaiUsdsAdapterContract, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawalClaim, DelayedWithdrawalRequest, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, FluidDexAdapterContract, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, GetExternalAccountCurrentWithdrawalsProps, GetInvestorOptions, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetReward, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IMultichainOpportunitiesService, IMultichainPositionsService, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, type InstantRoute, IntentPreviewError, type IntentPreviewResult, type IntentRoutesResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LegacyAdapterOperation, type LeverageBand, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MakerDeposit, MakerRedeem, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, Methods, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OpenStrategyState, type OperationState, 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, type PathLossRate, PendingWithdrawal, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewRefusal, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, ProjectedPoolOptions, PythPriceFeed, QuotaKeeperState, QuotaMode, type QuotaParamsHuman, QuotaSlice, 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, RedemptionPhantomRename, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteRefusals, 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, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOnRampAdapterContract, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StakingRewardsAdapterContract, type StartIntent, StrategyCollateralProps, StrategyRateInputs, SupportedValue, Swap, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenAmount, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, type TumblerStateHuman, TypedObjectUtils, Unarray, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VERSION_RANGE_310, VaultDeposit, VelodromeV2RouterAdapterContract, VersionRange, VersionedAbi, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, type WithdrawAssetIntent, WithdrawCollateral, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, borrowable, botPermissionsToString, bpsToRay, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, childLogger, classifyCurveOperation, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, creditOperationMarket, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isDust, isLPPriceFeed, isMalformedPreviewError, isPhantomToken, isPublicNetwork, isRWAFactory, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, percentFmt, pickStrategyTargetCollateral, raise, rayToBps, rayToNumber, refuse, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, totalLiquidationDiscount, usdToNumber, watchBlocksAsync };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Position } from "../../model/positions.js";
|
|
2
2
|
import { DataResponse } from "../../model/response.js";
|
|
3
|
+
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
3
4
|
import "../../model/index.js";
|
|
4
5
|
import { PluginsMap } from "../plugins/types.js";
|
|
5
6
|
import "../plugins/index.js";
|
|
6
|
-
import { IMultichainPositionsService, ListPositionsProps } from "./types.js";
|
|
7
|
+
import { GetCurrentWithdrawalsProps, IMultichainPositionsService, ListPositionsProps } from "./types.js";
|
|
7
8
|
import { MultichainConstruct } from "../base/MultichainConstruct.js";
|
|
8
9
|
import "../base/index.js";
|
|
9
10
|
//#region src/onchain/positions/MultichainPositionsService.d.ts
|
|
@@ -18,6 +19,11 @@ declare class MultichainPositionsService<const Plugins extends PluginsMap = {}>
|
|
|
18
19
|
* {@link PositionsService.list}.
|
|
19
20
|
**/
|
|
20
21
|
list(props: ListPositionsProps<true>): Promise<DataResponse<Position[]>>;
|
|
22
|
+
/**
|
|
23
|
+
* Delayed withdrawals of one credit account, see
|
|
24
|
+
* {@link PositionsService.getCurrentWithdrawals}.
|
|
25
|
+
**/
|
|
26
|
+
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps<true>): Promise<DataResponse<PositionWithdrawals>>;
|
|
21
27
|
}
|
|
22
28
|
//#endregion
|
|
23
29
|
export { MultichainPositionsService };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Bps } from "../../model/primitives.js";
|
|
2
2
|
import { BorrowRateBreakdown, Position, StrategyPosition } from "../../model/positions.js";
|
|
3
3
|
import { AccountMetrics, AccountProjection } from "../../model/previews.js";
|
|
4
|
+
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
4
5
|
import "../../model/index.js";
|
|
5
|
-
import { AccountSnapshot, ListPositionsProps, ListStrategyPositionsProps } from "./types.js";
|
|
6
|
+
import { AccountSnapshot, GetCurrentWithdrawalsProps, ListPositionsProps, ListStrategyPositionsProps } from "./types.js";
|
|
6
7
|
import { SDKConstruct } from "../base/SDKConstruct.js";
|
|
7
8
|
import "../base/index.js";
|
|
8
9
|
//#region src/onchain/positions/PositionsService.d.ts
|
|
@@ -41,6 +42,13 @@ declare class PositionsService extends SDKConstruct {
|
|
|
41
42
|
* @param props - {@link ListStrategyPositionsProps}
|
|
42
43
|
**/
|
|
43
44
|
listStrategyPositions(props: ListStrategyPositionsProps): Promise<StrategyPosition[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Returns delayed withdrawals of a strategy position
|
|
47
|
+
*
|
|
48
|
+
* Empty when this chain has no withdrawal compressor, or the account does
|
|
49
|
+
* not exist.
|
|
50
|
+
**/
|
|
51
|
+
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps): Promise<PositionWithdrawals>;
|
|
44
52
|
/**
|
|
45
53
|
* Health factor of an account state, in basis points (`10000` = 1.0).
|
|
46
54
|
**/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountSnapshot, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./types.js";
|
|
1
|
+
import { AccountSnapshot, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./types.js";
|
|
2
2
|
import { CalcBorrowRateProps, calcBorrowRate } from "./calcBorrowRate.js";
|
|
3
3
|
import { CalcHealthFactorProps, calcHealthFactor } from "./calcHealthFactor.js";
|
|
4
4
|
import { CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, calcLiquidationPriceForTarget } from "./calcLiquidationPriceForTarget.js";
|
|
@@ -6,4 +6,4 @@ import { calcLiquidationPrice, soleNonUnderlyingCollateral } from "./calcLiquida
|
|
|
6
6
|
import { calcTimeToLiquidationMs } from "./calcTimeToLiquidationMs.js";
|
|
7
7
|
import { MultichainPositionsService } from "./MultichainPositionsService.js";
|
|
8
8
|
import { PositionsService, ProjectedPoolOptions } from "./PositionsService.js";
|
|
9
|
-
export { AccountSnapshot, CalcBorrowRateProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, MultichainPositionsService, PositionsService, ProjectedPoolOptions, accountSnapshotFromCreditAccountData, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcTimeToLiquidationMs, soleNonUnderlyingCollateral };
|
|
9
|
+
export { AccountSnapshot, CalcBorrowRateProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, MultichainPositionsService, PositionsService, ProjectedPoolOptions, accountSnapshotFromCreditAccountData, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcTimeToLiquidationMs, soleNonUnderlyingCollateral };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ChainId } from "../../model/primitives.js";
|
|
1
2
|
import { Position, PositionFilter } from "../../model/positions.js";
|
|
2
3
|
import { DataResponse } from "../../model/response.js";
|
|
4
|
+
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
3
5
|
import "../../model/index.js";
|
|
4
|
-
import { WithBlock } from "../types/multichain.js";
|
|
6
|
+
import { WithBlock, WithMultichain } from "../types/multichain.js";
|
|
5
7
|
import { Asset, CreditAccountData } from "../base/types.js";
|
|
6
8
|
import "../types/index.js";
|
|
7
9
|
import "../base/index.js";
|
|
@@ -33,6 +35,28 @@ interface ListPositionsPropsBase {
|
|
|
33
35
|
* {@link MultichainPositionsService.list}.
|
|
34
36
|
**/
|
|
35
37
|
type ListPositionsProps<Multichain extends boolean = false> = ListPositionsPropsBase & WithBlock<Multichain>;
|
|
38
|
+
/**
|
|
39
|
+
* Chain-independent part of {@link GetCurrentWithdrawalsProps}.
|
|
40
|
+
*
|
|
41
|
+
* {@link GetCurrentWithdrawalsPropsBase.blockNumber} is kept on the
|
|
42
|
+
* multichain form because the method already targets a single chain.
|
|
43
|
+
**/
|
|
44
|
+
interface GetCurrentWithdrawalsPropsBase {
|
|
45
|
+
/**
|
|
46
|
+
* Credit account whose delayed withdrawals to read.
|
|
47
|
+
**/
|
|
48
|
+
creditAccount: Address;
|
|
49
|
+
/**
|
|
50
|
+
* Block to read at. Defaults to the latest block.
|
|
51
|
+
**/
|
|
52
|
+
blockNumber?: bigint;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Props for {@link PositionsService.getCurrentWithdrawals}.
|
|
56
|
+
**/
|
|
57
|
+
type GetCurrentWithdrawalsProps<Multichain extends boolean = false> = GetCurrentWithdrawalsPropsBase & WithMultichain<Multichain, {
|
|
58
|
+
chainId: ChainId;
|
|
59
|
+
}>;
|
|
36
60
|
/**
|
|
37
61
|
* Cross-chain reads of the positions namespace: everything a wallet holds.
|
|
38
62
|
**/
|
|
@@ -41,6 +65,11 @@ interface IMultichainPositionsService {
|
|
|
41
65
|
* Positions of a wallet on all queried chains.
|
|
42
66
|
**/
|
|
43
67
|
list(props: ListPositionsProps<true>): Promise<DataResponse<Position[]>>;
|
|
68
|
+
/**
|
|
69
|
+
* Delayed withdrawals of one credit account, see
|
|
70
|
+
* {@link PositionsService.getCurrentWithdrawals}.
|
|
71
|
+
**/
|
|
72
|
+
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps<true>): Promise<DataResponse<PositionWithdrawals>>;
|
|
44
73
|
}
|
|
45
74
|
/**
|
|
46
75
|
* Props for {@link PositionsService.listStrategyPositions}.
|
|
@@ -96,4 +125,4 @@ interface AccountSnapshot {
|
|
|
96
125
|
**/
|
|
97
126
|
declare function accountSnapshotFromCreditAccountData(ca: CreditAccountData): AccountSnapshot;
|
|
98
127
|
//#endregion
|
|
99
|
-
export { AccountSnapshot, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData };
|
|
128
|
+
export { AccountSnapshot, GetCurrentWithdrawalsProps, GetCurrentWithdrawalsPropsBase, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData };
|
|
@@ -32,6 +32,7 @@ import { buildDelayedStrategyPositionOperationPreview } from "./preview/buildDel
|
|
|
32
32
|
import { classifyCloseOrRepay, isCloseOrRepay } from "./preview/detectCloseOrRepay.js";
|
|
33
33
|
import { DetectedDelayedClaim, detectDelayedClaim, resolveDelayedClaimIntent } from "./preview/detectDelayedClaim.js";
|
|
34
34
|
import { UnsupportedOperationError } from "./preview/errors.js";
|
|
35
|
+
import { estimateClaimableAt } from "./preview/estimateClaimableAt.js";
|
|
35
36
|
import { previewAdjustStrategyPosition } from "./preview/previewAdjustStrategyPosition.js";
|
|
36
37
|
import { CloseOrRepayOperation, previewExitOrRepayStrategyPosition } from "./preview/previewExitOrRepayStrategyPosition.js";
|
|
37
38
|
import { previewOperation } from "./preview/previewOperation.js";
|
|
@@ -41,4 +42,4 @@ import "./preview/index.js";
|
|
|
41
42
|
import { CheckOperationOptions, WeighedFactors, checkOperation, collateralIssue, marketIssues, quotaCountIssue } from "./validate/checkOperation.js";
|
|
42
43
|
import { checkSimulation } from "./validate/checkSimulation.js";
|
|
43
44
|
import "./validate/index.js";
|
|
44
|
-
export { AdapterOperation, AdapterOperationBase, AddCollateralOp, AllowanceDetail, AllowancePrerequisite, AllowanceResult, BalanceDetail, BalancePrerequisite, BalanceResult, BorrowLimitBinding, CheckOperationOptions, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseOrRepayOperation, CompareBalancesOp, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, ExtractTransfersResult, FacadeCallType, FacadeOperationMetadata, FacadeParsedCall, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, IntentPreviewError, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, Operation, OperationMetadata, OuterFacadeOperation, PartialLiquidationOperation, PoolDepositOperation, PoolMintOperation, PoolOperation, PoolRedeemOperation, PoolWithdrawOperation, Prerequisite, PrerequisiteContext, PrerequisiteError, PrerequisiteKind, PrerequisiteOutcome, PrerequisiteResult, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewOperationInput, PreviewOperationOptions, PreviewRefusal, RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOpenRequirementsDetail, RWAOpenRequirementsPrerequisite, RWAOpenRequirementsResult, RWAOperation, RWAOperationMetadata, ReplayMulticallResult, ReplayState, ReplayableOperation, StoreExpectedBalancesOp, TokenTransfer, TraceAdapterExt, TransferAlignmentError, UnexpectedFacadeEventOrderError, UnknownAdapterError, UnknownFacadeCallError, UnsupportedOperationError, UnsupportedPoolFunctionError, UnsupportedTargetError, UnsupportedZapperFunctionError, UpdateQuotaOp, WeighedFactors, WithdrawCollateralAlignmentError, WithdrawCollateralEventInfo, WithdrawCollateralOp, buildDelayedStrategyPositionOperationPreview, checkOperation, checkPrerequisites, checkSimulation, classifyCloseOrRepay, classifyInnerOperations, collateralIssue, detectDelayedClaim, detectDelayedOperation, extractAdapterCallTraces, extractTransfers, findFacadeCalls, isCloseOrRepay, isPoolOperation, isRWAOperation, makeReplayState, marketIssues, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parseRWAFactoryOperationCalldata, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, quotaCountIssue, raise, refuse, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
45
|
+
export { AdapterOperation, AdapterOperationBase, AddCollateralOp, AllowanceDetail, AllowancePrerequisite, AllowanceResult, BalanceDetail, BalancePrerequisite, BalanceResult, BorrowLimitBinding, CheckOperationOptions, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseOrRepayOperation, CompareBalancesOp, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, ExtractTransfersResult, FacadeCallType, FacadeOperationMetadata, FacadeParsedCall, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, IntentPreviewError, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, Operation, OperationMetadata, OuterFacadeOperation, PartialLiquidationOperation, PoolDepositOperation, PoolMintOperation, PoolOperation, PoolRedeemOperation, PoolWithdrawOperation, Prerequisite, PrerequisiteContext, PrerequisiteError, PrerequisiteKind, PrerequisiteOutcome, PrerequisiteResult, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewOperationInput, PreviewOperationOptions, PreviewRefusal, RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOpenRequirementsDetail, RWAOpenRequirementsPrerequisite, RWAOpenRequirementsResult, RWAOperation, RWAOperationMetadata, ReplayMulticallResult, ReplayState, ReplayableOperation, StoreExpectedBalancesOp, TokenTransfer, TraceAdapterExt, TransferAlignmentError, UnexpectedFacadeEventOrderError, UnknownAdapterError, UnknownFacadeCallError, UnsupportedOperationError, UnsupportedPoolFunctionError, UnsupportedTargetError, UnsupportedZapperFunctionError, UpdateQuotaOp, WeighedFactors, WithdrawCollateralAlignmentError, WithdrawCollateralEventInfo, WithdrawCollateralOp, buildDelayedStrategyPositionOperationPreview, checkOperation, checkPrerequisites, checkSimulation, classifyCloseOrRepay, classifyInnerOperations, collateralIssue, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, extractAdapterCallTraces, extractTransfers, findFacadeCalls, isCloseOrRepay, isPoolOperation, isRWAOperation, makeReplayState, marketIssues, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parseRWAFactoryOperationCalldata, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, quotaCountIssue, raise, refuse, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Timestamp } from "../../model/primitives.js";
|
|
2
|
+
import "../../model/index.js";
|
|
3
|
+
import { PluginsMap } from "../../onchain/plugins/types.js";
|
|
4
|
+
import { OnchainSDK } from "../../onchain/OnchainSDK.js";
|
|
5
|
+
import "../../onchain/index.js";
|
|
6
|
+
import { Address } from "viem";
|
|
7
|
+
//#region src/preview/preview/estimateClaimableAt.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Estimates when a newly requested delayed withdrawal becomes claimable:
|
|
10
|
+
* `now + withdrawalLength` of the cached withdrawable asset whose phantom
|
|
11
|
+
* token matches `phantomToken`. Same formula as
|
|
12
|
+
* `getWithdrawalRequestResult().claimableAt`.
|
|
13
|
+
*
|
|
14
|
+
* Returns `undefined` when the withdrawal compressor is missing, its assets
|
|
15
|
+
* cache is not loaded, or no asset matches the phantom token.
|
|
16
|
+
*/
|
|
17
|
+
declare function estimateClaimableAt<P extends PluginsMap>(sdk: OnchainSDK<P>, phantomToken: Address): Timestamp | undefined;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { estimateClaimableAt };
|
|
@@ -4,9 +4,10 @@ import { buildDelayedStrategyPositionOperationPreview } from "./buildDelayedStra
|
|
|
4
4
|
import { classifyCloseOrRepay, isCloseOrRepay } from "./detectCloseOrRepay.js";
|
|
5
5
|
import { DetectedDelayedClaim, detectDelayedClaim, resolveDelayedClaimIntent } from "./detectDelayedClaim.js";
|
|
6
6
|
import { UnsupportedOperationError } from "./errors.js";
|
|
7
|
+
import { estimateClaimableAt } from "./estimateClaimableAt.js";
|
|
7
8
|
import { previewAdjustStrategyPosition } from "./previewAdjustStrategyPosition.js";
|
|
8
9
|
import { CloseOrRepayOperation, previewExitOrRepayStrategyPosition } from "./previewExitOrRepayStrategyPosition.js";
|
|
9
10
|
import { previewOperation } from "./previewOperation.js";
|
|
10
11
|
import { ReplayState, makeReplayState, replayInnerOperations } from "./replayInnerOperations.js";
|
|
11
12
|
import { ReplayMulticallResult, ReplayableOperation, replayMulticall } from "./replayMulticall.js";
|
|
12
|
-
export { CloseOrRepayOperation, CreditAccountState, CreditAccountStateProps, DetectedDelayedClaim, DetectedDelayedOperation, ReplayMulticallResult, ReplayState, ReplayableOperation, UnsupportedOperationError, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, detectDelayedClaim, detectDelayedOperation, isCloseOrRepay, makeReplayState, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
13
|
+
export { CloseOrRepayOperation, CreditAccountState, CreditAccountStateProps, DetectedDelayedClaim, DetectedDelayedOperation, ReplayMulticallResult, ReplayState, ReplayableOperation, UnsupportedOperationError, buildDelayedStrategyPositionOperationPreview, classifyCloseOrRepay, detectDelayedClaim, detectDelayedOperation, estimateClaimableAt, isCloseOrRepay, makeReplayState, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { ChartBundle, ChartRange, PoolPositionChartMetric, StrategyPositionChartMetric } from "../../model/charts.js";
|
|
2
2
|
import { PoolPositionRef, Position, PositionFilter, PositionsTotals, StrategyPositionRef } from "../../model/positions.js";
|
|
3
3
|
import { DataResponse } from "../../model/response.js";
|
|
4
|
+
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
4
5
|
import "../../model/index.js";
|
|
6
|
+
import { GetCurrentWithdrawalsProps } from "../../onchain/positions/types.js";
|
|
5
7
|
import { MultichainSDK } from "../../onchain/MultichainSDK.js";
|
|
6
8
|
import "../../onchain/index.js";
|
|
7
9
|
import { GearboxAPI } from "../../offchain/GearboxAPI.js";
|
|
8
10
|
import "../../offchain/index.js";
|
|
9
11
|
import { FilterResult } from "../utils/types.js";
|
|
10
12
|
import "../utils/index.js";
|
|
11
|
-
import { IPositionMergers, IPositionsBase, IPositionsOffchainBranch, IPositionsOffchainOnly, IPositionsOnchainBranch } from "./types.js";
|
|
13
|
+
import { IPositionMergers, IPositionsBase, IPositionsOffchainBranch, IPositionsOffchainOnly, IPositionsOnchainBranch, IPositionsOnchainOnly } from "./types.js";
|
|
12
14
|
import { NamespaceOptions } from "../types.js";
|
|
13
15
|
import { AbstractNamespace } from "../AbstractNamespace.js";
|
|
14
16
|
import { Address } from "viem";
|
|
@@ -17,7 +19,7 @@ import { Address } from "viem";
|
|
|
17
19
|
* The `positions` namespace of a {@link GearboxSDK}, see
|
|
18
20
|
* {@link IPositionsByMode} for what each mode offers.
|
|
19
21
|
**/
|
|
20
|
-
declare class PositionsNamespace extends AbstractNamespace<MultichainSDK["positions"], GearboxAPI["positions"]> implements IPositionsBase, IPositionsOffchainOnly, IPositionsOnchainBranch, IPositionsOffchainBranch {
|
|
22
|
+
declare class PositionsNamespace extends AbstractNamespace<MultichainSDK["positions"], GearboxAPI["positions"]> implements IPositionsBase, IPositionsOffchainOnly, IPositionsOnchainOnly, IPositionsOnchainBranch, IPositionsOffchainBranch {
|
|
21
23
|
/**
|
|
22
24
|
* {@inheritDoc IPositionsBase.merge}
|
|
23
25
|
**/
|
|
@@ -40,6 +42,10 @@ declare class PositionsNamespace extends AbstractNamespace<MultichainSDK["positi
|
|
|
40
42
|
**/
|
|
41
43
|
charts<const Metrics extends readonly PoolPositionChartMetric[]>(key: PoolPositionRef, metrics: Metrics, range: ChartRange): Promise<DataResponse<ChartBundle<Metrics>>>;
|
|
42
44
|
charts<const Metrics extends readonly StrategyPositionChartMetric[]>(key: StrategyPositionRef, metrics: Metrics, range: ChartRange): Promise<DataResponse<ChartBundle<Metrics>>>;
|
|
45
|
+
/**
|
|
46
|
+
* {@inheritDoc IPositionsOnchainOnly.getCurrentWithdrawals}
|
|
47
|
+
**/
|
|
48
|
+
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps<true>): Promise<DataResponse<PositionWithdrawals>>;
|
|
43
49
|
}
|
|
44
50
|
//#endregion
|
|
45
51
|
export { PositionsNamespace };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ChartBundle, ChartRange, PoolPositionChartMetric, StrategyPositionChartMetric } from "../../model/charts.js";
|
|
2
2
|
import { PoolPositionRef, Position, PositionFilter, PositionsTotals, StrategyPositionRef } from "../../model/positions.js";
|
|
3
3
|
import { DataResponse } from "../../model/response.js";
|
|
4
|
+
import { PositionWithdrawals } from "../../model/withdrawals.js";
|
|
4
5
|
import "../../model/index.js";
|
|
5
|
-
import { IMultichainPositionsService } from "../../onchain/positions/types.js";
|
|
6
|
+
import { GetCurrentWithdrawalsProps, IMultichainPositionsService } from "../../onchain/positions/types.js";
|
|
6
7
|
import "../../onchain/index.js";
|
|
7
8
|
import { IOffchainPositions } from "../../offchain/positions/types.js";
|
|
8
9
|
import "../../offchain/index.js";
|
|
@@ -58,9 +59,16 @@ interface IPositionsOffchainOnly {
|
|
|
58
59
|
charts<const Metrics extends readonly StrategyPositionChartMetric[]>(key: StrategyPositionRef, metrics: Metrics, range: ChartRange): Promise<DataResponse<ChartBundle<Metrics>>>;
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
|
-
* Reads only the chain can answer.
|
|
62
|
+
* Reads only the chain can answer.
|
|
62
63
|
**/
|
|
63
|
-
interface IPositionsOnchainOnly {
|
|
64
|
+
interface IPositionsOnchainOnly {
|
|
65
|
+
/**
|
|
66
|
+
* Delayed withdrawals of one credit account: claimable rows carry the
|
|
67
|
+
* adapter call and recorded intent a claim is built from; pending rows
|
|
68
|
+
* name when they mature. Absent in `offchain` mode.
|
|
69
|
+
**/
|
|
70
|
+
getCurrentWithdrawals(props: GetCurrentWithdrawalsProps<true>): Promise<DataResponse<PositionWithdrawals>>;
|
|
71
|
+
}
|
|
64
72
|
/**
|
|
65
73
|
* The chain on its own, for a consumer that shows each source as it arrives.
|
|
66
74
|
* Absent in `offchain` mode.
|
|
@@ -2,8 +2,8 @@ import { Bps } from "../../model/primitives.js";
|
|
|
2
2
|
import { PoolOpportunityKey, StrategyOpportunityKey } from "../../model/opportunities.js";
|
|
3
3
|
import { PositionCollateral, StrategyPosition, StrategyPositionKey } from "../../model/positions.js";
|
|
4
4
|
import { DataResponse } from "../../model/response.js";
|
|
5
|
+
import { PositionClaimableWithdrawal } from "../../model/withdrawals.js";
|
|
5
6
|
import "../../model/index.js";
|
|
6
|
-
import { ClaimableWithdrawal } from "../../onchain/accounts/withdrawal-compressor/types.js";
|
|
7
7
|
import { Asset } from "../../onchain/base/types.js";
|
|
8
8
|
import { MultiCall } from "../../onchain/types/transactions.js";
|
|
9
9
|
import { PoolSimulation } from "../../onchain/pools/types.js";
|
|
@@ -326,13 +326,14 @@ interface LpRedeemParams {
|
|
|
326
326
|
interface FinalizeParams extends PrepareOptions {
|
|
327
327
|
/**
|
|
328
328
|
* The matured withdrawal to claim, from
|
|
329
|
-
* `sdk.
|
|
329
|
+
* `sdk.positions.getCurrentWithdrawals()`.
|
|
330
330
|
**/
|
|
331
|
-
claimable:
|
|
331
|
+
claimable: PositionClaimableWithdrawal;
|
|
332
332
|
/**
|
|
333
333
|
* The operation to resume. Defaults to the one the request recorded in the
|
|
334
|
-
* withdrawal's `extraData`, which is what
|
|
335
|
-
* decodes; pass it explicitly
|
|
334
|
+
* withdrawal's `extraData`, which is what
|
|
335
|
+
* {@link PositionClaimableWithdrawal.intent} decodes; pass it explicitly
|
|
336
|
+
* when the compressor is too old to report it.
|
|
336
337
|
**/
|
|
337
338
|
intent?: ResumableIntent;
|
|
338
339
|
}
|