@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.
@@ -409,8 +409,9 @@ declare const LZ_TIMEOUTS: {
409
409
  *
410
410
  * Note on struct differences:
411
411
  * - SwapRouter (Eth/Arb/Op, 0xE592...): exactInputSingle struct includes `deadline`
412
- * - SwapRouter02 (Base, 0x2626...): exactInputSingle struct does NOT include `deadline`
413
- * - FlowSwap V3 (Flow EVM, 0xeEDC...): derived from original UniV3, includes `deadline`
412
+ * - SwapRouter02 (Base/Flow, 0x2626.../0xeEDC...): struct does NOT include `deadline`
413
+ * Flow EVM confirmed via PUSH4 scan: router only dispatches 0x04e45aaf (SwapRouter02),
414
+ * not 0x414bf389 (SwapRouter). Both are in curatorSwaps.ts SWAP_ROUTER02_CHAINS.
414
415
  */
415
416
  declare const UNISWAP_V3_ROUTERS: Record<number, `0x${string}`>;
416
417
  /** @deprecated Use OFT_ROUTES.stgUSDC instead */
@@ -423,6 +424,18 @@ declare const USDC_TOKEN: Partial<Record<number, `0x${string}`>>;
423
424
  * Extracted from compiled contract artifacts — only the selectors used by SDK flows.
424
425
  */
425
426
  declare const VAULT_ABI: readonly [{
427
+ readonly type: "error";
428
+ readonly name: "WithdrawalQueueDisabled";
429
+ readonly inputs: readonly [];
430
+ }, {
431
+ readonly type: "error";
432
+ readonly name: "WithdrawalQueueEnabled";
433
+ readonly inputs: readonly [];
434
+ }, {
435
+ readonly type: "error";
436
+ readonly name: "RequestWithdrawDisabled";
437
+ readonly inputs: readonly [];
438
+ }, {
426
439
  readonly type: "function";
427
440
  readonly name: "deposit";
428
441
  readonly inputs: readonly [{
@@ -2114,6 +2127,9 @@ declare class NotWhitelistedError extends MoreVaultsError {
2114
2127
  declare class WhitelistQuotaExhaustedError extends MoreVaultsError {
2115
2128
  constructor(vault: string, user: string);
2116
2129
  }
2130
+ declare class WithdrawalQueueDisabledError extends MoreVaultsError {
2131
+ constructor(vault: string);
2132
+ }
2117
2133
  declare class InsufficientLiquidityError extends MoreVaultsError {
2118
2134
  hubLiquid: bigint;
2119
2135
  required: bigint;
@@ -3012,7 +3028,7 @@ declare function vetoActions(walletClient: WalletClient, publicClient: PublicCli
3012
3028
  * - Ethereum (1): SwapRouter 0xE592... — HAS deadline field
3013
3029
  * - Arbitrum (42161): SwapRouter 0xE592... — HAS deadline field
3014
3030
  * - Optimism (10): SwapRouter 0xE592... — HAS deadline field
3015
- * - Flow EVM (747): FlowSwap V3 0xeEDC... — HAS deadline field
3031
+ * - Flow EVM (747): FlowSwap V3 0xeEDC... — NO deadline field (SwapRouter02-compatible)
3016
3032
  *
3017
3033
  * @module curatorSwaps
3018
3034
  */
@@ -3411,4 +3427,4 @@ declare function getVaultPortfolioMultiChain(publicClient: PublicClient, vault:
3411
3427
  */
3412
3428
  declare function asSdkClient(client: unknown): PublicClient;
3413
3429
 
3414
- export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionsStillPendingError, AsyncRequestResult, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, ComposeAlreadyExecutedError, ComposeData, ComposeTimeoutError, ComposerNotConfiguredError, CuratorAction, CuratorVaultStatus, DEX_ABI, DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, FlowStorage, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, MultiChainPortfolio, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, PendingAction, REGISTRY_ABI, RedeemCostEstimate, RedeemResult, STARGATE_TAXI_CMD, SUB_VAULT_ABI, SlippageExceededError, SpokeDepositResult, type SpokeRedeemRoute, SubVaultInfo, SubVaultPosition, SubmitActionsResult, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, USDC_STARGATE_OFT, USDC_TOKEN, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultAddresses, VaultAnalysis, VaultAssetBreakdown, VaultConfiguration, VaultPausedError, VaultPortfolio, WhitelistQuotaExhaustedError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkClient, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, checkProtocolWhitelist, depositAsync, depositSimple as depositCrossChainOracleOn, depositFromSpoke, depositFromSpoke as depositFromSpokeAsync, depositMultiAsset, depositSimple, detectSubVaultType, disableAssetToDeposit, enableDepositWhitelist, encodeCuratorAction, encodeUniswapV3SwapCalldata, estimateRedeemCost, executeActions, executeCompose, getCuratorVaultStatus, getERC7540RequestStatus, getPendingActions, getSubVaultInfo, getSubVaultPositions, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultPortfolio, getVaultPortfolioMultiChain, getWithdrawalRequest, isCurator, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteDepositFromSpokeFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForCompose, withdrawAssets };
3430
+ export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionsStillPendingError, AsyncRequestResult, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, ComposeAlreadyExecutedError, ComposeData, ComposeTimeoutError, ComposerNotConfiguredError, CuratorAction, CuratorVaultStatus, DEX_ABI, DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, FlowStorage, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, MultiChainPortfolio, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, PendingAction, REGISTRY_ABI, RedeemCostEstimate, RedeemResult, STARGATE_TAXI_CMD, SUB_VAULT_ABI, SlippageExceededError, SpokeDepositResult, type SpokeRedeemRoute, SubVaultInfo, SubVaultPosition, SubmitActionsResult, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, USDC_STARGATE_OFT, USDC_TOKEN, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultAddresses, VaultAnalysis, VaultAssetBreakdown, VaultConfiguration, VaultPausedError, VaultPortfolio, WhitelistQuotaExhaustedError, WithdrawalQueueDisabledError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkClient, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, checkProtocolWhitelist, depositAsync, depositSimple as depositCrossChainOracleOn, depositFromSpoke, depositFromSpoke as depositFromSpokeAsync, depositMultiAsset, depositSimple, detectSubVaultType, disableAssetToDeposit, enableDepositWhitelist, encodeCuratorAction, encodeUniswapV3SwapCalldata, estimateRedeemCost, executeActions, executeCompose, getCuratorVaultStatus, getERC7540RequestStatus, getPendingActions, getSubVaultInfo, getSubVaultPositions, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultPortfolio, getVaultPortfolioMultiChain, getWithdrawalRequest, isCurator, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteDepositFromSpokeFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForCompose, withdrawAssets };
@@ -409,8 +409,9 @@ declare const LZ_TIMEOUTS: {
409
409
  *
410
410
  * Note on struct differences:
411
411
  * - SwapRouter (Eth/Arb/Op, 0xE592...): exactInputSingle struct includes `deadline`
412
- * - SwapRouter02 (Base, 0x2626...): exactInputSingle struct does NOT include `deadline`
413
- * - FlowSwap V3 (Flow EVM, 0xeEDC...): derived from original UniV3, includes `deadline`
412
+ * - SwapRouter02 (Base/Flow, 0x2626.../0xeEDC...): struct does NOT include `deadline`
413
+ * Flow EVM confirmed via PUSH4 scan: router only dispatches 0x04e45aaf (SwapRouter02),
414
+ * not 0x414bf389 (SwapRouter). Both are in curatorSwaps.ts SWAP_ROUTER02_CHAINS.
414
415
  */
415
416
  declare const UNISWAP_V3_ROUTERS: Record<number, `0x${string}`>;
416
417
  /** @deprecated Use OFT_ROUTES.stgUSDC instead */
@@ -423,6 +424,18 @@ declare const USDC_TOKEN: Partial<Record<number, `0x${string}`>>;
423
424
  * Extracted from compiled contract artifacts — only the selectors used by SDK flows.
424
425
  */
425
426
  declare const VAULT_ABI: readonly [{
427
+ readonly type: "error";
428
+ readonly name: "WithdrawalQueueDisabled";
429
+ readonly inputs: readonly [];
430
+ }, {
431
+ readonly type: "error";
432
+ readonly name: "WithdrawalQueueEnabled";
433
+ readonly inputs: readonly [];
434
+ }, {
435
+ readonly type: "error";
436
+ readonly name: "RequestWithdrawDisabled";
437
+ readonly inputs: readonly [];
438
+ }, {
426
439
  readonly type: "function";
427
440
  readonly name: "deposit";
428
441
  readonly inputs: readonly [{
@@ -2114,6 +2127,9 @@ declare class NotWhitelistedError extends MoreVaultsError {
2114
2127
  declare class WhitelistQuotaExhaustedError extends MoreVaultsError {
2115
2128
  constructor(vault: string, user: string);
2116
2129
  }
2130
+ declare class WithdrawalQueueDisabledError extends MoreVaultsError {
2131
+ constructor(vault: string);
2132
+ }
2117
2133
  declare class InsufficientLiquidityError extends MoreVaultsError {
2118
2134
  hubLiquid: bigint;
2119
2135
  required: bigint;
@@ -3012,7 +3028,7 @@ declare function vetoActions(walletClient: WalletClient, publicClient: PublicCli
3012
3028
  * - Ethereum (1): SwapRouter 0xE592... — HAS deadline field
3013
3029
  * - Arbitrum (42161): SwapRouter 0xE592... — HAS deadline field
3014
3030
  * - Optimism (10): SwapRouter 0xE592... — HAS deadline field
3015
- * - Flow EVM (747): FlowSwap V3 0xeEDC... — HAS deadline field
3031
+ * - Flow EVM (747): FlowSwap V3 0xeEDC... — NO deadline field (SwapRouter02-compatible)
3016
3032
  *
3017
3033
  * @module curatorSwaps
3018
3034
  */
@@ -3411,4 +3427,4 @@ declare function getVaultPortfolioMultiChain(publicClient: PublicClient, vault:
3411
3427
  */
3412
3428
  declare function asSdkClient(client: unknown): PublicClient;
3413
3429
 
3414
- export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionsStillPendingError, AsyncRequestResult, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, ComposeAlreadyExecutedError, ComposeData, ComposeTimeoutError, ComposerNotConfiguredError, CuratorAction, CuratorVaultStatus, DEX_ABI, DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, FlowStorage, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, MultiChainPortfolio, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, PendingAction, REGISTRY_ABI, RedeemCostEstimate, RedeemResult, STARGATE_TAXI_CMD, SUB_VAULT_ABI, SlippageExceededError, SpokeDepositResult, type SpokeRedeemRoute, SubVaultInfo, SubVaultPosition, SubmitActionsResult, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, USDC_STARGATE_OFT, USDC_TOKEN, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultAddresses, VaultAnalysis, VaultAssetBreakdown, VaultConfiguration, VaultPausedError, VaultPortfolio, WhitelistQuotaExhaustedError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkClient, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, checkProtocolWhitelist, depositAsync, depositSimple as depositCrossChainOracleOn, depositFromSpoke, depositFromSpoke as depositFromSpokeAsync, depositMultiAsset, depositSimple, detectSubVaultType, disableAssetToDeposit, enableDepositWhitelist, encodeCuratorAction, encodeUniswapV3SwapCalldata, estimateRedeemCost, executeActions, executeCompose, getCuratorVaultStatus, getERC7540RequestStatus, getPendingActions, getSubVaultInfo, getSubVaultPositions, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultPortfolio, getVaultPortfolioMultiChain, getWithdrawalRequest, isCurator, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteDepositFromSpokeFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForCompose, withdrawAssets };
3430
+ export { ACCESS_CONTROL_ABI, ADMIN_CONFIG_ABI, ADMIN_WRITE_ABI, ActionsStillPendingError, AsyncRequestResult, AsyncRequestTimeoutError, BRIDGE_ABI, BRIDGE_FACET_ABI, CCManagerNotConfiguredError, CHAIN_IDS, CHAIN_ID_TO_EID, CONFIG_ABI, CURATOR_CONFIG_ABI, CapacityFullError, ComposeAlreadyExecutedError, ComposeData, ComposeTimeoutError, ComposerNotConfiguredError, CuratorAction, CuratorVaultStatus, DEX_ABI, DepositResult, EID_TO_CHAIN_ID, ERC20_ABI, ERC4626_FACET_ABI, ERC7540RequestStatus, ERC7540_FACET_ABI, EscrowNotConfiguredError, FlowStorage, InsufficientBalanceError, InsufficientLiquidityError, InvalidInputError, LZ_ADAPTER_ABI, LZ_EIDS, LZ_ENDPOINT_ABI, LZ_TIMEOUTS, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, MultiChainPortfolio, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, PendingAction, REGISTRY_ABI, RedeemCostEstimate, RedeemResult, STARGATE_TAXI_CMD, SUB_VAULT_ABI, SlippageExceededError, SpokeDepositResult, type SpokeRedeemRoute, SubVaultInfo, SubVaultPosition, SubmitActionsResult, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, USDC_STARGATE_OFT, USDC_TOKEN, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultAddresses, VaultAnalysis, VaultAssetBreakdown, VaultConfiguration, VaultPausedError, VaultPortfolio, WhitelistQuotaExhaustedError, WithdrawalQueueDisabledError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkClient, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, checkProtocolWhitelist, depositAsync, depositSimple as depositCrossChainOracleOn, depositFromSpoke, depositFromSpoke as depositFromSpokeAsync, depositMultiAsset, depositSimple, detectSubVaultType, disableAssetToDeposit, enableDepositWhitelist, encodeCuratorAction, encodeUniswapV3SwapCalldata, estimateRedeemCost, executeActions, executeCompose, getCuratorVaultStatus, getERC7540RequestStatus, getPendingActions, getSubVaultInfo, getSubVaultPositions, getVaultAnalysis, getVaultAssetBreakdown, getVaultConfiguration, getVaultPortfolio, getVaultPortfolioMultiChain, getWithdrawalRequest, isCurator, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteDepositFromSpokeFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForCompose, withdrawAssets };
@@ -406,6 +406,10 @@ var USDC_TOKEN = Object.fromEntries(
406
406
 
407
407
  // src/viem/abis.ts
408
408
  var VAULT_ABI = [
409
+ // ── Errors (for proper revert decoding) ──
410
+ { type: "error", name: "WithdrawalQueueDisabled", inputs: [] },
411
+ { type: "error", name: "WithdrawalQueueEnabled", inputs: [] },
412
+ { type: "error", name: "RequestWithdrawDisabled", inputs: [] },
409
413
  {
410
414
  type: "function",
411
415
  name: "deposit",
@@ -1263,6 +1267,12 @@ var WhitelistQuotaExhaustedError = class extends MoreVaultsError {
1263
1267
  this.name = "WhitelistQuotaExhaustedError";
1264
1268
  }
1265
1269
  };
1270
+ var WithdrawalQueueDisabledError = class extends MoreVaultsError {
1271
+ constructor(vault) {
1272
+ 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.`);
1273
+ this.name = "WithdrawalQueueDisabledError";
1274
+ }
1275
+ };
1266
1276
  var InsufficientLiquidityError = class extends MoreVaultsError {
1267
1277
  hubLiquid;
1268
1278
  required;
@@ -2266,6 +2276,9 @@ function parseContractError(err, vault, caller) {
2266
2276
  if (msg.includes("EnforcedPause") || msg.includes("Pausable: paused")) {
2267
2277
  throw new VaultPausedError(vault);
2268
2278
  }
2279
+ if (msg.includes("WithdrawalQueueDisabled") || msg.includes("0xdbb22fbf")) {
2280
+ throw new WithdrawalQueueDisabledError(vault);
2281
+ }
2269
2282
  if (msg.includes("NotCurator") || msg.includes("OwnableUnauthorizedAccount")) {
2270
2283
  if (msg.includes("NotCurator")) {
2271
2284
  throw new NotCuratorError(vault, caller ?? "unknown");
@@ -3410,6 +3423,14 @@ async function requestRedeem(walletClient, publicClient, addresses, shares, owne
3410
3423
  const vault = getAddress(addresses.vault);
3411
3424
  if (shares === 0n) throw new InvalidInputError("shares amount must be greater than zero");
3412
3425
  validateWalletChain(walletClient, addresses.hubChainId);
3426
+ const queueEnabled = await publicClient.readContract({
3427
+ address: vault,
3428
+ abi: CONFIG_ABI,
3429
+ functionName: "getWithdrawalQueueStatus"
3430
+ });
3431
+ if (!queueEnabled) {
3432
+ throw new WithdrawalQueueDisabledError(vault);
3433
+ }
3413
3434
  let useLegacy = false;
3414
3435
  try {
3415
3436
  await publicClient.simulateContract({
@@ -4328,7 +4349,7 @@ async function getCuratorVaultStatus(publicClient, vault) {
4328
4349
  timeLockPeriod,
4329
4350
  maxSlippagePercent,
4330
4351
  currentNonce,
4331
- availableAssets: availableAssets.map(getAddress),
4352
+ availableAssets: availableAssets.map((a) => getAddress(a)),
4332
4353
  lzAdapter: getAddress(lzAdapter),
4333
4354
  paused
4334
4355
  };
@@ -4397,8 +4418,8 @@ async function getVaultAnalysis(publicClient, vault) {
4397
4418
  functionName: "moreVaultsRegistry"
4398
4419
  }).catch(() => null)
4399
4420
  ]);
4400
- const availableAddresses = availableRaw.map(getAddress);
4401
- const depositableAddresses = depositableRaw.map(getAddress);
4421
+ const availableAddresses = availableRaw.map((a) => getAddress(a));
4422
+ const depositableAddresses = depositableRaw.map((a) => getAddress(a));
4402
4423
  const allAddresses = Array.from(/* @__PURE__ */ new Set([...availableAddresses, ...depositableAddresses]));
4403
4424
  const metadataCalls = allAddresses.flatMap((addr) => [
4404
4425
  { address: addr, abi: METADATA_ABI, functionName: "name" },
@@ -4469,7 +4490,7 @@ async function getVaultAssetBreakdown(publicClient, vault) {
4469
4490
  } catch {
4470
4491
  return { assets: [], totalAssets: 0n, totalSupply: 0n, underlyingDecimals: 6 };
4471
4492
  }
4472
- const addresses = availableRaw.map(getAddress);
4493
+ const addresses = availableRaw.map((a) => getAddress(a));
4473
4494
  const results = await publicClient.multicall({
4474
4495
  contracts: [
4475
4496
  // Per-asset: balanceOf, name, symbol, decimals
@@ -4582,7 +4603,7 @@ function encodeCuratorAction(action) {
4582
4603
  return encodeFunctionData({
4583
4604
  abi: ADMIN_WRITE_ABI,
4584
4605
  functionName: "addAvailableAssets",
4585
- args: [action.assets.map(getAddress)]
4606
+ args: [action.assets.map((a) => getAddress(a))]
4586
4607
  });
4587
4608
  case "disableAssetToDeposit":
4588
4609
  return encodeFunctionData({
@@ -4822,7 +4843,7 @@ var UNISWAP_V3_SWAP_ROUTER02_ABI = [
4822
4843
  stateMutability: "payable"
4823
4844
  }
4824
4845
  ];
4825
- var SWAP_ROUTER02_CHAINS = /* @__PURE__ */ new Set([8453]);
4846
+ var SWAP_ROUTER02_CHAINS = /* @__PURE__ */ new Set([8453, 747]);
4826
4847
  function encodeUniswapV3SwapCalldata(params) {
4827
4848
  const { chainId, tokenIn, tokenOut, fee, amountIn, minAmountOut, recipient } = params;
4828
4849
  const router = UNISWAP_V3_ROUTERS[chainId];
@@ -5046,7 +5067,7 @@ async function getVaultConfiguration(publicClient, vault) {
5046
5067
  const bigint_ = (i) => results[i].status === "success" ? results[i].result : 0n;
5047
5068
  const bool_ = (i) => results[i].status === "success" ? results[i].result : false;
5048
5069
  const num_ = (i) => results[i].status === "success" ? Number(results[i].result) : 0;
5049
- const addrArray = (i) => results[i].status === "success" ? results[i].result.map(getAddress) : [];
5070
+ const addrArray = (i) => results[i].status === "success" ? results[i].result.map((a) => getAddress(a)) : [];
5050
5071
  return {
5051
5072
  // Roles
5052
5073
  owner: addr(0),
@@ -5135,7 +5156,7 @@ async function addAvailableAsset(walletClient, publicClient, vault, asset) {
5135
5156
  async function addAvailableAssets(walletClient, publicClient, vault, assets) {
5136
5157
  const account = walletClient.account;
5137
5158
  const v = getAddress(vault);
5138
- const checksummed = assets.map(getAddress);
5159
+ const checksummed = assets.map((a) => getAddress(a));
5139
5160
  try {
5140
5161
  await publicClient.simulateContract({
5141
5162
  address: v,
@@ -5211,7 +5232,7 @@ async function setDepositWhitelist(walletClient, publicClient, vault, depositors
5211
5232
  if (depositors.length !== caps.length) {
5212
5233
  throw new InvalidInputError("depositors and caps arrays must have the same length");
5213
5234
  }
5214
- const checksummed = depositors.map(getAddress);
5235
+ const checksummed = depositors.map((a) => getAddress(a));
5215
5236
  try {
5216
5237
  await publicClient.simulateContract({
5217
5238
  address: v,
@@ -5363,8 +5384,8 @@ async function getSubVaultPositions(publicClient, vault) {
5363
5384
  args: [ERC7540_ID]
5364
5385
  }).catch(() => [])
5365
5386
  ]);
5366
- const erc4626Vaults = erc4626Raw.map(getAddress);
5367
- const erc7540Vaults = erc7540Raw.map(getAddress);
5387
+ const erc4626Vaults = erc4626Raw.map((a) => getAddress(a));
5388
+ const erc7540Vaults = erc7540Raw.map((a) => getAddress(a));
5368
5389
  const allSubVaults = [
5369
5390
  ...erc4626Vaults.map((a) => ({ address: a, type: "erc4626" })),
5370
5391
  ...erc7540Vaults.map((a) => ({ address: a, type: "erc7540" }))
@@ -5573,7 +5594,7 @@ async function getVaultPortfolio(publicClient, vault) {
5573
5594
  const totalAssets = vaultTotals[0]?.status === "success" ? vaultTotals[0].result : 0n;
5574
5595
  const totalSupply = vaultTotals[1]?.status === "success" ? vaultTotals[1].result : 0n;
5575
5596
  const underlyingAsset = vaultTotals[2]?.status === "success" ? getAddress(vaultTotals[2].result) : zeroAddress;
5576
- const availableAddresses = availableRaw.map(getAddress);
5597
+ const availableAddresses = availableRaw.map((a) => getAddress(a));
5577
5598
  const subVaultAddressSet = new Set(subVaultPositions.map((p) => p.address.toLowerCase()));
5578
5599
  const liquidAddresses = availableAddresses.filter(
5579
5600
  (addr) => !subVaultAddressSet.has(addr.toLowerCase())
@@ -5687,6 +5708,6 @@ function asSdkClient(client) {
5687
5708
  return client;
5688
5709
  }
5689
5710
 
5690
- 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, LocalStorageAdapter, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, REGISTRY_ABI, STARGATE_TAXI_CMD, SUB_VAULT_ABI, SlippageExceededError, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, USDC_STARGATE_OFT, USDC_TOKEN, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultPausedError, WhitelistQuotaExhaustedError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkClient, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, clearDepositFlow, depositAsync, depositSimple as depositCrossChainOracleOn, depositFromSpoke, depositFromSpoke as depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getDefaultStorage, 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, loadDepositFlow, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, saveDepositFlow, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, waitForTx, withdrawAssets };
5711
+ 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, LocalStorageAdapter, METADATA_ABI, MULTICALL_ABI, MissingEscrowAddressError, MoreVaultsError, NATIVE_SYMBOL, NoSuchActionsError, NotCuratorError, NotGuardianError, NotHubVaultError, NotOwnerError, NotWhitelistedError, OFT_ABI, OFT_ROUTES, OMNI_FACTORY_ADDRESS, REGISTRY_ABI, STARGATE_TAXI_CMD, SUB_VAULT_ABI, SlippageExceededError, TIMELOCK_CONFIG_ABI, UNISWAP_V3_ROUTERS, USDC_STARGATE_OFT, USDC_TOKEN, UnsupportedAssetError, UnsupportedChainError, VAULT_ABI, VAULT_ANALYSIS_ABI, VaultPausedError, WhitelistQuotaExhaustedError, WithdrawalQueueDisabledError, WithdrawalTimelockActiveError, WrongChainError, acceptOwnership, addAvailableAsset, addAvailableAssets, asSdkClient, bridgeAssetsToSpoke, bridgeSharesToHub, buildCuratorBatch, buildUniswapV3Swap, canDeposit, checkProtocolWhitelist, clearDepositFlow, depositAsync, depositSimple as depositCrossChainOracleOn, depositFromSpoke, depositFromSpoke as depositFromSpokeAsync, depositMultiAsset, depositSimple, detectStargateOft, detectSubVaultType, disableAssetToDeposit, discoverVaultTopology, enableDepositWhitelist, encodeBridgeParams, encodeCuratorAction, encodeUniswapV3SwapCalldata, ensureAllowance, estimateRedeemCost, executeActions, executeCompose, executeCuratorBridge, findBridgeRoute, getAllVaultChainIds, getAsyncRequestStatus, getAsyncRequestStatusLabel, getCuratorVaultStatus, getDefaultStorage, 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, loadDepositFlow, mintAsync, pauseVault, preflightAsync, preflightRedeemLiquidity, preflightSpokeDeposit, preflightSpokeRedeem, preflightSync, previewDeposit, previewRedeem, previewSubVaultDeposit, previewSubVaultRedeem, quoteComposeFee, quoteCuratorBridgeFee, quoteDepositFromSpokeFee, quoteLzFee, quoteRouteDepositFee, quoteShareBridgeFee, recoverAssets, redeemAsync, redeemShares, requestRedeem, resolveRedeemAddresses, saveDepositFlow, setDepositCapacity, setDepositWhitelist, setFeeRecipient, smartDeposit, smartRedeem, submitActions, unpauseVault, vetoActions, waitForAsyncRequest, waitForCompose, waitForTx, withdrawAssets };
5691
5712
  //# sourceMappingURL=index.js.map
5692
5713
  //# sourceMappingURL=index.js.map