@gearbox-protocol/sdk 16.0.0-next.20 → 16.0.0-next.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/cjs/offchain/opportunities/OffchainOpportunities.js +5 -6
  2. package/dist/cjs/offchain/opportunities/index.js +1 -0
  3. package/dist/cjs/offchain/opportunities/types.js +1 -0
  4. package/dist/cjs/offchain/positions/OffchainPositions.js +3 -3
  5. package/dist/cjs/offchain/positions/index.js +1 -0
  6. package/dist/cjs/offchain/positions/types.js +1 -0
  7. package/dist/cjs/onchain/opportunities/index.js +1 -0
  8. package/dist/cjs/onchain/opportunities/types.js +1 -0
  9. package/dist/cjs/sdk/execute/ExecuteApi.js +2 -2
  10. package/dist/cjs/sdk/execute/index.js +1 -0
  11. package/dist/cjs/sdk/execute/types.js +1 -0
  12. package/dist/cjs/sdk/liquidations/LiquidationsNamespace.js +5 -5
  13. package/dist/cjs/sdk/opportunities/OpportunitiesNamespace.js +9 -9
  14. package/dist/cjs/sdk/positions/PositionsNamespace.js +5 -5
  15. package/dist/cjs/sdk/prepare/PrepareApi.js +16 -16
  16. package/dist/cjs/sdk/preview/PreviewNamespace.js +2 -2
  17. package/dist/esm/dev/AccountOpener.js +1 -1
  18. package/dist/esm/dev/withdrawalUtils.js +1 -1
  19. package/dist/esm/offchain/opportunities/OffchainOpportunities.js +5 -6
  20. package/dist/esm/offchain/opportunities/index.js +1 -0
  21. package/dist/esm/offchain/opportunities/types.js +1 -0
  22. package/dist/esm/offchain/positions/OffchainPositions.js +3 -3
  23. package/dist/esm/offchain/positions/index.js +1 -0
  24. package/dist/esm/offchain/positions/types.js +1 -0
  25. package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +2 -2
  26. package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +1 -1
  27. package/dist/esm/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
  28. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
  29. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
  30. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
  31. package/dist/esm/onchain/base/TokensMeta.js +3 -3
  32. package/dist/esm/onchain/chain/detectNetwork.js +1 -1
  33. package/dist/esm/onchain/core/createAddressProvider.js +1 -1
  34. package/dist/esm/onchain/market/adapters/contracts/AccountMigratorAdapterContract.js +1 -1
  35. package/dist/esm/onchain/market/adapters/contracts/ERC4626AdapterContract.js +1 -1
  36. package/dist/esm/onchain/market/credit/CreditFacadeV310BaseContract.js +1 -1
  37. package/dist/esm/onchain/market/pool/PoolV310Contract.js +1 -1
  38. package/dist/esm/onchain/market/zapper/IETHZapperContract.js +1 -1
  39. package/dist/esm/onchain/market/zapper/ZapperContract.js +1 -1
  40. package/dist/esm/onchain/opportunities/index.js +1 -0
  41. package/dist/esm/onchain/opportunities/types.js +1 -0
  42. package/dist/esm/onchain/pools/PoolService.js +1 -1
  43. package/dist/esm/onchain/utils/viem/simulateWithPriceUpdates.js +1 -1
  44. package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
  45. package/dist/esm/preview/trace/extractTransfers.js +1 -1
  46. package/dist/esm/sdk/execute/ExecuteApi.js +2 -2
  47. package/dist/esm/sdk/execute/index.js +1 -0
  48. package/dist/esm/sdk/execute/types.js +1 -0
  49. package/dist/esm/sdk/liquidations/LiquidationsNamespace.js +5 -5
  50. package/dist/esm/sdk/opportunities/OpportunitiesNamespace.js +9 -9
  51. package/dist/esm/sdk/positions/PositionsNamespace.js +5 -5
  52. package/dist/esm/sdk/prepare/PrepareApi.js +16 -16
  53. package/dist/esm/sdk/preview/PreviewNamespace.js +2 -2
  54. package/dist/types/offchain/index.d.ts +3 -1
  55. package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +8 -12
  56. package/dist/types/offchain/opportunities/index.d.ts +2 -1
  57. package/dist/types/offchain/opportunities/types.d.ts +36 -0
  58. package/dist/types/offchain/positions/OffchainPositions.d.ts +6 -9
  59. package/dist/types/offchain/positions/index.d.ts +2 -1
  60. package/dist/types/offchain/positions/types.d.ts +30 -0
  61. package/dist/types/onchain/index.d.ts +3 -2
  62. package/dist/types/onchain/opportunities/MultichainOpportunitiesService.d.ts +2 -1
  63. package/dist/types/onchain/opportunities/index.d.ts +2 -1
  64. package/dist/types/onchain/opportunities/types.d.ts +27 -0
  65. package/dist/types/onchain/positions/MultichainPositionsService.d.ts +2 -2
  66. package/dist/types/onchain/positions/index.d.ts +2 -2
  67. package/dist/types/onchain/positions/types.d.ts +12 -2
  68. package/dist/types/sdk/AbstractNamespace.d.ts +1 -1
  69. package/dist/types/sdk/GearboxSDK.d.ts +11 -11
  70. package/dist/types/sdk/execute/ExecuteApi.d.ts +5 -94
  71. package/dist/types/sdk/execute/index.d.ts +3 -2
  72. package/dist/types/sdk/execute/types.d.ts +96 -0
  73. package/dist/types/sdk/index.d.ts +12 -11
  74. package/dist/types/sdk/liquidations/LiquidationsNamespace.d.ts +7 -7
  75. package/dist/types/sdk/liquidations/index.d.ts +2 -2
  76. package/dist/types/sdk/liquidations/types.d.ts +5 -7
  77. package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +20 -20
  78. package/dist/types/sdk/opportunities/index.d.ts +2 -2
  79. package/dist/types/sdk/opportunities/types.d.ts +31 -40
  80. package/dist/types/sdk/positions/PositionsNamespace.d.ts +10 -10
  81. package/dist/types/sdk/positions/index.d.ts +2 -2
  82. package/dist/types/sdk/positions/types.d.ts +24 -33
  83. package/dist/types/sdk/prepare/PrepareApi.d.ts +18 -18
  84. package/dist/types/sdk/prepare/index.d.ts +2 -2
  85. package/dist/types/sdk/prepare/types.d.ts +8 -8
  86. package/dist/types/sdk/preview/PreviewNamespace.d.ts +4 -4
  87. package/dist/types/sdk/preview/index.d.ts +2 -2
  88. package/dist/types/sdk/preview/types.d.ts +5 -7
  89. package/dist/types/sdk/types.d.ts +65 -6
  90. package/package.json +1 -1
@@ -188,6 +188,7 @@ import { BasePlugin } from "./plugins/BasePlugin.js";
188
188
  import { IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, PluginFactoriesMap, PluginFactory, PluginState, PluginStatesMap, PluginsMap } from "./plugins/types.js";
189
189
  import { PluginStateVersionError } from "./plugins/errors.js";
190
190
  import "./plugins/index.js";
191
+ import { IMultichainOpportunitiesService } from "./opportunities/types.js";
191
192
  import { MultichainOpportunitiesService } from "./opportunities/MultichainOpportunitiesService.js";
192
193
  import { OpportunitiesService } from "./opportunities/OpportunitiesService.js";
193
194
  import "./opportunities/index.js";
@@ -195,7 +196,7 @@ import { ContractMethod, IPriceUpdateTx, MultiCall, RawTx } from "./types/transa
195
196
  import { AddLiquidityProps, DepositMetadata, IPoolsService, ListPoolPositionsProps, MarketType, PoolServiceCall, PoolServiceCallResult, PoolSimulation, RemoveLiquidityProps, SimulatePoolOperationProps, WithdrawalMetadata } from "./pools/types.js";
196
197
  import { PoolService, toShares, toSharesUp } from "./pools/PoolService.js";
197
198
  import "./pools/index.js";
198
- import { AccountSnapshot, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./positions/types.js";
199
+ import { AccountSnapshot, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./positions/types.js";
199
200
  import { CalcBorrowRateProps, calcBorrowRate } from "./positions/calcBorrowRate.js";
200
201
  import { CalcHealthFactorProps, calcHealthFactor } from "./positions/calcHealthFactor.js";
201
202
  import { CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, calcLiquidationPriceForTarget } from "./positions/calcLiquidationPriceForTarget.js";
@@ -268,4 +269,4 @@ import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./opti
268
269
  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";
269
270
  import { toToken, toTokenAmount } from "./validation/token.js";
270
271
  import "./validation/index.js";
271
- 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, 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, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, 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, 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, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetReward, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, 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, type OpenStrategyPreview, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, 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, 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, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, childLogger, classifyCurveOperation, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, 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, 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, retry, rewardsFromTransfers, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
272
+ 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, 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, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, 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, 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, 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, type OpenStrategyPreview, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, 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, 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, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkBorrowLimit, checkCollateralised, checkCreditManagerPaused, checkDebtInBand, checkForbiddenToken, checkFunding, checkLeverageAtLeastOne, checkMarketExpired, checkPoolPaused, checkPoolPayout, checkPoolSunset, checkPreviewError, checkQuotaCount, checkQuotaLimit, childLogger, classifyCurveOperation, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, 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, 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, retry, rewardsFromTransfers, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
@@ -3,6 +3,7 @@ import { DataResponse } from "../../model/response.js";
3
3
  import "../../model/index.js";
4
4
  import { PluginsMap } from "../plugins/types.js";
5
5
  import "../plugins/index.js";
6
+ import { IMultichainOpportunitiesService } from "./types.js";
6
7
  import { MultichainConstruct } from "../base/MultichainConstruct.js";
7
8
  import "../base/index.js";
8
9
  //#region src/onchain/opportunities/MultichainOpportunitiesService.d.ts
@@ -12,7 +13,7 @@ import "../base/index.js";
12
13
  *
13
14
  * @typeParam Plugins - Map of attached plugin types.
14
15
  **/
15
- declare class MultichainOpportunitiesService<const Plugins extends PluginsMap = {}> extends MultichainConstruct<Plugins> {
16
+ declare class MultichainOpportunitiesService<const Plugins extends PluginsMap = {}> extends MultichainConstruct<Plugins> implements IMultichainOpportunitiesService {
16
17
  /**
17
18
  * Opportunities of all queried chains, see {@link OpportunitiesService.list}.
18
19
  * A filter that names chains narrows the fan-out itself, so a chain whose
@@ -1,3 +1,4 @@
1
+ import { IMultichainOpportunitiesService } from "./types.js";
1
2
  import { MultichainOpportunitiesService } from "./MultichainOpportunitiesService.js";
2
3
  import { OpportunitiesService } from "./OpportunitiesService.js";
3
- export { MultichainOpportunitiesService, OpportunitiesService };
4
+ export { IMultichainOpportunitiesService, MultichainOpportunitiesService, OpportunitiesService };
@@ -0,0 +1,27 @@
1
+ import { Opportunity, OpportunityFilter, PoolOpportunityDetail, PoolOpportunityKey, StrategyOpportunityDetail, StrategyOpportunityKey } from "../../model/opportunities.js";
2
+ import { DataResponse } from "../../model/response.js";
3
+ import "../../model/index.js";
4
+ //#region src/onchain/opportunities/types.d.ts
5
+ /**
6
+ * Cross-chain reads of the opportunities namespace: every pool and strategy
7
+ * the loaded markets expose.
8
+ **/
9
+ interface IMultichainOpportunitiesService {
10
+ /**
11
+ * Opportunities of all queried chains. A filter that names chains narrows
12
+ * the fan-out itself, so a chain whose rows would be discarded is never
13
+ * queried and never appears in the meta.
14
+ **/
15
+ list(filter?: OpportunityFilter): Promise<DataResponse<Opportunity[]>>;
16
+ /**
17
+ * Detailed view of one pool opportunity. The key names its chain, so there
18
+ * is no fan-out. Throws when that chain cannot answer.
19
+ **/
20
+ getPool(key: PoolOpportunityKey): Promise<DataResponse<PoolOpportunityDetail>>;
21
+ /**
22
+ * Detailed view of one strategy opportunity. See {@link getPool}.
23
+ **/
24
+ getStrategy(key: StrategyOpportunityKey): Promise<DataResponse<StrategyOpportunityDetail>>;
25
+ }
26
+ //#endregion
27
+ export { IMultichainOpportunitiesService };
@@ -3,7 +3,7 @@ import { DataResponse } from "../../model/response.js";
3
3
  import "../../model/index.js";
4
4
  import { PluginsMap } from "../plugins/types.js";
5
5
  import "../plugins/index.js";
6
- import { ListPositionsProps } from "./types.js";
6
+ import { IMultichainPositionsService, ListPositionsProps } from "./types.js";
7
7
  import { MultichainConstruct } from "../base/MultichainConstruct.js";
8
8
  import "../base/index.js";
9
9
  //#region src/onchain/positions/MultichainPositionsService.d.ts
@@ -12,7 +12,7 @@ import "../base/index.js";
12
12
  *
13
13
  * @typeParam Plugins - Map of attached plugin types.
14
14
  **/
15
- declare class MultichainPositionsService<const Plugins extends PluginsMap = {}> extends MultichainConstruct<Plugins> {
15
+ declare class MultichainPositionsService<const Plugins extends PluginsMap = {}> extends MultichainConstruct<Plugins> implements IMultichainPositionsService {
16
16
  /**
17
17
  * Positions of a wallet on all queried chains, see
18
18
  * {@link PositionsService.list}.
@@ -1,4 +1,4 @@
1
- import { AccountSnapshot, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData } from "./types.js";
1
+ import { AccountSnapshot, 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 } from "./calcLiquidationPrice.js";
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, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, MultichainPositionsService, PositionsService, ProjectedPoolOptions, accountSnapshotFromCreditAccountData, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcTimeToLiquidationMs };
9
+ export { AccountSnapshot, CalcBorrowRateProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, MultichainPositionsService, PositionsService, ProjectedPoolOptions, accountSnapshotFromCreditAccountData, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcTimeToLiquidationMs };
@@ -1,4 +1,5 @@
1
- import { PositionFilter } from "../../model/positions.js";
1
+ import { Position, PositionFilter } from "../../model/positions.js";
2
+ import { DataResponse } from "../../model/response.js";
2
3
  import "../../model/index.js";
3
4
  import { WithBlock } from "../types/multichain.js";
4
5
  import { Asset, CreditAccountData } from "../base/types.js";
@@ -32,6 +33,15 @@ interface ListPositionsPropsBase {
32
33
  * {@link MultichainPositionsService.list}.
33
34
  **/
34
35
  type ListPositionsProps<Multichain extends boolean = false> = ListPositionsPropsBase & WithBlock<Multichain>;
36
+ /**
37
+ * Cross-chain reads of the positions namespace: everything a wallet holds.
38
+ **/
39
+ interface IMultichainPositionsService {
40
+ /**
41
+ * Positions of a wallet on all queried chains.
42
+ **/
43
+ list(props: ListPositionsProps<true>): Promise<DataResponse<Position[]>>;
44
+ }
35
45
  /**
36
46
  * Props for {@link PositionsService.listStrategyPositions}.
37
47
  **/
@@ -86,4 +96,4 @@ interface AccountSnapshot {
86
96
  **/
87
97
  declare function accountSnapshotFromCreditAccountData(ca: CreditAccountData): AccountSnapshot;
88
98
  //#endregion
89
- export { AccountSnapshot, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData };
99
+ export { AccountSnapshot, IMultichainPositionsService, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, accountSnapshotFromCreditAccountData };
@@ -2,9 +2,9 @@ import { ILogger } from "../onchain/types/logger.js";
2
2
  import { ChainId } from "../model/primitives.js";
3
3
  import { DataResponse } from "../model/response.js";
4
4
  import "../model/index.js";
5
- import { EnsureFreshChains, NamespaceOptions } from "./types.js";
6
5
  import { EntityMerger, ListMerger } from "./utils/types.js";
7
6
  import "./utils/index.js";
7
+ import { EnsureFreshChains, NamespaceOptions } from "./types.js";
8
8
  //#region src/sdk/AbstractNamespace.d.ts
9
9
  /**
10
10
  * One read of a combined namespace: the same query against each source, plus
@@ -1,13 +1,13 @@
1
1
  import { NetworkType } from "../onchain/chain/chains.js";
2
2
  import "../onchain/index.js";
3
- import { GearboxSDKOptions, Mode, NoticesByMode, OffchainByMode, OnchainByMode } from "./types.js";
4
- import { LiquidationsByMode } from "./liquidations/types.js";
3
+ import { ILiquidationsByMode } from "./liquidations/types.js";
4
+ import { IOpportunities } from "./opportunities/types.js";
5
+ import { IPositions } from "./positions/types.js";
6
+ import { IPreviewByMode } from "./preview/types.js";
7
+ import { GearboxSDKOptions, IGearboxSDK, INoticesByMode, Mode, OffchainByMode, OnchainByMode } from "./types.js";
5
8
  import "./liquidations/index.js";
6
- import { Opportunities } from "./opportunities/types.js";
7
9
  import "./opportunities/index.js";
8
- import { Positions } from "./positions/types.js";
9
10
  import "./positions/index.js";
10
- import { PreviewByMode } from "./preview/types.js";
11
11
  import "./preview/index.js";
12
12
  //#region src/sdk/GearboxSDK.d.ts
13
13
  /**
@@ -34,7 +34,7 @@ declare const DEFAULT_MAX_STATE_AGE = 30;
34
34
  *
35
35
  * @typeParam M - Mode the instance was built in.
36
36
  **/
37
- declare class GearboxSDK<const M extends Mode = Mode> {
37
+ declare class GearboxSDK<const M extends Mode = Mode> implements IGearboxSDK<M> {
38
38
  #private;
39
39
  /**
40
40
  * Sources this instance reads from.
@@ -47,30 +47,30 @@ declare class GearboxSDK<const M extends Mode = Mode> {
47
47
  /**
48
48
  * Namespace for pool and strategy opportunities.
49
49
  **/
50
- readonly opportunities: Opportunities<M>;
50
+ readonly opportunities: IOpportunities<M>;
51
51
  /**
52
52
  * Namespace for the positions a wallet holds.
53
53
  **/
54
- readonly positions: Positions<M>;
54
+ readonly positions: IPositions<M>;
55
55
  /**
56
56
  * Namespace for liquidatable credit accounts and delayed-withdrawal
57
57
  * positions a liquidator holds. Onchain-only, hence gated by mode like
58
58
  * every other chain read: absent in `offchain` mode.
59
59
  **/
60
- readonly liquidations: LiquidationsByMode[M];
60
+ readonly liquidations: ILiquidationsByMode[M];
61
61
  /**
62
62
  * Namespace for on-chain previews of raw operation calldata. Onchain-only,
63
63
  * hence gated by mode like every other chain read: absent in `offchain`
64
64
  * mode.
65
65
  **/
66
- readonly preview: PreviewByMode[M];
66
+ readonly preview: IPreviewByMode[M];
67
67
  /**
68
68
  * The banners the backend attaches to a pool opportunity or a strategy
69
69
  * position, see {@link Notice}. Top-level because the subject is either
70
70
  * kind of entity, so neither namespace owns it. Backend-only, hence gated
71
71
  * by mode like every other backend read: absent in `onchain` mode.
72
72
  **/
73
- readonly notices: NoticesByMode[M];
73
+ readonly notices: INoticesByMode[M];
74
74
  constructor(options: GearboxSDKOptions<M>);
75
75
  /**
76
76
  * Attaches the on-chain SDK when this instance owns one; a no-op in `offchain`
@@ -1,108 +1,19 @@
1
- import { ChainId } from "../../model/primitives.js";
2
- import "../../model/index.js";
3
- import { Asset } from "../../onchain/base/types.js";
4
- import { SecuritizeRegisterMessage } from "../../onchain/market/rwa/securitize/types.js";
5
1
  import { RawTx } from "../../onchain/types/transactions.js";
6
2
  import "../../onchain/index.js";
7
- import { LpSimulate, OpenStrategySimulate, StrategySimulate } from "../prepare/types.js";
8
3
  import { ChainOf } from "../prepare/PrepareApi.js";
9
4
  import "../prepare/index.js";
10
- import { Address } from "viem";
5
+ import { IOpportunitiesExecute, PrepareRequest } from "./types.js";
11
6
  //#region src/sdk/execute/ExecuteApi.d.ts
12
7
  /**
13
- * A pool deposit, withdrawal or redemption, as
14
- * {@link OpportunitiesPrepare.deposit} / {@link OpportunitiesPrepare.withdraw}
15
- * / {@link OpportunitiesPrepare.redeem} priced it. The simulation carries the
16
- * tokens on both sides and the zapper, so nothing else is needed to encode
17
- * the call.
8
+ * {@inheritDoc IOpportunitiesExecute}
18
9
  **/
19
- interface PoolPrepareRequest {
20
- kind: "pool";
21
- chainId: ChainId;
22
- pool: Address;
23
- wallet: Address;
24
- op: "deposit" | "withdraw" | "redeem";
25
- sim: Extract<LpSimulate, {
26
- ok: true;
27
- }>;
28
- }
29
- /**
30
- * Opening a new position, from a viable
31
- * {@link OpportunitiesPrepare.openNewStrategy} result. The preview values
32
- * collateral in underlying only, so the wallet's actual collateral assets and
33
- * the native value to attach come from the caller.
34
- **/
35
- interface OpenPrepareRequest {
36
- kind: "open";
37
- chainId: ChainId;
38
- creditManager: Address;
39
- wallet: Address;
40
- sim: Extract<OpenStrategySimulate, {
41
- ok: true;
42
- }>;
43
- /** What leaves the wallet, token by token. */
44
- collateral: Asset[];
45
- /** Native value to attach when paying a wrapped-native market in the coin. */
46
- ethAmount: bigint;
47
- /**
48
- * Token the position ends up in. RWA markets resolve their open
49
- * requirements against it; omitting it skips the RWA check entirely.
50
- **/
51
- targetToken?: Address;
52
- /**
53
- * EIP-712 registration signatures the wallet already signed this session,
54
- * attached as `signaturesToCache` when the market is RWA-gated.
55
- **/
56
- signaturesToCache?: SecuritizeRegisterMessage[];
57
- }
58
- /**
59
- * Any of the five operations on an existing account, from a viable
60
- * {@link StrategySimulate}: the facade multicall is the simulation's `calls`.
61
- **/
62
- interface AccountPrepareRequest {
63
- kind: "account";
64
- chainId: ChainId;
65
- creditAccount: Address;
66
- wallet: Address;
67
- sim: Extract<StrategySimulate, {
68
- ok: true;
69
- }>;
70
- }
71
- /**
72
- * What {@link OpportunitiesExecute.buildTx} turns into a transaction: a
73
- * `prepare` result plus the few facts about the wallet the simulation does not
74
- * carry.
75
- **/
76
- type PrepareRequest = PoolPrepareRequest | OpenPrepareRequest | AccountPrepareRequest;
77
- /**
78
- * The write side of the opportunities namespace: turns what `prepare`
79
- * answered into the transaction to sign. Sending, and whatever the wallet has
80
- * to do first (allowances, permits, RWA signatures), stays with the caller —
81
- * `checkPrerequisites` reports the former on the built transaction.
82
- **/
83
- interface OpportunitiesExecute {
84
- /**
85
- * The transaction to sign, from a `prepare` result. No second round of math:
86
- * `account` requests submit the simulation's own multicall, `open` requests
87
- * hand the preview's router path and quotas to `openCA`, `pool` requests
88
- * encode the deposit / redeem the simulation priced.
89
- *
90
- * @throws on a simulation that is not `ok`; when a `pool` request names a
91
- * route the pool has no metadata for, or one the pool does not accept a
92
- * transaction for (RWA on-demand deposits)
93
- **/
94
- buildTx(request: PrepareRequest): Promise<RawTx>;
95
- }
96
- /**
97
- * {@inheritDoc OpportunitiesExecute}
98
- **/
99
- declare class ExecuteApi implements OpportunitiesExecute {
10
+ declare class ExecuteApi implements IOpportunitiesExecute {
100
11
  #private;
101
12
  constructor(chainOf: ChainOf);
102
13
  /**
103
- * {@inheritDoc OpportunitiesExecute.buildTx}
14
+ * {@inheritDoc IOpportunitiesExecute.buildTx}
104
15
  **/
105
16
  buildTx(request: PrepareRequest): Promise<RawTx>;
106
17
  }
107
18
  //#endregion
108
- export { AccountPrepareRequest, ExecuteApi, OpenPrepareRequest, OpportunitiesExecute, PoolPrepareRequest, PrepareRequest };
19
+ export { ExecuteApi };
@@ -1,2 +1,3 @@
1
- import { AccountPrepareRequest, ExecuteApi, OpenPrepareRequest, OpportunitiesExecute, PoolPrepareRequest, PrepareRequest } from "./ExecuteApi.js";
2
- export { AccountPrepareRequest, ExecuteApi, OpenPrepareRequest, OpportunitiesExecute, PoolPrepareRequest, PrepareRequest };
1
+ import { AccountPrepareRequest, IOpportunitiesExecute, OpenPrepareRequest, PoolPrepareRequest, PrepareRequest } from "./types.js";
2
+ import { ExecuteApi } from "./ExecuteApi.js";
3
+ export { AccountPrepareRequest, ExecuteApi, IOpportunitiesExecute, OpenPrepareRequest, PoolPrepareRequest, PrepareRequest };
@@ -0,0 +1,96 @@
1
+ import { ChainId } from "../../model/primitives.js";
2
+ import "../../model/index.js";
3
+ import { Asset } from "../../onchain/base/types.js";
4
+ import { SecuritizeRegisterMessage } from "../../onchain/market/rwa/securitize/types.js";
5
+ import { RawTx } from "../../onchain/types/transactions.js";
6
+ import "../../onchain/index.js";
7
+ import { LpSimulate, OpenStrategySimulate, StrategySimulate } from "../prepare/types.js";
8
+ import "../prepare/index.js";
9
+ import { Address } from "viem";
10
+ //#region src/sdk/execute/types.d.ts
11
+ /**
12
+ * A pool deposit, withdrawal or redemption, as
13
+ * {@link IOpportunitiesPrepare.deposit} / {@link IOpportunitiesPrepare.withdraw}
14
+ * / {@link IOpportunitiesPrepare.redeem} priced it. The simulation carries the
15
+ * tokens on both sides and the zapper, so nothing else is needed to encode
16
+ * the call.
17
+ **/
18
+ interface PoolPrepareRequest {
19
+ kind: "pool";
20
+ chainId: ChainId;
21
+ pool: Address;
22
+ wallet: Address;
23
+ op: "deposit" | "withdraw" | "redeem";
24
+ sim: Extract<LpSimulate, {
25
+ ok: true;
26
+ }>;
27
+ }
28
+ /**
29
+ * Opening a new position, from a viable
30
+ * {@link IOpportunitiesPrepare.openNewStrategy} result. The preview values
31
+ * collateral in underlying only, so the wallet's actual collateral assets and
32
+ * the native value to attach come from the caller.
33
+ **/
34
+ interface OpenPrepareRequest {
35
+ kind: "open";
36
+ chainId: ChainId;
37
+ creditManager: Address;
38
+ wallet: Address;
39
+ sim: Extract<OpenStrategySimulate, {
40
+ ok: true;
41
+ }>;
42
+ /** What leaves the wallet, token by token. */
43
+ collateral: Asset[];
44
+ /** Native value to attach when paying a wrapped-native market in the coin. */
45
+ ethAmount: bigint;
46
+ /**
47
+ * Token the position ends up in. RWA markets resolve their open
48
+ * requirements against it; omitting it skips the RWA check entirely.
49
+ **/
50
+ targetToken?: Address;
51
+ /**
52
+ * EIP-712 registration signatures the wallet already signed this session,
53
+ * attached as `signaturesToCache` when the market is RWA-gated.
54
+ **/
55
+ signaturesToCache?: SecuritizeRegisterMessage[];
56
+ }
57
+ /**
58
+ * Any of the five operations on an existing account, from a viable
59
+ * {@link StrategySimulate}: the facade multicall is the simulation's `calls`.
60
+ **/
61
+ interface AccountPrepareRequest {
62
+ kind: "account";
63
+ chainId: ChainId;
64
+ creditAccount: Address;
65
+ wallet: Address;
66
+ sim: Extract<StrategySimulate, {
67
+ ok: true;
68
+ }>;
69
+ }
70
+ /**
71
+ * What {@link IOpportunitiesExecute.buildTx} turns into a transaction: a
72
+ * `prepare` result plus the few facts about the wallet the simulation does not
73
+ * carry.
74
+ **/
75
+ type PrepareRequest = PoolPrepareRequest | OpenPrepareRequest | AccountPrepareRequest;
76
+ /**
77
+ * The write side of the opportunities namespace: turns what `prepare`
78
+ * answered into the transaction to sign. Sending, and whatever the wallet has
79
+ * to do first (allowances, permits, RWA signatures), stays with the caller —
80
+ * `checkPrerequisites` reports the former on the built transaction.
81
+ **/
82
+ interface IOpportunitiesExecute {
83
+ /**
84
+ * The transaction to sign, from a `prepare` result. No second round of math:
85
+ * `account` requests submit the simulation's own multicall, `open` requests
86
+ * hand the preview's router path and quotas to `openCA`, `pool` requests
87
+ * encode the deposit / redeem the simulation priced.
88
+ *
89
+ * @throws on a simulation that is not `ok`; when a `pool` request names a
90
+ * route the pool has no metadata for, or one the pool does not accept a
91
+ * transaction for (RWA on-demand deposits)
92
+ **/
93
+ buildTx(request: PrepareRequest): Promise<RawTx>;
94
+ }
95
+ //#endregion
96
+ export { AccountPrepareRequest, IOpportunitiesExecute, OpenPrepareRequest, PoolPrepareRequest, PrepareRequest };
@@ -1,27 +1,28 @@
1
1
  import { BorrowLimitBinding, IntentPreviewError, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewRefusal, raise, refuse } from "../onchain/validation/refusal.js";
2
2
  import { LeverageBand } from "../onchain/accounts/intents/leverage-band.js";
3
3
  import { OperationState, PathLossRate } from "../onchain/accounts/intents/types.js";
4
- import { EnsureFreshChains, GearboxSDKOptions, Mode, NamespaceOptions, NoticesByMode, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, PlainMultichainSDKOptions } from "./types.js";
4
+ import { ILiquidations, ILiquidationsByMode } from "./liquidations/types.js";
5
+ import { AddCollateralParams, AdjustLeverageParams, DelayedStrategySimulate, DepositStrategyParams, FinalizeParams, IOpportunitiesPrepare, LpParams, LpRedeemParams, LpSimulate, OpenStrategyParams, OpenStrategySimulate, PoolInput, PositionInput, PrepareOptions, RepayStrategyParams, StrategyInput, StrategyRoutesSimulate, StrategySimulate, WithdrawCollateralParams, WithdrawStrategyParams } from "./prepare/types.js";
6
+ import { ChainOf, PrepareApi } from "./prepare/PrepareApi.js";
7
+ import "./prepare/index.js";
8
+ import { AccountPrepareRequest, IOpportunitiesExecute, OpenPrepareRequest, PoolPrepareRequest, PrepareRequest } from "./execute/types.js";
9
+ import { ExecuteApi } from "./execute/ExecuteApi.js";
10
+ import "./execute/index.js";
5
11
  import { EntityMerger, FilterResult, ListMerger, MergeListResult } from "./utils/types.js";
6
12
  import { filterResponse } from "./utils/filterResponse.js";
7
13
  import { DEFAULT_MAX_OFFCHAIN_LAG, mergeChainList, mergeChainOne } from "./utils/mergeChains.js";
8
14
  import "./utils/index.js";
15
+ import { IOpportunities, IOpportunitiesBase, IOpportunitiesByMode, IOpportunitiesOffchainBranch, IOpportunitiesOffchainOnly, IOpportunitiesOnchainBranch, IOpportunitiesOnchainOnly, IOpportunityMergers } from "./opportunities/types.js";
16
+ import { IPositionMergers, IPositions, IPositionsBase, IPositionsByMode, IPositionsOffchainBranch, IPositionsOffchainOnly, IPositionsOnchainBranch, IPositionsOnchainOnly } from "./positions/types.js";
17
+ import { IPreview, IPreviewByMode } from "./preview/types.js";
18
+ import { EnsureFreshChains, GearboxSDKOptions, IGearboxSDK, INotices, INoticesByMode, Mode, NamespaceOptions, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, PlainMultichainSDKOptions } from "./types.js";
9
19
  import { AbstractNamespace, MergedQuery } from "./AbstractNamespace.js";
10
- import { Liquidations, LiquidationsByMode } from "./liquidations/types.js";
11
20
  import { LiquidationsNamespace } from "./liquidations/LiquidationsNamespace.js";
12
21
  import "./liquidations/index.js";
13
- import { AddCollateralParams, AdjustLeverageParams, DelayedStrategySimulate, DepositStrategyParams, FinalizeParams, LpParams, LpRedeemParams, LpSimulate, OpenStrategyParams, OpenStrategySimulate, OpportunitiesPrepare, PoolInput, PositionInput, PrepareOptions, RepayStrategyParams, StrategyInput, StrategyRoutesSimulate, StrategySimulate, WithdrawCollateralParams, WithdrawStrategyParams } from "./prepare/types.js";
14
- import { ChainOf, PrepareApi } from "./prepare/PrepareApi.js";
15
- import "./prepare/index.js";
16
- import { AccountPrepareRequest, ExecuteApi, OpenPrepareRequest, OpportunitiesExecute, PoolPrepareRequest, PrepareRequest } from "./execute/ExecuteApi.js";
17
- import "./execute/index.js";
18
- import { Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesOffchainBranch, OpportunitiesOffchainOnly, OpportunitiesOnchainBranch, OpportunitiesOnchainOnly, OpportunityMergers } from "./opportunities/types.js";
19
22
  import { OpportunitiesNamespace } from "./opportunities/OpportunitiesNamespace.js";
20
23
  import "./opportunities/index.js";
21
- import { PositionMergers, Positions, PositionsBase, PositionsByMode, PositionsOffchainBranch, PositionsOffchainOnly, PositionsOnchainBranch, PositionsOnchainOnly } from "./positions/types.js";
22
24
  import { PositionsNamespace } from "./positions/PositionsNamespace.js";
23
25
  import "./positions/index.js";
24
- import { Preview, PreviewByMode } from "./preview/types.js";
25
26
  import { PreviewNamespace } from "./preview/PreviewNamespace.js";
26
27
  import "./preview/index.js";
27
28
  import { DEFAULT_MAX_STATE_AGE, GearboxSDK } from "./GearboxSDK.js";
@@ -33,4 +34,4 @@ import { SourceUnavailableError } from "./errors/SourceUnavailableError.js";
33
34
  import { assertSameChains } from "./errors/assertSameChains.js";
34
35
  import { everyChainFailed } from "./errors/everyChainFailed.js";
35
36
  import "./errors/index.js";
36
- export { AbstractNamespace, AccountPrepareRequest, AddCollateralParams, AdjustLeverageParams, AllSourcesFailedError, BorrowLimitBinding, ChainOf, ChainRef, DEFAULT_MAX_OFFCHAIN_LAG, DEFAULT_MAX_STATE_AGE, DelayedStrategySimulate, DepositStrategyParams, EnsureFreshChains, type EntityMerger, ExecuteApi, type FilterResult, FinalizeParams, GearboxSDK, GearboxSDKOptions, IntentPreviewError, type LeverageBand, Liquidations, LiquidationsByMode, LiquidationsNamespace, type ListMerger, LpParams, LpRedeemParams, LpSimulate, type MergeListResult, MergedQuery, MissingSourceError, Mode, NamespaceOptions, NoSourceServedError, NoticesByMode, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, OpenPrepareRequest, OpenStrategyParams, OpenStrategySimulate, type OperationState, Opportunities, OpportunitiesBase, OpportunitiesByMode, OpportunitiesExecute, OpportunitiesNamespace, OpportunitiesOffchainBranch, OpportunitiesOffchainOnly, OpportunitiesOnchainBranch, OpportunitiesOnchainOnly, OpportunitiesPrepare, OpportunityMergers, type PathLossRate, PlainMultichainSDKOptions, PoolInput, PoolPrepareRequest, PositionInput, PositionMergers, Positions, PositionsBase, PositionsByMode, PositionsNamespace, PositionsOffchainBranch, PositionsOffchainOnly, PositionsOnchainBranch, PositionsOnchainOnly, PrepareApi, PrepareOptions, PrepareRequest, Preview, PreviewByMode, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewNamespace, PreviewRefusal, RepayStrategyParams, SourceChainMismatchError, SourceUnavailableError, StrategyInput, StrategyRoutesSimulate, StrategySimulate, WithdrawCollateralParams, WithdrawStrategyParams, assertSameChains, everyChainFailed, filterResponse, mergeChainList, mergeChainOne, raise, refuse };
37
+ export { AbstractNamespace, AccountPrepareRequest, AddCollateralParams, AdjustLeverageParams, AllSourcesFailedError, BorrowLimitBinding, ChainOf, ChainRef, DEFAULT_MAX_OFFCHAIN_LAG, DEFAULT_MAX_STATE_AGE, DelayedStrategySimulate, DepositStrategyParams, EnsureFreshChains, type EntityMerger, ExecuteApi, type FilterResult, FinalizeParams, GearboxSDK, GearboxSDKOptions, IGearboxSDK, ILiquidations, ILiquidationsByMode, INotices, INoticesByMode, IOpportunities, IOpportunitiesBase, IOpportunitiesByMode, IOpportunitiesExecute, IOpportunitiesOffchainBranch, IOpportunitiesOffchainOnly, IOpportunitiesOnchainBranch, IOpportunitiesOnchainOnly, IOpportunitiesPrepare, IOpportunityMergers, IPositionMergers, IPositions, IPositionsBase, IPositionsByMode, IPositionsOffchainBranch, IPositionsOffchainOnly, IPositionsOnchainBranch, IPositionsOnchainOnly, IPreview, IPreviewByMode, IntentPreviewError, type LeverageBand, LiquidationsNamespace, type ListMerger, LpParams, LpRedeemParams, LpSimulate, type MergeListResult, MergedQuery, MissingSourceError, Mode, NamespaceOptions, NoSourceServedError, OffchainByMode, OffchainSource, OnchainByMode, OnchainSource, OpenPrepareRequest, OpenStrategyParams, OpenStrategySimulate, type OperationState, OpportunitiesNamespace, type PathLossRate, PlainMultichainSDKOptions, PoolInput, PoolPrepareRequest, PositionInput, PositionsNamespace, PrepareApi, PrepareOptions, PrepareRequest, PreviewErrorDetails, PreviewErrorReason, PreviewIssue, PreviewNamespace, PreviewRefusal, RepayStrategyParams, SourceChainMismatchError, SourceUnavailableError, StrategyInput, StrategyRoutesSimulate, StrategySimulate, WithdrawCollateralParams, WithdrawStrategyParams, assertSameChains, everyChainFailed, filterResponse, mergeChainList, mergeChainOne, raise, refuse };
@@ -5,29 +5,29 @@ import "../../model/index.js";
5
5
  import { MultichainSDK } from "../../onchain/MultichainSDK.js";
6
6
  import { BuildLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationPositionsProps } from "../../onchain/accounts/liquidations/types.js";
7
7
  import "../../onchain/index.js";
8
+ import { ILiquidations } from "./types.js";
8
9
  import { NamespaceOptions } from "../types.js";
9
- import { Liquidations } from "./types.js";
10
10
  //#region src/sdk/liquidations/LiquidationsNamespace.d.ts
11
11
  /**
12
- * {@inheritDoc Liquidations}
12
+ * {@inheritDoc ILiquidations}
13
13
  **/
14
- declare class LiquidationsNamespace implements Liquidations {
14
+ declare class LiquidationsNamespace implements ILiquidations {
15
15
  #private;
16
16
  constructor(onchain: MultichainSDK, options: NamespaceOptions);
17
17
  /**
18
- * {@inheritDoc Liquidations.getLiquidatableAccounts}
18
+ * {@inheritDoc ILiquidations.getLiquidatableAccounts}
19
19
  **/
20
20
  getLiquidatableAccounts(props?: GetLiquidatableAccountsProps<true>): Promise<DataResponse<LiquidatableAccount[]>>;
21
21
  /**
22
- * {@inheritDoc Liquidations.getLiquidationDetails}
22
+ * {@inheritDoc ILiquidations.getLiquidationDetails}
23
23
  **/
24
24
  getLiquidationDetails(props: GetLiquidationDetailsProps<true>): Promise<DataResponse<LiquidationDetails>>;
25
25
  /**
26
- * {@inheritDoc Liquidations.buildLiquidationTx}
26
+ * {@inheritDoc ILiquidations.buildLiquidationTx}
27
27
  **/
28
28
  buildLiquidationTx(props: BuildLiquidationTxProps<true>): Promise<DataResponse<TxCall>>;
29
29
  /**
30
- * {@inheritDoc Liquidations.getLiquidationPositions}
30
+ * {@inheritDoc ILiquidations.getLiquidationPositions}
31
31
  **/
32
32
  getLiquidationPositions(props: GetLiquidationPositionsProps<true>): Promise<DataResponse<LiquidationPosition[]>>;
33
33
  }
@@ -1,3 +1,3 @@
1
- import { Liquidations, LiquidationsByMode } from "./types.js";
1
+ import { ILiquidations, ILiquidationsByMode } from "./types.js";
2
2
  import { LiquidationsNamespace } from "./LiquidationsNamespace.js";
3
- export { Liquidations, LiquidationsByMode, LiquidationsNamespace };
3
+ export { ILiquidations, ILiquidationsByMode, LiquidationsNamespace };