@vechain/vechain-kit 0.11.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +260 -6
- package/dist/index.d.ts +1860 -227
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +64 -56
package/dist/index.d.ts
CHANGED
|
@@ -4,14 +4,18 @@ import * as React$1 from 'react';
|
|
|
4
4
|
import React__default, { ReactElement, ReactNode, ElementType } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { IconType } from 'react-icons';
|
|
7
|
-
import { WalletListEntry, User } from '@privy-io/react-auth';
|
|
7
|
+
import { WalletListEntry, SignTypedDataParams, User } from '@privy-io/react-auth';
|
|
8
8
|
export { useCrossAppAccounts, usePrivy } from '@privy-io/react-auth';
|
|
9
9
|
import { WalletSource, LogLevel } from '@vechain/dapp-kit';
|
|
10
10
|
import { WalletConnectOptions } from '@vechain/dapp-kit-react';
|
|
11
11
|
export { useConnex } from '@vechain/dapp-kit-react';
|
|
12
12
|
import { CustomizedStyle, SourceInfo, I18n } from '@vechain/dapp-kit-ui';
|
|
13
13
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
14
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
15
|
+
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
14
16
|
import { ThorClient } from '@vechain/sdk-network';
|
|
17
|
+
import { Interface } from 'ethers';
|
|
18
|
+
import { BigNumber } from 'bignumber.js';
|
|
15
19
|
import { Account } from 'viem/accounts';
|
|
16
20
|
|
|
17
21
|
declare const SimpleAccountABI: readonly [{
|
|
@@ -727,44 +731,44 @@ declare const SimpleAccountFactoryABI: readonly [{
|
|
|
727
731
|
readonly type: "function";
|
|
728
732
|
}];
|
|
729
733
|
|
|
730
|
-
type Props$
|
|
734
|
+
type Props$A = {
|
|
731
735
|
boxSize?: string | number;
|
|
732
736
|
} & Omit<BoxProps, 'dangerouslySetInnerHTML'>;
|
|
733
|
-
declare const GoogleLogo: React__default.FC<Props$
|
|
737
|
+
declare const GoogleLogo: React__default.FC<Props$A>;
|
|
734
738
|
|
|
735
|
-
type Props$
|
|
739
|
+
type Props$z = {
|
|
736
740
|
isDark?: boolean;
|
|
737
741
|
boxSize?: string | number;
|
|
738
742
|
} & Omit<BoxProps, 'dangerouslySetInnerHTML'>;
|
|
739
|
-
declare const TwitterLogo: React__default.FC<Props$
|
|
743
|
+
declare const TwitterLogo: React__default.FC<Props$z>;
|
|
740
744
|
|
|
741
|
-
type Props$
|
|
745
|
+
type Props$y = {
|
|
742
746
|
isDark?: boolean;
|
|
743
747
|
} & Omit<IconProps, 'dangerouslySetInnerHTML'>;
|
|
744
|
-
declare const VechainLogo: React__default.FC<Props$
|
|
748
|
+
declare const VechainLogo: React__default.FC<Props$y>;
|
|
745
749
|
|
|
746
|
-
type Props$
|
|
750
|
+
type Props$x = {
|
|
747
751
|
isDark?: boolean;
|
|
748
752
|
} & Omit<ImageProps, 'dangerouslySetInnerHTML'>;
|
|
749
|
-
declare const VechainLogoHorizontal: React__default.FC<Props$
|
|
753
|
+
declare const VechainLogoHorizontal: React__default.FC<Props$x>;
|
|
750
754
|
|
|
751
|
-
type Props$
|
|
755
|
+
type Props$w = {
|
|
752
756
|
isDark?: boolean;
|
|
753
757
|
} & Omit<ImageProps, 'dangerouslySetInnerHTML'>;
|
|
754
|
-
declare const PrivyLogo: React__default.FC<Props$
|
|
758
|
+
declare const PrivyLogo: React__default.FC<Props$w>;
|
|
755
759
|
|
|
756
|
-
type Props$
|
|
760
|
+
type Props$v = {
|
|
757
761
|
isOpen: boolean;
|
|
758
762
|
onClose: () => void;
|
|
759
763
|
};
|
|
760
|
-
type
|
|
761
|
-
declare const ConnectModal: ({ isOpen, onClose }: Props$
|
|
764
|
+
type ConnectModalContentsTypes = 'main' | 'email-verification' | 'faq';
|
|
765
|
+
declare const ConnectModal: ({ isOpen, onClose }: Props$v) => react_jsx_runtime.JSX.Element;
|
|
762
766
|
|
|
763
|
-
type Props$
|
|
764
|
-
setCurrentContent: React__default.Dispatch<React__default.SetStateAction<
|
|
767
|
+
type Props$u = {
|
|
768
|
+
setCurrentContent: React__default.Dispatch<React__default.SetStateAction<ConnectModalContentsTypes>>;
|
|
765
769
|
onClose: () => void;
|
|
766
770
|
};
|
|
767
|
-
declare const MainContent: ({ onClose }: Props$
|
|
771
|
+
declare const MainContent: ({ setCurrentContent, onClose }: Props$u) => react_jsx_runtime.JSX.Element;
|
|
768
772
|
|
|
769
773
|
interface ConnectionButtonProps {
|
|
770
774
|
isDark: boolean;
|
|
@@ -777,22 +781,10 @@ declare const ConnectionButton: ({ isDark, onClick, text, icon, customIcon, }: C
|
|
|
777
781
|
|
|
778
782
|
declare const EmailLoginButton: () => react_jsx_runtime.JSX.Element;
|
|
779
783
|
|
|
780
|
-
type Props$
|
|
781
|
-
isDark: boolean;
|
|
782
|
-
};
|
|
783
|
-
declare const VeChainLoginButton: ({ isDark }: Props$s) => react_jsx_runtime.JSX.Element;
|
|
784
|
-
|
|
785
|
-
type Props$r = {
|
|
786
|
-
isDark: boolean;
|
|
787
|
-
privySocialLoginEnabled: boolean;
|
|
788
|
-
};
|
|
789
|
-
declare const EcosystemButton: ({ isDark, privySocialLoginEnabled }: Props$r) => react_jsx_runtime.JSX.Element;
|
|
790
|
-
|
|
791
|
-
type Props$q = {
|
|
784
|
+
type Props$t = {
|
|
792
785
|
isDark: boolean;
|
|
793
|
-
onViewMoreLogin: () => void;
|
|
794
786
|
};
|
|
795
|
-
declare const
|
|
787
|
+
declare const VeChainLoginButton: ({ isDark }: Props$t) => react_jsx_runtime.JSX.Element;
|
|
796
788
|
|
|
797
789
|
type Wallet = {
|
|
798
790
|
address: string | null;
|
|
@@ -872,6 +864,7 @@ type PrivyAppInfo = {
|
|
|
872
864
|
email_auth: boolean;
|
|
873
865
|
google_oauth: boolean;
|
|
874
866
|
twitter_oauth: boolean;
|
|
867
|
+
url: string;
|
|
875
868
|
};
|
|
876
869
|
type PrivyLoginMethod = 'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'apple' | 'farcaster' | 'telegram';
|
|
877
870
|
type TransactionProgress = {
|
|
@@ -879,6 +872,39 @@ type TransactionProgress = {
|
|
|
879
872
|
totalSteps: number;
|
|
880
873
|
currentStepDescription?: string;
|
|
881
874
|
};
|
|
875
|
+
interface CrossAppConnectionCache {
|
|
876
|
+
timestamp: number;
|
|
877
|
+
ecosystemApp: {
|
|
878
|
+
name: string;
|
|
879
|
+
logoUrl?: string;
|
|
880
|
+
appId: string;
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
declare enum NFTMediaType {
|
|
884
|
+
IMAGE = "image",
|
|
885
|
+
VIDEO = "video",
|
|
886
|
+
UNKNOWN = "unknown",
|
|
887
|
+
TEXT = "text"
|
|
888
|
+
}
|
|
889
|
+
declare enum VePassportUserStatus {
|
|
890
|
+
NONE = "NONE",
|
|
891
|
+
WHITELIST = "WHITELIST",
|
|
892
|
+
BLACKLIST = "BLACKLIST"
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
type Props$s = {
|
|
896
|
+
isDark: boolean;
|
|
897
|
+
privySocialLoginEnabled: boolean;
|
|
898
|
+
appsInfo: PrivyAppInfo[];
|
|
899
|
+
isLoading: boolean;
|
|
900
|
+
};
|
|
901
|
+
declare const EcosystemButton: ({ isDark, privySocialLoginEnabled, appsInfo, isLoading, }: Props$s) => react_jsx_runtime.JSX.Element;
|
|
902
|
+
|
|
903
|
+
type Props$r = {
|
|
904
|
+
isDark: boolean;
|
|
905
|
+
onViewMoreLogin: () => void;
|
|
906
|
+
};
|
|
907
|
+
declare const PrivyButton: ({ isDark, onViewMoreLogin }: Props$r) => react_jsx_runtime.JSX.Element;
|
|
882
908
|
|
|
883
909
|
/**
|
|
884
910
|
* The type of network that we are connected to (indentified by the genesis block)
|
|
@@ -910,7 +936,7 @@ declare const genesises: {
|
|
|
910
936
|
readonly main: Connex.Thor.Block;
|
|
911
937
|
readonly test: Connex.Thor.Block;
|
|
912
938
|
readonly solo: Connex.Thor.Block;
|
|
913
|
-
which(gid: string): "main" | "
|
|
939
|
+
which(gid: string): "main" | "test" | "solo" | undefined;
|
|
914
940
|
};
|
|
915
941
|
|
|
916
942
|
type VechainKitProps = {
|
|
@@ -930,7 +956,7 @@ type VechainKitProps = {
|
|
|
930
956
|
loginMethods: PrivyLoginMethod[];
|
|
931
957
|
allowPasskeyLinking?: boolean;
|
|
932
958
|
};
|
|
933
|
-
privyEcosystemAppIDS
|
|
959
|
+
privyEcosystemAppIDS?: string[];
|
|
934
960
|
feeDelegation: {
|
|
935
961
|
delegatorUrl: string;
|
|
936
962
|
delegateAllTransactions: boolean;
|
|
@@ -998,7 +1024,7 @@ declare const useVeChainKitConfig: () => VeChainKitConfig;
|
|
|
998
1024
|
/**
|
|
999
1025
|
* Provider to wrap the application with Privy and DAppKit
|
|
1000
1026
|
*/
|
|
1001
|
-
declare const VeChainKit: ({ children, privy, feeDelegation, dappKit, loginModalUI, darkMode, i18n, language, network, privyEcosystemAppIDS, }: Omit<VechainKitProps, "queryClient">) => react_jsx_runtime.JSX.Element;
|
|
1027
|
+
declare const VeChainKit: ({ children, privy, feeDelegation, dappKit, loginModalUI, darkMode, i18n: i18nConfig, language, network, privyEcosystemAppIDS, }: Omit<VechainKitProps, "queryClient">) => react_jsx_runtime.JSX.Element;
|
|
1002
1028
|
|
|
1003
1029
|
interface PrivyWalletProviderContextType {
|
|
1004
1030
|
accountFactory: string;
|
|
@@ -1010,6 +1036,8 @@ interface PrivyWalletProviderContextType {
|
|
|
1010
1036
|
buttonText?: string;
|
|
1011
1037
|
onProgress?: (progress: TransactionProgress) => void;
|
|
1012
1038
|
}) => Promise<string>;
|
|
1039
|
+
signTypedData: (data: SignTypedDataParams) => Promise<string>;
|
|
1040
|
+
signMessage: (message: string) => Promise<string>;
|
|
1013
1041
|
exportWallet: () => Promise<void>;
|
|
1014
1042
|
}
|
|
1015
1043
|
/**
|
|
@@ -1033,22 +1061,22 @@ declare const PrivyWalletProvider: ({ children, nodeUrl, delegatorUrl, delegateA
|
|
|
1033
1061
|
}) => react_jsx_runtime.JSX.Element;
|
|
1034
1062
|
declare const usePrivyWalletProvider: () => PrivyWalletProviderContextType;
|
|
1035
1063
|
|
|
1036
|
-
type Props$
|
|
1064
|
+
type Props$q = {
|
|
1037
1065
|
isDark: boolean;
|
|
1038
1066
|
loginModalUI: VechainKitProps['loginModalUI'];
|
|
1039
1067
|
};
|
|
1040
|
-
declare const SocialLoginButtons: ({ isDark, loginModalUI }: Props$
|
|
1068
|
+
declare const SocialLoginButtons: ({ isDark, loginModalUI }: Props$q) => react_jsx_runtime.JSX.Element;
|
|
1041
1069
|
|
|
1042
|
-
type Props$
|
|
1070
|
+
type Props$p = {
|
|
1043
1071
|
isDark: boolean;
|
|
1044
1072
|
};
|
|
1045
|
-
declare const PasskeyLoginButton: ({ isDark }: Props$
|
|
1073
|
+
declare const PasskeyLoginButton: ({ isDark }: Props$p) => react_jsx_runtime.JSX.Element;
|
|
1046
1074
|
|
|
1047
|
-
type Props$
|
|
1075
|
+
type Props$o = {
|
|
1048
1076
|
isDark: boolean;
|
|
1049
1077
|
privySocialLoginEnabled: boolean;
|
|
1050
1078
|
};
|
|
1051
|
-
declare const DappKitButton: ({ isDark, privySocialLoginEnabled }: Props$
|
|
1079
|
+
declare const DappKitButton: ({ isDark, privySocialLoginEnabled }: Props$o) => react_jsx_runtime.JSX.Element;
|
|
1052
1080
|
|
|
1053
1081
|
type WalletButtonProps = {
|
|
1054
1082
|
mobileVariant?: 'icon' | 'iconAndDomain' | 'iconDomainAndAddress';
|
|
@@ -1087,11 +1115,11 @@ type TransactionToastProps = {
|
|
|
1087
1115
|
};
|
|
1088
1116
|
declare const TransactionToast: ({ isOpen, onClose, status, txReceipt, error, resetStatus, progress, }: TransactionToastProps) => react_jsx_runtime.JSX.Element | null;
|
|
1089
1117
|
|
|
1090
|
-
type Props$
|
|
1118
|
+
type Props$n = {
|
|
1091
1119
|
isOpen: boolean;
|
|
1092
1120
|
onClose: () => void;
|
|
1093
1121
|
};
|
|
1094
|
-
declare const AccountModal: ({ isOpen, onClose }: Props$
|
|
1122
|
+
declare const AccountModal: ({ isOpen, onClose }: Props$n) => react_jsx_runtime.JSX.Element;
|
|
1095
1123
|
|
|
1096
1124
|
type SendTokenSummaryContentProps = {
|
|
1097
1125
|
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
@@ -1110,7 +1138,7 @@ type SendTokenSummaryContentProps = {
|
|
|
1110
1138
|
};
|
|
1111
1139
|
declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, }: SendTokenSummaryContentProps) => react_jsx_runtime.JSX.Element;
|
|
1112
1140
|
|
|
1113
|
-
type AccountModalContentTypes = 'main' | 'settings' | 'smart-account' | 'accounts' | 'send-token' | 'receive-token' | 'swap-token' | 'choose-name' | {
|
|
1141
|
+
type AccountModalContentTypes = 'main' | 'faq' | 'settings' | 'smart-account' | 'accounts' | 'send-token' | 'receive-token' | 'swap-token' | 'connection-details' | 'choose-name' | 'privy-linked-accounts' | {
|
|
1114
1142
|
type: 'send-token-summary';
|
|
1115
1143
|
props: SendTokenSummaryContentProps;
|
|
1116
1144
|
} | {
|
|
@@ -1127,36 +1155,36 @@ type AccountModalContentTypes = 'main' | 'settings' | 'smart-account' | 'account
|
|
|
1127
1155
|
};
|
|
1128
1156
|
};
|
|
1129
1157
|
|
|
1130
|
-
type Props$
|
|
1158
|
+
type Props$m = {
|
|
1131
1159
|
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1132
1160
|
onClose: () => void;
|
|
1133
1161
|
wallet: Wallet;
|
|
1134
1162
|
};
|
|
1135
|
-
declare const AccountMainContent: ({ setCurrentContent, wallet }: Props$
|
|
1163
|
+
declare const AccountMainContent: ({ setCurrentContent, wallet }: Props$m) => react_jsx_runtime.JSX.Element;
|
|
1136
1164
|
|
|
1137
|
-
type Props$
|
|
1165
|
+
type Props$l = {
|
|
1138
1166
|
setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
|
|
1139
1167
|
onClose: () => void;
|
|
1140
1168
|
wallet?: Wallet;
|
|
1141
1169
|
};
|
|
1142
|
-
declare const AccountsListContent: ({ setCurrentContent, onClose }: Props$
|
|
1170
|
+
declare const AccountsListContent: ({ setCurrentContent, onClose }: Props$l) => react_jsx_runtime.JSX.Element;
|
|
1143
1171
|
|
|
1144
|
-
type Props$
|
|
1172
|
+
type Props$k = {
|
|
1145
1173
|
setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
|
|
1146
1174
|
};
|
|
1147
|
-
declare const SmartAccountContent: ({ setCurrentContent }: Props$
|
|
1175
|
+
declare const SmartAccountContent: ({ setCurrentContent }: Props$k) => react_jsx_runtime.JSX.Element;
|
|
1148
1176
|
|
|
1149
|
-
type Props$
|
|
1177
|
+
type Props$j = {
|
|
1150
1178
|
setCurrentContent: (content: AccountModalContentTypes) => void;
|
|
1151
1179
|
onLogoutSuccess: () => void;
|
|
1152
1180
|
};
|
|
1153
|
-
declare const WalletSettingsContent: ({ setCurrentContent, onLogoutSuccess, }: Props$
|
|
1181
|
+
declare const WalletSettingsContent: ({ setCurrentContent, onLogoutSuccess, }: Props$j) => react_jsx_runtime.JSX.Element;
|
|
1154
1182
|
|
|
1155
|
-
type Props$
|
|
1183
|
+
type Props$i = {
|
|
1156
1184
|
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1157
1185
|
onSend: (address: string, amount: string) => void;
|
|
1158
1186
|
};
|
|
1159
|
-
declare const SendTokenContent: ({ setCurrentContent, onSend }: Props$
|
|
1187
|
+
declare const SendTokenContent: ({ setCurrentContent, onSend }: Props$i) => react_jsx_runtime.JSX.Element;
|
|
1160
1188
|
|
|
1161
1189
|
type Token = {
|
|
1162
1190
|
symbol: string;
|
|
@@ -1165,27 +1193,27 @@ type Token = {
|
|
|
1165
1193
|
numericBalance: number;
|
|
1166
1194
|
price: number;
|
|
1167
1195
|
};
|
|
1168
|
-
type Props$
|
|
1196
|
+
type Props$h = {
|
|
1169
1197
|
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1170
1198
|
onSelectToken: (token: Token) => void;
|
|
1171
1199
|
onBack: () => void;
|
|
1172
1200
|
};
|
|
1173
|
-
declare const SelectTokenContent: ({ onSelectToken, onBack }: Props$
|
|
1201
|
+
declare const SelectTokenContent: ({ onSelectToken, onBack }: Props$h) => react_jsx_runtime.JSX.Element;
|
|
1174
1202
|
|
|
1175
|
-
type Props$
|
|
1203
|
+
type Props$g = {
|
|
1176
1204
|
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1177
1205
|
};
|
|
1178
|
-
declare const ReceiveTokenContent: ({ setCurrentContent }: Props$
|
|
1206
|
+
declare const ReceiveTokenContent: ({ setCurrentContent }: Props$g) => react_jsx_runtime.JSX.Element;
|
|
1179
1207
|
|
|
1180
|
-
type Props$
|
|
1208
|
+
type Props$f = {
|
|
1181
1209
|
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1182
1210
|
};
|
|
1183
|
-
declare const SwapTokenContent: ({ setCurrentContent }: Props$
|
|
1211
|
+
declare const SwapTokenContent: ({ setCurrentContent }: Props$f) => react_jsx_runtime.JSX.Element;
|
|
1184
1212
|
|
|
1185
|
-
type Props$
|
|
1213
|
+
type Props$e = {
|
|
1186
1214
|
setCurrentContent: (content: AccountModalContentTypes) => void;
|
|
1187
1215
|
};
|
|
1188
|
-
declare const ChooseNameContent: ({ setCurrentContent }: Props$
|
|
1216
|
+
declare const ChooseNameContent: ({ setCurrentContent }: Props$e) => react_jsx_runtime.JSX.Element;
|
|
1189
1217
|
|
|
1190
1218
|
type ChooseNameSearchContentProps = {
|
|
1191
1219
|
name: string;
|
|
@@ -1193,15 +1221,20 @@ type ChooseNameSearchContentProps = {
|
|
|
1193
1221
|
};
|
|
1194
1222
|
declare const ChooseNameSearchContent: ({ name: initialName, setCurrentContent, }: ChooseNameSearchContentProps) => react_jsx_runtime.JSX.Element;
|
|
1195
1223
|
|
|
1196
|
-
type Props$
|
|
1224
|
+
type Props$d = {
|
|
1197
1225
|
setCurrentContent: (content: AccountModalContentTypes) => void;
|
|
1198
1226
|
name: string;
|
|
1199
1227
|
};
|
|
1200
|
-
declare const ChooseNameSummaryContent: ({ setCurrentContent, name, }: Props$
|
|
1228
|
+
declare const ChooseNameSummaryContent: ({ setCurrentContent, name, }: Props$d) => react_jsx_runtime.JSX.Element;
|
|
1229
|
+
|
|
1230
|
+
type Props$c = {
|
|
1231
|
+
onGoBack: () => void;
|
|
1232
|
+
};
|
|
1233
|
+
declare const FAQContent: ({ onGoBack }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1201
1234
|
|
|
1202
1235
|
interface AccountDetailsButtonProps {
|
|
1203
1236
|
title: string;
|
|
1204
|
-
|
|
1237
|
+
wallet: Wallet;
|
|
1205
1238
|
onClick: () => void;
|
|
1206
1239
|
leftIcon?: ElementType;
|
|
1207
1240
|
rightIcon?: ElementType;
|
|
@@ -1210,7 +1243,7 @@ interface AccountDetailsButtonProps {
|
|
|
1210
1243
|
border?: string;
|
|
1211
1244
|
isActive?: boolean;
|
|
1212
1245
|
}
|
|
1213
|
-
declare const AccountDetailsButton: ({ leftIcon, rightIcon, title,
|
|
1246
|
+
declare const AccountDetailsButton: ({ leftIcon, rightIcon, title, wallet, onClick, leftImage, isActive, }: AccountDetailsButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1214
1247
|
|
|
1215
1248
|
interface ActionButtonProps {
|
|
1216
1249
|
title: string;
|
|
@@ -1224,8 +1257,10 @@ interface ActionButtonProps {
|
|
|
1224
1257
|
hide?: boolean;
|
|
1225
1258
|
_hover?: object;
|
|
1226
1259
|
showComingSoon?: boolean;
|
|
1260
|
+
isDisabled?: boolean;
|
|
1261
|
+
stacked?: boolean;
|
|
1227
1262
|
}
|
|
1228
|
-
declare const ActionButton: ({ leftIcon, rightIcon, title, description, onClick, leftImage, hide, showComingSoon, backgroundColor, _hover, }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1263
|
+
declare const ActionButton: ({ leftIcon, rightIcon, title, description, onClick, leftImage, hide, showComingSoon, backgroundColor, _hover, isDisabled, stacked, }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1229
1264
|
|
|
1230
1265
|
type Props$b = {
|
|
1231
1266
|
wallet: Wallet;
|
|
@@ -1329,40 +1364,28 @@ type AddressDisplayCardProps = {
|
|
|
1329
1364
|
};
|
|
1330
1365
|
declare const AddressDisplayCard: ({ label, address, domain, imageSrc, imageAlt, hideAddress, }: AddressDisplayCardProps) => react_jsx_runtime.JSX.Element;
|
|
1331
1366
|
|
|
1367
|
+
type FAQButtonProps = {
|
|
1368
|
+
onClick: () => void;
|
|
1369
|
+
} & Partial<IconButtonProps>;
|
|
1370
|
+
declare const ModalFAQButton: ({ onClick, ...props }: FAQButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1371
|
+
|
|
1332
1372
|
type LoginLoadingModalProps = {
|
|
1333
1373
|
isOpen: boolean;
|
|
1334
1374
|
onClose: () => void;
|
|
1335
1375
|
error?: string;
|
|
1336
1376
|
title?: string;
|
|
1337
1377
|
loadingText?: string;
|
|
1378
|
+
onTryAgain?: () => void;
|
|
1338
1379
|
};
|
|
1339
|
-
declare const LoginLoadingModal: ({ isOpen, onClose, error, title, loadingText, }: LoginLoadingModalProps) => react_jsx_runtime.JSX.Element;
|
|
1380
|
+
declare const LoginLoadingModal: ({ isOpen, onClose, error, title, loadingText, onTryAgain, }: LoginLoadingModalProps) => react_jsx_runtime.JSX.Element;
|
|
1340
1381
|
|
|
1341
1382
|
type Props = {
|
|
1342
1383
|
isOpen: boolean;
|
|
1343
1384
|
onClose: () => void;
|
|
1344
|
-
|
|
1345
|
-
declare const EcosystemModal: ({ isOpen, onClose }: Props) => react_jsx_runtime.JSX.Element;
|
|
1346
|
-
|
|
1347
|
-
/**
|
|
1348
|
-
* Poll the chain for a transaction receipt until it is found (or timeout after 5 blocks)
|
|
1349
|
-
* @param thor Thor instance
|
|
1350
|
-
* @param id Transaction id
|
|
1351
|
-
* @param blocksTimeout Number of blocks to wait for the receipt
|
|
1352
|
-
* @returns Transaction receipt
|
|
1353
|
-
*/
|
|
1354
|
-
declare const pollForReceipt: (thor: Connex.Thor, id?: string, blocksTimeout?: number) => Promise<Connex.Thor.Transaction.Receipt>;
|
|
1355
|
-
/**
|
|
1356
|
-
* Get the tx receipt of a tx id with a block timeout to wait for the receipt
|
|
1357
|
-
* @param txId The tx id to get the receipt
|
|
1358
|
-
* @param blockTimeout The block timeout to wait for the receipt
|
|
1359
|
-
* @returns The tx receipt
|
|
1360
|
-
*/
|
|
1361
|
-
declare const useTxReceipt: (txId?: string, blockTimeout?: number) => {
|
|
1362
|
-
data: Connex.Thor.Transaction.Receipt | null | undefined;
|
|
1363
|
-
error: Error | null;
|
|
1385
|
+
appsInfo: PrivyAppInfo[];
|
|
1364
1386
|
isLoading: boolean;
|
|
1365
1387
|
};
|
|
1388
|
+
declare const EcosystemModal: ({ isOpen, onClose, appsInfo, isLoading, }: Props) => react_jsx_runtime.JSX.Element;
|
|
1366
1389
|
|
|
1367
1390
|
declare const PRICE_FEED_IDS: {
|
|
1368
1391
|
readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
|
|
@@ -1374,161 +1397,1637 @@ declare const getTokenUsdPrice: (thor: Connex.Thor, token: SupportedToken, netwo
|
|
|
1374
1397
|
declare const getTokenUsdPriceQueryKey: (token: SupportedToken) => string[];
|
|
1375
1398
|
declare const useGetTokenUsdPrice: (token: SupportedToken) => _tanstack_react_query.UseQueryResult<number, Error>;
|
|
1376
1399
|
|
|
1377
|
-
|
|
1400
|
+
type TokenBalance = {
|
|
1401
|
+
original: string;
|
|
1402
|
+
scaled: string;
|
|
1403
|
+
formatted: string;
|
|
1404
|
+
};
|
|
1405
|
+
/**
|
|
1406
|
+
* Get the b3tr balance of an address from the contract
|
|
1407
|
+
* @param thor The thor instance
|
|
1408
|
+
* @param network The network type
|
|
1409
|
+
* @param address The address to get the balance of. If not provided, will return an error (for better react-query DX)
|
|
1410
|
+
* @returns Balance of the token in the form of {@link TokenBalance} (original, scaled down and formatted)
|
|
1411
|
+
*/
|
|
1412
|
+
declare const getB3trBalance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<TokenBalance>;
|
|
1378
1413
|
declare const getB3trBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1379
|
-
declare const useGetB3trBalance: (address?: string) => _tanstack_react_query.UseQueryResult<
|
|
1414
|
+
declare const useGetB3trBalance: (address?: string) => _tanstack_react_query.UseQueryResult<TokenBalance, Error>;
|
|
1380
1415
|
|
|
1381
|
-
declare const getVot3Balance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<
|
|
1416
|
+
declare const getVot3Balance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<TokenBalance>;
|
|
1382
1417
|
declare const getVot3BalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1383
|
-
declare const useGetVot3Balance: (address?: string) => _tanstack_react_query.UseQueryResult<
|
|
1384
|
-
|
|
1385
|
-
declare const getVeDelegateBalance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<string>;
|
|
1386
|
-
declare const getVeDelegateBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1387
|
-
declare const useGetVeDelegateBalance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
1388
|
-
|
|
1389
|
-
declare const fetchPrivyAppInfo: (appId: string) => Promise<PrivyAppInfo>;
|
|
1390
|
-
declare const getPrivyAppInfoQueryKey: (appIds: string | string[]) => string[];
|
|
1391
|
-
declare const useFetchAppInfo: (appIds: string | string[]) => _tanstack_react_query.UseQueryResult<{
|
|
1392
|
-
[k: string]: PrivyAppInfo;
|
|
1393
|
-
}, Error>;
|
|
1394
|
-
|
|
1395
|
-
interface VeChainDomainResult$2 {
|
|
1396
|
-
address?: string;
|
|
1397
|
-
domain?: string;
|
|
1398
|
-
isValidAddressOrDomain: boolean;
|
|
1399
|
-
isLoading: boolean;
|
|
1400
|
-
}
|
|
1401
|
-
declare const getVetDomainQueryKey: (addressOrDomain: string) => string[];
|
|
1402
|
-
declare const useGetVetDomain: (addressOrDomain: string) => _tanstack_react_query.UseQueryResult<VeChainDomainResult$2, Error>;
|
|
1403
|
-
|
|
1404
|
-
interface VeChainDomainResult$1 {
|
|
1405
|
-
address?: string;
|
|
1406
|
-
domain?: string;
|
|
1407
|
-
isValidAddressOrDomain: boolean;
|
|
1408
|
-
isLoading: boolean;
|
|
1409
|
-
}
|
|
1410
|
-
interface CachedVeChainDomainResult {
|
|
1411
|
-
domainResult: VeChainDomainResult$1;
|
|
1412
|
-
getCachedDomain: () => string | null;
|
|
1413
|
-
saveCachedDomain: (domain: string) => void;
|
|
1414
|
-
}
|
|
1415
|
-
declare const useCachedVeChainDomain: (address: string) => CachedVeChainDomainResult;
|
|
1418
|
+
declare const useGetVot3Balance: (address?: string) => _tanstack_react_query.UseQueryResult<TokenBalance, Error>;
|
|
1416
1419
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1420
|
+
/**
|
|
1421
|
+
* Custom hook for retrieving data related to an X-Node.
|
|
1422
|
+
*
|
|
1423
|
+
* @returns An object containing the following properties:
|
|
1424
|
+
* - xNodeName: The name of the X-Node.
|
|
1425
|
+
* - xNodeImage: The image URL of the X-Node.
|
|
1426
|
+
* - xNodePoints: The points of the X-Node.
|
|
1427
|
+
* - isXNodeHolder: A boolean indicating whether the user is an X-Node holder.
|
|
1428
|
+
* - attachedGMTokenId: The token ID of the GM NFT attached to the X-Node.
|
|
1429
|
+
* */
|
|
1430
|
+
interface XNodeData {
|
|
1431
|
+
isXNodeLoading: boolean;
|
|
1432
|
+
isXNodeError: boolean;
|
|
1433
|
+
xNodeError: any;
|
|
1434
|
+
xNodeId: string | undefined;
|
|
1435
|
+
xNodeName: string;
|
|
1436
|
+
nodeType: string;
|
|
1437
|
+
xNodeImage: string;
|
|
1438
|
+
xNodeLevel: number;
|
|
1439
|
+
xNodeOwner: string | undefined;
|
|
1440
|
+
isXNodeHolder: boolean;
|
|
1441
|
+
isXNodeDelegator: boolean;
|
|
1442
|
+
isXNodeDelegated: boolean;
|
|
1443
|
+
isXNodeDelegatee: boolean;
|
|
1444
|
+
delegatee: string | undefined;
|
|
1445
|
+
attachedGMTokenId: string | undefined;
|
|
1446
|
+
isXNodeAttachedToGM: boolean;
|
|
1447
|
+
isXNodeOnCooldown: boolean;
|
|
1448
|
+
allNodes: Array<{
|
|
1449
|
+
nodeId: string;
|
|
1450
|
+
nodeLevel: number;
|
|
1451
|
+
xNodeOwner: string;
|
|
1452
|
+
isXNodeHolder: boolean;
|
|
1453
|
+
isXNodeDelegated: boolean;
|
|
1454
|
+
isXNodeDelegator: boolean;
|
|
1455
|
+
isXNodeDelegatee: boolean;
|
|
1456
|
+
delegatee: string;
|
|
1457
|
+
}>;
|
|
1422
1458
|
}
|
|
1423
|
-
declare const
|
|
1424
|
-
declare const useEnsRecordExists: (name: string, node: string) => _tanstack_react_query.UseQueryResult<VeChainDomainResult, Error>;
|
|
1459
|
+
declare const useXNode: () => XNodeData;
|
|
1425
1460
|
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1461
|
+
/**
|
|
1462
|
+
* UserXNode type for the xNodes owned by a user
|
|
1463
|
+
* @property id the xNode id
|
|
1464
|
+
* @property level the xNode level
|
|
1465
|
+
* @property image the xNode image
|
|
1466
|
+
* @property name the xNode name
|
|
1467
|
+
*/
|
|
1468
|
+
type UserXNode = {
|
|
1469
|
+
id: string;
|
|
1470
|
+
level: number;
|
|
1471
|
+
image: string;
|
|
1472
|
+
name: string;
|
|
1431
1473
|
};
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
b3tr: number;
|
|
1463
|
-
vot3: number;
|
|
1464
|
-
veDelegate: number;
|
|
1465
|
-
};
|
|
1466
|
-
prices: {
|
|
1467
|
-
vet: number;
|
|
1468
|
-
vtho: number;
|
|
1469
|
-
b3tr: number;
|
|
1470
|
-
};
|
|
1471
|
-
totalBalance: number;
|
|
1474
|
+
/**
|
|
1475
|
+
* Returns all the available (owned and delegated) xNodes from the NodeManagement contract
|
|
1476
|
+
* @param thor the thor client
|
|
1477
|
+
* @param networkType the network type
|
|
1478
|
+
* @param user the user address
|
|
1479
|
+
* @returns all the available xNodes for an user
|
|
1480
|
+
*/
|
|
1481
|
+
declare const getUserXNodes: (thor: Connex.Thor, networkType: NETWORK_TYPE, user?: string) => Promise<UserXNode[]>;
|
|
1482
|
+
declare const getUserXNodesQueryKey: (user?: string) => (string | undefined)[];
|
|
1483
|
+
/**
|
|
1484
|
+
* Hook to get the owned or delegated xNodes for a user from the NodeManagement contract
|
|
1485
|
+
* @param user the user address
|
|
1486
|
+
* @returns the xNodes for the user
|
|
1487
|
+
*/
|
|
1488
|
+
declare const useXNodes: (user?: string) => _tanstack_react_query.UseQueryResult<UserXNode[], Error>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Hook to get the owned or delegated xNodes for a user from the NodeManagement contract
|
|
1491
|
+
* @returns the xNodes for the user
|
|
1492
|
+
*/
|
|
1493
|
+
declare const useUserXNodes: () => _tanstack_react_query.UseQueryResult<UserXNode[], Error>;
|
|
1494
|
+
|
|
1495
|
+
type UserNode = {
|
|
1496
|
+
nodeId: string;
|
|
1497
|
+
nodeLevel: number;
|
|
1498
|
+
xNodeOwner: string;
|
|
1499
|
+
isXNodeHolder: boolean;
|
|
1500
|
+
isXNodeDelegated: boolean;
|
|
1501
|
+
isXNodeDelegator: boolean;
|
|
1502
|
+
isXNodeDelegatee: boolean;
|
|
1503
|
+
delegatee: string;
|
|
1472
1504
|
};
|
|
1505
|
+
/**
|
|
1506
|
+
* Get the query key for fetching user nodes
|
|
1507
|
+
* @param user - The address of the user to check
|
|
1508
|
+
*/
|
|
1509
|
+
declare const getUserNodesQueryKey: (user?: string) => any[];
|
|
1510
|
+
/**
|
|
1511
|
+
* Hook to get delegation details for all nodes associated with a user
|
|
1512
|
+
* @param user - The address of the user to check
|
|
1513
|
+
* @returns An array of objects containing user node details
|
|
1514
|
+
*/
|
|
1515
|
+
declare const useGetUserNodes: (user?: string) => UseQueryResult<UserNode[], Error>;
|
|
1516
|
+
declare const useGetUserNode: (user?: string) => UseQueryResult<UserNode[], Error>;
|
|
1473
1517
|
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
network: NETWORK_TYPE;
|
|
1496
|
-
};
|
|
1497
|
-
disconnect: () => Promise<void>;
|
|
1498
|
-
};
|
|
1499
|
-
declare const useWallet: () => UseWalletReturnType;
|
|
1518
|
+
/**
|
|
1519
|
+
* Get the query key for checking if an address is a node holder.
|
|
1520
|
+
* @param address - The address to check.
|
|
1521
|
+
*/
|
|
1522
|
+
declare const getIsNodeHolderQueryKey: (address: string) => string[];
|
|
1523
|
+
/**
|
|
1524
|
+
* Get the node holder status of an address from the contract
|
|
1525
|
+
*
|
|
1526
|
+
* @param thor The thor instance
|
|
1527
|
+
* @param networkType The network type
|
|
1528
|
+
* @param address The address to check
|
|
1529
|
+
* @returns Boolean indicating if the address is a node holder
|
|
1530
|
+
*/
|
|
1531
|
+
declare const getIsNodeHolder: (thor: Connex.Thor, networkType: NETWORK_TYPE, address: string) => Promise<boolean>;
|
|
1532
|
+
/**
|
|
1533
|
+
* Custom hook that checks if a user is a node holder (either directly or through delegation).
|
|
1534
|
+
*
|
|
1535
|
+
* @param address - The address to check.
|
|
1536
|
+
* @returns UseQueryResult containing a boolean indicating if the address is a node holder.
|
|
1537
|
+
*/
|
|
1538
|
+
declare const useIsNodeHolder: (address: string) => _tanstack_react_query.UseQueryResult<boolean, Error>;
|
|
1500
1539
|
|
|
1501
|
-
declare const
|
|
1502
|
-
|
|
1503
|
-
};
|
|
1540
|
+
declare const getNodeCheckCooldownQueryKey: (nodeId: string) => any[];
|
|
1541
|
+
declare const useXNodeCheckCooldown: (nodeId: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
1504
1542
|
|
|
1505
|
-
declare const getAccountBalance: (thor: Connex.Thor, address?: string) => Promise<{
|
|
1506
|
-
balance: string;
|
|
1507
|
-
energy: string;
|
|
1508
|
-
}>;
|
|
1509
|
-
declare const getAccountBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1510
1543
|
/**
|
|
1511
|
-
* Get the
|
|
1512
|
-
* @param
|
|
1513
|
-
* @
|
|
1544
|
+
* Get the admin of the app
|
|
1545
|
+
* @param thor the thor connection
|
|
1546
|
+
* @param appId the id of the app
|
|
1547
|
+
* @param networkType the network type
|
|
1548
|
+
* @returns the admin of the app
|
|
1514
1549
|
*/
|
|
1515
|
-
declare const
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1550
|
+
declare const getAppAdmin: (thor: Connex.Thor, appId: string, networkType: NETWORK_TYPE) => Promise<string>;
|
|
1551
|
+
declare const getAppAdminQueryKey: (appId: string) => string[];
|
|
1552
|
+
/**
|
|
1553
|
+
* Get the admin of the app
|
|
1554
|
+
* @param appId the id of the app
|
|
1555
|
+
* @returns the admin of the app
|
|
1556
|
+
*/
|
|
1557
|
+
declare const useAppAdmin: (appId: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
1519
1558
|
|
|
1520
|
-
declare const getChainId: (thor: ThorClient) => Promise<string>;
|
|
1521
|
-
declare const getChainIdQueryKey: () => string[];
|
|
1522
1559
|
/**
|
|
1523
|
-
*
|
|
1524
|
-
* @param
|
|
1525
|
-
* @returns The account balance
|
|
1560
|
+
* Get the query key for a boolean value indicating if the app exists
|
|
1561
|
+
* @param appId the app id
|
|
1526
1562
|
*/
|
|
1527
|
-
declare const
|
|
1563
|
+
declare const getAppExistsQueryKey: (appId: string) => any[];
|
|
1564
|
+
/**
|
|
1565
|
+
* Hook to get a boolean value indicating if the app exists
|
|
1566
|
+
* @param appId the app id
|
|
1567
|
+
* @returns a boolean value, true for apps that have been included in at least one allocation round
|
|
1568
|
+
*/
|
|
1569
|
+
declare const useAppExists: (appId: string) => UseQueryResult<boolean, Error>;
|
|
1528
1570
|
|
|
1529
|
-
|
|
1571
|
+
/**
|
|
1572
|
+
* Returns all apps that will be eligible in the next allocation round
|
|
1573
|
+
* @param thor the thor client
|
|
1574
|
+
* @param networkType the network type
|
|
1575
|
+
* @returns the ids of eligible apps
|
|
1576
|
+
*/
|
|
1577
|
+
declare const getAppsEligibleInNextRound: (thor: Connex.Thor, networkType: NETWORK_TYPE) => Promise<string[]>;
|
|
1578
|
+
declare const getAppsEligibleInNextRoundQueryKey: () => string[];
|
|
1579
|
+
/**
|
|
1580
|
+
* Hook to get all apps that will be eligible in the next allocation round
|
|
1581
|
+
* @returns the ids of eligible apps
|
|
1582
|
+
*/
|
|
1583
|
+
declare const useAppsEligibleInNextRound: () => _tanstack_react_query.UseQueryResult<string[], Error>;
|
|
1530
1584
|
|
|
1531
|
-
|
|
1585
|
+
/**
|
|
1586
|
+
* xApp type
|
|
1587
|
+
* @property id the xApp id
|
|
1588
|
+
* @property teamWalletAddress the xApp address
|
|
1589
|
+
* @property name the xApp name
|
|
1590
|
+
* @property metadataURI the xApp metadata URI
|
|
1591
|
+
* @property createdAtTimestamp timestamp when xApp was added
|
|
1592
|
+
*/
|
|
1593
|
+
type XApp = {
|
|
1594
|
+
id: string;
|
|
1595
|
+
teamWalletAddress: string;
|
|
1596
|
+
name: string;
|
|
1597
|
+
metadataURI: string;
|
|
1598
|
+
createdAtTimestamp: string;
|
|
1599
|
+
};
|
|
1600
|
+
type UnendorsedApp = XApp & {
|
|
1601
|
+
appAvailableForAllocationVoting: boolean;
|
|
1602
|
+
};
|
|
1603
|
+
/**
|
|
1604
|
+
* This function is here nad not coupled with the hook as we need it with SSR, and dapp-kit broke the pre-fetching
|
|
1605
|
+
* Returns all the available xApps in the B3TR ecosystem
|
|
1606
|
+
* @param thor the thor client
|
|
1607
|
+
* @returns all the available xApps in the ecosystem capped to 256 see {@link XApp}
|
|
1608
|
+
*/
|
|
1609
|
+
type GetAllApps = {
|
|
1610
|
+
active: XApp[];
|
|
1611
|
+
unendorsed: UnendorsedApp[];
|
|
1612
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1613
|
+
endorsed: XApp[];
|
|
1614
|
+
};
|
|
1615
|
+
declare const getXApps: (thor: Connex.Thor, networkType: NETWORK_TYPE) => Promise<GetAllApps>;
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* Returns all the available xApps (apps that can be voted on for allocation)
|
|
1619
|
+
* @param thor the thor client
|
|
1620
|
+
* @param networkType the network type
|
|
1621
|
+
* @param roundId the id of the round the get state for
|
|
1622
|
+
* @returns all the available xApps (apps that can be voted on for allocation) capped to 256 see {@link XApp}
|
|
1623
|
+
*/
|
|
1624
|
+
declare const getRoundXApps: (thor: Connex.Thor, networkType: NETWORK_TYPE, roundId?: string) => Promise<XApp[]>;
|
|
1625
|
+
declare const getRoundXAppsQueryKey: (roundId?: string) => (string | undefined)[];
|
|
1626
|
+
/**
|
|
1627
|
+
* Hook to get all the available xApps (apps that can be voted on for allocation)
|
|
1628
|
+
*
|
|
1629
|
+
* @param roundId the id of the round the get state for
|
|
1630
|
+
*
|
|
1631
|
+
* @returns all the available xApps (apps that can be voted on for allocation) capped to 256
|
|
1632
|
+
*/
|
|
1633
|
+
declare const useRoundXApps: (roundId?: string) => _tanstack_react_query.UseQueryResult<XApp[], Error>;
|
|
1634
|
+
|
|
1635
|
+
type AllocationVoteCastEvent = {
|
|
1636
|
+
voter: string;
|
|
1637
|
+
roundId: string;
|
|
1638
|
+
appsIds: string[];
|
|
1639
|
+
voteWeights: string[];
|
|
1640
|
+
};
|
|
1641
|
+
declare const getUserVotesInRound: (thor: Connex.Thor, network: NETWORK_TYPE, roundId?: string, address?: string) => Promise<AllocationVoteCastEvent[]>;
|
|
1642
|
+
declare const getUserVotesInRoundQueryKey: (roundId?: string, address?: string) => (string | undefined)[];
|
|
1643
|
+
/**
|
|
1644
|
+
* Hook to get the user votes in a given round from the xAllocationVoting contract
|
|
1645
|
+
* @returns the user votes in a given round from the xAllocationVoting contract
|
|
1646
|
+
*/
|
|
1647
|
+
declare const useUserVotesInRound: (roundId?: string, address?: string) => _tanstack_react_query.UseQueryResult<AllocationVoteCastEvent, Error>;
|
|
1648
|
+
declare const getVotesInRoundQueryKey: (roundId?: string) => (string | undefined)[];
|
|
1649
|
+
/**
|
|
1650
|
+
* Hook to get the allocation rounds events from the xAllocationVoting contract (i.e the proposals created)
|
|
1651
|
+
* @returns the allocation rounds events (i.e the proposals created)
|
|
1652
|
+
*/
|
|
1653
|
+
declare const useVotesInRound: (roundId?: string, enabled?: boolean) => _tanstack_react_query.UseQueryResult<AllocationVoteCastEvent[], Error>;
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* Hook to get a specific xApp using useXApps
|
|
1657
|
+
* @param appId the xApp id
|
|
1658
|
+
* @returns the xApp with the given id
|
|
1659
|
+
*/
|
|
1660
|
+
declare const useXApp: (appId: string) => {
|
|
1661
|
+
error: Error;
|
|
1662
|
+
isError: true;
|
|
1663
|
+
isPending: false;
|
|
1664
|
+
isLoading: false;
|
|
1665
|
+
isLoadingError: false;
|
|
1666
|
+
isRefetchError: true;
|
|
1667
|
+
isSuccess: false;
|
|
1668
|
+
status: "error";
|
|
1669
|
+
dataUpdatedAt: number;
|
|
1670
|
+
errorUpdatedAt: number;
|
|
1671
|
+
failureCount: number;
|
|
1672
|
+
failureReason: Error | null;
|
|
1673
|
+
errorUpdateCount: number;
|
|
1674
|
+
isFetched: boolean;
|
|
1675
|
+
isFetchedAfterMount: boolean;
|
|
1676
|
+
isFetching: boolean;
|
|
1677
|
+
isInitialLoading: boolean;
|
|
1678
|
+
isPaused: boolean;
|
|
1679
|
+
isPlaceholderData: boolean;
|
|
1680
|
+
isRefetching: boolean;
|
|
1681
|
+
isStale: boolean;
|
|
1682
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
1683
|
+
active: XApp[];
|
|
1684
|
+
unendorsed: UnendorsedApp[];
|
|
1685
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1686
|
+
endorsed: XApp[];
|
|
1687
|
+
}, Error>>;
|
|
1688
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
1689
|
+
promise: Promise<{
|
|
1690
|
+
active: XApp[];
|
|
1691
|
+
unendorsed: UnendorsedApp[];
|
|
1692
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1693
|
+
endorsed: XApp[];
|
|
1694
|
+
}>;
|
|
1695
|
+
data: XApp | undefined;
|
|
1696
|
+
} | {
|
|
1697
|
+
error: null;
|
|
1698
|
+
isError: false;
|
|
1699
|
+
isPending: false;
|
|
1700
|
+
isLoading: false;
|
|
1701
|
+
isLoadingError: false;
|
|
1702
|
+
isRefetchError: false;
|
|
1703
|
+
isSuccess: true;
|
|
1704
|
+
status: "success";
|
|
1705
|
+
dataUpdatedAt: number;
|
|
1706
|
+
errorUpdatedAt: number;
|
|
1707
|
+
failureCount: number;
|
|
1708
|
+
failureReason: Error | null;
|
|
1709
|
+
errorUpdateCount: number;
|
|
1710
|
+
isFetched: boolean;
|
|
1711
|
+
isFetchedAfterMount: boolean;
|
|
1712
|
+
isFetching: boolean;
|
|
1713
|
+
isInitialLoading: boolean;
|
|
1714
|
+
isPaused: boolean;
|
|
1715
|
+
isPlaceholderData: boolean;
|
|
1716
|
+
isRefetching: boolean;
|
|
1717
|
+
isStale: boolean;
|
|
1718
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
1719
|
+
active: XApp[];
|
|
1720
|
+
unendorsed: UnendorsedApp[];
|
|
1721
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1722
|
+
endorsed: XApp[];
|
|
1723
|
+
}, Error>>;
|
|
1724
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
1725
|
+
promise: Promise<{
|
|
1726
|
+
active: XApp[];
|
|
1727
|
+
unendorsed: UnendorsedApp[];
|
|
1728
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1729
|
+
endorsed: XApp[];
|
|
1730
|
+
}>;
|
|
1731
|
+
data: XApp | undefined;
|
|
1732
|
+
} | {
|
|
1733
|
+
error: Error;
|
|
1734
|
+
isError: true;
|
|
1735
|
+
isPending: false;
|
|
1736
|
+
isLoading: false;
|
|
1737
|
+
isLoadingError: true;
|
|
1738
|
+
isRefetchError: false;
|
|
1739
|
+
isSuccess: false;
|
|
1740
|
+
status: "error";
|
|
1741
|
+
dataUpdatedAt: number;
|
|
1742
|
+
errorUpdatedAt: number;
|
|
1743
|
+
failureCount: number;
|
|
1744
|
+
failureReason: Error | null;
|
|
1745
|
+
errorUpdateCount: number;
|
|
1746
|
+
isFetched: boolean;
|
|
1747
|
+
isFetchedAfterMount: boolean;
|
|
1748
|
+
isFetching: boolean;
|
|
1749
|
+
isInitialLoading: boolean;
|
|
1750
|
+
isPaused: boolean;
|
|
1751
|
+
isPlaceholderData: boolean;
|
|
1752
|
+
isRefetching: boolean;
|
|
1753
|
+
isStale: boolean;
|
|
1754
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
1755
|
+
active: XApp[];
|
|
1756
|
+
unendorsed: UnendorsedApp[];
|
|
1757
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1758
|
+
endorsed: XApp[];
|
|
1759
|
+
}, Error>>;
|
|
1760
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
1761
|
+
promise: Promise<{
|
|
1762
|
+
active: XApp[];
|
|
1763
|
+
unendorsed: UnendorsedApp[];
|
|
1764
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1765
|
+
endorsed: XApp[];
|
|
1766
|
+
}>;
|
|
1767
|
+
data: XApp | undefined;
|
|
1768
|
+
} | {
|
|
1769
|
+
error: null;
|
|
1770
|
+
isError: false;
|
|
1771
|
+
isPending: true;
|
|
1772
|
+
isLoading: true;
|
|
1773
|
+
isLoadingError: false;
|
|
1774
|
+
isRefetchError: false;
|
|
1775
|
+
isSuccess: false;
|
|
1776
|
+
status: "pending";
|
|
1777
|
+
dataUpdatedAt: number;
|
|
1778
|
+
errorUpdatedAt: number;
|
|
1779
|
+
failureCount: number;
|
|
1780
|
+
failureReason: Error | null;
|
|
1781
|
+
errorUpdateCount: number;
|
|
1782
|
+
isFetched: boolean;
|
|
1783
|
+
isFetchedAfterMount: boolean;
|
|
1784
|
+
isFetching: boolean;
|
|
1785
|
+
isInitialLoading: boolean;
|
|
1786
|
+
isPaused: boolean;
|
|
1787
|
+
isPlaceholderData: boolean;
|
|
1788
|
+
isRefetching: boolean;
|
|
1789
|
+
isStale: boolean;
|
|
1790
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
1791
|
+
active: XApp[];
|
|
1792
|
+
unendorsed: UnendorsedApp[];
|
|
1793
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1794
|
+
endorsed: XApp[];
|
|
1795
|
+
}, Error>>;
|
|
1796
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
1797
|
+
promise: Promise<{
|
|
1798
|
+
active: XApp[];
|
|
1799
|
+
unendorsed: UnendorsedApp[];
|
|
1800
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1801
|
+
endorsed: XApp[];
|
|
1802
|
+
}>;
|
|
1803
|
+
data: XApp | undefined;
|
|
1804
|
+
} | {
|
|
1805
|
+
error: null;
|
|
1806
|
+
isError: false;
|
|
1807
|
+
isPending: true;
|
|
1808
|
+
isLoadingError: false;
|
|
1809
|
+
isRefetchError: false;
|
|
1810
|
+
isSuccess: false;
|
|
1811
|
+
status: "pending";
|
|
1812
|
+
dataUpdatedAt: number;
|
|
1813
|
+
errorUpdatedAt: number;
|
|
1814
|
+
failureCount: number;
|
|
1815
|
+
failureReason: Error | null;
|
|
1816
|
+
errorUpdateCount: number;
|
|
1817
|
+
isFetched: boolean;
|
|
1818
|
+
isFetchedAfterMount: boolean;
|
|
1819
|
+
isFetching: boolean;
|
|
1820
|
+
isLoading: boolean;
|
|
1821
|
+
isInitialLoading: boolean;
|
|
1822
|
+
isPaused: boolean;
|
|
1823
|
+
isPlaceholderData: boolean;
|
|
1824
|
+
isRefetching: boolean;
|
|
1825
|
+
isStale: boolean;
|
|
1826
|
+
refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
|
|
1827
|
+
active: XApp[];
|
|
1828
|
+
unendorsed: UnendorsedApp[];
|
|
1829
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1830
|
+
endorsed: XApp[];
|
|
1831
|
+
}, Error>>;
|
|
1832
|
+
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
1833
|
+
promise: Promise<{
|
|
1834
|
+
active: XApp[];
|
|
1835
|
+
unendorsed: UnendorsedApp[];
|
|
1836
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1837
|
+
endorsed: XApp[];
|
|
1838
|
+
}>;
|
|
1839
|
+
data: XApp | undefined;
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* The metadata of an xApp from the xApps metadata base uri
|
|
1844
|
+
* @property name - The name of the xApp
|
|
1845
|
+
* @property description - The description of the xApp
|
|
1846
|
+
* @property external_url - The external url of the xApp
|
|
1847
|
+
* @property logo - The logo of the xApp (ipfs uri)
|
|
1848
|
+
* @property banner - The banner of the xApp (ipfs uri)
|
|
1849
|
+
* @property screenshots - The screenshots of the xApp (ipfs uri)
|
|
1850
|
+
* @property social_urls - The social urls of the xApp
|
|
1851
|
+
* @property app_urls - The app urls of the xApp
|
|
1852
|
+
*/
|
|
1853
|
+
type XAppMetadata = {
|
|
1854
|
+
name: string;
|
|
1855
|
+
description: string;
|
|
1856
|
+
external_url: string;
|
|
1857
|
+
logo: string;
|
|
1858
|
+
banner: string;
|
|
1859
|
+
screenshots: string[];
|
|
1860
|
+
social_urls: {
|
|
1861
|
+
name: string;
|
|
1862
|
+
url: string;
|
|
1863
|
+
}[];
|
|
1864
|
+
app_urls: {
|
|
1865
|
+
code: string;
|
|
1866
|
+
url: string;
|
|
1867
|
+
}[];
|
|
1868
|
+
tweets: string[];
|
|
1869
|
+
ve_world: {
|
|
1870
|
+
banner: string;
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
/**
|
|
1874
|
+
dapp-kit broke the pre-fetching
|
|
1875
|
+
* @param uri - The uri of the xApps metadata
|
|
1876
|
+
* @returns The metadata of the xApp see {@link XAppMetadata}
|
|
1877
|
+
*/
|
|
1878
|
+
declare const getXAppMetadata: (uri: string, networkType: NETWORK_TYPE) => Promise<XAppMetadata | undefined>;
|
|
1879
|
+
|
|
1880
|
+
declare const getXAppMetadataQueryKey: (metadataURI?: string) => (string | undefined)[];
|
|
1881
|
+
/**
|
|
1882
|
+
* Hook to fetch the metadata of an xApp from the xApps metadata base uri
|
|
1883
|
+
* @param xAppId - The id of the xApp
|
|
1884
|
+
* @returns The metadata of the xApp
|
|
1885
|
+
*/
|
|
1886
|
+
declare const useXAppMetadata: (xAppId?: string) => _tanstack_react_query.UseQueryResult<XAppMetadata | null | undefined, Error>;
|
|
1887
|
+
|
|
1888
|
+
declare const getXAppsQueryKey: () => string[];
|
|
1889
|
+
/**
|
|
1890
|
+
* Hook to get all the available xApps in the B3TR ecosystem
|
|
1891
|
+
* @returns all the available xApps in the B3TR ecosystem capped to 256
|
|
1892
|
+
*/
|
|
1893
|
+
declare const useXApps: () => _tanstack_react_query.UseQueryResult<{
|
|
1894
|
+
active: XApp[];
|
|
1895
|
+
unendorsed: UnendorsedApp[];
|
|
1896
|
+
allApps: (XApp | UnendorsedApp)[];
|
|
1897
|
+
endorsed: XApp[];
|
|
1898
|
+
}, Error>;
|
|
1899
|
+
|
|
1900
|
+
declare const getXAppsMetadataBaseUriQueryKey: () => string[];
|
|
1901
|
+
/**
|
|
1902
|
+
* Hook to get the baseUri of the xApps metadata
|
|
1903
|
+
* @returns the baseUri of the xApps metadata
|
|
1904
|
+
*/
|
|
1905
|
+
declare const useXAppsMetadataBaseUri: () => _tanstack_react_query.UseQueryResult<XApp[], Error>;
|
|
1906
|
+
|
|
1907
|
+
/**
|
|
1908
|
+
* Get the number of votes for a xApp in an allocation round
|
|
1909
|
+
* @param thor the connex instance
|
|
1910
|
+
* @param networkType the network type
|
|
1911
|
+
* @param xAppId the xApp id to get the votes for
|
|
1912
|
+
* @param roundId the round id to get the votes for
|
|
1913
|
+
* @returns the number of votes for the xApp in the round
|
|
1914
|
+
*/
|
|
1915
|
+
declare const getXAppVotes: (thor: Connex.Thor, networkType: NETWORK_TYPE, roundId: string, xAppId: string) => Promise<string>;
|
|
1916
|
+
/**
|
|
1917
|
+
* Returns the query key for fetching the number of votes for a given app in a roundId.
|
|
1918
|
+
* @param roundId the roundId the get the votes for
|
|
1919
|
+
*/
|
|
1920
|
+
declare const getXAppVotesQueryKey: (roundId: number | string, appId?: string) => any[];
|
|
1921
|
+
/**
|
|
1922
|
+
* Hook to get the number of votes for a given app in a roundId
|
|
1923
|
+
*
|
|
1924
|
+
* @param roundId the roundId the get the votes for
|
|
1925
|
+
* @returns the number of votes for a given roundId
|
|
1926
|
+
*/
|
|
1927
|
+
declare const useXAppVotes: (roundId?: number | string, appId?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
1928
|
+
|
|
1929
|
+
/**
|
|
1930
|
+
* Get the number of qf votes for a xApp in an allocation round
|
|
1931
|
+
* @param thor the connex instance
|
|
1932
|
+
* @param xAppId the xApp id to get the votes for
|
|
1933
|
+
* @param roundId the round id to get the votes for
|
|
1934
|
+
* @returns the number of votes for the xApp in the round
|
|
1935
|
+
*/
|
|
1936
|
+
declare const getXAppVotesQf: (thor: Connex.Thor, networkType: NETWORK_TYPE, roundId: string, xAppId: string) => Promise<string>;
|
|
1937
|
+
/**
|
|
1938
|
+
* Returns the query key for fetching the number of quadratic funding votes for a given app in a roundId.
|
|
1939
|
+
* @param roundId the roundId the get the votes for
|
|
1940
|
+
*/
|
|
1941
|
+
declare const getXAppVotesQfQueryKey: (roundId: number | string, appId?: string) => any[];
|
|
1942
|
+
/**
|
|
1943
|
+
* Hook to get the number of quadratic funding votes for a given app in a roundId
|
|
1944
|
+
*
|
|
1945
|
+
* @param roundId the roundId the get the votes for
|
|
1946
|
+
* @returns the number of votes for a given roundId
|
|
1947
|
+
*/
|
|
1948
|
+
declare const useXAppVotesQf: (roundId?: number | string, appId?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
1949
|
+
|
|
1950
|
+
/**
|
|
1951
|
+
* useUserVotes is a custom hook that fetches the votes of a user for all rounds up to the current one.
|
|
1952
|
+
* @param currentRound - The id of the current round.
|
|
1953
|
+
* @param address - The address of the user.
|
|
1954
|
+
* @returns An object containing the status and data of the queries for each round.
|
|
1955
|
+
*/
|
|
1956
|
+
declare const useUserVotesInAllRounds: (address?: string) => _tanstack_react_query.UseQueryResult<AllocationVoteCastEvent[], Error>;
|
|
1957
|
+
|
|
1958
|
+
type AppVotesGiven = {
|
|
1959
|
+
appId: string;
|
|
1960
|
+
votes: number;
|
|
1961
|
+
appName?: string;
|
|
1962
|
+
};
|
|
1963
|
+
/**
|
|
1964
|
+
* Custom hook that retrieves the top voted apps of a specific user.
|
|
1965
|
+
* @param user - The address of the user.
|
|
1966
|
+
* @returns An array containing the top voted apps.
|
|
1967
|
+
*/
|
|
1968
|
+
declare const useUserTopVotedApps: (user?: string) => AppVotesGiven[];
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* Returns the baseUri of the xApps metadata
|
|
1972
|
+
* @param thor the thor client
|
|
1973
|
+
* @param networkType the network type
|
|
1974
|
+
* @returns the baseUri of the xApps metadata
|
|
1975
|
+
*/
|
|
1976
|
+
declare const getXAppsMetadataBaseUri: (thor: Connex.Thor, networkType: NETWORK_TYPE) => Promise<XApp[]>;
|
|
1977
|
+
|
|
1978
|
+
declare const getParticipatedInGovernance: (networkType: NETWORK_TYPE, thor: Connex.Thor, address: null | string) => Promise<boolean>;
|
|
1979
|
+
declare const getParticipatedInGovernanceQueryKey: (address: null | string) => (string | null)[];
|
|
1980
|
+
/**
|
|
1981
|
+
* Get whether an address has participated in governance
|
|
1982
|
+
*
|
|
1983
|
+
* @param address the address to know if they have participated in governance
|
|
1984
|
+
* @returns whether the address has participated in governance
|
|
1985
|
+
*/
|
|
1986
|
+
declare const useParticipatedInGovernance: (address: null | string) => _tanstack_react_query.UseQueryResult<boolean, Error>;
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Get the number of GM NFTs for an address
|
|
1990
|
+
* @param thor the connex instance
|
|
1991
|
+
* @param network the network type
|
|
1992
|
+
* @param address the address to get the number of GM NFts
|
|
1993
|
+
* @returns the number of GM NFTs for the address
|
|
1994
|
+
*/
|
|
1995
|
+
declare const getBalanceOf: (thor: Connex.Thor, network: NETWORK_TYPE, address: null | string) => Promise<number>;
|
|
1996
|
+
declare const getGMbalanceQueryKey: (address: null | string) => (string | null)[];
|
|
1997
|
+
/**
|
|
1998
|
+
* Get the number of GM NFTs for an address
|
|
1999
|
+
* @param address the address to get the number of GM NFTs owned
|
|
2000
|
+
* @returns the number of GM NFTs for the address
|
|
2001
|
+
*/
|
|
2002
|
+
declare const useGMbalance: (address: null | string) => _tanstack_react_query.UseQueryResult<number, Error>;
|
|
2003
|
+
|
|
2004
|
+
/**
|
|
2005
|
+
* Returns whether the user can claim a GM NFT
|
|
2006
|
+
* @returns Whether the user can claim a GM NFT
|
|
2007
|
+
*/
|
|
2008
|
+
declare const useIsGMclaimable: () => {
|
|
2009
|
+
isClaimable: boolean;
|
|
2010
|
+
isOwned: boolean;
|
|
2011
|
+
};
|
|
2012
|
+
|
|
2013
|
+
/**
|
|
2014
|
+
* Get the token ID for an address given an index
|
|
2015
|
+
* @param thor the thor instance
|
|
2016
|
+
* @param networkType the network type
|
|
2017
|
+
* @param address the address to get the token ID for
|
|
2018
|
+
* @param index the index of the token ID
|
|
2019
|
+
*
|
|
2020
|
+
* @returns the token ID for the address
|
|
2021
|
+
*/
|
|
2022
|
+
declare const getTokenIdByAccount: (thor: Connex.Thor, networkType: NETWORK_TYPE, address: null | string, index: number) => Promise<string>;
|
|
2023
|
+
declare const getTokenIdByAccountQueryKey: (address: null | string) => (string | null)[];
|
|
2024
|
+
/**
|
|
2025
|
+
* Get the token ID for an address given an index
|
|
2026
|
+
* @param address the address to get the token ID for
|
|
2027
|
+
* @param index the index of the token ID
|
|
2028
|
+
*
|
|
2029
|
+
* @returns the token ID for the address
|
|
2030
|
+
*/
|
|
2031
|
+
declare const useTokenIdByAccount: (address: null | string, index: number) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
2032
|
+
|
|
2033
|
+
/**
|
|
2034
|
+
* Custom hook for retrieving data related to a Galaxy Member NFT.
|
|
2035
|
+
*
|
|
2036
|
+
* @returns An object containing the following properties:
|
|
2037
|
+
* - gmImage: The image URL of the Galaxy Member NFT.
|
|
2038
|
+
* - gmName: The name of the Galaxy Member NFT.
|
|
2039
|
+
* - gmLevel: The level of the Galaxy Member NFT.
|
|
2040
|
+
* - gmRewardMultiplier: The reward multiplier of the Galaxy Member NFT.
|
|
2041
|
+
* - isGMLoading: A boolean indicating whether the Galaxy Member NFT data is currently being loaded.
|
|
2042
|
+
* - isGMOwned: A boolean indicating whether the user owns the Galaxy Member NFT.
|
|
2043
|
+
* - isGMClaimable: A boolean indicating whether the Galaxy Member NFT is claimable.
|
|
2044
|
+
* - attachedNodeId: The ID of the node attached to the Galaxy Member NFT.
|
|
2045
|
+
*/
|
|
2046
|
+
declare const useSelectedGmNft: (userAddress?: string) => {
|
|
2047
|
+
gmId: any;
|
|
2048
|
+
gmImage: string;
|
|
2049
|
+
gmName: string;
|
|
2050
|
+
gmLevel: any;
|
|
2051
|
+
gmRewardMultiplier: any;
|
|
2052
|
+
nextLevelGMRewardMultiplier: any;
|
|
2053
|
+
isGMLoading: boolean;
|
|
2054
|
+
isGMOwned: boolean;
|
|
2055
|
+
b3trToUpgradeGMToNextLevel: any;
|
|
2056
|
+
isEnoughBalanceToUpgradeGM: boolean | undefined;
|
|
2057
|
+
missingB3trToUpgrade: number;
|
|
2058
|
+
attachedNodeId: any;
|
|
2059
|
+
isLoading: boolean;
|
|
2060
|
+
isError: boolean;
|
|
2061
|
+
error: Error | null;
|
|
2062
|
+
isXNodeAttachedToGM: boolean;
|
|
2063
|
+
maxGmLevel: any;
|
|
2064
|
+
isMaxGmLevelReached: boolean;
|
|
2065
|
+
};
|
|
2066
|
+
|
|
2067
|
+
declare const getLevelOfTokenQueryKey: (tokenId?: string) => any[];
|
|
2068
|
+
/**
|
|
2069
|
+
* Custom hook that retrieves the level of the specified token.
|
|
2070
|
+
*
|
|
2071
|
+
* @param tokenId - The token ID to retrieve the level for.
|
|
2072
|
+
* @param enabled - Determines whether the hook is enabled or not. Default is true.
|
|
2073
|
+
* @returns The level of the specified token.
|
|
2074
|
+
*/
|
|
2075
|
+
declare const useLevelOfToken: (tokenId?: string, enabled?: boolean) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2076
|
+
|
|
2077
|
+
declare const getB3trToUpgradeQueryKey: (tokenId?: string) => any[];
|
|
2078
|
+
/**
|
|
2079
|
+
* Retrieves the amount of B3TR tokens required to upgrade a specific token.
|
|
2080
|
+
*
|
|
2081
|
+
* @param tokenId - The ID of the token.
|
|
2082
|
+
* @param enabled - Flag indicating whether the hook is enabled or not. Default is true.
|
|
2083
|
+
* @returns The result of the call to the contract method.
|
|
2084
|
+
*/
|
|
2085
|
+
declare const useB3trToUpgrade: (tokenId?: string, enabled?: boolean) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2086
|
+
|
|
2087
|
+
declare const getLevelMultiplierQueryKey: (level?: string) => any[];
|
|
2088
|
+
declare const useLevelMultiplier: (level: string, enabled?: boolean) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* Generates a query key for the getTokensInfoByOwner query.
|
|
2092
|
+
* @param owner - The address of the token owner.
|
|
2093
|
+
* @param size - The number of tokens to fetch per page.
|
|
2094
|
+
* @returns An array representing the query key.
|
|
2095
|
+
*/
|
|
2096
|
+
declare const getTokensInfoByOwnerQueryKey: (owner?: string | null) => any[];
|
|
2097
|
+
/**
|
|
2098
|
+
* Custom hook to fetch token information for a specific owner with infinite scrolling support.
|
|
2099
|
+
* @param owner - The address of the token owner.
|
|
2100
|
+
* @param size - The number of tokens to fetch per page.
|
|
2101
|
+
* @returns An infinite query result containing the token information and pagination controls.
|
|
2102
|
+
*/
|
|
2103
|
+
declare const useGetTokensInfoByOwner: (owner: string | null, size?: number) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<{
|
|
2104
|
+
data: {
|
|
2105
|
+
tokenId: string;
|
|
2106
|
+
tokenURI: string;
|
|
2107
|
+
tokenLevel: string;
|
|
2108
|
+
b3trToUpgrade: string;
|
|
2109
|
+
}[];
|
|
2110
|
+
nextPage: number;
|
|
2111
|
+
}, unknown>, Error>;
|
|
2112
|
+
|
|
2113
|
+
declare const getB3trDonatedQueryKey: (tokenId?: string) => any[];
|
|
2114
|
+
/**
|
|
2115
|
+
* Custom hook to fetch the amount of B3TR tokens donated for a given token ID.
|
|
2116
|
+
*
|
|
2117
|
+
* @param {string} [tokenId] - The ID of the token to fetch the donation amount for.
|
|
2118
|
+
* @param {boolean} [enabled=true] - Flag to enable or disable the hook.
|
|
2119
|
+
* @returns The result of the useCall hook, with the donation amount formatted in Ether.
|
|
2120
|
+
*/
|
|
2121
|
+
declare const useB3trDonated: (tokenId?: string, enabled?: boolean) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2122
|
+
|
|
2123
|
+
declare const getNFTMetadataUri: (networkType: NETWORK_TYPE, thor: Connex.Thor, tokenID: null | string) => Promise<string>;
|
|
2124
|
+
declare const getNFTMetadataUriQueryKey: (tokenID: null | string) => (string | null)[];
|
|
2125
|
+
/**
|
|
2126
|
+
* Get the metadata URI for an NFT
|
|
2127
|
+
*
|
|
2128
|
+
* @param tokenID the token ID to get the metadata URI for
|
|
2129
|
+
* @returns the metadata URI for the token
|
|
2130
|
+
*/
|
|
2131
|
+
declare const useNFTMetadataUri: (tokenID: null | string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
2132
|
+
|
|
2133
|
+
/**
|
|
2134
|
+
* Fetches NFT image from IPFS
|
|
2135
|
+
* @param fetchNFT - Whether to fetch the NFT
|
|
2136
|
+
* @returns The NFT image
|
|
2137
|
+
*/
|
|
2138
|
+
type NFTMetadata = {
|
|
2139
|
+
name: string;
|
|
2140
|
+
description: string;
|
|
2141
|
+
image: string;
|
|
2142
|
+
attributes: {
|
|
2143
|
+
trait_type: string;
|
|
2144
|
+
value: string;
|
|
2145
|
+
}[];
|
|
2146
|
+
};
|
|
2147
|
+
declare const useNFTImage: () => {
|
|
2148
|
+
imageData: IpfsImage | undefined;
|
|
2149
|
+
imageMetadata: NFTMetadata | undefined;
|
|
2150
|
+
tokenID: string | undefined;
|
|
2151
|
+
isLoading: boolean;
|
|
2152
|
+
isError: boolean;
|
|
2153
|
+
error: Error | null;
|
|
2154
|
+
};
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* Query key for the `baseURI` method on the Galaxy Member contract.
|
|
2158
|
+
* Using a different name to avoid conflicts with the `baseURI` property on ERC721 contracts.
|
|
2159
|
+
*/
|
|
2160
|
+
declare const getGMBaseUriQueryKey: () => any[];
|
|
2161
|
+
/**
|
|
2162
|
+
* Custom hook that retrieves the base URI for the Galaxy Member NFT.
|
|
2163
|
+
*
|
|
2164
|
+
* @returns The base URI for the Galaxy Member NFT.
|
|
2165
|
+
*/
|
|
2166
|
+
declare const useGMBaseUri: () => UseQueryResult<string, Error>;
|
|
2167
|
+
|
|
2168
|
+
declare const getLevelGradient: (level: number) => string;
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Calculates the final GM level based on the starting level and the amount of B3TR donated.
|
|
2172
|
+
*
|
|
2173
|
+
* @param startingLevel - The initial GM level.
|
|
2174
|
+
* @param b3trDonated - The amount of B3TR donated.
|
|
2175
|
+
* @returns The final GM level after considering the donations, or null if invalid input.
|
|
2176
|
+
* @throws {Error} If startingLevel is not a positive number
|
|
2177
|
+
*/
|
|
2178
|
+
declare const getGMLevel: (startingLevel: number, b3trDonated: number) => number | null;
|
|
2179
|
+
|
|
2180
|
+
/**
|
|
2181
|
+
*
|
|
2182
|
+
* Returns the current roundId of allocations voting
|
|
2183
|
+
* @param thor the thor client
|
|
2184
|
+
* @param networkType the network type
|
|
2185
|
+
* @returns the current roundId of allocations voting
|
|
2186
|
+
*/
|
|
2187
|
+
declare const getCurrentAllocationsRoundId: (thor: Connex.Thor, networkType: NETWORK_TYPE) => Promise<string>;
|
|
2188
|
+
declare const getCurrentAllocationsRoundIdQueryKey: () => string[];
|
|
2189
|
+
/**
|
|
2190
|
+
* Hook to get the current roundId of allocations voting
|
|
2191
|
+
* @returns the current roundId of allocations voting
|
|
2192
|
+
*/
|
|
2193
|
+
declare const useCurrentAllocationsRoundId: () => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
2194
|
+
|
|
2195
|
+
type AllocationAmount = {
|
|
2196
|
+
treasury: string;
|
|
2197
|
+
voteX2Earn: string;
|
|
2198
|
+
voteXAllocations: string;
|
|
2199
|
+
};
|
|
2200
|
+
/**
|
|
2201
|
+
*
|
|
2202
|
+
* Returns the allocation amount for a given roundId
|
|
2203
|
+
* @param thor the thor client
|
|
2204
|
+
* @param roundId the roundId the get the amount for
|
|
2205
|
+
* @param networkType the network type
|
|
2206
|
+
* @returns the allocation amount for a given roundId see {@link AllocationAmount}
|
|
2207
|
+
*/
|
|
2208
|
+
declare const getAllocationAmount: (thor: Connex.Thor, networkType: NETWORK_TYPE, roundId?: string) => Promise<AllocationAmount>;
|
|
2209
|
+
declare const getAllocationAmountQueryKey: (roundId?: string) => (string | undefined)[];
|
|
2210
|
+
/**
|
|
2211
|
+
* Hook to get the allocation amount for a given roundId
|
|
2212
|
+
* @param roundId the roundId the get the amount for
|
|
2213
|
+
* @returns the allocation amount for a given roundId see {@link AllocationAmount}
|
|
2214
|
+
*/
|
|
2215
|
+
declare const useAllocationAmount: (roundId?: string) => _tanstack_react_query.UseQueryResult<AllocationAmount, Error>;
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
*
|
|
2219
|
+
* Returns if a user has voted in a given roundId
|
|
2220
|
+
* @param thor the thor client
|
|
2221
|
+
* @param networkType the network type
|
|
2222
|
+
* @param roundId the roundId the get state for
|
|
2223
|
+
* @param address the address to check if they have voted
|
|
2224
|
+
* @returns if a user has voted in a given roundId
|
|
2225
|
+
*/
|
|
2226
|
+
declare const getHasVotedInRound: (thor: Connex.Thor, networkType: NETWORK_TYPE, roundId?: string, address?: string) => Promise<boolean>;
|
|
2227
|
+
declare const getHasVotedInRoundQueryKey: (roundId?: string, address?: string) => (string | undefined)[];
|
|
2228
|
+
/**
|
|
2229
|
+
* Hook to get if a user has voted in a given roundId
|
|
2230
|
+
* @param roundId the roundId the get the votes for
|
|
2231
|
+
* @param address the address to check if they have voted
|
|
2232
|
+
* @returns if a user has voted in a given roundId
|
|
2233
|
+
*/
|
|
2234
|
+
declare const useHasVotedInRound: (roundId?: string, address?: string) => _tanstack_react_query.UseQueryResult<boolean, Error>;
|
|
2235
|
+
|
|
2236
|
+
type UseXAppRoundEarningsQueryResponse = {
|
|
2237
|
+
amount: string;
|
|
2238
|
+
appId: string;
|
|
2239
|
+
};
|
|
2240
|
+
/**
|
|
2241
|
+
* Get the amount of $B3TR an xApp earned from an allocation round
|
|
2242
|
+
*
|
|
2243
|
+
* @param thor the connex instance
|
|
2244
|
+
* @param roundId the round id
|
|
2245
|
+
* @param xAppId the xApp id
|
|
2246
|
+
* @param networkType the network type
|
|
2247
|
+
* @returns (amount, appId) amount of $B3TR an xApp earned from an allocation round and the xApp id
|
|
2248
|
+
*/
|
|
2249
|
+
declare const getXAppRoundEarnings: (thor: Connex.Thor, roundId: string, xAppId: string, networkType: NETWORK_TYPE) => Promise<UseXAppRoundEarningsQueryResponse>;
|
|
2250
|
+
declare const getXAppRoundEarningsQueryKey: (roundId: string | number, xAppId?: string) => (string | number)[];
|
|
2251
|
+
/**
|
|
2252
|
+
* Get the amount of $B3TR an xApp can claim from an allocation round
|
|
2253
|
+
*
|
|
2254
|
+
* @param roundId the round id
|
|
2255
|
+
* @param xAppId the xApp id
|
|
2256
|
+
* @returns amount of $B3TR an xApp can claim from an allocation round
|
|
2257
|
+
*/
|
|
2258
|
+
declare const useXAppRoundEarnings: (roundId: string, xAppId: string) => _tanstack_react_query.UseQueryResult<UseXAppRoundEarningsQueryResponse | {
|
|
2259
|
+
amount: string;
|
|
2260
|
+
xAppId: string;
|
|
2261
|
+
}, Error>;
|
|
2262
|
+
/**
|
|
2263
|
+
* Get the amount of $B3TR every xApp earned from an allocation round
|
|
2264
|
+
* @param roundId the round id
|
|
2265
|
+
* @param xAppIds the xApp ids
|
|
2266
|
+
* @returns the amount of $B3TR every xApp earned from an allocation round
|
|
2267
|
+
*/
|
|
2268
|
+
declare const useMultipleXAppRoundEarnings: (roundId: string, xAppIds: string[]) => _tanstack_react_query.UseQueryResult<{
|
|
2269
|
+
amount: string;
|
|
2270
|
+
appId: string;
|
|
2271
|
+
}[], Error>;
|
|
2272
|
+
|
|
2273
|
+
declare const getXAppTotalEarningsClauses: (roundIds: number[], app: string, networkType: NETWORK_TYPE) => Connex.VM.Clause[];
|
|
2274
|
+
declare const getXAppTotalEarningsQueryKey: (tillRoundId: string | number, appId: string) => (string | number)[];
|
|
2275
|
+
/**
|
|
2276
|
+
* Total earnings of an xApp in multiple rounds
|
|
2277
|
+
* @param roundIds ids of the rounds
|
|
2278
|
+
* @param appId id of the xApp
|
|
2279
|
+
* @returns the total earnings of the xApp until the last round
|
|
2280
|
+
*/
|
|
2281
|
+
declare const useXAppTotalEarnings: (roundIds: number[], appId: string) => _tanstack_react_query.UseQueryResult<number, Error>;
|
|
2282
|
+
|
|
2283
|
+
/**
|
|
2284
|
+
* Fetch the how much multiple xApps earned in an allocation round
|
|
2285
|
+
* @param appIds the xApps to get the votes for
|
|
2286
|
+
* @param roundId the round id to get the votes for
|
|
2287
|
+
* @returns the earned amount of the xApps in the round and the xApp id
|
|
2288
|
+
*/
|
|
2289
|
+
declare const useRoundEarnings: (roundId: string, appIds: string[]) => _tanstack_react_query.UseQueryResult<{
|
|
2290
|
+
amount: string;
|
|
2291
|
+
appId: string;
|
|
2292
|
+
}, Error>[];
|
|
2293
|
+
|
|
2294
|
+
/**
|
|
2295
|
+
* Get the available balance in the x2Earn rewards pool contract for a specific xApp
|
|
2296
|
+
*
|
|
2297
|
+
* @param thor the connex instance
|
|
2298
|
+
* @param xAppId the xApp id
|
|
2299
|
+
* @param x2EarnRewardsPoolContract the x2Earn rewards pool contract address
|
|
2300
|
+
* @returns the available balance in the x2Earn rewards pool contract for a specific xApp
|
|
2301
|
+
*/
|
|
2302
|
+
declare const getAppBalance: (thor: Connex.Thor, xAppId: string, x2EarnRewardsPoolContract: string) => Promise<TokenBalance>;
|
|
2303
|
+
declare const getAppBalanceQueryKey: (xAppId: string) => string[];
|
|
2304
|
+
/**
|
|
2305
|
+
* Get the balance available in the x2Earn rewards pool contract
|
|
2306
|
+
*
|
|
2307
|
+
* @param thor the connex instance
|
|
2308
|
+
* @param xAppId the xApp id
|
|
2309
|
+
* @returns the balance available in the x2Earn rewards pool contract
|
|
2310
|
+
*/
|
|
2311
|
+
declare const useAppBalance: (xAppId: string) => _tanstack_react_query.UseQueryResult<TokenBalance, Error>;
|
|
2312
|
+
|
|
2313
|
+
/**
|
|
2314
|
+
* Returns the query key for fetching the isPerson status.
|
|
2315
|
+
* @param user - The user address.
|
|
2316
|
+
* @returns The query key for fetching the isPerson status.
|
|
2317
|
+
*/
|
|
2318
|
+
declare const getIsPersonQueryKey: (user: string) => any[];
|
|
2319
|
+
/**
|
|
2320
|
+
* Hook to get the isPerson status from the VeBetterPassport contract.
|
|
2321
|
+
* @param user - The user address.
|
|
2322
|
+
* @returns The isPerson status.
|
|
2323
|
+
*/
|
|
2324
|
+
declare const useIsPerson: (user?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2325
|
+
/**
|
|
2326
|
+
* Hook to get the isPerson status from the VeBetterPassport contract for the current user.
|
|
2327
|
+
* @returns The isPerson status.
|
|
2328
|
+
*/
|
|
2329
|
+
declare const useIsUserPerson: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2330
|
+
|
|
2331
|
+
/**
|
|
2332
|
+
* Returns the query key for fetching the user round score.
|
|
2333
|
+
* @param user - The user address.
|
|
2334
|
+
* @param round - The round number.
|
|
2335
|
+
* @returns The query key for fetching the user round score.
|
|
2336
|
+
*/
|
|
2337
|
+
declare const getUserRoundScoreQueryKey: (user: string, round: number) => any[];
|
|
2338
|
+
/**
|
|
2339
|
+
* Hook to get the user round score from the VeBetterPassport contract.
|
|
2340
|
+
* @param user - The user address.
|
|
2341
|
+
* @param round - The round number.
|
|
2342
|
+
* @returns The user round score.
|
|
2343
|
+
*/
|
|
2344
|
+
declare const useUserRoundScore: (user?: string | null, round?: number) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2345
|
+
/**
|
|
2346
|
+
* Hook to get the user current round score from the VeBetterPassport contract.
|
|
2347
|
+
* @returns The user current round score.
|
|
2348
|
+
*/
|
|
2349
|
+
declare const useUserCurrentRoundScore: () => {
|
|
2350
|
+
data: any;
|
|
2351
|
+
isLoading: boolean;
|
|
2352
|
+
};
|
|
2353
|
+
|
|
2354
|
+
/**
|
|
2355
|
+
* Returns the query key for fetching the threshold participation score.
|
|
2356
|
+
* @returns The query key for fetching the threshold participation score.
|
|
2357
|
+
*/
|
|
2358
|
+
declare const getThresholdParticipationScoreQueryKey: () => any[];
|
|
2359
|
+
/**
|
|
2360
|
+
* Hook to get the threshold participation score from the VeBetterPassport contract.
|
|
2361
|
+
* @returns The threshold participation score.
|
|
2362
|
+
*/
|
|
2363
|
+
declare const useThresholdParticipationScore: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2364
|
+
|
|
2365
|
+
declare const TOKEN_LOGOS: Record<string, string>;
|
|
2366
|
+
declare const VECHAIN_PRIVY_APP_ID = "cm4wxxujb022fyujl7g0thb21";
|
|
2367
|
+
declare const notFoundImage = "https://upload.wikimedia.org/wikipedia/commons/a/a3/Image-not-found.png";
|
|
2368
|
+
declare enum TogglePassportCheck {
|
|
2369
|
+
WhitelistCheck = 1,
|
|
2370
|
+
BlacklistCheck = 2,
|
|
2371
|
+
SignalingCheck = 3,
|
|
2372
|
+
ParticipationScoreCheck = 4,
|
|
2373
|
+
GmOwnershipCheck = 5
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
declare const getPassportToggleQueryKey: (checkName: TogglePassportCheck) => any[];
|
|
2377
|
+
/**
|
|
2378
|
+
* Hook to get the status of a passport check
|
|
2379
|
+
* @param checkName - the function name of the check
|
|
2380
|
+
* @returns the status of the check as a boolean
|
|
2381
|
+
*/
|
|
2382
|
+
declare const useIsPassportCheckEnabled: (checkName: TogglePassportCheck) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2383
|
+
|
|
2384
|
+
declare const getParticipationScoreThresholdQueryKey: () => any[];
|
|
2385
|
+
/**
|
|
2386
|
+
* Hook to get the participation score threshold from the VeBetterPassport contract
|
|
2387
|
+
* @returns the participation score threshold as a number
|
|
2388
|
+
*/
|
|
2389
|
+
declare const useParticipationScoreThreshold: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2390
|
+
|
|
2391
|
+
declare const APP_SECURITY_LEVELS: string[];
|
|
2392
|
+
declare const getAppSecurityLevelQueryKey: (appId: string) => any[];
|
|
2393
|
+
/**
|
|
2394
|
+
* Hook to get the security level of an app
|
|
2395
|
+
* @param appId - the app id
|
|
2396
|
+
* @returns the security level of the app as a number
|
|
2397
|
+
*/
|
|
2398
|
+
declare const useAppSecurityLevel: (appId: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2399
|
+
|
|
2400
|
+
/**
|
|
2401
|
+
* Hook to get the status of all passport checks
|
|
2402
|
+
* @returns the status of all passport checks as booleans
|
|
2403
|
+
*/
|
|
2404
|
+
declare const usePassportChecks: () => {
|
|
2405
|
+
isWhiteListCheckEnabled: any;
|
|
2406
|
+
isBlackListCheckEnabled: any;
|
|
2407
|
+
isSignalingCheckEnabled: any;
|
|
2408
|
+
isParticipationScoreCheckEnabled: any;
|
|
2409
|
+
isGMOwnershipCheckEnabled: any;
|
|
2410
|
+
};
|
|
2411
|
+
|
|
2412
|
+
/**
|
|
2413
|
+
* Returns the query key for fetching the IsBlacklisted status.
|
|
2414
|
+
* @returns The query key for fetching the IsBlacklisted status.
|
|
2415
|
+
*/
|
|
2416
|
+
declare const getIsBlacklistedQueryKey: (address?: string) => any[];
|
|
2417
|
+
/**
|
|
2418
|
+
* Hook to get the IsBlacklisted status from the VeBetterPassport contract.
|
|
2419
|
+
* @param address - The user address.
|
|
2420
|
+
* @returns The IsBlacklisted status.
|
|
2421
|
+
*/
|
|
2422
|
+
declare const useIsBlacklisted: (address?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
* Returns the query key for fetching the isWhitelisted status.
|
|
2426
|
+
* @returns The query key for fetching the isWhitelisted status.
|
|
2427
|
+
*/
|
|
2428
|
+
declare const getIsWhitelistedQueryKey: (address?: string) => any[];
|
|
2429
|
+
/**
|
|
2430
|
+
* Hook to get the isWhitelisted status from the VeBetterPassport contract.
|
|
2431
|
+
* @param address - The user address.
|
|
2432
|
+
* @returns The isWhitelisted status.
|
|
2433
|
+
*/
|
|
2434
|
+
declare const useIsWhitelisted: (address?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2435
|
+
|
|
2436
|
+
/**
|
|
2437
|
+
* Hook to get the user status regarding whitelist and blacklist.
|
|
2438
|
+
* @param address - The user address.
|
|
2439
|
+
* @returns The user status based on the whitelist and blacklist.
|
|
2440
|
+
*/
|
|
2441
|
+
declare const useUserStatus: (address: string) => VePassportUserStatus;
|
|
2442
|
+
|
|
2443
|
+
/**
|
|
2444
|
+
* Returns the query key for fetching the user bot signals.
|
|
2445
|
+
* @param address - The user address.
|
|
2446
|
+
* @returns The query key for fetching the user bot signals.
|
|
2447
|
+
*/
|
|
2448
|
+
declare const getUserBotSignalsQueryKey: (address?: string) => any[];
|
|
2449
|
+
/**
|
|
2450
|
+
* Hook to get the user bot signals from the VeBetterPassport contract.
|
|
2451
|
+
* @param address - The user address.
|
|
2452
|
+
* @returns The user bot signals.
|
|
2453
|
+
*/
|
|
2454
|
+
declare const useUserBotSignals: (address?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* Returns the query key for fetching the cumulative score with decay.
|
|
2458
|
+
* @param user - The user address.
|
|
2459
|
+
* @param round - The round number.
|
|
2460
|
+
* @returns The query key for fetching the cumulative score with decay.
|
|
2461
|
+
*/
|
|
2462
|
+
declare const getGetCumulativeScoreWithDecayQueryKey: (user: string, round: number) => any[];
|
|
2463
|
+
/**
|
|
2464
|
+
* Hook to get the cumulative score with decay from the VeBetterPassport contract.
|
|
2465
|
+
* @param user - The user address.
|
|
2466
|
+
* @param round - The round number.
|
|
2467
|
+
* @returns The cumulative score with decay.
|
|
2468
|
+
*/
|
|
2469
|
+
declare const useGetCumulativeScoreWithDecay: (user?: string | null, round?: number) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2470
|
+
/**
|
|
2471
|
+
* Hook to get the cumulative score with decay for the current user.
|
|
2472
|
+
* @returns The cumulative score with decay for the current user.
|
|
2473
|
+
*/
|
|
2474
|
+
declare const useGetCurrentUserCumulativeScoreWithDecay: () => {
|
|
2475
|
+
data: any;
|
|
2476
|
+
isLoading: boolean;
|
|
2477
|
+
};
|
|
2478
|
+
|
|
2479
|
+
declare enum SecurityLevel {
|
|
2480
|
+
NONE = 0,
|
|
2481
|
+
LOW = 1,
|
|
2482
|
+
MEDIUM = 2,
|
|
2483
|
+
HIGH = 3
|
|
2484
|
+
}
|
|
2485
|
+
declare const getSecurityMultiplierQueryKey: (securityLevel: SecurityLevel) => any[];
|
|
2486
|
+
/**
|
|
2487
|
+
* Hook to get the security multiplier of an app
|
|
2488
|
+
* @param securityLevel - the security level of the app
|
|
2489
|
+
* @returns the security multiplier of the app as a number
|
|
2490
|
+
*/
|
|
2491
|
+
declare const useSecurityMultiplier: (securityLevel: SecurityLevel) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* Returns the query key for fetching the delegatee.
|
|
2495
|
+
* @param delegator - The delegator address.
|
|
2496
|
+
* @returns The query key for fetching the delegatee.
|
|
2497
|
+
*/
|
|
2498
|
+
declare const getDelegateeQueryKey: (delegator: string) => any[];
|
|
2499
|
+
/**
|
|
2500
|
+
* Hook to get the delegatee from the VeBetterPassport contract.
|
|
2501
|
+
* @param delegator - The delegator address.
|
|
2502
|
+
* @returns The address of the delegatee for the given delegator, or null if the delegator has no delegatee.
|
|
2503
|
+
*/
|
|
2504
|
+
declare const useGetDelegatee: (delegator?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2505
|
+
|
|
2506
|
+
/**
|
|
2507
|
+
* Returns the query key for fetching the delegator.
|
|
2508
|
+
* @param delegator - The delegator address.
|
|
2509
|
+
* @returns The query key for fetching the delegator.
|
|
2510
|
+
*/
|
|
2511
|
+
declare const getDelegatorQueryKey: (delegator: string) => any[];
|
|
2512
|
+
/**
|
|
2513
|
+
* Hook to get the delegator from the VeBetterPassport contract.
|
|
2514
|
+
* @param delegator - The delegator address.
|
|
2515
|
+
* @returns The address of the delegator for the given delegator address, or null if the delegator has no delegator.
|
|
2516
|
+
*/
|
|
2517
|
+
declare const useGetDelegator: (delegator?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* Returns the query key for fetching pending delegations.
|
|
2521
|
+
* @param delegatee - The delegatee address.
|
|
2522
|
+
* @returns The query key for fetching pending delegations.
|
|
2523
|
+
*/
|
|
2524
|
+
declare const getPendingDelegationsQueryKeyDelegateePOV: (delegatee: string) => any[];
|
|
2525
|
+
/**
|
|
2526
|
+
* Hook to get pending delegations from the VeBetterPassport contract.
|
|
2527
|
+
* @param delegatee - The delegatee address.
|
|
2528
|
+
* @returns An array of addresses representing delegators with pending delegations for the delegatee.
|
|
2529
|
+
*/
|
|
2530
|
+
declare const useGetPendingDelegationsDelegateePOV: (delegatee?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2531
|
+
|
|
2532
|
+
/**
|
|
2533
|
+
* Returns the query key for fetching pending delegations.
|
|
2534
|
+
* @param delegator - The delegator address.
|
|
2535
|
+
* @returns The query key for fetching pending delegations.
|
|
2536
|
+
*/
|
|
2537
|
+
declare const getPendingDelegationsQueryKeyDelegatorPOV: (delegator: string) => any[];
|
|
2538
|
+
/**
|
|
2539
|
+
* Hook to get pending delegations from the VeBetterPassport contract.
|
|
2540
|
+
* @param delegator - The delegator address.
|
|
2541
|
+
* @returns An array of addresses representing delegators with pending delegations for the delegator.
|
|
2542
|
+
*/
|
|
2543
|
+
declare const useGetPendingDelegationsDelegatorPOV: (delegator?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2544
|
+
|
|
2545
|
+
/**
|
|
2546
|
+
* Returns the query key for fetching pending linkings.
|
|
2547
|
+
* @param user - The user address.
|
|
2548
|
+
* @returns The query key for fetching pending linkings.
|
|
2549
|
+
*/
|
|
2550
|
+
declare const getPendingLinkingsQueryKey: (user?: string | null) => any[];
|
|
2551
|
+
/**
|
|
2552
|
+
* Hook to get pending linkings from the VeBetterPassport contract.
|
|
2553
|
+
* @param user - The user address.
|
|
2554
|
+
* @returns An object containing incoming and outgoing pending linkings for the user.
|
|
2555
|
+
*/
|
|
2556
|
+
declare const useGetPendingLinkings: (user?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2557
|
+
/**
|
|
2558
|
+
* Hook to get pending linkings from the VeBetterPassport contract for the current user.
|
|
2559
|
+
* @returns An object containing incoming and outgoing pending linkings for the current user.
|
|
2560
|
+
*/
|
|
2561
|
+
declare const useGetUserPendingLinkings: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2562
|
+
|
|
2563
|
+
/**
|
|
2564
|
+
* Returns the query key for fetching entities linked to a passport.
|
|
2565
|
+
* @param passport - The passport address.
|
|
2566
|
+
* @returns The query key for fetching entities linked to a passport.
|
|
2567
|
+
*/
|
|
2568
|
+
declare const getEntitiesLinkedToPassportQueryKey: (passport?: string | null) => any[];
|
|
2569
|
+
/**
|
|
2570
|
+
* Hook to get the entities linked to a passport from the VeBetterPassport contract.
|
|
2571
|
+
* @param passport - The passport address.
|
|
2572
|
+
* @returns An array of entity addresses linked to the given passport.
|
|
2573
|
+
*/
|
|
2574
|
+
declare const useGetEntitiesLinkedToPassport: (passport?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2575
|
+
/**
|
|
2576
|
+
* Hook to get the entities linked to the current user's passport from the VeBetterPassport contract.
|
|
2577
|
+
* @returns An array of entity addresses linked to the current user's passport.
|
|
2578
|
+
*/
|
|
2579
|
+
declare const useGetUserEntitiesLinkedToPassport: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2580
|
+
|
|
2581
|
+
/**
|
|
2582
|
+
* Returns the query key for fetching the passport for an entity.
|
|
2583
|
+
* @param entity - The entity address.
|
|
2584
|
+
* @returns The query key for fetching the passport for an entity.
|
|
2585
|
+
*/
|
|
2586
|
+
declare const getPassportForEntityQueryKey: (entity?: string | null) => any[];
|
|
2587
|
+
/**
|
|
2588
|
+
* Hook to get the passport for an entity from the VeBetterPassport contract.
|
|
2589
|
+
* @param entity - The entity address.
|
|
2590
|
+
* @returns The passport address for the given entity.
|
|
2591
|
+
*/
|
|
2592
|
+
declare const useGetPassportForEntity: (entity?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2593
|
+
/**
|
|
2594
|
+
* Hook to get the passport for the current user's entity from the VeBetterPassport contract.
|
|
2595
|
+
* @returns The passport address for the current user's entity.
|
|
2596
|
+
*/
|
|
2597
|
+
declare const useGetUserPassportForEntity: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* Hook to get the account linking status of the current user.
|
|
2601
|
+
*
|
|
2602
|
+
* @param {string} user - The address of the user to check.
|
|
2603
|
+
* @returns The account linking status of the current user.
|
|
2604
|
+
*/
|
|
2605
|
+
declare const useAccountLinking: (user?: string) => {
|
|
2606
|
+
isLinked: boolean;
|
|
2607
|
+
passport: any;
|
|
2608
|
+
isPassport: boolean;
|
|
2609
|
+
isEntity: any;
|
|
2610
|
+
passportLinkedEntities: any;
|
|
2611
|
+
incomingPendingLinkings: any;
|
|
2612
|
+
outgoingPendingLink: any;
|
|
2613
|
+
isLoading: boolean;
|
|
2614
|
+
};
|
|
2615
|
+
|
|
2616
|
+
/**
|
|
2617
|
+
* Returns the query key for checking if an address is a passport.
|
|
2618
|
+
* @param address - The address to check.
|
|
2619
|
+
* @returns The query key for checking if an address is a passport.
|
|
2620
|
+
*/
|
|
2621
|
+
declare const getIsPassportQueryKey: (address?: string | null) => any[];
|
|
2622
|
+
/**
|
|
2623
|
+
* Hook to check if an address is a passport using the VeBetterPassport contract.
|
|
2624
|
+
* @param address - The address to check.
|
|
2625
|
+
* @returns A boolean indicating whether the address is a passport.
|
|
2626
|
+
*/
|
|
2627
|
+
declare const useIsPassport: (address?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2628
|
+
/**
|
|
2629
|
+
* Hook to check if the current user's address is a passport using the VeBetterPassport contract.
|
|
2630
|
+
* @returns A boolean indicating whether the current user's address is a passport.
|
|
2631
|
+
*/
|
|
2632
|
+
declare const useIsUserPassport: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* Returns the query key for checking if an address is an entity.
|
|
2636
|
+
* @param address - The address to check.
|
|
2637
|
+
* @returns The query key for checking if an address is an entity.
|
|
2638
|
+
*/
|
|
2639
|
+
declare const getIsEntityQueryKey: (address?: string | null) => any[];
|
|
2640
|
+
/**
|
|
2641
|
+
* Hook to check if an address is an entity using the VeBetterPassport contract.
|
|
2642
|
+
* @param address - The address to check.
|
|
2643
|
+
* @returns A boolean indicating whether the address is an entity.
|
|
2644
|
+
*/
|
|
2645
|
+
declare const useIsEntity: (address?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2646
|
+
/**
|
|
2647
|
+
* Hook to check if the current user's address is an entity using the VeBetterPassport contract.
|
|
2648
|
+
* @returns A boolean indicating whether the current user's address is an entity.
|
|
2649
|
+
*/
|
|
2650
|
+
declare const useIsUserEntity: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2651
|
+
|
|
2652
|
+
/**
|
|
2653
|
+
* Hook to get the user's delegation information.
|
|
2654
|
+
* @param address - The user address.
|
|
2655
|
+
* @returns An object containing the user's delegator and delegatee addresses, and loading states.
|
|
2656
|
+
*/
|
|
2657
|
+
declare const useUserDelegation: (address?: string) => {
|
|
2658
|
+
delegator: any;
|
|
2659
|
+
delegatee: any;
|
|
2660
|
+
isLoading: boolean;
|
|
2661
|
+
isDelegator: boolean;
|
|
2662
|
+
isDelegatee: boolean;
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* Returns the query key for fetching the threshold participation score at a specific timepoint.
|
|
2667
|
+
* @param blockNumber - The block number at which to get the threshold participation score.
|
|
2668
|
+
* @returns The query key for fetching the threshold participation score at a specific timepoint.
|
|
2669
|
+
*/
|
|
2670
|
+
declare const getThresholdParticipationScoreAtTimepointQueryKey: (blockNumber: string) => any[];
|
|
2671
|
+
/**
|
|
2672
|
+
* Hook to get the threshold participation score at a specific timepoint from the VeBetterPassport contract.
|
|
2673
|
+
* @param blockNumber - The block number at which to get the threshold participation score.
|
|
2674
|
+
* @returns The threshold participation score at a specific timepoint.
|
|
2675
|
+
*/
|
|
2676
|
+
declare const useThresholdParticipationScoreAtTimepoint: (blockNumber: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* Returns the query key for fetching the isPerson status at a given block number.
|
|
2680
|
+
* @param user - The user address.
|
|
2681
|
+
* @param blockNumber - The block number.
|
|
2682
|
+
* @returns The query key for fetching the isPerson status at a given block number.
|
|
2683
|
+
*/
|
|
2684
|
+
declare const getIsPersonAtTimepointQueryKey: (user: string, blockNumber: string) => any[];
|
|
2685
|
+
/**
|
|
2686
|
+
* Hook to get the isPerson status from the VeBetterPassport contract.
|
|
2687
|
+
* @param user - The user address.
|
|
2688
|
+
* @param blockNumber - The block number.
|
|
2689
|
+
* @returns The isPerson status at a given block number.
|
|
2690
|
+
*/
|
|
2691
|
+
declare const useIsPersonAtTimepoint: (user?: string | null, blockNumber?: string | null) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* useVotingRewards is a custom hook that fetches the voting rewards for a given round and voter.
|
|
2695
|
+
* It uses the mutli-clause reading to fetch the data in parallel for all rounds up to the current one.
|
|
2696
|
+
*
|
|
2697
|
+
* @param {string} currentRoundId - The id of the current round. If not provided, no queries will be made.
|
|
2698
|
+
* @param {string} voter - The address of the voter. If not provided, the rewards for all voters will be fetched.
|
|
2699
|
+
* @returns {object} An object containing the status and data of the queries. Refer to the react-query documentation for more details.
|
|
2700
|
+
*/
|
|
2701
|
+
declare const useVotingRewards: (currentRoundId?: string, voter?: string) => _tanstack_react_query.UseQueryResult<{
|
|
2702
|
+
total: string;
|
|
2703
|
+
totalFormatted: string;
|
|
2704
|
+
roundsRewards: {
|
|
2705
|
+
roundId: string;
|
|
2706
|
+
rewards: string;
|
|
2707
|
+
formattedRewards: string;
|
|
2708
|
+
}[];
|
|
2709
|
+
}, Error>;
|
|
2710
|
+
|
|
2711
|
+
/**
|
|
2712
|
+
* Interface for the reward for a round.
|
|
2713
|
+
*/
|
|
2714
|
+
interface RoundReward {
|
|
2715
|
+
roundId: string;
|
|
2716
|
+
rewards: string;
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* Builds a transaction to claim rewards for a given set of rounds.
|
|
2720
|
+
*
|
|
2721
|
+
* @param {Connex.Thor} thor - The Connex.Thor instance to use for interacting with the VeChain Thor blockchain.
|
|
2722
|
+
* @param {RoundReward[]} roundRewards - An array of RoundReward objects representing the rewards for each round.
|
|
2723
|
+
* @param {string} address - The address of the voter.
|
|
2724
|
+
* @param {NETWORK_TYPE} networkType - The type of the network.
|
|
2725
|
+
* @returns {Connex.Vendor.TxMessage} A Connex.Vendor.TxMessage object representing the transaction.
|
|
2726
|
+
*/
|
|
2727
|
+
declare const buildClaimRewardsTx: (roundRewards: RoundReward[], address: string, networkType: NETWORK_TYPE) => Connex.Vendor.TxMessage;
|
|
2728
|
+
|
|
2729
|
+
/**
|
|
2730
|
+
* Builds a transaction clause to claim rewards for a specific voting round.
|
|
2731
|
+
* This function constructs a transaction object that can be used to interact with the VoterRewards smart contract.
|
|
2732
|
+
*
|
|
2733
|
+
* @param {string} roundId - The ID of the voting round for which the rewards are to be claimed.
|
|
2734
|
+
* @param {string} address - The Vechain address of the user claiming the rewards.
|
|
2735
|
+
* @param {NETWORK_TYPE} networkType - The type of the network.
|
|
2736
|
+
* @returns {EnhancedClause} A transaction clause containing the necessary data for claiming the rewards, including the target contract address, the method call data, and the ABI for decoding.
|
|
2737
|
+
*/
|
|
2738
|
+
declare const buildClaimRoundReward: (roundId: string, address: string, networkType: NETWORK_TYPE) => EnhancedClause;
|
|
2739
|
+
|
|
2740
|
+
/**
|
|
2741
|
+
* Fetches the reward for a given round and voter from the VoterRewards contract.
|
|
2742
|
+
*
|
|
2743
|
+
* @param {Connex.Thor} thor - The Connex.Thor instance to use for interacting with the VeChain Thor blockchain.
|
|
2744
|
+
* @param {NETWORK_TYPE} networkType - The type of the network.
|
|
2745
|
+
* @param {string} address - The address of the voter.
|
|
2746
|
+
* @param {string} roundId - The id of the round.
|
|
2747
|
+
* @returns {Promise<string>} A promise that resolves to the reward for the given round and voter.
|
|
2748
|
+
*/
|
|
2749
|
+
declare const getRoundReward: (thor: Connex.Thor, networkType: NETWORK_TYPE, address: string, roundId: string) => Promise<RoundReward>;
|
|
2750
|
+
/**
|
|
2751
|
+
* Generates a query key for the getRoundReward query.
|
|
2752
|
+
*
|
|
2753
|
+
* @param {string} roundId - The id of the round.
|
|
2754
|
+
* @param {string} address - The address of the voter.
|
|
2755
|
+
* @returns {Array<string>} An array of strings that forms the query key.
|
|
2756
|
+
*/
|
|
2757
|
+
declare const getRoundRewardQueryKey: (roundId?: string, address?: string) => (string | undefined)[];
|
|
2758
|
+
/**
|
|
2759
|
+
* useRoundReward is a custom hook that fetches the reward for a given round and voter.
|
|
2760
|
+
*
|
|
2761
|
+
* @param {string} address - The address of the voter.
|
|
2762
|
+
* @param {string} roundId - The id of the round.
|
|
2763
|
+
* @returns {object} An object containing the status and data of the query. Refer to the react-query documentation for more details.
|
|
2764
|
+
*/
|
|
2765
|
+
declare const useRoundReward: (address: string, roundId: string) => _tanstack_react_query.UseQueryResult<RoundReward, Error>;
|
|
2766
|
+
|
|
2767
|
+
/**
|
|
2768
|
+
* Get the query key for the address of the user managing the node ID (endorsement)
|
|
2769
|
+
* @param nodeId The ID of the node for which the manager address is being retrieved
|
|
2770
|
+
*/
|
|
2771
|
+
declare const getNodeManagerQueryKey: (nodeId: string) => any[];
|
|
2772
|
+
/**
|
|
2773
|
+
* Hook to get the address of the user managing the node ID (endorsement) either through ownership or delegation
|
|
2774
|
+
* @param nodeId The ID of the node for which the manager address is being retrieved
|
|
2775
|
+
* @returns address The address of the manager of the specified node
|
|
2776
|
+
*/
|
|
2777
|
+
declare const useGetNodeManager: (nodeId: string) => UseQueryResult<string, Error>;
|
|
2778
|
+
|
|
2779
|
+
declare const getVeDelegateBalance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<string>;
|
|
2780
|
+
declare const getVeDelegateBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
2781
|
+
declare const useGetVeDelegateBalance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
2782
|
+
|
|
2783
|
+
declare const fetchPrivyAppInfo: (appId: string) => Promise<PrivyAppInfo>;
|
|
2784
|
+
declare const getPrivyAppInfoQueryKey: (appIds: string | string[]) => string[];
|
|
2785
|
+
declare const useFetchAppInfo: (appIds: string | string[]) => _tanstack_react_query.UseQueryResult<{
|
|
2786
|
+
[k: string]: PrivyAppInfo;
|
|
2787
|
+
}, Error>;
|
|
2788
|
+
|
|
2789
|
+
interface VeChainDomainResult {
|
|
2790
|
+
address?: string;
|
|
2791
|
+
domain?: string;
|
|
2792
|
+
isValidAddressOrDomain: boolean;
|
|
2793
|
+
}
|
|
2794
|
+
declare const getVechainDomainQueryKey: (addressOrDomain?: string | null) => (string | null | undefined)[];
|
|
2795
|
+
declare const useVechainDomain: (addressOrDomain?: string | null) => _tanstack_react_query.UseQueryResult<VeChainDomainResult, Error>;
|
|
2796
|
+
|
|
2797
|
+
declare const getEnsRecordExistsQueryKey: (name: string) => string[];
|
|
2798
|
+
declare const useEnsRecordExists: (name: string) => UseQueryResult<boolean, Error>;
|
|
2799
|
+
|
|
2800
|
+
type useClaimVeWorldSubdomainProps = {
|
|
2801
|
+
subdomain: string;
|
|
2802
|
+
domain: string;
|
|
2803
|
+
onSuccess?: () => void;
|
|
2804
|
+
onSuccessMessageTitle?: number;
|
|
2805
|
+
};
|
|
2806
|
+
type useClaimVeWorldSubdomainReturnValue = {
|
|
2807
|
+
sendTransaction: () => Promise<void>;
|
|
2808
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
2809
|
+
declare const useClaimVeWorldSubdomain: ({ subdomain, domain, onSuccess, }: useClaimVeWorldSubdomainProps) => useClaimVeWorldSubdomainReturnValue;
|
|
2810
|
+
|
|
2811
|
+
interface SmartAccountReturnType {
|
|
2812
|
+
address: string | undefined;
|
|
2813
|
+
isDeployed: boolean;
|
|
2814
|
+
}
|
|
2815
|
+
declare const getSmartAccount: (thor: ThorClient, network: NETWORK_TYPE, ownerAddress?: string) => Promise<{
|
|
2816
|
+
address: undefined;
|
|
2817
|
+
isDeployed?: undefined;
|
|
2818
|
+
} | {
|
|
2819
|
+
address: string;
|
|
2820
|
+
isDeployed: boolean;
|
|
2821
|
+
}>;
|
|
2822
|
+
declare const getSmartAccountQueryKey: (ownerAddress?: string) => (string | undefined)[];
|
|
2823
|
+
declare const useSmartAccount: (ownerAddress?: string) => _tanstack_react_query.UseQueryResult<{
|
|
2824
|
+
address: undefined;
|
|
2825
|
+
isDeployed?: undefined;
|
|
2826
|
+
} | {
|
|
2827
|
+
address: string;
|
|
2828
|
+
isDeployed: boolean;
|
|
2829
|
+
}, Error>;
|
|
2830
|
+
|
|
2831
|
+
declare const useBalances: () => {
|
|
2832
|
+
isLoading: boolean;
|
|
2833
|
+
balances: {
|
|
2834
|
+
vet: number;
|
|
2835
|
+
vtho: number;
|
|
2836
|
+
b3tr: number;
|
|
2837
|
+
vot3: number;
|
|
2838
|
+
veDelegate: number;
|
|
2839
|
+
};
|
|
2840
|
+
prices: {
|
|
2841
|
+
vet: number;
|
|
2842
|
+
vtho: number;
|
|
2843
|
+
b3tr: number;
|
|
2844
|
+
};
|
|
2845
|
+
totalBalance: number;
|
|
2846
|
+
};
|
|
2847
|
+
|
|
2848
|
+
type UseWalletReturnType = {
|
|
2849
|
+
account: Wallet;
|
|
2850
|
+
connectedWallet: Wallet;
|
|
2851
|
+
smartAccount: SmartAccount;
|
|
2852
|
+
dappKitWallet?: Wallet;
|
|
2853
|
+
embeddedWallet?: Wallet;
|
|
2854
|
+
crossAppWallet?: Wallet;
|
|
2855
|
+
privyUser: User | null;
|
|
2856
|
+
connection: {
|
|
2857
|
+
isConnected: boolean;
|
|
2858
|
+
isLoading: boolean;
|
|
2859
|
+
isConnectedWithSocialLogin: boolean;
|
|
2860
|
+
isConnectedWithDappKit: boolean;
|
|
2861
|
+
isConnectedWithCrossApp: boolean;
|
|
2862
|
+
isConnectedWithPrivy: boolean;
|
|
2863
|
+
isConnectedWithVeChain: boolean;
|
|
2864
|
+
source: ConnectionSource;
|
|
2865
|
+
isInAppBrowser: boolean;
|
|
2866
|
+
nodeUrl: string;
|
|
2867
|
+
delegatorUrl: string;
|
|
2868
|
+
chainId?: string;
|
|
2869
|
+
network: NETWORK_TYPE;
|
|
2870
|
+
};
|
|
2871
|
+
disconnect: () => Promise<void>;
|
|
2872
|
+
};
|
|
2873
|
+
declare const useWallet: () => UseWalletReturnType;
|
|
2874
|
+
|
|
2875
|
+
declare const useRefreshBalances: () => {
|
|
2876
|
+
refresh: () => Promise<void>;
|
|
2877
|
+
};
|
|
2878
|
+
|
|
2879
|
+
declare const getAccountBalance: (thor: Connex.Thor, address?: string) => Promise<{
|
|
2880
|
+
balance: string;
|
|
2881
|
+
energy: string;
|
|
2882
|
+
}>;
|
|
2883
|
+
declare const getAccountBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
2884
|
+
/**
|
|
2885
|
+
* Get the account balance for the given address
|
|
2886
|
+
* @param address The address of the account to get the balance for
|
|
2887
|
+
* @returns The account balance
|
|
2888
|
+
*/
|
|
2889
|
+
declare const useAccountBalance: (address?: string) => _tanstack_react_query.UseQueryResult<{
|
|
2890
|
+
balance: string;
|
|
2891
|
+
energy: string;
|
|
2892
|
+
}, Error>;
|
|
2893
|
+
|
|
2894
|
+
declare const getChainId: (thor: ThorClient) => Promise<string>;
|
|
2895
|
+
declare const getChainIdQueryKey: () => string[];
|
|
2896
|
+
/**
|
|
2897
|
+
* Get the account balance for the given address
|
|
2898
|
+
* @param address The address of the account to get the balance for
|
|
2899
|
+
* @returns The account balance
|
|
2900
|
+
*/
|
|
2901
|
+
declare const useGetChainId: () => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
2902
|
+
|
|
2903
|
+
declare const useGetNodeUrl: () => string;
|
|
2904
|
+
|
|
2905
|
+
/**
|
|
2906
|
+
* Fetches metadata from IPFS for a given URI
|
|
2907
|
+
*
|
|
2908
|
+
* @param networkType - The network type
|
|
2909
|
+
* @param uri - The IPFS URI
|
|
2910
|
+
* @param parseJson - Whether to parse the JSON
|
|
2911
|
+
* @returns The metadata
|
|
2912
|
+
*/
|
|
2913
|
+
declare const getIpfsMetadata: <T>(networkType: NETWORK_TYPE, uri?: string, parseJson?: boolean) => Promise<T>;
|
|
2914
|
+
declare const getIpfsMetadataQueryKey: (networkType: NETWORK_TYPE, ipfsUri?: string) => (string | undefined)[];
|
|
2915
|
+
/**
|
|
2916
|
+
* Fetches metadata from IPFS for a given URI
|
|
2917
|
+
* @param ipfsUri - The IPFS URI
|
|
2918
|
+
* @returns The metadata from IPFS
|
|
2919
|
+
*/
|
|
2920
|
+
declare const useIpfsMetadata: <T>(ipfsUri?: string, parseJson?: boolean) => _tanstack_react_query.UseQueryResult<T, Error>;
|
|
2921
|
+
|
|
2922
|
+
interface IpfsImage {
|
|
2923
|
+
image: string;
|
|
2924
|
+
mime: string;
|
|
2925
|
+
mediaType: NFTMediaType;
|
|
2926
|
+
}
|
|
2927
|
+
declare const MAX_IMAGE_SIZE: number;
|
|
2928
|
+
/**
|
|
2929
|
+
* Fetches NFT media from IPFS
|
|
2930
|
+
* @param networkType - The network type
|
|
2931
|
+
* @param uri - The IPFS URI of the NFT media
|
|
2932
|
+
* @returns The NFT media
|
|
2933
|
+
*/
|
|
2934
|
+
declare const getIpfsImage: (networkType: NETWORK_TYPE, uri?: string) => Promise<IpfsImage>;
|
|
2935
|
+
/**
|
|
2936
|
+
* @param networkType - The network type
|
|
2937
|
+
* @param imageIpfsUri - The IPFS URI of the NFT media
|
|
2938
|
+
* @returns The NFT media
|
|
2939
|
+
*/
|
|
2940
|
+
declare const getIpfsImageQueryKey: (networkType: NETWORK_TYPE, imageIpfsUri?: null | string) => (string | null | undefined)[];
|
|
2941
|
+
/**
|
|
2942
|
+
* Hook to fetch NFT media from IPFS
|
|
2943
|
+
* @param imageIpfsUri - The IPFS URI of the NFT media
|
|
2944
|
+
* @returns The NFT media
|
|
2945
|
+
*/
|
|
2946
|
+
declare const useIpfsImage: (imageIpfsUri?: null | string) => _tanstack_react_query.UseQueryResult<IpfsImage, Error>;
|
|
2947
|
+
/**
|
|
2948
|
+
* Custom hook to fetch a list of IPFS images.
|
|
2949
|
+
*
|
|
2950
|
+
* @param imageIpfsUriList - An array of IPFS URIs for the images.
|
|
2951
|
+
* @returns An array of queries for each IPFS image URI.
|
|
2952
|
+
*/
|
|
2953
|
+
declare const useIpfsImageList: (imageIpfsUriList: string[]) => _tanstack_react_query.UseQueryResult<IpfsImage, Error>[];
|
|
2954
|
+
|
|
2955
|
+
/**
|
|
2956
|
+
* Fetches metadatas from IPFS for given URIs
|
|
2957
|
+
* @param ipfsUris - The IPFS URIs
|
|
2958
|
+
* @returns The metadata from IPFS for each URI
|
|
2959
|
+
*/
|
|
2960
|
+
declare const useIpfsMetadatas: <T>(ipfsUris: string[], parseJson?: boolean) => _tanstack_react_query.UseQueryResult<T, Error>[];
|
|
2961
|
+
|
|
2962
|
+
declare const currentBlockQueryKey: () => string[];
|
|
2963
|
+
/**
|
|
2964
|
+
* Fetches the current block from the blockchain. The block is refetched every 10 seconds.
|
|
2965
|
+
* @returns the current block
|
|
2966
|
+
*/
|
|
2967
|
+
declare const useCurrentBlock: () => _tanstack_react_query.UseQueryResult<Connex.Thor.Block, Error>;
|
|
2968
|
+
|
|
2969
|
+
/**
|
|
2970
|
+
* Params for getEvents function
|
|
2971
|
+
* @param nodeUrl the node url
|
|
2972
|
+
* @param thor the thor client
|
|
2973
|
+
* @param auctionId the auction id to get the events
|
|
2974
|
+
* @param order the order of the events (asc or desc)
|
|
2975
|
+
* @param offset the offset of the events
|
|
2976
|
+
* @param limit the limit of the events (max 256)
|
|
2977
|
+
* @param from the block number to start from
|
|
2978
|
+
* @param filterCriteria the filter criteria for the events
|
|
2979
|
+
* @returns the encoded events
|
|
2980
|
+
*/
|
|
2981
|
+
type GetEventsProps = {
|
|
2982
|
+
nodeUrl: string;
|
|
2983
|
+
thor: Connex.Thor;
|
|
2984
|
+
order?: 'asc' | 'desc';
|
|
2985
|
+
offset?: number;
|
|
2986
|
+
limit?: number;
|
|
2987
|
+
from?: number;
|
|
2988
|
+
to?: number;
|
|
2989
|
+
filterCriteria: Connex.Thor.Filter.Criteria<'event'>[];
|
|
2990
|
+
};
|
|
2991
|
+
/**
|
|
2992
|
+
* Get events from blockchain (auction created, auction successful, auction cancelled)
|
|
2993
|
+
* @param order
|
|
2994
|
+
* @param offset
|
|
2995
|
+
* @param limit
|
|
2996
|
+
* @param from block parse start from
|
|
2997
|
+
*/
|
|
2998
|
+
declare const getEvents: ({ nodeUrl, thor, order, offset, limit, from, to, filterCriteria, }: GetEventsProps) => Promise<Connex.Thor.Filter.Row<"event">[]>;
|
|
2999
|
+
/**
|
|
3000
|
+
* call getEvents iteratively to get all the events
|
|
3001
|
+
* @param nodeUrl the node url
|
|
3002
|
+
* @param thor the thor client
|
|
3003
|
+
* @param order the order of the events (asc or desc)
|
|
3004
|
+
* @param from the block number to start from
|
|
3005
|
+
* @param filterCriteria the filter criteria for the events
|
|
3006
|
+
* @returns all the events from the blockchain
|
|
3007
|
+
*/
|
|
3008
|
+
declare const getAllEvents: ({ nodeUrl, thor, order, from, to, filterCriteria, }: Omit<GetEventsProps, "offset" | "limit">) => Promise<Connex.Thor.Filter.Row<"event", {}>[]>;
|
|
3009
|
+
|
|
3010
|
+
/**
|
|
3011
|
+
* Poll the chain for a transaction receipt until it is found (or timeout after 5 blocks)
|
|
3012
|
+
* @param thor Thor instance
|
|
3013
|
+
* @param id Transaction id
|
|
3014
|
+
* @param blocksTimeout Number of blocks to wait for the receipt
|
|
3015
|
+
* @returns Transaction receipt
|
|
3016
|
+
*/
|
|
3017
|
+
declare const pollForReceipt: (thor: Connex.Thor, id?: string, blocksTimeout?: number) => Promise<Connex.Thor.Transaction.Receipt>;
|
|
3018
|
+
/**
|
|
3019
|
+
* Get the tx receipt of a tx id with a block timeout to wait for the receipt
|
|
3020
|
+
* @param txId The tx id to get the receipt
|
|
3021
|
+
* @param blockTimeout The block timeout to wait for the receipt
|
|
3022
|
+
* @returns The tx receipt
|
|
3023
|
+
*/
|
|
3024
|
+
declare const useTxReceipt: (txId?: string, blockTimeout?: number) => {
|
|
3025
|
+
data: Connex.Thor.Transaction.Receipt | null | undefined;
|
|
3026
|
+
error: Error | null;
|
|
3027
|
+
isLoading: boolean;
|
|
3028
|
+
};
|
|
3029
|
+
|
|
3030
|
+
declare const useConnectModal: () => {
|
|
1532
3031
|
open: () => void;
|
|
1533
3032
|
close: () => void;
|
|
1534
3033
|
isOpen: boolean;
|
|
@@ -1649,11 +3148,81 @@ declare const useSmartAccountAlert: () => {
|
|
|
1649
3148
|
hideAlert: () => void;
|
|
1650
3149
|
};
|
|
1651
3150
|
|
|
1652
|
-
declare const
|
|
1653
|
-
|
|
3151
|
+
declare const useCrossAppConnectionCache: () => {
|
|
3152
|
+
setConnectionCache: (ecosystemApp: {
|
|
3153
|
+
name: string;
|
|
3154
|
+
logoUrl?: string;
|
|
3155
|
+
appId: string;
|
|
3156
|
+
}) => void;
|
|
3157
|
+
getConnectionCache: () => CrossAppConnectionCache | null;
|
|
3158
|
+
clearConnectionCache: () => void;
|
|
3159
|
+
};
|
|
3160
|
+
|
|
3161
|
+
type MethodName<T> = T extends (nameOrSignature: infer U) => any ? U : never;
|
|
3162
|
+
/**
|
|
3163
|
+
* Parameters for the useCall hook.
|
|
3164
|
+
*/
|
|
3165
|
+
type UseCallParams<T extends Interface> = {
|
|
3166
|
+
contractInterface: T;
|
|
3167
|
+
contractAddress: string;
|
|
3168
|
+
method: MethodName<T['getFunction']>;
|
|
3169
|
+
args?: unknown[];
|
|
3170
|
+
keyArgs?: unknown[];
|
|
3171
|
+
enabled?: boolean;
|
|
3172
|
+
mapResponse?: (_res: Connex.VM.Output & Connex.Thor.Account.WithDecoded) => any;
|
|
3173
|
+
};
|
|
3174
|
+
/**
|
|
3175
|
+
* Custom hook for making contract calls.
|
|
3176
|
+
* @param contractInterface - The cotract interface.
|
|
3177
|
+
* @param contractAddress - The contract address.
|
|
3178
|
+
* @param method - The method name.
|
|
3179
|
+
* @param rgs - Optional arguments for the method.
|
|
3180
|
+
*@param keyArgs - Optional key arguments for the query key.
|
|
3181
|
+
* @param enabled - Whether the query should be enabled.
|
|
3182
|
+
* @param mapResponse - Optional function to map the response.
|
|
3183
|
+
* @returns The query result.
|
|
3184
|
+
*/
|
|
3185
|
+
declare const useCall: <T extends Interface>({ contractInterface, contractAddress, method, args, keyArgs, enabled, mapResponse, }: UseCallParams<T>) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
3186
|
+
type GetCallKeyParams = {
|
|
3187
|
+
method: string;
|
|
3188
|
+
keyArgs?: any[];
|
|
3189
|
+
};
|
|
3190
|
+
declare const getCallKey: ({ method, keyArgs }: GetCallKeyParams) => any[];
|
|
3191
|
+
|
|
3192
|
+
type UseSignMessageReturnValue = {
|
|
3193
|
+
signMessage: (message: string) => Promise<string>;
|
|
3194
|
+
isSigningPending: boolean;
|
|
3195
|
+
signature: string | null;
|
|
3196
|
+
error: Error | null;
|
|
3197
|
+
reset: () => void;
|
|
3198
|
+
};
|
|
3199
|
+
/**
|
|
3200
|
+
* Hook to sign messages using the connected wallet.
|
|
3201
|
+
* Supports both Privy and VeChain wallets.
|
|
3202
|
+
*
|
|
3203
|
+
* @returns {UseSignMessageReturnValue} Object containing the signing function and status
|
|
3204
|
+
*/
|
|
3205
|
+
declare const useSignMessage: () => UseSignMessageReturnValue;
|
|
3206
|
+
|
|
3207
|
+
type UseSignTypedDataReturnValue = {
|
|
3208
|
+
signTypedData: (data: SignTypedDataParams) => Promise<string>;
|
|
3209
|
+
isSigningPending: boolean;
|
|
3210
|
+
signature: string | null;
|
|
3211
|
+
error: Error | null;
|
|
3212
|
+
reset: () => void;
|
|
3213
|
+
};
|
|
3214
|
+
/**
|
|
3215
|
+
* Hook to sign typed data using the connected wallet.
|
|
3216
|
+
* Supports both Privy and VeChain wallets.
|
|
3217
|
+
*
|
|
3218
|
+
* @returns {UseSignTypedDataReturnValue} Object containing the signing function and status
|
|
3219
|
+
*/
|
|
3220
|
+
declare const useSignTypedData: () => UseSignTypedDataReturnValue;
|
|
1654
3221
|
|
|
1655
3222
|
declare const humanAddress: (address: string, charAtStart?: number, charAtEnd?: number) => string;
|
|
1656
3223
|
declare const humanDomain: (domain: string, lengthBefore?: number, lengthAfter?: number) => string;
|
|
3224
|
+
declare const humanNumber: (formattedValue: BigNumber.Value, originalValue?: BigNumber.Value, symbol?: string | null) => string;
|
|
3225
|
+
declare const isZero: (value?: BigNumber.Value) => boolean;
|
|
1657
3226
|
declare const getPicassoImage: (address: string, base64?: boolean) => string;
|
|
1658
3227
|
|
|
1659
3228
|
declare const randomTransactionUser: {
|
|
@@ -1676,6 +3245,69 @@ declare const regexPattern: () => RegExp;
|
|
|
1676
3245
|
declare const isValidAddress: (addr: string | undefined | null) => boolean;
|
|
1677
3246
|
declare const leftPadWithZeros: (str: string, length: number) => string;
|
|
1678
3247
|
|
|
3248
|
+
/**
|
|
3249
|
+
* Validate IPFS URI strings. An example of a valid IPFS URI is:
|
|
3250
|
+
* - ipfs://QmfSTia1TJUiKQ2fyW9NTPzEKNdjMGzbUgrC3QPSTpkum6/406.json
|
|
3251
|
+
* - ipfs://QmVPqKfwRXjg5Fqwy6RNRbKR2ZP4pKKVLvmfjmhQfdM3MH/4
|
|
3252
|
+
* - ipfs://QmVPqKfwRXjg5Fqwy6RNRbKR2ZP4pKKVLvmfjmhQfdM3MH
|
|
3253
|
+
* @param uri
|
|
3254
|
+
* @returns
|
|
3255
|
+
*/
|
|
3256
|
+
declare const validateIpfsUri: (uri: string) => boolean;
|
|
3257
|
+
/**
|
|
3258
|
+
* Converts a CID to an IPFS native URL.
|
|
3259
|
+
*
|
|
3260
|
+
* @param cid - The CID to convert.
|
|
3261
|
+
* @param fileName - The name of the file to append to the URL.
|
|
3262
|
+
*
|
|
3263
|
+
* @returns The IPFS URL in the format `ipfs://${cid}/${fileName}`.
|
|
3264
|
+
*/
|
|
3265
|
+
declare function toIPFSURL(cid: string, fileName?: string): string;
|
|
3266
|
+
|
|
3267
|
+
declare const resolveMediaTypeFromMimeType: (mimeType: string) => NFTMediaType;
|
|
3268
|
+
|
|
3269
|
+
/**
|
|
3270
|
+
* Convert a URI to a URL
|
|
3271
|
+
* We support both IPFS and Arweave URIs. Both should be converted to their https gateway URLs.
|
|
3272
|
+
* All other URIs should pass through unchanged.
|
|
3273
|
+
*
|
|
3274
|
+
* @param uri
|
|
3275
|
+
*/
|
|
3276
|
+
declare const convertUriToUrl: (uri: string, networkType: NETWORK_TYPE) => string;
|
|
3277
|
+
|
|
3278
|
+
declare const gmNfts: {
|
|
3279
|
+
level: string;
|
|
3280
|
+
name: string;
|
|
3281
|
+
image: string;
|
|
3282
|
+
multiplier: number;
|
|
3283
|
+
b3trToUpgrade: number;
|
|
3284
|
+
}[];
|
|
3285
|
+
/**
|
|
3286
|
+
* Maps the XNode level to the GM starting level.
|
|
3287
|
+
*/
|
|
3288
|
+
declare const xNodeToGMstartingLevel: Record<number, number>;
|
|
3289
|
+
|
|
3290
|
+
declare const buildQueryString: (params: {
|
|
3291
|
+
[key: string]: any;
|
|
3292
|
+
}) => string;
|
|
3293
|
+
|
|
3294
|
+
/**
|
|
3295
|
+
* Map strength level coming from contract to hq image
|
|
3296
|
+
*/
|
|
3297
|
+
declare const NodeStrengthLevelToImage: {
|
|
3298
|
+
[key: string]: string;
|
|
3299
|
+
};
|
|
3300
|
+
declare const MinXNodeLevel = 4;
|
|
3301
|
+
declare const EconomicNodeStrengthLevelToName: {
|
|
3302
|
+
[key: string]: string;
|
|
3303
|
+
};
|
|
3304
|
+
declare const XNodeStrengthLevelToName: {
|
|
3305
|
+
[key: string]: string;
|
|
3306
|
+
};
|
|
3307
|
+
declare const allNodeStrengthLevelToName: {
|
|
3308
|
+
[key: string]: string;
|
|
3309
|
+
};
|
|
3310
|
+
|
|
1679
3311
|
type AppConfig = {
|
|
1680
3312
|
ipfsFetchingService: string;
|
|
1681
3313
|
b3trContractAddress: string;
|
|
@@ -1704,6 +3336,7 @@ type AppConfig = {
|
|
|
1704
3336
|
vetDomainsContractAddress: string;
|
|
1705
3337
|
vetDomainsPublicResolverAddress: string;
|
|
1706
3338
|
vetDomainsReverseRegistrarAddress: string;
|
|
3339
|
+
vnsResolverAddress: string;
|
|
1707
3340
|
nodeUrl: string;
|
|
1708
3341
|
indexerUrl?: string;
|
|
1709
3342
|
network: Network;
|
|
@@ -1711,4 +3344,4 @@ type AppConfig = {
|
|
|
1711
3344
|
};
|
|
1712
3345
|
declare const getConfig: (env: NETWORK_TYPE) => AppConfig;
|
|
1713
3346
|
|
|
1714
|
-
export { AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, AccountsListContent, ActionButton, AddressDisplay, AddressDisplayCard, type AppConfig, AssetButton, AssetsSection, BalanceSection, BaseModal, ChooseNameContent, ChooseNameSearchContent, type ChooseNameSearchContentProps, ChooseNameSummaryContent, ConnectModal, type
|
|
3347
|
+
export { APP_SECURITY_LEVELS, AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, AccountsListContent, ActionButton, AddressDisplay, AddressDisplayCard, type AllocationVoteCastEvent, type AppConfig, type AppVotesGiven, AssetButton, AssetsSection, BalanceSection, BaseModal, ChooseNameContent, ChooseNameSearchContent, type ChooseNameSearchContentProps, ChooseNameSummaryContent, ConnectModal, type ConnectModalContentsTypes, ConnectModalProvider, ConnectionButton, type ConnectionSource, type CrossAppConnectionCache, DappKitButton, EconomicNodeStrengthLevelToName, EcosystemButton, EcosystemModal, EmailLoginButton, type EnhancedClause, type ExecuteWithAuthorizationSignData, FAQContent, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, type GetCallKeyParams, type GetEventsProps, GoogleLogo, type IpfsImage, LoginLoadingModal, MAX_IMAGE_SIZE, MainContent, MinXNodeLevel, ModalBackButton, ModalFAQButton, NFTMediaType, type NFTMetadata, NodeStrengthLevelToImage, PRICE_FEED_IDS, PasskeyLoginButton, type PrivyAppInfo, PrivyButton, type PrivyLoginMethod, PrivyLogo, PrivyWalletProvider, type PrivyWalletProviderContextType, QuickActionsSection, ReceiveTokenContent, type RoundReward, SecurityLevel, SelectTokenContent, SendTokenContent, SendTokenSummaryContent, SimpleAccountABI, SimpleAccountFactoryABI, type SmartAccount, SmartAccountContent, type SmartAccountReturnType, SocialLoginButtons, StickyFooterContainer, StickyHeaderContainer, type SupportedToken, SwapTokenContent, TOKEN_LOGOS, TogglePassportCheck, type TokenBalance, TransactionModal, type TransactionModalProps, TransactionModalProvider, type TransactionProgress, type TransactionStatus, type TransactionStatusErrorType, TransactionToast, TransactionToastProvider, TwitterLogo, type UnendorsedApp, type UseCallParams, type UseSendTransactionReturnValue, type UseWalletReturnType, type UserNode, type UserXNode, VECHAIN_PRIVY_APP_ID, VeChainKit, VeChainKitContext, VeChainLoginButton, VePassportUserStatus, type VechainKitProps, VechainLogo, VechainLogoHorizontal, VersionFooter, type Wallet, WalletButton, type WalletButtonProps, WalletSettingsContent, type XApp, type XAppMetadata, XNodeStrengthLevelToName, allNodeStrengthLevelToName, buildClaimRewardsTx, buildClaimRoundReward, buildQueryString, compareAddresses, compareListOfAddresses, convertUriToUrl, currentBlockQueryKey, fetchPrivyAppInfo, getAccountBalance, getAccountBalanceQueryKey, getAllEvents, getAllocationAmount, getAllocationAmountQueryKey, getAppAdmin, getAppAdminQueryKey, getAppBalance, getAppBalanceQueryKey, getAppExistsQueryKey, getAppSecurityLevelQueryKey, getAppsEligibleInNextRound, getAppsEligibleInNextRoundQueryKey, getB3trBalance, getB3trBalanceQueryKey, getB3trDonatedQueryKey, getB3trToUpgradeQueryKey, getBalanceOf, getCallKey, getChainId, getChainIdQueryKey, getConfig, getCurrentAllocationsRoundId, getCurrentAllocationsRoundIdQueryKey, getDelegateeQueryKey, getDelegatorQueryKey, getEnsRecordExistsQueryKey, getEntitiesLinkedToPassportQueryKey, getEvents, getGMBaseUriQueryKey, getGMLevel, getGMbalanceQueryKey, getGetCumulativeScoreWithDecayQueryKey, getHasVotedInRound, getHasVotedInRoundQueryKey, getIpfsImage, getIpfsImageQueryKey, getIpfsMetadata, getIpfsMetadataQueryKey, getIsBlacklistedQueryKey, getIsEntityQueryKey, getIsNodeHolder, getIsNodeHolderQueryKey, getIsPassportQueryKey, getIsPersonAtTimepointQueryKey, getIsPersonQueryKey, getIsWhitelistedQueryKey, getLevelGradient, getLevelMultiplierQueryKey, getLevelOfTokenQueryKey, getNFTMetadataUri, getNFTMetadataUriQueryKey, getNodeCheckCooldownQueryKey, getNodeManagerQueryKey, getParticipatedInGovernance, getParticipatedInGovernanceQueryKey, getParticipationScoreThresholdQueryKey, getPassportForEntityQueryKey, getPassportToggleQueryKey, getPendingDelegationsQueryKeyDelegateePOV, getPendingDelegationsQueryKeyDelegatorPOV, getPendingLinkingsQueryKey, getPicassoImage, getPrivyAppInfoQueryKey, getRoundReward, getRoundRewardQueryKey, getRoundXApps, getRoundXAppsQueryKey, getSecurityMultiplierQueryKey, getSmartAccount, getSmartAccountQueryKey, getThresholdParticipationScoreAtTimepointQueryKey, getThresholdParticipationScoreQueryKey, getTokenIdByAccount, getTokenIdByAccountQueryKey, getTokenUsdPrice, getTokenUsdPriceQueryKey, getTokensInfoByOwnerQueryKey, getUserBotSignalsQueryKey, getUserNodesQueryKey, getUserRoundScoreQueryKey, getUserVotesInRound, getUserVotesInRoundQueryKey, getUserXNodes, getUserXNodesQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVechainDomainQueryKey, getVot3Balance, getVot3BalanceQueryKey, getVotesInRoundQueryKey, getXAppMetadata, getXAppMetadataQueryKey, getXAppRoundEarnings, getXAppRoundEarningsQueryKey, getXAppTotalEarningsClauses, getXAppTotalEarningsQueryKey, getXAppVotes, getXAppVotesQf, getXAppVotesQfQueryKey, getXAppVotesQueryKey, getXApps, getXAppsMetadataBaseUri, getXAppsMetadataBaseUriQueryKey, getXAppsQueryKey, gmNfts, humanAddress, humanDomain, humanNumber, isValidAddress, isZero, leftPadWithZeros, notFoundImage, pollForReceipt, randomTransactionUser, regexPattern, resolveMediaTypeFromMimeType, toIPFSURL, useAccountBalance, useAccountLinking, useAccountModal, useAllocationAmount, useAppAdmin, useAppBalance, useAppExists, useAppSecurityLevel, useAppsEligibleInNextRound, useB3trDonated, useB3trToUpgrade, useBalances, useCall, useClaimVeWorldSubdomain, useConnectModal, useCrossAppConnectionCache, useCurrentAllocationsRoundId, useCurrentBlock, useEnsRecordExists, useFetchAppInfo, useGMBaseUri, useGMbalance, useGetB3trBalance, useGetChainId, useGetCumulativeScoreWithDecay, useGetCurrentUserCumulativeScoreWithDecay, useGetDelegatee, useGetDelegator, useGetEntitiesLinkedToPassport, useGetNodeManager, useGetNodeUrl, useGetPassportForEntity, useGetPendingDelegationsDelegateePOV, useGetPendingDelegationsDelegatorPOV, useGetPendingLinkings, useGetTokenUsdPrice, useGetTokensInfoByOwner, useGetUserEntitiesLinkedToPassport, useGetUserNode, useGetUserNodes, useGetUserPassportForEntity, useGetUserPendingLinkings, useGetVeDelegateBalance, useGetVot3Balance, useHasVotedInRound, useIpfsImage, useIpfsImageList, useIpfsMetadata, useIpfsMetadatas, useIsBlacklisted, useIsEntity, useIsGMclaimable, useIsNodeHolder, useIsPassport, useIsPassportCheckEnabled, useIsPerson, useIsPersonAtTimepoint, useIsUserEntity, useIsUserPassport, useIsUserPerson, useIsWhitelisted, useLevelMultiplier, useLevelOfToken, useMultipleXAppRoundEarnings, useNFTImage, useNFTMetadataUri, useParticipatedInGovernance, useParticipationScoreThreshold, usePassportChecks, usePrivyWalletProvider, useRefreshBalances, useRoundEarnings, useRoundReward, useRoundXApps, useSecurityMultiplier, useSelectedGmNft, useSendTransaction, useSignMessage, useSignTypedData, useSmartAccount, useSmartAccountAlert, useThresholdParticipationScore, useThresholdParticipationScoreAtTimepoint, useTokenIdByAccount, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useUserBotSignals, useUserCurrentRoundScore, useUserDelegation, useUserRoundScore, useUserStatus, useUserTopVotedApps, useUserVotesInAllRounds, useUserVotesInRound, useUserXNodes, useVeChainKitConfig, useVechainDomain, useVotesInRound, useVotingRewards, useWallet, useXApp, useXAppMetadata, useXAppRoundEarnings, useXAppTotalEarnings, useXAppVotes, useXAppVotesQf, useXApps, useXAppsMetadataBaseUri, useXNode, useXNodeCheckCooldown, useXNodes, validateIpfsUri, xNodeToGMstartingLevel };
|