@oydual31/more-vaults-sdk 0.4.0 → 0.4.2

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.
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { j as VaultStatus, h as VaultMetadata, g as UserPosition, e as MultiChainUserPosition, b as AsyncRequestStatusInfo, l as VaultTopology, V as VaultDistribution, d as InboundRouteWithBalance } from '../spokeRoutes-BIafSbQ3.cjs';
2
+ import { z as VaultStatus, x as VaultMetadata, v as UserPosition, r as MultiChainUserPosition, l as AsyncRequestStatusInfo, F as VaultTopology, w as VaultDistribution, q as InboundRouteWithBalance, a as CuratorVaultStatus, b as VaultAnalysis, c as VaultAssetBreakdown, P as PendingAction, e as SubmitActionsResult, d as CuratorAction } from '../spokeRoutes-B8Lnk-t4.cjs';
3
3
  import * as _tanstack_query_core from '@tanstack/query-core';
4
4
  import { Address } from 'viem';
5
5
 
@@ -536,4 +536,113 @@ declare function getRouteTokenDecimals(symbol: string): number;
536
536
  */
537
537
  declare function useInboundRoutes(hubChainId: number | undefined, vault: Address | undefined, vaultAsset: Address | undefined, userAddress: Address | undefined): UseInboundRoutesReturn;
538
538
 
539
- export { AsyncRequestStatusInfo, MultiChainUserPosition, UserPosition, VaultMetadata, VaultStatus, VaultTopology, getRouteTokenDecimals, useAsyncRequestStatus, useDepositSimple, useInboundRoutes, useLzFee, useOmniDeposit, useOmniRedeem, useRedeemShares, useSmartDeposit, useSmartRedeem, useUserPosition, useUserPositionMultiChain, useVaultDistribution, useVaultMetadata, useVaultStatus, useVaultTopology };
539
+ interface UseCuratorVaultStatusOptions {
540
+ /** Refetch interval in ms. Default: 30_000 (30s) */
541
+ refetchInterval?: number;
542
+ }
543
+ /**
544
+ * Read the curator vault status snapshot.
545
+ *
546
+ * @example
547
+ * const { data: status, isLoading } = useCuratorVaultStatus('0xVAULT', 747)
548
+ */
549
+ declare function useCuratorVaultStatus(vault: `0x${string}` | undefined, chainId: number, options?: UseCuratorVaultStatusOptions): _tanstack_react_query.UseQueryResult<CuratorVaultStatus, Error>;
550
+
551
+ interface UseVaultAnalysisOptions {
552
+ /** Refetch interval in ms. Default: 30_000 (30s) */
553
+ refetchInterval?: number;
554
+ }
555
+ /**
556
+ * Read a detailed analysis of a vault.
557
+ *
558
+ * @example
559
+ * const { data: analysis, isLoading } = useVaultAnalysis('0xVAULT', 747)
560
+ */
561
+ declare function useVaultAnalysis(vault: `0x${string}` | undefined, chainId: number, options?: UseVaultAnalysisOptions): _tanstack_react_query.UseQueryResult<VaultAnalysis, Error>;
562
+
563
+ interface UseVaultAssetBreakdownOptions {
564
+ /** Refetch interval in ms. Default: 30_000 (30s) */
565
+ refetchInterval?: number;
566
+ }
567
+ /**
568
+ * Read the asset breakdown of a vault.
569
+ *
570
+ * @example
571
+ * const { data: breakdown, isLoading } = useVaultAssetBreakdown('0xVAULT', 747)
572
+ */
573
+ declare function useVaultAssetBreakdown(vault: `0x${string}` | undefined, chainId: number, options?: UseVaultAssetBreakdownOptions): _tanstack_react_query.UseQueryResult<VaultAssetBreakdown, Error>;
574
+
575
+ interface UsePendingActionsOptions {
576
+ /** Refetch interval in ms. Default: 30_000 (30s) */
577
+ refetchInterval?: number;
578
+ }
579
+ /**
580
+ * Read pending curator actions for a vault by nonce.
581
+ *
582
+ * @example
583
+ * const { data: pending, isLoading } = usePendingActions('0xVAULT', 747, 1n)
584
+ */
585
+ declare function usePendingActions(vault: `0x${string}` | undefined, chainId: number, nonce: bigint | undefined, options?: UsePendingActionsOptions): _tanstack_react_query.UseQueryResult<PendingAction, Error>;
586
+
587
+ interface UseIsCuratorOptions {
588
+ /** Refetch interval in ms. Default: 30_000 (30s) */
589
+ refetchInterval?: number;
590
+ }
591
+ /**
592
+ * Check whether an address is a curator of a vault.
593
+ *
594
+ * @example
595
+ * const { data: curator, isLoading } = useIsCurator('0xVAULT', 747, '0xADDR')
596
+ */
597
+ declare function useIsCurator(vault: `0x${string}` | undefined, chainId: number, address: `0x${string}` | undefined, options?: UseIsCuratorOptions): _tanstack_react_query.UseQueryResult<boolean, Error>;
598
+
599
+ interface UseProtocolWhitelistOptions {
600
+ /** Refetch interval in ms. Default: 30_000 (30s) */
601
+ refetchInterval?: number;
602
+ }
603
+ /**
604
+ * Check which protocols are whitelisted for a vault.
605
+ *
606
+ * @example
607
+ * const { data: whitelist, isLoading } = useProtocolWhitelist('0xVAULT', 747, ['0xPROTOCOL'])
608
+ */
609
+ declare function useProtocolWhitelist(vault: `0x${string}` | undefined, chainId: number, protocols: `0x${string}`[], options?: UseProtocolWhitelistOptions): _tanstack_react_query.UseQueryResult<Record<string, boolean>, Error>;
610
+
611
+ /**
612
+ * Submit a batch of curator actions to the vault.
613
+ *
614
+ * @example
615
+ * const { mutateAsync } = useSubmitActions('0xVAULT', 747)
616
+ * await mutateAsync({ actions: [{ type: 'erc4626Deposit', vault: '0x...', assets: 100n }] })
617
+ */
618
+ declare function useSubmitActions(vault: `0x${string}`, chainId: number): _tanstack_react_query.UseMutationResult<SubmitActionsResult, Error, {
619
+ actions: CuratorAction[];
620
+ }, unknown>;
621
+
622
+ /**
623
+ * Execute a pending curator action batch by nonce.
624
+ *
625
+ * @example
626
+ * const { mutateAsync } = useExecuteActions('0xVAULT', 747)
627
+ * await mutateAsync({ nonce: 1n })
628
+ */
629
+ declare function useExecuteActions(vault: `0x${string}`, chainId: number): _tanstack_react_query.UseMutationResult<{
630
+ txHash: `0x${string}`;
631
+ }, Error, {
632
+ nonce: bigint;
633
+ }, unknown>;
634
+
635
+ /**
636
+ * Guardian-only: cancel (veto) one or more pending curator action batches.
637
+ *
638
+ * @example
639
+ * const { mutateAsync } = useVetoActions('0xVAULT', 747)
640
+ * await mutateAsync({ nonces: [1n, 2n] })
641
+ */
642
+ declare function useVetoActions(vault: `0x${string}`, chainId: number): _tanstack_react_query.UseMutationResult<{
643
+ txHash: `0x${string}`;
644
+ }, Error, {
645
+ nonces: bigint[];
646
+ }, unknown>;
647
+
648
+ export { AsyncRequestStatusInfo, CuratorAction, CuratorVaultStatus, MultiChainUserPosition, PendingAction, UserPosition, VaultAnalysis, VaultAssetBreakdown, VaultMetadata, VaultStatus, VaultTopology, getRouteTokenDecimals, useAsyncRequestStatus, useCuratorVaultStatus, useDepositSimple, useExecuteActions, useInboundRoutes, useIsCurator, useLzFee, useOmniDeposit, useOmniRedeem, usePendingActions, useProtocolWhitelist, useRedeemShares, useSmartDeposit, useSmartRedeem, useSubmitActions, useUserPosition, useUserPositionMultiChain, useVaultAnalysis, useVaultAssetBreakdown, useVaultDistribution, useVaultMetadata, useVaultStatus, useVaultTopology, useVetoActions };
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { j as VaultStatus, h as VaultMetadata, g as UserPosition, e as MultiChainUserPosition, b as AsyncRequestStatusInfo, l as VaultTopology, V as VaultDistribution, d as InboundRouteWithBalance } from '../spokeRoutes-BIafSbQ3.js';
2
+ import { z as VaultStatus, x as VaultMetadata, v as UserPosition, r as MultiChainUserPosition, l as AsyncRequestStatusInfo, F as VaultTopology, w as VaultDistribution, q as InboundRouteWithBalance, a as CuratorVaultStatus, b as VaultAnalysis, c as VaultAssetBreakdown, P as PendingAction, e as SubmitActionsResult, d as CuratorAction } from '../spokeRoutes-B8Lnk-t4.js';
3
3
  import * as _tanstack_query_core from '@tanstack/query-core';
4
4
  import { Address } from 'viem';
5
5
 
@@ -536,4 +536,113 @@ declare function getRouteTokenDecimals(symbol: string): number;
536
536
  */
537
537
  declare function useInboundRoutes(hubChainId: number | undefined, vault: Address | undefined, vaultAsset: Address | undefined, userAddress: Address | undefined): UseInboundRoutesReturn;
538
538
 
539
- export { AsyncRequestStatusInfo, MultiChainUserPosition, UserPosition, VaultMetadata, VaultStatus, VaultTopology, getRouteTokenDecimals, useAsyncRequestStatus, useDepositSimple, useInboundRoutes, useLzFee, useOmniDeposit, useOmniRedeem, useRedeemShares, useSmartDeposit, useSmartRedeem, useUserPosition, useUserPositionMultiChain, useVaultDistribution, useVaultMetadata, useVaultStatus, useVaultTopology };
539
+ interface UseCuratorVaultStatusOptions {
540
+ /** Refetch interval in ms. Default: 30_000 (30s) */
541
+ refetchInterval?: number;
542
+ }
543
+ /**
544
+ * Read the curator vault status snapshot.
545
+ *
546
+ * @example
547
+ * const { data: status, isLoading } = useCuratorVaultStatus('0xVAULT', 747)
548
+ */
549
+ declare function useCuratorVaultStatus(vault: `0x${string}` | undefined, chainId: number, options?: UseCuratorVaultStatusOptions): _tanstack_react_query.UseQueryResult<CuratorVaultStatus, Error>;
550
+
551
+ interface UseVaultAnalysisOptions {
552
+ /** Refetch interval in ms. Default: 30_000 (30s) */
553
+ refetchInterval?: number;
554
+ }
555
+ /**
556
+ * Read a detailed analysis of a vault.
557
+ *
558
+ * @example
559
+ * const { data: analysis, isLoading } = useVaultAnalysis('0xVAULT', 747)
560
+ */
561
+ declare function useVaultAnalysis(vault: `0x${string}` | undefined, chainId: number, options?: UseVaultAnalysisOptions): _tanstack_react_query.UseQueryResult<VaultAnalysis, Error>;
562
+
563
+ interface UseVaultAssetBreakdownOptions {
564
+ /** Refetch interval in ms. Default: 30_000 (30s) */
565
+ refetchInterval?: number;
566
+ }
567
+ /**
568
+ * Read the asset breakdown of a vault.
569
+ *
570
+ * @example
571
+ * const { data: breakdown, isLoading } = useVaultAssetBreakdown('0xVAULT', 747)
572
+ */
573
+ declare function useVaultAssetBreakdown(vault: `0x${string}` | undefined, chainId: number, options?: UseVaultAssetBreakdownOptions): _tanstack_react_query.UseQueryResult<VaultAssetBreakdown, Error>;
574
+
575
+ interface UsePendingActionsOptions {
576
+ /** Refetch interval in ms. Default: 30_000 (30s) */
577
+ refetchInterval?: number;
578
+ }
579
+ /**
580
+ * Read pending curator actions for a vault by nonce.
581
+ *
582
+ * @example
583
+ * const { data: pending, isLoading } = usePendingActions('0xVAULT', 747, 1n)
584
+ */
585
+ declare function usePendingActions(vault: `0x${string}` | undefined, chainId: number, nonce: bigint | undefined, options?: UsePendingActionsOptions): _tanstack_react_query.UseQueryResult<PendingAction, Error>;
586
+
587
+ interface UseIsCuratorOptions {
588
+ /** Refetch interval in ms. Default: 30_000 (30s) */
589
+ refetchInterval?: number;
590
+ }
591
+ /**
592
+ * Check whether an address is a curator of a vault.
593
+ *
594
+ * @example
595
+ * const { data: curator, isLoading } = useIsCurator('0xVAULT', 747, '0xADDR')
596
+ */
597
+ declare function useIsCurator(vault: `0x${string}` | undefined, chainId: number, address: `0x${string}` | undefined, options?: UseIsCuratorOptions): _tanstack_react_query.UseQueryResult<boolean, Error>;
598
+
599
+ interface UseProtocolWhitelistOptions {
600
+ /** Refetch interval in ms. Default: 30_000 (30s) */
601
+ refetchInterval?: number;
602
+ }
603
+ /**
604
+ * Check which protocols are whitelisted for a vault.
605
+ *
606
+ * @example
607
+ * const { data: whitelist, isLoading } = useProtocolWhitelist('0xVAULT', 747, ['0xPROTOCOL'])
608
+ */
609
+ declare function useProtocolWhitelist(vault: `0x${string}` | undefined, chainId: number, protocols: `0x${string}`[], options?: UseProtocolWhitelistOptions): _tanstack_react_query.UseQueryResult<Record<string, boolean>, Error>;
610
+
611
+ /**
612
+ * Submit a batch of curator actions to the vault.
613
+ *
614
+ * @example
615
+ * const { mutateAsync } = useSubmitActions('0xVAULT', 747)
616
+ * await mutateAsync({ actions: [{ type: 'erc4626Deposit', vault: '0x...', assets: 100n }] })
617
+ */
618
+ declare function useSubmitActions(vault: `0x${string}`, chainId: number): _tanstack_react_query.UseMutationResult<SubmitActionsResult, Error, {
619
+ actions: CuratorAction[];
620
+ }, unknown>;
621
+
622
+ /**
623
+ * Execute a pending curator action batch by nonce.
624
+ *
625
+ * @example
626
+ * const { mutateAsync } = useExecuteActions('0xVAULT', 747)
627
+ * await mutateAsync({ nonce: 1n })
628
+ */
629
+ declare function useExecuteActions(vault: `0x${string}`, chainId: number): _tanstack_react_query.UseMutationResult<{
630
+ txHash: `0x${string}`;
631
+ }, Error, {
632
+ nonce: bigint;
633
+ }, unknown>;
634
+
635
+ /**
636
+ * Guardian-only: cancel (veto) one or more pending curator action batches.
637
+ *
638
+ * @example
639
+ * const { mutateAsync } = useVetoActions('0xVAULT', 747)
640
+ * await mutateAsync({ nonces: [1n, 2n] })
641
+ */
642
+ declare function useVetoActions(vault: `0x${string}`, chainId: number): _tanstack_react_query.UseMutationResult<{
643
+ txHash: `0x${string}`;
644
+ }, Error, {
645
+ nonces: bigint[];
646
+ }, unknown>;
647
+
648
+ export { AsyncRequestStatusInfo, CuratorAction, CuratorVaultStatus, MultiChainUserPosition, PendingAction, UserPosition, VaultAnalysis, VaultAssetBreakdown, VaultMetadata, VaultStatus, VaultTopology, getRouteTokenDecimals, useAsyncRequestStatus, useCuratorVaultStatus, useDepositSimple, useExecuteActions, useInboundRoutes, useIsCurator, useLzFee, useOmniDeposit, useOmniRedeem, usePendingActions, useProtocolWhitelist, useRedeemShares, useSmartDeposit, useSmartRedeem, useSubmitActions, useUserPosition, useUserPositionMultiChain, useVaultAnalysis, useVaultAssetBreakdown, useVaultDistribution, useVaultMetadata, useVaultStatus, useVaultTopology, useVetoActions };