@gearbox-protocol/sdk 15.1.0-next.1 → 15.1.0-next.2

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 (65) hide show
  1. package/dist/cjs/abi/iExpirable.js +15 -0
  2. package/dist/cjs/dev/AccountOpener.js +0 -1
  3. package/dist/cjs/sdk/MultichainSDK.js +3 -4
  4. package/dist/cjs/sdk/OnchainSDK.js +42 -13
  5. package/dist/cjs/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +29 -18
  6. package/dist/cjs/sdk/base/TokensMeta.js +78 -27
  7. package/dist/cjs/sdk/index.js +2 -0
  8. package/dist/cjs/sdk/market/MarketRegister.js +16 -7
  9. package/dist/cjs/sdk/market/ZapperRegister.js +56 -25
  10. package/dist/cjs/sdk/market/rwa/RWARegistry.js +22 -0
  11. package/dist/cjs/sdk/options.js +1 -5
  12. package/dist/cjs/sdk/utils/viem/executeMulticallBatches.js +32 -0
  13. package/dist/cjs/sdk/utils/viem/index.js +2 -0
  14. package/dist/esm/abi/iExpirable.js +14 -0
  15. package/dist/esm/dev/AccountOpener.js +1 -2
  16. package/dist/esm/dev/withdrawalUtils.js +1 -1
  17. package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +1 -1
  18. package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
  19. package/dist/esm/preview/trace/extractTransfers.js +1 -1
  20. package/dist/esm/sdk/MultichainSDK.js +3 -4
  21. package/dist/esm/sdk/OnchainSDK.js +42 -13
  22. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +2 -2
  23. package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +1 -1
  24. package/dist/esm/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js +29 -18
  25. package/dist/esm/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
  26. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
  27. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
  28. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
  29. package/dist/esm/sdk/base/TokensMeta.js +80 -29
  30. package/dist/esm/sdk/chain/detectNetwork.js +1 -1
  31. package/dist/esm/sdk/core/createAddressProvider.js +1 -1
  32. package/dist/esm/sdk/index.js +2 -1
  33. package/dist/esm/sdk/market/MarketRegister.js +16 -7
  34. package/dist/esm/sdk/market/ZapperRegister.js +56 -25
  35. package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +1 -1
  36. package/dist/esm/sdk/market/pool/PoolV310Contract.js +1 -1
  37. package/dist/esm/sdk/market/rwa/RWARegistry.js +22 -0
  38. package/dist/esm/sdk/market/zapper/IETHZapperContract.js +1 -1
  39. package/dist/esm/sdk/market/zapper/ZapperContract.js +1 -1
  40. package/dist/esm/sdk/options.js +1 -5
  41. package/dist/esm/sdk/pools/PoolService.js +1 -1
  42. package/dist/esm/sdk/utils/viem/executeMulticallBatches.js +31 -0
  43. package/dist/esm/sdk/utils/viem/index.js +2 -1
  44. package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +1 -1
  45. package/dist/types/abi/iExpirable.d.ts +14 -0
  46. package/dist/types/sdk/MultichainSDK.d.ts +0 -5
  47. package/dist/types/sdk/OnchainSDK.d.ts +1 -5
  48. package/dist/types/sdk/accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.d.ts +6 -0
  49. package/dist/types/sdk/accounts/withdrawal-compressor/types.d.ts +18 -0
  50. package/dist/types/sdk/base/TokensMeta.d.ts +44 -1
  51. package/dist/types/sdk/base/index.d.ts +2 -2
  52. package/dist/types/sdk/base/token-types.d.ts +12 -1
  53. package/dist/types/sdk/index.d.ts +12 -11
  54. package/dist/types/sdk/market/MarketRegister.d.ts +7 -3
  55. package/dist/types/sdk/market/ZapperRegister.d.ts +20 -2
  56. package/dist/types/sdk/market/index.d.ts +2 -2
  57. package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +2 -2
  58. package/dist/types/sdk/market/oracle/types.d.ts +2 -2
  59. package/dist/types/sdk/market/rwa/RWARegistry.d.ts +13 -0
  60. package/dist/types/sdk/market/types.d.ts +5 -1
  61. package/dist/types/sdk/options.d.ts +0 -1
  62. package/dist/types/sdk/types/state.d.ts +6 -0
  63. package/dist/types/sdk/utils/viem/executeMulticallBatches.d.ts +39 -0
  64. package/dist/types/sdk/utils/viem/index.d.ts +3 -2
  65. package/package.json +1 -1
@@ -1,10 +1,18 @@
1
1
  import { ILogger, LogFn } from "./types/logger.js";
2
2
  import { GearboxChain, NetworkType, SUPPORTED_NETWORKS, SunsetStrategy, chains, findCuratorMarketConfigurator, getAssetType, getChain, getCuratorName, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, toChainIds } from "./chain/chains.js";
3
3
  import { BlockNumberProps, MultichainChainIdsProps, MultichainNetworkProps, WithBlock, WithMultichain } from "./types/multichain.js";
4
+ import { generateCastTraceCall, getCastTraceArgs } from "./utils/viem/cast.js";
5
+ import { DelegatedMulticall, executeDelegatedMulticalls } from "./utils/viem/executeDelegatedMulticalls.js";
6
+ import { ExecuteMulticallBatchesOptions, MulticallBatch, executeMulticallBatches } from "./utils/viem/executeMulticallBatches.js";
7
+ import { EstimateRawTxGasParameters, SendRawTxParameters, estimateRawTxGas, sendRawTx } from "./utils/viem/sendRawTx.js";
8
+ import { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall } from "./utils/viem/simulateCall.js";
9
+ import { SimulateMulticallParameters, SimulateMulticallReturnType, simulateMulticall } from "./utils/viem/simulateMulticall.js";
10
+ import { SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./utils/viem/simulateWithPriceUpdates.js";
11
+ import { WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, watchBlocksAsync } from "./utils/viem/watchBlocksAsync.js";
12
+ import "./utils/viem/index.js";
4
13
  import { ClaimableWithdrawal, CurrentWithdrawals, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, GetExternalAccountCurrentWithdrawalsProps, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, PendingWithdrawal, RedemptionLog, RequestableWithdrawal, WithdrawableAsset, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, toWithdrawalStatus } from "./accounts/withdrawal-compressor/types.js";
5
14
  import { detectNetwork } from "./chain/detectNetwork.js";
6
15
  import "./chain/index.js";
7
- import { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall } from "./utils/viem/simulateCall.js";
8
16
  import { AddressMap } from "./utils/AddressMap.js";
9
17
  import { AddressSet } from "./utils/AddressSet.js";
10
18
  import { AdapterData, AssertAssignable, Asset, BaseParams, BaseState, ConnectedBotData, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, GaugeData, IBaseContract, MarketData, MarketFilter, ParsedCall, ParsedCallArgs, ParsedCallV2, PermitResult, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RateKeeperState, RelaxedBaseParams, RewardInfo, TokenInfo, Unarray, VotingContractStatus } from "./base/types.js";
@@ -32,13 +40,6 @@ import { createAdapter } from "./market/adapters/createAdapter.js";
32
40
  import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "./market/adapters/PlaceholderAdapterContracts.js";
33
41
  import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./market/rwa/midas/constants.js";
34
42
  import { MidasLiquidatorContract } from "./market/rwa/midas/MidasLiquidatorContract.js";
35
- import { generateCastTraceCall, getCastTraceArgs } from "./utils/viem/cast.js";
36
- import { DelegatedMulticall, executeDelegatedMulticalls } from "./utils/viem/executeDelegatedMulticalls.js";
37
- import { EstimateRawTxGasParameters, SendRawTxParameters, estimateRawTxGas, sendRawTx } from "./utils/viem/sendRawTx.js";
38
- import { SimulateMulticallParameters, SimulateMulticallReturnType, simulateMulticall } from "./utils/viem/simulateMulticall.js";
39
- import { SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./utils/viem/simulateWithPriceUpdates.js";
40
- import { WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, watchBlocksAsync } from "./utils/viem/watchBlocksAsync.js";
41
- import "./utils/viem/index.js";
42
43
  import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./market/rwa/securitize/constants.js";
43
44
  import { SecuritizeLiquidatorContract } from "./market/rwa/securitize/SecuritizeLiquidatorContract.js";
44
45
  import { GetOpenAccountRequirementsProps, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./market/rwa/types.js";
@@ -93,7 +94,7 @@ import { MarketSuite, StrategyRef } from "./market/MarketSuite.js";
93
94
  import { CreditSuite } from "./market/credit/CreditSuite.js";
94
95
  import { dominantCollateral, mustGetDominantCollateral } from "./market/credit/dominantCollateral.js";
95
96
  import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./market/credit/expectedBalanceDeltas.js";
96
- import { ZapperData } from "./market/types.js";
97
+ import { CompressorZapperData, ZapperData } from "./market/types.js";
97
98
  import { IZapperContract, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem } from "./market/zapper/types.js";
98
99
  import { createZapper } from "./market/zapper/createZapper.js";
99
100
  import { UnsupportedZapperFunctionError } from "./market/zapper/errors.js";
@@ -127,7 +128,7 @@ import { PickSomeRequired } from "./utils/type-utils.js";
127
128
  import { ZodAddress, ZodBigInt, ZodHex } from "./utils/zod.js";
128
129
  import "./utils/index.js";
129
130
  import { LPMonopolizedPoolMeta, PHANTOM_TOKEN_CONTRACT_TYPES, PhantomTokenContractType, PhantomTokenMeta, RWADefaultTokenMeta, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWATokenMeta, RWAUnderlyingContractType, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, SimpleTokenMeta, TokenMetaData } from "./base/token-types.js";
130
- import { FormatBNOptions, TokensMeta } from "./base/TokensMeta.js";
131
+ import { FormatBNOptions, TokensMeta, TokensMetaState } from "./base/TokensMeta.js";
131
132
  import { ChainContractsRegister, ContractOrInterface } from "./base/ChainContractsRegister.js";
132
133
  import { Construct, ConstructOptions } from "./base/Construct.js";
133
134
  import { AddressProviderAddresses, AddressProviderState, IAddressProviderContract } from "./core/types.js";
@@ -171,4 +172,4 @@ import { LiquidationsService } from "./accounts/liquidations/LiquidationsService
171
172
  import { MultichainLiquidationsService } from "./accounts/liquidations/MultichainLiquidationsService.js";
172
173
  import "./accounts/index.js";
173
174
  import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./options.js";
174
- export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AdapterData, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BigIntMath, type BlockNumberProps, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type IntentPreviewResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, additionalBorrowApyBps, assetsMap, attachOptionsSchema, borrowApyBps, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, expectedBalanceDeltas, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
175
+ export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AdapterData, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BigIntMath, type BlockNumberProps, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type IntentPreviewResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, additionalBorrowApyBps, assetsMap, attachOptionsSchema, borrowApyBps, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
@@ -1,7 +1,7 @@
1
- import { AddressMap } from "../utils/AddressMap.js";
2
- import { MarketData, MarketFilter } from "../base/types.js";
3
1
  import { DelegatedMulticall } from "../utils/viem/executeDelegatedMulticalls.js";
4
2
  import "../utils/viem/index.js";
3
+ import { AddressMap } from "../utils/AddressMap.js";
4
+ import { MarketData, MarketFilter } from "../base/types.js";
5
5
  import { MarketStateHuman, ZapperStateHuman } from "../types/state-human.js";
6
6
  import { ICreditFacadeContract } from "./credit/types.js";
7
7
  import { MarketConfiguratorContract } from "./MarketConfiguratorContract.js";
@@ -71,8 +71,12 @@ declare class MarketRegister extends ZapperRegister {
71
71
  * Otherwise only prices are refreshed.
72
72
  *
73
73
  * @param ignoreUpdateablePrices - When `true`, skips off-chain price updates.
74
+ * @param extra - Additional multicalls to execute in the same batch, so that
75
+ * other registries can be synced without an extra request.
76
+ * @returns `true` when markets were fully reloaded, so that callers can
77
+ * refresh the caches derived from the market set.
74
78
  **/
75
- syncState(ignoreUpdateablePrices?: boolean): Promise<void>;
79
+ syncState(ignoreUpdateablePrices?: boolean, extra?: DelegatedMulticall[]): Promise<boolean>;
76
80
  get watchAddresses(): Set<Address>;
77
81
  /**
78
82
  * Serializable snapshot of all loaded markets, suitable for hydration.
@@ -1,3 +1,5 @@
1
+ import { MulticallBatch } from "../utils/viem/executeMulticallBatches.js";
2
+ import "../utils/viem/index.js";
1
3
  import { AddressMap } from "../utils/AddressMap.js";
2
4
  import { ZapperStateHuman } from "../types/state-human.js";
3
5
  import { ZapperData } from "./types.js";
@@ -11,14 +13,30 @@ import { Address } from "viem";
11
13
  //#region src/sdk/market/ZapperRegister.d.ts
12
14
  declare class ZapperRegister extends SDKConstruct {
13
15
  #private;
16
+ /**
17
+ * @internal
18
+ *
19
+ * Returns the multicall batch that loads zappers of all pools from the
20
+ * periphery compressor. Used by the SDK to warm this cache together with
21
+ * other loaders in a single multicall.
22
+ *
23
+ * Returns an empty batch when zappers are already loaded and `force` is not set.
24
+ *
25
+ * @param force - reload zappers even when they are already loaded
26
+ **/
27
+ getLoadZappersMulticall(force?: boolean): MulticallBatch;
14
28
  /**
15
29
  * Load zappers for all pools using periphery compressor, adds hardcoded zappers
30
+ *
31
+ * Zappers loaded during SDK attach or restored by hydration are kept unless
32
+ * `force` is set, so calling this after either is a no-op.
16
33
  */
17
34
  loadZappers(force?: boolean): Promise<void>;
18
35
  /**
19
36
  * Serializable snapshot of all loaded zappers, suitable for hydration.
20
- * Returns `undefined` when zappers were never loaded (i.e. `loadZappers` was
21
- * not called), so the not-loaded state round-trips cleanly.
37
+ * Returns `undefined` when zappers were never loaded (i.e. the SDK was
38
+ * attached without market configurators), so the not-loaded state round-trips
39
+ * cleanly.
22
40
  **/
23
41
  protected get zappersState(): ZapperData[] | undefined;
24
42
  /**
@@ -57,7 +57,7 @@ import { CreditSuite } from "./credit/CreditSuite.js";
57
57
  import { dominantCollateral, mustGetDominantCollateral } from "./credit/dominantCollateral.js";
58
58
  import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./credit/expectedBalanceDeltas.js";
59
59
  import "./credit/index.js";
60
- import { ZapperData } from "./types.js";
60
+ import { CompressorZapperData, ZapperData } from "./types.js";
61
61
  import { IZapperContract, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem } from "./zapper/types.js";
62
62
  import { createZapper } from "./zapper/createZapper.js";
63
63
  import { UnsupportedZapperFunctionError } from "./zapper/errors.js";
@@ -66,4 +66,4 @@ import { IERC20ZapperContract } from "./zapper/IERC20ZapperContract.js";
66
66
  import { IETHZapperContract } from "./zapper/IETHZapperContract.js";
67
67
  import "./zapper/index.js";
68
68
  import { MarketRegister, MarketRegistryState, MarketRegistryStateHuman } from "./MarketRegister.js";
69
- export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DStokenData, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, GaugeContract, GaugeParams, GetOpenAccountRequirementsProps, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, IRWAFactory, IRateKeeperContract, IUpdatablePriceFeedContract, IZapperContract, InterestRateModelType, LatestUpdate, LinearInterestRateModelContract, LiquidationFees, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RampEvent, RateKeeperType, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, StrategyRef, type TimestampedCalldata, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, createAdapter, createPriceOracle, createZapper, dominantCollateral, expectedBalanceDeltas, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed, mustGetDominantCollateral };
69
+ export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CompressorZapperData, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DStokenData, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, GaugeContract, GaugeParams, GetOpenAccountRequirementsProps, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, IRWAFactory, IRateKeeperContract, IUpdatablePriceFeedContract, IZapperContract, InterestRateModelType, LatestUpdate, LinearInterestRateModelContract, LiquidationFees, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RampEvent, RateKeeperType, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, StrategyRef, type TimestampedCalldata, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, createAdapter, createPriceOracle, createZapper, dominantCollateral, expectedBalanceDeltas, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed, mustGetDominantCollateral };
@@ -1,10 +1,10 @@
1
1
  import { Amount, TokenAmount } from "../../../model/primitives.js";
2
+ import { DelegatedMulticall } from "../../utils/viem/executeDelegatedMulticalls.js";
3
+ import "../../utils/viem/index.js";
2
4
  import { AddressMap } from "../../utils/AddressMap.js";
3
5
  import { CreditAccountTokensSlice, PriceOracleData } from "../../base/types.js";
4
6
  import { PriceFeedData, PriceFeedSummary } from "../../../model/opportunities.js";
5
7
  import "../../../model/index.js";
6
- import { DelegatedMulticall } from "../../utils/viem/executeDelegatedMulticalls.js";
7
- import "../../utils/viem/index.js";
8
8
  import { PriceOracleStateHuman } from "../../types/state-human.js";
9
9
  import { IPriceFeedContract, PriceUpdate, UpdatePriceFeedsResult } from "../pricefeeds/types.js";
10
10
  import { PriceFeedRef } from "../pricefeeds/PriceFeedRef.js";
@@ -1,10 +1,10 @@
1
1
  import { Amount, TokenAmount } from "../../../model/primitives.js";
2
+ import { DelegatedMulticall } from "../../utils/viem/executeDelegatedMulticalls.js";
3
+ import "../../utils/viem/index.js";
2
4
  import { AddressMap } from "../../utils/AddressMap.js";
3
5
  import { CreditAccountTokensSlice, IBaseContract } from "../../base/types.js";
4
6
  import { PriceFeedData, PriceFeedSummary } from "../../../model/opportunities.js";
5
7
  import "../../../model/index.js";
6
- import { DelegatedMulticall } from "../../utils/viem/executeDelegatedMulticalls.js";
7
- import "../../utils/viem/index.js";
8
8
  import { PriceOracleStateHuman } from "../../types/state-human.js";
9
9
  import { IPriceFeedContract, PriceUpdate, UpdatePriceFeedsResult } from "../pricefeeds/types.js";
10
10
  import { PriceFeedRef } from "../pricefeeds/PriceFeedRef.js";
@@ -26,6 +26,19 @@ declare class RWARegistry extends SDKConstruct {
26
26
  * @param rwaFactories - RWA factory contracts to query.
27
27
  */
28
28
  getLoadMulticalls(configurators: Address[], rwaFactories?: Address[]): DelegatedMulticall[];
29
+ /**
30
+ * @internal
31
+ *
32
+ * Returns delegated multicalls that refresh the RWA state. Unlike the other
33
+ * warmed caches, RWA data carries values that change between blocks (e.g. the
34
+ * deposit allowance and claimable amount of an on-demand liquidity provider),
35
+ * so it is refreshed on every SDK sync.
36
+ *
37
+ * Factories are the ones requested during attach; after hydration the chain
38
+ * defaults are used, since the snapshot does not carry the requested list.
39
+ * An attach that explicitly requested no factories stays disabled.
40
+ **/
41
+ getSyncMulticalls(): DelegatedMulticall[];
29
42
  /**
30
43
  * Fetches decoded investor data from the on-chain RWA compressor.
31
44
  *
@@ -4,10 +4,14 @@ import "../base/index.js";
4
4
  import { Address } from "viem";
5
5
  import { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from "abitype";
6
6
  //#region src/sdk/market/types.d.ts
7
+ /**
8
+ * Single zapper as reported by the periphery compressor, before the SDK
9
+ * attaches the pool it belongs to and its {@link ZapperData.type}.
10
+ **/
7
11
  type CompressorZapperData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof peripheryCompressorAbi, "getZappers">["outputs"]>>;
8
12
  interface ZapperData extends CompressorZapperData {
9
13
  pool: Address;
10
14
  type: "migration" | "rwa" | "base";
11
15
  }
12
16
  //#endregion
13
- export { ZapperData };
17
+ export { CompressorZapperData, ZapperData };
@@ -30,7 +30,6 @@ declare const attachOptionsSchema: z.ZodObject<{
30
30
  failOnMissingFeeds: z.ZodOptional<z.ZodBoolean>;
31
31
  enableLogging: z.ZodOptional<z.ZodBoolean>;
32
32
  }, z.core.$strip>>;
33
- loadZappers: z.ZodOptional<z.ZodBoolean>;
34
33
  }, z.core.$strip>;
35
34
  /**
36
35
  * SDK constructor options type.
@@ -7,6 +7,7 @@ import { RWAState } from "../market/rwa/types.js";
7
7
  import "../market/rwa/index.js";
8
8
  import { ZapperData } from "../market/types.js";
9
9
  import "../market/index.js";
10
+ import { TokensMetaState } from "../base/TokensMeta.js";
10
11
  import { AddressProviderState } from "../core/types.js";
11
12
  import "../core/index.js";
12
13
  import "../base/index.js";
@@ -49,6 +50,11 @@ interface GearboxState<Plugins extends PluginsMap = {}> {
49
50
  * All loaded market data.
50
51
  **/
51
52
  markets: MarketData[];
53
+ /**
54
+ * Metadata of all known tokens, including the extended data (contract types,
55
+ * serialized params) that has no compressor of its own.
56
+ **/
57
+ tokens?: TokensMetaState;
52
58
  /**
53
59
  * RWA compressor state snapshot, if RWA factories were loaded.
54
60
  **/
@@ -0,0 +1,39 @@
1
+ import { Chain, ContractFunctionParameters, MulticallResponse, PublicClient, Transport } from "viem";
2
+ //#region src/sdk/utils/viem/executeMulticallBatches.d.ts
3
+ /**
4
+ * A group of contract calls owned by a single registry, paired with a callback
5
+ * that receives the results of exactly this group, in the same order.
6
+ *
7
+ * Unlike {@link DelegatedMulticall}, which maps one call to one result, a batch
8
+ * maps N calls to one handler: some loaders need all their results at once
9
+ * (e.g. two calls per token, or a map rebuilt only after every market answered).
10
+ **/
11
+ interface MulticallBatch {
12
+ /** Contract calls of this batch. */
13
+ contracts: ContractFunctionParameters[];
14
+ /** Callback invoked with the results of this batch's calls, in order. */
15
+ onResults: (resps: MulticallResponse[]) => void;
16
+ }
17
+ /**
18
+ * Options for {@link executeMulticallBatches}.
19
+ **/
20
+ interface ExecuteMulticallBatchesOptions {
21
+ /** Block to read at, defaults to the latest block. */
22
+ blockNumber?: bigint;
23
+ }
24
+ /**
25
+ * Executes the calls of several {@link MulticallBatch}es as a single multicall
26
+ * aggregate and dispatches each batch its own slice of the results.
27
+ *
28
+ * Failures are allowed per call: loaders in a batch decide themselves how to
29
+ * treat a reverted call (e.g. `contractType()` reverting on a plain ERC-20 is
30
+ * expected). Use {@link executeDelegatedMulticalls} instead when the calls need
31
+ * price updates applied first.
32
+ *
33
+ * @param client - Viem public client.
34
+ * @param batches - Batches to execute together, empty ones are allowed.
35
+ * @param opts - Block number forwarded to the multicall.
36
+ **/
37
+ declare function executeMulticallBatches(client: PublicClient<Transport, Chain>, batches: MulticallBatch[], opts?: ExecuteMulticallBatchesOptions): Promise<void>;
38
+ //#endregion
39
+ export { ExecuteMulticallBatchesOptions, MulticallBatch, executeMulticallBatches };
@@ -1,8 +1,9 @@
1
- import { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall } from "./simulateCall.js";
2
1
  import { generateCastTraceCall, getCastTraceArgs } from "./cast.js";
3
2
  import { DelegatedMulticall, executeDelegatedMulticalls } from "./executeDelegatedMulticalls.js";
3
+ import { ExecuteMulticallBatchesOptions, MulticallBatch, executeMulticallBatches } from "./executeMulticallBatches.js";
4
4
  import { EstimateRawTxGasParameters, SendRawTxParameters, estimateRawTxGas, sendRawTx } from "./sendRawTx.js";
5
+ import { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall } from "./simulateCall.js";
5
6
  import { SimulateMulticallParameters, SimulateMulticallReturnType, simulateMulticall } from "./simulateMulticall.js";
6
7
  import { SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./simulateWithPriceUpdates.js";
7
8
  import { WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, watchBlocksAsync } from "./watchBlocksAsync.js";
8
- export { DelegatedMulticall, EstimateRawTxGasParameters, SendRawTxParameters, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, estimateRawTxGas, executeDelegatedMulticalls, generateCastTraceCall, getCastTraceArgs, getSimulateWithPriceUpdatesError, sendRawTx, simulateCall, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
9
+ export { DelegatedMulticall, EstimateRawTxGasParameters, ExecuteMulticallBatchesOptions, MulticallBatch, SendRawTxParameters, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, estimateRawTxGas, executeDelegatedMulticalls, executeMulticallBatches, generateCastTraceCall, getCastTraceArgs, getSimulateWithPriceUpdatesError, sendRawTx, simulateCall, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "15.1.0-next.1",
3
+ "version": "15.1.0-next.2",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {