@oydual31/more-vaults-sdk 0.6.0 → 1.0.0

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 (39) hide show
  1. package/README.md +144 -8
  2. package/dist/{curatorBridge-CNs59kT9.d.cts → curatorBridge-CR9eYhuM.d.cts} +134 -1
  3. package/dist/{curatorBridge-CNs59kT9.d.ts → curatorBridge-CR9eYhuM.d.ts} +134 -1
  4. package/dist/ethers/index.cjs +401 -7
  5. package/dist/ethers/index.cjs.map +1 -1
  6. package/dist/ethers/index.d.cts +260 -1
  7. package/dist/ethers/index.d.ts +260 -1
  8. package/dist/ethers/index.js +385 -8
  9. package/dist/ethers/index.js.map +1 -1
  10. package/dist/react/index.cjs +341 -0
  11. package/dist/react/index.cjs.map +1 -1
  12. package/dist/react/index.d.cts +44 -2
  13. package/dist/react/index.d.ts +44 -2
  14. package/dist/react/index.js +340 -1
  15. package/dist/react/index.js.map +1 -1
  16. package/dist/viem/index.cjs +546 -0
  17. package/dist/viem/index.cjs.map +1 -1
  18. package/dist/viem/index.d.cts +447 -3
  19. package/dist/viem/index.d.ts +447 -3
  20. package/dist/viem/index.js +530 -1
  21. package/dist/viem/index.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/ethers/abis.ts +61 -0
  24. package/src/ethers/adminActions.ts +178 -0
  25. package/src/ethers/curatorMulticall.ts +100 -0
  26. package/src/ethers/curatorSubVaults.ts +125 -0
  27. package/src/ethers/index.ts +26 -0
  28. package/src/ethers/types.ts +110 -1
  29. package/src/ethers/vaultConfig.ts +158 -0
  30. package/src/react/index.ts +7 -0
  31. package/src/react/useVaultConfiguration.ts +35 -0
  32. package/src/react/useVaultPortfolioMultiChain.ts +52 -0
  33. package/src/viem/abis.ts +61 -0
  34. package/src/viem/adminActions.ts +378 -0
  35. package/src/viem/curatorMulticall.ts +135 -0
  36. package/src/viem/curatorSubVaults.ts +129 -0
  37. package/src/viem/index.ts +26 -0
  38. package/src/viem/types.ts +117 -0
  39. package/src/viem/vaultConfig.ts +133 -0
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @oydual31/more-vaults-sdk
2
2
 
3
+ > **v1.0.0** — feature-complete SDK for MoreVaults: deposits, redeems, cross-chain flows, curator operations, bridge operations, sub-vault management, and full vault configuration.
4
+
3
5
  TypeScript SDK for the MoreVaults protocol. Supports **viem/wagmi**, **ethers.js v6**, and **React hooks**.
4
6
 
5
7
  ```bash
@@ -19,14 +21,15 @@ npm install @oydual31/more-vaults-sdk
19
21
  7. [Redeem flows (R1–R5)](#redeem-flows)
20
22
  8. [Cross-chain flows](#cross-chain-flows)
21
23
  9. [Curator operations](#curator-operations)
22
- 10. [Vault topology & distribution](#vault-topology--distribution)
23
- 11. [Spoke routes](#spoke-routes)
24
- 12. [React hooks reference](#react-hooks-reference)
25
- 13. [Stargate vs Standard OFT handling](#stargate-vs-standard-oft-handling)
26
- 14. [Supported chains](#supported-chains)
27
- 15. [LZ timeouts](#lz-timeouts)
28
- 16. [Pre-flight validation](#pre-flight-validation)
29
- 17. [Error types](#error-types)
24
+ 10. [Vault configuration](#vault-configuration)
25
+ 11. [Vault topology & distribution](#vault-topology--distribution)
26
+ 12. [Spoke routes](#spoke-routes)
27
+ 13. [React hooks reference](#react-hooks-reference)
28
+ 14. [Stargate vs Standard OFT handling](#stargate-vs-standard-oft-handling)
29
+ 15. [Supported chains](#supported-chains)
30
+ 16. [LZ timeouts](#lz-timeouts)
31
+ 17. [Pre-flight validation](#pre-flight-validation)
32
+ 18. [Error types](#error-types)
30
33
 
31
34
  ---
32
35
 
@@ -179,6 +182,11 @@ All three modules expose the same logical features. Choose based on your stack.
179
182
  | `getSubVaultInfo`, `detectSubVaultType` | Yes | Yes | — |
180
183
  | `getERC7540RequestStatus` | Yes | Yes | `useERC7540RequestStatus` |
181
184
  | `previewSubVaultDeposit`, `previewSubVaultRedeem` | Yes | Yes | — |
185
+ | `getVaultConfiguration` | Yes | Yes | `useVaultConfiguration` |
186
+ | `setDepositCapacity`, `addAvailableAsset(s)`, `disableAssetToDeposit` | Yes | Yes | — |
187
+ | `setFeeRecipient`, `pauseVault`, `unpauseVault`, `setDepositWhitelist`, `enableDepositWhitelist` | Yes | Yes | — |
188
+ | `recoverAssets` (guardian), `acceptOwnership` | Yes | Yes | — |
189
+ | 19 timelocked `CuratorAction` types (config + role transfers) | Yes | Yes | — |
182
190
  | `detectStargateOft` | Yes | Yes | — |
183
191
  | `preflightSync`, `preflightAsync` | Yes | Yes | — |
184
192
  | `preflightSpokeDeposit`, `preflightSpokeRedeem` | Yes | Yes | — |
@@ -766,6 +774,132 @@ if (status.canFinalizeDeposit) {
766
774
 
767
775
  ---
768
776
 
777
+ ## Vault configuration
778
+
779
+ Phase 7 — full admin/curator/guardian config reads and writes.
780
+
781
+ ### Reading configuration
782
+
783
+ `getVaultConfiguration` reads 22+ fields in a single multicall:
784
+
785
+ ```ts
786
+ import { getVaultConfiguration } from '@oydual31/more-vaults-sdk/viem'
787
+
788
+ const config = await getVaultConfiguration(publicClient, VAULT)
789
+ // Roles
790
+ config.owner // current owner
791
+ config.curator // current curator
792
+ config.guardian // current guardian
793
+ config.pendingOwner // pending ownership transfer target
794
+
795
+ // Fees & capacity
796
+ config.fee // management fee (basis points)
797
+ config.feeRecipient // fee recipient address
798
+ config.depositCapacity // max deposit capacity
799
+ config.withdrawalFee // withdrawal fee
800
+
801
+ // Timelock & withdrawal
802
+ config.timeLockPeriod // seconds before queued actions execute
803
+ config.withdrawalTimelockSeconds
804
+ config.withdrawalQueueEnabled
805
+ config.maxWithdrawalDelay
806
+
807
+ // Access
808
+ config.depositWhitelistEnabled
809
+ config.paused
810
+
811
+ // Assets
812
+ config.availableAssets // address[] — all whitelisted assets
813
+ config.depositableAssets // address[] — assets enabled for deposits
814
+
815
+ // Cross-chain
816
+ config.crossChainAccountingManager
817
+ config.gasLimitForAccounting
818
+ config.maxSlippagePercent
819
+ ```
820
+
821
+ ### Direct curator actions
822
+
823
+ No timelock — execute immediately when called by the curator:
824
+
825
+ ```ts
826
+ import {
827
+ setDepositCapacity,
828
+ addAvailableAsset,
829
+ addAvailableAssets,
830
+ disableAssetToDeposit,
831
+ } from '@oydual31/more-vaults-sdk/viem'
832
+
833
+ await setDepositCapacity(walletClient, publicClient, VAULT, parseUnits('1000000', 6))
834
+ await addAvailableAsset(walletClient, publicClient, VAULT, TOKEN_ADDRESS)
835
+ await addAvailableAssets(walletClient, publicClient, VAULT, [TOKEN_A, TOKEN_B])
836
+ await disableAssetToDeposit(walletClient, publicClient, VAULT, TOKEN_ADDRESS)
837
+ ```
838
+
839
+ ### Direct owner actions
840
+
841
+ ```ts
842
+ import {
843
+ setFeeRecipient,
844
+ setDepositWhitelist,
845
+ enableDepositWhitelist,
846
+ pauseVault,
847
+ unpauseVault,
848
+ } from '@oydual31/more-vaults-sdk/viem'
849
+
850
+ await setFeeRecipient(walletClient, publicClient, VAULT, recipientAddress)
851
+ await pauseVault(walletClient, publicClient, VAULT)
852
+ await unpauseVault(walletClient, publicClient, VAULT)
853
+ ```
854
+
855
+ ### Guardian and pending owner actions
856
+
857
+ ```ts
858
+ import { recoverAssets, acceptOwnership } from '@oydual31/more-vaults-sdk/viem'
859
+
860
+ // Guardian: recover stuck assets
861
+ await recoverAssets(guardianWalletClient, publicClient, VAULT, TOKEN_ADDRESS, amount, recipientAddress)
862
+
863
+ // Pending owner: accept ownership transfer
864
+ await acceptOwnership(newOwnerWalletClient, publicClient, VAULT)
865
+ ```
866
+
867
+ ### Timelocked actions via submitActions
868
+
869
+ 19 new `CuratorAction` types that go through the timelock queue:
870
+
871
+ ```ts
872
+ import { encodeCuratorAction, buildCuratorBatch, submitActions } from '@oydual31/more-vaults-sdk/viem'
873
+
874
+ // Config changes
875
+ const actions: CuratorAction[] = [
876
+ { type: 'setTimeLockPeriod', period: 86400 },
877
+ { type: 'setWithdrawalFee', fee: 50n }, // 0.5%
878
+ { type: 'setFee', fee: 200n }, // 2% management fee
879
+ { type: 'enableAssetToDeposit', asset: TOKEN },
880
+ { type: 'disableDepositWhitelist' },
881
+ { type: 'updateWithdrawalQueueStatus', enabled: true },
882
+ { type: 'setMaxWithdrawalDelay', delay: 604800 },
883
+ { type: 'setMaxSlippagePercent', percent: 100n },
884
+ { type: 'setCrossChainAccountingManager', manager: LZ_ADAPTER },
885
+ { type: 'setGasLimitForAccounting', gasLimit: 500000n },
886
+ { type: 'setWithdrawalTimelock', timelock: 3600 },
887
+ ]
888
+
889
+ // Role transfers
890
+ const roleActions: CuratorAction[] = [
891
+ { type: 'transferOwnership', newOwner: NEW_OWNER },
892
+ { type: 'transferCuratorship', newCurator: NEW_CURATOR },
893
+ { type: 'transferGuardian', newGuardian: NEW_GUARDIAN },
894
+ ]
895
+
896
+ const batch = buildCuratorBatch(actions)
897
+ const { nonce } = await submitActions(walletClient, publicClient, VAULT, batch)
898
+ // Wait for timelock, then: executeActions(walletClient, publicClient, VAULT, nonce)
899
+ ```
900
+
901
+ ---
902
+
769
903
  ## Vault topology & distribution
770
904
 
771
905
  ### Topology
@@ -908,6 +1042,7 @@ Import from `@oydual31/more-vaults-sdk/react`. Requires wagmi v2 + @tanstack/rea
908
1042
  | `useVaultTopology(vault)` | `VaultTopology` | Hub/spoke chain structure |
909
1043
  | `useVaultDistribution(vault)` | `VaultDistribution` | TVL breakdown across chains |
910
1044
  | `useInboundRoutes(hubChainId, vault, asset, user)` | `InboundRoute[]` | Available deposit routes |
1045
+ | `useVaultPortfolioMultiChain(vault)` | `MultiChainPortfolio` | Cross-chain portfolio aggregation across hub + all spokes |
911
1046
 
912
1047
  ### Action hooks
913
1048
 
@@ -924,6 +1059,7 @@ Import from `@oydual31/more-vaults-sdk/react`. Requires wagmi v2 + @tanstack/rea
924
1059
 
925
1060
  | Hook | Returns | Description |
926
1061
  |------|---------|-------------|
1062
+ | `useVaultConfiguration(vault)` | `VaultConfiguration` | Full 22+ field config snapshot (roles, fees, capacity, timelock, assets, cross-chain) |
927
1063
  | `useCuratorVaultStatus(vault)` | `CuratorVaultStatus` | Curator, timelock, nonce, assets, LZ adapter |
928
1064
  | `useVaultAnalysis(vault)` | `VaultAnalysis` | Available/depositable assets with metadata |
929
1065
  | `useVaultAssetBreakdown(vault)` | `VaultAssetBreakdown` | Per-asset balance breakdown |
@@ -148,7 +148,92 @@ type CuratorAction = {
148
148
  type: 'erc7540Redeem';
149
149
  vault: Address;
150
150
  shares: bigint;
151
+ } | {
152
+ type: 'addAvailableAsset';
153
+ asset: Address;
154
+ } | {
155
+ type: 'addAvailableAssets';
156
+ assets: Address[];
157
+ } | {
158
+ type: 'disableAssetToDeposit';
159
+ asset: Address;
160
+ } | {
161
+ type: 'setDepositCapacity';
162
+ capacity: bigint;
163
+ } | {
164
+ type: 'setTimeLockPeriod';
165
+ period: bigint;
166
+ } | {
167
+ type: 'setWithdrawalFee';
168
+ fee: bigint;
169
+ } | {
170
+ type: 'setWithdrawalTimelock';
171
+ duration: bigint;
172
+ } | {
173
+ type: 'enableAssetToDeposit';
174
+ asset: Address;
175
+ } | {
176
+ type: 'disableDepositWhitelist';
177
+ } | {
178
+ type: 'updateWithdrawalQueueStatus';
179
+ status: boolean;
180
+ } | {
181
+ type: 'setMaxWithdrawalDelay';
182
+ delay: number;
183
+ } | {
184
+ type: 'setMaxSlippagePercent';
185
+ percent: bigint;
186
+ } | {
187
+ type: 'setCrossChainAccountingManager';
188
+ manager: Address;
189
+ } | {
190
+ type: 'setGasLimitForAccounting';
191
+ availableTokenGas: bigint;
192
+ heldTokenGas: bigint;
193
+ facetGas: bigint;
194
+ limit: bigint;
195
+ } | {
196
+ type: 'setFee';
197
+ fee: bigint;
198
+ } | {
199
+ type: 'transferOwnership';
200
+ newOwner: Address;
201
+ } | {
202
+ type: 'transferCuratorship';
203
+ newCurator: Address;
204
+ } | {
205
+ type: 'transferGuardian';
206
+ newGuardian: Address;
151
207
  };
208
+ /**
209
+ * Full vault configuration snapshot covering roles, fees, capacity, timelock,
210
+ * withdrawal settings, whitelist, asset lists, cross-chain, and state.
211
+ */
212
+ interface VaultConfiguration {
213
+ owner: Address;
214
+ pendingOwner: Address;
215
+ curator: Address;
216
+ guardian: Address;
217
+ fee: bigint;
218
+ withdrawalFee: bigint;
219
+ feeRecipient: Address;
220
+ depositCapacity: bigint;
221
+ maxSlippagePercent: bigint;
222
+ timeLockPeriod: bigint;
223
+ currentNonce: bigint;
224
+ withdrawalQueueEnabled: boolean;
225
+ withdrawalTimelock: bigint;
226
+ maxWithdrawalDelay: number;
227
+ depositWhitelistEnabled: boolean;
228
+ availableAssets: Address[];
229
+ depositableAssets: Address[];
230
+ ccManager: Address;
231
+ lzAdapter: Address;
232
+ escrow: Address;
233
+ isHub: boolean;
234
+ paused: boolean;
235
+ registry: Address;
236
+ }
152
237
  interface CuratorVaultStatus {
153
238
  curator: Address;
154
239
  timeLockPeriod: bigint;
@@ -259,6 +344,54 @@ interface ERC7540RequestStatus {
259
344
  /** True if claimableRedeem > 0 — vault can call erc7540Redeem to finalize */
260
345
  canFinalizeRedeem: boolean;
261
346
  }
347
+ /**
348
+ * Portfolio snapshot for a single chain (hub or spoke).
349
+ */
350
+ interface ChainPortfolio {
351
+ /** EVM chain ID */
352
+ chainId: number;
353
+ /** Vault address on this chain (same on all chains via CREATE3) */
354
+ vault: Address;
355
+ /** Whether this chain is the hub or a spoke */
356
+ role: 'hub' | 'spoke';
357
+ /** Full portfolio on this chain */
358
+ portfolio: VaultPortfolio;
359
+ }
360
+ /**
361
+ * Aggregated multi-chain portfolio across hub and all spoke chains.
362
+ *
363
+ * Note: `totalLiquidValue`, `totalDeployedValue`, and `totalLockedValue` are
364
+ * raw bigint sums across chains. Because each chain may use a different
365
+ * underlying token, callers are responsible for interpreting units
366
+ * (in practice, MoreVaults uses the same underlying on all chains).
367
+ */
368
+ interface MultiChainPortfolio {
369
+ /** Chain ID of the hub vault */
370
+ hubChainId: number;
371
+ /** Per-chain portfolio breakdowns (hub first, then spokes) */
372
+ chains: ChainPortfolio[];
373
+ /**
374
+ * Sum of liquid underlying balances across all chains.
375
+ * Computed as: sum(chain.portfolio.totalValue - subVaultDeployedValue) per chain.
376
+ * For the authoritative AUM, prefer the hub's `totalAssets` which already
377
+ * includes spoke values via LZ Read.
378
+ */
379
+ totalLiquidValue: bigint;
380
+ /**
381
+ * Sum of all sub-vault position underlying values across all chains.
382
+ */
383
+ totalDeployedValue: bigint;
384
+ /**
385
+ * Sum of lockedAssets (pending ERC7540 requests) across all chains.
386
+ */
387
+ totalLockedValue: bigint;
388
+ /**
389
+ * All sub-vault positions across all chains, each tagged with its chainId.
390
+ */
391
+ allSubVaultPositions: Array<SubVaultPosition & {
392
+ chainId: number;
393
+ }>;
394
+ }
262
395
  /**
263
396
  * Full portfolio view for a curator vault combining liquid and invested assets.
264
397
  */
@@ -1039,4 +1172,4 @@ declare function quoteCuratorBridgeFee(publicClient: PublicClient, vault: Addres
1039
1172
  */
1040
1173
  declare function executeCuratorBridge(walletClient: WalletClient, publicClient: PublicClient, vault: Address, token: Address, params: CuratorBridgeParams): Promise<Hash>;
1041
1174
 
1042
- export { getAllVaultChainIds as $, type AsyncRequestResult as A, type BatchSwapParams as B, type ComposeData as C, type DepositResult as D, type ERC7540RequestStatus as E, type VaultDistribution as F, type VaultMetadata as G, type VaultMode as H, type InboundRoute as I, type VaultStatus as J, type VaultSummary as K, type VaultTopology as L, type MaxWithdrawable as M, NATIVE_SYMBOL as N, OMNI_FACTORY_ADDRESS as O, type PendingAction as P, canDeposit as Q, type RedeemResult as R, type SpokeDepositResult as S, detectStargateOft as T, type UserBalances as U, type VaultAddresses as V, discoverVaultTopology as W, encodeBridgeParams as X, ensureAllowance as Y, executeCuratorBridge as Z, findBridgeRoute as _, type CuratorVaultStatus as a, getAsyncRequestStatus as a0, getAsyncRequestStatusLabel as a1, getFullVaultTopology as a2, getInboundRoutes as a3, getMaxWithdrawable as a4, getOutboundRoutes as a5, getUserBalances as a6, getUserBalancesForRoutes as a7, getUserPosition as a8, getUserPositionMultiChain as a9, getVaultDistribution as aa, getVaultDistributionWithTopology as ab, getVaultMetadata as ac, getVaultStatus as ad, getVaultSummary as ae, getVaultTopology as af, isAsyncMode as ag, isOnHubChain as ah, previewDeposit as ai, previewRedeem as aj, quoteCuratorBridgeFee as ak, quoteLzFee as al, quoteRouteDepositFee as am, waitForAsyncRequest as an, waitForTx as ao, type VaultAnalysis as b, type VaultAssetBreakdown as c, type CuratorAction as d, type SubmitActionsResult as e, type SubVaultInfo as f, type SubVaultPosition as g, type VaultPortfolio as h, ActionType as i, type ActionTypeValue as j, type AssetBalance as k, type AssetInfo as l, type AsyncRequestFinalResult as m, type AsyncRequestStatus as n, type AsyncRequestStatusInfo as o, type BridgeParams as p, type CrossChainRequestInfo as q, type CuratorBridgeParams as r, type DepositBlockReason as s, type DepositEligibility as t, type InboundRouteWithBalance as u, type MultiChainUserPosition as v, type OutboundRoute as w, type SpokeBalance as x, type SwapParams as y, type UserPosition as z };
1175
+ export { ensureAllowance as $, type AsyncRequestResult as A, type BatchSwapParams as B, type ComposeData as C, type DepositResult as D, type ERC7540RequestStatus as E, type SpokeBalance as F, type SwapParams as G, type UserPosition as H, type InboundRoute as I, type VaultDistribution as J, type VaultMetadata as K, type VaultMode as L, type MultiChainPortfolio as M, NATIVE_SYMBOL as N, OMNI_FACTORY_ADDRESS as O, type PendingAction as P, type VaultStatus as Q, type RedeemResult as R, type SpokeDepositResult as S, type VaultSummary as T, type UserBalances as U, type VaultAddresses as V, type VaultTopology as W, canDeposit as X, detectStargateOft as Y, discoverVaultTopology as Z, encodeBridgeParams as _, type CuratorVaultStatus as a, executeCuratorBridge as a0, findBridgeRoute as a1, getAllVaultChainIds as a2, getAsyncRequestStatus as a3, getAsyncRequestStatusLabel as a4, getFullVaultTopology as a5, getInboundRoutes as a6, getMaxWithdrawable as a7, getOutboundRoutes as a8, getUserBalances as a9, getUserBalancesForRoutes as aa, getUserPosition as ab, getUserPositionMultiChain as ac, getVaultDistribution as ad, getVaultDistributionWithTopology as ae, getVaultMetadata as af, getVaultStatus as ag, getVaultSummary as ah, getVaultTopology as ai, isAsyncMode as aj, isOnHubChain as ak, previewDeposit as al, previewRedeem as am, quoteCuratorBridgeFee as an, quoteLzFee as ao, quoteRouteDepositFee as ap, waitForAsyncRequest as aq, waitForTx as ar, type VaultAnalysis as b, type VaultAssetBreakdown as c, type CuratorAction as d, type SubmitActionsResult as e, type VaultConfiguration as f, type SubVaultInfo as g, type SubVaultPosition as h, type VaultPortfolio as i, ActionType as j, type ActionTypeValue as k, type AssetBalance as l, type AssetInfo as m, type AsyncRequestFinalResult as n, type AsyncRequestStatus as o, type AsyncRequestStatusInfo as p, type BridgeParams as q, type ChainPortfolio as r, type CrossChainRequestInfo as s, type CuratorBridgeParams as t, type DepositBlockReason as u, type DepositEligibility as v, type InboundRouteWithBalance as w, type MaxWithdrawable as x, type MultiChainUserPosition as y, type OutboundRoute as z };
@@ -148,7 +148,92 @@ type CuratorAction = {
148
148
  type: 'erc7540Redeem';
149
149
  vault: Address;
150
150
  shares: bigint;
151
+ } | {
152
+ type: 'addAvailableAsset';
153
+ asset: Address;
154
+ } | {
155
+ type: 'addAvailableAssets';
156
+ assets: Address[];
157
+ } | {
158
+ type: 'disableAssetToDeposit';
159
+ asset: Address;
160
+ } | {
161
+ type: 'setDepositCapacity';
162
+ capacity: bigint;
163
+ } | {
164
+ type: 'setTimeLockPeriod';
165
+ period: bigint;
166
+ } | {
167
+ type: 'setWithdrawalFee';
168
+ fee: bigint;
169
+ } | {
170
+ type: 'setWithdrawalTimelock';
171
+ duration: bigint;
172
+ } | {
173
+ type: 'enableAssetToDeposit';
174
+ asset: Address;
175
+ } | {
176
+ type: 'disableDepositWhitelist';
177
+ } | {
178
+ type: 'updateWithdrawalQueueStatus';
179
+ status: boolean;
180
+ } | {
181
+ type: 'setMaxWithdrawalDelay';
182
+ delay: number;
183
+ } | {
184
+ type: 'setMaxSlippagePercent';
185
+ percent: bigint;
186
+ } | {
187
+ type: 'setCrossChainAccountingManager';
188
+ manager: Address;
189
+ } | {
190
+ type: 'setGasLimitForAccounting';
191
+ availableTokenGas: bigint;
192
+ heldTokenGas: bigint;
193
+ facetGas: bigint;
194
+ limit: bigint;
195
+ } | {
196
+ type: 'setFee';
197
+ fee: bigint;
198
+ } | {
199
+ type: 'transferOwnership';
200
+ newOwner: Address;
201
+ } | {
202
+ type: 'transferCuratorship';
203
+ newCurator: Address;
204
+ } | {
205
+ type: 'transferGuardian';
206
+ newGuardian: Address;
151
207
  };
208
+ /**
209
+ * Full vault configuration snapshot covering roles, fees, capacity, timelock,
210
+ * withdrawal settings, whitelist, asset lists, cross-chain, and state.
211
+ */
212
+ interface VaultConfiguration {
213
+ owner: Address;
214
+ pendingOwner: Address;
215
+ curator: Address;
216
+ guardian: Address;
217
+ fee: bigint;
218
+ withdrawalFee: bigint;
219
+ feeRecipient: Address;
220
+ depositCapacity: bigint;
221
+ maxSlippagePercent: bigint;
222
+ timeLockPeriod: bigint;
223
+ currentNonce: bigint;
224
+ withdrawalQueueEnabled: boolean;
225
+ withdrawalTimelock: bigint;
226
+ maxWithdrawalDelay: number;
227
+ depositWhitelistEnabled: boolean;
228
+ availableAssets: Address[];
229
+ depositableAssets: Address[];
230
+ ccManager: Address;
231
+ lzAdapter: Address;
232
+ escrow: Address;
233
+ isHub: boolean;
234
+ paused: boolean;
235
+ registry: Address;
236
+ }
152
237
  interface CuratorVaultStatus {
153
238
  curator: Address;
154
239
  timeLockPeriod: bigint;
@@ -259,6 +344,54 @@ interface ERC7540RequestStatus {
259
344
  /** True if claimableRedeem > 0 — vault can call erc7540Redeem to finalize */
260
345
  canFinalizeRedeem: boolean;
261
346
  }
347
+ /**
348
+ * Portfolio snapshot for a single chain (hub or spoke).
349
+ */
350
+ interface ChainPortfolio {
351
+ /** EVM chain ID */
352
+ chainId: number;
353
+ /** Vault address on this chain (same on all chains via CREATE3) */
354
+ vault: Address;
355
+ /** Whether this chain is the hub or a spoke */
356
+ role: 'hub' | 'spoke';
357
+ /** Full portfolio on this chain */
358
+ portfolio: VaultPortfolio;
359
+ }
360
+ /**
361
+ * Aggregated multi-chain portfolio across hub and all spoke chains.
362
+ *
363
+ * Note: `totalLiquidValue`, `totalDeployedValue`, and `totalLockedValue` are
364
+ * raw bigint sums across chains. Because each chain may use a different
365
+ * underlying token, callers are responsible for interpreting units
366
+ * (in practice, MoreVaults uses the same underlying on all chains).
367
+ */
368
+ interface MultiChainPortfolio {
369
+ /** Chain ID of the hub vault */
370
+ hubChainId: number;
371
+ /** Per-chain portfolio breakdowns (hub first, then spokes) */
372
+ chains: ChainPortfolio[];
373
+ /**
374
+ * Sum of liquid underlying balances across all chains.
375
+ * Computed as: sum(chain.portfolio.totalValue - subVaultDeployedValue) per chain.
376
+ * For the authoritative AUM, prefer the hub's `totalAssets` which already
377
+ * includes spoke values via LZ Read.
378
+ */
379
+ totalLiquidValue: bigint;
380
+ /**
381
+ * Sum of all sub-vault position underlying values across all chains.
382
+ */
383
+ totalDeployedValue: bigint;
384
+ /**
385
+ * Sum of lockedAssets (pending ERC7540 requests) across all chains.
386
+ */
387
+ totalLockedValue: bigint;
388
+ /**
389
+ * All sub-vault positions across all chains, each tagged with its chainId.
390
+ */
391
+ allSubVaultPositions: Array<SubVaultPosition & {
392
+ chainId: number;
393
+ }>;
394
+ }
262
395
  /**
263
396
  * Full portfolio view for a curator vault combining liquid and invested assets.
264
397
  */
@@ -1039,4 +1172,4 @@ declare function quoteCuratorBridgeFee(publicClient: PublicClient, vault: Addres
1039
1172
  */
1040
1173
  declare function executeCuratorBridge(walletClient: WalletClient, publicClient: PublicClient, vault: Address, token: Address, params: CuratorBridgeParams): Promise<Hash>;
1041
1174
 
1042
- export { getAllVaultChainIds as $, type AsyncRequestResult as A, type BatchSwapParams as B, type ComposeData as C, type DepositResult as D, type ERC7540RequestStatus as E, type VaultDistribution as F, type VaultMetadata as G, type VaultMode as H, type InboundRoute as I, type VaultStatus as J, type VaultSummary as K, type VaultTopology as L, type MaxWithdrawable as M, NATIVE_SYMBOL as N, OMNI_FACTORY_ADDRESS as O, type PendingAction as P, canDeposit as Q, type RedeemResult as R, type SpokeDepositResult as S, detectStargateOft as T, type UserBalances as U, type VaultAddresses as V, discoverVaultTopology as W, encodeBridgeParams as X, ensureAllowance as Y, executeCuratorBridge as Z, findBridgeRoute as _, type CuratorVaultStatus as a, getAsyncRequestStatus as a0, getAsyncRequestStatusLabel as a1, getFullVaultTopology as a2, getInboundRoutes as a3, getMaxWithdrawable as a4, getOutboundRoutes as a5, getUserBalances as a6, getUserBalancesForRoutes as a7, getUserPosition as a8, getUserPositionMultiChain as a9, getVaultDistribution as aa, getVaultDistributionWithTopology as ab, getVaultMetadata as ac, getVaultStatus as ad, getVaultSummary as ae, getVaultTopology as af, isAsyncMode as ag, isOnHubChain as ah, previewDeposit as ai, previewRedeem as aj, quoteCuratorBridgeFee as ak, quoteLzFee as al, quoteRouteDepositFee as am, waitForAsyncRequest as an, waitForTx as ao, type VaultAnalysis as b, type VaultAssetBreakdown as c, type CuratorAction as d, type SubmitActionsResult as e, type SubVaultInfo as f, type SubVaultPosition as g, type VaultPortfolio as h, ActionType as i, type ActionTypeValue as j, type AssetBalance as k, type AssetInfo as l, type AsyncRequestFinalResult as m, type AsyncRequestStatus as n, type AsyncRequestStatusInfo as o, type BridgeParams as p, type CrossChainRequestInfo as q, type CuratorBridgeParams as r, type DepositBlockReason as s, type DepositEligibility as t, type InboundRouteWithBalance as u, type MultiChainUserPosition as v, type OutboundRoute as w, type SpokeBalance as x, type SwapParams as y, type UserPosition as z };
1175
+ export { ensureAllowance as $, type AsyncRequestResult as A, type BatchSwapParams as B, type ComposeData as C, type DepositResult as D, type ERC7540RequestStatus as E, type SpokeBalance as F, type SwapParams as G, type UserPosition as H, type InboundRoute as I, type VaultDistribution as J, type VaultMetadata as K, type VaultMode as L, type MultiChainPortfolio as M, NATIVE_SYMBOL as N, OMNI_FACTORY_ADDRESS as O, type PendingAction as P, type VaultStatus as Q, type RedeemResult as R, type SpokeDepositResult as S, type VaultSummary as T, type UserBalances as U, type VaultAddresses as V, type VaultTopology as W, canDeposit as X, detectStargateOft as Y, discoverVaultTopology as Z, encodeBridgeParams as _, type CuratorVaultStatus as a, executeCuratorBridge as a0, findBridgeRoute as a1, getAllVaultChainIds as a2, getAsyncRequestStatus as a3, getAsyncRequestStatusLabel as a4, getFullVaultTopology as a5, getInboundRoutes as a6, getMaxWithdrawable as a7, getOutboundRoutes as a8, getUserBalances as a9, getUserBalancesForRoutes as aa, getUserPosition as ab, getUserPositionMultiChain as ac, getVaultDistribution as ad, getVaultDistributionWithTopology as ae, getVaultMetadata as af, getVaultStatus as ag, getVaultSummary as ah, getVaultTopology as ai, isAsyncMode as aj, isOnHubChain as ak, previewDeposit as al, previewRedeem as am, quoteCuratorBridgeFee as an, quoteLzFee as ao, quoteRouteDepositFee as ap, waitForAsyncRequest as aq, waitForTx as ar, type VaultAnalysis as b, type VaultAssetBreakdown as c, type CuratorAction as d, type SubmitActionsResult as e, type VaultConfiguration as f, type SubVaultInfo as g, type SubVaultPosition as h, type VaultPortfolio as i, ActionType as j, type ActionTypeValue as k, type AssetBalance as l, type AssetInfo as m, type AsyncRequestFinalResult as n, type AsyncRequestStatus as o, type AsyncRequestStatusInfo as p, type BridgeParams as q, type ChainPortfolio as r, type CrossChainRequestInfo as s, type CuratorBridgeParams as t, type DepositBlockReason as u, type DepositEligibility as v, type InboundRouteWithBalance as w, type MaxWithdrawable as x, type MultiChainUserPosition as y, type OutboundRoute as z };