@vechain/vechain-kit 0.10.4 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,14 +4,14 @@ 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 { User, WalletListEntry } from '@privy-io/react-auth';
7
+ import { WalletListEntry, User } from '@privy-io/react-auth';
8
8
  export { useCrossAppAccounts, usePrivy } from '@privy-io/react-auth';
9
+ import { WalletSource, LogLevel } from '@vechain/dapp-kit';
9
10
  import { WalletConnectOptions } from '@vechain/dapp-kit-react';
10
11
  export { useConnex } from '@vechain/dapp-kit-react';
12
+ import { CustomizedStyle, SourceInfo, I18n } from '@vechain/dapp-kit-ui';
11
13
  import * as _tanstack_react_query from '@tanstack/react-query';
12
14
  import { ThorClient } from '@vechain/sdk-network';
13
- import { WalletSource, LogLevel } from '@vechain/dapp-kit';
14
- import { CustomizedStyle, SourceInfo, I18n } from '@vechain/dapp-kit-ui';
15
15
  import { Account } from 'viem/accounts';
16
16
 
17
17
  declare const SimpleAccountABI: readonly [{
@@ -727,39 +727,39 @@ declare const SimpleAccountFactoryABI: readonly [{
727
727
  readonly type: "function";
728
728
  }];
729
729
 
730
- type Props$q = {
730
+ type Props$v = {
731
731
  boxSize?: string | number;
732
732
  } & Omit<BoxProps, 'dangerouslySetInnerHTML'>;
733
- declare const GoogleLogo: React__default.FC<Props$q>;
733
+ declare const GoogleLogo: React__default.FC<Props$v>;
734
734
 
735
- type Props$p = {
735
+ type Props$u = {
736
736
  isDark?: boolean;
737
737
  boxSize?: string | number;
738
738
  } & Omit<BoxProps, 'dangerouslySetInnerHTML'>;
739
- declare const TwitterLogo: React__default.FC<Props$p>;
739
+ declare const TwitterLogo: React__default.FC<Props$u>;
740
740
 
741
- type Props$o = {
741
+ type Props$t = {
742
742
  isDark?: boolean;
743
743
  } & Omit<IconProps, 'dangerouslySetInnerHTML'>;
744
- declare const VechainLogo: React__default.FC<Props$o>;
744
+ declare const VechainLogo: React__default.FC<Props$t>;
745
745
 
746
- type Props$n = {
746
+ type Props$s = {
747
747
  isDark?: boolean;
748
748
  } & Omit<ImageProps, 'dangerouslySetInnerHTML'>;
749
- declare const VechainLogoHorizontal: React__default.FC<Props$n>;
749
+ declare const VechainLogoHorizontal: React__default.FC<Props$s>;
750
750
 
751
- type Props$m = {
751
+ type Props$r = {
752
752
  isOpen: boolean;
753
753
  onClose: () => void;
754
754
  };
755
755
  type ConnectModalContents = 'main' | 'email-verification';
756
- declare const ConnectModal: ({ isOpen, onClose }: Props$m) => react_jsx_runtime.JSX.Element;
756
+ declare const ConnectModal: ({ isOpen, onClose }: Props$r) => react_jsx_runtime.JSX.Element;
757
757
 
758
- type Props$l = {
758
+ type Props$q = {
759
759
  setCurrentContent: React__default.Dispatch<React__default.SetStateAction<ConnectModalContents>>;
760
760
  onClose: () => void;
761
761
  };
762
- declare const MainContent: ({ onClose }: Props$l) => react_jsx_runtime.JSX.Element;
762
+ declare const MainContent: ({ onClose }: Props$q) => react_jsx_runtime.JSX.Element;
763
763
 
764
764
  interface ConnectionButtonProps {
765
765
  isDark: boolean;
@@ -772,25 +772,22 @@ declare const ConnectionButton: ({ isDark, onClick, text, icon, customIcon, }: C
772
772
 
773
773
  declare const EmailLoginButton: () => react_jsx_runtime.JSX.Element;
774
774
 
775
- declare const WalletButton: () => react_jsx_runtime.JSX.Element;
775
+ type Props$p = {
776
+ isDark: boolean;
777
+ };
778
+ declare const VeChainLoginButton: ({ isDark }: Props$p) => react_jsx_runtime.JSX.Element;
776
779
 
777
- type TransactionModalProps = {
778
- isOpen: boolean;
779
- onClose: () => void;
780
- status: string;
781
- pendingTitle?: ReactNode;
782
- confirmationTitle?: ReactNode;
783
- errorTitle?: ReactNode;
784
- errorDescription?: string;
785
- successTitle?: ReactNode;
786
- showSocialButtons?: boolean;
787
- socialDescriptionEncoded?: string;
788
- showTryAgainButton?: boolean;
789
- onTryAgain?: () => void;
790
- showExplorerButton?: boolean;
791
- txId?: string;
780
+ type Props$o = {
781
+ isDark: boolean;
782
+ privySocialLoginEnabled: boolean;
792
783
  };
793
- declare const TransactionModal: ({ isOpen, onClose, status, pendingTitle, confirmationTitle, errorTitle, errorDescription, successTitle, showSocialButtons, socialDescriptionEncoded, showTryAgainButton, onTryAgain, showExplorerButton, txId, }: TransactionModalProps) => react_jsx_runtime.JSX.Element | null;
784
+ declare const EcosystemButton: ({ isDark, privySocialLoginEnabled }: Props$o) => react_jsx_runtime.JSX.Element;
785
+
786
+ type Props$n = {
787
+ isDark: boolean;
788
+ onViewMoreLogin: () => void;
789
+ };
790
+ declare const PrivyButton: ({ isDark, onViewMoreLogin }: Props$n) => react_jsx_runtime.JSX.Element;
794
791
 
795
792
  type Wallet = {
796
793
  address: string | null;
@@ -868,6 +865,195 @@ type PrivyAppInfo = {
868
865
  };
869
866
  type PrivyLoginMethod = 'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'apple' | 'farcaster' | 'telegram';
870
867
 
868
+ /**
869
+ * The type of network that we are connected to (indentified by the genesis block)
870
+ * */
871
+ type NETWORK_TYPE = 'main' | 'test' | 'solo';
872
+ /**
873
+ * A model for the VechainThor network that we are connected to
874
+ * @field `id` - Unique ID for this network
875
+ * @field `defaultNet` - If the network is a default network
876
+ * @field `name` - A name for this network
877
+ * @field `type` - What type of network is it? `main, test, solo or custom`
878
+ * @field `urls` - A list of URLs for this network
879
+ * @field `currentUrl` - The current URL that we are connected to
880
+ * @field `explorerUrl` - The explorer URL for this network
881
+ * @field `genesis` - The genesis block for the network
882
+ * @field `blockTime` - The time it takes to mine a block in milliseconds
883
+ */
884
+ type Network = {
885
+ id: string;
886
+ defaultNet: boolean;
887
+ name: string;
888
+ type: NETWORK_TYPE;
889
+ urls: string[];
890
+ explorerUrl?: string;
891
+ genesis: typeof genesises.main;
892
+ blockTime: number;
893
+ };
894
+ declare const genesises: {
895
+ readonly main: Connex.Thor.Block;
896
+ readonly test: Connex.Thor.Block;
897
+ readonly solo: Connex.Thor.Block;
898
+ which(gid: string): "main" | "solo" | "test" | undefined;
899
+ };
900
+
901
+ type VechainKitProps = {
902
+ children: ReactNode;
903
+ privy?: {
904
+ appId: string;
905
+ clientId: string;
906
+ appearance: {
907
+ walletList: WalletListEntry[];
908
+ accentColor: `#${string}`;
909
+ loginMessage: string;
910
+ logo: string;
911
+ };
912
+ embeddedWallets?: {
913
+ createOnLogin: 'users-without-wallets' | 'all-users' | 'off';
914
+ };
915
+ loginMethods: PrivyLoginMethod[];
916
+ allowPasskeyLinking?: boolean;
917
+ };
918
+ privyEcosystemAppIDS: string[];
919
+ feeDelegation: {
920
+ delegatorUrl: string;
921
+ delegateAllTransactions: boolean;
922
+ };
923
+ dappKit: {
924
+ allowedWallets?: WalletSource[];
925
+ walletConnectOptions?: WalletConnectOptions;
926
+ usePersistence?: boolean;
927
+ useFirstDetectedSource?: boolean;
928
+ logLevel?: LogLevel;
929
+ themeVariables?: CustomizedStyle;
930
+ modalParent?: HTMLElement;
931
+ onSourceClick?: (source?: SourceInfo) => void;
932
+ };
933
+ loginModalUI?: {
934
+ logo?: string;
935
+ description?: string;
936
+ preferredLoginMethods?: Array<'email' | 'google'>;
937
+ };
938
+ darkMode?: boolean;
939
+ i18n?: I18n;
940
+ language?: string;
941
+ network: {
942
+ type: NETWORK_TYPE;
943
+ nodeUrl?: string;
944
+ requireCertificate?: boolean;
945
+ connectionCertificate?: {
946
+ message?: Connex.Vendor.CertMessage;
947
+ options?: Connex.Signer.CertOptions;
948
+ };
949
+ };
950
+ };
951
+ type VeChainKitConfig = {
952
+ privy?: VechainKitProps['privy'];
953
+ privyEcosystemAppIDS: string[];
954
+ feeDelegation: VechainKitProps['feeDelegation'];
955
+ dappKit: VechainKitProps['dappKit'];
956
+ loginModalUI?: VechainKitProps['loginModalUI'];
957
+ darkMode?: VechainKitProps['darkMode'];
958
+ i18n?: VechainKitProps['i18n'];
959
+ language?: VechainKitProps['language'];
960
+ network: VechainKitProps['network'];
961
+ privySocialLoginEnabled: boolean;
962
+ openConnectModal: () => void;
963
+ closeConnectModal: () => void;
964
+ isConnectModalOpen: boolean;
965
+ openAccountModal: () => void;
966
+ closeAccountModal: () => void;
967
+ isAccountModalOpen: boolean;
968
+ openTransactionModal: () => void;
969
+ closeTransactionModal: () => void;
970
+ isTransactionModalOpen: boolean;
971
+ openTransactionToast: () => void;
972
+ closeTransactionToast: () => void;
973
+ isTransactionToastOpen: boolean;
974
+ };
975
+ /**
976
+ * Context to store the Privy and DAppKit configs so that they can be used by the hooks/components
977
+ */
978
+ declare const VeChainKitContext: React$1.Context<VeChainKitConfig | null>;
979
+ /**
980
+ * Hook to get the Privy and DAppKit configs
981
+ */
982
+ declare const useVeChainKitConfig: () => VeChainKitConfig;
983
+ /**
984
+ * Provider to wrap the application with Privy and DAppKit
985
+ */
986
+ declare const VeChainKit: ({ children, privy, feeDelegation, dappKit, loginModalUI, darkMode, i18n, language, network, privyEcosystemAppIDS, }: Omit<VechainKitProps, "queryClient">) => react_jsx_runtime.JSX.Element;
987
+
988
+ interface PrivyWalletProviderContextType {
989
+ accountFactory: string;
990
+ delegateAllTransactions: boolean;
991
+ sendTransaction: (tx: {
992
+ txClauses: Connex.VM.Clause[];
993
+ title?: string;
994
+ description?: string;
995
+ buttonText?: string;
996
+ }) => Promise<string>;
997
+ exportWallet: () => Promise<void>;
998
+ }
999
+ /**
1000
+ * This provider is responsible for retrieving the smart account address
1001
+ * of a Privy wallet and providing the necessary context for the smart account.
1002
+ * Upon initialization this provider will execute a few useEffect hooks to:
1003
+ * - retrieve the smart account address of the embedded wallet
1004
+ * - retrieve the chain id
1005
+ * - check if the smart account is deployed
1006
+ *
1007
+ * It also provides a function to send transactions on vechain by asking the privy wallet
1008
+ * to sign the transaction and then forwarding the transaction to the node api.
1009
+ * When sending a transaction this provider will check if the smart account is deployed and if not,
1010
+ * it will deploy it.
1011
+ */
1012
+ declare const PrivyWalletProvider: ({ children, nodeUrl, delegatorUrl, delegateAllTransactions, }: {
1013
+ children: React__default.ReactNode;
1014
+ nodeUrl: string;
1015
+ delegatorUrl: string;
1016
+ delegateAllTransactions: boolean;
1017
+ }) => react_jsx_runtime.JSX.Element;
1018
+ declare const usePrivyWalletProvider: () => PrivyWalletProviderContextType;
1019
+
1020
+ type Props$m = {
1021
+ isDark: boolean;
1022
+ loginModalUI: VechainKitProps['loginModalUI'];
1023
+ };
1024
+ declare const SocialLoginButtons: ({ isDark, loginModalUI }: Props$m) => react_jsx_runtime.JSX.Element;
1025
+
1026
+ type Props$l = {
1027
+ isDark: boolean;
1028
+ };
1029
+ declare const PasskeyLoginButton: ({ isDark }: Props$l) => react_jsx_runtime.JSX.Element;
1030
+
1031
+ type Props$k = {
1032
+ isDark: boolean;
1033
+ privySocialLoginEnabled: boolean;
1034
+ };
1035
+ declare const DappKitButton: ({ isDark, privySocialLoginEnabled }: Props$k) => react_jsx_runtime.JSX.Element;
1036
+
1037
+ declare const WalletButton: () => react_jsx_runtime.JSX.Element;
1038
+
1039
+ type TransactionModalProps = {
1040
+ isOpen: boolean;
1041
+ onClose: () => void;
1042
+ status: string;
1043
+ pendingTitle?: ReactNode;
1044
+ confirmationTitle?: ReactNode;
1045
+ errorTitle?: ReactNode;
1046
+ errorDescription?: string;
1047
+ successTitle?: ReactNode;
1048
+ showSocialButtons?: boolean;
1049
+ socialDescriptionEncoded?: string;
1050
+ showTryAgainButton?: boolean;
1051
+ onTryAgain?: () => void;
1052
+ showExplorerButton?: boolean;
1053
+ txId?: string;
1054
+ };
1055
+ declare const TransactionModal: ({ isOpen, onClose, status, pendingTitle, confirmationTitle, errorTitle, errorDescription, successTitle, showSocialButtons, socialDescriptionEncoded, showTryAgainButton, onTryAgain, showExplorerButton, txId, }: TransactionModalProps) => react_jsx_runtime.JSX.Element | null;
1056
+
871
1057
  type TransactionToastProps = {
872
1058
  isOpen: boolean;
873
1059
  onClose: () => void;
@@ -878,11 +1064,11 @@ type TransactionToastProps = {
878
1064
  };
879
1065
  declare const TransactionToast: ({ isOpen, onClose, status, txReceipt, error, resetStatus, }: TransactionToastProps) => react_jsx_runtime.JSX.Element | null;
880
1066
 
881
- type Props$k = {
1067
+ type Props$j = {
882
1068
  isOpen: boolean;
883
1069
  onClose: () => void;
884
1070
  };
885
- declare const AccountModal: ({ isOpen, onClose }: Props$k) => react_jsx_runtime.JSX.Element;
1071
+ declare const AccountModal: ({ isOpen, onClose }: Props$j) => react_jsx_runtime.JSX.Element;
886
1072
 
887
1073
  type AccountModalContentTypes = 'main' | 'settings' | 'smart-account' | 'accounts' | 'send-token' | 'receive-token' | {
888
1074
  type: 'send-token-summary';
@@ -903,38 +1089,38 @@ type AccountModalContentTypes = 'main' | 'settings' | 'smart-account' | 'account
903
1089
  };
904
1090
  };
905
1091
 
906
- type Props$j = {
1092
+ type Props$i = {
907
1093
  setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
908
1094
  onClose: () => void;
909
1095
  wallet: Wallet;
910
1096
  };
911
- declare const AccountMainContent: ({ setCurrentContent, wallet }: Props$j) => react_jsx_runtime.JSX.Element;
1097
+ declare const AccountMainContent: ({ setCurrentContent, wallet }: Props$i) => react_jsx_runtime.JSX.Element;
912
1098
 
913
- type Props$i = {
1099
+ type Props$h = {
914
1100
  setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
915
1101
  onClose: () => void;
916
1102
  wallet?: Wallet;
917
1103
  };
918
- declare const AccountsListContent: ({ setCurrentContent, onClose }: Props$i) => react_jsx_runtime.JSX.Element;
1104
+ declare const AccountsListContent: ({ setCurrentContent, onClose }: Props$h) => react_jsx_runtime.JSX.Element;
919
1105
 
920
- type Props$h = {
1106
+ type Props$g = {
921
1107
  setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
922
1108
  };
923
- declare const SmartAccountContent: ({ setCurrentContent }: Props$h) => react_jsx_runtime.JSX.Element;
1109
+ declare const SmartAccountContent: ({ setCurrentContent }: Props$g) => react_jsx_runtime.JSX.Element;
924
1110
 
925
- type Props$g = {
1111
+ type Props$f = {
926
1112
  setCurrentContent: (content: AccountModalContentTypes) => void;
927
1113
  onLogoutSuccess: () => void;
928
1114
  };
929
- declare const WalletSettingsContent: ({ setCurrentContent, onLogoutSuccess, }: Props$g) => react_jsx_runtime.JSX.Element;
1115
+ declare const WalletSettingsContent: ({ setCurrentContent, onLogoutSuccess, }: Props$f) => react_jsx_runtime.JSX.Element;
930
1116
 
931
- type Props$f = {
1117
+ type Props$e = {
932
1118
  setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
933
1119
  onSend: (address: string, amount: string) => void;
934
1120
  };
935
- declare const SendTokenContent: ({ setCurrentContent, onSend }: Props$f) => react_jsx_runtime.JSX.Element;
1121
+ declare const SendTokenContent: ({ setCurrentContent, onSend }: Props$e) => react_jsx_runtime.JSX.Element;
936
1122
 
937
- type Props$e = {
1123
+ type Props$d = {
938
1124
  setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
939
1125
  onSend: (address: string, amount: string) => void;
940
1126
  toAddressOrDomain: string;
@@ -949,7 +1135,7 @@ type Props$e = {
949
1135
  price: number;
950
1136
  };
951
1137
  };
952
- declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, }: Props$e) => react_jsx_runtime.JSX.Element;
1138
+ declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, }: Props$d) => react_jsx_runtime.JSX.Element;
953
1139
 
954
1140
  type Token = {
955
1141
  symbol: string;
@@ -958,17 +1144,17 @@ type Token = {
958
1144
  numericBalance: number;
959
1145
  price: number;
960
1146
  };
961
- type Props$d = {
1147
+ type Props$c = {
962
1148
  setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
963
1149
  onSelectToken: (token: Token) => void;
964
1150
  onBack: () => void;
965
1151
  };
966
- declare const SelectTokenContent: ({ onSelectToken, onBack }: Props$d) => react_jsx_runtime.JSX.Element;
1152
+ declare const SelectTokenContent: ({ onSelectToken, onBack }: Props$c) => react_jsx_runtime.JSX.Element;
967
1153
 
968
- type Props$c = {
1154
+ type Props$b = {
969
1155
  setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
970
1156
  };
971
- declare const ReceiveTokenContent: ({ setCurrentContent }: Props$c) => react_jsx_runtime.JSX.Element;
1157
+ declare const ReceiveTokenContent: ({ setCurrentContent }: Props$b) => react_jsx_runtime.JSX.Element;
972
1158
 
973
1159
  interface AccountDetailsButtonProps {
974
1160
  title: string;
@@ -998,12 +1184,12 @@ interface ActionButtonProps {
998
1184
  }
999
1185
  declare const ActionButton: ({ leftIcon, rightIcon, title, description, onClick, leftImage, hide, showComingSoon, backgroundColor, _hover, }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
1000
1186
 
1001
- type Props$b = {
1187
+ type Props$a = {
1002
1188
  wallet: Wallet;
1003
1189
  size?: string;
1004
1190
  onClick?: () => void;
1005
1191
  };
1006
- declare const AccountSelector: ({ wallet, size, onClick }: Props$b) => react_jsx_runtime.JSX.Element;
1192
+ declare const AccountSelector: ({ wallet, size, onClick }: Props$a) => react_jsx_runtime.JSX.Element;
1007
1193
 
1008
1194
  declare const BalanceSection: ({ mb }: {
1009
1195
  mb?: number;
@@ -1011,55 +1197,55 @@ declare const BalanceSection: ({ mb }: {
1011
1197
 
1012
1198
  declare const AssetsSection: () => react_jsx_runtime.JSX.Element;
1013
1199
 
1014
- type Props$a = {
1015
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1016
- };
1017
- declare const QuickActionsSection: ({ setCurrentContent }: Props$a) => react_jsx_runtime.JSX.Element;
1018
-
1019
1200
  type Props$9 = {
1020
- children: ReactNode;
1201
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1021
1202
  };
1022
- declare const FadeInView: ({ children }: Props$9) => react_jsx_runtime.JSX.Element;
1203
+ declare const QuickActionsSection: ({ setCurrentContent }: Props$9) => react_jsx_runtime.JSX.Element;
1023
1204
 
1024
1205
  type Props$8 = {
1025
1206
  children: ReactNode;
1026
1207
  };
1027
- declare const FadeInViewFromBottom: ({ children }: Props$8) => react_jsx_runtime.JSX.Element;
1208
+ declare const FadeInView: ({ children }: Props$8) => react_jsx_runtime.JSX.Element;
1028
1209
 
1029
1210
  type Props$7 = {
1030
1211
  children: ReactNode;
1031
1212
  };
1032
- declare const FadeInViewFromLeft: ({ children }: Props$7) => react_jsx_runtime.JSX.Element;
1213
+ declare const FadeInViewFromBottom: ({ children }: Props$7) => react_jsx_runtime.JSX.Element;
1033
1214
 
1034
1215
  type Props$6 = {
1035
1216
  children: ReactNode;
1036
1217
  };
1037
- declare const FadeInViewFromRight: ({ children }: Props$6) => react_jsx_runtime.JSX.Element;
1218
+ declare const FadeInViewFromLeft: ({ children }: Props$6) => react_jsx_runtime.JSX.Element;
1219
+
1220
+ type Props$5 = {
1221
+ children: ReactNode;
1222
+ };
1223
+ declare const FadeInViewFromRight: ({ children }: Props$5) => react_jsx_runtime.JSX.Element;
1038
1224
 
1039
1225
  type BackButtonProps = {
1040
1226
  onClick: () => void;
1041
1227
  } & Partial<IconButtonProps>;
1042
1228
  declare const ModalBackButton: ({ onClick, ...props }: BackButtonProps) => react_jsx_runtime.JSX.Element;
1043
1229
 
1044
- type Props$5 = {
1230
+ type Props$4 = {
1045
1231
  wallet: Wallet;
1046
1232
  label?: string;
1047
1233
  size?: string;
1048
1234
  };
1049
- declare const AddressDisplay: ({ wallet, label, size }: Props$5) => react_jsx_runtime.JSX.Element;
1235
+ declare const AddressDisplay: ({ wallet, label, size }: Props$4) => react_jsx_runtime.JSX.Element;
1050
1236
 
1051
- type Props$4 = {} & Omit<StackProps, 'dangerouslySetInnerHTML'>;
1052
- declare const VersionFooter: ({ ...props }: Props$4) => react_jsx_runtime.JSX.Element;
1237
+ type Props$3 = {} & Omit<StackProps, 'dangerouslySetInnerHTML'>;
1238
+ declare const VersionFooter: ({ ...props }: Props$3) => react_jsx_runtime.JSX.Element;
1053
1239
 
1054
- type Props$3 = {
1240
+ type Props$2 = {
1055
1241
  children: React.ReactNode;
1056
1242
  };
1057
- declare const StickyHeaderContainer: ({ children }: Props$3) => react_jsx_runtime.JSX.Element;
1243
+ declare const StickyHeaderContainer: ({ children }: Props$2) => react_jsx_runtime.JSX.Element;
1058
1244
 
1059
- type Props$2 = {
1245
+ type Props$1 = {
1060
1246
  children: React.ReactNode;
1061
1247
  };
1062
- declare const StickyFooterContainer: ({ children }: Props$2) => react_jsx_runtime.JSX.Element;
1248
+ declare const StickyFooterContainer: ({ children }: Props$1) => react_jsx_runtime.JSX.Element;
1063
1249
 
1064
1250
  type BaseModalProps = {
1065
1251
  isOpen: boolean;
@@ -1072,8 +1258,10 @@ type BaseModalProps = {
1072
1258
  closeOnOverlayClick?: boolean;
1073
1259
  blockScrollOnMount?: boolean;
1074
1260
  autoFocus?: boolean;
1261
+ initialFocusRef?: React.RefObject<HTMLElement>;
1262
+ allowExternalFocus?: boolean;
1075
1263
  };
1076
- declare const BaseModal: ({ isOpen, onClose, children, size, isCentered, motionPreset, trapFocus, closeOnOverlayClick, blockScrollOnMount, autoFocus, }: BaseModalProps) => react_jsx_runtime.JSX.Element;
1264
+ declare const BaseModal: ({ isOpen, onClose, children, size, isCentered, motionPreset, closeOnOverlayClick, blockScrollOnMount, allowExternalFocus, }: BaseModalProps) => react_jsx_runtime.JSX.Element;
1077
1265
 
1078
1266
  type AssetButtonProps = ButtonProps & {
1079
1267
  symbol: string;
@@ -1086,14 +1274,17 @@ declare const AssetButton: ({ symbol, amount, usdValue, isDisabled, ...buttonPro
1086
1274
  type LoginLoadingModalProps = {
1087
1275
  isOpen: boolean;
1088
1276
  onClose: () => void;
1277
+ error?: string;
1278
+ title?: string;
1279
+ loadingText?: string;
1089
1280
  };
1090
- declare const LoginLoadingModal: ({ isOpen, onClose, }: LoginLoadingModalProps) => react_jsx_runtime.JSX.Element;
1281
+ declare const LoginLoadingModal: ({ isOpen, onClose, error, title, loadingText, }: LoginLoadingModalProps) => react_jsx_runtime.JSX.Element;
1091
1282
 
1092
- type Props$1 = {
1283
+ type Props = {
1093
1284
  isOpen: boolean;
1094
1285
  onClose: () => void;
1095
1286
  };
1096
- declare const EcosystemModal: ({ isOpen, onClose }: Props$1) => react_jsx_runtime.JSX.Element;
1287
+ declare const EcosystemModal: ({ isOpen, onClose }: Props) => react_jsx_runtime.JSX.Element;
1097
1288
 
1098
1289
  /**
1099
1290
  * Poll the chain for a transaction receipt until it is found (or timeout after 5 blocks)
@@ -1115,39 +1306,6 @@ declare const useTxReceipt: (txId?: string, blockTimeout?: number) => {
1115
1306
  isLoading: boolean;
1116
1307
  };
1117
1308
 
1118
- /**
1119
- * The type of network that we are connected to (indentified by the genesis block)
1120
- * */
1121
- type NETWORK_TYPE = 'main' | 'test' | 'solo';
1122
- /**
1123
- * A model for the VechainThor network that we are connected to
1124
- * @field `id` - Unique ID for this network
1125
- * @field `defaultNet` - If the network is a default network
1126
- * @field `name` - A name for this network
1127
- * @field `type` - What type of network is it? `main, test, solo or custom`
1128
- * @field `urls` - A list of URLs for this network
1129
- * @field `currentUrl` - The current URL that we are connected to
1130
- * @field `explorerUrl` - The explorer URL for this network
1131
- * @field `genesis` - The genesis block for the network
1132
- * @field `blockTime` - The time it takes to mine a block in milliseconds
1133
- */
1134
- type Network = {
1135
- id: string;
1136
- defaultNet: boolean;
1137
- name: string;
1138
- type: NETWORK_TYPE;
1139
- urls: string[];
1140
- explorerUrl?: string;
1141
- genesis: typeof genesises.main;
1142
- blockTime: number;
1143
- };
1144
- declare const genesises: {
1145
- readonly main: Connex.Thor.Block;
1146
- readonly test: Connex.Thor.Block;
1147
- readonly solo: Connex.Thor.Block;
1148
- which(gid: string): "main" | "solo" | "test" | undefined;
1149
- };
1150
-
1151
1309
  declare const PRICE_FEED_IDS: {
1152
1310
  readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
1153
1311
  readonly VET: "0x7665742d75736400000000000000000000000000000000000000000000000000";
@@ -1406,125 +1564,6 @@ type useTransferVETReturnValue = {
1406
1564
  } & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
1407
1565
  declare const useTransferVET: ({ fromAddress, receiverAddress, amount, onSuccess, }: useTransferVETProps) => useTransferVETReturnValue;
1408
1566
 
1409
- type Props = {
1410
- children: ReactNode;
1411
- privy?: {
1412
- appId: string;
1413
- clientId: string;
1414
- appearance: {
1415
- walletList: WalletListEntry[];
1416
- accentColor: `#${string}`;
1417
- loginMessage: string;
1418
- logo: string;
1419
- };
1420
- embeddedWallets?: {
1421
- createOnLogin: 'users-without-wallets' | 'all-users' | 'off';
1422
- };
1423
- loginMethods: PrivyLoginMethod[];
1424
- allowPasskeyLinking?: boolean;
1425
- };
1426
- privyEcosystemAppIDS: string[];
1427
- feeDelegation: {
1428
- delegatorUrl: string;
1429
- delegateAllTransactions: boolean;
1430
- };
1431
- dappKit: {
1432
- allowedWallets?: WalletSource[];
1433
- walletConnectOptions?: WalletConnectOptions;
1434
- usePersistence?: boolean;
1435
- useFirstDetectedSource?: boolean;
1436
- logLevel?: LogLevel;
1437
- themeVariables?: CustomizedStyle;
1438
- modalParent?: HTMLElement;
1439
- onSourceClick?: (source?: SourceInfo) => void;
1440
- };
1441
- loginModalUI?: {
1442
- logo?: string;
1443
- description?: string;
1444
- preferredLoginMethods?: Array<'email' | 'google'>;
1445
- };
1446
- darkMode?: boolean;
1447
- i18n?: I18n;
1448
- language?: string;
1449
- network: {
1450
- type: NETWORK_TYPE;
1451
- nodeUrl?: string;
1452
- requireCertificate?: boolean;
1453
- connectionCertificate?: {
1454
- message?: Connex.Vendor.CertMessage;
1455
- options?: Connex.Signer.CertOptions;
1456
- };
1457
- };
1458
- };
1459
- type VeChainKitConfig = {
1460
- privy?: Props['privy'];
1461
- privyEcosystemAppIDS: string[];
1462
- feeDelegation: Props['feeDelegation'];
1463
- dappKit: Props['dappKit'];
1464
- loginModalUI?: Props['loginModalUI'];
1465
- darkMode?: Props['darkMode'];
1466
- i18n?: Props['i18n'];
1467
- language?: Props['language'];
1468
- network: Props['network'];
1469
- privySocialLoginEnabled: boolean;
1470
- openConnectModal: () => void;
1471
- closeConnectModal: () => void;
1472
- isConnectModalOpen: boolean;
1473
- openAccountModal: () => void;
1474
- closeAccountModal: () => void;
1475
- isAccountModalOpen: boolean;
1476
- openTransactionModal: () => void;
1477
- closeTransactionModal: () => void;
1478
- isTransactionModalOpen: boolean;
1479
- openTransactionToast: () => void;
1480
- closeTransactionToast: () => void;
1481
- isTransactionToastOpen: boolean;
1482
- };
1483
- /**
1484
- * Context to store the Privy and DAppKit configs so that they can be used by the hooks/components
1485
- */
1486
- declare const VeChainKitContext: React$1.Context<VeChainKitConfig | null>;
1487
- /**
1488
- * Hook to get the Privy and DAppKit configs
1489
- */
1490
- declare const useVeChainKitConfig: () => VeChainKitConfig;
1491
- /**
1492
- * Provider to wrap the application with Privy and DAppKit
1493
- */
1494
- declare const VeChainKit: ({ children, privy, feeDelegation, dappKit, loginModalUI, darkMode, i18n, language, network, privyEcosystemAppIDS, }: Omit<Props, "queryClient">) => react_jsx_runtime.JSX.Element;
1495
-
1496
- interface PrivyWalletProviderContextType {
1497
- accountFactory: string;
1498
- delegateAllTransactions: boolean;
1499
- sendTransaction: (tx: {
1500
- txClauses: Connex.VM.Clause[];
1501
- title?: string;
1502
- description?: string;
1503
- buttonText?: string;
1504
- }) => Promise<string>;
1505
- exportWallet: () => Promise<void>;
1506
- }
1507
- /**
1508
- * This provider is responsible for retrieving the smart account address
1509
- * of a Privy wallet and providing the necessary context for the smart account.
1510
- * Upon initialization this provider will execute a few useEffect hooks to:
1511
- * - retrieve the smart account address of the embedded wallet
1512
- * - retrieve the chain id
1513
- * - check if the smart account is deployed
1514
- *
1515
- * It also provides a function to send transactions on vechain by asking the privy wallet
1516
- * to sign the transaction and then forwarding the transaction to the node api.
1517
- * When sending a transaction this provider will check if the smart account is deployed and if not,
1518
- * it will deploy it.
1519
- */
1520
- declare const PrivyWalletProvider: ({ children, nodeUrl, delegatorUrl, delegateAllTransactions, }: {
1521
- children: React__default.ReactNode;
1522
- nodeUrl: string;
1523
- delegatorUrl: string;
1524
- delegateAllTransactions: boolean;
1525
- }) => react_jsx_runtime.JSX.Element;
1526
- declare const usePrivyWalletProvider: () => PrivyWalletProviderContextType;
1527
-
1528
1567
  declare const TOKEN_LOGOS: Record<string, string>;
1529
1568
  declare const VECHAIN_PRIVY_APP_ID = "cm4wxxujb022fyujl7g0thb21";
1530
1569
 
@@ -1583,4 +1622,4 @@ type AppConfig = {
1583
1622
  };
1584
1623
  declare const getConfig: (env: NETWORK_TYPE) => AppConfig;
1585
1624
 
1586
- export { AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, AccountsListContent, ActionButton, AddressDisplay, type AppConfig, AssetButton, AssetsSection, BalanceSection, BaseModal, ConnectModal, type ConnectModalContents, ConnectModalProvider, ConnectionButton, type ConnectionSource, EcosystemModal, EmailLoginButton, type EnhancedClause, type ExecuteWithAuthorizationSignData, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, GoogleLogo, LoginLoadingModal, MainContent, ModalBackButton, PRICE_FEED_IDS, type PrivyAppInfo, type PrivyLoginMethod, PrivyWalletProvider, type PrivyWalletProviderContextType, QuickActionsSection, ReceiveTokenContent, SelectTokenContent, SendTokenContent, SendTokenSummaryContent, SimpleAccountABI, SimpleAccountFactoryABI, type SmartAccount, SmartAccountContent, type SmartAccountReturnType, StickyFooterContainer, StickyHeaderContainer, type SupportedToken, TOKEN_LOGOS, TransactionModal, type TransactionModalProps, TransactionModalProvider, type TransactionStatus, type TransactionStatusErrorType, TransactionToast, TransactionToastProvider, TwitterLogo, type UseSendTransactionReturnValue, type UseWalletReturnType, VECHAIN_PRIVY_APP_ID, VeChainKit, VeChainKitContext, VechainLogo, VechainLogoHorizontal, VersionFooter, type Wallet, WalletButton, WalletSettingsContent, compareAddresses, compareListOfAddresses, fetchPrivyAppInfo, getAccountBalance, getAccountBalanceQueryKey, getB3trBalance, getB3trBalanceQueryKey, getChainId, getChainIdQueryKey, getConfig, getPicassoImage, getPrivyAppInfoQueryKey, getSmartAccount, getSmartAccountQueryKey, getTokenUsdPrice, getTokenUsdPriceQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVetDomainQueryKey, getVot3Balance, getVot3BalanceQueryKey, humanAddress, humanDomain, isValidAddress, leftPadWithZeros, pollForReceipt, randomTransactionUser, regexPattern, useAccountBalance, useAccountModal, useBalances, useCachedVeChainDomain, useConnectModal, useFetchAppInfo, useGetB3trBalance, useGetChainId, useGetNodeUrl, useGetTokenUsdPrice, useGetVeDelegateBalance, useGetVetDomain, useGetVot3Balance, usePrivyWalletProvider, useRefreshBalances, useSendTransaction, useSmartAccount, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useVeChainKitConfig, useWallet };
1625
+ export { AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, AccountsListContent, ActionButton, AddressDisplay, type AppConfig, AssetButton, AssetsSection, BalanceSection, BaseModal, ConnectModal, type ConnectModalContents, ConnectModalProvider, ConnectionButton, type ConnectionSource, DappKitButton, EcosystemButton, EcosystemModal, EmailLoginButton, type EnhancedClause, type ExecuteWithAuthorizationSignData, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, GoogleLogo, LoginLoadingModal, MainContent, ModalBackButton, PRICE_FEED_IDS, PasskeyLoginButton, type PrivyAppInfo, PrivyButton, type PrivyLoginMethod, PrivyWalletProvider, type PrivyWalletProviderContextType, QuickActionsSection, ReceiveTokenContent, SelectTokenContent, SendTokenContent, SendTokenSummaryContent, SimpleAccountABI, SimpleAccountFactoryABI, type SmartAccount, SmartAccountContent, type SmartAccountReturnType, SocialLoginButtons, StickyFooterContainer, StickyHeaderContainer, type SupportedToken, TOKEN_LOGOS, TransactionModal, type TransactionModalProps, TransactionModalProvider, type TransactionStatus, type TransactionStatusErrorType, TransactionToast, TransactionToastProvider, TwitterLogo, type UseSendTransactionReturnValue, type UseWalletReturnType, VECHAIN_PRIVY_APP_ID, VeChainKit, VeChainKitContext, VeChainLoginButton, type VechainKitProps, VechainLogo, VechainLogoHorizontal, VersionFooter, type Wallet, WalletButton, WalletSettingsContent, compareAddresses, compareListOfAddresses, fetchPrivyAppInfo, getAccountBalance, getAccountBalanceQueryKey, getB3trBalance, getB3trBalanceQueryKey, getChainId, getChainIdQueryKey, getConfig, getPicassoImage, getPrivyAppInfoQueryKey, getSmartAccount, getSmartAccountQueryKey, getTokenUsdPrice, getTokenUsdPriceQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVetDomainQueryKey, getVot3Balance, getVot3BalanceQueryKey, humanAddress, humanDomain, isValidAddress, leftPadWithZeros, pollForReceipt, randomTransactionUser, regexPattern, useAccountBalance, useAccountModal, useBalances, useCachedVeChainDomain, useConnectModal, useFetchAppInfo, useGetB3trBalance, useGetChainId, useGetNodeUrl, useGetTokenUsdPrice, useGetVeDelegateBalance, useGetVetDomain, useGetVot3Balance, usePrivyWalletProvider, useRefreshBalances, useSendTransaction, useSmartAccount, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useVeChainKitConfig, useWallet };