@oydual31/more-vaults-sdk 1.1.21 → 1.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ethers/index.cjs +20 -0
- package/dist/ethers/index.cjs.map +1 -1
- package/dist/ethers/index.d.cts +5 -2
- package/dist/ethers/index.d.ts +5 -2
- package/dist/ethers/index.js +20 -1
- package/dist/ethers/index.js.map +1 -1
- package/dist/react/index.cjs +22 -9
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +22 -9
- package/dist/react/index.js.map +1 -1
- package/dist/viem/index.cjs +34 -12
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +20 -4
- package/dist/viem/index.d.ts +20 -4
- package/dist/viem/index.js +34 -13
- package/dist/viem/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ethers/abis.ts +5 -0
- package/src/ethers/errorParser.ts +8 -0
- package/src/ethers/errors.ts +7 -0
- package/src/ethers/index.ts +1 -0
- package/src/ethers/redeemFlows.ts +11 -1
- package/src/viem/abis.ts +4 -0
- package/src/viem/adminActions.ts +2 -2
- package/src/viem/chains.ts +3 -2
- package/src/viem/curatorMulticall.ts +1 -1
- package/src/viem/curatorStatus.ts +4 -4
- package/src/viem/curatorSubVaults.ts +3 -3
- package/src/viem/curatorSwaps.ts +4 -2
- package/src/viem/errorParser.ts +8 -0
- package/src/viem/errors.ts +7 -0
- package/src/viem/index.ts +1 -0
- package/src/viem/redeemFlows.ts +13 -1
- package/src/viem/vaultConfig.ts +1 -1
package/dist/ethers/index.d.cts
CHANGED
|
@@ -754,7 +754,7 @@ interface MultiChainPortfolio {
|
|
|
754
754
|
* Human-readable ABI fragments for MoreVaults diamond facets.
|
|
755
755
|
* Extracted from compiled artifacts in out/.
|
|
756
756
|
*/
|
|
757
|
-
declare const VAULT_ABI: readonly ["function deposit(uint256 assets, address receiver) returns (uint256 shares)", "function mint(uint256 shares, address receiver) returns (uint256 assets)", "function withdraw(uint256 assets, address receiver, address owner) returns (uint256 shares)", "function redeem(uint256 shares, address receiver, address owner) returns (uint256 assets)", "function deposit(address[] tokens, uint256[] assets, address receiver, uint256 minAmountOut) payable returns (uint256 shares)", "function requestRedeem(uint256 shares, address onBehalfOf)", "function requestWithdraw(uint256 assets, address onBehalfOf)", "function clearRequest()", "function getWithdrawalRequest(address _owner) view returns (uint256 shares, uint256 timelockEndsAt)", "function totalAssets() view returns (uint256)", "function totalSupply() view returns (uint256)", "function balanceOf(address account) view returns (uint256)", "function asset() view returns (address)", "function convertToShares(uint256 assets) view returns (uint256)", "function convertToAssets(uint256 shares) view returns (uint256)", "function previewDeposit(uint256 assets) view returns (uint256)", "function previewRedeem(uint256 shares) view returns (uint256)", "function paused() view returns (bool)", "event Deposit(address indexed sender, address indexed owner, address[] tokens, uint256[] assets, uint256 shares)", "event Transfer(address indexed from, address indexed to, uint256 value)", "event WithdrawRequestCreated(address requester, uint256 sharesAmount, uint256 endsAt)", "event WithdrawRequestFulfilled(address requester, address receiver, uint256 sharesAmount, uint256 assetAmount)"];
|
|
757
|
+
declare const VAULT_ABI: readonly ["error WithdrawalQueueDisabled()", "error WithdrawalQueueEnabled()", "error RequestWithdrawDisabled()", "function deposit(uint256 assets, address receiver) returns (uint256 shares)", "function mint(uint256 shares, address receiver) returns (uint256 assets)", "function withdraw(uint256 assets, address receiver, address owner) returns (uint256 shares)", "function redeem(uint256 shares, address receiver, address owner) returns (uint256 assets)", "function deposit(address[] tokens, uint256[] assets, address receiver, uint256 minAmountOut) payable returns (uint256 shares)", "function requestRedeem(uint256 shares, address onBehalfOf)", "function requestWithdraw(uint256 assets, address onBehalfOf)", "function clearRequest()", "function getWithdrawalRequest(address _owner) view returns (uint256 shares, uint256 timelockEndsAt)", "function totalAssets() view returns (uint256)", "function totalSupply() view returns (uint256)", "function balanceOf(address account) view returns (uint256)", "function asset() view returns (address)", "function convertToShares(uint256 assets) view returns (uint256)", "function convertToAssets(uint256 shares) view returns (uint256)", "function previewDeposit(uint256 assets) view returns (uint256)", "function previewRedeem(uint256 shares) view returns (uint256)", "function paused() view returns (bool)", "event Deposit(address indexed sender, address indexed owner, address[] tokens, uint256[] assets, uint256 shares)", "event Transfer(address indexed from, address indexed to, uint256 value)", "event WithdrawRequestCreated(address requester, uint256 sharesAmount, uint256 endsAt)", "event WithdrawRequestFulfilled(address requester, address receiver, uint256 sharesAmount, uint256 assetAmount)"];
|
|
758
758
|
declare const BRIDGE_ABI: readonly ["function initVaultActionRequest(uint8 actionType, bytes actionCallData, uint256 amountLimit, bytes extraOptions) payable returns (bytes32 guid)", "function getRequestInfo(bytes32 guid) view returns (tuple(address initiator, uint64 timestamp, uint8 actionType, bytes actionCallData, bool fulfilled, bool finalized, bool refunded, uint256 totalAssets, uint256 finalizationResult, uint256 amountLimit))", "function getFinalizationResult(bytes32 guid) view returns (uint256 result)", "function oraclesCrossChainAccounting() view returns (bool)", "function quoteAccountingFee(bytes extraOptions) view returns (uint256 nativeFee)", "function accountingBridgeFacet() view returns (uint256 sum, bool isPositive)"];
|
|
759
759
|
declare const CONFIG_ABI: readonly ["function getEscrow() view returns (address escrow)", "function getCrossChainAccountingManager() view returns (address)", "function isHub() view returns (bool)", "function getWithdrawalQueueStatus() view returns (bool)", "function getWithdrawalTimelock() view returns (uint64)", "function getWithdrawalFee() view returns (uint96)", "function getMaxWithdrawalDelay() view returns (uint32)", "function getAvailableAssets() view returns (address[])", "function getDepositableAssets() view returns (address[])", "function depositCapacity() view returns (uint256)", "function fee() view returns (uint96)", "function feeRecipient() view returns (address)", "function paused() view returns (bool)", "function maxDeposit(address receiver) view returns (uint256)"];
|
|
760
760
|
declare const METADATA_ABI: readonly ["function name() view returns (string)", "function symbol() view returns (string)", "function decimals() view returns (uint8)"];
|
|
@@ -842,6 +842,9 @@ declare class NotWhitelistedError extends MoreVaultsError {
|
|
|
842
842
|
declare class WhitelistQuotaExhaustedError extends MoreVaultsError {
|
|
843
843
|
constructor(vault: string, user: string);
|
|
844
844
|
}
|
|
845
|
+
declare class WithdrawalQueueDisabledError extends MoreVaultsError {
|
|
846
|
+
constructor(vault: string);
|
|
847
|
+
}
|
|
845
848
|
declare class InsufficientLiquidityError extends MoreVaultsError {
|
|
846
849
|
hubLiquid: bigint;
|
|
847
850
|
required: bigint;
|
|
@@ -2672,4 +2675,4 @@ declare function quoteRouteDepositFee(route: InboundRoute, hubChainId: number, a
|
|
|
2672
2675
|
*/
|
|
2673
2676
|
declare function asSdkSigner(signer: unknown): Signer;
|
|
2674
2677
|
|
|
2675
|
-
export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionType, type ActionTypeValue, ActionsStillPendingError, type AssetBalance, type AssetInfo, type AsyncRequestFinalResult, type AsyncRequestResult, type AsyncRequestStatus, type AsyncRequestStatusInfo, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, type BatchSwapParams, type BridgeParams, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, type ChainPortfolio, ComposeAlreadyExecutedError, ComposeTimeoutError, ComposerNotConfiguredError, type CrossChainRequestInfo, type CuratorAction, type CuratorBridgeParams, type CuratorVaultStatus, DEX_ABI, type DepositBlockReason, type DepositEligibility, type DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, type ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, type InboundRoute, type InboundRouteWithBalance, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, type MaxWithdrawable, MissingEscrowAddressError, MoreVaultsError, type MultiChainPortfolio, type MultiChainUserPosition, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, type OutboundRoute, type PendingAction, REGISTRY_ABI, type RedeemCostEstimate, type RedeemResult, SUB_VAULT_ABI, SlippageExceededError, type SpokeBalance, type SpokeRedeemRoute, type SubVaultInfo, type SubVaultPosition, type SubmitActionsResult, type SwapParams, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, UnsupportedAssetError, UnsupportedChainError, type UserBalances, type UserPosition, VAULT_ABI, VAULT_ANALYSIS_ABI, type VaultAddresses, type VaultAnalysis, type VaultAssetBreakdown, type VaultConfiguration, type VaultDistribution, type VaultMetadata, type VaultMode, VaultPausedError, type VaultPortfolio, type VaultStatus, type VaultSummary, type VaultTopology, WhitelistQuotaExhaustedError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkSigner, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, depositAsync, depositCrossChainOracleOn, depositFromSpoke, depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getERC7540RequestStatus, getFullVaultTopology, getInboundRoutes, getMaxWithdrawable, getOutboundRoutes, getPendingActions, getSubVaultInfo, getSubVaultPositions, getUserBalances, getUserBalancesForRoutes, getUserPosition, getUserPositionMultiChain, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultDistribution, getVaultDistributionWithTopology, getVaultMetadata, getVaultPortfolio, getVaultPortfolioMultiChain, getVaultStatus, getVaultSummary, getVaultTopology, getWithdrawalRequest, isAsyncMode, isCurator, isOnHubChain, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, withdrawAssets };
|
|
2678
|
+
export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionType, type ActionTypeValue, ActionsStillPendingError, type AssetBalance, type AssetInfo, type AsyncRequestFinalResult, type AsyncRequestResult, type AsyncRequestStatus, type AsyncRequestStatusInfo, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, type BatchSwapParams, type BridgeParams, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, type ChainPortfolio, ComposeAlreadyExecutedError, ComposeTimeoutError, ComposerNotConfiguredError, type CrossChainRequestInfo, type CuratorAction, type CuratorBridgeParams, type CuratorVaultStatus, DEX_ABI, type DepositBlockReason, type DepositEligibility, type DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, type ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, type InboundRoute, type InboundRouteWithBalance, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, type MaxWithdrawable, MissingEscrowAddressError, MoreVaultsError, type MultiChainPortfolio, type MultiChainUserPosition, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, type OutboundRoute, type PendingAction, REGISTRY_ABI, type RedeemCostEstimate, type RedeemResult, SUB_VAULT_ABI, SlippageExceededError, type SpokeBalance, type SpokeRedeemRoute, type SubVaultInfo, type SubVaultPosition, type SubmitActionsResult, type SwapParams, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, UnsupportedAssetError, UnsupportedChainError, type UserBalances, type UserPosition, VAULT_ABI, VAULT_ANALYSIS_ABI, type VaultAddresses, type VaultAnalysis, type VaultAssetBreakdown, type VaultConfiguration, type VaultDistribution, type VaultMetadata, type VaultMode, VaultPausedError, type VaultPortfolio, type VaultStatus, type VaultSummary, type VaultTopology, WhitelistQuotaExhaustedError, WithdrawalQueueDisabledError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkSigner, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, depositAsync, depositCrossChainOracleOn, depositFromSpoke, depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getERC7540RequestStatus, getFullVaultTopology, getInboundRoutes, getMaxWithdrawable, getOutboundRoutes, getPendingActions, getSubVaultInfo, getSubVaultPositions, getUserBalances, getUserBalancesForRoutes, getUserPosition, getUserPositionMultiChain, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultDistribution, getVaultDistributionWithTopology, getVaultMetadata, getVaultPortfolio, getVaultPortfolioMultiChain, getVaultStatus, getVaultSummary, getVaultTopology, getWithdrawalRequest, isAsyncMode, isCurator, isOnHubChain, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, withdrawAssets };
|
package/dist/ethers/index.d.ts
CHANGED
|
@@ -754,7 +754,7 @@ interface MultiChainPortfolio {
|
|
|
754
754
|
* Human-readable ABI fragments for MoreVaults diamond facets.
|
|
755
755
|
* Extracted from compiled artifacts in out/.
|
|
756
756
|
*/
|
|
757
|
-
declare const VAULT_ABI: readonly ["function deposit(uint256 assets, address receiver) returns (uint256 shares)", "function mint(uint256 shares, address receiver) returns (uint256 assets)", "function withdraw(uint256 assets, address receiver, address owner) returns (uint256 shares)", "function redeem(uint256 shares, address receiver, address owner) returns (uint256 assets)", "function deposit(address[] tokens, uint256[] assets, address receiver, uint256 minAmountOut) payable returns (uint256 shares)", "function requestRedeem(uint256 shares, address onBehalfOf)", "function requestWithdraw(uint256 assets, address onBehalfOf)", "function clearRequest()", "function getWithdrawalRequest(address _owner) view returns (uint256 shares, uint256 timelockEndsAt)", "function totalAssets() view returns (uint256)", "function totalSupply() view returns (uint256)", "function balanceOf(address account) view returns (uint256)", "function asset() view returns (address)", "function convertToShares(uint256 assets) view returns (uint256)", "function convertToAssets(uint256 shares) view returns (uint256)", "function previewDeposit(uint256 assets) view returns (uint256)", "function previewRedeem(uint256 shares) view returns (uint256)", "function paused() view returns (bool)", "event Deposit(address indexed sender, address indexed owner, address[] tokens, uint256[] assets, uint256 shares)", "event Transfer(address indexed from, address indexed to, uint256 value)", "event WithdrawRequestCreated(address requester, uint256 sharesAmount, uint256 endsAt)", "event WithdrawRequestFulfilled(address requester, address receiver, uint256 sharesAmount, uint256 assetAmount)"];
|
|
757
|
+
declare const VAULT_ABI: readonly ["error WithdrawalQueueDisabled()", "error WithdrawalQueueEnabled()", "error RequestWithdrawDisabled()", "function deposit(uint256 assets, address receiver) returns (uint256 shares)", "function mint(uint256 shares, address receiver) returns (uint256 assets)", "function withdraw(uint256 assets, address receiver, address owner) returns (uint256 shares)", "function redeem(uint256 shares, address receiver, address owner) returns (uint256 assets)", "function deposit(address[] tokens, uint256[] assets, address receiver, uint256 minAmountOut) payable returns (uint256 shares)", "function requestRedeem(uint256 shares, address onBehalfOf)", "function requestWithdraw(uint256 assets, address onBehalfOf)", "function clearRequest()", "function getWithdrawalRequest(address _owner) view returns (uint256 shares, uint256 timelockEndsAt)", "function totalAssets() view returns (uint256)", "function totalSupply() view returns (uint256)", "function balanceOf(address account) view returns (uint256)", "function asset() view returns (address)", "function convertToShares(uint256 assets) view returns (uint256)", "function convertToAssets(uint256 shares) view returns (uint256)", "function previewDeposit(uint256 assets) view returns (uint256)", "function previewRedeem(uint256 shares) view returns (uint256)", "function paused() view returns (bool)", "event Deposit(address indexed sender, address indexed owner, address[] tokens, uint256[] assets, uint256 shares)", "event Transfer(address indexed from, address indexed to, uint256 value)", "event WithdrawRequestCreated(address requester, uint256 sharesAmount, uint256 endsAt)", "event WithdrawRequestFulfilled(address requester, address receiver, uint256 sharesAmount, uint256 assetAmount)"];
|
|
758
758
|
declare const BRIDGE_ABI: readonly ["function initVaultActionRequest(uint8 actionType, bytes actionCallData, uint256 amountLimit, bytes extraOptions) payable returns (bytes32 guid)", "function getRequestInfo(bytes32 guid) view returns (tuple(address initiator, uint64 timestamp, uint8 actionType, bytes actionCallData, bool fulfilled, bool finalized, bool refunded, uint256 totalAssets, uint256 finalizationResult, uint256 amountLimit))", "function getFinalizationResult(bytes32 guid) view returns (uint256 result)", "function oraclesCrossChainAccounting() view returns (bool)", "function quoteAccountingFee(bytes extraOptions) view returns (uint256 nativeFee)", "function accountingBridgeFacet() view returns (uint256 sum, bool isPositive)"];
|
|
759
759
|
declare const CONFIG_ABI: readonly ["function getEscrow() view returns (address escrow)", "function getCrossChainAccountingManager() view returns (address)", "function isHub() view returns (bool)", "function getWithdrawalQueueStatus() view returns (bool)", "function getWithdrawalTimelock() view returns (uint64)", "function getWithdrawalFee() view returns (uint96)", "function getMaxWithdrawalDelay() view returns (uint32)", "function getAvailableAssets() view returns (address[])", "function getDepositableAssets() view returns (address[])", "function depositCapacity() view returns (uint256)", "function fee() view returns (uint96)", "function feeRecipient() view returns (address)", "function paused() view returns (bool)", "function maxDeposit(address receiver) view returns (uint256)"];
|
|
760
760
|
declare const METADATA_ABI: readonly ["function name() view returns (string)", "function symbol() view returns (string)", "function decimals() view returns (uint8)"];
|
|
@@ -842,6 +842,9 @@ declare class NotWhitelistedError extends MoreVaultsError {
|
|
|
842
842
|
declare class WhitelistQuotaExhaustedError extends MoreVaultsError {
|
|
843
843
|
constructor(vault: string, user: string);
|
|
844
844
|
}
|
|
845
|
+
declare class WithdrawalQueueDisabledError extends MoreVaultsError {
|
|
846
|
+
constructor(vault: string);
|
|
847
|
+
}
|
|
845
848
|
declare class InsufficientLiquidityError extends MoreVaultsError {
|
|
846
849
|
hubLiquid: bigint;
|
|
847
850
|
required: bigint;
|
|
@@ -2672,4 +2675,4 @@ declare function quoteRouteDepositFee(route: InboundRoute, hubChainId: number, a
|
|
|
2672
2675
|
*/
|
|
2673
2676
|
declare function asSdkSigner(signer: unknown): Signer;
|
|
2674
2677
|
|
|
2675
|
-
export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionType, type ActionTypeValue, ActionsStillPendingError, type AssetBalance, type AssetInfo, type AsyncRequestFinalResult, type AsyncRequestResult, type AsyncRequestStatus, type AsyncRequestStatusInfo, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, type BatchSwapParams, type BridgeParams, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, type ChainPortfolio, ComposeAlreadyExecutedError, ComposeTimeoutError, ComposerNotConfiguredError, type CrossChainRequestInfo, type CuratorAction, type CuratorBridgeParams, type CuratorVaultStatus, DEX_ABI, type DepositBlockReason, type DepositEligibility, type DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, type ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, type InboundRoute, type InboundRouteWithBalance, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, type MaxWithdrawable, MissingEscrowAddressError, MoreVaultsError, type MultiChainPortfolio, type MultiChainUserPosition, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, type OutboundRoute, type PendingAction, REGISTRY_ABI, type RedeemCostEstimate, type RedeemResult, SUB_VAULT_ABI, SlippageExceededError, type SpokeBalance, type SpokeRedeemRoute, type SubVaultInfo, type SubVaultPosition, type SubmitActionsResult, type SwapParams, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, UnsupportedAssetError, UnsupportedChainError, type UserBalances, type UserPosition, VAULT_ABI, VAULT_ANALYSIS_ABI, type VaultAddresses, type VaultAnalysis, type VaultAssetBreakdown, type VaultConfiguration, type VaultDistribution, type VaultMetadata, type VaultMode, VaultPausedError, type VaultPortfolio, type VaultStatus, type VaultSummary, type VaultTopology, WhitelistQuotaExhaustedError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkSigner, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, depositAsync, depositCrossChainOracleOn, depositFromSpoke, depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getERC7540RequestStatus, getFullVaultTopology, getInboundRoutes, getMaxWithdrawable, getOutboundRoutes, getPendingActions, getSubVaultInfo, getSubVaultPositions, getUserBalances, getUserBalancesForRoutes, getUserPosition, getUserPositionMultiChain, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultDistribution, getVaultDistributionWithTopology, getVaultMetadata, getVaultPortfolio, getVaultPortfolioMultiChain, getVaultStatus, getVaultSummary, getVaultTopology, getWithdrawalRequest, isAsyncMode, isCurator, isOnHubChain, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, withdrawAssets };
|
|
2678
|
+
export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionType, type ActionTypeValue, ActionsStillPendingError, type AssetBalance, type AssetInfo, type AsyncRequestFinalResult, type AsyncRequestResult, type AsyncRequestStatus, type AsyncRequestStatusInfo, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, type BatchSwapParams, type BridgeParams, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, type ChainPortfolio, ComposeAlreadyExecutedError, ComposeTimeoutError, ComposerNotConfiguredError, type CrossChainRequestInfo, type CuratorAction, type CuratorBridgeParams, type CuratorVaultStatus, DEX_ABI, type DepositBlockReason, type DepositEligibility, type DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, type ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, type InboundRoute, type InboundRouteWithBalance, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, type MaxWithdrawable, MissingEscrowAddressError, MoreVaultsError, type MultiChainPortfolio, type MultiChainUserPosition, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, type OutboundRoute, type PendingAction, REGISTRY_ABI, type RedeemCostEstimate, type RedeemResult, SUB_VAULT_ABI, SlippageExceededError, type SpokeBalance, type SpokeRedeemRoute, type SubVaultInfo, type SubVaultPosition, type SubmitActionsResult, type SwapParams, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, UnsupportedAssetError, UnsupportedChainError, type UserBalances, type UserPosition, VAULT_ABI, VAULT_ANALYSIS_ABI, type VaultAddresses, type VaultAnalysis, type VaultAssetBreakdown, type VaultConfiguration, type VaultDistribution, type VaultMetadata, type VaultMode, VaultPausedError, type VaultPortfolio, type VaultStatus, type VaultSummary, type VaultTopology, WhitelistQuotaExhaustedError, WithdrawalQueueDisabledError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkSigner, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, depositAsync, depositCrossChainOracleOn, depositFromSpoke, depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getERC7540RequestStatus, getFullVaultTopology, getInboundRoutes, getMaxWithdrawable, getOutboundRoutes, getPendingActions, getSubVaultInfo, getSubVaultPositions, getUserBalances, getUserBalancesForRoutes, getUserPosition, getUserPositionMultiChain, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultDistribution, getVaultDistributionWithTopology, getVaultMetadata, getVaultPortfolio, getVaultPortfolioMultiChain, getVaultStatus, getVaultSummary, getVaultTopology, getWithdrawalRequest, isAsyncMode, isCurator, isOnHubChain, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, withdrawAssets };
|
package/dist/ethers/index.js
CHANGED
|
@@ -388,6 +388,10 @@ var ActionType = {
|
|
|
388
388
|
|
|
389
389
|
// src/ethers/abis.ts
|
|
390
390
|
var VAULT_ABI = [
|
|
391
|
+
// Errors (for proper revert decoding)
|
|
392
|
+
"error WithdrawalQueueDisabled()",
|
|
393
|
+
"error WithdrawalQueueEnabled()",
|
|
394
|
+
"error RequestWithdrawDisabled()",
|
|
391
395
|
// ERC4626 core
|
|
392
396
|
"function deposit(uint256 assets, address receiver) returns (uint256 shares)",
|
|
393
397
|
"function mint(uint256 shares, address receiver) returns (uint256 assets)",
|
|
@@ -604,6 +608,12 @@ var WhitelistQuotaExhaustedError = class extends MoreVaultsError {
|
|
|
604
608
|
this.name = "WhitelistQuotaExhaustedError";
|
|
605
609
|
}
|
|
606
610
|
};
|
|
611
|
+
var WithdrawalQueueDisabledError = class extends MoreVaultsError {
|
|
612
|
+
constructor(vault) {
|
|
613
|
+
super(`[MoreVaults] Withdrawal queue is disabled on vault ${vault}. Cannot call requestRedeem/requestWithdraw \u2014 use redeemShares/withdrawAssets directly, or smartRedeem which auto-selects the correct flow.`);
|
|
614
|
+
this.name = "WithdrawalQueueDisabledError";
|
|
615
|
+
}
|
|
616
|
+
};
|
|
607
617
|
var InsufficientLiquidityError = class extends MoreVaultsError {
|
|
608
618
|
hubLiquid;
|
|
609
619
|
required;
|
|
@@ -1447,6 +1457,9 @@ function parseContractError(err, vault, caller) {
|
|
|
1447
1457
|
if (msg.includes("EnforcedPause") || msg.includes("Pausable: paused")) {
|
|
1448
1458
|
throw new VaultPausedError(vault);
|
|
1449
1459
|
}
|
|
1460
|
+
if (msg.includes("WithdrawalQueueDisabled") || msg.includes("0xdbb22fbf")) {
|
|
1461
|
+
throw new WithdrawalQueueDisabledError(vault);
|
|
1462
|
+
}
|
|
1450
1463
|
if (msg.includes("NotCurator") || msg.includes("OwnableUnauthorizedAccount")) {
|
|
1451
1464
|
if (msg.includes("NotCurator")) {
|
|
1452
1465
|
throw new NotCuratorError(vault, "unknown");
|
|
@@ -1796,6 +1809,12 @@ async function withdrawAssets(signer, addresses, assets, receiver, owner) {
|
|
|
1796
1809
|
async function requestRedeem(signer, addresses, shares, owner) {
|
|
1797
1810
|
if (shares === 0n) throw new InvalidInputError("shares amount must be greater than zero");
|
|
1798
1811
|
await validateWalletChain(signer, addresses.hubChainId);
|
|
1812
|
+
const provider = signer.provider;
|
|
1813
|
+
const configRead = new Contract(addresses.vault, ["function getWithdrawalQueueStatus() view returns (bool)"], provider);
|
|
1814
|
+
const queueEnabled = await configRead.getWithdrawalQueueStatus();
|
|
1815
|
+
if (!queueEnabled) {
|
|
1816
|
+
throw new WithdrawalQueueDisabledError(addresses.vault);
|
|
1817
|
+
}
|
|
1799
1818
|
let useLegacy = false;
|
|
1800
1819
|
const vaultNew = new Contract(addresses.vault, VAULT_ABI, signer);
|
|
1801
1820
|
try {
|
|
@@ -3724,6 +3743,6 @@ function asSdkSigner(signer) {
|
|
|
3724
3743
|
return signer;
|
|
3725
3744
|
}
|
|
3726
3745
|
|
|
3727
|
-
export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionType, ActionsStillPendingError, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, ComposeAlreadyExecutedError, ComposeTimeoutError, ComposerNotConfiguredError, DEX_ABI, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, ERC7540_FACET_ABI, EscrowNotConfiguredError, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, REGISTRY_ABI, SUB_VAULT_ABI, SlippageExceededError, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultPausedError, WhitelistQuotaExhaustedError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkSigner, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, depositAsync, depositCrossChainOracleOn, depositFromSpoke, depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getERC7540RequestStatus, getFullVaultTopology, getInboundRoutes, getMaxWithdrawable, getOutboundRoutes, getPendingActions, getSubVaultInfo, getSubVaultPositions, getUserBalances, getUserBalancesForRoutes, getUserPosition, getUserPositionMultiChain, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultDistribution, getVaultDistributionWithTopology, getVaultMetadata, getVaultPortfolio, getVaultPortfolioMultiChain, getVaultStatus, getVaultSummary, getVaultTopology, getWithdrawalRequest, isAsyncMode, isCurator, isOnHubChain, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, withdrawAssets };
|
|
3746
|
+
export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionType, ActionsStillPendingError, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, ComposeAlreadyExecutedError, ComposeTimeoutError, ComposerNotConfiguredError, DEX_ABI, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, ERC7540_FACET_ABI, EscrowNotConfiguredError, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, REGISTRY_ABI, SUB_VAULT_ABI, SlippageExceededError, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultPausedError, WhitelistQuotaExhaustedError, WithdrawalQueueDisabledError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkSigner, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, depositAsync, depositCrossChainOracleOn, depositFromSpoke, depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getERC7540RequestStatus, getFullVaultTopology, getInboundRoutes, getMaxWithdrawable, getOutboundRoutes, getPendingActions, getSubVaultInfo, getSubVaultPositions, getUserBalances, getUserBalancesForRoutes, getUserPosition, getUserPositionMultiChain, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultDistribution, getVaultDistributionWithTopology, getVaultMetadata, getVaultPortfolio, getVaultPortfolioMultiChain, getVaultStatus, getVaultSummary, getVaultTopology, getWithdrawalRequest, isAsyncMode, isCurator, isOnHubChain, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, withdrawAssets };
|
|
3728
3747
|
//# sourceMappingURL=index.js.map
|
|
3729
3748
|
//# sourceMappingURL=index.js.map
|