@vechain/vechain-kit 2.0.0-rc.2 → 2.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PTWGTINW.cjs → chunk-LMX37RCG.cjs} +3 -3
- package/dist/chunk-LMX37RCG.cjs.map +1 -0
- package/dist/{chunk-R722OBPE.js → chunk-SNDIAFF7.js} +3 -3
- package/dist/chunk-SNDIAFF7.js.map +1 -0
- package/dist/index.cjs +751 -1642
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +196 -1314
- package/dist/index.d.ts +196 -1314
- package/dist/index.js +595 -1439
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/{thorUtils-BOhp47ZG.d.cts → thorUtils-BlZ9nLeD.d.cts} +1 -1
- package/dist/{thorUtils-BOhp47ZG.d.ts → thorUtils-BlZ9nLeD.d.ts} +1 -1
- package/dist/utils/index.cjs +52 -52
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-PTWGTINW.cjs.map +0 -1
- package/dist/chunk-R722OBPE.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ReactNode, ReactElement, ElementType } from 'react';
|
|
4
|
-
import { P as PrivyLoginMethod, N as NETWORK_TYPE, C as CURRENCY, a as Network, b as PrivyAppInfo, W as Wallet, S as SmartAccount, c as ConnectionSource, E as ENSRecords, d as NFTMediaType,
|
|
5
|
-
export { l as CURRENCY_SYMBOLS, j as EnhancedClause, i as ExecuteBatchWithAuthorizationSignData, h as ExecuteWithAuthorizationSignData, M as MultipleClausesCallParameters, m as MultipleClausesCallReturnType, k as VePassportUserStatus, p as buildCallClauses, n as executeCallClause, o as executeMultipleClausesCall } from './thorUtils-
|
|
4
|
+
import { P as PrivyLoginMethod, N as NETWORK_TYPE, C as CURRENCY, a as Network, b as PrivyAppInfo, T as TokenBalance, W as Wallet, S as SmartAccount, c as ConnectionSource, E as ENSRecords, d as NFTMediaType, e as TransactionStatus, f as TransactionStatusErrorType, V as ViewFunctionResult, g as CrossAppConnectionCache } from './thorUtils-BlZ9nLeD.cjs';
|
|
5
|
+
export { l as CURRENCY_SYMBOLS, j as EnhancedClause, i as ExecuteBatchWithAuthorizationSignData, h as ExecuteWithAuthorizationSignData, M as MultipleClausesCallParameters, m as MultipleClausesCallReturnType, k as VePassportUserStatus, p as buildCallClauses, n as executeCallClause, o as executeMultipleClausesCall } from './thorUtils-BlZ9nLeD.cjs';
|
|
6
6
|
import { WalletListEntry, SignTypedDataParams, User } from '@privy-io/react-auth';
|
|
7
7
|
export { useMfaEnrollment, usePrivy, useSetWalletRecovery } from '@privy-io/react-auth';
|
|
8
8
|
import { WalletSource, LogLevel } from '@vechain/dapp-kit';
|
|
@@ -11,7 +11,7 @@ export { WalletButton as DAppKitWalletButton, useWallet as useDAppKitWallet, use
|
|
|
11
11
|
import { CustomizedStyle, SourceInfo, I18n } from '@vechain/dapp-kit-ui';
|
|
12
12
|
import { Certificate, CertificateData, TransactionClause } from '@vechain/sdk-core';
|
|
13
13
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
14
|
-
import { UseQueryOptions
|
|
14
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
15
15
|
import * as _vechain_sdk_network from '@vechain/sdk-network';
|
|
16
16
|
import { ThorClient, TransactionReceipt, FilterEventLogsOptions, EventLogs } from '@vechain/sdk-network';
|
|
17
17
|
export { ThorClient } from '@vechain/sdk-network';
|
|
@@ -20,7 +20,6 @@ import { Options } from 'browser-image-compression';
|
|
|
20
20
|
import { ButtonProps, StackProps, IconButtonProps, PropsOf, VStack, ImageProps, CardProps, CardBodyProps, CardFooterProps, ThemeTypings } from '@chakra-ui/react';
|
|
21
21
|
import { ExtractAbiFunctionNames, AbiParametersToPrimitiveTypes } from 'abitype';
|
|
22
22
|
import { Abi } from 'viem';
|
|
23
|
-
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
24
23
|
import { IconType } from 'react-icons';
|
|
25
24
|
import { UseFormRegister } from 'react-hook-form';
|
|
26
25
|
|
|
@@ -466,10 +465,7 @@ type WalletTokenBalance = {
|
|
|
466
465
|
symbol: string;
|
|
467
466
|
balance: string;
|
|
468
467
|
};
|
|
469
|
-
|
|
470
|
-
address?: string;
|
|
471
|
-
};
|
|
472
|
-
declare const useTokenBalances: ({ address }: UseTokenBalancesProps) => {
|
|
468
|
+
declare const useTokenBalances: (address?: string) => {
|
|
473
469
|
balances: WalletTokenBalance[];
|
|
474
470
|
isLoading: boolean;
|
|
475
471
|
};
|
|
@@ -533,6 +529,27 @@ declare const useTotalBalance: ({ address }: UseTotalBalanceProps) => {
|
|
|
533
529
|
hasAnyBalance: boolean;
|
|
534
530
|
};
|
|
535
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Returns the query key for fetching the current allocations round ID.
|
|
534
|
+
* @returns The query key for fetching the current allocations round ID.
|
|
535
|
+
*/
|
|
536
|
+
declare const getCurrentAllocationsRoundIdQueryKey: (address: string) => string[];
|
|
537
|
+
/**
|
|
538
|
+
* Hook to get the current roundId of allocations voting
|
|
539
|
+
* @returns the current roundId of allocations voting
|
|
540
|
+
*/
|
|
541
|
+
declare const useCurrentAllocationsRoundId: () => _tanstack_react_query.UseQueryResult<string, unknown>;
|
|
542
|
+
|
|
543
|
+
type CustomTokenInfo = {
|
|
544
|
+
name: string;
|
|
545
|
+
address: string;
|
|
546
|
+
decimals: string;
|
|
547
|
+
symbol: string;
|
|
548
|
+
};
|
|
549
|
+
declare const getTokenInfo: (thor: ThorClient, tokenAddress: string) => Promise<CustomTokenInfo>;
|
|
550
|
+
declare const getCustomTokenInfo: (tokenAddress: string) => string[];
|
|
551
|
+
declare const useGetCustomTokenInfo: (tokenAddress: string) => _tanstack_react_query.UseQueryResult<CustomTokenInfo, Error>;
|
|
552
|
+
|
|
536
553
|
declare const useCustomTokens: () => {
|
|
537
554
|
customTokens: CustomTokenInfo[];
|
|
538
555
|
addToken: (address: CustomTokenInfo["address"]) => Promise<void>;
|
|
@@ -541,6 +558,93 @@ declare const useCustomTokens: () => {
|
|
|
541
558
|
isDefaultToken: (address: string) => boolean;
|
|
542
559
|
};
|
|
543
560
|
|
|
561
|
+
/**
|
|
562
|
+
* Get the b3tr balance of an address from the contract
|
|
563
|
+
* @param thor The thor instance
|
|
564
|
+
* @param network The network type
|
|
565
|
+
* @param address The address to get the balance of. If not provided, will return an error (for better react-query DX)
|
|
566
|
+
* @returns Balance of the token in the form of {@link TokenBalance} (original, scaled down and formatted)
|
|
567
|
+
*/
|
|
568
|
+
declare const getB3trBalance: (thor: ThorClient, network: NETWORK_TYPE, address?: string) => Promise<TokenBalance>;
|
|
569
|
+
declare const getB3trBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
570
|
+
declare const useGetB3trBalance: (address?: string) => _tanstack_react_query.UseQueryResult<TokenBalance, Error>;
|
|
571
|
+
|
|
572
|
+
type TokenWithBalance = CustomTokenInfo & TokenBalance;
|
|
573
|
+
/**
|
|
574
|
+
* Get the b3tr balance of an address from the contract
|
|
575
|
+
* @param thor The thor instance
|
|
576
|
+
* @param network The network type
|
|
577
|
+
* @param address The address to get the balance of. If not provided, will return an error (for better react-query DX)
|
|
578
|
+
* @returns Balance of the token in the form of {@link TokenBalance} (original, scaled down and formatted)
|
|
579
|
+
*/
|
|
580
|
+
declare const getCustomTokenBalance: (thor: ThorClient, token: CustomTokenInfo, address?: string) => Promise<TokenWithBalance>;
|
|
581
|
+
declare const getCustomTokenBalanceQueryKey: (tokenAddress?: string, address?: string) => (string | undefined)[];
|
|
582
|
+
declare const useGetCustomTokenBalances: (address?: string) => _tanstack_react_query.UseQueryResult<TokenWithBalance, Error>[];
|
|
583
|
+
|
|
584
|
+
declare const getErc20Balance: (thor: ThorClient, tokenAddress: string, address?: string) => Promise<{
|
|
585
|
+
original: string;
|
|
586
|
+
scaled: string;
|
|
587
|
+
formatted: string;
|
|
588
|
+
}>;
|
|
589
|
+
declare const getErc20BalanceQueryKey: (tokenAddress: string, address?: string) => (string | undefined)[];
|
|
590
|
+
declare const useGetErc20Balance: (tokenAddress: string, address?: string) => _tanstack_react_query.UseQueryResult<{
|
|
591
|
+
original: string;
|
|
592
|
+
scaled: string;
|
|
593
|
+
formatted: string;
|
|
594
|
+
}, Error>;
|
|
595
|
+
|
|
596
|
+
declare const PRICE_FEED_IDS: {
|
|
597
|
+
readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
|
|
598
|
+
readonly VET: "0x7665742d75736400000000000000000000000000000000000000000000000000";
|
|
599
|
+
readonly VTHO: "0x7674686f2d757364000000000000000000000000000000000000000000000000";
|
|
600
|
+
readonly GBP: "0x6762702d75736400000000000000000000000000000000000000000000000000";
|
|
601
|
+
readonly EUR: "0x657572742d757364000000000000000000000000000000000000000000000000";
|
|
602
|
+
};
|
|
603
|
+
type SupportedToken = keyof typeof PRICE_FEED_IDS;
|
|
604
|
+
declare const getTokenUsdPrice: (thor: ThorClient, token: SupportedToken, network: NETWORK_TYPE) => Promise<number>;
|
|
605
|
+
declare const getTokenUsdPriceQueryKey: (token: SupportedToken) => string[];
|
|
606
|
+
declare const useGetTokenUsdPrice: (token: SupportedToken) => _tanstack_react_query.UseQueryResult<number, Error>;
|
|
607
|
+
|
|
608
|
+
declare const getVot3Balance: (thor: ThorClient, network: NETWORK_TYPE, address?: string) => Promise<TokenBalance>;
|
|
609
|
+
declare const getVot3BalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
610
|
+
declare const useGetVot3Balance: (address?: string) => _tanstack_react_query.UseQueryResult<TokenBalance, Error>;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Returns the query key for fetching the isPerson status.
|
|
614
|
+
* @param user - The user address.
|
|
615
|
+
* @returns The query key for fetching the isPerson status.
|
|
616
|
+
*/
|
|
617
|
+
declare const getIsPersonQueryKey: (user: string, network: NETWORK_TYPE) => (string | unknown[])[];
|
|
618
|
+
/**
|
|
619
|
+
* Hook to get the isPerson status from the VeBetterPassport contract.
|
|
620
|
+
* @param user - The user address.
|
|
621
|
+
* @returns The isPerson status.
|
|
622
|
+
*/
|
|
623
|
+
declare const useIsPerson: (user?: string | null) => _tanstack_react_query.UseQueryResult<boolean, unknown>;
|
|
624
|
+
|
|
625
|
+
type XApp = {
|
|
626
|
+
id: string;
|
|
627
|
+
teamWalletAddress: string;
|
|
628
|
+
name: string;
|
|
629
|
+
metadataURI: string;
|
|
630
|
+
createdAtTimestamp: string;
|
|
631
|
+
};
|
|
632
|
+
type MostVotedAppsInRoundReturnType = {
|
|
633
|
+
percentage: number;
|
|
634
|
+
id: string;
|
|
635
|
+
app: XApp;
|
|
636
|
+
};
|
|
637
|
+
/**
|
|
638
|
+
* Get the most voted apps in a round
|
|
639
|
+
*
|
|
640
|
+
* @param roundId the id of the round to get the most voted apps
|
|
641
|
+
* @returns a sorted array of the most voted apps in the round
|
|
642
|
+
*/
|
|
643
|
+
declare const useMostVotedAppsInRound: (roundId?: string) => {
|
|
644
|
+
data: MostVotedAppsInRoundReturnType[];
|
|
645
|
+
isLoading: boolean;
|
|
646
|
+
};
|
|
647
|
+
|
|
544
648
|
declare const useRefreshBalances: () => {
|
|
545
649
|
refresh: () => Promise<void>;
|
|
546
650
|
};
|
|
@@ -549,36 +653,14 @@ declare const useRefreshMetadata: (domain: string, address: string) => {
|
|
|
549
653
|
refresh: () => Promise<void>;
|
|
550
654
|
};
|
|
551
655
|
|
|
552
|
-
declare const
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
address: string;
|
|
561
|
-
symbol: string;
|
|
562
|
-
balance: bigint;
|
|
563
|
-
})[], Error> | _tanstack_react_query.UseQueryResult<{
|
|
564
|
-
address: string;
|
|
565
|
-
symbol: string;
|
|
566
|
-
balance: string;
|
|
567
|
-
}[], Error>)[];
|
|
568
|
-
loading: boolean;
|
|
569
|
-
error: Error | null;
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
declare const useTokenPrices2: () => _tanstack_react_query.UseQueryResult<{
|
|
573
|
-
prices: {
|
|
574
|
-
[x: string]: number;
|
|
575
|
-
'0x': number;
|
|
576
|
-
};
|
|
577
|
-
exchangeRates: {
|
|
578
|
-
eurUsdPrice: number;
|
|
579
|
-
gbpUsdPrice: number;
|
|
580
|
-
};
|
|
581
|
-
}, Error>;
|
|
656
|
+
declare const getRoundXAppsQueryKey: (roundId: string, networkType: NETWORK_TYPE) => (string | unknown[])[];
|
|
657
|
+
declare const useRoundXApps: (roundId?: string) => _tanstack_react_query.UseQueryResult<{
|
|
658
|
+
id: string;
|
|
659
|
+
teamWalletAddress: `0x${string}`;
|
|
660
|
+
name: string;
|
|
661
|
+
metadataURI: string;
|
|
662
|
+
createdAtTimestamp: string;
|
|
663
|
+
}[], unknown>;
|
|
582
664
|
|
|
583
665
|
type UseWalletReturnType = {
|
|
584
666
|
account: Wallet;
|
|
@@ -611,6 +693,67 @@ declare const useWalletMetadata: (address: string, networkType: NETWORK_TYPE) =>
|
|
|
611
693
|
isLoading: boolean;
|
|
612
694
|
};
|
|
613
695
|
|
|
696
|
+
/**
|
|
697
|
+
* The metadata of an xApp from the xApps metadata base uri
|
|
698
|
+
* @property name - The name of the xApp
|
|
699
|
+
* @property description - The description of the xApp
|
|
700
|
+
* @property distribution_strategy - The B3TR distribution strategy of the xApp
|
|
701
|
+
* @property external_url - The external url of the xApp
|
|
702
|
+
* @property logo - The logo of the xApp (ipfs uri)
|
|
703
|
+
* @property banner - The banner of the xApp (ipfs uri)
|
|
704
|
+
* @property screenshots - The screenshots of the xApp (ipfs uri)
|
|
705
|
+
* @property social_urls - The social urls of the xApp
|
|
706
|
+
* @property app_urls - The app urls of the xApp
|
|
707
|
+
* @property categories - The categories of the xApp
|
|
708
|
+
*/
|
|
709
|
+
type XAppMetadata = {
|
|
710
|
+
name: string;
|
|
711
|
+
description: string;
|
|
712
|
+
distribution_strategy?: string;
|
|
713
|
+
external_url: string;
|
|
714
|
+
logo: string;
|
|
715
|
+
banner: string;
|
|
716
|
+
screenshots: string[];
|
|
717
|
+
social_urls: {
|
|
718
|
+
name: string;
|
|
719
|
+
url: string;
|
|
720
|
+
}[];
|
|
721
|
+
app_urls: {
|
|
722
|
+
code: string;
|
|
723
|
+
url: string;
|
|
724
|
+
}[];
|
|
725
|
+
tweets: string[];
|
|
726
|
+
ve_world: {
|
|
727
|
+
banner: string;
|
|
728
|
+
};
|
|
729
|
+
categories: string[];
|
|
730
|
+
};
|
|
731
|
+
/**
|
|
732
|
+
dapp-kit broke the pre-fetching
|
|
733
|
+
* @param uri - The uri of the xApps metadata
|
|
734
|
+
* @returns The metadata of the xApp see {@link XAppMetadata}
|
|
735
|
+
*/
|
|
736
|
+
declare const getXAppMetadata: (uri: string, networkType: NETWORK_TYPE) => Promise<XAppMetadata | undefined>;
|
|
737
|
+
declare const useXAppMetadata: (xAppId: string) => _tanstack_react_query.UseQueryResult<XAppMetadata | undefined, Error>;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Returns the query key for the shares of multiple xApps in an allocation round.
|
|
741
|
+
* @param roundId the roundId the get the shares for
|
|
742
|
+
*/
|
|
743
|
+
declare const getXAppsSharesQueryKey: (roundId?: number | string) => (string | number | undefined)[];
|
|
744
|
+
/**
|
|
745
|
+
* Fetch shares of multiple xApps in an allocation round
|
|
746
|
+
* @param apps the xApps to get the shares for
|
|
747
|
+
* @param roundId the round id to get the shares for
|
|
748
|
+
* @returns the shares (% of allocation pool) for the xApps in the round { allocated: number, unallocated: number }
|
|
749
|
+
*
|
|
750
|
+
*/
|
|
751
|
+
declare const useXAppsShares: (apps: string[], roundId?: string) => _tanstack_react_query.UseQueryResult<{
|
|
752
|
+
app: string;
|
|
753
|
+
share: number;
|
|
754
|
+
unallocatedShare: number;
|
|
755
|
+
}[], Error>;
|
|
756
|
+
|
|
614
757
|
/**
|
|
615
758
|
* Fetches metadata from IPFS for a given URI
|
|
616
759
|
*
|
|
@@ -1016,8 +1159,9 @@ type SendTokenSummaryContentProps = {
|
|
|
1016
1159
|
resolvedAddress?: string;
|
|
1017
1160
|
amount: string;
|
|
1018
1161
|
selectedToken: TokenWithValue;
|
|
1162
|
+
formattedTotalAmount: string;
|
|
1019
1163
|
};
|
|
1020
|
-
declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, }: SendTokenSummaryContentProps) => react_jsx_runtime.JSX.Element;
|
|
1164
|
+
declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, formattedTotalAmount, }: SendTokenSummaryContentProps) => react_jsx_runtime.JSX.Element;
|
|
1021
1165
|
|
|
1022
1166
|
type Props$l = {
|
|
1023
1167
|
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
@@ -1624,17 +1768,23 @@ type ExtractViewFunction<TAbi extends Abi, TMethod extends ExtractAbiFunctionNam
|
|
|
1624
1768
|
stateMutability: 'pure' | 'view';
|
|
1625
1769
|
name: TMethod;
|
|
1626
1770
|
}>;
|
|
1627
|
-
declare const getCallClauseQueryKey: <TAbi extends Abi
|
|
1771
|
+
declare const getCallClauseQueryKey: <TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, "pure" | "view">>({ abi, address, method, }: {
|
|
1772
|
+
abi: TAbi;
|
|
1773
|
+
address: string;
|
|
1774
|
+
method: TMethod;
|
|
1775
|
+
}) => string[];
|
|
1776
|
+
declare const getCallClauseQueryKeyWithArgs: <TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, "pure" | "view">>({ abi, address, method, args, }: {
|
|
1777
|
+
abi: TAbi;
|
|
1628
1778
|
address: string;
|
|
1629
|
-
method:
|
|
1630
|
-
args?: AbiParametersToPrimitiveTypes<ExtractViewFunction<TAbi,
|
|
1631
|
-
}) => (string |
|
|
1779
|
+
method: TMethod;
|
|
1780
|
+
args?: AbiParametersToPrimitiveTypes<ExtractViewFunction<TAbi, TMethod>["inputs"], "inputs">;
|
|
1781
|
+
}) => (string | unknown[])[];
|
|
1632
1782
|
declare const useCallClause: <TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, "pure" | "view">, TData = ViewFunctionResult<TAbi, TMethod>>({ address, abi, method, args, queryOptions, }: {
|
|
1633
1783
|
address: string;
|
|
1634
1784
|
abi: TAbi;
|
|
1635
1785
|
method: TMethod;
|
|
1636
1786
|
args: AbiParametersToPrimitiveTypes<ExtractViewFunction<TAbi, TMethod>["inputs"], "inputs">;
|
|
1637
|
-
queryOptions?: Omit<UseQueryOptions<ViewFunctionResult<TAbi, TMethod>, unknown, TData, ReturnType<typeof
|
|
1787
|
+
queryOptions?: Omit<UseQueryOptions<ViewFunctionResult<TAbi, TMethod>, unknown, TData, ReturnType<typeof getCallClauseQueryKeyWithArgs<TAbi, TMethod>>>, "queryKey" | "queryFn">;
|
|
1638
1788
|
}) => _tanstack_react_query.UseQueryResult<_tanstack_react_query.NoInfer<TData>, unknown>;
|
|
1639
1789
|
|
|
1640
1790
|
/**
|
|
@@ -1733,7 +1883,7 @@ declare const getAccountAddressQueryKey: (ownerAddress?: string, networkType?: N
|
|
|
1733
1883
|
*/
|
|
1734
1884
|
declare const useGetAccountAddress: (ownerAddress?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
1735
1885
|
|
|
1736
|
-
declare const getAccountVersionQueryKey: (accountAddress: string, ownerAddress: string, networkType: NETWORK_TYPE) => (string | unknown[]
|
|
1886
|
+
declare const getAccountVersionQueryKey: (accountAddress: string, ownerAddress: string, networkType: NETWORK_TYPE) => (string | unknown[])[];
|
|
1737
1887
|
/**
|
|
1738
1888
|
* Check if a smart account has a v1 smart account
|
|
1739
1889
|
* @param accountAddress - The address of the smart account
|
|
@@ -1854,1257 +2004,6 @@ declare const getChainIdQueryKey: () => string[];
|
|
|
1854
2004
|
*/
|
|
1855
2005
|
declare const useGetChainId: () => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
1856
2006
|
|
|
1857
|
-
/**
|
|
1858
|
-
* Get the b3tr balance of an address from the contract
|
|
1859
|
-
* @param thor The thor instance
|
|
1860
|
-
* @param network The network type
|
|
1861
|
-
* @param address The address to get the balance of. If not provided, will return an error (for better react-query DX)
|
|
1862
|
-
* @returns Balance of the token in the form of {@link TokenBalance} (original, scaled down and formatted)
|
|
1863
|
-
*/
|
|
1864
|
-
declare const getB3trBalance: (thor: ThorClient, network: NETWORK_TYPE, address?: string) => Promise<TokenBalance>;
|
|
1865
|
-
declare const getB3trBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1866
|
-
declare const useGetB3trBalance: (address?: string) => _tanstack_react_query.UseQueryResult<TokenBalance, Error>;
|
|
1867
|
-
|
|
1868
|
-
type TokenWithBalance = CustomTokenInfo & TokenBalance;
|
|
1869
|
-
/**
|
|
1870
|
-
* Get the b3tr balance of an address from the contract
|
|
1871
|
-
* @param thor The thor instance
|
|
1872
|
-
* @param network The network type
|
|
1873
|
-
* @param address The address to get the balance of. If not provided, will return an error (for better react-query DX)
|
|
1874
|
-
* @returns Balance of the token in the form of {@link TokenBalance} (original, scaled down and formatted)
|
|
1875
|
-
*/
|
|
1876
|
-
declare const getCustomTokenBalance: (thor: ThorClient, token: CustomTokenInfo, address?: string) => Promise<TokenWithBalance>;
|
|
1877
|
-
declare const getCustomTokenBalanceQueryKey: (tokenAddress?: string, address?: string) => (string | undefined)[];
|
|
1878
|
-
declare const useGetCustomTokenBalances: (address?: string) => _tanstack_react_query.UseQueryResult<TokenWithBalance, Error>[];
|
|
1879
|
-
|
|
1880
|
-
type CustomTokenInfo = {
|
|
1881
|
-
name: string;
|
|
1882
|
-
address: string;
|
|
1883
|
-
decimals: string;
|
|
1884
|
-
symbol: string;
|
|
1885
|
-
};
|
|
1886
|
-
declare const getTokenInfo: (thor: ThorClient, tokenAddress: string) => Promise<CustomTokenInfo>;
|
|
1887
|
-
declare const getCustomTokenInfo: (tokenAddress: string) => string[];
|
|
1888
|
-
declare const useGetCustomTokenInfo: (tokenAddress: string) => _tanstack_react_query.UseQueryResult<CustomTokenInfo, Error>;
|
|
1889
|
-
|
|
1890
|
-
declare const getErc20Balance: (thor: ThorClient, tokenAddress: string, address?: string) => Promise<{
|
|
1891
|
-
original: string;
|
|
1892
|
-
scaled: string;
|
|
1893
|
-
formatted: string;
|
|
1894
|
-
}>;
|
|
1895
|
-
declare const getErc20BalanceQueryKey: (tokenAddress: string, address?: string) => (string | undefined)[];
|
|
1896
|
-
declare const useGetErc20Balance: (tokenAddress: string, address?: string) => _tanstack_react_query.UseQueryResult<{
|
|
1897
|
-
original: string;
|
|
1898
|
-
scaled: string;
|
|
1899
|
-
formatted: string;
|
|
1900
|
-
}, Error>;
|
|
1901
|
-
|
|
1902
|
-
declare const getVeDelegateBalance: (thor: ThorClient, network: NETWORK_TYPE, address?: string) => Promise<{
|
|
1903
|
-
original: string;
|
|
1904
|
-
scaled: string;
|
|
1905
|
-
formatted: string;
|
|
1906
|
-
}>;
|
|
1907
|
-
declare const getVeDelegateBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1908
|
-
declare const useGetVeDelegateBalance: (address?: string) => _tanstack_react_query.UseQueryResult<{
|
|
1909
|
-
original: string;
|
|
1910
|
-
scaled: string;
|
|
1911
|
-
formatted: string;
|
|
1912
|
-
}, Error>;
|
|
1913
|
-
|
|
1914
|
-
/**
|
|
1915
|
-
* Generates a query key for the getTokensInfoByOwner query.
|
|
1916
|
-
* @param owner - The address of the token owner.
|
|
1917
|
-
* @param size - The number of tokens to fetch per page.
|
|
1918
|
-
* @returns An array representing the query key.
|
|
1919
|
-
*/
|
|
1920
|
-
declare const getTokensInfoByOwnerQueryKey: (owner?: string | null) => (string | null | undefined)[];
|
|
1921
|
-
/**
|
|
1922
|
-
* Custom hook to fetch token information for a specific owner with infinite scrolling support.
|
|
1923
|
-
* @param owner - The address of the token owner.
|
|
1924
|
-
* @param size - The number of tokens to fetch per page.
|
|
1925
|
-
* @returns An infinite query result containing the token information and pagination controls.
|
|
1926
|
-
*/
|
|
1927
|
-
declare const useGalaxyMemberTokensInfo: (owner: string | null, size?: number) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<{
|
|
1928
|
-
data: readonly [boolean] | readonly [string] | readonly [bigint] | readonly [`0x${string}`] | readonly [number] | readonly [{
|
|
1929
|
-
tokenId: bigint;
|
|
1930
|
-
tokenURI: string;
|
|
1931
|
-
tokenLevel: bigint;
|
|
1932
|
-
b3trToUpgrade: bigint;
|
|
1933
|
-
}] | readonly [{
|
|
1934
|
-
tokenId: bigint;
|
|
1935
|
-
tokenURI: string;
|
|
1936
|
-
tokenLevel: bigint;
|
|
1937
|
-
b3trToUpgrade: bigint;
|
|
1938
|
-
}] | readonly [readonly {
|
|
1939
|
-
tokenId: bigint;
|
|
1940
|
-
tokenURI: string;
|
|
1941
|
-
tokenLevel: bigint;
|
|
1942
|
-
b3trToUpgrade: bigint;
|
|
1943
|
-
}[]];
|
|
1944
|
-
nextPage: number;
|
|
1945
|
-
}, unknown>, Error>;
|
|
1946
|
-
|
|
1947
|
-
type UserNode = {
|
|
1948
|
-
nodeId: string;
|
|
1949
|
-
nodeLevel: number;
|
|
1950
|
-
xNodeOwner: string;
|
|
1951
|
-
isXNodeHolder: boolean;
|
|
1952
|
-
isXNodeDelegated: boolean;
|
|
1953
|
-
isXNodeDelegator: boolean;
|
|
1954
|
-
isXNodeDelegatee: boolean;
|
|
1955
|
-
delegatee: string;
|
|
1956
|
-
};
|
|
1957
|
-
/**
|
|
1958
|
-
* Get the query key for fetching user nodes
|
|
1959
|
-
* @param networkType the network type
|
|
1960
|
-
* @param user - The address of the user to check (non-optional)
|
|
1961
|
-
*/
|
|
1962
|
-
declare const getUserNodesQueryKey: (networkType: NETWORK_TYPE, user: string) => (string | unknown[] | undefined)[];
|
|
1963
|
-
/**
|
|
1964
|
-
* Hook to get delegation details for all nodes associated with a user
|
|
1965
|
-
* @param userInput - The address of the user to check
|
|
1966
|
-
* @returns An array of objects containing user node details
|
|
1967
|
-
*/
|
|
1968
|
-
declare const useGetUserNodes: (userInput?: string) => UseQueryResult<UserNode[], unknown>;
|
|
1969
|
-
declare const useGetUserNode: (userInput?: string) => UseQueryResult<UserNode[], unknown>;
|
|
1970
|
-
|
|
1971
|
-
declare const PRICE_FEED_IDS: {
|
|
1972
|
-
readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
|
|
1973
|
-
readonly VET: "0x7665742d75736400000000000000000000000000000000000000000000000000";
|
|
1974
|
-
readonly VTHO: "0x7674686f2d757364000000000000000000000000000000000000000000000000";
|
|
1975
|
-
readonly GBP: "0x6762702d75736400000000000000000000000000000000000000000000000000";
|
|
1976
|
-
readonly EUR: "0x657572742d757364000000000000000000000000000000000000000000000000";
|
|
1977
|
-
};
|
|
1978
|
-
type SupportedToken = keyof typeof PRICE_FEED_IDS;
|
|
1979
|
-
declare const getTokenUsdPrice: (thor: ThorClient, token: SupportedToken, network: NETWORK_TYPE) => Promise<number>;
|
|
1980
|
-
declare const getTokenUsdPriceQueryKey: (token: SupportedToken) => string[];
|
|
1981
|
-
declare const useGetTokenUsdPrice: (token: SupportedToken) => _tanstack_react_query.UseQueryResult<number, Error>;
|
|
1982
|
-
|
|
1983
|
-
declare const getVot3Balance: (thor: ThorClient, network: NETWORK_TYPE, address?: string) => Promise<TokenBalance>;
|
|
1984
|
-
declare const getVot3BalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1985
|
-
declare const useGetVot3Balance: (address?: string) => _tanstack_react_query.UseQueryResult<TokenBalance, Error>;
|
|
1986
|
-
|
|
1987
|
-
/**
|
|
1988
|
-
* Returns the query key for fetching the isPerson status.
|
|
1989
|
-
* @param networkType - The network type.
|
|
1990
|
-
* @param user - The user address.
|
|
1991
|
-
* @returns The query key for fetching the isPerson status.
|
|
1992
|
-
*/
|
|
1993
|
-
declare const getIsPersonQueryKey: (networkType: NETWORK_TYPE, user: string) => (string | unknown[] | undefined)[];
|
|
1994
|
-
/**
|
|
1995
|
-
* Hook to get the isPerson status from the VeBetterPassport contract.
|
|
1996
|
-
* @param user - The user address.
|
|
1997
|
-
* @param customEnabled - Flag to enable or disable the hook. Default is true.
|
|
1998
|
-
* @returns The isPerson status (boolean).
|
|
1999
|
-
*/
|
|
2000
|
-
declare const useIsPerson: (user?: string, customEnabled?: boolean) => _tanstack_react_query.UseQueryResult<boolean, unknown>;
|
|
2001
|
-
/**
|
|
2002
|
-
* Hook to get the isPerson status from the VeBetterPassport contract for the current user.
|
|
2003
|
-
* @param address - The address of the account.
|
|
2004
|
-
* @returns The isPerson status.
|
|
2005
|
-
*/
|
|
2006
|
-
declare const useIsUserPerson: (address?: string) => _tanstack_react_query.UseQueryResult<boolean, unknown>;
|
|
2007
|
-
|
|
2008
|
-
/**
|
|
2009
|
-
* Returns the query key for fetching the isPerson status at a given block number.
|
|
2010
|
-
* @param networkType - The network type.
|
|
2011
|
-
* @param user - The user address.
|
|
2012
|
-
* @param timepoint - The block number (as a string or number).
|
|
2013
|
-
* @returns The query key for fetching the isPerson status at a given block number.
|
|
2014
|
-
*/
|
|
2015
|
-
declare const getIsPersonAtTimepointQueryKey: (networkType: NETWORK_TYPE, user: string, timepoint: string) => (string | unknown[] | undefined)[];
|
|
2016
|
-
/**
|
|
2017
|
-
* Hook to get the isPerson status from the VeBetterPassport contract at a specific timepoint.
|
|
2018
|
-
* @param user - The user address.
|
|
2019
|
-
* @param timepoint - The block number (as a string or number).
|
|
2020
|
-
* @param customEnabled - Flag to enable or disable the hook. Default is true.
|
|
2021
|
-
* @returns The isPerson status (boolean) at a given block number.
|
|
2022
|
-
*/
|
|
2023
|
-
declare const useIsPersonAtTimepoint: (user?: string, timepoint?: string, customEnabled?: boolean) => _tanstack_react_query.UseQueryResult<boolean, unknown>;
|
|
2024
|
-
|
|
2025
|
-
/**
|
|
2026
|
-
* Returns the query key for fetching the user bot signals.
|
|
2027
|
-
* @param networkType The network type.
|
|
2028
|
-
* @param userAddress - The user address.
|
|
2029
|
-
* @returns The query key for fetching the user bot signals.
|
|
2030
|
-
*/
|
|
2031
|
-
declare const getUserBotSignalsQueryKey: (networkType: NETWORK_TYPE, userAddress: string) => (string | unknown[] | undefined)[];
|
|
2032
|
-
/**
|
|
2033
|
-
* Hook to get the user bot signals (signaledCounter) from the VeBetterPassport contract.
|
|
2034
|
-
* @param userAddressInput - The user address.
|
|
2035
|
-
* @returns The user bot signals
|
|
2036
|
-
*/
|
|
2037
|
-
declare const useUserBotSignals: (userAddressInput?: string) => _tanstack_react_query.UseQueryResult<number, unknown>;
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* useVotingRewards is a custom hook that fetches the voting rewards for a given round and voter.
|
|
2041
|
-
* It uses the mutli-clause reading to fetch the data in parallel for all rounds up to the current one.
|
|
2042
|
-
*
|
|
2043
|
-
* @param {string} currentRoundId - The id of the current round. If not provided, no queries will be made.
|
|
2044
|
-
* @param {string} voter - The address of the voter. If not provided, the rewards for all voters will be fetched.
|
|
2045
|
-
* @returns {object} An object containing the status and data of the queries. Refer to the react-query documentation for more details.
|
|
2046
|
-
*/
|
|
2047
|
-
declare const useVotingRewards: (currentRoundId?: string, voter?: string) => _tanstack_react_query.UseQueryResult<{
|
|
2048
|
-
total: string;
|
|
2049
|
-
totalFormatted: string;
|
|
2050
|
-
roundsRewards: {
|
|
2051
|
-
roundId: string;
|
|
2052
|
-
rewards: bigint;
|
|
2053
|
-
formattedRewards: string;
|
|
2054
|
-
}[];
|
|
2055
|
-
}, Error>;
|
|
2056
|
-
|
|
2057
|
-
/**
|
|
2058
|
-
* Generates a query key for the getRoundReward query.
|
|
2059
|
-
*
|
|
2060
|
-
* @param {string} roundId - The id of the round.
|
|
2061
|
-
* @param {string} address - The address of the voter.
|
|
2062
|
-
* @returns {Array<string>} An array of strings that forms the query key.
|
|
2063
|
-
*/
|
|
2064
|
-
declare const getRoundRewardQueryKey: (roundId?: string, address?: string) => (string | undefined)[];
|
|
2065
|
-
/**
|
|
2066
|
-
* useRoundReward is a custom hook that fetches the reward for a given round and voter.
|
|
2067
|
-
*
|
|
2068
|
-
* @param {string} address - The address of the voter.
|
|
2069
|
-
* @param {string} roundId - The id of the round.
|
|
2070
|
-
* @returns {object} An object containing the status and data of the query. Refer to the react-query documentation for more details.
|
|
2071
|
-
*/
|
|
2072
|
-
declare const useRoundReward: (address: string, roundId: string) => _tanstack_react_query.UseQueryResult<{
|
|
2073
|
-
roundId: string;
|
|
2074
|
-
rewards: string;
|
|
2075
|
-
}, unknown>;
|
|
2076
|
-
|
|
2077
|
-
/**
|
|
2078
|
-
* The metadata of an xApp from the xApps metadata base uri
|
|
2079
|
-
* @property name - The name of the xApp
|
|
2080
|
-
* @property description - The description of the xApp
|
|
2081
|
-
* @property external_url - The external url of the xApp
|
|
2082
|
-
* @property logo - The logo of the xApp (ipfs uri)
|
|
2083
|
-
* @property banner - The banner of the xApp (ipfs uri)
|
|
2084
|
-
* @property screenshots - The screenshots of the xApp (ipfs uri)
|
|
2085
|
-
* @property social_urls - The social urls of the xApp
|
|
2086
|
-
* @property app_urls - The app urls of the xApp
|
|
2087
|
-
*/
|
|
2088
|
-
type XAppMetadata = {
|
|
2089
|
-
name: string;
|
|
2090
|
-
description: string;
|
|
2091
|
-
external_url: string;
|
|
2092
|
-
logo: string;
|
|
2093
|
-
banner: string;
|
|
2094
|
-
logoComponent?: JSX.Element;
|
|
2095
|
-
screenshots: string[];
|
|
2096
|
-
social_urls: {
|
|
2097
|
-
name: string;
|
|
2098
|
-
url: string;
|
|
2099
|
-
}[];
|
|
2100
|
-
app_urls: {
|
|
2101
|
-
code: string;
|
|
2102
|
-
url: string;
|
|
2103
|
-
}[];
|
|
2104
|
-
tweets: string[];
|
|
2105
|
-
ve_world: {
|
|
2106
|
-
banner: string;
|
|
2107
|
-
};
|
|
2108
|
-
};
|
|
2109
|
-
/**
|
|
2110
|
-
dapp-kit broke the pre-fetching
|
|
2111
|
-
* @param uri - The uri of the xApps metadata
|
|
2112
|
-
* @returns The metadata of the xApp see {@link XAppMetadata}
|
|
2113
|
-
*/
|
|
2114
|
-
declare const getXAppMetadata: (uri: string, networkType: NETWORK_TYPE) => Promise<XAppMetadata | undefined>;
|
|
2115
|
-
|
|
2116
|
-
/**
|
|
2117
|
-
* xApp type
|
|
2118
|
-
* @property id the xApp id
|
|
2119
|
-
* @property teamWalletAddress the xApp address
|
|
2120
|
-
* @property name the xApp name
|
|
2121
|
-
* @property metadataURI the xApp metadata URI
|
|
2122
|
-
* @property createdAtTimestamp timestamp when xApp was added
|
|
2123
|
-
*/
|
|
2124
|
-
type XApp = {
|
|
2125
|
-
id: string;
|
|
2126
|
-
teamWalletAddress: string;
|
|
2127
|
-
name: string;
|
|
2128
|
-
metadataURI: string;
|
|
2129
|
-
createdAtTimestamp: string;
|
|
2130
|
-
};
|
|
2131
|
-
type UnendorsedApp = XApp & {
|
|
2132
|
-
appAvailableForAllocationVoting: boolean;
|
|
2133
|
-
};
|
|
2134
|
-
/**
|
|
2135
|
-
* This function is here nad not coupled with the hook as we need it with SSR, and dapp-kit broke the pre-fetching
|
|
2136
|
-
* Returns all the available xApps in the B3TR ecosystem
|
|
2137
|
-
* @param thor the thor client
|
|
2138
|
-
* @returns all the available xApps in the ecosystem capped to 256 see {@link XApp}
|
|
2139
|
-
*/
|
|
2140
|
-
type GetAllApps = {
|
|
2141
|
-
active: XApp[];
|
|
2142
|
-
unendorsed: UnendorsedApp[];
|
|
2143
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2144
|
-
endorsed: XApp[];
|
|
2145
|
-
};
|
|
2146
|
-
declare const getXApps: (thor: ThorClient, networkType: NETWORK_TYPE) => Promise<GetAllApps>;
|
|
2147
|
-
|
|
2148
|
-
/**
|
|
2149
|
-
* Returns all the available xApps (apps that can be voted on for allocation)
|
|
2150
|
-
* @param thor the thor client
|
|
2151
|
-
* @param networkType the network type
|
|
2152
|
-
* @param roundId the id of the round the get state for
|
|
2153
|
-
* @returns all the available xApps (apps that can be voted on for allocation) capped to 256 see {@link XApp}
|
|
2154
|
-
*/
|
|
2155
|
-
declare const getRoundXApps: (thor: ThorClient, networkType: NETWORK_TYPE, roundId?: string) => Promise<XApp[]>;
|
|
2156
|
-
declare const getRoundXAppsQueryKey: (roundId?: string) => (string | undefined)[];
|
|
2157
|
-
/**
|
|
2158
|
-
* Hook to get all the available xApps (apps that can be voted on for allocation)
|
|
2159
|
-
*
|
|
2160
|
-
* @param roundId the id of the round the get state for
|
|
2161
|
-
*
|
|
2162
|
-
* @returns all the available xApps (apps that can be voted on for allocation) capped to 256
|
|
2163
|
-
*/
|
|
2164
|
-
declare const useRoundXApps: (roundId?: string) => _tanstack_react_query.UseQueryResult<XApp[], Error>;
|
|
2165
|
-
|
|
2166
|
-
type AllocationVoteCastEvent = {
|
|
2167
|
-
voter: string;
|
|
2168
|
-
roundId: string;
|
|
2169
|
-
appsIds: string[];
|
|
2170
|
-
voteWeights: string[];
|
|
2171
|
-
};
|
|
2172
|
-
declare const getUserVotesInRound: (thor: ThorClient, network: NETWORK_TYPE, roundId?: string, address?: string) => Promise<AllocationVoteCastEvent[]>;
|
|
2173
|
-
declare const getUserVotesInRoundQueryKey: (roundId?: string, address?: string) => (string | undefined)[];
|
|
2174
|
-
/**
|
|
2175
|
-
* Hook to get the user votes in a given round from the xAllocationVoting contract
|
|
2176
|
-
* @returns the user votes in a given round from the xAllocationVoting contract
|
|
2177
|
-
*/
|
|
2178
|
-
declare const useUserVotesInRound: (roundId?: string, address?: string) => _tanstack_react_query.UseQueryResult<AllocationVoteCastEvent, Error>;
|
|
2179
|
-
declare const getVotesInRoundQueryKey: (roundId?: string) => (string | undefined)[];
|
|
2180
|
-
/**
|
|
2181
|
-
* Hook to get the allocation rounds events from the xAllocationVoting contract (i.e the proposals created)
|
|
2182
|
-
* @returns the allocation rounds events (i.e the proposals created)
|
|
2183
|
-
*/
|
|
2184
|
-
declare const useVotesInRound: (roundId?: string, enabled?: boolean) => _tanstack_react_query.UseQueryResult<AllocationVoteCastEvent[], Error>;
|
|
2185
|
-
|
|
2186
|
-
/**
|
|
2187
|
-
* Hook to get a specific xApp using useXApps
|
|
2188
|
-
* @param appId the xApp id
|
|
2189
|
-
* @returns the xApp with the given id
|
|
2190
|
-
*/
|
|
2191
|
-
declare const useXApp: (appId: string) => {
|
|
2192
|
-
error: Error;
|
|
2193
|
-
isError: true;
|
|
2194
|
-
isPending: false;
|
|
2195
|
-
isLoading: false;
|
|
2196
|
-
isLoadingError: false;
|
|
2197
|
-
isRefetchError: true;
|
|
2198
|
-
isSuccess: false;
|
|
2199
|
-
isPlaceholderData: false;
|
|
2200
|
-
status: "error";
|
|
2201
|
-
dataUpdatedAt: number;
|
|
2202
|
-
errorUpdatedAt: number;
|
|
2203
|
-
failureCount: number;
|
|
2204
|
-
failureReason: Error | null;
|
|
2205
|
-
errorUpdateCount: number;
|
|
2206
|
-
isFetched: boolean;
|
|
2207
|
-
isFetchedAfterMount: boolean;
|
|
2208
|
-
isFetching: boolean;
|
|
2209
|
-
isInitialLoading: boolean;
|
|
2210
|
-
isPaused: boolean;
|
|
2211
|
-
isRefetching: boolean;
|
|
2212
|
-
isStale: boolean;
|
|
2213
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2214
|
-
active: XApp[];
|
|
2215
|
-
unendorsed: UnendorsedApp[];
|
|
2216
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2217
|
-
endorsed: XApp[];
|
|
2218
|
-
}, Error>>;
|
|
2219
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2220
|
-
promise: Promise<{
|
|
2221
|
-
active: XApp[];
|
|
2222
|
-
unendorsed: UnendorsedApp[];
|
|
2223
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2224
|
-
endorsed: XApp[];
|
|
2225
|
-
}>;
|
|
2226
|
-
data: XApp | undefined;
|
|
2227
|
-
} | {
|
|
2228
|
-
error: null;
|
|
2229
|
-
isError: false;
|
|
2230
|
-
isPending: false;
|
|
2231
|
-
isLoading: false;
|
|
2232
|
-
isLoadingError: false;
|
|
2233
|
-
isRefetchError: false;
|
|
2234
|
-
isSuccess: true;
|
|
2235
|
-
isPlaceholderData: false;
|
|
2236
|
-
status: "success";
|
|
2237
|
-
dataUpdatedAt: number;
|
|
2238
|
-
errorUpdatedAt: number;
|
|
2239
|
-
failureCount: number;
|
|
2240
|
-
failureReason: Error | null;
|
|
2241
|
-
errorUpdateCount: number;
|
|
2242
|
-
isFetched: boolean;
|
|
2243
|
-
isFetchedAfterMount: boolean;
|
|
2244
|
-
isFetching: boolean;
|
|
2245
|
-
isInitialLoading: boolean;
|
|
2246
|
-
isPaused: boolean;
|
|
2247
|
-
isRefetching: boolean;
|
|
2248
|
-
isStale: boolean;
|
|
2249
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2250
|
-
active: XApp[];
|
|
2251
|
-
unendorsed: UnendorsedApp[];
|
|
2252
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2253
|
-
endorsed: XApp[];
|
|
2254
|
-
}, Error>>;
|
|
2255
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2256
|
-
promise: Promise<{
|
|
2257
|
-
active: XApp[];
|
|
2258
|
-
unendorsed: UnendorsedApp[];
|
|
2259
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2260
|
-
endorsed: XApp[];
|
|
2261
|
-
}>;
|
|
2262
|
-
data: XApp | undefined;
|
|
2263
|
-
} | {
|
|
2264
|
-
error: Error;
|
|
2265
|
-
isError: true;
|
|
2266
|
-
isPending: false;
|
|
2267
|
-
isLoading: false;
|
|
2268
|
-
isLoadingError: true;
|
|
2269
|
-
isRefetchError: false;
|
|
2270
|
-
isSuccess: false;
|
|
2271
|
-
isPlaceholderData: false;
|
|
2272
|
-
status: "error";
|
|
2273
|
-
dataUpdatedAt: number;
|
|
2274
|
-
errorUpdatedAt: number;
|
|
2275
|
-
failureCount: number;
|
|
2276
|
-
failureReason: Error | null;
|
|
2277
|
-
errorUpdateCount: number;
|
|
2278
|
-
isFetched: boolean;
|
|
2279
|
-
isFetchedAfterMount: boolean;
|
|
2280
|
-
isFetching: boolean;
|
|
2281
|
-
isInitialLoading: boolean;
|
|
2282
|
-
isPaused: boolean;
|
|
2283
|
-
isRefetching: boolean;
|
|
2284
|
-
isStale: boolean;
|
|
2285
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2286
|
-
active: XApp[];
|
|
2287
|
-
unendorsed: UnendorsedApp[];
|
|
2288
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2289
|
-
endorsed: XApp[];
|
|
2290
|
-
}, Error>>;
|
|
2291
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2292
|
-
promise: Promise<{
|
|
2293
|
-
active: XApp[];
|
|
2294
|
-
unendorsed: UnendorsedApp[];
|
|
2295
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2296
|
-
endorsed: XApp[];
|
|
2297
|
-
}>;
|
|
2298
|
-
data: XApp | undefined;
|
|
2299
|
-
} | {
|
|
2300
|
-
error: null;
|
|
2301
|
-
isError: false;
|
|
2302
|
-
isPending: true;
|
|
2303
|
-
isLoading: true;
|
|
2304
|
-
isLoadingError: false;
|
|
2305
|
-
isRefetchError: false;
|
|
2306
|
-
isSuccess: false;
|
|
2307
|
-
isPlaceholderData: false;
|
|
2308
|
-
status: "pending";
|
|
2309
|
-
dataUpdatedAt: number;
|
|
2310
|
-
errorUpdatedAt: number;
|
|
2311
|
-
failureCount: number;
|
|
2312
|
-
failureReason: Error | null;
|
|
2313
|
-
errorUpdateCount: number;
|
|
2314
|
-
isFetched: boolean;
|
|
2315
|
-
isFetchedAfterMount: boolean;
|
|
2316
|
-
isFetching: boolean;
|
|
2317
|
-
isInitialLoading: boolean;
|
|
2318
|
-
isPaused: boolean;
|
|
2319
|
-
isRefetching: boolean;
|
|
2320
|
-
isStale: boolean;
|
|
2321
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2322
|
-
active: XApp[];
|
|
2323
|
-
unendorsed: UnendorsedApp[];
|
|
2324
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2325
|
-
endorsed: XApp[];
|
|
2326
|
-
}, Error>>;
|
|
2327
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2328
|
-
promise: Promise<{
|
|
2329
|
-
active: XApp[];
|
|
2330
|
-
unendorsed: UnendorsedApp[];
|
|
2331
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2332
|
-
endorsed: XApp[];
|
|
2333
|
-
}>;
|
|
2334
|
-
data: XApp | undefined;
|
|
2335
|
-
} | {
|
|
2336
|
-
error: null;
|
|
2337
|
-
isError: false;
|
|
2338
|
-
isPending: true;
|
|
2339
|
-
isLoadingError: false;
|
|
2340
|
-
isRefetchError: false;
|
|
2341
|
-
isSuccess: false;
|
|
2342
|
-
isPlaceholderData: false;
|
|
2343
|
-
status: "pending";
|
|
2344
|
-
dataUpdatedAt: number;
|
|
2345
|
-
errorUpdatedAt: number;
|
|
2346
|
-
failureCount: number;
|
|
2347
|
-
failureReason: Error | null;
|
|
2348
|
-
errorUpdateCount: number;
|
|
2349
|
-
isFetched: boolean;
|
|
2350
|
-
isFetchedAfterMount: boolean;
|
|
2351
|
-
isFetching: boolean;
|
|
2352
|
-
isLoading: boolean;
|
|
2353
|
-
isInitialLoading: boolean;
|
|
2354
|
-
isPaused: boolean;
|
|
2355
|
-
isRefetching: boolean;
|
|
2356
|
-
isStale: boolean;
|
|
2357
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2358
|
-
active: XApp[];
|
|
2359
|
-
unendorsed: UnendorsedApp[];
|
|
2360
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2361
|
-
endorsed: XApp[];
|
|
2362
|
-
}, Error>>;
|
|
2363
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2364
|
-
promise: Promise<{
|
|
2365
|
-
active: XApp[];
|
|
2366
|
-
unendorsed: UnendorsedApp[];
|
|
2367
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2368
|
-
endorsed: XApp[];
|
|
2369
|
-
}>;
|
|
2370
|
-
data: XApp | undefined;
|
|
2371
|
-
} | {
|
|
2372
|
-
isError: false;
|
|
2373
|
-
error: null;
|
|
2374
|
-
isPending: false;
|
|
2375
|
-
isLoading: false;
|
|
2376
|
-
isLoadingError: false;
|
|
2377
|
-
isRefetchError: false;
|
|
2378
|
-
isSuccess: true;
|
|
2379
|
-
isPlaceholderData: true;
|
|
2380
|
-
status: "success";
|
|
2381
|
-
dataUpdatedAt: number;
|
|
2382
|
-
errorUpdatedAt: number;
|
|
2383
|
-
failureCount: number;
|
|
2384
|
-
failureReason: Error | null;
|
|
2385
|
-
errorUpdateCount: number;
|
|
2386
|
-
isFetched: boolean;
|
|
2387
|
-
isFetchedAfterMount: boolean;
|
|
2388
|
-
isFetching: boolean;
|
|
2389
|
-
isInitialLoading: boolean;
|
|
2390
|
-
isPaused: boolean;
|
|
2391
|
-
isRefetching: boolean;
|
|
2392
|
-
isStale: boolean;
|
|
2393
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2394
|
-
active: XApp[];
|
|
2395
|
-
unendorsed: UnendorsedApp[];
|
|
2396
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2397
|
-
endorsed: XApp[];
|
|
2398
|
-
}, Error>>;
|
|
2399
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2400
|
-
promise: Promise<{
|
|
2401
|
-
active: XApp[];
|
|
2402
|
-
unendorsed: UnendorsedApp[];
|
|
2403
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2404
|
-
endorsed: XApp[];
|
|
2405
|
-
}>;
|
|
2406
|
-
data: XApp | undefined;
|
|
2407
|
-
};
|
|
2408
|
-
|
|
2409
|
-
declare const getXAppMetadataQueryKey: (metadataURI?: string) => (string | undefined)[];
|
|
2410
|
-
/**
|
|
2411
|
-
* Hook to fetch the metadata of an xApp from the xApps metadata base uri
|
|
2412
|
-
* @param xAppId - The id of the xApp
|
|
2413
|
-
* @returns The metadata of the xApp
|
|
2414
|
-
*/
|
|
2415
|
-
declare const useXAppMetadata: (xAppId?: string) => _tanstack_react_query.UseQueryResult<XAppMetadata | null | undefined, Error>;
|
|
2416
|
-
|
|
2417
|
-
declare const getXAppsQueryKey: () => string[];
|
|
2418
|
-
/**
|
|
2419
|
-
* Hook to get all the available xApps in the B3TR ecosystem
|
|
2420
|
-
* @returns all the available xApps in the B3TR ecosystem capped to 256
|
|
2421
|
-
*/
|
|
2422
|
-
declare const useXApps: () => _tanstack_react_query.UseQueryResult<{
|
|
2423
|
-
active: XApp[];
|
|
2424
|
-
unendorsed: UnendorsedApp[];
|
|
2425
|
-
allApps: (XApp | UnendorsedApp)[];
|
|
2426
|
-
endorsed: XApp[];
|
|
2427
|
-
}, Error>;
|
|
2428
|
-
|
|
2429
|
-
type MostVotedAppsInRoundReturnType = {
|
|
2430
|
-
percentage: number;
|
|
2431
|
-
id: string;
|
|
2432
|
-
app: XApp;
|
|
2433
|
-
};
|
|
2434
|
-
/**
|
|
2435
|
-
* Get the most voted apps in a round
|
|
2436
|
-
*
|
|
2437
|
-
* @param roundId the id of the round to get the most voted apps
|
|
2438
|
-
* @returns a sorted array of the most voted apps in the round
|
|
2439
|
-
*/
|
|
2440
|
-
declare const useMostVotedAppsInRound: (roundId?: string) => {
|
|
2441
|
-
data: MostVotedAppsInRoundReturnType[];
|
|
2442
|
-
isLoading: boolean;
|
|
2443
|
-
};
|
|
2444
|
-
|
|
2445
|
-
/**
|
|
2446
|
-
* Returns the query key for the shares of multiple xApps in an allocation round.
|
|
2447
|
-
* @param roundId the roundId the get the shares for
|
|
2448
|
-
*/
|
|
2449
|
-
declare const getXAppsSharesQueryKey: (roundId?: number | string) => (string | number | undefined)[];
|
|
2450
|
-
/**
|
|
2451
|
-
* Fetch shares of multiple xApps in an allocation round
|
|
2452
|
-
* @param apps the xApps to get the shares for
|
|
2453
|
-
* @param roundId the round id to get the shares for
|
|
2454
|
-
* @returns the shares (% of allocation pool) for the xApps in the round { allocated: number, unallocated: number }
|
|
2455
|
-
*
|
|
2456
|
-
*/
|
|
2457
|
-
declare const useXAppsShares: (apps: string[], roundId?: string) => _tanstack_react_query.UseQueryResult<{
|
|
2458
|
-
app: string;
|
|
2459
|
-
share: number;
|
|
2460
|
-
unallocatedShare: number;
|
|
2461
|
-
}[], Error>;
|
|
2462
|
-
|
|
2463
|
-
declare const getXAppsMetadataBaseUriQueryKey: (network: NETWORK_TYPE) => (string | unknown[] | undefined)[];
|
|
2464
|
-
/**
|
|
2465
|
-
* Hook to get the baseUri of the xApps metadata
|
|
2466
|
-
* @returns the baseUri of the xApps metadata
|
|
2467
|
-
*/
|
|
2468
|
-
declare const useXAppsMetadataBaseUri: () => _tanstack_react_query.UseQueryResult<readonly [string], unknown>;
|
|
2469
|
-
|
|
2470
|
-
type UseXAppRoundEarningsQueryResponse = {
|
|
2471
|
-
amount: string;
|
|
2472
|
-
appId: string;
|
|
2473
|
-
};
|
|
2474
|
-
/**
|
|
2475
|
-
* Get the amount of $B3TR an xApp earned from an allocation round
|
|
2476
|
-
*
|
|
2477
|
-
* @param thor the thor instance
|
|
2478
|
-
* @param roundId the round id
|
|
2479
|
-
* @param xAppId the xApp id
|
|
2480
|
-
* @param networkType the network type
|
|
2481
|
-
* @returns (amount, appId) amount of $B3TR an xApp earned from an allocation round and the xApp id
|
|
2482
|
-
*/
|
|
2483
|
-
declare const getXAppRoundEarnings: (thor: ThorClient, roundId: string, xAppId: string, networkType: NETWORK_TYPE) => Promise<UseXAppRoundEarningsQueryResponse>;
|
|
2484
|
-
declare const getXAppRoundEarningsQueryKey: (roundId: string | number, xAppId?: string) => (string | number)[];
|
|
2485
|
-
/**
|
|
2486
|
-
* Get the amount of $B3TR an xApp can claim from an allocation round
|
|
2487
|
-
*
|
|
2488
|
-
* @param roundId the round id
|
|
2489
|
-
* @param xAppId the xApp id
|
|
2490
|
-
* @returns amount of $B3TR an xApp can claim from an allocation round
|
|
2491
|
-
*/
|
|
2492
|
-
declare const useXAppRoundEarnings: (roundId: string, xAppId: string) => _tanstack_react_query.UseQueryResult<UseXAppRoundEarningsQueryResponse | {
|
|
2493
|
-
amount: string;
|
|
2494
|
-
xAppId: string;
|
|
2495
|
-
}, Error>;
|
|
2496
|
-
/**
|
|
2497
|
-
* Get the amount of $B3TR every xApp earned from an allocation round
|
|
2498
|
-
* @param roundId the round id
|
|
2499
|
-
* @param xAppIds the xApp ids
|
|
2500
|
-
* @returns the amount of $B3TR every xApp earned from an allocation round
|
|
2501
|
-
*/
|
|
2502
|
-
declare const useMultipleXAppRoundEarnings: (roundId: string, xAppIds: string[]) => _tanstack_react_query.UseQueryResult<{
|
|
2503
|
-
amount: string;
|
|
2504
|
-
appId: string;
|
|
2505
|
-
}[], Error>;
|
|
2506
|
-
|
|
2507
|
-
declare const getXAppTotalEarningsQueryKey: (tillRoundId: string | number, appId: string) => (string | number)[];
|
|
2508
|
-
/**
|
|
2509
|
-
* Total earnings of an xApp in multiple rounds
|
|
2510
|
-
* @param roundIds ids of the rounds
|
|
2511
|
-
* @param appId id of the xApp
|
|
2512
|
-
* @returns the total earnings of the xApp until the last round
|
|
2513
|
-
*/
|
|
2514
|
-
declare const useXAppTotalEarnings: (roundIds: number[], appId: string) => _tanstack_react_query.UseQueryResult<number, Error>;
|
|
2515
|
-
|
|
2516
|
-
declare const RoundState: {
|
|
2517
|
-
readonly 0: "Active";
|
|
2518
|
-
readonly 1: "Failed";
|
|
2519
|
-
readonly 2: "Succeeded";
|
|
2520
|
-
};
|
|
2521
|
-
declare const getAllocationsRoundStateQueryKey: (roundId: string, network: NETWORK_TYPE) => (string | unknown[] | undefined)[];
|
|
2522
|
-
/**
|
|
2523
|
-
* Hook to get the state of a given roundId
|
|
2524
|
-
* @param roundId the roundId to get state for
|
|
2525
|
-
* @returns the state of a given roundId
|
|
2526
|
-
*/
|
|
2527
|
-
declare const useAllocationsRoundState: (roundId?: string) => _tanstack_react_query.UseQueryResult<0 | 1 | 2, unknown>;
|
|
2528
|
-
|
|
2529
|
-
declare const getCurrentAllocationsRoundIdQueryKey: (network: NETWORK_TYPE) => (string | unknown[] | undefined)[];
|
|
2530
|
-
/**
|
|
2531
|
-
* Hook to get the current roundId of allocations voting
|
|
2532
|
-
* @returns the current roundId of allocations voting
|
|
2533
|
-
*/
|
|
2534
|
-
declare const useCurrentAllocationsRoundId: () => _tanstack_react_query.UseQueryResult<string, unknown>;
|
|
2535
|
-
|
|
2536
|
-
declare const getHasVotedInRoundQueryKey: (roundId: string, address: string, networkType: NETWORK_TYPE) => (string | unknown[] | undefined)[];
|
|
2537
|
-
/**
|
|
2538
|
-
* Hook to get if a user has voted in a given roundId
|
|
2539
|
-
* @param roundId the roundId the get the votes for
|
|
2540
|
-
* @param address the address to check if they have voted
|
|
2541
|
-
* @returns if a user has voted in a given roundId
|
|
2542
|
-
*/
|
|
2543
|
-
declare const useHasVotedInRound: (roundId?: string, address?: string) => _tanstack_react_query.UseQueryResult<boolean, unknown>;
|
|
2544
|
-
|
|
2545
|
-
type RoundCreated = {
|
|
2546
|
-
roundId: string;
|
|
2547
|
-
proposer: string;
|
|
2548
|
-
voteStart: string;
|
|
2549
|
-
voteEnd: string;
|
|
2550
|
-
appsIds: string[];
|
|
2551
|
-
};
|
|
2552
|
-
/**
|
|
2553
|
-
* Returns all allocation rounds events
|
|
2554
|
-
* @param thor the thor client
|
|
2555
|
-
* @param networkType the network type
|
|
2556
|
-
* @returns the allocation rounds events
|
|
2557
|
-
*/
|
|
2558
|
-
declare const getAllocationsRoundsEvents: (thor: ThorClient, networkType: NETWORK_TYPE) => Promise<{
|
|
2559
|
-
created: RoundCreated[];
|
|
2560
|
-
}>;
|
|
2561
|
-
declare const getAllocationsRoundsEventsQueryKey: () => string[];
|
|
2562
|
-
/**
|
|
2563
|
-
* Hook to get the allocation rounds events from the xAllocationVoting contract
|
|
2564
|
-
* @returns the allocation rounds events
|
|
2565
|
-
*/
|
|
2566
|
-
declare const useAllocationsRoundsEvents: () => _tanstack_react_query.UseQueryResult<{
|
|
2567
|
-
created: RoundCreated[];
|
|
2568
|
-
}, Error>;
|
|
2569
|
-
|
|
2570
|
-
/**
|
|
2571
|
-
* Hook to get info about the current allocation round
|
|
2572
|
-
* @returns the current allocation round info see {@link AllocationRoundWithState}
|
|
2573
|
-
*/
|
|
2574
|
-
declare const useCurrentAllocationsRound: () => {
|
|
2575
|
-
isLoading: boolean;
|
|
2576
|
-
isError: boolean;
|
|
2577
|
-
error: unknown;
|
|
2578
|
-
data: {
|
|
2579
|
-
voteStartTimestamp: number | null;
|
|
2580
|
-
voteEndTimestamp: number | null;
|
|
2581
|
-
isFirstRound: boolean;
|
|
2582
|
-
isLastRound: boolean;
|
|
2583
|
-
roundId?: string | undefined;
|
|
2584
|
-
proposer?: string | undefined;
|
|
2585
|
-
voteStart?: string | undefined;
|
|
2586
|
-
voteEnd?: string | undefined;
|
|
2587
|
-
appsIds?: string[] | undefined;
|
|
2588
|
-
state?: keyof typeof RoundState;
|
|
2589
|
-
isCurrent?: boolean | undefined;
|
|
2590
|
-
};
|
|
2591
|
-
isPending: false;
|
|
2592
|
-
isLoadingError: false;
|
|
2593
|
-
isRefetchError: true;
|
|
2594
|
-
isSuccess: false;
|
|
2595
|
-
isPlaceholderData: false;
|
|
2596
|
-
status: "error";
|
|
2597
|
-
dataUpdatedAt: number;
|
|
2598
|
-
errorUpdatedAt: number;
|
|
2599
|
-
failureCount: number;
|
|
2600
|
-
failureReason: Error | null;
|
|
2601
|
-
errorUpdateCount: number;
|
|
2602
|
-
isFetched: boolean;
|
|
2603
|
-
isFetchedAfterMount: boolean;
|
|
2604
|
-
isFetching: boolean;
|
|
2605
|
-
isInitialLoading: boolean;
|
|
2606
|
-
isPaused: boolean;
|
|
2607
|
-
isRefetching: boolean;
|
|
2608
|
-
isStale: boolean;
|
|
2609
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2610
|
-
created: RoundCreated[];
|
|
2611
|
-
}, Error>>;
|
|
2612
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2613
|
-
promise: Promise<{
|
|
2614
|
-
created: RoundCreated[];
|
|
2615
|
-
}>;
|
|
2616
|
-
} | {
|
|
2617
|
-
isLoading: boolean;
|
|
2618
|
-
isError: boolean;
|
|
2619
|
-
error: unknown;
|
|
2620
|
-
data: {
|
|
2621
|
-
voteStartTimestamp: number | null;
|
|
2622
|
-
voteEndTimestamp: number | null;
|
|
2623
|
-
isFirstRound: boolean;
|
|
2624
|
-
isLastRound: boolean;
|
|
2625
|
-
roundId?: string | undefined;
|
|
2626
|
-
proposer?: string | undefined;
|
|
2627
|
-
voteStart?: string | undefined;
|
|
2628
|
-
voteEnd?: string | undefined;
|
|
2629
|
-
appsIds?: string[] | undefined;
|
|
2630
|
-
state?: keyof typeof RoundState;
|
|
2631
|
-
isCurrent?: boolean | undefined;
|
|
2632
|
-
};
|
|
2633
|
-
isPending: false;
|
|
2634
|
-
isLoadingError: false;
|
|
2635
|
-
isRefetchError: false;
|
|
2636
|
-
isSuccess: true;
|
|
2637
|
-
isPlaceholderData: false;
|
|
2638
|
-
status: "success";
|
|
2639
|
-
dataUpdatedAt: number;
|
|
2640
|
-
errorUpdatedAt: number;
|
|
2641
|
-
failureCount: number;
|
|
2642
|
-
failureReason: Error | null;
|
|
2643
|
-
errorUpdateCount: number;
|
|
2644
|
-
isFetched: boolean;
|
|
2645
|
-
isFetchedAfterMount: boolean;
|
|
2646
|
-
isFetching: boolean;
|
|
2647
|
-
isInitialLoading: boolean;
|
|
2648
|
-
isPaused: boolean;
|
|
2649
|
-
isRefetching: boolean;
|
|
2650
|
-
isStale: boolean;
|
|
2651
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2652
|
-
created: RoundCreated[];
|
|
2653
|
-
}, Error>>;
|
|
2654
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2655
|
-
promise: Promise<{
|
|
2656
|
-
created: RoundCreated[];
|
|
2657
|
-
}>;
|
|
2658
|
-
} | {
|
|
2659
|
-
isLoading: boolean;
|
|
2660
|
-
isError: boolean;
|
|
2661
|
-
error: unknown;
|
|
2662
|
-
data: {
|
|
2663
|
-
voteStartTimestamp: number | null;
|
|
2664
|
-
voteEndTimestamp: number | null;
|
|
2665
|
-
isFirstRound: boolean;
|
|
2666
|
-
isLastRound: boolean;
|
|
2667
|
-
roundId?: string | undefined;
|
|
2668
|
-
proposer?: string | undefined;
|
|
2669
|
-
voteStart?: string | undefined;
|
|
2670
|
-
voteEnd?: string | undefined;
|
|
2671
|
-
appsIds?: string[] | undefined;
|
|
2672
|
-
state?: keyof typeof RoundState;
|
|
2673
|
-
isCurrent?: boolean | undefined;
|
|
2674
|
-
};
|
|
2675
|
-
isPending: false;
|
|
2676
|
-
isLoadingError: true;
|
|
2677
|
-
isRefetchError: false;
|
|
2678
|
-
isSuccess: false;
|
|
2679
|
-
isPlaceholderData: false;
|
|
2680
|
-
status: "error";
|
|
2681
|
-
dataUpdatedAt: number;
|
|
2682
|
-
errorUpdatedAt: number;
|
|
2683
|
-
failureCount: number;
|
|
2684
|
-
failureReason: Error | null;
|
|
2685
|
-
errorUpdateCount: number;
|
|
2686
|
-
isFetched: boolean;
|
|
2687
|
-
isFetchedAfterMount: boolean;
|
|
2688
|
-
isFetching: boolean;
|
|
2689
|
-
isInitialLoading: boolean;
|
|
2690
|
-
isPaused: boolean;
|
|
2691
|
-
isRefetching: boolean;
|
|
2692
|
-
isStale: boolean;
|
|
2693
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2694
|
-
created: RoundCreated[];
|
|
2695
|
-
}, Error>>;
|
|
2696
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2697
|
-
promise: Promise<{
|
|
2698
|
-
created: RoundCreated[];
|
|
2699
|
-
}>;
|
|
2700
|
-
} | {
|
|
2701
|
-
isLoading: boolean;
|
|
2702
|
-
isError: boolean;
|
|
2703
|
-
error: unknown;
|
|
2704
|
-
data: {
|
|
2705
|
-
voteStartTimestamp: number | null;
|
|
2706
|
-
voteEndTimestamp: number | null;
|
|
2707
|
-
isFirstRound: boolean;
|
|
2708
|
-
isLastRound: boolean;
|
|
2709
|
-
roundId?: string | undefined;
|
|
2710
|
-
proposer?: string | undefined;
|
|
2711
|
-
voteStart?: string | undefined;
|
|
2712
|
-
voteEnd?: string | undefined;
|
|
2713
|
-
appsIds?: string[] | undefined;
|
|
2714
|
-
state?: keyof typeof RoundState;
|
|
2715
|
-
isCurrent?: boolean | undefined;
|
|
2716
|
-
};
|
|
2717
|
-
isPending: true;
|
|
2718
|
-
isLoadingError: false;
|
|
2719
|
-
isRefetchError: false;
|
|
2720
|
-
isSuccess: false;
|
|
2721
|
-
isPlaceholderData: false;
|
|
2722
|
-
status: "pending";
|
|
2723
|
-
dataUpdatedAt: number;
|
|
2724
|
-
errorUpdatedAt: number;
|
|
2725
|
-
failureCount: number;
|
|
2726
|
-
failureReason: Error | null;
|
|
2727
|
-
errorUpdateCount: number;
|
|
2728
|
-
isFetched: boolean;
|
|
2729
|
-
isFetchedAfterMount: boolean;
|
|
2730
|
-
isFetching: boolean;
|
|
2731
|
-
isInitialLoading: boolean;
|
|
2732
|
-
isPaused: boolean;
|
|
2733
|
-
isRefetching: boolean;
|
|
2734
|
-
isStale: boolean;
|
|
2735
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2736
|
-
created: RoundCreated[];
|
|
2737
|
-
}, Error>>;
|
|
2738
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2739
|
-
promise: Promise<{
|
|
2740
|
-
created: RoundCreated[];
|
|
2741
|
-
}>;
|
|
2742
|
-
} | {
|
|
2743
|
-
isLoading: boolean;
|
|
2744
|
-
isError: boolean;
|
|
2745
|
-
error: unknown;
|
|
2746
|
-
data: {
|
|
2747
|
-
voteStartTimestamp: number | null;
|
|
2748
|
-
voteEndTimestamp: number | null;
|
|
2749
|
-
isFirstRound: boolean;
|
|
2750
|
-
isLastRound: boolean;
|
|
2751
|
-
roundId?: string | undefined;
|
|
2752
|
-
proposer?: string | undefined;
|
|
2753
|
-
voteStart?: string | undefined;
|
|
2754
|
-
voteEnd?: string | undefined;
|
|
2755
|
-
appsIds?: string[] | undefined;
|
|
2756
|
-
state?: keyof typeof RoundState;
|
|
2757
|
-
isCurrent?: boolean | undefined;
|
|
2758
|
-
};
|
|
2759
|
-
isPending: true;
|
|
2760
|
-
isLoadingError: false;
|
|
2761
|
-
isRefetchError: false;
|
|
2762
|
-
isSuccess: false;
|
|
2763
|
-
isPlaceholderData: false;
|
|
2764
|
-
status: "pending";
|
|
2765
|
-
dataUpdatedAt: number;
|
|
2766
|
-
errorUpdatedAt: number;
|
|
2767
|
-
failureCount: number;
|
|
2768
|
-
failureReason: Error | null;
|
|
2769
|
-
errorUpdateCount: number;
|
|
2770
|
-
isFetched: boolean;
|
|
2771
|
-
isFetchedAfterMount: boolean;
|
|
2772
|
-
isFetching: boolean;
|
|
2773
|
-
isInitialLoading: boolean;
|
|
2774
|
-
isPaused: boolean;
|
|
2775
|
-
isRefetching: boolean;
|
|
2776
|
-
isStale: boolean;
|
|
2777
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2778
|
-
created: RoundCreated[];
|
|
2779
|
-
}, Error>>;
|
|
2780
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2781
|
-
promise: Promise<{
|
|
2782
|
-
created: RoundCreated[];
|
|
2783
|
-
}>;
|
|
2784
|
-
} | {
|
|
2785
|
-
isLoading: boolean;
|
|
2786
|
-
isError: boolean;
|
|
2787
|
-
error: unknown;
|
|
2788
|
-
data: {
|
|
2789
|
-
voteStartTimestamp: number | null;
|
|
2790
|
-
voteEndTimestamp: number | null;
|
|
2791
|
-
isFirstRound: boolean;
|
|
2792
|
-
isLastRound: boolean;
|
|
2793
|
-
roundId?: string | undefined;
|
|
2794
|
-
proposer?: string | undefined;
|
|
2795
|
-
voteStart?: string | undefined;
|
|
2796
|
-
voteEnd?: string | undefined;
|
|
2797
|
-
appsIds?: string[] | undefined;
|
|
2798
|
-
state?: keyof typeof RoundState;
|
|
2799
|
-
isCurrent?: boolean | undefined;
|
|
2800
|
-
};
|
|
2801
|
-
isPending: false;
|
|
2802
|
-
isLoadingError: false;
|
|
2803
|
-
isRefetchError: false;
|
|
2804
|
-
isSuccess: true;
|
|
2805
|
-
isPlaceholderData: true;
|
|
2806
|
-
status: "success";
|
|
2807
|
-
dataUpdatedAt: number;
|
|
2808
|
-
errorUpdatedAt: number;
|
|
2809
|
-
failureCount: number;
|
|
2810
|
-
failureReason: Error | null;
|
|
2811
|
-
errorUpdateCount: number;
|
|
2812
|
-
isFetched: boolean;
|
|
2813
|
-
isFetchedAfterMount: boolean;
|
|
2814
|
-
isFetching: boolean;
|
|
2815
|
-
isInitialLoading: boolean;
|
|
2816
|
-
isPaused: boolean;
|
|
2817
|
-
isRefetching: boolean;
|
|
2818
|
-
isStale: boolean;
|
|
2819
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2820
|
-
created: RoundCreated[];
|
|
2821
|
-
}, Error>>;
|
|
2822
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2823
|
-
promise: Promise<{
|
|
2824
|
-
created: RoundCreated[];
|
|
2825
|
-
}>;
|
|
2826
|
-
};
|
|
2827
|
-
|
|
2828
|
-
type AllocationRoundWithState = RoundCreated & {
|
|
2829
|
-
state?: keyof typeof RoundState;
|
|
2830
|
-
voteStartTimestamp?: number;
|
|
2831
|
-
voteEndTimestamp?: number;
|
|
2832
|
-
isCurrent: boolean;
|
|
2833
|
-
};
|
|
2834
|
-
/**
|
|
2835
|
-
* Hook to get and merge info about the given allocation round (state, proposer, voreStart, voteEnd)
|
|
2836
|
-
* @returns the allocation round info see {@link AllocationRoundWithState}
|
|
2837
|
-
*/
|
|
2838
|
-
declare const useAllocationsRound: (roundId?: string) => {
|
|
2839
|
-
data: {
|
|
2840
|
-
voteStartTimestamp: number | null;
|
|
2841
|
-
voteEndTimestamp: number | null;
|
|
2842
|
-
isFirstRound: boolean;
|
|
2843
|
-
isLastRound: boolean;
|
|
2844
|
-
roundId?: string | undefined;
|
|
2845
|
-
proposer?: string | undefined;
|
|
2846
|
-
voteStart?: string | undefined;
|
|
2847
|
-
voteEnd?: string | undefined;
|
|
2848
|
-
appsIds?: string[] | undefined;
|
|
2849
|
-
state?: keyof typeof RoundState;
|
|
2850
|
-
isCurrent?: boolean | undefined;
|
|
2851
|
-
};
|
|
2852
|
-
isLoading: boolean;
|
|
2853
|
-
isError: boolean;
|
|
2854
|
-
error: unknown;
|
|
2855
|
-
isPending: false;
|
|
2856
|
-
isLoadingError: false;
|
|
2857
|
-
isRefetchError: true;
|
|
2858
|
-
isSuccess: false;
|
|
2859
|
-
isPlaceholderData: false;
|
|
2860
|
-
status: "error";
|
|
2861
|
-
dataUpdatedAt: number;
|
|
2862
|
-
errorUpdatedAt: number;
|
|
2863
|
-
failureCount: number;
|
|
2864
|
-
failureReason: Error | null;
|
|
2865
|
-
errorUpdateCount: number;
|
|
2866
|
-
isFetched: boolean;
|
|
2867
|
-
isFetchedAfterMount: boolean;
|
|
2868
|
-
isFetching: boolean;
|
|
2869
|
-
isInitialLoading: boolean;
|
|
2870
|
-
isPaused: boolean;
|
|
2871
|
-
isRefetching: boolean;
|
|
2872
|
-
isStale: boolean;
|
|
2873
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2874
|
-
created: RoundCreated[];
|
|
2875
|
-
}, Error>>;
|
|
2876
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2877
|
-
promise: Promise<{
|
|
2878
|
-
created: RoundCreated[];
|
|
2879
|
-
}>;
|
|
2880
|
-
} | {
|
|
2881
|
-
data: {
|
|
2882
|
-
voteStartTimestamp: number | null;
|
|
2883
|
-
voteEndTimestamp: number | null;
|
|
2884
|
-
isFirstRound: boolean;
|
|
2885
|
-
isLastRound: boolean;
|
|
2886
|
-
roundId?: string | undefined;
|
|
2887
|
-
proposer?: string | undefined;
|
|
2888
|
-
voteStart?: string | undefined;
|
|
2889
|
-
voteEnd?: string | undefined;
|
|
2890
|
-
appsIds?: string[] | undefined;
|
|
2891
|
-
state?: keyof typeof RoundState;
|
|
2892
|
-
isCurrent?: boolean | undefined;
|
|
2893
|
-
};
|
|
2894
|
-
isLoading: boolean;
|
|
2895
|
-
isError: boolean;
|
|
2896
|
-
error: unknown;
|
|
2897
|
-
isPending: false;
|
|
2898
|
-
isLoadingError: false;
|
|
2899
|
-
isRefetchError: false;
|
|
2900
|
-
isSuccess: true;
|
|
2901
|
-
isPlaceholderData: false;
|
|
2902
|
-
status: "success";
|
|
2903
|
-
dataUpdatedAt: number;
|
|
2904
|
-
errorUpdatedAt: number;
|
|
2905
|
-
failureCount: number;
|
|
2906
|
-
failureReason: Error | null;
|
|
2907
|
-
errorUpdateCount: number;
|
|
2908
|
-
isFetched: boolean;
|
|
2909
|
-
isFetchedAfterMount: boolean;
|
|
2910
|
-
isFetching: boolean;
|
|
2911
|
-
isInitialLoading: boolean;
|
|
2912
|
-
isPaused: boolean;
|
|
2913
|
-
isRefetching: boolean;
|
|
2914
|
-
isStale: boolean;
|
|
2915
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2916
|
-
created: RoundCreated[];
|
|
2917
|
-
}, Error>>;
|
|
2918
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2919
|
-
promise: Promise<{
|
|
2920
|
-
created: RoundCreated[];
|
|
2921
|
-
}>;
|
|
2922
|
-
} | {
|
|
2923
|
-
data: {
|
|
2924
|
-
voteStartTimestamp: number | null;
|
|
2925
|
-
voteEndTimestamp: number | null;
|
|
2926
|
-
isFirstRound: boolean;
|
|
2927
|
-
isLastRound: boolean;
|
|
2928
|
-
roundId?: string | undefined;
|
|
2929
|
-
proposer?: string | undefined;
|
|
2930
|
-
voteStart?: string | undefined;
|
|
2931
|
-
voteEnd?: string | undefined;
|
|
2932
|
-
appsIds?: string[] | undefined;
|
|
2933
|
-
state?: keyof typeof RoundState;
|
|
2934
|
-
isCurrent?: boolean | undefined;
|
|
2935
|
-
};
|
|
2936
|
-
isLoading: boolean;
|
|
2937
|
-
isError: boolean;
|
|
2938
|
-
error: unknown;
|
|
2939
|
-
isPending: false;
|
|
2940
|
-
isLoadingError: true;
|
|
2941
|
-
isRefetchError: false;
|
|
2942
|
-
isSuccess: false;
|
|
2943
|
-
isPlaceholderData: false;
|
|
2944
|
-
status: "error";
|
|
2945
|
-
dataUpdatedAt: number;
|
|
2946
|
-
errorUpdatedAt: number;
|
|
2947
|
-
failureCount: number;
|
|
2948
|
-
failureReason: Error | null;
|
|
2949
|
-
errorUpdateCount: number;
|
|
2950
|
-
isFetched: boolean;
|
|
2951
|
-
isFetchedAfterMount: boolean;
|
|
2952
|
-
isFetching: boolean;
|
|
2953
|
-
isInitialLoading: boolean;
|
|
2954
|
-
isPaused: boolean;
|
|
2955
|
-
isRefetching: boolean;
|
|
2956
|
-
isStale: boolean;
|
|
2957
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
2958
|
-
created: RoundCreated[];
|
|
2959
|
-
}, Error>>;
|
|
2960
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
2961
|
-
promise: Promise<{
|
|
2962
|
-
created: RoundCreated[];
|
|
2963
|
-
}>;
|
|
2964
|
-
} | {
|
|
2965
|
-
data: {
|
|
2966
|
-
voteStartTimestamp: number | null;
|
|
2967
|
-
voteEndTimestamp: number | null;
|
|
2968
|
-
isFirstRound: boolean;
|
|
2969
|
-
isLastRound: boolean;
|
|
2970
|
-
roundId?: string | undefined;
|
|
2971
|
-
proposer?: string | undefined;
|
|
2972
|
-
voteStart?: string | undefined;
|
|
2973
|
-
voteEnd?: string | undefined;
|
|
2974
|
-
appsIds?: string[] | undefined;
|
|
2975
|
-
state?: keyof typeof RoundState;
|
|
2976
|
-
isCurrent?: boolean | undefined;
|
|
2977
|
-
};
|
|
2978
|
-
isLoading: boolean;
|
|
2979
|
-
isError: boolean;
|
|
2980
|
-
error: unknown;
|
|
2981
|
-
isPending: true;
|
|
2982
|
-
isLoadingError: false;
|
|
2983
|
-
isRefetchError: false;
|
|
2984
|
-
isSuccess: false;
|
|
2985
|
-
isPlaceholderData: false;
|
|
2986
|
-
status: "pending";
|
|
2987
|
-
dataUpdatedAt: number;
|
|
2988
|
-
errorUpdatedAt: number;
|
|
2989
|
-
failureCount: number;
|
|
2990
|
-
failureReason: Error | null;
|
|
2991
|
-
errorUpdateCount: number;
|
|
2992
|
-
isFetched: boolean;
|
|
2993
|
-
isFetchedAfterMount: boolean;
|
|
2994
|
-
isFetching: boolean;
|
|
2995
|
-
isInitialLoading: boolean;
|
|
2996
|
-
isPaused: boolean;
|
|
2997
|
-
isRefetching: boolean;
|
|
2998
|
-
isStale: boolean;
|
|
2999
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
3000
|
-
created: RoundCreated[];
|
|
3001
|
-
}, Error>>;
|
|
3002
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
3003
|
-
promise: Promise<{
|
|
3004
|
-
created: RoundCreated[];
|
|
3005
|
-
}>;
|
|
3006
|
-
} | {
|
|
3007
|
-
data: {
|
|
3008
|
-
voteStartTimestamp: number | null;
|
|
3009
|
-
voteEndTimestamp: number | null;
|
|
3010
|
-
isFirstRound: boolean;
|
|
3011
|
-
isLastRound: boolean;
|
|
3012
|
-
roundId?: string | undefined;
|
|
3013
|
-
proposer?: string | undefined;
|
|
3014
|
-
voteStart?: string | undefined;
|
|
3015
|
-
voteEnd?: string | undefined;
|
|
3016
|
-
appsIds?: string[] | undefined;
|
|
3017
|
-
state?: keyof typeof RoundState;
|
|
3018
|
-
isCurrent?: boolean | undefined;
|
|
3019
|
-
};
|
|
3020
|
-
isLoading: boolean;
|
|
3021
|
-
isError: boolean;
|
|
3022
|
-
error: unknown;
|
|
3023
|
-
isPending: true;
|
|
3024
|
-
isLoadingError: false;
|
|
3025
|
-
isRefetchError: false;
|
|
3026
|
-
isSuccess: false;
|
|
3027
|
-
isPlaceholderData: false;
|
|
3028
|
-
status: "pending";
|
|
3029
|
-
dataUpdatedAt: number;
|
|
3030
|
-
errorUpdatedAt: number;
|
|
3031
|
-
failureCount: number;
|
|
3032
|
-
failureReason: Error | null;
|
|
3033
|
-
errorUpdateCount: number;
|
|
3034
|
-
isFetched: boolean;
|
|
3035
|
-
isFetchedAfterMount: boolean;
|
|
3036
|
-
isFetching: boolean;
|
|
3037
|
-
isInitialLoading: boolean;
|
|
3038
|
-
isPaused: boolean;
|
|
3039
|
-
isRefetching: boolean;
|
|
3040
|
-
isStale: boolean;
|
|
3041
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
3042
|
-
created: RoundCreated[];
|
|
3043
|
-
}, Error>>;
|
|
3044
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
3045
|
-
promise: Promise<{
|
|
3046
|
-
created: RoundCreated[];
|
|
3047
|
-
}>;
|
|
3048
|
-
} | {
|
|
3049
|
-
data: {
|
|
3050
|
-
voteStartTimestamp: number | null;
|
|
3051
|
-
voteEndTimestamp: number | null;
|
|
3052
|
-
isFirstRound: boolean;
|
|
3053
|
-
isLastRound: boolean;
|
|
3054
|
-
roundId?: string | undefined;
|
|
3055
|
-
proposer?: string | undefined;
|
|
3056
|
-
voteStart?: string | undefined;
|
|
3057
|
-
voteEnd?: string | undefined;
|
|
3058
|
-
appsIds?: string[] | undefined;
|
|
3059
|
-
state?: keyof typeof RoundState;
|
|
3060
|
-
isCurrent?: boolean | undefined;
|
|
3061
|
-
};
|
|
3062
|
-
isLoading: boolean;
|
|
3063
|
-
isError: boolean;
|
|
3064
|
-
error: unknown;
|
|
3065
|
-
isPending: false;
|
|
3066
|
-
isLoadingError: false;
|
|
3067
|
-
isRefetchError: false;
|
|
3068
|
-
isSuccess: true;
|
|
3069
|
-
isPlaceholderData: true;
|
|
3070
|
-
status: "success";
|
|
3071
|
-
dataUpdatedAt: number;
|
|
3072
|
-
errorUpdatedAt: number;
|
|
3073
|
-
failureCount: number;
|
|
3074
|
-
failureReason: Error | null;
|
|
3075
|
-
errorUpdateCount: number;
|
|
3076
|
-
isFetched: boolean;
|
|
3077
|
-
isFetchedAfterMount: boolean;
|
|
3078
|
-
isFetching: boolean;
|
|
3079
|
-
isInitialLoading: boolean;
|
|
3080
|
-
isPaused: boolean;
|
|
3081
|
-
isRefetching: boolean;
|
|
3082
|
-
isStale: boolean;
|
|
3083
|
-
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
3084
|
-
created: RoundCreated[];
|
|
3085
|
-
}, Error>>;
|
|
3086
|
-
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
3087
|
-
promise: Promise<{
|
|
3088
|
-
created: RoundCreated[];
|
|
3089
|
-
}>;
|
|
3090
|
-
};
|
|
3091
|
-
|
|
3092
|
-
/**
|
|
3093
|
-
* Returns the query key for fetching the number of votes for a given app in a roundId.
|
|
3094
|
-
* @param networkType the network type
|
|
3095
|
-
* @param roundId the roundId the get the votes for
|
|
3096
|
-
* @param appId the xApp id (bytes32 hex string)
|
|
3097
|
-
*/
|
|
3098
|
-
declare const getXAppVotesQueryKey: (networkType: NETWORK_TYPE, roundId: number | string, appId: string) => (string | unknown[] | undefined)[];
|
|
3099
|
-
/**
|
|
3100
|
-
* Hook to get the number of votes for a given app in a roundId
|
|
3101
|
-
*
|
|
3102
|
-
* @param roundId the roundId the get the votes for (number or string)
|
|
3103
|
-
* @param appId the xApp id (bytes32 hex string)
|
|
3104
|
-
* @returns the number of votes for a given roundId
|
|
3105
|
-
*/
|
|
3106
|
-
declare const useXAppVotes: (roundId?: number | string, appId?: string) => _tanstack_react_query.UseQueryResult<string, unknown>;
|
|
3107
|
-
|
|
3108
2007
|
/**
|
|
3109
2008
|
* Params for getEvents function
|
|
3110
2009
|
* @param nodeUrl the node url
|
|
@@ -3285,21 +2184,4 @@ declare const txReceiptQueryKey: (txId: string) => string[];
|
|
|
3285
2184
|
*/
|
|
3286
2185
|
declare const useTxReceipt: (txId: string, blockTimeout?: number) => _tanstack_react_query.UseQueryResult<_vechain_sdk_network.TransactionReceipt, Error>;
|
|
3287
2186
|
|
|
3288
|
-
|
|
3289
|
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json
|
|
3290
|
-
* By default, BigInt values cannot be serialized to JSON and will throw an error:
|
|
3291
|
-
* "TypeError: Do not know how to serialize a BigInt"
|
|
3292
|
-
*
|
|
3293
|
-
* This adds a toJSON method to BigInt prototype to allow serialization while preserving
|
|
3294
|
-
* the original BigInt type for contract call arguments. This enables proper type checking
|
|
3295
|
-
* of contract calls while still allowing BigInt values to be safely serialized.
|
|
3296
|
-
*/
|
|
3297
|
-
declare global {
|
|
3298
|
-
interface BigInt {
|
|
3299
|
-
toJSON(): {
|
|
3300
|
-
$bigint: string;
|
|
3301
|
-
};
|
|
3302
|
-
}
|
|
3303
|
-
}
|
|
3304
|
-
|
|
3305
|
-
export { AccessAndSecurityContent, AccessAndSecurityModalProvider, AccountAvatar, type AccountCustomizationContentProps, AccountCustomizationModalProvider, AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, ActionButton, AddressDisplay, AddressDisplayCard, type AllocationRoundWithState, type AllocationVoteCastEvent, type AppConfig, type AppHubApp, AppearanceSettingsContent, AssetButton, AssetsContent, type AssetsContentProps, BalanceSection, BaseModal, BridgeContent, type BuildTransactionProps, CURRENCY, ChangeCurrencyContent, type ChangeCurrencyContentProps, ChooseNameContent, type ChooseNameContentProps, ChooseNameModalProvider, ChooseNameSearchContent, type ChooseNameSearchContentProps, ChooseNameSummaryContent, type ChooseNameSummaryContentProps, ConnectModal, type ConnectModalContentsTypes, ConnectModalProvider, ConnectPopover, ConnectionButton, ConnectionSource, CrossAppConnectionCache, CrossAppConnectionSecurityCard, type CustomTokenInfo, CustomizationContent, CustomizationSummaryContent, type CustomizationSummaryContentProps, DappKitButton, DisconnectConfirmContent, type DisconnectConfirmContentProps, type Domain, DomainRequiredAlert, type DomainsResponse, ENSRecords, ENS_TEXT_RECORDS, EcosystemButton, EcosystemModal, type EcosystemShortcut, EmailLoginButton, EmbeddedWalletContent, type EnrichedLegalDocument, type ExchangeRates, ExchangeWarningAlert, ExploreEcosystemModalProvider, FAQContent, FAQModalProvider, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, FeatureAnnouncementCard, GeneralSettingsContent, type GetEventsProps, type IpfsImage, LanguageSettingsContent, type LegalDocument, type LegalDocumentAgreement, LegalDocumentItem, type LegalDocumentOptions, LegalDocumentSource, LegalDocumentType, LegalDocumentsModal, type LegalDocumentsModalContentsTypes, LegalDocumentsProvider, LocalStorageKey, LoginLoadingModal, LoginWithGoogleButton, MAX_IMAGE_SIZE, MainContent, ManageCustomTokenContent, type ManageCustomTokenContentProps, ModalBackButton, ModalFAQButton, ModalNotificationButton, type MostVotedAppsInRoundReturnType, NFTMediaType, NotificationsModalProvider, PRICE_FEED_IDS, PasskeyLoginButton, PrivyAppInfo, PrivyButton, PrivyLoginMethod, PrivyWalletProvider, type PrivyWalletProviderContextType, ProfileCard, type ProfileCardProps, ProfileContent, type ProfileContentProps, ProfileModalProvider, QuickActionsSection, ReceiveModalProvider, ReceiveTokenContent, type RoundCreated, RoundState, ScrollToTopWrapper, SelectTokenContent, SendTokenContent, SendTokenModalProvider, SendTokenSummaryContent, SettingsContent, type SettingsContentProps, ShareButtons, SmartAccount, type SmartAccountReturnType, SocialIcons, StickyFooterContainer, StickyHeaderContainer, type SupportedToken, SwapTokenContent, TermsAndPrivacyContent, type TextRecords, TokenBalance, type TokenWithBalance, type TokenWithValue, TransactionButtonAndStatus, type TransactionButtonAndStatusProps, TransactionModal, TransactionModalContent, type TransactionModalProps, TransactionModalProvider, TransactionStatus, TransactionStatusErrorType, TransactionToast, TransactionToastProvider, type UnendorsedApp, UpgradeSmartAccountContent, type UpgradeSmartAccountContentProps, UpgradeSmartAccountModal, type UpgradeSmartAccountModalContentsTypes, UpgradeSmartAccountModalProvider, type UpgradeSmartAccountModalStyle, type UploadedImage, type UseSendTransactionReturnValue, type UseWalletReturnType, type UserNode, VeChainKitContext, VeChainKitProvider, VeChainLoginButton, VeChainWithPrivyLoginButton, type VechainKitProviderProps, VechainKitThemeProvider, VersionFooter, ViewFunctionResult, Wallet, WalletButton, type WalletButtonProps, type WalletDisplayVariant, WalletModalProvider, type WalletTokenBalance, type XApp, type XAppMetadata, compressImages, currentBlockQueryKey, fetchAppHubApps, fetchPrivyAppInfo, fetchPrivyStatus, fetchVechainDomain, getAccountAddress, getAccountAddressQueryKey, getAccountBalance, getAccountBalanceQueryKey, getAccountImplementationAddress, getAccountImplementationAddressQueryKey, getAccountVersionQueryKey, getAllEventLogs, getAllocationsRoundStateQueryKey, getAllocationsRoundsEvents, getAllocationsRoundsEventsQueryKey, getAppHubAppsQueryKey, getAvatar, getAvatarLegacy, getAvatarLegacyQueryKey, getAvatarOfAddressQueryKey, getAvatarQueryKey, getB3trBalance, getB3trBalanceQueryKey, getCallClauseQueryKey, getChainId, getChainIdQueryKey, getConfig, getCurrentAccountImplementationVersion, getCurrentAccountImplementationVersionQueryKey, getCurrentAllocationsRoundIdQueryKey, getCustomTokenBalance, getCustomTokenBalanceQueryKey, getCustomTokenInfo, getDomainsOfAddress, getDomainsOfAddressQueryKey, getEnsRecordExistsQueryKey, getErc20Balance, getErc20BalanceQueryKey, getEventLogs, getHasV1SmartAccount, getHasV1SmartAccountQueryKey, getHasVotedInRoundQueryKey, getIpfsImage, getIpfsImageQueryKey, getIpfsMetadata, getIpfsMetadataQueryKey, getIsDeployed, getIsDeployedQueryKey, getIsDomainProtectedQueryKey, getIsPersonAtTimepointQueryKey, getIsPersonQueryKey, getPrivyAppInfoQueryKey, getResolverAddressQueryKey, getRoundRewardQueryKey, getRoundXApps, getRoundXAppsQueryKey, getSmartAccount, getSmartAccountQueryKey, getTextRecords, getTextRecordsQueryKey, getTokenInfo, getTokenUsdPrice, getTokenUsdPriceQueryKey, getTokensInfoByOwnerQueryKey, getUpgradeRequired, getUpgradeRequiredForAccount, getUpgradeRequiredForAccountQueryKey, getUpgradeRequiredQueryKey, getUserBotSignalsQueryKey, getUserNodesQueryKey, getUserVotesInRound, getUserVotesInRoundQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVechainDomainQueryKey, getVersion, getVersionQueryKey, getVot3Balance, getVot3BalanceQueryKey, getVotesInRoundQueryKey, getXAppMetadata, getXAppMetadataQueryKey, getXAppRoundEarnings, getXAppRoundEarningsQueryKey, getXAppTotalEarningsQueryKey, getXAppVotesQueryKey, getXApps, getXAppsMetadataBaseUriQueryKey, getXAppsQueryKey, getXAppsSharesQueryKey, imageCompressionOptions, txReceiptQueryKey, useAccessAndSecurityModal, useAccountBalance, useAccountCustomizationModal, useAccountImplementationAddress, useAccountModal, useAllocationsRound, useAllocationsRoundState, useAllocationsRoundsEvents, useAppHubApps, useBuildTransaction, useCallClause, useChooseNameModal, useClaimVeWorldSubdomain, useClaimVetDomain, useConnectModal, useCrossAppConnectionCache, useCurrency, useCurrentAccountImplementationVersion, useCurrentAllocationsRound, useCurrentAllocationsRoundId, useCurrentBlock, useCustomTokens, useEcosystemShortcuts, useEnsRecordExists, useExploreEcosystemModal, useFAQModal, useFeatureAnnouncement, useFetchAppInfo, useFetchPrivyStatus, useGalaxyMemberTokensInfo, useGetAccountAddress, useGetAccountVersion, useGetAvatar, useGetAvatarLegacy, useGetAvatarOfAddress, useGetB3trBalance, useGetChainId, useGetCustomTokenBalances, useGetCustomTokenInfo, useGetDomainsOfAddress, useGetErc20Balance, useGetNodeUrl, useGetResolverAddress, useGetTextRecords, useGetTokenUsdPrice, useGetUserNode, useGetUserNodes, useGetVeDelegateBalance, useGetVot3Balance, useHasV1SmartAccount, useHasVotedInRound, useIpfsImage, useIpfsImageList, useIpfsMetadata, useIpfsMetadatas, useIsDomainProtected, useIsPWA, useIsPerson, useIsPersonAtTimepoint, useIsSmartAccountDeployed, useIsUserPerson, useLegalDocuments, useLocalStorage, useLoginModalContent, useLoginWithOAuth, useLoginWithPasskey, useLoginWithVeChain, useMostVotedAppsInRound, useMultipleXAppRoundEarnings, useNotificationAlerts, useNotifications, useNotificationsModal, usePrivyWalletProvider, useProfileModal, useReceiveModal, useRefreshBalances, useRefreshFactoryQueries, useRefreshMetadata, useRefreshSmartAccountQueries, useRoundReward, useRoundXApps, useScrollToTop, useSendTokenModal, useSendTransaction, useSignMessage, useSignTypedData, useSingleImageUpload, useSmartAccount, useSmartAccountVersion, useSyncableLocalStorage, useTokenBalances, useTokenBalances2, useTokenPrices, useTokenPrices2, useTokensWithValues, useTotalBalance, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useUnsetDomain, useUpdateTextRecord, useUpgradeRequired, useUpgradeRequiredForAccount, useUpgradeSmartAccount, useUpgradeSmartAccountModal, useUploadImages, useUserBotSignals, useUserVotesInRound, useVeChainKitConfig, useVechainDomain, useVotesInRound, useVotingRewards, useWallet, useWalletMetadata, useWalletModal, useXApp, useXAppMetadata, useXAppRoundEarnings, useXAppTotalEarnings, useXAppVotes, useXApps, useXAppsMetadataBaseUri, useXAppsShares };
|
|
2187
|
+
export { AccessAndSecurityContent, AccessAndSecurityModalProvider, AccountAvatar, type AccountCustomizationContentProps, AccountCustomizationModalProvider, AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, ActionButton, AddressDisplay, AddressDisplayCard, type AppConfig, type AppHubApp, AppearanceSettingsContent, AssetButton, AssetsContent, type AssetsContentProps, BalanceSection, BaseModal, BridgeContent, type BuildTransactionProps, CURRENCY, ChangeCurrencyContent, type ChangeCurrencyContentProps, ChooseNameContent, type ChooseNameContentProps, ChooseNameModalProvider, ChooseNameSearchContent, type ChooseNameSearchContentProps, ChooseNameSummaryContent, type ChooseNameSummaryContentProps, ConnectModal, type ConnectModalContentsTypes, ConnectModalProvider, ConnectPopover, ConnectionButton, ConnectionSource, CrossAppConnectionCache, CrossAppConnectionSecurityCard, type CustomTokenInfo, CustomizationContent, CustomizationSummaryContent, type CustomizationSummaryContentProps, DappKitButton, DisconnectConfirmContent, type DisconnectConfirmContentProps, type Domain, DomainRequiredAlert, type DomainsResponse, ENSRecords, ENS_TEXT_RECORDS, EcosystemButton, EcosystemModal, type EcosystemShortcut, EmailLoginButton, EmbeddedWalletContent, type EnrichedLegalDocument, type ExchangeRates, ExchangeWarningAlert, ExploreEcosystemModalProvider, FAQContent, FAQModalProvider, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, FeatureAnnouncementCard, GeneralSettingsContent, type GetEventsProps, type IpfsImage, LanguageSettingsContent, type LegalDocument, type LegalDocumentAgreement, LegalDocumentItem, type LegalDocumentOptions, LegalDocumentSource, LegalDocumentType, LegalDocumentsModal, type LegalDocumentsModalContentsTypes, LegalDocumentsProvider, LocalStorageKey, LoginLoadingModal, LoginWithGoogleButton, MAX_IMAGE_SIZE, MainContent, ManageCustomTokenContent, type ManageCustomTokenContentProps, ModalBackButton, ModalFAQButton, ModalNotificationButton, type MostVotedAppsInRoundReturnType, NFTMediaType, NotificationsModalProvider, PRICE_FEED_IDS, PasskeyLoginButton, PrivyAppInfo, PrivyButton, PrivyLoginMethod, PrivyWalletProvider, type PrivyWalletProviderContextType, ProfileCard, type ProfileCardProps, ProfileContent, type ProfileContentProps, ProfileModalProvider, QuickActionsSection, ReceiveModalProvider, ReceiveTokenContent, ScrollToTopWrapper, SelectTokenContent, SendTokenContent, SendTokenModalProvider, SendTokenSummaryContent, SettingsContent, type SettingsContentProps, ShareButtons, SmartAccount, type SmartAccountReturnType, SocialIcons, StickyFooterContainer, StickyHeaderContainer, type SupportedToken, SwapTokenContent, TermsAndPrivacyContent, type TextRecords, TokenBalance, type TokenWithBalance, type TokenWithValue, TransactionButtonAndStatus, type TransactionButtonAndStatusProps, TransactionModal, TransactionModalContent, type TransactionModalProps, TransactionModalProvider, TransactionStatus, TransactionStatusErrorType, TransactionToast, TransactionToastProvider, UpgradeSmartAccountContent, type UpgradeSmartAccountContentProps, UpgradeSmartAccountModal, type UpgradeSmartAccountModalContentsTypes, UpgradeSmartAccountModalProvider, type UpgradeSmartAccountModalStyle, type UploadedImage, type UseSendTransactionReturnValue, type UseWalletReturnType, VeChainKitContext, VeChainKitProvider, VeChainLoginButton, VeChainWithPrivyLoginButton, type VechainKitProviderProps, VechainKitThemeProvider, VersionFooter, ViewFunctionResult, Wallet, WalletButton, type WalletButtonProps, type WalletDisplayVariant, WalletModalProvider, type WalletTokenBalance, type XApp, type XAppMetadata, compressImages, currentBlockQueryKey, fetchAppHubApps, fetchPrivyAppInfo, fetchPrivyStatus, fetchVechainDomain, getAccountAddress, getAccountAddressQueryKey, getAccountBalance, getAccountBalanceQueryKey, getAccountImplementationAddress, getAccountImplementationAddressQueryKey, getAccountVersionQueryKey, getAllEventLogs, getAppHubAppsQueryKey, getAvatar, getAvatarLegacy, getAvatarLegacyQueryKey, getAvatarOfAddressQueryKey, getAvatarQueryKey, getB3trBalance, getB3trBalanceQueryKey, getCallClauseQueryKey, getCallClauseQueryKeyWithArgs, getChainId, getChainIdQueryKey, getConfig, getCurrentAccountImplementationVersion, getCurrentAccountImplementationVersionQueryKey, getCurrentAllocationsRoundIdQueryKey, getCustomTokenBalance, getCustomTokenBalanceQueryKey, getCustomTokenInfo, getDomainsOfAddress, getDomainsOfAddressQueryKey, getEnsRecordExistsQueryKey, getErc20Balance, getErc20BalanceQueryKey, getEventLogs, getHasV1SmartAccount, getHasV1SmartAccountQueryKey, getIpfsImage, getIpfsImageQueryKey, getIpfsMetadata, getIpfsMetadataQueryKey, getIsDeployed, getIsDeployedQueryKey, getIsDomainProtectedQueryKey, getIsPersonQueryKey, getPrivyAppInfoQueryKey, getResolverAddressQueryKey, getRoundXAppsQueryKey, getSmartAccount, getSmartAccountQueryKey, getTextRecords, getTextRecordsQueryKey, getTokenInfo, getTokenUsdPrice, getTokenUsdPriceQueryKey, getUpgradeRequired, getUpgradeRequiredForAccount, getUpgradeRequiredForAccountQueryKey, getUpgradeRequiredQueryKey, getVechainDomainQueryKey, getVersion, getVersionQueryKey, getVot3Balance, getVot3BalanceQueryKey, getXAppMetadata, getXAppsSharesQueryKey, imageCompressionOptions, txReceiptQueryKey, useAccessAndSecurityModal, useAccountBalance, useAccountCustomizationModal, useAccountImplementationAddress, useAccountModal, useAppHubApps, useBuildTransaction, useCallClause, useChooseNameModal, useClaimVeWorldSubdomain, useClaimVetDomain, useConnectModal, useCrossAppConnectionCache, useCurrency, useCurrentAccountImplementationVersion, useCurrentAllocationsRoundId, useCurrentBlock, useCustomTokens, useEcosystemShortcuts, useEnsRecordExists, useExploreEcosystemModal, useFAQModal, useFeatureAnnouncement, useFetchAppInfo, useFetchPrivyStatus, useGetAccountAddress, useGetAccountVersion, useGetAvatar, useGetAvatarLegacy, useGetAvatarOfAddress, useGetB3trBalance, useGetChainId, useGetCustomTokenBalances, useGetCustomTokenInfo, useGetDomainsOfAddress, useGetErc20Balance, useGetNodeUrl, useGetResolverAddress, useGetTextRecords, useGetTokenUsdPrice, useGetVot3Balance, useHasV1SmartAccount, useIpfsImage, useIpfsImageList, useIpfsMetadata, useIpfsMetadatas, useIsDomainProtected, useIsPWA, useIsPerson, useIsSmartAccountDeployed, useLegalDocuments, useLocalStorage, useLoginModalContent, useLoginWithOAuth, useLoginWithPasskey, useLoginWithVeChain, useMostVotedAppsInRound, useNotificationAlerts, useNotifications, useNotificationsModal, usePrivyWalletProvider, useProfileModal, useReceiveModal, useRefreshBalances, useRefreshFactoryQueries, useRefreshMetadata, useRefreshSmartAccountQueries, useRoundXApps, useScrollToTop, useSendTokenModal, useSendTransaction, useSignMessage, useSignTypedData, useSingleImageUpload, useSmartAccount, useSmartAccountVersion, useSyncableLocalStorage, useTokenBalances, useTokenPrices, useTokensWithValues, useTotalBalance, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useUnsetDomain, useUpdateTextRecord, useUpgradeRequired, useUpgradeRequiredForAccount, useUpgradeSmartAccount, useUpgradeSmartAccountModal, useUploadImages, useVeChainKitConfig, useVechainDomain, useWallet, useWalletMetadata, useWalletModal, useXAppMetadata, useXAppsShares };
|