@gearbox-protocol/sdk 14.12.0-next.76 → 14.12.0-next.78

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/model/curators.js +1 -0
  2. package/dist/cjs/model/curators.schema.js +38 -0
  3. package/dist/cjs/model/index.js +4 -1
  4. package/dist/cjs/model/opportunities.schema.js +3 -1
  5. package/dist/cjs/model/primitives.schema.js +5 -13
  6. package/dist/cjs/preview/index.js +0 -1
  7. package/dist/cjs/preview/preview/buildDelayedPreview.js +4 -3
  8. package/dist/cjs/preview/preview/index.js +0 -1
  9. package/dist/cjs/preview/preview/previewAdjustCreditAccount.js +3 -2
  10. package/dist/cjs/preview/preview/types.js +0 -16
  11. package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +12 -38
  12. package/dist/cjs/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +1 -1
  13. package/dist/cjs/sdk/chain/chains.js +1 -1
  14. package/dist/cjs/sdk/index.js +3 -0
  15. package/dist/cjs/sdk/market/MarketConfiguratorContract.js +2 -14
  16. package/dist/cjs/sdk/market/MarketSuite.js +1 -0
  17. package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +10 -0
  18. package/dist/cjs/sdk/market/credit/expectedBalanceDeltas.js +25 -0
  19. package/dist/cjs/sdk/market/credit/index.js +2 -0
  20. package/dist/cjs/sdk/market/index.js +2 -0
  21. package/dist/cjs/sdk/utils/index.js +1 -0
  22. package/dist/cjs/sdk/utils/zod.js +36 -14
  23. package/dist/esm/model/curators.js +1 -0
  24. package/dist/esm/model/curators.schema.js +36 -0
  25. package/dist/esm/model/index.js +4 -2
  26. package/dist/esm/model/opportunities.schema.js +3 -1
  27. package/dist/esm/model/primitives.schema.js +7 -14
  28. package/dist/esm/preview/index.js +2 -2
  29. package/dist/esm/preview/preview/buildDelayedPreview.js +5 -4
  30. package/dist/esm/preview/preview/index.js +2 -2
  31. package/dist/esm/preview/preview/previewAdjustCreditAccount.js +4 -3
  32. package/dist/esm/preview/preview/types.js +1 -16
  33. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +12 -38
  34. package/dist/esm/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +1 -1
  35. package/dist/esm/sdk/chain/chains.js +1 -1
  36. package/dist/esm/sdk/index.js +3 -2
  37. package/dist/esm/sdk/market/MarketConfiguratorContract.js +2 -14
  38. package/dist/esm/sdk/market/MarketSuite.js +1 -0
  39. package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +10 -0
  40. package/dist/esm/sdk/market/credit/expectedBalanceDeltas.js +24 -0
  41. package/dist/esm/sdk/market/credit/index.js +2 -1
  42. package/dist/esm/sdk/market/index.js +2 -1
  43. package/dist/esm/sdk/utils/index.js +2 -2
  44. package/dist/esm/sdk/utils/zod.js +36 -15
  45. package/dist/types/dev/AccountOpener.d.ts +1 -1
  46. package/dist/types/model/curators.d.ts +33 -0
  47. package/dist/types/model/curators.schema.d.ts +50 -0
  48. package/dist/types/model/history.schema.d.ts +6 -6
  49. package/dist/types/model/index.d.ts +5 -3
  50. package/dist/types/model/liquidations.schema.d.ts +47 -47
  51. package/dist/types/model/opportunities.d.ts +6 -1
  52. package/dist/types/model/opportunities.schema.d.ts +257 -106
  53. package/dist/types/model/positions.schema.d.ts +92 -92
  54. package/dist/types/model/primitives.d.ts +2 -25
  55. package/dist/types/model/primitives.schema.d.ts +10 -17
  56. package/dist/types/preview/index.d.ts +2 -2
  57. package/dist/types/preview/preview/index.d.ts +2 -2
  58. package/dist/types/preview/preview/types.d.ts +1 -16
  59. package/dist/types/sdk/OnchainSDK.d.ts +3 -3
  60. package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +8 -7
  61. package/dist/types/sdk/accounts/bots/types.d.ts +1 -1
  62. package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressor.d.ts +1 -1
  63. package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts +1 -1
  64. package/dist/types/sdk/accounts/index.d.ts +2 -2
  65. package/dist/types/sdk/accounts/intents/operations/repay-credit-account/index.d.ts +1 -2
  66. package/dist/types/sdk/accounts/types.d.ts +8 -78
  67. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts +1 -1
  68. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts +1 -1
  69. package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +1 -1
  70. package/dist/types/sdk/base/index.d.ts +2 -2
  71. package/dist/types/sdk/base/types.d.ts +42 -1
  72. package/dist/types/sdk/chain/chains.d.ts +7 -11
  73. package/dist/types/sdk/chain/index.d.ts +2 -2
  74. package/dist/types/sdk/index.d.ts +26 -25
  75. package/dist/types/sdk/market/MarketConfiguratorContract.d.ts +2 -7
  76. package/dist/types/sdk/market/MarketSuite.d.ts +2 -1
  77. package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +6 -3
  78. package/dist/types/sdk/market/credit/CreditSuite.d.ts +2 -2
  79. package/dist/types/sdk/market/credit/expectedBalanceDeltas.d.ts +39 -0
  80. package/dist/types/sdk/market/credit/index.d.ts +3 -2
  81. package/dist/types/sdk/market/credit/types.d.ts +26 -3
  82. package/dist/types/sdk/market/index.d.ts +4 -3
  83. package/dist/types/sdk/market/rwa/index.d.ts +2 -2
  84. package/dist/types/sdk/market/rwa/securitize/SecuritizeRWAFactory.d.ts +1 -2
  85. package/dist/types/sdk/market/rwa/types.d.ts +11 -2
  86. package/dist/types/sdk/options.d.ts +4 -4
  87. package/dist/types/sdk/pools/types.d.ts +1 -12
  88. package/dist/types/sdk/utils/index.d.ts +2 -2
  89. package/dist/types/sdk/utils/zod.d.ts +7 -3
  90. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { ILogger, LogFn } from "./types/logger.js";
2
- import { Curator, GearboxChain, NetworkType, SUPPORTED_NETWORKS, SunsetStrategy, chains, findCuratorMarketConfigurator, getAssetType, getChain, getCuratorName, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork } from "./chain/chains.js";
2
+ import { GearboxChain, NetworkType, SUPPORTED_NETWORKS, SunsetStrategy, chains, findCuratorMarketConfigurator, getAssetType, getChain, getCuratorName, getNetworkType, isPublicNetwork, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork } from "./chain/chains.js";
3
3
  import { MultichainNetworkMeta, MultichainNetworkProps, MultichainNetworksProps, MultichainResult, WithMultichain } from "./types/multichain.js";
4
4
  import { ClaimableWithdrawal, CurrentWithdrawals, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, GetWithdrawalRequestResultProps, IRedemptionLoggerContract, IWithdrawalCompressorContract, PendingWithdrawal, RedemptionLog, RequestableWithdrawal, WithdrawableAsset, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, toWithdrawalStatus } from "./accounts/withdrawal-compressor/types.js";
5
5
  import { detectNetwork } from "./chain/detectNetwork.js";
@@ -7,7 +7,7 @@ import "./chain/index.js";
7
7
  import { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall } from "./utils/viem/simulateCall.js";
8
8
  import { AddressMap } from "./utils/AddressMap.js";
9
9
  import { AddressSet } from "./utils/AddressSet.js";
10
- import { AdapterData, AssertAssignable, Asset, BaseParams, BaseState, ConnectedBotData, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, GaugeData, IBaseContract, MarketData, MarketFilter, ParsedCall, ParsedCallArgs, ParsedCallV2, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RateKeeperState, RelaxedBaseParams, RewardInfo, TokenInfo, Unarray, VotingContractStatus } from "./base/types.js";
10
+ 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";
11
11
  import { AssetsMap } from "./utils/AssetsMap.js";
12
12
  import { functionArgsToMap, functionArgsToRecord, getFunctionSignature } from "./utils/abi-decode.js";
13
13
  import { BigIntMath } from "./utils/bigint-math.js";
@@ -41,29 +41,10 @@ import { WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, watchBlocksAsyn
41
41
  import "./utils/viem/index.js";
42
42
  import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./market/rwa/securitize/constants.js";
43
43
  import { SecuritizeLiquidatorContract } from "./market/rwa/securitize/SecuritizeLiquidatorContract.js";
44
- import { IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./market/rwa/types.js";
44
+ 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";
45
45
  import { DStokenData, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature } from "./market/rwa/securitize/types.js";
46
46
  import { SecuritizeRWAFactory } from "./market/rwa/securitize/SecuritizeRWAFactory.js";
47
47
  import { RWARegistry } from "./market/rwa/RWARegistry.js";
48
- import { ClosePathBalances, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, IRouterContract, OpenStrategyResult, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, SwapOperation } from "./router/types.js";
49
- import { createRouter } from "./router/createRouter.js";
50
- import { assetsMap } from "./router/helpers.js";
51
- import { RouterV310Contract } from "./router/RouterV310Contract.js";
52
- import "./router/index.js";
53
- import { CreditAccountDataCall, CreditAccountFilter, CreditAccountReadOptions, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsTarget, CreditManagerFilter, GetCreditAccountsArgs, GetCreditAccountsOptions, ListStrategyPositionsProps } from "./accounts/credit-account-compressor/types.js";
54
- import { CreditAccountCompressor } from "./accounts/credit-account-compressor/CreditAccountCompressor.js";
55
- import { CreditAccountCompressorV310Contract } from "./accounts/credit-account-compressor/CreditAccountCompressorV310Contract.js";
56
- import { AbstractWithdrawalCompressorContract, OnchainRequestableWithdrawal, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal } from "./accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js";
57
- import { WithdrawalCompressorLocation, WithdrawalCompressorVersion, getWithdrawalCompressorAddress } from "./accounts/withdrawal-compressor/addresses.js";
58
- import { createRedemptionLogger } from "./accounts/withdrawal-compressor/createRedemptionLogger.js";
59
- import { createWithdrawalCompressor } from "./accounts/withdrawal-compressor/createWithdrawalCompressor.js";
60
- import { InvalidDelayedIntentError } from "./accounts/withdrawal-compressor/errors.js";
61
- import { DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, decodeDelayedIntent, encodeDelayedIntent } from "./accounts/withdrawal-compressor/intent-codec.js";
62
- import { RedemptionLoggerV310Contract } from "./accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js";
63
- import { WithdrawalCompressorV310Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js";
64
- import { WithdrawalCompressorV311Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js";
65
- import { WithdrawalCompressorV313Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js";
66
- import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PermitResult, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, Rewards } from "./accounts/types.js";
67
48
  import { AddressProviderV3StateHuman, AliasLossPolicyStateHuman, AssetPriceFeedStateHuman, BalancerWeightedPriceFeedStateHuman, BaseContractStateHuman, BasePriceFeedStateHuman, BotListStateHuman, BoundedOracleStateHuman, ConstantOracleStateHuman, CoreStateHuman, CreditConfiguratorStateHuman, CreditFacadeStateHuman, CreditManagerDebtParamsHuman, CreditManagerStateHuman, CreditSuiteStateHuman, GaugeParamsHuman, GaugeStateHuman, GearStakingV3StateHuman, GearboxStateHuman, InterestRateModelStateHuman, LPPriceFeedStateHuman, LinearInterestRateModelStateHuman, LossPolicyStateHuman, MarketStateHuman, MultichainStateHuman, PoolQuotaKeeperStateHuman, PoolStateHuman, PoolSuiteStateHuman, PriceFeedStateHuman, PriceOracleStateHuman, QuotaParamsHuman, RateKeeperStateHuman, RedstonePriceFeedStateHuman, TumblerStateHuman, ZapperStateHuman } from "./types/state-human.js";
68
49
  import { IPriceFeedContract, IUpdatablePriceFeedContract, PriceFeedContractType, PriceFeedUsageType, PriceUpdate, UpdatePriceFeedsResult } from "./market/pricefeeds/types.js";
69
50
  import { PriceFeedRef } from "./market/pricefeeds/PriceFeedRef.js";
@@ -91,11 +72,16 @@ import { RedstonePriceFeedContract } from "./market/pricefeeds/RedstonePriceFeed
91
72
  import { WstETHPriceFeedContract } from "./market/pricefeeds/WstETHPriceFeed.js";
92
73
  import { YearnPriceFeedContract } from "./market/pricefeeds/YearnPriceFeed.js";
93
74
  import { ZeroPriceFeedContract } from "./market/pricefeeds/ZeroPriceFeed.js";
94
- import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams } from "./market/credit/types.js";
75
+ import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps } from "./market/credit/types.js";
95
76
  import { CreditConfiguratorV310Contract, RampEvent } from "./market/credit/CreditConfiguratorV310Contract.js";
96
77
  import { CreditFacadeV310Abi as abi, CreditFacadeV310BaseContract } from "./market/credit/CreditFacadeV310BaseContract.js";
97
78
  import { CreditFacadeV310Contract } from "./market/credit/CreditFacadeV310Contract.js";
98
79
  import { CreditManagerV310Contract } from "./market/credit/CreditManagerV310Contract.js";
80
+ import { ClosePathBalances, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, IRouterContract, OpenStrategyResult, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, SwapOperation } from "./router/types.js";
81
+ import { createRouter } from "./router/createRouter.js";
82
+ import { assetsMap } from "./router/helpers.js";
83
+ import { RouterV310Contract } from "./router/RouterV310Contract.js";
84
+ import "./router/index.js";
99
85
  import { IPriceOracleContract, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions } from "./market/oracle/types.js";
100
86
  import { createPriceOracle } from "./market/oracle/createPriceOracle.js";
101
87
  import { PriceOracleV310Contract } from "./market/oracle/PriceOracleV310Contract.js";
@@ -107,6 +93,7 @@ import { PoolV310Contract } from "./market/pool/PoolV310Contract.js";
107
93
  import { MarketSuite, StrategyRef } from "./market/MarketSuite.js";
108
94
  import { CreditSuite } from "./market/credit/CreditSuite.js";
109
95
  import { dominantCollateral, mustGetDominantCollateral } from "./market/credit/dominantCollateral.js";
96
+ import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./market/credit/expectedBalanceDeltas.js";
110
97
  import { ZapperData } from "./market/types.js";
111
98
  import { IZapperContract, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem } from "./market/zapper/types.js";
112
99
  import { createZapper } from "./market/zapper/createZapper.js";
@@ -138,7 +125,7 @@ import { Methods, PartialRecord, SupportedValue, TypedObjectUtils } from "./util
138
125
  import { RetryOptions, retry } from "./utils/retry.js";
139
126
  import { toAddress } from "./utils/toAddress.js";
140
127
  import { PickSomeRequired } from "./utils/type-utils.js";
141
- import { ZodAddress, ZodHex } from "./utils/zod.js";
128
+ import { ZodAddress, ZodBigInt, ZodHex } from "./utils/zod.js";
142
129
  import "./utils/index.js";
143
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";
144
131
  import { FormatBNOptions, TokensMeta } from "./base/TokensMeta.js";
@@ -158,6 +145,20 @@ import { ChainQueryProps, MultichainConstruct } from "./base/MultichainConstruct
158
145
  import { PlaceholderContract } from "./base/PlaceholderContract.js";
159
146
  import { SDKConstruct } from "./base/SDKConstruct.js";
160
147
  import "./base/index.js";
148
+ import { CreditAccountDataCall, CreditAccountFilter, CreditAccountReadOptions, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsTarget, CreditManagerFilter, GetCreditAccountsArgs, GetCreditAccountsOptions, ListStrategyPositionsProps } from "./accounts/credit-account-compressor/types.js";
149
+ import { CreditAccountCompressor } from "./accounts/credit-account-compressor/CreditAccountCompressor.js";
150
+ import { CreditAccountCompressorV310Contract } from "./accounts/credit-account-compressor/CreditAccountCompressorV310Contract.js";
151
+ import { AbstractWithdrawalCompressorContract, OnchainRequestableWithdrawal, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal } from "./accounts/withdrawal-compressor/AbstractWithdrawalCompressorContract.js";
152
+ import { WithdrawalCompressorLocation, WithdrawalCompressorVersion, getWithdrawalCompressorAddress } from "./accounts/withdrawal-compressor/addresses.js";
153
+ import { createRedemptionLogger } from "./accounts/withdrawal-compressor/createRedemptionLogger.js";
154
+ import { createWithdrawalCompressor } from "./accounts/withdrawal-compressor/createWithdrawalCompressor.js";
155
+ import { InvalidDelayedIntentError } from "./accounts/withdrawal-compressor/errors.js";
156
+ import { DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, decodeDelayedIntent, encodeDelayedIntent } from "./accounts/withdrawal-compressor/intent-codec.js";
157
+ import { RedemptionLoggerV310Contract } from "./accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js";
158
+ import { WithdrawalCompressorV310Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js";
159
+ import { WithdrawalCompressorV311Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js";
160
+ import { WithdrawalCompressorV313Contract } from "./accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js";
161
+ import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards } from "./accounts/types.js";
161
162
  import { AccountToCheck, BotStatusCall, BotsDirectResponse, CMSlice, ConnectedBotsCall, ConnectedBotsPerAccount, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, MulticallWithFailure, SetBotProps, SetBotResult } from "./accounts/bots/types.js";
162
163
  import { AccountBotsService } from "./accounts/bots/AccountBotsService.js";
163
164
  import { PeripheryCompressorV310Contract } from "./accounts/bots/PeripheryCompressorV310Contract.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 BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, Curator, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type IntentPreviewResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallWithFailure, MultichainAttachOptions, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkMeta, type MultichainNetworkProps, type MultichainNetworksProps, MultichainOpportunitiesService, MultichainPositionsService, type MultichainResult, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithMultichain, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodHex, additionalBorrowApyBps, assetsMap, attachOptionsSchema, borrowApyBps, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
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 BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type IntentPreviewResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallWithFailure, MultichainAttachOptions, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkMeta, type MultichainNetworkProps, type MultichainNetworksProps, MultichainOpportunitiesService, MultichainPositionsService, type MultichainResult, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWALiquidatorInfo, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithMultichain, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, 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, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
@@ -1,4 +1,4 @@
1
- import { Curator } from "../../model/primitives.js";
1
+ import { Curator } from "../../model/curators.js";
2
2
  import { PeripheryContract } from "../constants/periphery.js";
3
3
  import "../constants/index.js";
4
4
  import "../../model/index.js";
@@ -1533,14 +1533,9 @@ declare const abi: readonly [{
1533
1533
  }];
1534
1534
  type abi = typeof abi;
1535
1535
  declare class MarketConfiguratorContract extends BaseContract<abi> {
1536
- #private;
1537
1536
  constructor(options: ConstructOptions, address: Address);
1538
- loadCuratorName(): Promise<void>;
1539
1537
  /**
1540
- * The entity operating this configurator, as the shared read model describes
1541
- * it. The curated per-chain table wins over the name the contract reports,
1542
- * because the two sources must agree across services and only the table is
1543
- * shared with the backend.
1538
+ * The entity operating this configurator
1544
1539
  */
1545
1540
  get curator(): Curator;
1546
1541
  static getPeripheryContractBatch(configurators: MarketConfiguratorContract[], client: MarketConfiguratorContract["client"], contract: PeripheryContract, blockNumber?: bigint): Promise<({
@@ -1,4 +1,5 @@
1
- import { Curator, Token } from "../../model/primitives.js";
1
+ import { Curator } from "../../model/curators.js";
2
+ import { Token } from "../../model/primitives.js";
2
3
  import { MarketData } from "../base/types.js";
3
4
  import { Opportunity, OpportunityFilter, PoolOpportunity, PoolOpportunityDetail, PriceFeedSummary, QuotaAsset, StrategyOpportunityDetail } from "../../model/opportunities.js";
4
5
  import "../../model/index.js";
@@ -1,9 +1,8 @@
1
- import { Asset, CreditFacadeState, CreditSuiteState } from "../../base/types.js";
2
- import { PermitResult, PrepareUpdateQuotasProps } from "../../accounts/types.js";
1
+ import { Asset, CreditFacadeState, CreditSuiteState, PermitResult } from "../../base/types.js";
3
2
  import { CreditFacadeStateHuman } from "../../types/state-human.js";
4
3
  import { PriceUpdate } from "../pricefeeds/types.js";
5
4
  import "../pricefeeds/index.js";
6
- import { BalanceDelta, CreditAccountTokenQuota, ICreditFacadeContract } from "./types.js";
5
+ import { BalanceDelta, CreditAccountTokenQuota, ICreditFacadeContract, PrepareUpdateQuotasProps } from "./types.js";
7
6
  import { CreditFacadeV310Abi as abi$1, CreditFacadeV310BaseContract } from "./CreditFacadeV310BaseContract.js";
8
7
  import { MultiCall, RawTx } from "../../types/transactions.js";
9
8
  import { ConstructOptions } from "../../base/Construct.js";
@@ -68,6 +67,10 @@ declare class CreditFacadeV310Contract extends CreditFacadeV310BaseContract impl
68
67
  * {@inheritDoc ICreditFacadeContract.prepareCompareBalances}
69
68
  */
70
69
  prepareCompareBalances(): MultiCall;
70
+ /**
71
+ * {@inheritDoc ICreditFacadeContract.prepareWithBalanceCheck}
72
+ */
73
+ prepareWithBalanceCheck(deltas: BalanceDelta[], calls: MultiCall[]): MultiCall[];
71
74
  }
72
75
  //#endregion
73
76
  export { CreditFacadeV310Contract };
@@ -3,10 +3,10 @@ import { CreditAccountData, CreditSuiteState } from "../../base/types.js";
3
3
  import { StrategyOpportunity, StrategyOpportunityDetail } from "../../../model/opportunities.js";
4
4
  import "../../../model/index.js";
5
5
  import { IRWAFactory, RWAOperationArgs } from "../rwa/types.js";
6
- import { IRouterContract } from "../../router/types.js";
7
- import "../../router/index.js";
8
6
  import { CreditSuiteStateHuman } from "../../types/state-human.js";
9
7
  import { ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams } from "./types.js";
8
+ import { IRouterContract } from "../../router/types.js";
9
+ import "../../router/index.js";
10
10
  import { MarketConfiguratorContract } from "../MarketConfiguratorContract.js";
11
11
  import { MarketSuite } from "../MarketSuite.js";
12
12
  import { MultiCall, RawTx } from "../../types/transactions.js";
@@ -0,0 +1,39 @@
1
+ import { BalanceDelta } from "./types.js";
2
+ import { Address } from "viem";
3
+ //#region src/sdk/market/credit/expectedBalanceDeltas.d.ts
4
+ /**
5
+ * One token amount a multicall is expected to produce on the credit account.
6
+ * `WithdrawalOutput` satisfy it without this module knowing about them.
7
+ */
8
+ interface ExpectedOutput {
9
+ token: Address;
10
+ /**
11
+ * Non-negative amount of `token` the multicall is expected to produce.
12
+ */
13
+ amount: bigint;
14
+ }
15
+ /**
16
+ * Props for {@link expectedBalanceDeltas}.
17
+ */
18
+ interface ExpectedBalanceDeltasProps {
19
+ /**
20
+ * Amounts the multicall is expected to produce, summed per token.
21
+ */
22
+ outputs: readonly ExpectedOutput[];
23
+ /**
24
+ * Token the multicall spends, e.g. the source token of a delayed withdrawal
25
+ * request or the withdrawal phantom token burned by a claim.
26
+ */
27
+ spentToken: Address;
28
+ /**
29
+ * Amount of `spentToken` spent. No negative delta is emitted when it is 0.
30
+ */
31
+ spentAmount: bigint;
32
+ }
33
+ /**
34
+ * Builds the `storeExpectedBalances` deltas of a multicall from the amounts it
35
+ * is expected to produce and the token it spends.
36
+ */
37
+ declare function expectedBalanceDeltas({ outputs, spentToken, spentAmount }: ExpectedBalanceDeltasProps): BalanceDelta[];
38
+ //#endregion
39
+ export { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas };
@@ -1,8 +1,9 @@
1
- import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams } from "./types.js";
1
+ import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps } from "./types.js";
2
2
  import { CreditConfiguratorV310Contract, RampEvent } from "./CreditConfiguratorV310Contract.js";
3
3
  import { CreditFacadeV310Abi as abi, CreditFacadeV310BaseContract } from "./CreditFacadeV310BaseContract.js";
4
4
  import { CreditFacadeV310Contract } from "./CreditFacadeV310Contract.js";
5
5
  import { CreditManagerV310Contract } from "./CreditManagerV310Contract.js";
6
6
  import { CreditSuite } from "./CreditSuite.js";
7
7
  import { dominantCollateral, mustGetDominantCollateral } from "./dominantCollateral.js";
8
- export { BalanceDelta, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, RampEvent, dominantCollateral, mustGetDominantCollateral };
8
+ import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./expectedBalanceDeltas.js";
9
+ export { BalanceDelta, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, ExpectedBalanceDeltasProps, ExpectedOutput, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps, RampEvent, dominantCollateral, expectedBalanceDeltas, mustGetDominantCollateral };
@@ -1,10 +1,9 @@
1
1
  import { Bps, Leverage } from "../../../model/primitives.js";
2
2
  import { AddressMap } from "../../utils/AddressMap.js";
3
- import { Asset, IBaseContract } from "../../base/types.js";
3
+ import { Asset, IBaseContract, PermitResult } from "../../base/types.js";
4
4
  import { IAdapterContract } from "../adapters/types.js";
5
5
  import "../adapters/index.js";
6
6
  import "../../../model/index.js";
7
- import { PermitResult, PrepareUpdateQuotasProps } from "../../accounts/types.js";
8
7
  import { CreditConfiguratorStateHuman, CreditFacadeStateHuman, CreditManagerStateHuman } from "../../types/state-human.js";
9
8
  import { PriceUpdate } from "../pricefeeds/types.js";
10
9
  import "../pricefeeds/index.js";
@@ -48,6 +47,25 @@ interface CreditAccountTokenQuota {
48
47
  token: Address;
49
48
  quota: bigint;
50
49
  }
50
+ /**
51
+ * Quota `Asset.balance` values are denominated in **pool underlying token
52
+ * units**, not in the quoted token's own units.
53
+ **/
54
+ interface PrepareUpdateQuotasProps {
55
+ /**
56
+ * Average quota for desired token, in pool underlying units
57
+ * (see {@link PrepareUpdateQuotasProps})
58
+ */
59
+ averageQuota: Array<Asset>;
60
+ /**
61
+ * Minimum quota for desired token, in pool underlying units.
62
+ * The credit facade rounds quota changes down to a multiple of
63
+ * `PERCENTAGE_FACTOR`; the min quota bound must not exceed the rounded
64
+ * value, otherwise the quota keeper reverts with
65
+ * `QuotaIsOutOfBoundsException`.
66
+ */
67
+ minQuota: Array<Asset>;
68
+ }
51
69
  /**
52
70
  * Wrapper around the core credit manager contract.
53
71
  */
@@ -256,6 +274,11 @@ interface ICreditFacadeContract extends IBaseContract {
256
274
  * Encodes a `compareBalances` multicall entry.
257
275
  */
258
276
  prepareCompareBalances(): MultiCall;
277
+ /**
278
+ * Wraps `calls` in a `storeExpectedBalances` / `compareBalances` bracket, so
279
+ * that the facade asserts the multicall produced at least `deltas`.
280
+ */
281
+ prepareWithBalanceCheck(deltas: BalanceDelta[], calls: MultiCall[]): MultiCall[];
259
282
  }
260
283
  /**
261
284
  * Partial liquidation parameters a caller wants to pin down instead of letting
@@ -293,4 +316,4 @@ interface PartialLiquidationParams {
293
316
  optimalHF?: bigint;
294
317
  }
295
318
  //#endregion
296
- export { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams };
319
+ export { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps };
@@ -6,7 +6,7 @@ import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./rwa/mida
6
6
  import { MidasLiquidatorContract } from "./rwa/midas/MidasLiquidatorContract.js";
7
7
  import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./rwa/securitize/constants.js";
8
8
  import { SecuritizeLiquidatorContract } from "./rwa/securitize/SecuritizeLiquidatorContract.js";
9
- import { IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./rwa/types.js";
9
+ import { GetOpenAccountRequirementsProps, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./rwa/types.js";
10
10
  import { DStokenData, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature } from "./rwa/securitize/types.js";
11
11
  import { SecuritizeRWAFactory } from "./rwa/securitize/SecuritizeRWAFactory.js";
12
12
  import { RWARegistry } from "./rwa/RWARegistry.js";
@@ -38,7 +38,7 @@ import { WstETHPriceFeedContract } from "./pricefeeds/WstETHPriceFeed.js";
38
38
  import { YearnPriceFeedContract } from "./pricefeeds/YearnPriceFeed.js";
39
39
  import { ZeroPriceFeedContract } from "./pricefeeds/ZeroPriceFeed.js";
40
40
  import "./pricefeeds/index.js";
41
- import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams } from "./credit/types.js";
41
+ import { BalanceDelta, CreditAccountTokenQuota, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, LiquidationFees, PartialLiquidationParams, PrepareUpdateQuotasProps } from "./credit/types.js";
42
42
  import { CreditConfiguratorV310Contract, RampEvent } from "./credit/CreditConfiguratorV310Contract.js";
43
43
  import { CreditFacadeV310Abi as abi, CreditFacadeV310BaseContract } from "./credit/CreditFacadeV310BaseContract.js";
44
44
  import { CreditFacadeV310Contract } from "./credit/CreditFacadeV310Contract.js";
@@ -56,6 +56,7 @@ import "./pool/index.js";
56
56
  import { MarketSuite, StrategyRef } from "./MarketSuite.js";
57
57
  import { CreditSuite } from "./credit/CreditSuite.js";
58
58
  import { dominantCollateral, mustGetDominantCollateral } from "./credit/dominantCollateral.js";
59
+ import { ExpectedBalanceDeltasProps, ExpectedOutput, expectedBalanceDeltas } from "./credit/expectedBalanceDeltas.js";
59
60
  import "./credit/index.js";
60
61
  import { ZapperData } from "./types.js";
61
62
  import { IZapperContract, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem } from "./zapper/types.js";
@@ -66,4 +67,4 @@ import { IERC20ZapperContract } from "./zapper/IERC20ZapperContract.js";
66
67
  import { IETHZapperContract } from "./zapper/IETHZapperContract.js";
67
68
  import "./zapper/index.js";
68
69
  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, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, GaugeContract, GaugeParams, 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, 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, fetchPythPayloads, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed, mustGetDominantCollateral };
70
+ 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 FetchPythPayloadsOptions, 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, fetchPythPayloads, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed, mustGetDominantCollateral };
@@ -3,9 +3,9 @@ import { MidasLiquidatorContract } from "./midas/MidasLiquidatorContract.js";
3
3
  import "./midas/index.js";
4
4
  import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./securitize/constants.js";
5
5
  import { SecuritizeLiquidatorContract } from "./securitize/SecuritizeLiquidatorContract.js";
6
- import { IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./types.js";
6
+ import { GetOpenAccountRequirementsProps, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./types.js";
7
7
  import { DStokenData, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature } from "./securitize/types.js";
8
8
  import { SecuritizeRWAFactory } from "./securitize/SecuritizeRWAFactory.js";
9
9
  import "./securitize/index.js";
10
10
  import { RWARegistry } from "./RWARegistry.js";
11
- export { DStokenData, IRWAFactory, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, 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, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, isRWAFactory };
11
+ export { DStokenData, GetOpenAccountRequirementsProps, IRWAFactory, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, 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, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, isRWAFactory };
@@ -1,8 +1,7 @@
1
1
  import { RWA_FACTORY_SECURITIZE } from "./constants.js";
2
- import { IRWAFactory, RWACompressorInvestorData, RWAFactoryData } from "../types.js";
2
+ import { GetOpenAccountRequirementsProps, IRWAFactory, RWACompressorInvestorData, RWAFactoryData } from "../types.js";
3
3
  import { SecuritizeDegenNFT } from "./SecuritizeDegenNFT.js";
4
4
  import { DStokenData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman } from "./types.js";
5
- import { GetOpenAccountRequirementsProps } from "../../../accounts/types.js";
6
5
  import { MultiCall, RawTx } from "../../../types/transactions.js";
7
6
  import { OnchainSDK } from "../../../OnchainSDK.js";
8
7
  import "../../../types/index.js";
@@ -3,7 +3,6 @@ import { IBaseContract, Unarray } from "../../base/types.js";
3
3
  import { RWA_FACTORY_SECURITIZE } from "./securitize/constants.js";
4
4
  import { SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman } from "./securitize/types.js";
5
5
  import "./securitize/index.js";
6
- import { GetOpenAccountRequirementsProps } from "../../accounts/types.js";
7
6
  import { MultiCall, RawTx } from "../../types/transactions.js";
8
7
  import "../../types/index.js";
9
8
  import "../../base/index.js";
@@ -91,6 +90,16 @@ interface RWAStateHuman {
91
90
  /** State of each loaded RWA factory. */
92
91
  factories: RWAFactoryStateHuman[];
93
92
  }
93
+ /**
94
+ * Options to get open account requirements
95
+ * Compatible with StrategyConfigPayload
96
+ */
97
+ interface GetOpenAccountRequirementsProps {
98
+ /**
99
+ * Token address of the strategy
100
+ */
101
+ tokenOutAddress: Address;
102
+ }
94
103
  /**
95
104
  * Shared interface for all RWA factory contracts.
96
105
  *
@@ -198,4 +207,4 @@ interface IRWAFactory<T extends RWAFactoryType = RWAFactoryType> extends IBaseCo
198
207
  **/
199
208
  declare function isRWAFactory<T extends RWAFactoryType = RWAFactoryType>(contract: IBaseContract, type?: T): contract is IRWAFactory<T>;
200
209
  //#endregion
201
- export { IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory };
210
+ export { GetOpenAccountRequirementsProps, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory };
@@ -17,12 +17,12 @@ declare const onchainSDKOptionsSchema: z.ZodObject<{
17
17
  * Zod schema for validating {@link AttachOptions} at runtime.
18
18
  **/
19
19
  declare const attachOptionsSchema: z.ZodObject<{
20
- addressProvider: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
21
- marketConfigurators: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
22
- rwaFactories: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
20
+ addressProvider: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
21
+ marketConfigurators: z.ZodOptional<z.ZodArray<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>>;
22
+ rwaFactories: z.ZodOptional<z.ZodArray<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>>;
23
23
  blockNumber: z.ZodOptional<z.ZodUnion<readonly [z.ZodBigInt, z.ZodNumber]>>;
24
24
  ignoreUpdateablePrices: z.ZodOptional<z.ZodBoolean>;
25
- ignoreMarkets: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
25
+ ignoreMarkets: z.ZodOptional<z.ZodArray<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>>;
26
26
  redstone: z.ZodOptional<z.ZodObject<{
27
27
  historicTimestamp: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<true>]>>;
28
28
  gateways: z.ZodOptional<z.ZodArray<z.ZodURL>>;
@@ -1,4 +1,4 @@
1
- import { Asset } from "../base/types.js";
1
+ import { Asset, PermitResult } from "../base/types.js";
2
2
  import { PoolPosition } from "../../model/positions.js";
3
3
  import "../../model/index.js";
4
4
  import { IZapperContract } from "../market/zapper/types.js";
@@ -7,17 +7,6 @@ import { MultiCall, RawTx } from "../types/transactions.js";
7
7
  import "../base/index.js";
8
8
  import { Abi, Address, ContractFunctionArgs, ContractFunctionName } from "viem";
9
9
  //#region src/sdk/pools/types.d.ts
10
- interface PermitResult {
11
- r: Address;
12
- s: Address;
13
- v: number;
14
- token: Address;
15
- owner: Address;
16
- spender: Address;
17
- value: bigint;
18
- deadline: bigint;
19
- nonce: bigint;
20
- }
21
10
  type PoolServiceCall<abi extends Abi | readonly unknown[] = Abi, functionName extends ContractFunctionName<abi, "nonpayable" | "payable"> = ContractFunctionName<abi, "nonpayable" | "payable">, args extends ContractFunctionArgs<abi, "nonpayable" | "payable", functionName> = ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>> = {
22
11
  abi: abi;
23
12
  functionName: functionName;
@@ -16,5 +16,5 @@ import { Methods, PartialRecord, SupportedValue, TypedObjectUtils } from "./mapp
16
16
  import { RetryOptions, retry } from "./retry.js";
17
17
  import { toAddress } from "./toAddress.js";
18
18
  import { PickSomeRequired } from "./type-utils.js";
19
- import { ZodAddress, ZodHex } from "./zod.js";
20
- export { AddressMap, AddressSet, AssetsMap, BigIntMath, EtherscanURLParam, FilterDustUSDOptions, IsDustOptions, Methods, PartialRecord, PickSomeRequired, RetryOptions, SupportedValue, TypedObjectUtils, ZodAddress, ZodHex, bytes32ToString, childLogger, createRawTx, etherscanApiUrl, etherscanUrl, filterDust, filterDustUSD, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, getFunctionSignature, hexEq, isDust, json_parse, json_stringify, numberWithCommas, percentFmt, rayToNumber, retry, shortAddress, shortHash, toAddress, toBN, toBigInt, toSignificant };
19
+ import { ZodAddress, ZodBigInt, ZodHex } from "./zod.js";
20
+ export { AddressMap, AddressSet, AssetsMap, BigIntMath, EtherscanURLParam, FilterDustUSDOptions, IsDustOptions, Methods, PartialRecord, PickSomeRequired, RetryOptions, SupportedValue, TypedObjectUtils, ZodAddress, ZodBigInt, ZodHex, bytes32ToString, childLogger, createRawTx, etherscanApiUrl, etherscanUrl, filterDust, filterDustUSD, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, getFunctionSignature, hexEq, isDust, json_parse, json_stringify, numberWithCommas, percentFmt, rayToNumber, retry, shortAddress, shortHash, toAddress, toBN, toBigInt, toSignificant };
@@ -1,13 +1,17 @@
1
1
  import { Address, Hex } from "viem";
2
2
  import { z } from "zod/v4";
3
3
  //#region src/sdk/utils/zod.d.ts
4
+ /**
5
+ * A `bigint` codec that serializes into string, deserializes into bigint.
6
+ */
7
+ declare const ZodBigInt: () => z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
4
8
  /**
5
9
  * Like Address from abitype/zod, but converts an address into an address that is checksum encoded.
6
10
  */
7
- declare const ZodAddress: () => z.ZodPipe<z.ZodString, z.ZodTransform<Address, string>>;
11
+ declare const ZodAddress: () => z.ZodCodec<z.ZodString, z.ZodCustom<Address, Address>>;
8
12
  /**
9
13
  * A `0x`-prefixed hex string, as viem's Hex.
10
14
  */
11
- declare const ZodHex: () => z.ZodPipe<z.ZodString, z.ZodTransform<Hex, string>>;
15
+ declare const ZodHex: () => z.ZodCodec<z.ZodString, z.ZodCustom<Hex, Hex>>;
12
16
  //#endregion
13
- export { ZodAddress, ZodHex };
17
+ export { ZodAddress, ZodBigInt, ZodHex };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.12.0-next.76",
3
+ "version": "14.12.0-next.78",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {