@vechain/vechain-kit 0.8.0 → 0.9.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/dist/index.d.ts CHANGED
@@ -4,12 +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, ConnectedWallet, WalletListEntry } from '@privy-io/react-auth';
7
+ import { User, WalletListEntry, ConnectedWallet } from '@privy-io/react-auth';
8
8
  export { useCrossAppAccounts, usePrivy } from '@privy-io/react-auth';
9
- import { DAppKitUIOptions } from '@vechain/dapp-kit-react';
9
+ import { WalletConnectOptions } from '@vechain/dapp-kit-react';
10
10
  export { useConnex } from '@vechain/dapp-kit-react';
11
- import { ThorClient } from '@vechain/sdk-network';
12
11
  import * as _tanstack_react_query from '@tanstack/react-query';
12
+ import { ThorClient } from '@vechain/sdk-network';
13
+ import { WalletSource, LogLevel } from '@vechain/dapp-kit';
14
+ import { CustomizedStyle, SourceInfo, I18n } from '@vechain/dapp-kit-ui';
13
15
  import * as abitype from 'abitype';
14
16
  import * as viem__types_experimental_eip7702_types_authorization from 'viem/_types/experimental/eip7702/types/authorization';
15
17
  import * as viem from 'viem';
@@ -752,23 +754,15 @@ declare const VechainLogoHorizontal: React__default.FC<Props$n>;
752
754
  type Props$m = {
753
755
  isOpen: boolean;
754
756
  onClose: () => void;
755
- logo?: string;
756
757
  };
757
- type ConnectModalContents = 'main' | 'ecosystem' | 'email-verification';
758
- declare const ConnectModal: ({ isOpen, onClose, logo }: Props$m) => react_jsx_runtime.JSX.Element;
758
+ type ConnectModalContents = 'main' | 'email-verification';
759
+ declare const ConnectModal: ({ isOpen, onClose }: Props$m) => react_jsx_runtime.JSX.Element;
759
760
 
760
761
  type Props$l = {
761
- setCurrentContent: React.Dispatch<React.SetStateAction<ConnectModalContents>>;
762
- onClose: () => void;
763
- };
764
- declare const EcosystemContent: ({ setCurrentContent, onClose }: Props$l) => react_jsx_runtime.JSX.Element;
765
-
766
- type Props$k = {
767
- setCurrentContent: React.Dispatch<React.SetStateAction<ConnectModalContents>>;
762
+ setCurrentContent: React__default.Dispatch<React__default.SetStateAction<ConnectModalContents>>;
768
763
  onClose: () => void;
769
- logo?: string;
770
764
  };
771
- declare const MainContent: ({ setCurrentContent, onClose, logo }: Props$k) => react_jsx_runtime.JSX.Element;
765
+ declare const MainContent: ({ onClose }: Props$l) => react_jsx_runtime.JSX.Element;
772
766
 
773
767
  interface ConnectionButtonProps {
774
768
  isDark: boolean;
@@ -801,6 +795,18 @@ type TransactionModalProps = {
801
795
  };
802
796
  declare const TransactionModal: ({ isOpen, onClose, status, pendingTitle, confirmationTitle, errorTitle, errorDescription, successTitle, showSocialButtons, socialDescriptionEncoded, showTryAgainButton, onTryAgain, showExplorerButton, txId, }: TransactionModalProps) => react_jsx_runtime.JSX.Element | null;
803
797
 
798
+ type Wallet = {
799
+ address: string | null;
800
+ domain?: string;
801
+ image?: string;
802
+ };
803
+ type SmartAccount = Wallet & {
804
+ isDeployed: boolean;
805
+ };
806
+ type ConnectionSource = {
807
+ type: 'privy' | 'wallet' | 'privy-cross-app';
808
+ displayName: string;
809
+ };
804
810
  /**
805
811
  * Data that the Privy user must sign in order to execute a transaction
806
812
  * by authorizing the Smart Account contract
@@ -854,82 +860,8 @@ type PrivyAppInfo$1 = {
854
860
  logo_url: string;
855
861
  description?: string;
856
862
  };
857
- type SocialInfo = {
858
- code: string;
859
- name: string;
860
- logo_url: string;
861
- description?: string;
862
- };
863
863
  type PrivyLoginMethod = 'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'apple' | 'farcaster' | 'telegram';
864
864
 
865
- /**
866
- * Network URL.
867
- * Defaults to mainnet.
868
- */
869
- declare const NETWORK_URL: string;
870
- /**
871
- * Thor client instance
872
- */
873
- declare const THOR_CLIENT: ThorClient;
874
- /**
875
- * Delegator url for the account abstraction factory contract
876
- */
877
- declare const DELEGATOR_URL: string;
878
-
879
- declare const ACCOUNT_FACTORY_ADDRESSES: {
880
- readonly '14018334920824264832118464179726739019961432051877733167310318607178': "0xC06Ad8573022e2BE416CA89DA47E8c592971679A";
881
- readonly '1176455790972829965191905223412607679856028701100105089447013101863': "0x7EABA81B4F3741Ac381af7e025f3B6e0428F05Fb";
882
- };
883
- declare const TOKEN_LOGOS: Record<string, string>;
884
- declare const EXPLORER_URL: {
885
- readonly '14018334920824264832118464179726739019961432051877733167310318607178': "https://vechainstats.com/transaction";
886
- readonly '1176455790972829965191905223412607679856028701100105089447013101863': "https://explore-testnet.vechain.org/transactions";
887
- };
888
- declare const VECHAIN_PRIVY_APP_ID = "cm4wxxujb022fyujl7g0thb21";
889
- declare const WALLET_INFOS: SocialInfo[];
890
- declare const SOCIAL_INFOS: SocialInfo[];
891
-
892
- declare const humanAddress: (address: string, charAtStart?: number, charAtEnd?: number) => string;
893
- declare const humanDomain: (domain: string, lengthBefore?: number, lengthAfter?: number) => string;
894
- declare const getPicassoImage: (address: string, base64?: boolean) => string;
895
-
896
- declare const randomTransactionUser: {
897
- privateKey: `0x${string}`;
898
- account: {
899
- address: viem_accounts.Address;
900
- nonceManager?: viem_accounts.NonceManager | undefined;
901
- sign: (parameters: {
902
- hash: viem.Hash;
903
- }) => Promise<viem.Hex>;
904
- experimental_signAuthorization: (parameters: viem__types_experimental_eip7702_types_authorization.Authorization) => Promise<viem_accounts.SignAuthorizationReturnType>;
905
- signMessage: ({ message }: {
906
- message: viem.SignableMessage;
907
- }) => Promise<viem.Hex>;
908
- signTransaction: <serializer extends viem.SerializeTransactionFn<viem.TransactionSerializable> = viem.SerializeTransactionFn<viem.TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
909
- serializer?: serializer | undefined;
910
- } | undefined) => Promise<viem.IsNarrowable<viem.TransactionSerialized<viem.GetTransactionType<transaction>>, viem.Hex> extends true ? viem.TransactionSerialized<viem.GetTransactionType<transaction>> : viem.Hex>;
911
- signTypedData: <const typedData extends abitype.TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: viem.TypedDataDefinition<typedData, primaryType>) => Promise<viem.Hex>;
912
- publicKey: viem.Hex;
913
- source: "privateKey";
914
- type: "local";
915
- };
916
- address: string;
917
- };
918
-
919
- /**
920
- * Checks if two addresses are equal. Returns true if both values are strings AND:
921
- * - The two values are equal OR
922
- * - The checksumed addresses are equal
923
- *
924
- * @param address1
925
- * @param address2
926
- */
927
- declare const compareAddresses: (address1?: string, address2?: string) => boolean;
928
- declare const compareListOfAddresses: (add1: string[], add2: string[]) => boolean;
929
- declare const regexPattern: () => RegExp;
930
- declare const isValidAddress: (addr: string | undefined | null) => boolean;
931
- declare const leftPadWithZeros: (str: string, length: number) => string;
932
-
933
865
  type TransactionToastProps = {
934
866
  isOpen: boolean;
935
867
  onClose: () => void;
@@ -940,169 +872,286 @@ type TransactionToastProps = {
940
872
  };
941
873
  declare const TransactionToast: ({ isOpen, onClose, status, txReceipt, error, resetStatus, }: TransactionToastProps) => react_jsx_runtime.JSX.Element | null;
942
874
 
943
- type Props$j = {
875
+ type Props$k = {
944
876
  isOpen: boolean;
945
877
  onClose: () => void;
946
878
  };
947
- declare const AccountModal: ({ isOpen, onClose }: Props$j) => react_jsx_runtime.JSX.Element;
879
+ declare const AccountModal: ({ isOpen, onClose }: Props$k) => react_jsx_runtime.JSX.Element;
948
880
 
949
- type Wallet = {
950
- address: string;
951
- domain: string | undefined;
952
- image: string;
881
+ type AccountModalContentTypes = 'main' | 'settings' | 'smart-account' | 'accounts' | 'send-token' | 'receive-token' | {
882
+ type: 'send-token-summary';
883
+ props: {
884
+ toAddressOrDomain: string;
885
+ resolvedDomain?: string;
886
+ resolvedAddress?: string;
887
+ amount: string;
888
+ selectedToken: {
889
+ symbol: string;
890
+ balance: string;
891
+ address: string;
892
+ numericBalance: number;
893
+ price: number;
894
+ };
895
+ onSend: (address: string, amount: string) => void;
896
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
897
+ };
953
898
  };
954
- type SmartAccount = Wallet & {
955
- isDeployed: boolean;
956
- owner: string;
899
+
900
+ type Props$j = {
901
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
902
+ onClose: () => void;
903
+ wallet: Wallet;
957
904
  };
958
- type ConnectionSource = {
959
- type: 'privy' | 'wallet' | 'privy-cross-app';
960
- displayName: string;
905
+ declare const AccountMainContent: ({ setCurrentContent, wallet }: Props$j) => react_jsx_runtime.JSX.Element;
906
+
907
+ type Props$i = {
908
+ setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
909
+ onClose: () => void;
910
+ wallet?: Wallet;
961
911
  };
962
- type UseWalletReturnType = {
963
- wallet: Wallet;
964
- embeddedWallet: Wallet;
965
- crossAppWallet: Wallet;
966
- smartAccount: SmartAccount;
967
- selectedAccount: Wallet;
968
- connectedWallet: Wallet;
969
- privyUser: User | null;
970
- connection: {
971
- isConnected: boolean;
972
- isConnectedWithPrivy: boolean;
973
- isConnectedWithDappKit: boolean;
974
- isConnectedWithCrossAppPrivy: boolean;
975
- isLoadingPrivyConnection: boolean;
976
- source: ConnectionSource;
977
- isInAppBrowser: boolean;
978
- };
979
- disconnect: () => Promise<void>;
912
+ declare const AccountsListContent: ({ setCurrentContent, onClose }: Props$i) => react_jsx_runtime.JSX.Element;
913
+
914
+ type Props$h = {
915
+ setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
980
916
  };
981
- declare const useWallet: () => UseWalletReturnType;
917
+ declare const SmartAccountContent: ({ setCurrentContent }: Props$h) => react_jsx_runtime.JSX.Element;
982
918
 
983
- /**
984
- * Poll the chain for a transaction receipt until it is found (or timeout after 5 blocks)
985
- * @param thor Thor instance
986
- * @param id Transaction id
987
- * @param blocksTimeout Number of blocks to wait for the receipt
988
- * @returns Transaction receipt
989
- */
990
- declare const pollForReceipt: (thor: Connex.Thor, id?: string, blocksTimeout?: number) => Promise<Connex.Thor.Transaction.Receipt>;
991
- /**
992
- * Get the tx receipt of a tx id with a block timeout to wait for the receipt
993
- * @param txId The tx id to get the receipt
994
- * @param blockTimeout The block timeout to wait for the receipt
995
- * @returns The tx receipt
996
- */
997
- declare const useTxReceipt: (txId?: string, blockTimeout?: number) => {
998
- data: Connex.Thor.Transaction.Receipt | null | undefined;
999
- error: Error | null;
1000
- isLoading: boolean;
919
+ type Props$g = {
920
+ setCurrentContent: (content: AccountModalContentTypes) => void;
921
+ onLogoutSuccess: () => void;
1001
922
  };
923
+ declare const WalletSettingsContent: ({ setCurrentContent, onLogoutSuccess, }: Props$g) => react_jsx_runtime.JSX.Element;
1002
924
 
1003
- interface SmartAccountContextType {
1004
- address: string | undefined;
1005
- owner: string | undefined;
1006
- embeddedWallet: ConnectedWallet | undefined;
1007
- isDeployed: boolean;
1008
- sendTransaction: (tx: {
1009
- txClauses: Connex.VM.Clause[];
1010
- title?: string;
1011
- description?: string;
1012
- buttonText?: string;
1013
- }) => Promise<string>;
1014
- exportWallet: () => Promise<void>;
1015
- thor: ThorClient;
1016
- nodeUrl: string;
1017
- delegatorUrl: string;
1018
- accountFactory: string;
1019
- delegateAllTransactions: boolean;
1020
- chainId: string;
1021
- }
1022
- /**
1023
- * This provider is responsible for retrieving the smart account address
1024
- * of a Privy wallet and providing the necessary context for the smart account.
1025
- * Upon initialization this provider will execute a few useEffect hooks to:
1026
- * - retrieve the smart account address of the embedded wallet
1027
- * - retrieve the chain id
1028
- * - check if the smart account is deployed
1029
- *
1030
- * It also provides a function to send transactions on vechain by asking the privy wallet
1031
- * to sign the transaction and then forwarding the transaction to the node api.
1032
- * When sending a transaction this provider will check if the smart account is deployed and if not,
1033
- * it will deploy it.
1034
- */
1035
- declare const SmartAccountProvider: ({ children, nodeUrl, delegatorUrl, delegateAllTransactions, }: {
1036
- children: React__default.ReactNode;
1037
- nodeUrl: string;
1038
- delegatorUrl: string;
1039
- delegateAllTransactions: boolean;
1040
- }) => react_jsx_runtime.JSX.Element;
1041
- declare const useSmartAccount: () => SmartAccountContextType;
925
+ type Props$f = {
926
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
927
+ onSend: (address: string, amount: string) => void;
928
+ };
929
+ declare const SendTokenContent: ({ setCurrentContent, onSend }: Props$f) => react_jsx_runtime.JSX.Element;
1042
930
 
1043
- interface SmartAccountAddressResult {
1044
- address: string | undefined;
1045
- }
1046
- declare const getSmartAccountAddress: (ownerAddress?: string) => Promise<SmartAccountAddressResult>;
1047
- declare const getSmartAccountAddressQueryKey: (ownerAddress?: string) => (string | undefined)[];
1048
- /**
1049
- * Hook to get the smart account address for a given owner address
1050
- * @param ownerAddress The address of the smart account owner
1051
- * @returns The smart account address and loading/error states
1052
- */
1053
- declare const useGetSmartAccountAddress: (ownerAddress?: string) => _tanstack_react_query.UseQueryResult<SmartAccountAddressResult, Error>;
931
+ type Props$e = {
932
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
933
+ onSend: (address: string, amount: string) => void;
934
+ toAddressOrDomain: string;
935
+ resolvedDomain?: string;
936
+ resolvedAddress?: string;
937
+ amount: string;
938
+ selectedToken: {
939
+ symbol: string;
940
+ balance: string;
941
+ address: string;
942
+ numericBalance: number;
943
+ price: number;
944
+ };
945
+ };
946
+ declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, }: Props$e) => react_jsx_runtime.JSX.Element;
1054
947
 
1055
- declare const getAccountBalance: (thor: Connex.Thor, address?: string) => Promise<{
1056
- balance: string;
1057
- energy: string;
1058
- }>;
1059
- declare const getAccountBalanceQueryKey: (address?: string) => (string | undefined)[];
1060
- /**
1061
- * Get the account balance for the given address
1062
- * @param address The address of the account to get the balance for
1063
- * @returns The account balance
1064
- */
1065
- declare const useAccountBalance: (address?: string) => _tanstack_react_query.UseQueryResult<{
948
+ type Token = {
949
+ symbol: string;
1066
950
  balance: string;
1067
- energy: string;
1068
- }, Error>;
1069
-
1070
- declare const PRICE_FEED_IDS: {
1071
- readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
1072
- readonly VET: "0x7665742d75736400000000000000000000000000000000000000000000000000";
1073
- readonly VTHO: "0x7674686f2d757364000000000000000000000000000000000000000000000000";
951
+ address: string;
952
+ numericBalance: number;
953
+ price: number;
1074
954
  };
1075
- type SupportedToken = keyof typeof PRICE_FEED_IDS;
1076
- declare const getTokenUsdPrice: (thor: Connex.Thor, token: SupportedToken) => Promise<number>;
1077
- declare const getTokenUsdPriceQueryKey: (token: SupportedToken) => string[];
1078
- declare const useGetTokenUsdPrice: (token: SupportedToken) => _tanstack_react_query.UseQueryResult<number, Error>;
955
+ type Props$d = {
956
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
957
+ onSelectToken: (token: Token) => void;
958
+ onBack: () => void;
959
+ };
960
+ declare const SelectTokenContent: ({ onSelectToken, onBack }: Props$d) => react_jsx_runtime.JSX.Element;
1079
961
 
1080
- declare const getB3trBalance: (thor: Connex.Thor, address?: string) => Promise<string>;
1081
- declare const getB3trBalanceQueryKey: (address?: string) => (string | undefined)[];
1082
- declare const useGetB3trBalance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
962
+ type Props$c = {
963
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
964
+ };
965
+ declare const ReceiveTokenContent: ({ setCurrentContent }: Props$c) => react_jsx_runtime.JSX.Element;
1083
966
 
1084
- declare const getVot3Balance: (thor: Connex.Thor, address?: string) => Promise<string>;
1085
- declare const getVot3BalanceQueryKey: (address?: string) => (string | undefined)[];
1086
- declare const useGetVot3Balance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
967
+ interface AccountDetailsButtonProps {
968
+ title: string;
969
+ address: string;
970
+ onClick: () => void;
971
+ leftIcon?: ElementType;
972
+ rightIcon?: ElementType;
973
+ leftImage?: string;
974
+ backgroundColor?: string;
975
+ border?: string;
976
+ isActive?: boolean;
977
+ }
978
+ declare const AccountDetailsButton: ({ leftIcon, rightIcon, title, address, onClick, leftImage, isActive, }: AccountDetailsButtonProps) => react_jsx_runtime.JSX.Element;
1087
979
 
1088
- declare const useBalances: () => {
1089
- isLoading: boolean;
1090
- balances: {
1091
- vet: number;
1092
- vtho: number;
1093
- b3tr: number;
1094
- vot3: number;
1095
- veDelegate: number;
1096
- };
1097
- prices: {
1098
- vet: number;
1099
- vtho: number;
1100
- b3tr: number;
1101
- };
1102
- totalBalance: number;
980
+ interface ActionButtonProps {
981
+ title: string;
982
+ description: string;
983
+ onClick: () => void;
984
+ leftIcon?: ElementType;
985
+ rightIcon?: ElementType;
986
+ leftImage?: string;
987
+ backgroundColor?: string;
988
+ border?: string;
989
+ hide?: boolean;
990
+ showComingSoon?: boolean;
991
+ }
992
+ declare const ActionButton: ({ leftIcon, rightIcon, title, description, onClick, leftImage, hide, showComingSoon, backgroundColor, }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
993
+
994
+ type Props$b = {
995
+ wallet: Wallet;
996
+ size?: string;
997
+ onClick?: () => void;
998
+ };
999
+ declare const AccountSelector: ({ wallet, size, onClick }: Props$b) => react_jsx_runtime.JSX.Element;
1000
+
1001
+ declare const BalanceSection: ({ mb }: {
1002
+ mb?: number;
1003
+ }) => react_jsx_runtime.JSX.Element;
1004
+
1005
+ declare const AssetsSection: () => react_jsx_runtime.JSX.Element;
1006
+
1007
+ type Props$a = {
1008
+ setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1009
+ };
1010
+ declare const QuickActionsSection: ({ setCurrentContent }: Props$a) => react_jsx_runtime.JSX.Element;
1011
+
1012
+ type Props$9 = {
1013
+ children: ReactNode;
1014
+ };
1015
+ declare const FadeInView: ({ children }: Props$9) => react_jsx_runtime.JSX.Element;
1016
+
1017
+ type Props$8 = {
1018
+ children: ReactNode;
1019
+ };
1020
+ declare const FadeInViewFromBottom: ({ children }: Props$8) => react_jsx_runtime.JSX.Element;
1021
+
1022
+ type Props$7 = {
1023
+ children: ReactNode;
1024
+ };
1025
+ declare const FadeInViewFromLeft: ({ children }: Props$7) => react_jsx_runtime.JSX.Element;
1026
+
1027
+ type Props$6 = {
1028
+ children: ReactNode;
1029
+ };
1030
+ declare const FadeInViewFromRight: ({ children }: Props$6) => react_jsx_runtime.JSX.Element;
1031
+
1032
+ type BackButtonProps = {
1033
+ onClick: () => void;
1034
+ } & Partial<IconButtonProps>;
1035
+ declare const ModalBackButton: ({ onClick, ...props }: BackButtonProps) => react_jsx_runtime.JSX.Element;
1036
+
1037
+ type Props$5 = {
1038
+ wallet: Wallet;
1039
+ label?: string;
1040
+ size?: string;
1041
+ };
1042
+ declare const AddressDisplay: ({ wallet, label, size }: Props$5) => react_jsx_runtime.JSX.Element;
1043
+
1044
+ type Props$4 = {} & Omit<StackProps, 'dangerouslySetInnerHTML'>;
1045
+ declare const VersionFooter: ({ ...props }: Props$4) => react_jsx_runtime.JSX.Element;
1046
+
1047
+ type Props$3 = {
1048
+ children: React.ReactNode;
1049
+ };
1050
+ declare const StickyHeaderContainer: ({ children }: Props$3) => react_jsx_runtime.JSX.Element;
1051
+
1052
+ type Props$2 = {
1053
+ children: React.ReactNode;
1054
+ };
1055
+ declare const StickyFooterContainer: ({ children }: Props$2) => react_jsx_runtime.JSX.Element;
1056
+
1057
+ type BaseModalProps = {
1058
+ isOpen: boolean;
1059
+ onClose: () => void;
1060
+ children: ReactNode;
1061
+ size?: string;
1062
+ isCentered?: boolean;
1063
+ motionPreset?: 'slideInBottom' | 'none';
1064
+ trapFocus?: boolean;
1065
+ closeOnOverlayClick?: boolean;
1066
+ blockScrollOnMount?: boolean;
1067
+ autoFocus?: boolean;
1068
+ };
1069
+ declare const BaseModal: ({ isOpen, onClose, children, size, isCentered, motionPreset, trapFocus, closeOnOverlayClick, blockScrollOnMount, autoFocus, }: BaseModalProps) => react_jsx_runtime.JSX.Element;
1070
+
1071
+ type LoginLoadingModalProps = {
1072
+ isOpen: boolean;
1073
+ onClose: () => void;
1074
+ };
1075
+ declare const LoginLoadingModal: ({ isOpen, onClose, }: LoginLoadingModalProps) => react_jsx_runtime.JSX.Element;
1076
+
1077
+ type Props$1 = {
1078
+ isOpen: boolean;
1079
+ onClose: () => void;
1080
+ };
1081
+ declare const EcosystemModal: ({ isOpen, onClose }: Props$1) => react_jsx_runtime.JSX.Element;
1082
+
1083
+ /**
1084
+ * Poll the chain for a transaction receipt until it is found (or timeout after 5 blocks)
1085
+ * @param thor Thor instance
1086
+ * @param id Transaction id
1087
+ * @param blocksTimeout Number of blocks to wait for the receipt
1088
+ * @returns Transaction receipt
1089
+ */
1090
+ declare const pollForReceipt: (thor: Connex.Thor, id?: string, blocksTimeout?: number) => Promise<Connex.Thor.Transaction.Receipt>;
1091
+ /**
1092
+ * Get the tx receipt of a tx id with a block timeout to wait for the receipt
1093
+ * @param txId The tx id to get the receipt
1094
+ * @param blockTimeout The block timeout to wait for the receipt
1095
+ * @returns The tx receipt
1096
+ */
1097
+ declare const useTxReceipt: (txId?: string, blockTimeout?: number) => {
1098
+ data: Connex.Thor.Transaction.Receipt | null | undefined;
1099
+ error: Error | null;
1100
+ isLoading: boolean;
1101
+ };
1102
+
1103
+ /**
1104
+ * The type of network that we are connected to (indentified by the genesis block)
1105
+ * */
1106
+ type NETWORK_TYPE = 'main' | 'test' | 'solo';
1107
+ /**
1108
+ * A model for the VechainThor network that we are connected to
1109
+ * @field `id` - Unique ID for this network
1110
+ * @field `defaultNet` - If the network is a default network
1111
+ * @field `name` - A name for this network
1112
+ * @field `type` - What type of network is it? `main, test, solo or custom`
1113
+ * @field `urls` - A list of URLs for this network
1114
+ * @field `currentUrl` - The current URL that we are connected to
1115
+ * @field `explorerUrl` - The explorer URL for this network
1116
+ * @field `genesis` - The genesis block for the network
1117
+ * @field `blockTime` - The time it takes to mine a block in milliseconds
1118
+ */
1119
+ type Network = {
1120
+ id: string;
1121
+ defaultNet: boolean;
1122
+ name: string;
1123
+ type: NETWORK_TYPE;
1124
+ urls: string[];
1125
+ explorerUrl?: string;
1126
+ genesis: typeof genesises.main;
1127
+ blockTime: number;
1128
+ };
1129
+ declare const genesises: {
1130
+ readonly main: Connex.Thor.Block;
1131
+ readonly test: Connex.Thor.Block;
1132
+ readonly solo: Connex.Thor.Block;
1133
+ which(gid: string): "main" | "solo" | "test" | undefined;
1103
1134
  };
1104
1135
 
1105
- declare const getVeDelegateBalance: (thor: Connex.Thor, address?: string) => Promise<string>;
1136
+ declare const PRICE_FEED_IDS: {
1137
+ readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
1138
+ readonly VET: "0x7665742d75736400000000000000000000000000000000000000000000000000";
1139
+ readonly VTHO: "0x7674686f2d757364000000000000000000000000000000000000000000000000";
1140
+ };
1141
+ type SupportedToken = keyof typeof PRICE_FEED_IDS;
1142
+ declare const getTokenUsdPrice: (thor: Connex.Thor, token: SupportedToken, network: NETWORK_TYPE) => Promise<number>;
1143
+ declare const getTokenUsdPriceQueryKey: (token: SupportedToken) => string[];
1144
+ declare const useGetTokenUsdPrice: (token: SupportedToken) => _tanstack_react_query.UseQueryResult<number, Error>;
1145
+
1146
+ declare const getB3trBalance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<string>;
1147
+ declare const getB3trBalanceQueryKey: (address?: string) => (string | undefined)[];
1148
+ declare const useGetB3trBalance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
1149
+
1150
+ declare const getVot3Balance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<string>;
1151
+ declare const getVot3BalanceQueryKey: (address?: string) => (string | undefined)[];
1152
+ declare const useGetVot3Balance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
1153
+
1154
+ declare const getVeDelegateBalance: (thor: Connex.Thor, network: NETWORK_TYPE, address?: string) => Promise<string>;
1106
1155
  declare const getVeDelegateBalanceQueryKey: (address?: string) => (string | undefined)[];
1107
1156
  declare const useGetVeDelegateBalance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
1108
1157
 
@@ -1148,6 +1197,98 @@ interface CachedVeChainDomainResult {
1148
1197
  }
1149
1198
  declare const useCachedVeChainDomain: (address: string) => CachedVeChainDomainResult;
1150
1199
 
1200
+ interface SmartAccountReturnType {
1201
+ address: string | undefined;
1202
+ isDeployed: boolean;
1203
+ }
1204
+ declare const getSmartAccount: (thor: ThorClient, network: NETWORK_TYPE, ownerAddress?: string) => Promise<{
1205
+ address: undefined;
1206
+ isDeployed?: undefined;
1207
+ } | {
1208
+ address: string;
1209
+ isDeployed: boolean;
1210
+ }>;
1211
+ declare const getSmartAccountQueryKey: (ownerAddress?: string) => (string | undefined)[];
1212
+ declare const useSmartAccount: (ownerAddress?: string) => _tanstack_react_query.UseQueryResult<{
1213
+ address: undefined;
1214
+ isDeployed?: undefined;
1215
+ } | {
1216
+ address: string;
1217
+ isDeployed: boolean;
1218
+ }, Error>;
1219
+
1220
+ declare const useBalances: () => {
1221
+ isLoading: boolean;
1222
+ balances: {
1223
+ vet: number;
1224
+ vtho: number;
1225
+ b3tr: number;
1226
+ vot3: number;
1227
+ veDelegate: number;
1228
+ };
1229
+ prices: {
1230
+ vet: number;
1231
+ vtho: number;
1232
+ b3tr: number;
1233
+ };
1234
+ totalBalance: number;
1235
+ };
1236
+
1237
+ type UseWalletReturnType = {
1238
+ account: Wallet;
1239
+ connectedWallet: Wallet;
1240
+ smartAccount: SmartAccount;
1241
+ dappKitWallet?: Wallet;
1242
+ embeddedWallet?: Wallet;
1243
+ crossAppWallet?: Wallet;
1244
+ privyUser: User | null;
1245
+ connection: {
1246
+ isConnected: boolean;
1247
+ isConnectedWithPrivy: boolean;
1248
+ isConnectedWithDappKit: boolean;
1249
+ isConnectedWithCrossAppPrivy: boolean;
1250
+ isLoadingPrivyConnection: boolean;
1251
+ source: ConnectionSource;
1252
+ isInAppBrowser: boolean;
1253
+ nodeUrl: string;
1254
+ delegatorUrl: string;
1255
+ chainId?: string;
1256
+ network: NETWORK_TYPE;
1257
+ };
1258
+ disconnect: () => Promise<void>;
1259
+ };
1260
+ declare const useWallet: () => UseWalletReturnType;
1261
+
1262
+ declare const useRefreshBalances: () => {
1263
+ refresh: () => Promise<void>;
1264
+ };
1265
+
1266
+ declare const getAccountBalance: (thor: Connex.Thor, address?: string) => Promise<{
1267
+ balance: string;
1268
+ energy: string;
1269
+ }>;
1270
+ declare const getAccountBalanceQueryKey: (address?: string) => (string | undefined)[];
1271
+ /**
1272
+ * Get the account balance for the given address
1273
+ * @param address The address of the account to get the balance for
1274
+ * @returns The account balance
1275
+ */
1276
+ declare const useAccountBalance: (address?: string) => _tanstack_react_query.UseQueryResult<{
1277
+ balance: string;
1278
+ energy: string;
1279
+ }, Error>;
1280
+
1281
+ declare const getChainId: (thor: ThorClient) => Promise<string>;
1282
+ declare const getChainIdQueryKey: () => string[];
1283
+ /**
1284
+ * Get the account balance for the given address
1285
+ * @param address The address of the account to get the balance for
1286
+ * @returns The account balance
1287
+ */
1288
+ declare const useGetChainId: () => _tanstack_react_query.UseQueryResult<string, Error>;
1289
+
1290
+ declare const useGetNodeUrl: () => string;
1291
+
1151
1292
  declare const useConnectModal: () => {
1152
1293
  open: () => void;
1153
1294
  close: () => void;
@@ -1166,6 +1307,24 @@ declare const AccountModalProvider: ({ children }: {
1166
1307
  children: ReactNode;
1167
1308
  }) => react_jsx_runtime.JSX.Element;
1168
1309
 
1310
+ declare const useTransactionModal: () => {
1311
+ open: () => void;
1312
+ close: () => void;
1313
+ isOpen: boolean;
1314
+ };
1315
+ declare const TransactionModalProvider: ({ children, }: {
1316
+ children: ReactNode;
1317
+ }) => react_jsx_runtime.JSX.Element;
1318
+
1319
+ declare const useTransactionToast: () => {
1320
+ open: () => void;
1321
+ close: () => void;
1322
+ isOpen: boolean;
1323
+ };
1324
+ declare const TransactionToastProvider: ({ children, }: {
1325
+ children: ReactNode;
1326
+ }) => react_jsx_runtime.JSX.Element;
1327
+
1169
1328
  /**
1170
1329
  * Props for the {@link useSendTransaction} hook
1171
1330
  * @param signerAccountAddress the signer account to use
@@ -1245,200 +1404,13 @@ type useTransferVETReturnValue = {
1245
1404
  } & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
1246
1405
  declare const useTransferVET: ({ fromAddress, receiverAddress, amount, onSuccess, }: useTransferVETProps) => useTransferVETReturnValue;
1247
1406
 
1248
- declare const useRefreshBalances: () => {
1249
- refresh: () => Promise<void>;
1250
- };
1251
-
1252
- type AccountModalContentTypes = 'main' | 'settings' | 'smart-account' | 'accounts' | 'send-token' | 'receive-token' | {
1253
- type: 'send-token-summary';
1254
- props: {
1255
- toAddressOrDomain: string;
1256
- resolvedDomain?: string;
1257
- resolvedAddress?: string;
1258
- amount: string;
1259
- selectedToken: {
1260
- symbol: string;
1261
- balance: string;
1262
- address: string;
1263
- numericBalance: number;
1264
- price: number;
1265
- };
1266
- onSend: (address: string, amount: string) => void;
1267
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1268
- };
1269
- };
1270
-
1271
- type Props$i = {
1272
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1273
- onClose: () => void;
1274
- wallet: Wallet;
1275
- };
1276
- declare const AccountMainContent: ({ setCurrentContent, wallet }: Props$i) => react_jsx_runtime.JSX.Element;
1277
-
1278
- type Props$h = {
1279
- setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
1280
- onClose: () => void;
1281
- wallet?: Wallet;
1282
- };
1283
- declare const AccountsListContent: ({ setCurrentContent, onClose }: Props$h) => react_jsx_runtime.JSX.Element;
1284
-
1285
- type Props$g = {
1286
- setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
1287
- };
1288
- declare const SmartAccountContent: ({ setCurrentContent }: Props$g) => react_jsx_runtime.JSX.Element;
1289
-
1290
- type Props$f = {
1291
- setCurrentContent: (content: AccountModalContentTypes) => void;
1292
- onLogoutSuccess: () => void;
1293
- };
1294
- declare const WalletSettingsContent: ({ setCurrentContent, onLogoutSuccess, }: Props$f) => react_jsx_runtime.JSX.Element;
1295
-
1296
- type Props$e = {
1297
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1298
- onSend: (address: string, amount: string) => void;
1299
- };
1300
- declare const SendTokenContent: ({ setCurrentContent, onSend }: Props$e) => react_jsx_runtime.JSX.Element;
1301
-
1302
- type Props$d = {
1303
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1304
- onSend: (address: string, amount: string) => void;
1305
- toAddressOrDomain: string;
1306
- resolvedDomain?: string;
1307
- resolvedAddress?: string;
1308
- amount: string;
1309
- selectedToken: {
1310
- symbol: string;
1311
- balance: string;
1312
- address: string;
1313
- numericBalance: number;
1314
- price: number;
1315
- };
1316
- };
1317
- declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, }: Props$d) => react_jsx_runtime.JSX.Element;
1318
-
1319
- type Token = {
1320
- symbol: string;
1321
- balance: string;
1322
- address: string;
1323
- numericBalance: number;
1324
- price: number;
1325
- };
1326
- type Props$c = {
1327
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1328
- onSelectToken: (token: Token) => void;
1329
- onBack: () => void;
1330
- };
1331
- declare const SelectTokenContent: ({ onSelectToken, onBack }: Props$c) => react_jsx_runtime.JSX.Element;
1332
-
1333
- type Props$b = {
1334
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1335
- };
1336
- declare const ReceiveTokenContent: ({ setCurrentContent }: Props$b) => react_jsx_runtime.JSX.Element;
1337
-
1338
- interface AccountDetailsButtonProps {
1339
- title: string;
1340
- address: string;
1341
- onClick: () => void;
1342
- leftIcon?: ElementType;
1343
- rightIcon?: ElementType;
1344
- leftImage?: string;
1345
- backgroundColor?: string;
1346
- border?: string;
1347
- isActive?: boolean;
1348
- }
1349
- declare const AccountDetailsButton: ({ leftIcon, rightIcon, title, address, onClick, leftImage, isActive, }: AccountDetailsButtonProps) => react_jsx_runtime.JSX.Element;
1350
-
1351
- interface ActionButtonProps {
1352
- title: string;
1353
- description: string;
1354
- onClick: () => void;
1355
- leftIcon?: ElementType;
1356
- rightIcon?: ElementType;
1357
- leftImage?: string;
1358
- backgroundColor?: string;
1359
- border?: string;
1360
- hide?: boolean;
1361
- showComingSoon?: boolean;
1362
- }
1363
- declare const ActionButton: ({ leftIcon, rightIcon, title, description, onClick, leftImage, hide, showComingSoon, backgroundColor, }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
1364
-
1365
- type Props$a = {
1366
- wallet: Wallet;
1367
- size?: string;
1368
- onClick?: () => void;
1369
- };
1370
- declare const AccountSelector: ({ wallet, size, onClick }: Props$a) => react_jsx_runtime.JSX.Element;
1371
-
1372
- declare const BalanceSection: ({ mb }: {
1373
- mb?: number;
1374
- }) => react_jsx_runtime.JSX.Element;
1375
-
1376
- declare const AssetsSection: () => react_jsx_runtime.JSX.Element;
1377
-
1378
- type Props$9 = {
1379
- setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
1380
- };
1381
- declare const QuickActionsSection: ({ setCurrentContent }: Props$9) => react_jsx_runtime.JSX.Element;
1382
-
1383
- type Props$8 = {
1384
- children: ReactNode;
1385
- };
1386
- declare const FadeInView: ({ children }: Props$8) => react_jsx_runtime.JSX.Element;
1387
-
1388
- type Props$7 = {
1389
- children: ReactNode;
1390
- };
1391
- declare const FadeInViewFromBottom: ({ children }: Props$7) => react_jsx_runtime.JSX.Element;
1392
-
1393
- type Props$6 = {
1394
- children: ReactNode;
1395
- };
1396
- declare const FadeInViewFromLeft: ({ children }: Props$6) => react_jsx_runtime.JSX.Element;
1397
-
1398
- type Props$5 = {
1399
- children: ReactNode;
1400
- };
1401
- declare const FadeInViewFromRight: ({ children }: Props$5) => react_jsx_runtime.JSX.Element;
1402
-
1403
- type BackButtonProps = {
1404
- onClick: () => void;
1405
- } & Partial<IconButtonProps>;
1406
- declare const ModalBackButton: ({ onClick, ...props }: BackButtonProps) => react_jsx_runtime.JSX.Element;
1407
-
1408
- type Props$4 = {
1409
- wallet: Wallet;
1410
- label?: string;
1411
- size?: string;
1412
- };
1413
- declare const AddressDisplay: ({ wallet, label, size }: Props$4) => react_jsx_runtime.JSX.Element;
1414
-
1415
- type Props$3 = {} & Omit<StackProps, 'dangerouslySetInnerHTML'>;
1416
- declare const VersionFooter: ({ ...props }: Props$3) => react_jsx_runtime.JSX.Element;
1417
-
1418
- type Props$2 = {
1419
- children: React.ReactNode;
1420
- };
1421
- declare const StickyHeaderContainer: ({ children }: Props$2) => react_jsx_runtime.JSX.Element;
1422
-
1423
- type Props$1 = {
1424
- children: React.ReactNode;
1425
- };
1426
- declare const StickyFooterContainer: ({ children }: Props$1) => react_jsx_runtime.JSX.Element;
1427
-
1428
- type LoginLoadingModalProps = {
1429
- isOpen: boolean;
1430
- onClose: () => void;
1431
- };
1432
- declare const LoginLoadingModal: ({ isOpen, onClose, }: LoginLoadingModalProps) => react_jsx_runtime.JSX.Element;
1433
-
1434
1407
  type Props = {
1435
1408
  children: ReactNode;
1436
- privyConfig: {
1409
+ privy: {
1437
1410
  appId: string;
1438
1411
  clientId: string;
1439
1412
  appearance: {
1440
1413
  walletList: WalletListEntry[];
1441
- theme: 'dark' | 'light';
1442
1414
  accentColor: `#${string}`;
1443
1415
  loginMessage: string;
1444
1416
  logo: string;
@@ -1450,34 +1422,179 @@ type Props = {
1450
1422
  ecosystemAppsID?: string[];
1451
1423
  allowPasskeyLinking?: boolean;
1452
1424
  };
1453
- feeDelegationConfig: {
1425
+ feeDelegation: {
1454
1426
  delegatorUrl: string;
1455
1427
  delegateAllTransactions: boolean;
1456
1428
  };
1457
- dappKitConfig: DAppKitUIOptions;
1429
+ dappKit: {
1430
+ allowedWallets?: WalletSource[];
1431
+ walletConnectOptions?: WalletConnectOptions;
1432
+ usePersistence?: boolean;
1433
+ useFirstDetectedSource?: boolean;
1434
+ logLevel?: LogLevel;
1435
+ themeVariables?: CustomizedStyle;
1436
+ modalParent?: HTMLElement;
1437
+ onSourceClick?: (source?: SourceInfo) => void;
1438
+ };
1439
+ loginModalUI?: {
1440
+ logo?: string;
1441
+ description?: string;
1442
+ preferredLoginMethods?: Array<'email' | 'google'>;
1443
+ };
1444
+ darkMode?: boolean;
1445
+ i18n?: I18n;
1446
+ language?: string;
1447
+ network: {
1448
+ type: NETWORK_TYPE;
1449
+ nodeUrl?: string;
1450
+ requireCertificate?: boolean;
1451
+ connectionCertificate?: {
1452
+ message?: Connex.Vendor.CertMessage;
1453
+ options?: Connex.Signer.CertOptions;
1454
+ };
1455
+ };
1458
1456
  };
1459
- type DAppKitPrivyConfig = {
1460
- privyConfig: Props['privyConfig'];
1461
- feeDelegationConfig: Props['feeDelegationConfig'];
1462
- dappKitConfig: Props['dappKitConfig'];
1457
+ type VeChainKitConfig = {
1458
+ privy: Props['privy'];
1459
+ feeDelegation: Props['feeDelegation'];
1460
+ dappKit: Props['dappKit'];
1461
+ loginModalUI?: Props['loginModalUI'];
1462
+ darkMode?: Props['darkMode'];
1463
+ i18n?: Props['i18n'];
1464
+ language?: Props['language'];
1465
+ network: Props['network'];
1463
1466
  openConnectModal: () => void;
1464
1467
  closeConnectModal: () => void;
1465
1468
  isConnectModalOpen: boolean;
1466
1469
  openAccountModal: () => void;
1467
1470
  closeAccountModal: () => void;
1468
1471
  isAccountModalOpen: boolean;
1472
+ openTransactionModal: () => void;
1473
+ closeTransactionModal: () => void;
1474
+ isTransactionModalOpen: boolean;
1475
+ openTransactionToast: () => void;
1476
+ closeTransactionToast: () => void;
1477
+ isTransactionToastOpen: boolean;
1469
1478
  };
1470
1479
  /**
1471
1480
  * Context to store the Privy and DAppKit configs so that they can be used by the hooks/components
1472
1481
  */
1473
- declare const DAppKitPrivyContext: React$1.Context<DAppKitPrivyConfig | null>;
1482
+ declare const VeChainKitContext: React$1.Context<VeChainKitConfig | null>;
1474
1483
  /**
1475
1484
  * Hook to get the Privy and DAppKit configs
1476
1485
  */
1477
- declare const useDAppKitPrivyConfig: () => DAppKitPrivyConfig;
1486
+ declare const useVeChainKitConfig: () => VeChainKitConfig;
1478
1487
  /**
1479
1488
  * Provider to wrap the application with Privy and DAppKit
1480
1489
  */
1481
- declare const DAppKitPrivyProvider: ({ children, privyConfig, feeDelegationConfig, dappKitConfig, }: Omit<Props, "queryClient">) => react_jsx_runtime.JSX.Element;
1490
+ declare const VeChainKit: ({ children, privy, feeDelegation, dappKit, loginModalUI, darkMode, i18n, language, network, }: Omit<Props, "queryClient">) => react_jsx_runtime.JSX.Element;
1491
+
1492
+ interface PrivyWalletProviderContextType {
1493
+ embeddedWallet?: ConnectedWallet;
1494
+ accountFactory: string;
1495
+ delegateAllTransactions: boolean;
1496
+ sendTransaction: (tx: {
1497
+ txClauses: Connex.VM.Clause[];
1498
+ title?: string;
1499
+ description?: string;
1500
+ buttonText?: string;
1501
+ }) => Promise<string>;
1502
+ exportWallet: () => Promise<void>;
1503
+ }
1504
+ /**
1505
+ * This provider is responsible for retrieving the smart account address
1506
+ * of a Privy wallet and providing the necessary context for the smart account.
1507
+ * Upon initialization this provider will execute a few useEffect hooks to:
1508
+ * - retrieve the smart account address of the embedded wallet
1509
+ * - retrieve the chain id
1510
+ * - check if the smart account is deployed
1511
+ *
1512
+ * It also provides a function to send transactions on vechain by asking the privy wallet
1513
+ * to sign the transaction and then forwarding the transaction to the node api.
1514
+ * When sending a transaction this provider will check if the smart account is deployed and if not,
1515
+ * it will deploy it.
1516
+ */
1517
+ declare const PrivyWalletProvider: ({ children, nodeUrl, delegatorUrl, delegateAllTransactions, }: {
1518
+ children: React__default.ReactNode;
1519
+ nodeUrl: string;
1520
+ delegatorUrl: string;
1521
+ delegateAllTransactions: boolean;
1522
+ }) => react_jsx_runtime.JSX.Element;
1523
+ declare const usePrivyWalletProvider: () => PrivyWalletProviderContextType;
1524
+
1525
+ declare const TOKEN_LOGOS: Record<string, string>;
1526
+ declare const VECHAIN_PRIVY_APP_ID = "cm4wxxujb022fyujl7g0thb21";
1527
+
1528
+ declare const humanAddress: (address: string, charAtStart?: number, charAtEnd?: number) => string;
1529
+ declare const humanDomain: (domain: string, lengthBefore?: number, lengthAfter?: number) => string;
1530
+ declare const getPicassoImage: (address: string, base64?: boolean) => string;
1531
+
1532
+ declare const randomTransactionUser: {
1533
+ privateKey: `0x${string}`;
1534
+ account: {
1535
+ address: viem_accounts.Address;
1536
+ nonceManager?: viem_accounts.NonceManager | undefined;
1537
+ sign: (parameters: {
1538
+ hash: viem.Hash;
1539
+ }) => Promise<viem.Hex>;
1540
+ experimental_signAuthorization: (parameters: viem__types_experimental_eip7702_types_authorization.Authorization) => Promise<viem_accounts.SignAuthorizationReturnType>;
1541
+ signMessage: ({ message }: {
1542
+ message: viem.SignableMessage;
1543
+ }) => Promise<viem.Hex>;
1544
+ signTransaction: <serializer extends viem.SerializeTransactionFn<viem.TransactionSerializable> = viem.SerializeTransactionFn<viem.TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
1545
+ serializer?: serializer | undefined;
1546
+ } | undefined) => Promise<viem.IsNarrowable<viem.TransactionSerialized<viem.GetTransactionType<transaction>>, viem.Hex> extends true ? viem.TransactionSerialized<viem.GetTransactionType<transaction>> : viem.Hex>;
1547
+ signTypedData: <const typedData extends abitype.TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: viem.TypedDataDefinition<typedData, primaryType>) => Promise<viem.Hex>;
1548
+ publicKey: viem.Hex;
1549
+ source: "privateKey";
1550
+ type: "local";
1551
+ };
1552
+ address: string;
1553
+ };
1554
+
1555
+ /**
1556
+ * Checks if two addresses are equal. Returns true if both values are strings AND:
1557
+ * - The two values are equal OR
1558
+ * - The checksumed addresses are equal
1559
+ *
1560
+ * @param address1
1561
+ * @param address2
1562
+ */
1563
+ declare const compareAddresses: (address1?: string, address2?: string) => boolean;
1564
+ declare const compareListOfAddresses: (add1: string[], add2: string[]) => boolean;
1565
+ declare const regexPattern: () => RegExp;
1566
+ declare const isValidAddress: (addr: string | undefined | null) => boolean;
1567
+ declare const leftPadWithZeros: (str: string, length: number) => string;
1568
+
1569
+ type AppConfig = {
1570
+ ipfsFetchingService: string;
1571
+ b3trContractAddress: string;
1572
+ vot3ContractAddress: string;
1573
+ b3trGovernorAddress: string;
1574
+ timelockContractAddress: string;
1575
+ xAllocationPoolContractAddress: string;
1576
+ xAllocationVotingContractAddress: string;
1577
+ emissionsContractAddress: string;
1578
+ voterRewardsContractAddress: string;
1579
+ galaxyMemberContractAddress: string;
1580
+ treasuryContractAddress: string;
1581
+ x2EarnAppsContractAddress: string;
1582
+ x2EarnCreatorContractAddress: string;
1583
+ x2EarnRewardsPoolContractAddress: string;
1584
+ nodeManagementContractAddress: string;
1585
+ veBetterPassportContractAddress: string;
1586
+ veDelegate: string;
1587
+ veDelegateVotes: string;
1588
+ veDelegateTokenContractAddress: string;
1589
+ oracleContractAddress: string;
1590
+ accountFactoryAddress: string;
1591
+ cleanifyCampaignsContractAddress: string;
1592
+ cleanifyChallengesContractAddress: string;
1593
+ nodeUrl: string;
1594
+ indexerUrl?: string;
1595
+ network: Network;
1596
+ explorerUrl: string;
1597
+ };
1598
+ declare const getConfig: (env: NETWORK_TYPE) => AppConfig;
1482
1599
 
1483
- export { ACCOUNT_FACTORY_ADDRESSES, AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, AccountsListContent, ActionButton, AddressDisplay, AssetsSection, BalanceSection, ConnectModal, type ConnectModalContents, ConnectModalProvider, ConnectionButton, type ConnectionSource, DAppKitPrivyContext, DAppKitPrivyProvider, DELEGATOR_URL, EXPLORER_URL, EcosystemContent, EmailLoginButton, type EnhancedClause, type ExecuteWithAuthorizationSignData, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, GoogleLogo, LoginLoadingModal, MainContent, ModalBackButton, NETWORK_URL, PRICE_FEED_IDS, type PrivyAppInfo$1 as PrivyAppInfo, type PrivyLoginMethod, QuickActionsSection, ReceiveTokenContent, SOCIAL_INFOS, SelectTokenContent, SendTokenContent, SendTokenSummaryContent, SimpleAccountABI, SimpleAccountFactoryABI, type SmartAccount, SmartAccountContent, type SmartAccountContextType, SmartAccountProvider, type SocialInfo, StickyFooterContainer, StickyHeaderContainer, type SupportedToken, THOR_CLIENT, TOKEN_LOGOS, TransactionModal, type TransactionModalProps, type TransactionStatus, type TransactionStatusErrorType, TransactionToast, TwitterLogo, type UseSendTransactionReturnValue, type UseWalletReturnType, VECHAIN_PRIVY_APP_ID, VechainLogo, VechainLogoHorizontal, VersionFooter, WALLET_INFOS, type Wallet, WalletButton, WalletSettingsContent, compareAddresses, compareListOfAddresses, fetchPrivyAppInfo, getAccountBalance, getAccountBalanceQueryKey, getB3trBalance, getB3trBalanceQueryKey, getPicassoImage, getPrivyAppInfoQueryKey, getSmartAccountAddress, getSmartAccountAddressQueryKey, getTokenUsdPrice, getTokenUsdPriceQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVetDomainQueryKey, getVot3Balance, getVot3BalanceQueryKey, humanAddress, humanDomain, isValidAddress, leftPadWithZeros, pollForReceipt, randomTransactionUser, regexPattern, useAccountBalance, useAccountModal, useBalances, useCachedVeChainDomain, useConnectModal, useDAppKitPrivyConfig, useFetchAppInfo, useGetB3trBalance, useGetSmartAccountAddress, useGetTokenUsdPrice, useGetVeDelegateBalance, useGetVetDomain, useGetVot3Balance, useRefreshBalances, useSendTransaction, useSmartAccount, useTransferERC20, useTransferVET, useTxReceipt, useWallet };
1600
+ export { AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, AccountsListContent, ActionButton, AddressDisplay, type AppConfig, 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$1 as 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 };