@oydual31/more-vaults-sdk 0.5.0 → 0.6.1
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/README.md +50 -0
- package/dist/{curatorBridge-DTW1lPF7.d.cts → curatorBridge-6IyNli8N.d.cts} +141 -1
- package/dist/{curatorBridge-DTW1lPF7.d.ts → curatorBridge-6IyNli8N.d.ts} +141 -1
- package/dist/ethers/index.cjs +330 -3
- package/dist/ethers/index.cjs.map +1 -1
- package/dist/ethers/index.d.cts +242 -1
- package/dist/ethers/index.d.ts +242 -1
- package/dist/ethers/index.js +323 -5
- package/dist/ethers/index.js.map +1 -1
- package/dist/react/index.cjs +293 -0
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +81 -2
- package/dist/react/index.d.ts +81 -2
- package/dist/react/index.js +291 -2
- package/dist/react/index.js.map +1 -1
- package/dist/viem/index.cjs +353 -0
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +291 -3
- package/dist/viem/index.d.ts +291 -3
- package/dist/viem/index.js +346 -2
- package/dist/viem/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ethers/abis.ts +24 -0
- package/src/ethers/curatorSubVaults.ts +568 -0
- package/src/ethers/index.ts +20 -0
- package/src/ethers/types.ts +143 -0
- package/src/react/index.ts +13 -0
- package/src/react/useERC7540RequestStatus.ts +43 -0
- package/src/react/useSubVaultPositions.ts +35 -0
- package/src/react/useVaultPortfolio.ts +35 -0
- package/src/react/useVaultPortfolioMultiChain.ts +52 -0
- package/src/viem/abis.ts +24 -0
- package/src/viem/curatorSubVaults.ts +643 -0
- package/src/viem/index.ts +19 -0
- package/src/viem/types.ts +152 -0
package/README.md
CHANGED
|
@@ -175,6 +175,10 @@ All three modules expose the same logical features. Choose based on your stack.
|
|
|
175
175
|
| `buildUniswapV3Swap`, `encodeUniswapV3SwapCalldata` | Yes | Yes | — |
|
|
176
176
|
| `quoteCuratorBridgeFee`, `executeCuratorBridge` | Yes | Yes | `useCuratorBridgeQuote`, `useExecuteBridge` |
|
|
177
177
|
| `findBridgeRoute`, `encodeBridgeParams` | Yes | Yes | — |
|
|
178
|
+
| `getSubVaultPositions`, `getVaultPortfolio` | Yes | Yes | `useSubVaultPositions`, `useVaultPortfolio` |
|
|
179
|
+
| `getSubVaultInfo`, `detectSubVaultType` | Yes | Yes | — |
|
|
180
|
+
| `getERC7540RequestStatus` | Yes | Yes | `useERC7540RequestStatus` |
|
|
181
|
+
| `previewSubVaultDeposit`, `previewSubVaultRedeem` | Yes | Yes | — |
|
|
178
182
|
| `detectStargateOft` | Yes | Yes | — |
|
|
179
183
|
| `preflightSync`, `preflightAsync` | Yes | Yes | — |
|
|
180
184
|
| `preflightSpokeDeposit`, `preflightSpokeRedeem` | Yes | Yes | — |
|
|
@@ -717,6 +721,49 @@ const txHash = await executeCuratorBridge(
|
|
|
717
721
|
)
|
|
718
722
|
```
|
|
719
723
|
|
|
724
|
+
### Sub-vault operations
|
|
725
|
+
|
|
726
|
+
Curators invest vault assets into ERC4626/ERC7540 sub-vaults (Aave, Morpho, etc.) to generate yield.
|
|
727
|
+
|
|
728
|
+
```ts
|
|
729
|
+
import {
|
|
730
|
+
getSubVaultPositions,
|
|
731
|
+
getVaultPortfolio,
|
|
732
|
+
getSubVaultInfo,
|
|
733
|
+
detectSubVaultType,
|
|
734
|
+
getERC7540RequestStatus,
|
|
735
|
+
previewSubVaultDeposit,
|
|
736
|
+
} from '@oydual31/more-vaults-sdk/viem'
|
|
737
|
+
|
|
738
|
+
// Full portfolio: liquid assets + sub-vault positions
|
|
739
|
+
const portfolio = await getVaultPortfolio(publicClient, VAULT)
|
|
740
|
+
// portfolio.liquidAssets — AssetBalance[] (tokens held directly)
|
|
741
|
+
// portfolio.subVaultPositions — SubVaultPosition[] (shares + underlying value)
|
|
742
|
+
// portfolio.totalValue — total in vault underlying units
|
|
743
|
+
// portfolio.lockedAssets — locked in pending ERC7540 requests
|
|
744
|
+
|
|
745
|
+
// Active sub-vault positions with current values
|
|
746
|
+
const positions = await getSubVaultPositions(publicClient, VAULT)
|
|
747
|
+
for (const p of positions) {
|
|
748
|
+
console.log(`${p.symbol}: ${p.sharesBalance} shares = ${p.underlyingValue} ${p.underlyingSymbol}`)
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// Analyze a target sub-vault before investing
|
|
752
|
+
const info = await getSubVaultInfo(publicClient, VAULT, MORPHO_VAULT)
|
|
753
|
+
// info.type — 'erc4626' or 'erc7540'
|
|
754
|
+
// info.maxDeposit — capacity remaining
|
|
755
|
+
// info.isWhitelisted — must be true to invest
|
|
756
|
+
|
|
757
|
+
// Preview: how many shares would a 1000 USDC deposit yield?
|
|
758
|
+
const shares = await previewSubVaultDeposit(publicClient, MORPHO_VAULT, parseUnits('1000', 6))
|
|
759
|
+
|
|
760
|
+
// For ERC7540 async sub-vaults: check if requests are ready
|
|
761
|
+
const status = await getERC7540RequestStatus(publicClient, VAULT, ASYNC_VAULT)
|
|
762
|
+
if (status.canFinalizeDeposit) {
|
|
763
|
+
// Curator can now call erc7540Deposit via submitActions
|
|
764
|
+
}
|
|
765
|
+
```
|
|
766
|
+
|
|
720
767
|
---
|
|
721
768
|
|
|
722
769
|
## Vault topology & distribution
|
|
@@ -893,6 +940,9 @@ Import from `@oydual31/more-vaults-sdk/react`. Requires wagmi v2 + @tanstack/rea
|
|
|
893
940
|
| `useVetoActions()` | Guardian: cancel pending actions |
|
|
894
941
|
| `useCuratorBridgeQuote()` | Quote LayerZero fee for curator bridge |
|
|
895
942
|
| `useExecuteBridge()` | Execute curator bridge operation |
|
|
943
|
+
| `useSubVaultPositions()` | Active sub-vault positions with values |
|
|
944
|
+
| `useVaultPortfolio()` | Full portfolio: liquid + deployed + locked |
|
|
945
|
+
| `useERC7540RequestStatus()` | Pending/claimable ERC7540 request status |
|
|
896
946
|
|
|
897
947
|
### React example
|
|
898
948
|
|
|
@@ -188,6 +188,146 @@ interface VaultAssetBreakdown {
|
|
|
188
188
|
/** Vault underlying token decimals */
|
|
189
189
|
underlyingDecimals: number;
|
|
190
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* A single active sub-vault position held by the curator vault.
|
|
193
|
+
* Covers both ERC4626 (synchronous) and ERC7540 (asynchronous) sub-vaults.
|
|
194
|
+
*/
|
|
195
|
+
interface SubVaultPosition {
|
|
196
|
+
/** Sub-vault contract address */
|
|
197
|
+
address: Address;
|
|
198
|
+
/** Protocol type of the sub-vault */
|
|
199
|
+
type: 'erc4626' | 'erc7540';
|
|
200
|
+
/** Name of the sub-vault share token */
|
|
201
|
+
name: string;
|
|
202
|
+
/** Symbol of the sub-vault share token */
|
|
203
|
+
symbol: string;
|
|
204
|
+
/** Decimals of the sub-vault share token */
|
|
205
|
+
decimals: number;
|
|
206
|
+
/** Shares of the sub-vault held by the curator vault */
|
|
207
|
+
sharesBalance: bigint;
|
|
208
|
+
/** Current value of the shares in terms of the sub-vault's underlying asset */
|
|
209
|
+
underlyingValue: bigint;
|
|
210
|
+
/** Underlying asset address of the sub-vault */
|
|
211
|
+
underlyingAsset: Address;
|
|
212
|
+
/** Symbol of the sub-vault's underlying asset */
|
|
213
|
+
underlyingSymbol: string;
|
|
214
|
+
/** Decimals of the sub-vault's underlying asset */
|
|
215
|
+
underlyingDecimals: number;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Metadata and capability snapshot for a potential sub-vault investment target.
|
|
219
|
+
*/
|
|
220
|
+
interface SubVaultInfo {
|
|
221
|
+
/** Sub-vault contract address */
|
|
222
|
+
address: Address;
|
|
223
|
+
/** Protocol type: ERC4626 (sync) or ERC7540 (async) */
|
|
224
|
+
type: 'erc4626' | 'erc7540';
|
|
225
|
+
/** Sub-vault share token name */
|
|
226
|
+
name: string;
|
|
227
|
+
/** Sub-vault share token symbol */
|
|
228
|
+
symbol: string;
|
|
229
|
+
/** Sub-vault share token decimals */
|
|
230
|
+
decimals: number;
|
|
231
|
+
/** Underlying asset address */
|
|
232
|
+
underlyingAsset: Address;
|
|
233
|
+
/** Underlying asset symbol */
|
|
234
|
+
underlyingSymbol: string;
|
|
235
|
+
/** Underlying asset decimals */
|
|
236
|
+
underlyingDecimals: number;
|
|
237
|
+
/** Maximum amount the curator vault can deposit (from maxDeposit(vault)) */
|
|
238
|
+
maxDeposit: bigint;
|
|
239
|
+
/** Whether the sub-vault is whitelisted in the global MoreVaults registry */
|
|
240
|
+
isWhitelisted: boolean;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Status of pending and claimable ERC7540 async requests for a sub-vault.
|
|
244
|
+
* Uses requestId = 0 (the standard default for non-batch ERC7540 vaults).
|
|
245
|
+
*/
|
|
246
|
+
interface ERC7540RequestStatus {
|
|
247
|
+
/** Sub-vault address these statuses belong to */
|
|
248
|
+
subVault: Address;
|
|
249
|
+
/** Assets in a pending deposit request (not yet claimable) */
|
|
250
|
+
pendingDeposit: bigint;
|
|
251
|
+
/** Assets ready to be claimed/finalized as shares */
|
|
252
|
+
claimableDeposit: bigint;
|
|
253
|
+
/** Shares in a pending redeem request (not yet claimable) */
|
|
254
|
+
pendingRedeem: bigint;
|
|
255
|
+
/** Assets ready to be claimed after redeem fulfillment */
|
|
256
|
+
claimableRedeem: bigint;
|
|
257
|
+
/** True if claimableDeposit > 0 — vault can call erc7540Deposit to finalize */
|
|
258
|
+
canFinalizeDeposit: boolean;
|
|
259
|
+
/** True if claimableRedeem > 0 — vault can call erc7540Redeem to finalize */
|
|
260
|
+
canFinalizeRedeem: boolean;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Portfolio snapshot for a single chain (hub or spoke).
|
|
264
|
+
*/
|
|
265
|
+
interface ChainPortfolio {
|
|
266
|
+
/** EVM chain ID */
|
|
267
|
+
chainId: number;
|
|
268
|
+
/** Vault address on this chain (same on all chains via CREATE3) */
|
|
269
|
+
vault: Address;
|
|
270
|
+
/** Whether this chain is the hub or a spoke */
|
|
271
|
+
role: 'hub' | 'spoke';
|
|
272
|
+
/** Full portfolio on this chain */
|
|
273
|
+
portfolio: VaultPortfolio;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Aggregated multi-chain portfolio across hub and all spoke chains.
|
|
277
|
+
*
|
|
278
|
+
* Note: `totalLiquidValue`, `totalDeployedValue`, and `totalLockedValue` are
|
|
279
|
+
* raw bigint sums across chains. Because each chain may use a different
|
|
280
|
+
* underlying token, callers are responsible for interpreting units
|
|
281
|
+
* (in practice, MoreVaults uses the same underlying on all chains).
|
|
282
|
+
*/
|
|
283
|
+
interface MultiChainPortfolio {
|
|
284
|
+
/** Chain ID of the hub vault */
|
|
285
|
+
hubChainId: number;
|
|
286
|
+
/** Per-chain portfolio breakdowns (hub first, then spokes) */
|
|
287
|
+
chains: ChainPortfolio[];
|
|
288
|
+
/**
|
|
289
|
+
* Sum of liquid underlying balances across all chains.
|
|
290
|
+
* Computed as: sum(chain.portfolio.totalValue - subVaultDeployedValue) per chain.
|
|
291
|
+
* For the authoritative AUM, prefer the hub's `totalAssets` which already
|
|
292
|
+
* includes spoke values via LZ Read.
|
|
293
|
+
*/
|
|
294
|
+
totalLiquidValue: bigint;
|
|
295
|
+
/**
|
|
296
|
+
* Sum of all sub-vault position underlying values across all chains.
|
|
297
|
+
*/
|
|
298
|
+
totalDeployedValue: bigint;
|
|
299
|
+
/**
|
|
300
|
+
* Sum of lockedAssets (pending ERC7540 requests) across all chains.
|
|
301
|
+
*/
|
|
302
|
+
totalLockedValue: bigint;
|
|
303
|
+
/**
|
|
304
|
+
* All sub-vault positions across all chains, each tagged with its chainId.
|
|
305
|
+
*/
|
|
306
|
+
allSubVaultPositions: Array<SubVaultPosition & {
|
|
307
|
+
chainId: number;
|
|
308
|
+
}>;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Full portfolio view for a curator vault combining liquid and invested assets.
|
|
312
|
+
*/
|
|
313
|
+
interface VaultPortfolio {
|
|
314
|
+
/** Liquid ERC20 asset balances held directly by the vault (excludes sub-vault share tokens) */
|
|
315
|
+
liquidAssets: AssetBalance[];
|
|
316
|
+
/** Active positions in ERC4626/ERC7540 sub-vaults */
|
|
317
|
+
subVaultPositions: SubVaultPosition[];
|
|
318
|
+
/**
|
|
319
|
+
* Approximate total value in underlying terms:
|
|
320
|
+
* liquid underlying balance + sum of sub-vault convertToAssets values.
|
|
321
|
+
* For the authoritative total, use `totalAssets` from the vault contract.
|
|
322
|
+
*/
|
|
323
|
+
totalValue: bigint;
|
|
324
|
+
/** totalAssets() from the vault — authoritative AUM figure */
|
|
325
|
+
totalAssets: bigint;
|
|
326
|
+
/** totalSupply() of vault shares */
|
|
327
|
+
totalSupply: bigint;
|
|
328
|
+
/** Assets locked in pending ERC7540 requests (lockedTokensAmountOfAsset) */
|
|
329
|
+
lockedAssets: bigint;
|
|
330
|
+
}
|
|
191
331
|
|
|
192
332
|
/**
|
|
193
333
|
* Wait for a transaction receipt with generous timeout and retry logic.
|
|
@@ -947,4 +1087,4 @@ declare function quoteCuratorBridgeFee(publicClient: PublicClient, vault: Addres
|
|
|
947
1087
|
*/
|
|
948
1088
|
declare function executeCuratorBridge(walletClient: WalletClient, publicClient: PublicClient, vault: Address, token: Address, params: CuratorBridgeParams): Promise<Hash>;
|
|
949
1089
|
|
|
950
|
-
export {
|
|
1090
|
+
export { executeCuratorBridge as $, type AsyncRequestResult as A, type BatchSwapParams as B, type ComposeData as C, type DepositResult as D, type ERC7540RequestStatus as E, type SwapParams as F, type UserPosition as G, type VaultDistribution as H, type InboundRoute as I, type VaultMetadata as J, type VaultMode as K, type VaultStatus as L, type MultiChainPortfolio as M, NATIVE_SYMBOL as N, OMNI_FACTORY_ADDRESS as O, type PendingAction as P, type VaultSummary as Q, type RedeemResult as R, type SpokeDepositResult as S, type VaultTopology as T, type UserBalances as U, type VaultAddresses as V, canDeposit as W, detectStargateOft as X, discoverVaultTopology as Y, encodeBridgeParams as Z, ensureAllowance as _, type CuratorVaultStatus as a, findBridgeRoute as a0, getAllVaultChainIds as a1, getAsyncRequestStatus as a2, getAsyncRequestStatusLabel as a3, getFullVaultTopology as a4, getInboundRoutes as a5, getMaxWithdrawable as a6, getOutboundRoutes as a7, getUserBalances as a8, getUserBalancesForRoutes as a9, getUserPosition as aa, getUserPositionMultiChain as ab, getVaultDistribution as ac, getVaultDistributionWithTopology as ad, getVaultMetadata as ae, getVaultStatus as af, getVaultSummary as ag, getVaultTopology as ah, isAsyncMode as ai, isOnHubChain as aj, previewDeposit as ak, previewRedeem as al, quoteCuratorBridgeFee as am, quoteLzFee as an, quoteRouteDepositFee as ao, waitForAsyncRequest as ap, waitForTx as aq, 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 ChainPortfolio as q, type CrossChainRequestInfo as r, type CuratorBridgeParams as s, type DepositBlockReason as t, type DepositEligibility as u, type InboundRouteWithBalance as v, type MaxWithdrawable as w, type MultiChainUserPosition as x, type OutboundRoute as y, type SpokeBalance as z };
|
|
@@ -188,6 +188,146 @@ interface VaultAssetBreakdown {
|
|
|
188
188
|
/** Vault underlying token decimals */
|
|
189
189
|
underlyingDecimals: number;
|
|
190
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* A single active sub-vault position held by the curator vault.
|
|
193
|
+
* Covers both ERC4626 (synchronous) and ERC7540 (asynchronous) sub-vaults.
|
|
194
|
+
*/
|
|
195
|
+
interface SubVaultPosition {
|
|
196
|
+
/** Sub-vault contract address */
|
|
197
|
+
address: Address;
|
|
198
|
+
/** Protocol type of the sub-vault */
|
|
199
|
+
type: 'erc4626' | 'erc7540';
|
|
200
|
+
/** Name of the sub-vault share token */
|
|
201
|
+
name: string;
|
|
202
|
+
/** Symbol of the sub-vault share token */
|
|
203
|
+
symbol: string;
|
|
204
|
+
/** Decimals of the sub-vault share token */
|
|
205
|
+
decimals: number;
|
|
206
|
+
/** Shares of the sub-vault held by the curator vault */
|
|
207
|
+
sharesBalance: bigint;
|
|
208
|
+
/** Current value of the shares in terms of the sub-vault's underlying asset */
|
|
209
|
+
underlyingValue: bigint;
|
|
210
|
+
/** Underlying asset address of the sub-vault */
|
|
211
|
+
underlyingAsset: Address;
|
|
212
|
+
/** Symbol of the sub-vault's underlying asset */
|
|
213
|
+
underlyingSymbol: string;
|
|
214
|
+
/** Decimals of the sub-vault's underlying asset */
|
|
215
|
+
underlyingDecimals: number;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Metadata and capability snapshot for a potential sub-vault investment target.
|
|
219
|
+
*/
|
|
220
|
+
interface SubVaultInfo {
|
|
221
|
+
/** Sub-vault contract address */
|
|
222
|
+
address: Address;
|
|
223
|
+
/** Protocol type: ERC4626 (sync) or ERC7540 (async) */
|
|
224
|
+
type: 'erc4626' | 'erc7540';
|
|
225
|
+
/** Sub-vault share token name */
|
|
226
|
+
name: string;
|
|
227
|
+
/** Sub-vault share token symbol */
|
|
228
|
+
symbol: string;
|
|
229
|
+
/** Sub-vault share token decimals */
|
|
230
|
+
decimals: number;
|
|
231
|
+
/** Underlying asset address */
|
|
232
|
+
underlyingAsset: Address;
|
|
233
|
+
/** Underlying asset symbol */
|
|
234
|
+
underlyingSymbol: string;
|
|
235
|
+
/** Underlying asset decimals */
|
|
236
|
+
underlyingDecimals: number;
|
|
237
|
+
/** Maximum amount the curator vault can deposit (from maxDeposit(vault)) */
|
|
238
|
+
maxDeposit: bigint;
|
|
239
|
+
/** Whether the sub-vault is whitelisted in the global MoreVaults registry */
|
|
240
|
+
isWhitelisted: boolean;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Status of pending and claimable ERC7540 async requests for a sub-vault.
|
|
244
|
+
* Uses requestId = 0 (the standard default for non-batch ERC7540 vaults).
|
|
245
|
+
*/
|
|
246
|
+
interface ERC7540RequestStatus {
|
|
247
|
+
/** Sub-vault address these statuses belong to */
|
|
248
|
+
subVault: Address;
|
|
249
|
+
/** Assets in a pending deposit request (not yet claimable) */
|
|
250
|
+
pendingDeposit: bigint;
|
|
251
|
+
/** Assets ready to be claimed/finalized as shares */
|
|
252
|
+
claimableDeposit: bigint;
|
|
253
|
+
/** Shares in a pending redeem request (not yet claimable) */
|
|
254
|
+
pendingRedeem: bigint;
|
|
255
|
+
/** Assets ready to be claimed after redeem fulfillment */
|
|
256
|
+
claimableRedeem: bigint;
|
|
257
|
+
/** True if claimableDeposit > 0 — vault can call erc7540Deposit to finalize */
|
|
258
|
+
canFinalizeDeposit: boolean;
|
|
259
|
+
/** True if claimableRedeem > 0 — vault can call erc7540Redeem to finalize */
|
|
260
|
+
canFinalizeRedeem: boolean;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Portfolio snapshot for a single chain (hub or spoke).
|
|
264
|
+
*/
|
|
265
|
+
interface ChainPortfolio {
|
|
266
|
+
/** EVM chain ID */
|
|
267
|
+
chainId: number;
|
|
268
|
+
/** Vault address on this chain (same on all chains via CREATE3) */
|
|
269
|
+
vault: Address;
|
|
270
|
+
/** Whether this chain is the hub or a spoke */
|
|
271
|
+
role: 'hub' | 'spoke';
|
|
272
|
+
/** Full portfolio on this chain */
|
|
273
|
+
portfolio: VaultPortfolio;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Aggregated multi-chain portfolio across hub and all spoke chains.
|
|
277
|
+
*
|
|
278
|
+
* Note: `totalLiquidValue`, `totalDeployedValue`, and `totalLockedValue` are
|
|
279
|
+
* raw bigint sums across chains. Because each chain may use a different
|
|
280
|
+
* underlying token, callers are responsible for interpreting units
|
|
281
|
+
* (in practice, MoreVaults uses the same underlying on all chains).
|
|
282
|
+
*/
|
|
283
|
+
interface MultiChainPortfolio {
|
|
284
|
+
/** Chain ID of the hub vault */
|
|
285
|
+
hubChainId: number;
|
|
286
|
+
/** Per-chain portfolio breakdowns (hub first, then spokes) */
|
|
287
|
+
chains: ChainPortfolio[];
|
|
288
|
+
/**
|
|
289
|
+
* Sum of liquid underlying balances across all chains.
|
|
290
|
+
* Computed as: sum(chain.portfolio.totalValue - subVaultDeployedValue) per chain.
|
|
291
|
+
* For the authoritative AUM, prefer the hub's `totalAssets` which already
|
|
292
|
+
* includes spoke values via LZ Read.
|
|
293
|
+
*/
|
|
294
|
+
totalLiquidValue: bigint;
|
|
295
|
+
/**
|
|
296
|
+
* Sum of all sub-vault position underlying values across all chains.
|
|
297
|
+
*/
|
|
298
|
+
totalDeployedValue: bigint;
|
|
299
|
+
/**
|
|
300
|
+
* Sum of lockedAssets (pending ERC7540 requests) across all chains.
|
|
301
|
+
*/
|
|
302
|
+
totalLockedValue: bigint;
|
|
303
|
+
/**
|
|
304
|
+
* All sub-vault positions across all chains, each tagged with its chainId.
|
|
305
|
+
*/
|
|
306
|
+
allSubVaultPositions: Array<SubVaultPosition & {
|
|
307
|
+
chainId: number;
|
|
308
|
+
}>;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Full portfolio view for a curator vault combining liquid and invested assets.
|
|
312
|
+
*/
|
|
313
|
+
interface VaultPortfolio {
|
|
314
|
+
/** Liquid ERC20 asset balances held directly by the vault (excludes sub-vault share tokens) */
|
|
315
|
+
liquidAssets: AssetBalance[];
|
|
316
|
+
/** Active positions in ERC4626/ERC7540 sub-vaults */
|
|
317
|
+
subVaultPositions: SubVaultPosition[];
|
|
318
|
+
/**
|
|
319
|
+
* Approximate total value in underlying terms:
|
|
320
|
+
* liquid underlying balance + sum of sub-vault convertToAssets values.
|
|
321
|
+
* For the authoritative total, use `totalAssets` from the vault contract.
|
|
322
|
+
*/
|
|
323
|
+
totalValue: bigint;
|
|
324
|
+
/** totalAssets() from the vault — authoritative AUM figure */
|
|
325
|
+
totalAssets: bigint;
|
|
326
|
+
/** totalSupply() of vault shares */
|
|
327
|
+
totalSupply: bigint;
|
|
328
|
+
/** Assets locked in pending ERC7540 requests (lockedTokensAmountOfAsset) */
|
|
329
|
+
lockedAssets: bigint;
|
|
330
|
+
}
|
|
191
331
|
|
|
192
332
|
/**
|
|
193
333
|
* Wait for a transaction receipt with generous timeout and retry logic.
|
|
@@ -947,4 +1087,4 @@ declare function quoteCuratorBridgeFee(publicClient: PublicClient, vault: Addres
|
|
|
947
1087
|
*/
|
|
948
1088
|
declare function executeCuratorBridge(walletClient: WalletClient, publicClient: PublicClient, vault: Address, token: Address, params: CuratorBridgeParams): Promise<Hash>;
|
|
949
1089
|
|
|
950
|
-
export {
|
|
1090
|
+
export { executeCuratorBridge as $, type AsyncRequestResult as A, type BatchSwapParams as B, type ComposeData as C, type DepositResult as D, type ERC7540RequestStatus as E, type SwapParams as F, type UserPosition as G, type VaultDistribution as H, type InboundRoute as I, type VaultMetadata as J, type VaultMode as K, type VaultStatus as L, type MultiChainPortfolio as M, NATIVE_SYMBOL as N, OMNI_FACTORY_ADDRESS as O, type PendingAction as P, type VaultSummary as Q, type RedeemResult as R, type SpokeDepositResult as S, type VaultTopology as T, type UserBalances as U, type VaultAddresses as V, canDeposit as W, detectStargateOft as X, discoverVaultTopology as Y, encodeBridgeParams as Z, ensureAllowance as _, type CuratorVaultStatus as a, findBridgeRoute as a0, getAllVaultChainIds as a1, getAsyncRequestStatus as a2, getAsyncRequestStatusLabel as a3, getFullVaultTopology as a4, getInboundRoutes as a5, getMaxWithdrawable as a6, getOutboundRoutes as a7, getUserBalances as a8, getUserBalancesForRoutes as a9, getUserPosition as aa, getUserPositionMultiChain as ab, getVaultDistribution as ac, getVaultDistributionWithTopology as ad, getVaultMetadata as ae, getVaultStatus as af, getVaultSummary as ag, getVaultTopology as ah, isAsyncMode as ai, isOnHubChain as aj, previewDeposit as ak, previewRedeem as al, quoteCuratorBridgeFee as am, quoteLzFee as an, quoteRouteDepositFee as ao, waitForAsyncRequest as ap, waitForTx as aq, 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 ChainPortfolio as q, type CrossChainRequestInfo as r, type CuratorBridgeParams as s, type DepositBlockReason as t, type DepositEligibility as u, type InboundRouteWithBalance as v, type MaxWithdrawable as w, type MultiChainUserPosition as x, type OutboundRoute as y, type SpokeBalance as z };
|