@vechain/vechain-kit 2.6.2 → 2.6.3
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/assets/index.d.cts +1 -1
- package/dist/assets/index.d.mts +1 -1
- package/dist/{index-CWViOs1U.d.mts → index--hSO7Xv4.d.mts} +4 -4
- package/dist/{index-CWViOs1U.d.mts.map → index--hSO7Xv4.d.mts.map} +1 -1
- package/dist/{index-w0Yyp3-t.d.mts → index-3EuDo9II.d.mts} +147 -147
- package/dist/{index-w0Yyp3-t.d.mts.map → index-3EuDo9II.d.mts.map} +1 -1
- package/dist/{index-I8fe7GR2.d.cts → index-Cf1aBaTL.d.cts} +4 -4
- package/dist/{index-I8fe7GR2.d.cts.map → index-Cf1aBaTL.d.cts.map} +1 -1
- package/dist/{index-DShXeWMB.d.cts → index-o92cc2nW.d.cts} +101 -101
- package/dist/{index-DShXeWMB.d.cts.map → index-o92cc2nW.d.cts.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.mts +2 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as TwitterLogo, S as VechainLogo, T as GoogleLogo, _ as VechainIcon, a as VeWorldLogoDark, b as VechainLogoLight, c as VETLogo, d as VeBetterIcon, f as VeBetterLogoDark, g as VechainIconLight, h as VechainIconDark, i as PrivyLogo, l as VeBetterIconDark, m as VeBetterLogo, n as BetterSwapLogo, o as VeWorldLogoLight, p as VeBetterLogoLight, r as VechainEnergy, s as VTHOLogo, t as VeTradeLogo, u as VeBetterIconLight, v as VechainLogoHorizontalLight, w as GitHubLogo, x as VechainLogoDark, y as VechainLogoHorizontalDark } from "./index-
|
|
2
|
-
import { $ as LanguageSettingsContent, $a as useRefreshMetadata, $i as useAccountCustomizationModal, $n as useBuildClauses, $o as useGetDomainsOfAddress, $s as VeChainKitProvider, $t as useUpgradeSmartAccount, A as AddressDisplay, Aa as IpfsImage, Ac as ExecuteWithAuthorizationSignData, An as getAccountBalanceQueryKey, Ao as ExchangeRates, Ar as buildCallClauses, As as PrivyButton, At as useMfaEnrollment, B as AccountDetailsButton, Ba as useXAppsShares, Bi as useNotificationAlerts, Bn as estimateGas, Bo as getResolverAddressQueryKey, Bs as ConnectModalContentsTypes, Bt as useTransferVET, C as AddressDisplayCard, Ca as useSwapTransaction, Cc as CURRENCY, Cn as getCurrentAccountImplementationVersion, Co as useGetB3trBalance, Cs as WalletDisplayVariant, Ct as ReceiveTokenContent, D as StickyHeaderContainer, Da as imageCompressionOptions, Dc as ENSRecords, Dn as getAccountImplementationAddressQueryKey, Do as useTotalBalance, Dr as MultipleClausesCallParameters, Ds as DappKitButton, Dt as ThorClient, E as StickyFooterContainer, Ea as compressImages, Ec as CrossAppConnectionCache, En as getAccountImplementationAddress, Eo as useCurrentAllocationsRoundId, Es as VeChainWithPrivyLoginButton, Et as SendTokenContent, F as FeatureAnnouncementCard, Fa as useIpfsImageList, Fc as TokenBalance, Fi as useLoginWithVeChain, Fn as useGenericDelegatorFeeEstimationParams, Fo as getAvatarLegacy, Fs as EcosystemContent, Ft as txReceiptQueryKey, G as RemoveWalletConfirmContentProps, Ga as useSwitchWallet, Gi as ProfileModalProvider, Gn as EcosystemShortcut, Go as getTextRecordsQueryKey, Gs as useVechainKitThemeConfig, Gt as GetEventsProps, H as AccountModalContentTypes, Ha as getXAppMetadata, Hi as SettingsModalProvider, Hn as signVip191Transaction, Ho as buildClauses, Hs as useLegalDocuments, Ht as useTransferERC20, I as QuickActionsSection, Ia as getIpfsMetadata, Ic as TransactionStatus, Ii as useLoginWithOAuth, In as useGasTokenSelection, Io as getAvatarLegacyQueryKey, Is as ErrorContent, It as useTxReceipt, J as DisconnectConfirmContentProps, Ja as useWalletMetadata, Ji as useUpgradeSmartAccountModal, Jn as LocalStorageKey, Jo as useGetAvatar, Js as usePrivyWalletProvider, Jt as getChainId, K as SelectWalletContent, Ka as StoredWallet, Ki as useProfileModal, Kn as useEcosystemShortcuts, Ko as useGetTextRecords, Ks as PrivyWalletProvider, Kt as getAllEventLogs, L as BalanceSection, La as getIpfsMetadataQueryKey, Lc as TransactionStatusErrorType, Li as useLoginWithPasskey, Ln as decodeRawTx, Lo as useGetAvatarLegacy, Ls as LoadingContent, Lt as BuildTransactionProps, M as CrossAppConnectionSecurityCard, Ma as getIpfsImage, Mc as PrivyAppInfo, Mi as fetchAppHubApps, Mn as UseEstimateAllTokensParams, Mo as WalletTokenBalance, Mr as executeMultipleClausesCall, Ms as VeChainLoginButton, Mt as useSetWalletRecovery, N as DomainRequiredAlert, Na as getIpfsImageQueryKey, Nc as PrivyLoginMethod, Ni as getAppHubAppsQueryKey, Nn as useEstimateAllTokens, No as useTokenBalances, Ns as EmailLoginButton, Nt as useThor, O as useStickyHeaderContext, Oa as useUploadImages, Oc as EnhancedClause, On as useAccountImplementationAddress, Oo as TokenWithValue, Or as MultipleClausesCallReturnType, Os as PasskeyLoginButton, Ot as useDAppKitWallet, P as ExchangeWarningAlert, Pa as useIpfsImage, Pc as SmartAccount, Pi as useAppHubApps, Pn as useGenericDelegatorFeeEstimation, Po as useUnsetDomain, Ps as ConnectionButton, Pt as useGasEstimate, Q as GasTokenSettingsContent, Qa as useRoundXApps, Qi as AccountCustomizationModalProvider, Qn as buildSingleAuthorizationTypedData, Qo as getDomainsOfAddressQueryKey, Qs as VeChainKitContext, Qt as useCurrentBlock, R as AccountSelector, Ra as useIpfsMetadata, Rc as VePassportUserStatus, Ri as useSignTypedData, Rn as delegateAuthorized, Ro as getAvatarOfAddressQueryKey, Rs as MainContent, Rt as useBuildTransaction, S as ModalFAQButton, Sa as useSwapQuotes, Sc as TextRecords, Sn as useGetAccountAddress, So as getB3trBalanceQueryKey, Ss as WalletButtonProps, St as SwapTokenContent, T as BaseModal, Ta as UploadedImage, Tc as ConnectionSource, Tn as useCurrentAccountImplementationVersion, To as getCurrentAllocationsRoundIdQueryKey, Ts as LoginWithGithubButton, Tt as SendTokenSummaryContent, U as SwitchFeedback, Ua as useXAppMetadata, Ui as useSettingsModal, Un as useGenericDelegator, Uo as useUpdateTextRecord, Us as ColorModeSync, Ut as UseSendTransactionReturnValue, V as AccountModal, Va as XAppMetadata, Vi as useNotifications, Vn as getDepositAccount, Vo as useGetResolverAddress, Vs as LegalDocumentsProvider, Vt as buildERC20Clauses, W as RemoveWalletConfirmContent, Wa as UseSwitchWalletReturnType, Wi as useAccountModalOptions, Wn as useCrossAppConnectionCache, Wo as getTextRecords, Ws as VechainKitThemeProvider, Wt as useSendTransaction, X as SettingsContent, Xa as useWallet, Xi as ReceiveModalProvider, Xn as BuildClausesParams, Xo as DomainsResponse, Xs as LegalDocumentOptions, Xt as useGetChainId, Y as TermsAndPrivacyContent, Ya as UseWalletReturnType, Yi as useLoginModalContent, Yn as useLocalStorage, Yo as Domain, Ys as LegalDocument, Yt as getChainIdQueryKey, Z as SettingsContentProps, Za as getRoundXAppsQueryKey, Zi as useReceiveModal, Zn as buildBatchAuthorizationTypedData, Zo as getDomainsOfAddress, Zs as VeChainKitConfig, Zt as currentBlockQueryKey, _ as ModalNotificationButton, _a as useTransactionModal, _c as GasTokenPreferences, _n as useHasV1SmartAccount, _o as getTokenInfo, _s as ShareButtons, _t as ChooseNameSummaryContentProps, a as useModal, aa as useExploreEcosystemModal, ac as LegalDocumentType, an as useUpgradeRequired, ao as useIsPerson, ar as useScrollToTop, as as getEnsRecordExistsQueryKey, at as AssetsContent, b as AccountAvatar, ba as ConnectModalProvider, bc as TransactionSpeed, bn as getAccountAddress, bo as getCustomTokenBalanceQueryKey, bs as SocialIcons, bt as ChooseNameContent, c as LegalDocumentsModal, ca as SendTokenModalProvider, cc as EstimatedGas, cn as getSmartAccountQueryKey, co as PRICE_FEED_IDS, cr as useFeatureAnnouncement, cs as useVechainDomain, ct as UpgradeSmartAccountContentProps, d as UpgradeSmartAccountModalContentsTypes, da as useChooseNameModal, dc as TransactionCost, dn as useRefreshFactoryQueries, do as getTokenUsdPriceQueryKey, dr as useCurrency, ds as fetchPrivyAppInfo, dt as CustomizationSummaryContent, ea as FAQModalProvider, ec as VechainKitProviderProps, en as getUpgradeRequiredForAccount, eo as useRefreshBalances, er as GetEventsKeyParams, es as getIsDomainProtectedQueryKey, et as ChangeCurrencyContent, f as UpgradeSmartAccountModalStyle, fa as WalletModalProvider, fc as VthoPerGasAtSpeed, fn as getIsDeployed, fo as useGetTokenUsdPrice, fr as getCallClauseQueryKey, fs as getPrivyAppInfoQueryKey, ft as CustomizationSummaryContentProps, g as GasFeeSummary, ga as TransactionModalProvider, gc as GasTokenInfo, gn as getHasV1SmartAccountQueryKey, go as getCustomTokenInfoQueryKey, gs as TransactionModalContent, gt as ChooseNameSummaryContent, h as GasFeeTokenSelector, ha as useTransactionToast, hc as GasTokenEstimate, hn as getHasV1SmartAccount, ho as useGetErc20Balance, hr as useMultipleClausesCall, hs as TransactionToast, ht as FAQContent, i as ModalProvider, ia as ExploreEcosystemModalProvider, ic as LegalDocumentSource, in as getUpgradeRequiredQueryKey, io as getIsPersonQueryKey, ir as useEvents, is as useClaimVeWorldSubdomain, it as ManageCustomTokenContentProps, j as ModalBackButton, ja as MAX_IMAGE_SIZE, jc as NFTMediaType, ji as AppHubApp, jn as useAccountBalance, jo as useTokenPrices, jr as executeCallClause, js as EcosystemButton, jt as usePrivy, k as VersionFooter, ka as useIpfsMetadatas, kc as ExecuteBatchWithAuthorizationSignData, kn as getAccountBalance, ko as useTokensWithValues, kr as ViewFunctionResult, ks as LoginWithGoogleButton, kt as useDAppKitWalletModal, l as LegalDocumentsModalContentsTypes, la as useSendTokenModal, lc as EstimationResponse, ln as useSmartAccount, lo as SupportedToken, lr as useCurrentCurrency, ls as fetchPrivyStatus, lt as ProfileContent, m as InlineFeedback, ma as TransactionToastProvider, mc as formatGasCost, mn as useIsSmartAccountDeployed, mo as getErc20BalanceQueryKey, mr as useCallClause, ms as AccountMainContent, mt as CustomizationContent, n as getConfig, na as NotificationsModalProvider, nc as EnrichedLegalDocument, nn as useUpgradeRequiredForAccount, no as XApp, nr as decodeEventLog, ns as buildVetDomainClauses, nt as BridgeContent, o as DAppKitWalletButton, oa as SwapTokenModalProvider, oc as CostLevel, on as SmartAccountReturnType, oo as getVot3BalanceQueryKey, or as useIsPWA, os as useEnsRecordExists, ot as AssetsContentProps, p as WalletSwitchFeedback, pa as useWalletModal, pc as calculateTotalCost, pn as getIsDeployedQueryKey, po as UseGetErc20BalanceOptions, pr as getCallClauseQueryKeyWithArgs, ps as useFetchAppInfo, pt as AccountCustomizationContentProps, q as DisconnectConfirmContent, qa as useWalletStorage, qi as UpgradeSmartAccountModalProvider, qn as useSyncableLocalStorage, qo as getAvatarQueryKey, qs as PrivyWalletProviderContextType, qt as getEventLogs, r as AccountModalOptions, ra as useNotificationsModal, rc as LegalDocumentAgreement, rn as getUpgradeRequired, ro as useMostVotedAppsInRound, rr as getEventsKey, rs as useClaimVetDomain, rt as ManageCustomTokenContent, s as LegalDocumentItem, sa as useSwapTokenModal, sc as DepositAccount, sn as getSmartAccount, so as useGetVot3Balance, sr as useGetNodeUrl, ss as getVechainDomainQueryKey, st as UpgradeSmartAccountContent, t as AppConfig, ta as useFAQModal, tc as useVeChainKitConfig, tn as getUpgradeRequiredForAccountQueryKey, to as MostVotedAppsInRoundReturnType, tr as UseEventsParams, ts as useIsDomainProtected, tt as ChangeCurrencyContentProps, u as UpgradeSmartAccountModal, ua as ChooseNameModalProvider, uc as Rate, un as useRefreshSmartAccountQueries, uo as getTokenUsdPrice, ur as useCurrentLanguage, us as useFetchPrivyStatus, ut as ProfileContentProps, v as TransactionButtonAndStatus, va as AccountModalProvider, vc as GasTokenSelection, vn as getAccountVersionQueryKey, vo as useGetCustomTokenInfo, vs as TransactionModal, vt as ChooseNameSearchContent, w as AssetButton, wa as useSingleImageUpload, wc as CURRENCY_SYMBOLS, wn as getCurrentAccountImplementationVersionQueryKey, wo as useCustomTokens, ws as ConnectPopover, wt as SelectTokenContent, x as ScrollToTopWrapper, xa as useConnectModal, xc as ENS_TEXT_RECORDS, xn as getAccountAddressQueryKey, xo as useGetCustomTokenBalances, xs as WalletButton, xt as ChooseNameContentProps, y as TransactionButtonAndStatusProps, ya as useAccountModal, yc as GasTokenType, yn as useGetAccountVersion, yo as TokenWithBalance, ys as TransactionModalProps, yt as ChooseNameSearchContentProps, z as ActionButton, za as getXAppsSharesQueryKey, zc as Wallet, zi as useSignMessage, zn as estimateAndBuildTxBody, zo as useGetAvatarOfAddress, zs as ConnectModal, zt as buildVETClauses } from "./index-DShXeWMB.cjs";
|
|
1
|
+
import { C as TwitterLogo, S as VechainLogo, T as GoogleLogo, _ as VechainIcon, a as VeWorldLogoDark, b as VechainLogoLight, c as VETLogo, d as VeBetterIcon, f as VeBetterLogoDark, g as VechainIconLight, h as VechainIconDark, i as PrivyLogo, l as VeBetterIconDark, m as VeBetterLogo, n as BetterSwapLogo, o as VeWorldLogoLight, p as VeBetterLogoLight, r as VechainEnergy, s as VTHOLogo, t as VeTradeLogo, u as VeBetterIconLight, v as VechainLogoHorizontalLight, w as GitHubLogo, x as VechainLogoDark, y as VechainLogoHorizontalDark } from "./index-Cf1aBaTL.cjs";
|
|
2
|
+
import { $ as LanguageSettingsContent, $a as useRefreshMetadata, $i as useAccountCustomizationModal, $n as useBuildClauses, $o as useGetDomainsOfAddress, $s as VeChainKitProvider, $t as useUpgradeSmartAccount, A as AddressDisplay, Aa as IpfsImage, Ac as ExecuteWithAuthorizationSignData, An as getAccountBalanceQueryKey, Ao as ExchangeRates, Ar as buildCallClauses, As as PrivyButton, At as useMfaEnrollment, B as AccountDetailsButton, Ba as useXAppsShares, Bi as useNotificationAlerts, Bn as estimateGas, Bo as getResolverAddressQueryKey, Bs as ConnectModalContentsTypes, Bt as useTransferVET, C as AddressDisplayCard, Ca as useSwapTransaction, Cc as CURRENCY, Cn as getCurrentAccountImplementationVersion, Co as useGetB3trBalance, Cs as WalletDisplayVariant, Ct as ReceiveTokenContent, D as StickyHeaderContainer, Da as imageCompressionOptions, Dc as ENSRecords, Dn as getAccountImplementationAddressQueryKey, Do as useTotalBalance, Dr as MultipleClausesCallParameters, Ds as DappKitButton, Dt as ThorClient, E as StickyFooterContainer, Ea as compressImages, Ec as CrossAppConnectionCache, En as getAccountImplementationAddress, Eo as useCurrentAllocationsRoundId, Es as VeChainWithPrivyLoginButton, Et as SendTokenContent, F as FeatureAnnouncementCard, Fa as useIpfsImageList, Fc as TokenBalance, Fi as useLoginWithVeChain, Fn as useGenericDelegatorFeeEstimationParams, Fo as getAvatarLegacy, Fs as EcosystemContent, Ft as txReceiptQueryKey, G as RemoveWalletConfirmContentProps, Ga as useSwitchWallet, Gi as ProfileModalProvider, Gn as EcosystemShortcut, Go as getTextRecordsQueryKey, Gs as useVechainKitThemeConfig, Gt as GetEventsProps, H as AccountModalContentTypes, Ha as getXAppMetadata, Hi as SettingsModalProvider, Hn as signVip191Transaction, Ho as buildClauses, Hs as useLegalDocuments, Ht as useTransferERC20, I as QuickActionsSection, Ia as getIpfsMetadata, Ic as TransactionStatus, Ii as useLoginWithOAuth, In as useGasTokenSelection, Io as getAvatarLegacyQueryKey, Is as ErrorContent, It as useTxReceipt, J as DisconnectConfirmContentProps, Ja as useWalletMetadata, Ji as useUpgradeSmartAccountModal, Jn as LocalStorageKey, Jo as useGetAvatar, Js as usePrivyWalletProvider, Jt as getChainId, K as SelectWalletContent, Ka as StoredWallet, Ki as useProfileModal, Kn as useEcosystemShortcuts, Ko as useGetTextRecords, Ks as PrivyWalletProvider, Kt as getAllEventLogs, L as BalanceSection, La as getIpfsMetadataQueryKey, Lc as TransactionStatusErrorType, Li as useLoginWithPasskey, Ln as decodeRawTx, Lo as useGetAvatarLegacy, Ls as LoadingContent, Lt as BuildTransactionProps, M as CrossAppConnectionSecurityCard, Ma as getIpfsImage, Mc as PrivyAppInfo, Mi as fetchAppHubApps, Mn as UseEstimateAllTokensParams, Mo as WalletTokenBalance, Mr as executeMultipleClausesCall, Ms as VeChainLoginButton, Mt as useSetWalletRecovery, N as DomainRequiredAlert, Na as getIpfsImageQueryKey, Nc as PrivyLoginMethod, Ni as getAppHubAppsQueryKey, Nn as useEstimateAllTokens, No as useTokenBalances, Ns as EmailLoginButton, Nt as useThor, O as useStickyHeaderContext, Oa as useUploadImages, Oc as EnhancedClause, On as useAccountImplementationAddress, Oo as TokenWithValue, Or as MultipleClausesCallReturnType, Os as PasskeyLoginButton, Ot as useDAppKitWallet, P as ExchangeWarningAlert, Pa as useIpfsImage, Pc as SmartAccount, Pi as useAppHubApps, Pn as useGenericDelegatorFeeEstimation, Po as useUnsetDomain, Ps as ConnectionButton, Pt as useGasEstimate, Q as GasTokenSettingsContent, Qa as useRoundXApps, Qi as AccountCustomizationModalProvider, Qn as buildSingleAuthorizationTypedData, Qo as getDomainsOfAddressQueryKey, Qs as VeChainKitContext, Qt as useCurrentBlock, R as AccountSelector, Ra as useIpfsMetadata, Rc as VePassportUserStatus, Ri as useSignTypedData, Rn as delegateAuthorized, Ro as getAvatarOfAddressQueryKey, Rs as MainContent, Rt as useBuildTransaction, S as ModalFAQButton, Sa as useSwapQuotes, Sc as TextRecords, Sn as useGetAccountAddress, So as getB3trBalanceQueryKey, Ss as WalletButtonProps, St as SwapTokenContent, T as BaseModal, Ta as UploadedImage, Tc as ConnectionSource, Tn as useCurrentAccountImplementationVersion, To as getCurrentAllocationsRoundIdQueryKey, Ts as LoginWithGithubButton, Tt as SendTokenSummaryContent, U as SwitchFeedback, Ua as useXAppMetadata, Ui as useSettingsModal, Un as useGenericDelegator, Uo as useUpdateTextRecord, Us as ColorModeSync, Ut as UseSendTransactionReturnValue, V as AccountModal, Va as XAppMetadata, Vi as useNotifications, Vn as getDepositAccount, Vo as useGetResolverAddress, Vs as LegalDocumentsProvider, Vt as buildERC20Clauses, W as RemoveWalletConfirmContent, Wa as UseSwitchWalletReturnType, Wi as useAccountModalOptions, Wn as useCrossAppConnectionCache, Wo as getTextRecords, Ws as VechainKitThemeProvider, Wt as useSendTransaction, X as SettingsContent, Xa as useWallet, Xi as ReceiveModalProvider, Xn as BuildClausesParams, Xo as DomainsResponse, Xs as LegalDocumentOptions, Xt as useGetChainId, Y as TermsAndPrivacyContent, Ya as UseWalletReturnType, Yi as useLoginModalContent, Yn as useLocalStorage, Yo as Domain, Ys as LegalDocument, Yt as getChainIdQueryKey, Z as SettingsContentProps, Za as getRoundXAppsQueryKey, Zi as useReceiveModal, Zn as buildBatchAuthorizationTypedData, Zo as getDomainsOfAddress, Zs as VeChainKitConfig, Zt as currentBlockQueryKey, _ as ModalNotificationButton, _a as useTransactionModal, _c as GasTokenPreferences, _n as useHasV1SmartAccount, _o as getTokenInfo, _s as ShareButtons, _t as ChooseNameSummaryContentProps, a as useModal, aa as useExploreEcosystemModal, ac as LegalDocumentType, an as useUpgradeRequired, ao as useIsPerson, ar as useScrollToTop, as as getEnsRecordExistsQueryKey, at as AssetsContent, b as AccountAvatar, ba as ConnectModalProvider, bc as TransactionSpeed, bn as getAccountAddress, bo as getCustomTokenBalanceQueryKey, bs as SocialIcons, bt as ChooseNameContent, c as LegalDocumentsModal, ca as SendTokenModalProvider, cc as EstimatedGas, cn as getSmartAccountQueryKey, co as PRICE_FEED_IDS, cr as useFeatureAnnouncement, cs as useVechainDomain, ct as UpgradeSmartAccountContentProps, d as UpgradeSmartAccountModalContentsTypes, da as useChooseNameModal, dc as TransactionCost, dn as useRefreshFactoryQueries, do as getTokenUsdPriceQueryKey, dr as useCurrency, ds as fetchPrivyAppInfo, dt as CustomizationSummaryContent, ea as FAQModalProvider, ec as VechainKitProviderProps, en as getUpgradeRequiredForAccount, eo as useRefreshBalances, er as GetEventsKeyParams, es as getIsDomainProtectedQueryKey, et as ChangeCurrencyContent, f as UpgradeSmartAccountModalStyle, fa as WalletModalProvider, fc as VthoPerGasAtSpeed, fn as getIsDeployed, fo as useGetTokenUsdPrice, fr as getCallClauseQueryKey, fs as getPrivyAppInfoQueryKey, ft as CustomizationSummaryContentProps, g as GasFeeSummary, ga as TransactionModalProvider, gc as GasTokenInfo, gn as getHasV1SmartAccountQueryKey, go as getCustomTokenInfoQueryKey, gs as TransactionModalContent, gt as ChooseNameSummaryContent, h as GasFeeTokenSelector, ha as useTransactionToast, hc as GasTokenEstimate, hn as getHasV1SmartAccount, ho as useGetErc20Balance, hr as useMultipleClausesCall, hs as TransactionToast, ht as FAQContent, i as ModalProvider, ia as ExploreEcosystemModalProvider, ic as LegalDocumentSource, in as getUpgradeRequiredQueryKey, io as getIsPersonQueryKey, ir as useEvents, is as useClaimVeWorldSubdomain, it as ManageCustomTokenContentProps, j as ModalBackButton, ja as MAX_IMAGE_SIZE, jc as NFTMediaType, ji as AppHubApp, jn as useAccountBalance, jo as useTokenPrices, jr as executeCallClause, js as EcosystemButton, jt as usePrivy, k as VersionFooter, ka as useIpfsMetadatas, kc as ExecuteBatchWithAuthorizationSignData, kn as getAccountBalance, ko as useTokensWithValues, kr as ViewFunctionResult, ks as LoginWithGoogleButton, kt as useDAppKitWalletModal, l as LegalDocumentsModalContentsTypes, la as useSendTokenModal, lc as EstimationResponse, ln as useSmartAccount, lo as SupportedToken, lr as useCurrentCurrency, ls as fetchPrivyStatus, lt as ProfileContent, m as InlineFeedback, ma as TransactionToastProvider, mc as formatGasCost, mn as useIsSmartAccountDeployed, mo as getErc20BalanceQueryKey, mr as useCallClause, ms as AccountMainContent, mt as CustomizationContent, n as getConfig, na as NotificationsModalProvider, nc as EnrichedLegalDocument, nn as useUpgradeRequiredForAccount, no as XApp, nr as decodeEventLog, ns as buildVetDomainClauses, nt as BridgeContent, o as DAppKitWalletButton, oa as SwapTokenModalProvider, oc as CostLevel, on as SmartAccountReturnType, oo as getVot3BalanceQueryKey, or as useIsPWA, os as useEnsRecordExists, ot as AssetsContentProps, p as WalletSwitchFeedback, pa as useWalletModal, pc as calculateTotalCost, pn as getIsDeployedQueryKey, po as UseGetErc20BalanceOptions, pr as getCallClauseQueryKeyWithArgs, ps as useFetchAppInfo, pt as AccountCustomizationContentProps, q as DisconnectConfirmContent, qa as useWalletStorage, qi as UpgradeSmartAccountModalProvider, qn as useSyncableLocalStorage, qo as getAvatarQueryKey, qs as PrivyWalletProviderContextType, qt as getEventLogs, r as AccountModalOptions, ra as useNotificationsModal, rc as LegalDocumentAgreement, rn as getUpgradeRequired, ro as useMostVotedAppsInRound, rr as getEventsKey, rs as useClaimVetDomain, rt as ManageCustomTokenContent, s as LegalDocumentItem, sa as useSwapTokenModal, sc as DepositAccount, sn as getSmartAccount, so as useGetVot3Balance, sr as useGetNodeUrl, ss as getVechainDomainQueryKey, st as UpgradeSmartAccountContent, t as AppConfig, ta as useFAQModal, tc as useVeChainKitConfig, tn as getUpgradeRequiredForAccountQueryKey, to as MostVotedAppsInRoundReturnType, tr as UseEventsParams, ts as useIsDomainProtected, tt as ChangeCurrencyContentProps, u as UpgradeSmartAccountModal, ua as ChooseNameModalProvider, uc as Rate, un as useRefreshSmartAccountQueries, uo as getTokenUsdPrice, ur as useCurrentLanguage, us as useFetchPrivyStatus, ut as ProfileContentProps, v as TransactionButtonAndStatus, va as AccountModalProvider, vc as GasTokenSelection, vn as getAccountVersionQueryKey, vo as useGetCustomTokenInfo, vs as TransactionModal, vt as ChooseNameSearchContent, w as AssetButton, wa as useSingleImageUpload, wc as CURRENCY_SYMBOLS, wn as getCurrentAccountImplementationVersionQueryKey, wo as useCustomTokens, ws as ConnectPopover, wt as SelectTokenContent, x as ScrollToTopWrapper, xa as useConnectModal, xc as ENS_TEXT_RECORDS, xn as getAccountAddressQueryKey, xo as useGetCustomTokenBalances, xs as WalletButton, xt as ChooseNameContentProps, y as TransactionButtonAndStatusProps, ya as useAccountModal, yc as GasTokenType, yn as useGetAccountVersion, yo as TokenWithBalance, ys as TransactionModalProps, yt as ChooseNameSearchContentProps, z as ActionButton, za as getXAppsSharesQueryKey, zc as Wallet, zi as useSignMessage, zn as estimateAndBuildTxBody, zo as useGetAvatarOfAddress, zs as ConnectModal, zt as buildVETClauses } from "./index-o92cc2nW.cjs";
|
|
3
3
|
export { AccountAvatar, AccountCustomizationContentProps, AccountCustomizationModalProvider, AccountDetailsButton, AccountMainContent, AccountModal, AccountModalContentTypes, AccountModalOptions, AccountModalProvider, AccountSelector, ActionButton, AddressDisplay, AddressDisplayCard, AppConfig, AppHubApp, AssetButton, AssetsContent, AssetsContentProps, BalanceSection, BaseModal, BetterSwapLogo, BridgeContent, BuildClausesParams, BuildTransactionProps, CURRENCY, CURRENCY_SYMBOLS, ChangeCurrencyContent, ChangeCurrencyContentProps, ChooseNameContent, ChooseNameContentProps, ChooseNameModalProvider, ChooseNameSearchContent, ChooseNameSearchContentProps, ChooseNameSummaryContent, ChooseNameSummaryContentProps, ColorModeSync, ConnectModal, ConnectModalContentsTypes, ConnectModalProvider, ConnectPopover, ConnectionButton, ConnectionSource, CostLevel, CrossAppConnectionCache, CrossAppConnectionSecurityCard, CustomizationContent, CustomizationSummaryContent, CustomizationSummaryContentProps, DAppKitWalletButton, DappKitButton, DepositAccount, DisconnectConfirmContent, DisconnectConfirmContentProps, Domain, DomainRequiredAlert, DomainsResponse, ENSRecords, ENS_TEXT_RECORDS, EcosystemButton, EcosystemContent, EcosystemShortcut, EmailLoginButton, EnhancedClause, EnrichedLegalDocument, ErrorContent, EstimatedGas, EstimationResponse, ExchangeRates, ExchangeWarningAlert, ExecuteBatchWithAuthorizationSignData, ExecuteWithAuthorizationSignData, ExploreEcosystemModalProvider, FAQContent, FAQModalProvider, FeatureAnnouncementCard, GasFeeSummary, GasFeeTokenSelector, GasTokenEstimate, GasTokenInfo, GasTokenPreferences, GasTokenSelection, GasTokenSettingsContent, GasTokenType, GetEventsKeyParams, GetEventsProps, GitHubLogo, GoogleLogo, InlineFeedback, IpfsImage, LanguageSettingsContent, LegalDocument, LegalDocumentAgreement, LegalDocumentItem, LegalDocumentOptions, LegalDocumentSource, LegalDocumentType, LegalDocumentsModal, LegalDocumentsModalContentsTypes, LegalDocumentsProvider, LoadingContent, LocalStorageKey, LoginWithGithubButton, LoginWithGoogleButton, MAX_IMAGE_SIZE, MainContent, ManageCustomTokenContent, ManageCustomTokenContentProps, ModalBackButton, ModalFAQButton, ModalNotificationButton, ModalProvider, MostVotedAppsInRoundReturnType, MultipleClausesCallParameters, MultipleClausesCallReturnType, NFTMediaType, NotificationsModalProvider, PRICE_FEED_IDS, PasskeyLoginButton, PrivyAppInfo, PrivyButton, PrivyLoginMethod, PrivyLogo, PrivyWalletProvider, PrivyWalletProviderContextType, ProfileContent, ProfileContentProps, ProfileModalProvider, QuickActionsSection, Rate, ReceiveModalProvider, ReceiveTokenContent, RemoveWalletConfirmContent, RemoveWalletConfirmContentProps, ScrollToTopWrapper, SelectTokenContent, SelectWalletContent, SendTokenContent, SendTokenModalProvider, SendTokenSummaryContent, SettingsContent, SettingsContentProps, SettingsModalProvider, ShareButtons, SmartAccount, SmartAccountReturnType, SocialIcons, StickyFooterContainer, StickyHeaderContainer, StoredWallet, SupportedToken, SwapTokenContent, SwapTokenModalProvider, SwitchFeedback, TermsAndPrivacyContent, TextRecords, ThorClient, TokenBalance, TokenWithBalance, TokenWithValue, TransactionButtonAndStatus, TransactionButtonAndStatusProps, TransactionCost, TransactionModal, TransactionModalContent, TransactionModalProps, TransactionModalProvider, TransactionSpeed, TransactionStatus, TransactionStatusErrorType, TransactionToast, TransactionToastProvider, TwitterLogo, UpgradeSmartAccountContent, UpgradeSmartAccountContentProps, UpgradeSmartAccountModal, UpgradeSmartAccountModalContentsTypes, UpgradeSmartAccountModalProvider, UpgradeSmartAccountModalStyle, UploadedImage, UseEstimateAllTokensParams, UseEventsParams, UseGetErc20BalanceOptions, UseSendTransactionReturnValue, UseSwitchWalletReturnType, UseWalletReturnType, VETLogo, VTHOLogo, VeBetterIcon, VeBetterIconDark, VeBetterIconLight, VeBetterLogo, VeBetterLogoDark, VeBetterLogoLight, VeChainKitConfig, VeChainKitContext, VeChainKitProvider, VeChainLoginButton, VeChainWithPrivyLoginButton, VePassportUserStatus, VeTradeLogo, VeWorldLogoDark, VeWorldLogoLight, VechainEnergy, VechainIcon, VechainIconDark, VechainIconLight, VechainKitProviderProps, VechainKitThemeProvider, VechainLogo, VechainLogoDark, VechainLogoHorizontalDark, VechainLogoHorizontalLight, VechainLogoLight, VersionFooter, ViewFunctionResult, VthoPerGasAtSpeed, Wallet, WalletButton, WalletButtonProps, WalletDisplayVariant, WalletModalProvider, WalletSwitchFeedback, WalletTokenBalance, XApp, XAppMetadata, buildBatchAuthorizationTypedData, buildCallClauses, buildClauses, buildERC20Clauses, buildSingleAuthorizationTypedData, buildVETClauses, buildVetDomainClauses, calculateTotalCost, compressImages, currentBlockQueryKey, decodeEventLog, decodeRawTx, delegateAuthorized, estimateAndBuildTxBody, estimateGas, executeCallClause, executeMultipleClausesCall, fetchAppHubApps, fetchPrivyAppInfo, fetchPrivyStatus, formatGasCost, getAccountAddress, getAccountAddressQueryKey, getAccountBalance, getAccountBalanceQueryKey, getAccountImplementationAddress, getAccountImplementationAddressQueryKey, getAccountVersionQueryKey, getAllEventLogs, getAppHubAppsQueryKey, getAvatarLegacy, getAvatarLegacyQueryKey, getAvatarOfAddressQueryKey, getAvatarQueryKey, getB3trBalanceQueryKey, getCallClauseQueryKey, getCallClauseQueryKeyWithArgs, getChainId, getChainIdQueryKey, getConfig, getCurrentAccountImplementationVersion, getCurrentAccountImplementationVersionQueryKey, getCurrentAllocationsRoundIdQueryKey, getCustomTokenBalanceQueryKey, getCustomTokenInfoQueryKey, getDepositAccount, getDomainsOfAddress, getDomainsOfAddressQueryKey, getEnsRecordExistsQueryKey, getErc20BalanceQueryKey, getEventLogs, getEventsKey, getHasV1SmartAccount, getHasV1SmartAccountQueryKey, getIpfsImage, getIpfsImageQueryKey, getIpfsMetadata, getIpfsMetadataQueryKey, getIsDeployed, getIsDeployedQueryKey, getIsDomainProtectedQueryKey, getIsPersonQueryKey, getPrivyAppInfoQueryKey, getResolverAddressQueryKey, getRoundXAppsQueryKey, getSmartAccount, getSmartAccountQueryKey, getTextRecords, getTextRecordsQueryKey, getTokenInfo, getTokenUsdPrice, getTokenUsdPriceQueryKey, getUpgradeRequired, getUpgradeRequiredForAccount, getUpgradeRequiredForAccountQueryKey, getUpgradeRequiredQueryKey, getVechainDomainQueryKey, getVot3BalanceQueryKey, getXAppMetadata, getXAppsSharesQueryKey, imageCompressionOptions, signVip191Transaction, txReceiptQueryKey, useAccountBalance, useAccountCustomizationModal, useAccountImplementationAddress, useAccountModal, useAccountModalOptions, useAppHubApps, useBuildClauses, useBuildTransaction, useCallClause, useChooseNameModal, useClaimVeWorldSubdomain, useClaimVetDomain, useConnectModal, useCrossAppConnectionCache, useCurrency, useCurrentAccountImplementationVersion, useCurrentAllocationsRoundId, useCurrentBlock, useCurrentCurrency, useCurrentLanguage, useCustomTokens, useDAppKitWallet, useDAppKitWalletModal, useEcosystemShortcuts, useEnsRecordExists, useEstimateAllTokens, useEvents, useExploreEcosystemModal, useFAQModal, useFeatureAnnouncement, useFetchAppInfo, useFetchPrivyStatus, useGasEstimate, useGasTokenSelection, useGenericDelegator, useGenericDelegatorFeeEstimation, useGenericDelegatorFeeEstimationParams, useGetAccountAddress, useGetAccountVersion, useGetAvatar, useGetAvatarLegacy, useGetAvatarOfAddress, useGetB3trBalance, useGetChainId, useGetCustomTokenBalances, useGetCustomTokenInfo, useGetDomainsOfAddress, useGetErc20Balance, useGetNodeUrl, useGetResolverAddress, useGetTextRecords, useGetTokenUsdPrice, useGetVot3Balance, useHasV1SmartAccount, useIpfsImage, useIpfsImageList, useIpfsMetadata, useIpfsMetadatas, useIsDomainProtected, useIsPWA, useIsPerson, useIsSmartAccountDeployed, useLegalDocuments, useLocalStorage, useLoginModalContent, useLoginWithOAuth, useLoginWithPasskey, useLoginWithVeChain, useMfaEnrollment, useModal, useMostVotedAppsInRound, useMultipleClausesCall, useNotificationAlerts, useNotifications, useNotificationsModal, usePrivy, usePrivyWalletProvider, useProfileModal, useReceiveModal, useRefreshBalances, useRefreshFactoryQueries, useRefreshMetadata, useRefreshSmartAccountQueries, useRoundXApps, useScrollToTop, useSendTokenModal, useSendTransaction, useSetWalletRecovery, useSettingsModal, useSignMessage, useSignTypedData, useSingleImageUpload, useSmartAccount, useStickyHeaderContext, useSwapQuotes, useSwapTokenModal, useSwapTransaction, useSwitchWallet, useSyncableLocalStorage, useThor, useTokenBalances, useTokenPrices, useTokensWithValues, useTotalBalance, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useUnsetDomain, useUpdateTextRecord, useUpgradeRequired, useUpgradeRequiredForAccount, useUpgradeSmartAccount, useUpgradeSmartAccountModal, useUploadImages, useVeChainKitConfig, useVechainDomain, useVechainKitThemeConfig, useWallet, useWalletMetadata, useWalletModal, useWalletStorage, useXAppMetadata, useXAppsShares };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as TwitterLogo, S as VechainLogo, T as GoogleLogo, _ as VechainIcon, a as VeWorldLogoDark, b as VechainLogoLight, c as VETLogo, d as VeBetterIcon, f as VeBetterLogoDark, g as VechainIconLight, h as VechainIconDark, i as PrivyLogo, l as VeBetterIconDark, m as VeBetterLogo, n as BetterSwapLogo, o as VeWorldLogoLight, p as VeBetterLogoLight, r as VechainEnergy, s as VTHOLogo, t as VeTradeLogo, u as VeBetterIconLight, v as VechainLogoHorizontalLight, w as GitHubLogo, x as VechainLogoDark, y as VechainLogoHorizontalDark } from "./index
|
|
2
|
-
import { $ as LanguageSettingsContent, $a as useRefreshMetadata, $i as useAccountCustomizationModal, $n as useBuildClauses, $o as useGetDomainsOfAddress, $s as VeChainKitProvider, $t as useUpgradeSmartAccount, A as AddressDisplay, Aa as IpfsImage, Ac as ExecuteWithAuthorizationSignData, An as getAccountBalanceQueryKey, Ao as ExchangeRates, Ar as buildCallClauses, As as PrivyButton, At as useMfaEnrollment, B as AccountDetailsButton, Ba as useXAppsShares, Bi as useNotificationAlerts, Bn as estimateGas, Bo as getResolverAddressQueryKey, Bs as ConnectModalContentsTypes, Bt as useTransferVET, C as AddressDisplayCard, Ca as useSwapTransaction, Cc as CURRENCY, Cn as getCurrentAccountImplementationVersion, Co as useGetB3trBalance, Cs as WalletDisplayVariant, Ct as ReceiveTokenContent, D as StickyHeaderContainer, Da as imageCompressionOptions, Dc as ENSRecords, Dn as getAccountImplementationAddressQueryKey, Do as useTotalBalance, Dr as MultipleClausesCallParameters, Ds as DappKitButton, Dt as ThorClient, E as StickyFooterContainer, Ea as compressImages, Ec as CrossAppConnectionCache, En as getAccountImplementationAddress, Eo as useCurrentAllocationsRoundId, Es as VeChainWithPrivyLoginButton, Et as SendTokenContent, F as FeatureAnnouncementCard, Fa as useIpfsImageList, Fc as TokenBalance, Fi as useLoginWithVeChain, Fn as useGenericDelegatorFeeEstimationParams, Fo as getAvatarLegacy, Fs as EcosystemContent, Ft as txReceiptQueryKey, G as RemoveWalletConfirmContentProps, Ga as useSwitchWallet, Gi as ProfileModalProvider, Gn as EcosystemShortcut, Go as getTextRecordsQueryKey, Gs as useVechainKitThemeConfig, Gt as GetEventsProps, H as AccountModalContentTypes, Ha as getXAppMetadata, Hi as SettingsModalProvider, Hn as signVip191Transaction, Ho as buildClauses, Hs as useLegalDocuments, Ht as useTransferERC20, I as QuickActionsSection, Ia as getIpfsMetadata, Ic as TransactionStatus, Ii as useLoginWithOAuth, In as useGasTokenSelection, Io as getAvatarLegacyQueryKey, Is as ErrorContent, It as useTxReceipt, J as DisconnectConfirmContentProps, Ja as useWalletMetadata, Ji as useUpgradeSmartAccountModal, Jn as LocalStorageKey, Jo as useGetAvatar, Js as usePrivyWalletProvider, Jt as getChainId, K as SelectWalletContent, Ka as StoredWallet, Ki as useProfileModal, Kn as useEcosystemShortcuts, Ko as useGetTextRecords, Ks as PrivyWalletProvider, Kt as getAllEventLogs, L as BalanceSection, La as getIpfsMetadataQueryKey, Lc as TransactionStatusErrorType, Li as useLoginWithPasskey, Ln as decodeRawTx, Lo as useGetAvatarLegacy, Ls as LoadingContent, Lt as BuildTransactionProps, M as CrossAppConnectionSecurityCard, Ma as getIpfsImage, Mc as PrivyAppInfo, Mi as fetchAppHubApps, Mn as UseEstimateAllTokensParams, Mo as WalletTokenBalance, Mr as executeMultipleClausesCall, Ms as VeChainLoginButton, Mt as useSetWalletRecovery, N as DomainRequiredAlert, Na as getIpfsImageQueryKey, Nc as PrivyLoginMethod, Ni as getAppHubAppsQueryKey, Nn as useEstimateAllTokens, No as useTokenBalances, Ns as EmailLoginButton, Nt as useThor, O as useStickyHeaderContext, Oa as useUploadImages, Oc as EnhancedClause, On as useAccountImplementationAddress, Oo as TokenWithValue, Or as MultipleClausesCallReturnType, Os as PasskeyLoginButton, Ot as useDAppKitWallet, P as ExchangeWarningAlert, Pa as useIpfsImage, Pc as SmartAccount, Pi as useAppHubApps, Pn as useGenericDelegatorFeeEstimation, Po as useUnsetDomain, Ps as ConnectionButton, Pt as useGasEstimate, Q as GasTokenSettingsContent, Qa as useRoundXApps, Qi as AccountCustomizationModalProvider, Qn as buildSingleAuthorizationTypedData, Qo as getDomainsOfAddressQueryKey, Qs as VeChainKitContext, Qt as useCurrentBlock, R as AccountSelector, Ra as useIpfsMetadata, Rc as VePassportUserStatus, Ri as useSignTypedData, Rn as delegateAuthorized, Ro as getAvatarOfAddressQueryKey, Rs as MainContent, Rt as useBuildTransaction, S as ModalFAQButton, Sa as useSwapQuotes, Sc as TextRecords, Sn as useGetAccountAddress, So as getB3trBalanceQueryKey, Ss as WalletButtonProps, St as SwapTokenContent, T as BaseModal, Ta as UploadedImage, Tc as ConnectionSource, Tn as useCurrentAccountImplementationVersion, To as getCurrentAllocationsRoundIdQueryKey, Ts as LoginWithGithubButton, Tt as SendTokenSummaryContent, U as SwitchFeedback, Ua as useXAppMetadata, Ui as useSettingsModal, Un as useGenericDelegator, Uo as useUpdateTextRecord, Us as ColorModeSync, Ut as UseSendTransactionReturnValue, V as AccountModal, Va as XAppMetadata, Vi as useNotifications, Vn as getDepositAccount, Vo as useGetResolverAddress, Vs as LegalDocumentsProvider, Vt as buildERC20Clauses, W as RemoveWalletConfirmContent, Wa as UseSwitchWalletReturnType, Wi as useAccountModalOptions, Wn as useCrossAppConnectionCache, Wo as getTextRecords, Ws as VechainKitThemeProvider, Wt as useSendTransaction, X as SettingsContent, Xa as useWallet, Xi as ReceiveModalProvider, Xn as BuildClausesParams, Xo as DomainsResponse, Xs as LegalDocumentOptions, Xt as useGetChainId, Y as TermsAndPrivacyContent, Ya as UseWalletReturnType, Yi as useLoginModalContent, Yn as useLocalStorage, Yo as Domain, Ys as LegalDocument, Yt as getChainIdQueryKey, Z as SettingsContentProps, Za as getRoundXAppsQueryKey, Zi as useReceiveModal, Zn as buildBatchAuthorizationTypedData, Zo as getDomainsOfAddress, Zs as VeChainKitConfig, Zt as currentBlockQueryKey, _ as ModalNotificationButton, _a as useTransactionModal, _c as GasTokenPreferences, _n as useHasV1SmartAccount, _o as getTokenInfo, _s as ShareButtons, _t as ChooseNameSummaryContentProps, a as useModal, aa as useExploreEcosystemModal, ac as LegalDocumentType, an as useUpgradeRequired, ao as useIsPerson, ar as useScrollToTop, as as getEnsRecordExistsQueryKey, at as AssetsContent, b as AccountAvatar, ba as ConnectModalProvider, bc as TransactionSpeed, bn as getAccountAddress, bo as getCustomTokenBalanceQueryKey, bs as SocialIcons, bt as ChooseNameContent, c as LegalDocumentsModal, ca as SendTokenModalProvider, cc as EstimatedGas, cn as getSmartAccountQueryKey, co as PRICE_FEED_IDS, cr as useFeatureAnnouncement, cs as useVechainDomain, ct as UpgradeSmartAccountContentProps, d as UpgradeSmartAccountModalContentsTypes, da as useChooseNameModal, dc as TransactionCost, dn as useRefreshFactoryQueries, do as getTokenUsdPriceQueryKey, dr as useCurrency, ds as fetchPrivyAppInfo, dt as CustomizationSummaryContent, ea as FAQModalProvider, ec as VechainKitProviderProps, en as getUpgradeRequiredForAccount, eo as useRefreshBalances, er as GetEventsKeyParams, es as getIsDomainProtectedQueryKey, et as ChangeCurrencyContent, f as UpgradeSmartAccountModalStyle, fa as WalletModalProvider, fc as VthoPerGasAtSpeed, fn as getIsDeployed, fo as useGetTokenUsdPrice, fr as getCallClauseQueryKey, fs as getPrivyAppInfoQueryKey, ft as CustomizationSummaryContentProps, g as GasFeeSummary, ga as TransactionModalProvider, gc as GasTokenInfo, gn as getHasV1SmartAccountQueryKey, go as getCustomTokenInfoQueryKey, gs as TransactionModalContent, gt as ChooseNameSummaryContent, h as GasFeeTokenSelector, ha as useTransactionToast, hc as GasTokenEstimate, hn as getHasV1SmartAccount, ho as useGetErc20Balance, hr as useMultipleClausesCall, hs as TransactionToast, ht as FAQContent, i as ModalProvider, ia as ExploreEcosystemModalProvider, ic as LegalDocumentSource, in as getUpgradeRequiredQueryKey, io as getIsPersonQueryKey, ir as useEvents, is as useClaimVeWorldSubdomain, it as ManageCustomTokenContentProps, j as ModalBackButton, ja as MAX_IMAGE_SIZE, jc as NFTMediaType, ji as AppHubApp, jn as useAccountBalance, jo as useTokenPrices, jr as executeCallClause, js as EcosystemButton, jt as usePrivy, k as VersionFooter, ka as useIpfsMetadatas, kc as ExecuteBatchWithAuthorizationSignData, kn as getAccountBalance, ko as useTokensWithValues, kr as ViewFunctionResult, ks as LoginWithGoogleButton, kt as useDAppKitWalletModal, l as LegalDocumentsModalContentsTypes, la as useSendTokenModal, lc as EstimationResponse, ln as useSmartAccount, lo as SupportedToken, lr as useCurrentCurrency, ls as fetchPrivyStatus, lt as ProfileContent, m as InlineFeedback, ma as TransactionToastProvider, mc as formatGasCost, mn as useIsSmartAccountDeployed, mo as getErc20BalanceQueryKey, mr as useCallClause, ms as AccountMainContent, mt as CustomizationContent, n as getConfig, na as NotificationsModalProvider, nc as EnrichedLegalDocument, nn as useUpgradeRequiredForAccount, no as XApp, nr as decodeEventLog, ns as buildVetDomainClauses, nt as BridgeContent, o as DAppKitWalletButton, oa as SwapTokenModalProvider, oc as CostLevel, on as SmartAccountReturnType, oo as getVot3BalanceQueryKey, or as useIsPWA, os as useEnsRecordExists, ot as AssetsContentProps, p as WalletSwitchFeedback, pa as useWalletModal, pc as calculateTotalCost, pn as getIsDeployedQueryKey, po as UseGetErc20BalanceOptions, pr as getCallClauseQueryKeyWithArgs, ps as useFetchAppInfo, pt as AccountCustomizationContentProps, q as DisconnectConfirmContent, qa as useWalletStorage, qi as UpgradeSmartAccountModalProvider, qn as useSyncableLocalStorage, qo as getAvatarQueryKey, qs as PrivyWalletProviderContextType, qt as getEventLogs, r as AccountModalOptions, ra as useNotificationsModal, rc as LegalDocumentAgreement, rn as getUpgradeRequired, ro as useMostVotedAppsInRound, rr as getEventsKey, rs as useClaimVetDomain, rt as ManageCustomTokenContent, s as LegalDocumentItem, sa as useSwapTokenModal, sc as DepositAccount, sn as getSmartAccount, so as useGetVot3Balance, sr as useGetNodeUrl, ss as getVechainDomainQueryKey, st as UpgradeSmartAccountContent, t as AppConfig, ta as useFAQModal, tc as useVeChainKitConfig, tn as getUpgradeRequiredForAccountQueryKey, to as MostVotedAppsInRoundReturnType, tr as UseEventsParams, ts as useIsDomainProtected, tt as ChangeCurrencyContentProps, u as UpgradeSmartAccountModal, ua as ChooseNameModalProvider, uc as Rate, un as useRefreshSmartAccountQueries, uo as getTokenUsdPrice, ur as useCurrentLanguage, us as useFetchPrivyStatus, ut as ProfileContentProps, v as TransactionButtonAndStatus, va as AccountModalProvider, vc as GasTokenSelection, vn as getAccountVersionQueryKey, vo as useGetCustomTokenInfo, vs as TransactionModal, vt as ChooseNameSearchContent, w as AssetButton, wa as useSingleImageUpload, wc as CURRENCY_SYMBOLS, wn as getCurrentAccountImplementationVersionQueryKey, wo as useCustomTokens, ws as ConnectPopover, wt as SelectTokenContent, x as ScrollToTopWrapper, xa as useConnectModal, xc as ENS_TEXT_RECORDS, xn as getAccountAddressQueryKey, xo as useGetCustomTokenBalances, xs as WalletButton, xt as ChooseNameContentProps, y as TransactionButtonAndStatusProps, ya as useAccountModal, yc as GasTokenType, yn as useGetAccountVersion, yo as TokenWithBalance, ys as TransactionModalProps, yt as ChooseNameSearchContentProps, z as ActionButton, za as getXAppsSharesQueryKey, zc as Wallet, zi as useSignMessage, zn as estimateAndBuildTxBody, zo as useGetAvatarOfAddress, zs as ConnectModal, zt as buildVETClauses } from "./index-w0Yyp3-t.mjs";
|
|
1
|
+
import { C as TwitterLogo, S as VechainLogo, T as GoogleLogo, _ as VechainIcon, a as VeWorldLogoDark, b as VechainLogoLight, c as VETLogo, d as VeBetterIcon, f as VeBetterLogoDark, g as VechainIconLight, h as VechainIconDark, i as PrivyLogo, l as VeBetterIconDark, m as VeBetterLogo, n as BetterSwapLogo, o as VeWorldLogoLight, p as VeBetterLogoLight, r as VechainEnergy, s as VTHOLogo, t as VeTradeLogo, u as VeBetterIconLight, v as VechainLogoHorizontalLight, w as GitHubLogo, x as VechainLogoDark, y as VechainLogoHorizontalDark } from "./index--hSO7Xv4.mjs";
|
|
2
|
+
import { $ as LanguageSettingsContent, $a as useRefreshMetadata, $i as useAccountCustomizationModal, $n as useBuildClauses, $o as useGetDomainsOfAddress, $s as VeChainKitProvider, $t as useUpgradeSmartAccount, A as AddressDisplay, Aa as IpfsImage, Ac as ExecuteWithAuthorizationSignData, An as getAccountBalanceQueryKey, Ao as ExchangeRates, Ar as buildCallClauses, As as PrivyButton, At as useMfaEnrollment, B as AccountDetailsButton, Ba as useXAppsShares, Bi as useNotificationAlerts, Bn as estimateGas, Bo as getResolverAddressQueryKey, Bs as ConnectModalContentsTypes, Bt as useTransferVET, C as AddressDisplayCard, Ca as useSwapTransaction, Cc as CURRENCY, Cn as getCurrentAccountImplementationVersion, Co as useGetB3trBalance, Cs as WalletDisplayVariant, Ct as ReceiveTokenContent, D as StickyHeaderContainer, Da as imageCompressionOptions, Dc as ENSRecords, Dn as getAccountImplementationAddressQueryKey, Do as useTotalBalance, Dr as MultipleClausesCallParameters, Ds as DappKitButton, Dt as ThorClient, E as StickyFooterContainer, Ea as compressImages, Ec as CrossAppConnectionCache, En as getAccountImplementationAddress, Eo as useCurrentAllocationsRoundId, Es as VeChainWithPrivyLoginButton, Et as SendTokenContent, F as FeatureAnnouncementCard, Fa as useIpfsImageList, Fc as TokenBalance, Fi as useLoginWithVeChain, Fn as useGenericDelegatorFeeEstimationParams, Fo as getAvatarLegacy, Fs as EcosystemContent, Ft as txReceiptQueryKey, G as RemoveWalletConfirmContentProps, Ga as useSwitchWallet, Gi as ProfileModalProvider, Gn as EcosystemShortcut, Go as getTextRecordsQueryKey, Gs as useVechainKitThemeConfig, Gt as GetEventsProps, H as AccountModalContentTypes, Ha as getXAppMetadata, Hi as SettingsModalProvider, Hn as signVip191Transaction, Ho as buildClauses, Hs as useLegalDocuments, Ht as useTransferERC20, I as QuickActionsSection, Ia as getIpfsMetadata, Ic as TransactionStatus, Ii as useLoginWithOAuth, In as useGasTokenSelection, Io as getAvatarLegacyQueryKey, Is as ErrorContent, It as useTxReceipt, J as DisconnectConfirmContentProps, Ja as useWalletMetadata, Ji as useUpgradeSmartAccountModal, Jn as LocalStorageKey, Jo as useGetAvatar, Js as usePrivyWalletProvider, Jt as getChainId, K as SelectWalletContent, Ka as StoredWallet, Ki as useProfileModal, Kn as useEcosystemShortcuts, Ko as useGetTextRecords, Ks as PrivyWalletProvider, Kt as getAllEventLogs, L as BalanceSection, La as getIpfsMetadataQueryKey, Lc as TransactionStatusErrorType, Li as useLoginWithPasskey, Ln as decodeRawTx, Lo as useGetAvatarLegacy, Ls as LoadingContent, Lt as BuildTransactionProps, M as CrossAppConnectionSecurityCard, Ma as getIpfsImage, Mc as PrivyAppInfo, Mi as fetchAppHubApps, Mn as UseEstimateAllTokensParams, Mo as WalletTokenBalance, Mr as executeMultipleClausesCall, Ms as VeChainLoginButton, Mt as useSetWalletRecovery, N as DomainRequiredAlert, Na as getIpfsImageQueryKey, Nc as PrivyLoginMethod, Ni as getAppHubAppsQueryKey, Nn as useEstimateAllTokens, No as useTokenBalances, Ns as EmailLoginButton, Nt as useThor, O as useStickyHeaderContext, Oa as useUploadImages, Oc as EnhancedClause, On as useAccountImplementationAddress, Oo as TokenWithValue, Or as MultipleClausesCallReturnType, Os as PasskeyLoginButton, Ot as useDAppKitWallet, P as ExchangeWarningAlert, Pa as useIpfsImage, Pc as SmartAccount, Pi as useAppHubApps, Pn as useGenericDelegatorFeeEstimation, Po as useUnsetDomain, Ps as ConnectionButton, Pt as useGasEstimate, Q as GasTokenSettingsContent, Qa as useRoundXApps, Qi as AccountCustomizationModalProvider, Qn as buildSingleAuthorizationTypedData, Qo as getDomainsOfAddressQueryKey, Qs as VeChainKitContext, Qt as useCurrentBlock, R as AccountSelector, Ra as useIpfsMetadata, Rc as VePassportUserStatus, Ri as useSignTypedData, Rn as delegateAuthorized, Ro as getAvatarOfAddressQueryKey, Rs as MainContent, Rt as useBuildTransaction, S as ModalFAQButton, Sa as useSwapQuotes, Sc as TextRecords, Sn as useGetAccountAddress, So as getB3trBalanceQueryKey, Ss as WalletButtonProps, St as SwapTokenContent, T as BaseModal, Ta as UploadedImage, Tc as ConnectionSource, Tn as useCurrentAccountImplementationVersion, To as getCurrentAllocationsRoundIdQueryKey, Ts as LoginWithGithubButton, Tt as SendTokenSummaryContent, U as SwitchFeedback, Ua as useXAppMetadata, Ui as useSettingsModal, Un as useGenericDelegator, Uo as useUpdateTextRecord, Us as ColorModeSync, Ut as UseSendTransactionReturnValue, V as AccountModal, Va as XAppMetadata, Vi as useNotifications, Vn as getDepositAccount, Vo as useGetResolverAddress, Vs as LegalDocumentsProvider, Vt as buildERC20Clauses, W as RemoveWalletConfirmContent, Wa as UseSwitchWalletReturnType, Wi as useAccountModalOptions, Wn as useCrossAppConnectionCache, Wo as getTextRecords, Ws as VechainKitThemeProvider, Wt as useSendTransaction, X as SettingsContent, Xa as useWallet, Xi as ReceiveModalProvider, Xn as BuildClausesParams, Xo as DomainsResponse, Xs as LegalDocumentOptions, Xt as useGetChainId, Y as TermsAndPrivacyContent, Ya as UseWalletReturnType, Yi as useLoginModalContent, Yn as useLocalStorage, Yo as Domain, Ys as LegalDocument, Yt as getChainIdQueryKey, Z as SettingsContentProps, Za as getRoundXAppsQueryKey, Zi as useReceiveModal, Zn as buildBatchAuthorizationTypedData, Zo as getDomainsOfAddress, Zs as VeChainKitConfig, Zt as currentBlockQueryKey, _ as ModalNotificationButton, _a as useTransactionModal, _c as GasTokenPreferences, _n as useHasV1SmartAccount, _o as getTokenInfo, _s as ShareButtons, _t as ChooseNameSummaryContentProps, a as useModal, aa as useExploreEcosystemModal, ac as LegalDocumentType, an as useUpgradeRequired, ao as useIsPerson, ar as useScrollToTop, as as getEnsRecordExistsQueryKey, at as AssetsContent, b as AccountAvatar, ba as ConnectModalProvider, bc as TransactionSpeed, bn as getAccountAddress, bo as getCustomTokenBalanceQueryKey, bs as SocialIcons, bt as ChooseNameContent, c as LegalDocumentsModal, ca as SendTokenModalProvider, cc as EstimatedGas, cn as getSmartAccountQueryKey, co as PRICE_FEED_IDS, cr as useFeatureAnnouncement, cs as useVechainDomain, ct as UpgradeSmartAccountContentProps, d as UpgradeSmartAccountModalContentsTypes, da as useChooseNameModal, dc as TransactionCost, dn as useRefreshFactoryQueries, do as getTokenUsdPriceQueryKey, dr as useCurrency, ds as fetchPrivyAppInfo, dt as CustomizationSummaryContent, ea as FAQModalProvider, ec as VechainKitProviderProps, en as getUpgradeRequiredForAccount, eo as useRefreshBalances, er as GetEventsKeyParams, es as getIsDomainProtectedQueryKey, et as ChangeCurrencyContent, f as UpgradeSmartAccountModalStyle, fa as WalletModalProvider, fc as VthoPerGasAtSpeed, fn as getIsDeployed, fo as useGetTokenUsdPrice, fr as getCallClauseQueryKey, fs as getPrivyAppInfoQueryKey, ft as CustomizationSummaryContentProps, g as GasFeeSummary, ga as TransactionModalProvider, gc as GasTokenInfo, gn as getHasV1SmartAccountQueryKey, go as getCustomTokenInfoQueryKey, gs as TransactionModalContent, gt as ChooseNameSummaryContent, h as GasFeeTokenSelector, ha as useTransactionToast, hc as GasTokenEstimate, hn as getHasV1SmartAccount, ho as useGetErc20Balance, hr as useMultipleClausesCall, hs as TransactionToast, ht as FAQContent, i as ModalProvider, ia as ExploreEcosystemModalProvider, ic as LegalDocumentSource, in as getUpgradeRequiredQueryKey, io as getIsPersonQueryKey, ir as useEvents, is as useClaimVeWorldSubdomain, it as ManageCustomTokenContentProps, j as ModalBackButton, ja as MAX_IMAGE_SIZE, jc as NFTMediaType, ji as AppHubApp, jn as useAccountBalance, jo as useTokenPrices, jr as executeCallClause, js as EcosystemButton, jt as usePrivy, k as VersionFooter, ka as useIpfsMetadatas, kc as ExecuteBatchWithAuthorizationSignData, kn as getAccountBalance, ko as useTokensWithValues, kr as ViewFunctionResult, ks as LoginWithGoogleButton, kt as useDAppKitWalletModal, l as LegalDocumentsModalContentsTypes, la as useSendTokenModal, lc as EstimationResponse, ln as useSmartAccount, lo as SupportedToken, lr as useCurrentCurrency, ls as fetchPrivyStatus, lt as ProfileContent, m as InlineFeedback, ma as TransactionToastProvider, mc as formatGasCost, mn as useIsSmartAccountDeployed, mo as getErc20BalanceQueryKey, mr as useCallClause, ms as AccountMainContent, mt as CustomizationContent, n as getConfig, na as NotificationsModalProvider, nc as EnrichedLegalDocument, nn as useUpgradeRequiredForAccount, no as XApp, nr as decodeEventLog, ns as buildVetDomainClauses, nt as BridgeContent, o as DAppKitWalletButton, oa as SwapTokenModalProvider, oc as CostLevel, on as SmartAccountReturnType, oo as getVot3BalanceQueryKey, or as useIsPWA, os as useEnsRecordExists, ot as AssetsContentProps, p as WalletSwitchFeedback, pa as useWalletModal, pc as calculateTotalCost, pn as getIsDeployedQueryKey, po as UseGetErc20BalanceOptions, pr as getCallClauseQueryKeyWithArgs, ps as useFetchAppInfo, pt as AccountCustomizationContentProps, q as DisconnectConfirmContent, qa as useWalletStorage, qi as UpgradeSmartAccountModalProvider, qn as useSyncableLocalStorage, qo as getAvatarQueryKey, qs as PrivyWalletProviderContextType, qt as getEventLogs, r as AccountModalOptions, ra as useNotificationsModal, rc as LegalDocumentAgreement, rn as getUpgradeRequired, ro as useMostVotedAppsInRound, rr as getEventsKey, rs as useClaimVetDomain, rt as ManageCustomTokenContent, s as LegalDocumentItem, sa as useSwapTokenModal, sc as DepositAccount, sn as getSmartAccount, so as useGetVot3Balance, sr as useGetNodeUrl, ss as getVechainDomainQueryKey, st as UpgradeSmartAccountContent, t as AppConfig, ta as useFAQModal, tc as useVeChainKitConfig, tn as getUpgradeRequiredForAccountQueryKey, to as MostVotedAppsInRoundReturnType, tr as UseEventsParams, ts as useIsDomainProtected, tt as ChangeCurrencyContentProps, u as UpgradeSmartAccountModal, ua as ChooseNameModalProvider, uc as Rate, un as useRefreshSmartAccountQueries, uo as getTokenUsdPrice, ur as useCurrentLanguage, us as useFetchPrivyStatus, ut as ProfileContentProps, v as TransactionButtonAndStatus, va as AccountModalProvider, vc as GasTokenSelection, vn as getAccountVersionQueryKey, vo as useGetCustomTokenInfo, vs as TransactionModal, vt as ChooseNameSearchContent, w as AssetButton, wa as useSingleImageUpload, wc as CURRENCY_SYMBOLS, wn as getCurrentAccountImplementationVersionQueryKey, wo as useCustomTokens, ws as ConnectPopover, wt as SelectTokenContent, x as ScrollToTopWrapper, xa as useConnectModal, xc as ENS_TEXT_RECORDS, xn as getAccountAddressQueryKey, xo as useGetCustomTokenBalances, xs as WalletButton, xt as ChooseNameContentProps, y as TransactionButtonAndStatusProps, ya as useAccountModal, yc as GasTokenType, yn as useGetAccountVersion, yo as TokenWithBalance, ys as TransactionModalProps, yt as ChooseNameSearchContentProps, z as ActionButton, za as getXAppsSharesQueryKey, zc as Wallet, zi as useSignMessage, zn as estimateAndBuildTxBody, zo as useGetAvatarOfAddress, zs as ConnectModal, zt as buildVETClauses } from "./index-3EuDo9II.mjs";
|
|
3
3
|
export { AccountAvatar, AccountCustomizationContentProps, AccountCustomizationModalProvider, AccountDetailsButton, AccountMainContent, AccountModal, AccountModalContentTypes, AccountModalOptions, AccountModalProvider, AccountSelector, ActionButton, AddressDisplay, AddressDisplayCard, AppConfig, AppHubApp, AssetButton, AssetsContent, AssetsContentProps, BalanceSection, BaseModal, BetterSwapLogo, BridgeContent, BuildClausesParams, BuildTransactionProps, CURRENCY, CURRENCY_SYMBOLS, ChangeCurrencyContent, ChangeCurrencyContentProps, ChooseNameContent, ChooseNameContentProps, ChooseNameModalProvider, ChooseNameSearchContent, ChooseNameSearchContentProps, ChooseNameSummaryContent, ChooseNameSummaryContentProps, ColorModeSync, ConnectModal, ConnectModalContentsTypes, ConnectModalProvider, ConnectPopover, ConnectionButton, ConnectionSource, CostLevel, CrossAppConnectionCache, CrossAppConnectionSecurityCard, CustomizationContent, CustomizationSummaryContent, CustomizationSummaryContentProps, DAppKitWalletButton, DappKitButton, DepositAccount, DisconnectConfirmContent, DisconnectConfirmContentProps, Domain, DomainRequiredAlert, DomainsResponse, ENSRecords, ENS_TEXT_RECORDS, EcosystemButton, EcosystemContent, EcosystemShortcut, EmailLoginButton, EnhancedClause, EnrichedLegalDocument, ErrorContent, EstimatedGas, EstimationResponse, ExchangeRates, ExchangeWarningAlert, ExecuteBatchWithAuthorizationSignData, ExecuteWithAuthorizationSignData, ExploreEcosystemModalProvider, FAQContent, FAQModalProvider, FeatureAnnouncementCard, GasFeeSummary, GasFeeTokenSelector, GasTokenEstimate, GasTokenInfo, GasTokenPreferences, GasTokenSelection, GasTokenSettingsContent, GasTokenType, GetEventsKeyParams, GetEventsProps, GitHubLogo, GoogleLogo, InlineFeedback, IpfsImage, LanguageSettingsContent, LegalDocument, LegalDocumentAgreement, LegalDocumentItem, LegalDocumentOptions, LegalDocumentSource, LegalDocumentType, LegalDocumentsModal, LegalDocumentsModalContentsTypes, LegalDocumentsProvider, LoadingContent, LocalStorageKey, LoginWithGithubButton, LoginWithGoogleButton, MAX_IMAGE_SIZE, MainContent, ManageCustomTokenContent, ManageCustomTokenContentProps, ModalBackButton, ModalFAQButton, ModalNotificationButton, ModalProvider, MostVotedAppsInRoundReturnType, MultipleClausesCallParameters, MultipleClausesCallReturnType, NFTMediaType, NotificationsModalProvider, PRICE_FEED_IDS, PasskeyLoginButton, PrivyAppInfo, PrivyButton, PrivyLoginMethod, PrivyLogo, PrivyWalletProvider, PrivyWalletProviderContextType, ProfileContent, ProfileContentProps, ProfileModalProvider, QuickActionsSection, Rate, ReceiveModalProvider, ReceiveTokenContent, RemoveWalletConfirmContent, RemoveWalletConfirmContentProps, ScrollToTopWrapper, SelectTokenContent, SelectWalletContent, SendTokenContent, SendTokenModalProvider, SendTokenSummaryContent, SettingsContent, SettingsContentProps, SettingsModalProvider, ShareButtons, SmartAccount, SmartAccountReturnType, SocialIcons, StickyFooterContainer, StickyHeaderContainer, StoredWallet, SupportedToken, SwapTokenContent, SwapTokenModalProvider, SwitchFeedback, TermsAndPrivacyContent, TextRecords, ThorClient, TokenBalance, TokenWithBalance, TokenWithValue, TransactionButtonAndStatus, TransactionButtonAndStatusProps, TransactionCost, TransactionModal, TransactionModalContent, TransactionModalProps, TransactionModalProvider, TransactionSpeed, TransactionStatus, TransactionStatusErrorType, TransactionToast, TransactionToastProvider, TwitterLogo, UpgradeSmartAccountContent, UpgradeSmartAccountContentProps, UpgradeSmartAccountModal, UpgradeSmartAccountModalContentsTypes, UpgradeSmartAccountModalProvider, UpgradeSmartAccountModalStyle, UploadedImage, UseEstimateAllTokensParams, UseEventsParams, UseGetErc20BalanceOptions, UseSendTransactionReturnValue, UseSwitchWalletReturnType, UseWalletReturnType, VETLogo, VTHOLogo, VeBetterIcon, VeBetterIconDark, VeBetterIconLight, VeBetterLogo, VeBetterLogoDark, VeBetterLogoLight, VeChainKitConfig, VeChainKitContext, VeChainKitProvider, VeChainLoginButton, VeChainWithPrivyLoginButton, VePassportUserStatus, VeTradeLogo, VeWorldLogoDark, VeWorldLogoLight, VechainEnergy, VechainIcon, VechainIconDark, VechainIconLight, VechainKitProviderProps, VechainKitThemeProvider, VechainLogo, VechainLogoDark, VechainLogoHorizontalDark, VechainLogoHorizontalLight, VechainLogoLight, VersionFooter, ViewFunctionResult, VthoPerGasAtSpeed, Wallet, WalletButton, WalletButtonProps, WalletDisplayVariant, WalletModalProvider, WalletSwitchFeedback, WalletTokenBalance, XApp, XAppMetadata, buildBatchAuthorizationTypedData, buildCallClauses, buildClauses, buildERC20Clauses, buildSingleAuthorizationTypedData, buildVETClauses, buildVetDomainClauses, calculateTotalCost, compressImages, currentBlockQueryKey, decodeEventLog, decodeRawTx, delegateAuthorized, estimateAndBuildTxBody, estimateGas, executeCallClause, executeMultipleClausesCall, fetchAppHubApps, fetchPrivyAppInfo, fetchPrivyStatus, formatGasCost, getAccountAddress, getAccountAddressQueryKey, getAccountBalance, getAccountBalanceQueryKey, getAccountImplementationAddress, getAccountImplementationAddressQueryKey, getAccountVersionQueryKey, getAllEventLogs, getAppHubAppsQueryKey, getAvatarLegacy, getAvatarLegacyQueryKey, getAvatarOfAddressQueryKey, getAvatarQueryKey, getB3trBalanceQueryKey, getCallClauseQueryKey, getCallClauseQueryKeyWithArgs, getChainId, getChainIdQueryKey, getConfig, getCurrentAccountImplementationVersion, getCurrentAccountImplementationVersionQueryKey, getCurrentAllocationsRoundIdQueryKey, getCustomTokenBalanceQueryKey, getCustomTokenInfoQueryKey, getDepositAccount, getDomainsOfAddress, getDomainsOfAddressQueryKey, getEnsRecordExistsQueryKey, getErc20BalanceQueryKey, getEventLogs, getEventsKey, getHasV1SmartAccount, getHasV1SmartAccountQueryKey, getIpfsImage, getIpfsImageQueryKey, getIpfsMetadata, getIpfsMetadataQueryKey, getIsDeployed, getIsDeployedQueryKey, getIsDomainProtectedQueryKey, getIsPersonQueryKey, getPrivyAppInfoQueryKey, getResolverAddressQueryKey, getRoundXAppsQueryKey, getSmartAccount, getSmartAccountQueryKey, getTextRecords, getTextRecordsQueryKey, getTokenInfo, getTokenUsdPrice, getTokenUsdPriceQueryKey, getUpgradeRequired, getUpgradeRequiredForAccount, getUpgradeRequiredForAccountQueryKey, getUpgradeRequiredQueryKey, getVechainDomainQueryKey, getVot3BalanceQueryKey, getXAppMetadata, getXAppsSharesQueryKey, imageCompressionOptions, signVip191Transaction, txReceiptQueryKey, useAccountBalance, useAccountCustomizationModal, useAccountImplementationAddress, useAccountModal, useAccountModalOptions, useAppHubApps, useBuildClauses, useBuildTransaction, useCallClause, useChooseNameModal, useClaimVeWorldSubdomain, useClaimVetDomain, useConnectModal, useCrossAppConnectionCache, useCurrency, useCurrentAccountImplementationVersion, useCurrentAllocationsRoundId, useCurrentBlock, useCurrentCurrency, useCurrentLanguage, useCustomTokens, useDAppKitWallet, useDAppKitWalletModal, useEcosystemShortcuts, useEnsRecordExists, useEstimateAllTokens, useEvents, useExploreEcosystemModal, useFAQModal, useFeatureAnnouncement, useFetchAppInfo, useFetchPrivyStatus, useGasEstimate, useGasTokenSelection, useGenericDelegator, useGenericDelegatorFeeEstimation, useGenericDelegatorFeeEstimationParams, useGetAccountAddress, useGetAccountVersion, useGetAvatar, useGetAvatarLegacy, useGetAvatarOfAddress, useGetB3trBalance, useGetChainId, useGetCustomTokenBalances, useGetCustomTokenInfo, useGetDomainsOfAddress, useGetErc20Balance, useGetNodeUrl, useGetResolverAddress, useGetTextRecords, useGetTokenUsdPrice, useGetVot3Balance, useHasV1SmartAccount, useIpfsImage, useIpfsImageList, useIpfsMetadata, useIpfsMetadatas, useIsDomainProtected, useIsPWA, useIsPerson, useIsSmartAccountDeployed, useLegalDocuments, useLocalStorage, useLoginModalContent, useLoginWithOAuth, useLoginWithPasskey, useLoginWithVeChain, useMfaEnrollment, useModal, useMostVotedAppsInRound, useMultipleClausesCall, useNotificationAlerts, useNotifications, useNotificationsModal, usePrivy, usePrivyWalletProvider, useProfileModal, useReceiveModal, useRefreshBalances, useRefreshFactoryQueries, useRefreshMetadata, useRefreshSmartAccountQueries, useRoundXApps, useScrollToTop, useSendTokenModal, useSendTransaction, useSetWalletRecovery, useSettingsModal, useSignMessage, useSignTypedData, useSingleImageUpload, useSmartAccount, useStickyHeaderContext, useSwapQuotes, useSwapTokenModal, useSwapTransaction, useSwitchWallet, useSyncableLocalStorage, useThor, useTokenBalances, useTokenPrices, useTokensWithValues, useTotalBalance, useTransactionModal, useTransactionToast, useTransferERC20, useTransferVET, useTxReceipt, useUnsetDomain, useUpdateTextRecord, useUpgradeRequired, useUpgradeRequiredForAccount, useUpgradeSmartAccount, useUpgradeSmartAccountModal, useUploadImages, useVeChainKitConfig, useVechainDomain, useVechainKitThemeConfig, useWallet, useWalletMetadata, useWalletModal, useWalletStorage, useXAppMetadata, useXAppsShares };
|
package/dist/index.mjs
CHANGED
|
@@ -118,7 +118,7 @@ import{$ as e,C as t,D as n,G as r,H as i,J as a,Q as o,S as s,T as c,U as l,V a
|
|
|
118
118
|
opacity: 0.5 !important;
|
|
119
119
|
}
|
|
120
120
|
`),d.length>0&&(u.textContent=d.join(`
|
|
121
|
-
`))}let To=null;function Eo(){return To||=new nr({defaultOptions:{queries:{queryKeyHashFn:cr,retry:0,staleTime:3e4,refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,refetchInterval:!1,refetchIntervalInBackground:!1}}}),To}const Do=({children:e})=>{try{if(H.useContext(rr))return J(q,{children:e})}catch(e){console.log(e)}return J(ir,{client:Eo(),children:e})},Oo=({onClick:e,...t})=>J(Dt,{"aria-label":`Back`,icon:J(P,{as:wr,fontSize:`20px`}),size:`sm`,variant:`vechainKitHeaderIconButtons`,position:`absolute`,left:`10px`,top:`8px`,onClick:e,lineHeight:`0`,...t}),ko=({wallet:e,label:t,style:n,showHumanAddress:r=!0,setCurrentContent:i,onLogout:a})=>{let{t:o}=X(),[s,c]=K(!1),[l,u]=K(!1),f=V(`colors`,`vechain-kit-text-primary`),p=V(`colors`,`vechain-kit-text-secondary`),m=dn(`#ebebeb`,`#ffffff0a`),h=dn(`#ffffff`,`transparent`),g=async(e,t)=>{await k(e)&&(t(!0),setTimeout(()=>{t(!1)},2e3))},_=()=>{i&&(e?.domain?i({type:`choose-name-search`,props:{name:``,setCurrentContent:i,initialContentSource:`profile`}}):i({type:`choose-name`,props:{setCurrentContent:i,initialContentSource:`profile`,onBack:()=>i(`profile`)}}))};return J(B,{w:`full`,justifyContent:`center`,...n,children:Y(B,{w:`full`,spacing:4,children:[t&&J(z,{fontSize:`sm`,color:p,children:t}),Y(B,{spacing:2,w:`full`,children:[e?.domain&&Y(N,{w:`full`,spacing:3,px:4,py:2,borderWidth:1,borderColor:m,borderRadius:`md`,bg:h,children:[J(P,{as:ri,color:p}),J(z,{flex:1,fontSize:`sm`,fontWeight:`700`,color:f,noOfLines:1,children:l?o(`Copied!`):e.domain}),Y(N,{spacing:2,children:[i&&J(Dt,{icon:J(Jr,{}),height:`30px`,borderRadius:`5px`,variant:`vechainKitSecondary`,onClick:_,"aria-label":`Edit domain`}),J(Dt,{icon:J(l?Sr:jr,{}),height:`30px`,borderRadius:`5px`,variant:`vechainKitSecondary`,onClick:()=>g(e.domain||``,u),"aria-label":`Copy domain`})]})]}),Y(N,{w:`full`,spacing:3,px:4,py:2,borderWidth:1,borderColor:m,borderRadius:`md`,bg:h,children:[J(P,{as:si,color:p}),J(z,{flex:1,fontSize:`sm`,fontWeight:`700`,color:f,noOfLines:1,children:s?o(`Copied!`):r?d(e?.address??``,8,7):e?.address}),Y(N,{spacing:2,children:[J(Dt,{icon:J(Gr,{}),onClick:()=>i?.({type:`disconnect-confirm`,props:{onDisconnect:()=>a?.(),onBack:()=>i?.(`profile`)}}),variant:`vechainKitSecondary`,height:`30px`,w:`30px`,borderRadius:`5px`,"aria-label":`Copy address`}),J(Dt,{icon:J(s?Sr:jr,{}),onClick:()=>g(e?.address??``,c),variant:`vechainKitSecondary`,height:`30px`,w:`30px`,borderRadius:`5px`,"aria-label":`Copy address`})]})]})]})]})})};var Ao=`2.6.2`,jo={"@adraffy/ens-normalize":`^1.11.0`,"@chakra-ui/react":`^2.8.2`,"@emotion/styled":`^11.14.1`,"@privy-io/cross-app-connect":`0.2.2`,"@privy-io/react-auth":`2.25.0`,"@solana/web3.js":`^1.98.0`,"@tanstack/react-query":`^5.64.2`,"@tanstack/react-query-devtools":`^5.64.1`,"@vechain/contract-getters":`1.1.0`,"@vechain/dapp-kit-react":`2.1.0-rc.5`,"@vechain/picasso":`^2.1.1`,"@vechain/vechain-contract-types":`1.6.0-rc`,"@wagmi/core":`^2.17.2`,"bignumber.js":`^9.1.2`,"browser-image-compression":`^2.0.2`,dotenv:`^16.4.7`,ethers:`^6.13.5`,"framer-motion":`^11.15.0`,i18next:`^24.2.1`,"i18next-browser-languagedetector":`^8.0.2`,net:`^1.0.2`,process:`^0.11.10`,react:`^18.2.0`,"react-device-detect":`^2.2.3`,"react-hook-form":`^7.54.2`,"react-i18next":`^15.4.0`,"react-icons":`^5.4.0`,"react-qrcode-logo":`^3.0.0`,vaul:`^1.1.2`,viem:`^2.29.3`,wagmi:`^2.15.4`},Mo={"@chakra-ui/react":`^2.8.2`,"@emotion/react":`^11.0.0`,"@emotion/styled":`^11.0.0`,"@tanstack/react-query":`^5.64.2`,"@vechain/dapp-kit-react":`2.1.0-rc.5`,"framer-motion":`^11.0.0`,react:`^18.0.0`,"react-dom":`^18.0.0`};const No=({...e})=>{let{darkMode:t}=$();return Y(N,{w:`full`,justifyContent:`center`,alignItems:`center`,spacing:0,...e,children:[J(be,{isDark:t,w:`70px`,h:`auto`,opacity:.4,mr:1,ml:`-16px`}),Y(Nt,{fontSize:`11px`,fontWeight:`500`,opacity:.4,textAlign:`left`,href:`https://github.com/vechain/vechain-kit/releases/tag/${Ao}`,isExternal:!0,pt:`1px`,children:[`v`,Ao]})]})},Po=gn({hasContentBelow:!1}),Fo=()=>_n(Po),Z=({children:e})=>{let[t,n]=K(!1),r=vn(null),i=vn(null),a=vn(null),o=vn(!0),{tokens:s}=Yd(),c=s?.effects?.backdropFilter?.stickyHeader??`blur(20px)`;return W(()=>{let e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){let e=window.getComputedStyle(t);if(e.overflowY===`auto`||e.overflowY===`scroll`||e.overflow===`auto`||e.overflow===`scroll`)return t;t=t.parentElement}return null},t=([e])=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{if(o.current){o.current=!1,n(!1);return}n(!e.isIntersecting)},50)},s=e(i.current),c={threshold:0};s&&(c.root=s,c.rootMargin=`0px`);let l=new IntersectionObserver(t,c),u=setTimeout(()=>{r.current&&l.observe(r.current)},200);return()=>{clearTimeout(u),a.current&&clearTimeout(a.current),l.disconnect()}},[]),Y(Po.Provider,{value:{hasContentBelow:t},children:[J(j,{ref:i,position:`sticky`,top:`0`,left:`0`,w:`full`,borderRadius:`24px 24px 0px 0px`,backdropFilter:t?c:`none`,style:{WebkitBackdropFilter:t?c:`none`},zIndex:1e3,boxShadow:t?`0px 2px 4px 1px rgb(0 0 0 / 10%)`:`none`,transition:`box-shadow 0.2s ease-in-out`,children:e}),J(`div`,{ref:r,style:{height:`1px`,width:`100%`,pointerEvents:`none`,visibility:`hidden`,marginTop:`-1px`}})]})},Io=({children:e})=>J(j,{position:`absolute`,bottom:`0`,left:`0`,right:`0`,bg:V(`colors`,`vechain-kit-modal`),zIndex:`1000`,p:4,w:`full`,children:e}),Lo=({scrollableContainerRef:e,observerRef:t})=>{let n=V(`colors`,`vechain-kit-border`),{tokens:r}=Yd(),i=r?.effects?.backdropFilter?.stickyHeader??`blur(20px)`,[a,o]=K(!1),s=vn(null),c=vn(!0);return W(()=>{let n=([e])=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{if(c.current){c.current=!1,o(!1);return}o(!e.isIntersecting)},50)},r={threshold:0};e.current&&(r.root=e.current,r.rootMargin=`0px`);let i=new IntersectionObserver(n,r),a=setTimeout(()=>{t.current&&i.observe(t.current)},200);return()=>{clearTimeout(a),s.current&&clearTimeout(s.current),i.disconnect()}},[e,t]),J(j,{position:`sticky`,top:`0`,w:`full`,backdropFilter:a?i:`none`,style:{WebkitBackdropFilter:a?i:`none`},zIndex:999,transition:`backdrop-filter 0.2s ease-in-out`,children:J(j,{mx:`auto`,w:`34px`,h:`5px`,bg:n,mt:4,rounded:`full`})})},Ro=({isOpen:e,onClose:t,children:n,ariaTitle:r,ariaDescription:i,isDismissable:a=!0,minHeight:o,maxHeight:s=`68vh`,closeThreshold:c=.5})=>{let l=V(`colors`,`vechain-kit-modal`),u=V(`colors`,`vechain-kit-overlay`),d=vn(null),f=vn(null),{tokens:p}=Yd(),m=p?.effects?.backdropFilter?.overlay,h=p?.colors?.border?.modal||`none`;return J(ui.Root,{dismissible:a,shouldScaleBackground:!0,repositionInputs:!1,open:e,closeThreshold:c,onOpenChange:e=>{e||t()},children:Y(ui.Portal,{children:[J(ui.Overlay,{style:{zIndex:100,position:`fixed`,top:0,right:0,bottom:0,left:0,backgroundColor:u,backdropFilter:m,WebkitBackdropFilter:m}}),Y(ui.Content,{"aria-description":i,style:{zIndex:101,backgroundColor:l,borderRadius:`24px 24px 0 0`,border:h,position:`fixed`,bottom:0,left:0,right:0,...o&&{minHeight:o},maxHeight:s,display:`flex`,flexDirection:`column`},children:[J(ui.Title,{style:{position:`absolute`,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:0},children:r}),Y(j,{ref:d,flex:`1`,overflowY:`auto`,children:[J(Lo,{scrollableContainerRef:d,observerRef:f}),J(`div`,{ref:f,style:{height:`1px`,width:`100%`,visibility:`hidden`,marginTop:`-1px`}}),n]})]})]})})},zo=({isOpen:e,onClose:t,children:n,size:r=`sm`,isCentered:i=!0,motionPreset:a=`slideInBottom`,closeOnOverlayClick:o=!0,blockScrollOnMount:s=!1,allowExternalFocus:c=!1,backdropFilter:l,isCloseable:u=!0,useBottomSheetOnMobile:d,mobileMinHeight:f,mobileMaxHeight:p=`57vh`,desktopMinHeight:m,desktopMaxHeight:h})=>{let[g]=pn(`(min-width: 768px)`),{portalRootRef:_,themeConfig:v,tokens:y}=Yd(),b=d??v?.modal?.useBottomSheetOnMobile??!1,x=V(`colors`,`vechain-kit-modal`),S=V(`colors`,`vechain-kit-overlay`),C=y?.effects?.backdropFilter?.overlay,w=y?.effects?.backdropFilter?.modal,T=l??C??`blur(3px)`,E=g?{minHeight:m,maxHeight:h}:{position:`fixed`,bottom:`0`,mb:`0`,maxW:`2xl`,borderRadius:`24px 24px 0px 0px !important`,overflowY:`auto`,overflowX:`hidden`,scrollBehavior:`smooth`,minHeight:f,maxHeight:p},D=Y(It,{motionPreset:a,isOpen:e,onClose:t,isCentered:i,size:r,returnFocusOnClose:!1,blockScrollOnMount:s,closeOnOverlayClick:o&&u,preserveScrollBarGap:!0,portalProps:{containerRef:_},trapFocus:!c,autoFocus:!c,variant:`vechainKitBase`,children:[J(Rt,{bg:S,backdropFilter:T}),J(Lt,{role:`dialog`,"aria-modal":!c,bg:x,sx:{backdropFilter:w,WebkitBackdropFilter:w},...E,children:n})]});return J(q,{children:!g&&b?J(It,{isOpen:e,onClose:t,size:r,blockScrollOnMount:!1,trapFocus:!1,children:J(Ro,{isOpen:e,onClose:t,ariaTitle:`Dialog`,ariaDescription:`Dialog content area`,isDismissable:u,minHeight:f,maxHeight:p,children:n})}):D})},Bo=async e=>{let t=new URL(`/api/v1/apps/${e}`,Be),n=await fetch(t,{headers:{"privy-app-id":e}});if(!n.ok)throw Error(`Failed to fetch Privy app info`);return n.json()},Vo=e=>[`VECHAIN_KIT_PRIVY_APP_INFO`,...Array.isArray(e)?e:[e]],Ho=e=>{let t=Array.isArray(e)?e:[e];return or({queryKey:Vo(e),queryFn:async()=>{let e=await Promise.all(t.map(e=>Bo(e)));return Object.fromEntries(e.map((e,n)=>{let r=t[n],i=f.find(e=>e.id===r);return[r,{...e,website:i?.website}]}))},enabled:t.length>0,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},Uo=async()=>{try{let e=new URL(`summary.json`,ze),t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch Privy status`);return(await t.json()).page.status??`No data`}catch(e){return console.error(`Error fetching data:`,e),`Error fetching data`}},Wo=()=>or({queryKey:[`PRIVY_STATUS`],queryFn:Uo,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60}),Go=e=>[`VECHAIN_KIT_DOMAIN`,e],Ko=e=>{let{network:t}=$();return or({queryKey:Go(e),queryFn:async()=>{if(!e)throw Error(`Address or domain is required`);if(t.type!==`main`&&t.type!==`test`){let t=D(e);return{address:t?e:void 0,domain:void 0,isValidAddressOrDomain:t,isPrimaryDomain:!1}}let n=await bi(e,{networkUrl:t.nodeUrl}),r=D(e);if(!n&&!r)throw Error(`Input must be a valid domain or address`);let i=null,a=null,o=!1;return n?(i=await mi(e,{networkUrl:t.nodeUrl}),a=e,i&&(o=await yi(e,i,{networkUrl:t.nodeUrl}))):(a=await di(e,{networkUrl:t.nodeUrl}),i=e,a&&(o=await yi(a,e,{networkUrl:t.nodeUrl}))),{address:i||void 0,domain:a||void 0,isValidAddressOrDomain:n||r,isPrimaryDomain:o}},enabled:!!e&&!!t.type,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`)||e===`address or domain is required`||e===`input must be a valid domain or address`)return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},qo=async(e,t,n)=>{let r=Ri(Mi([`0x571e15b4bbf879cf28e5075190137be8e18500e3d38543bf0cbcdb54e00b02cc`,Ri(Hi(n))])),i=await e.contracts.load(y(t).vetDomainsContractAddress,Ei.abi).read.recordExists(r);if(!i)throw Error(`Failed to get ENS record exists for ${n}`);return i[0]},Jo=e=>[`VECHAIN_KIT_ENS_RECORD_VE_WORLD_EXISTS`,e],Yo=e=>{let t=Qn(),{network:n}=$();return or({queryKey:Jo(e),queryFn:()=>qo(t,n.type,e),enabled:!!e,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},Xo=(e,t)=>{let n=sr(),{network:r}=$();return{refresh:async()=>{await Promise.all([n.invalidateQueries({queryKey:hs(e??``,r.type)}),n.invalidateQueries({queryKey:ys(e,r.type)}),n.invalidateQueries({queryKey:Os(t)})])}}},Zo=async(e,t,n,r,i,a)=>{await Promise.all([e.invalidateQueries({queryKey:Go(t)}),e.invalidateQueries({queryKey:Go(n)}),e.invalidateQueries({queryKey:Jo(r)}),e.invalidateQueries({queryKey:ps(t,`.vet`)}),e.invalidateQueries({queryKey:ps(t,`.veworld.vet`)}),e.invalidateQueries({queryKey:ys(n)})]),await Promise.all([e.refetchQueries({queryKey:Go(t)}),e.refetchQueries({queryKey:Go(n)}),e.refetchQueries({queryKey:ps(t,`.vet`)}),e.refetchQueries({queryKey:ps(t,`.veworld.vet`)}),e.refetchQueries({queryKey:hs(r+`.`+i,a)}),e.refetchQueries({queryKey:ys(n)}),e.refetchQueries({queryKey:Jo(r)}),e.refetchQueries({queryKey:Os(t)})])},Qo=Oi.createInterface(),$o=Di.createInterface(),es=(e,t,n,r,i)=>{let a=[];if(!e)throw Error(`Invalid subdomain`);let o=`${e}.${t}`;if(a.push({to:y(i.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:$o.encodeFunctionData(`setName`,[``]),comment:`Unsetting your current VeChain nickname of the account ${d(r?.address??``,4,4)}`,abi:$o.getFunction(`setName`)}),n){a.push({to:y(i.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:$o.encodeFunctionData(`setName`,[o]),comment:`Setting your VeChain nickname to ${o}`,abi:$o.getFunction(`setName`)});let e=new xn.Interface([`function setAddr(bytes32 node, address addr)`]),t=xn.namehash(o);a.push({to:y(i.type).vetDomainsPublicResolverAddress,value:`0x0`,data:e.encodeFunctionData(`setAddr`,[t,r?.address||``]),comment:`Setting the address for ${o} to ${d(r?.address??``,4,4)}`,abi:e.getFunction(`setAddr`)})}else if(ns(t))a.push({to:y(i.type).veWorldSubdomainClaimerContractAddress,value:`0x0`,data:Qo.encodeFunctionData(`claim`,[e,y(i.type).vetDomainsPublicResolverAddress]),comment:`Claim VeChain subdomain: ${e}.${t}`,abi:Qo.getFunction(`claim`)}),a.push({to:y(i.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:$o.encodeFunctionData(`setName`,[e+`.`+t]),comment:`Set ${e}.${t} as the VeChain nickname of the account ${d(r?.address??``,4,4)}`,abi:$o.getFunction(`setName`)});else throw Error(`This hook only supports .veworld.vet subdomains`);return a},ts=({subdomain:e,domain:t,onSuccess:n,onError:r,alreadyOwned:i=!1})=>{let a=sr(),{account:o}=Q(),{network:s}=$(),{refresh:c}=Xo(e+`.`+t,o?.address??``),l=U(()=>es(e,t,i,o,s),[e,t,i,o,s]),u=U(async()=>{let r=`${e}.${t}`;await Zo(a,o?.address??``,r,e,t,s.type),c(),n?.()},[n,e,t,a,o,s.type,c]),d=Xc({signerAccountAddress:o?.address??``,privyUIOptions:{title:`Sign to claim your VeChain nickname`,description:`Claim ${e}.${t} as your VeChain nickname`,buttonText:`Sign to continue`},onTxConfirmed:u,onTxFailedOrCancelled:()=>{r?.()}});return{...d,clauses:l,sendTransaction:async()=>d.sendTransaction(l())}},ns=e=>e.endsWith(`veworld.vet`),rs=Di.createInterface(),is=(e,t,n,r)=>{let i=[];if(!e)throw Error(`Invalid domain`);if(t){i.push({to:y(r.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:rs.encodeFunctionData(`setName`,[e]),comment:`Setting your VeChain nickname to ${e}`,abi:rs.getFunction(`setName`)});let t=new xn.Interface([`function setAddr(bytes32 node, address addr)`]),a=xn.namehash(e);i.push({to:y(r.type).vetDomainsPublicResolverAddress,value:`0x0`,data:t.encodeFunctionData(`setAddr`,[a,n?.address||``]),comment:`Setting the address for ${e} to ${d(n?.address??``,4,4)}`,abi:t.getFunction(`setAddr`)})}else throw Error(`Primary .vet domains are not supported yet`);return i},as=({domain:e,onSuccess:t,onError:n,alreadyOwned:r=!1})=>{let{network:i}=$(),a=sr(),{account:o}=Q(),{refresh:s}=Xo(e,o?.address??``),c=U(()=>is(e,r,o,i),[e,r,o,i]),l=U(async()=>{await Zo(a,o?.address??``,e,``,e.endsWith(`.vet`)?e:`${e}.vet`,i.type),s(),t?.()},[t,e,a,o,i.type,s]),u=Xc({signerAccountAddress:o?.address??``,privyUIOptions:{title:`Sign to claim your VeChain nickname`,description:`Claim ${e} as your VeChain nickname`,buttonText:`Sign to continue`},onTxConfirmed:l,onTxFailedOrCancelled:n});return{...u,clauses:c,sendTransaction:async()=>u.sendTransaction(c())}},os=e=>[`VECHAIN_KIT_DOMAIN`,e,`IS_DOMAIN_PROTECTED`],ss=Dn.ofAbi(Oi.abi),cs=async(e,t,n)=>{let r=y(t).veWorldSubdomainClaimerContractAddress;return(await e.contracts.load(r,ss.abi).read.isDomainProtected(n))[0]},ls=(e,t=!0)=>{let n=Qn(),{network:r}=$();return or({queryKey:os(e),queryFn:()=>cs(n,r.type,e),enabled:!!e&&t&&!!r.type,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},us=Wi.object({name:Wi.string()}),ds=Wi.object({domains:Wi.array(us)}),fs=async(e,t,n)=>{if(!t)throw Error(`Address is required`);let r=y(e).graphQlIndexerUrl,i=`query Registrations {
|
|
121
|
+
`))}let To=null;function Eo(){return To||=new nr({defaultOptions:{queries:{queryKeyHashFn:cr,retry:0,staleTime:3e4,refetchOnWindowFocus:!0,refetchOnMount:!0,refetchOnReconnect:!0,refetchInterval:!1,refetchIntervalInBackground:!1}}}),To}const Do=({children:e})=>{try{if(H.useContext(rr))return J(q,{children:e})}catch(e){console.log(e)}return J(ir,{client:Eo(),children:e})},Oo=({onClick:e,...t})=>J(Dt,{"aria-label":`Back`,icon:J(P,{as:wr,fontSize:`20px`}),size:`sm`,variant:`vechainKitHeaderIconButtons`,position:`absolute`,left:`10px`,top:`8px`,onClick:e,lineHeight:`0`,...t}),ko=({wallet:e,label:t,style:n,showHumanAddress:r=!0,setCurrentContent:i,onLogout:a})=>{let{t:o}=X(),[s,c]=K(!1),[l,u]=K(!1),f=V(`colors`,`vechain-kit-text-primary`),p=V(`colors`,`vechain-kit-text-secondary`),m=dn(`#ebebeb`,`#ffffff0a`),h=dn(`#ffffff`,`transparent`),g=async(e,t)=>{await k(e)&&(t(!0),setTimeout(()=>{t(!1)},2e3))},_=()=>{i&&(e?.domain?i({type:`choose-name-search`,props:{name:``,setCurrentContent:i,initialContentSource:`profile`}}):i({type:`choose-name`,props:{setCurrentContent:i,initialContentSource:`profile`,onBack:()=>i(`profile`)}}))};return J(B,{w:`full`,justifyContent:`center`,...n,children:Y(B,{w:`full`,spacing:4,children:[t&&J(z,{fontSize:`sm`,color:p,children:t}),Y(B,{spacing:2,w:`full`,children:[e?.domain&&Y(N,{w:`full`,spacing:3,px:4,py:2,borderWidth:1,borderColor:m,borderRadius:`md`,bg:h,children:[J(P,{as:ri,color:p}),J(z,{flex:1,fontSize:`sm`,fontWeight:`700`,color:f,noOfLines:1,children:l?o(`Copied!`):e.domain}),Y(N,{spacing:2,children:[i&&J(Dt,{icon:J(Jr,{}),height:`30px`,borderRadius:`5px`,variant:`vechainKitSecondary`,onClick:_,"aria-label":`Edit domain`}),J(Dt,{icon:J(l?Sr:jr,{}),height:`30px`,borderRadius:`5px`,variant:`vechainKitSecondary`,onClick:()=>g(e.domain||``,u),"aria-label":`Copy domain`})]})]}),Y(N,{w:`full`,spacing:3,px:4,py:2,borderWidth:1,borderColor:m,borderRadius:`md`,bg:h,children:[J(P,{as:si,color:p}),J(z,{flex:1,fontSize:`sm`,fontWeight:`700`,color:f,noOfLines:1,children:s?o(`Copied!`):r?d(e?.address??``,8,7):e?.address}),Y(N,{spacing:2,children:[J(Dt,{icon:J(Gr,{}),onClick:()=>i?.({type:`disconnect-confirm`,props:{onDisconnect:()=>a?.(),onBack:()=>i?.(`profile`)}}),variant:`vechainKitSecondary`,height:`30px`,w:`30px`,borderRadius:`5px`,"aria-label":`Copy address`}),J(Dt,{icon:J(s?Sr:jr,{}),onClick:()=>g(e?.address??``,c),variant:`vechainKitSecondary`,height:`30px`,w:`30px`,borderRadius:`5px`,"aria-label":`Copy address`})]})]})]})]})})};var Ao=`2.6.3`,jo={"@adraffy/ens-normalize":`^1.11.0`,"@chakra-ui/react":`^2.8.2`,"@emotion/styled":`^11.14.1`,"@privy-io/cross-app-connect":`0.2.2`,"@privy-io/react-auth":`2.25.0`,"@solana/web3.js":`^1.98.0`,"@tanstack/react-query":`^5.64.2`,"@tanstack/react-query-devtools":`^5.64.1`,"@vechain/contract-getters":`1.3.0`,"@vechain/dapp-kit-react":`2.1.0-rc.5`,"@vechain/picasso":`^2.1.1`,"@vechain/vechain-contract-types":`1.6.0-rc`,"@wagmi/core":`^2.17.2`,"bignumber.js":`^9.1.2`,"browser-image-compression":`^2.0.2`,dotenv:`^16.4.7`,ethers:`^6.13.5`,"framer-motion":`^11.15.0`,i18next:`^24.2.1`,"i18next-browser-languagedetector":`^8.0.2`,net:`^1.0.2`,process:`^0.11.10`,react:`^18.2.0`,"react-device-detect":`^2.2.3`,"react-hook-form":`^7.54.2`,"react-i18next":`^15.4.0`,"react-icons":`^5.4.0`,"react-qrcode-logo":`^3.0.0`,vaul:`^1.1.2`,viem:`^2.29.3`,wagmi:`^2.15.4`},Mo={"@chakra-ui/react":`^2.8.2`,"@emotion/react":`^11.0.0`,"@emotion/styled":`^11.0.0`,"@tanstack/react-query":`^5.64.2`,"@vechain/dapp-kit-react":`2.1.0-rc.5`,"framer-motion":`^11.0.0`,react:`^18.0.0`,"react-dom":`^18.0.0`};const No=({...e})=>{let{darkMode:t}=$();return Y(N,{w:`full`,justifyContent:`center`,alignItems:`center`,spacing:0,...e,children:[J(be,{isDark:t,w:`70px`,h:`auto`,opacity:.4,mr:1,ml:`-16px`}),Y(Nt,{fontSize:`11px`,fontWeight:`500`,opacity:.4,textAlign:`left`,href:`https://github.com/vechain/vechain-kit/releases/tag/${Ao}`,isExternal:!0,pt:`1px`,children:[`v`,Ao]})]})},Po=gn({hasContentBelow:!1}),Fo=()=>_n(Po),Z=({children:e})=>{let[t,n]=K(!1),r=vn(null),i=vn(null),a=vn(null),o=vn(!0),{tokens:s}=Yd(),c=s?.effects?.backdropFilter?.stickyHeader??`blur(20px)`;return W(()=>{let e=e=>{if(!e)return null;let t=e.parentElement;for(;t;){let e=window.getComputedStyle(t);if(e.overflowY===`auto`||e.overflowY===`scroll`||e.overflow===`auto`||e.overflow===`scroll`)return t;t=t.parentElement}return null},t=([e])=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{if(o.current){o.current=!1,n(!1);return}n(!e.isIntersecting)},50)},s=e(i.current),c={threshold:0};s&&(c.root=s,c.rootMargin=`0px`);let l=new IntersectionObserver(t,c),u=setTimeout(()=>{r.current&&l.observe(r.current)},200);return()=>{clearTimeout(u),a.current&&clearTimeout(a.current),l.disconnect()}},[]),Y(Po.Provider,{value:{hasContentBelow:t},children:[J(j,{ref:i,position:`sticky`,top:`0`,left:`0`,w:`full`,borderRadius:`24px 24px 0px 0px`,backdropFilter:t?c:`none`,style:{WebkitBackdropFilter:t?c:`none`},zIndex:1e3,boxShadow:t?`0px 2px 4px 1px rgb(0 0 0 / 10%)`:`none`,transition:`box-shadow 0.2s ease-in-out`,children:e}),J(`div`,{ref:r,style:{height:`1px`,width:`100%`,pointerEvents:`none`,visibility:`hidden`,marginTop:`-1px`}})]})},Io=({children:e})=>J(j,{position:`absolute`,bottom:`0`,left:`0`,right:`0`,bg:V(`colors`,`vechain-kit-modal`),zIndex:`1000`,p:4,w:`full`,children:e}),Lo=({scrollableContainerRef:e,observerRef:t})=>{let n=V(`colors`,`vechain-kit-border`),{tokens:r}=Yd(),i=r?.effects?.backdropFilter?.stickyHeader??`blur(20px)`,[a,o]=K(!1),s=vn(null),c=vn(!0);return W(()=>{let n=([e])=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{if(c.current){c.current=!1,o(!1);return}o(!e.isIntersecting)},50)},r={threshold:0};e.current&&(r.root=e.current,r.rootMargin=`0px`);let i=new IntersectionObserver(n,r),a=setTimeout(()=>{t.current&&i.observe(t.current)},200);return()=>{clearTimeout(a),s.current&&clearTimeout(s.current),i.disconnect()}},[e,t]),J(j,{position:`sticky`,top:`0`,w:`full`,backdropFilter:a?i:`none`,style:{WebkitBackdropFilter:a?i:`none`},zIndex:999,transition:`backdrop-filter 0.2s ease-in-out`,children:J(j,{mx:`auto`,w:`34px`,h:`5px`,bg:n,mt:4,rounded:`full`})})},Ro=({isOpen:e,onClose:t,children:n,ariaTitle:r,ariaDescription:i,isDismissable:a=!0,minHeight:o,maxHeight:s=`68vh`,closeThreshold:c=.5})=>{let l=V(`colors`,`vechain-kit-modal`),u=V(`colors`,`vechain-kit-overlay`),d=vn(null),f=vn(null),{tokens:p}=Yd(),m=p?.effects?.backdropFilter?.overlay,h=p?.colors?.border?.modal||`none`;return J(ui.Root,{dismissible:a,shouldScaleBackground:!0,repositionInputs:!1,open:e,closeThreshold:c,onOpenChange:e=>{e||t()},children:Y(ui.Portal,{children:[J(ui.Overlay,{style:{zIndex:100,position:`fixed`,top:0,right:0,bottom:0,left:0,backgroundColor:u,backdropFilter:m,WebkitBackdropFilter:m}}),Y(ui.Content,{"aria-description":i,style:{zIndex:101,backgroundColor:l,borderRadius:`24px 24px 0 0`,border:h,position:`fixed`,bottom:0,left:0,right:0,...o&&{minHeight:o},maxHeight:s,display:`flex`,flexDirection:`column`},children:[J(ui.Title,{style:{position:`absolute`,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:0},children:r}),Y(j,{ref:d,flex:`1`,overflowY:`auto`,children:[J(Lo,{scrollableContainerRef:d,observerRef:f}),J(`div`,{ref:f,style:{height:`1px`,width:`100%`,visibility:`hidden`,marginTop:`-1px`}}),n]})]})]})})},zo=({isOpen:e,onClose:t,children:n,size:r=`sm`,isCentered:i=!0,motionPreset:a=`slideInBottom`,closeOnOverlayClick:o=!0,blockScrollOnMount:s=!1,allowExternalFocus:c=!1,backdropFilter:l,isCloseable:u=!0,useBottomSheetOnMobile:d,mobileMinHeight:f,mobileMaxHeight:p=`57vh`,desktopMinHeight:m,desktopMaxHeight:h})=>{let[g]=pn(`(min-width: 768px)`),{portalRootRef:_,themeConfig:v,tokens:y}=Yd(),b=d??v?.modal?.useBottomSheetOnMobile??!1,x=V(`colors`,`vechain-kit-modal`),S=V(`colors`,`vechain-kit-overlay`),C=y?.effects?.backdropFilter?.overlay,w=y?.effects?.backdropFilter?.modal,T=l??C??`blur(3px)`,E=g?{minHeight:m,maxHeight:h}:{position:`fixed`,bottom:`0`,mb:`0`,maxW:`2xl`,borderRadius:`24px 24px 0px 0px !important`,overflowY:`auto`,overflowX:`hidden`,scrollBehavior:`smooth`,minHeight:f,maxHeight:p},D=Y(It,{motionPreset:a,isOpen:e,onClose:t,isCentered:i,size:r,returnFocusOnClose:!1,blockScrollOnMount:s,closeOnOverlayClick:o&&u,preserveScrollBarGap:!0,portalProps:{containerRef:_},trapFocus:!c,autoFocus:!c,variant:`vechainKitBase`,children:[J(Rt,{bg:S,backdropFilter:T}),J(Lt,{role:`dialog`,"aria-modal":!c,bg:x,sx:{backdropFilter:w,WebkitBackdropFilter:w},...E,children:n})]});return J(q,{children:!g&&b?J(It,{isOpen:e,onClose:t,size:r,blockScrollOnMount:!1,trapFocus:!1,children:J(Ro,{isOpen:e,onClose:t,ariaTitle:`Dialog`,ariaDescription:`Dialog content area`,isDismissable:u,minHeight:f,maxHeight:p,children:n})}):D})},Bo=async e=>{let t=new URL(`/api/v1/apps/${e}`,Be),n=await fetch(t,{headers:{"privy-app-id":e}});if(!n.ok)throw Error(`Failed to fetch Privy app info`);return n.json()},Vo=e=>[`VECHAIN_KIT_PRIVY_APP_INFO`,...Array.isArray(e)?e:[e]],Ho=e=>{let t=Array.isArray(e)?e:[e];return or({queryKey:Vo(e),queryFn:async()=>{let e=await Promise.all(t.map(e=>Bo(e)));return Object.fromEntries(e.map((e,n)=>{let r=t[n],i=f.find(e=>e.id===r);return[r,{...e,website:i?.website}]}))},enabled:t.length>0,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},Uo=async()=>{try{let e=new URL(`summary.json`,ze),t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch Privy status`);return(await t.json()).page.status??`No data`}catch(e){return console.error(`Error fetching data:`,e),`Error fetching data`}},Wo=()=>or({queryKey:[`PRIVY_STATUS`],queryFn:Uo,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60}),Go=e=>[`VECHAIN_KIT_DOMAIN`,e],Ko=e=>{let{network:t}=$();return or({queryKey:Go(e),queryFn:async()=>{if(!e)throw Error(`Address or domain is required`);if(t.type!==`main`&&t.type!==`test`){let t=D(e);return{address:t?e:void 0,domain:void 0,isValidAddressOrDomain:t,isPrimaryDomain:!1}}let n=await bi(e,{networkUrl:t.nodeUrl}),r=D(e);if(!n&&!r)throw Error(`Input must be a valid domain or address`);let i=null,a=null,o=!1;return n?(i=await mi(e,{networkUrl:t.nodeUrl}),a=e,i&&(o=await yi(e,i,{networkUrl:t.nodeUrl}))):(a=await di(e,{networkUrl:t.nodeUrl}),i=e,a&&(o=await yi(a,e,{networkUrl:t.nodeUrl}))),{address:i||void 0,domain:a||void 0,isValidAddressOrDomain:n||r,isPrimaryDomain:o}},enabled:!!e&&!!t.type,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`)||e===`address or domain is required`||e===`input must be a valid domain or address`)return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},qo=async(e,t,n)=>{let r=Ri(Mi([`0x571e15b4bbf879cf28e5075190137be8e18500e3d38543bf0cbcdb54e00b02cc`,Ri(Hi(n))])),i=await e.contracts.load(y(t).vetDomainsContractAddress,Ei.abi).read.recordExists(r);if(!i)throw Error(`Failed to get ENS record exists for ${n}`);return i[0]},Jo=e=>[`VECHAIN_KIT_ENS_RECORD_VE_WORLD_EXISTS`,e],Yo=e=>{let t=Qn(),{network:n}=$();return or({queryKey:Jo(e),queryFn:()=>qo(t,n.type,e),enabled:!!e,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},Xo=(e,t)=>{let n=sr(),{network:r}=$();return{refresh:async()=>{await Promise.all([n.invalidateQueries({queryKey:hs(e??``,r.type)}),n.invalidateQueries({queryKey:ys(e,r.type)}),n.invalidateQueries({queryKey:Os(t)})])}}},Zo=async(e,t,n,r,i,a)=>{await Promise.all([e.invalidateQueries({queryKey:Go(t)}),e.invalidateQueries({queryKey:Go(n)}),e.invalidateQueries({queryKey:Jo(r)}),e.invalidateQueries({queryKey:ps(t,`.vet`)}),e.invalidateQueries({queryKey:ps(t,`.veworld.vet`)}),e.invalidateQueries({queryKey:ys(n)})]),await Promise.all([e.refetchQueries({queryKey:Go(t)}),e.refetchQueries({queryKey:Go(n)}),e.refetchQueries({queryKey:ps(t,`.vet`)}),e.refetchQueries({queryKey:ps(t,`.veworld.vet`)}),e.refetchQueries({queryKey:hs(r+`.`+i,a)}),e.refetchQueries({queryKey:ys(n)}),e.refetchQueries({queryKey:Jo(r)}),e.refetchQueries({queryKey:Os(t)})])},Qo=Oi.createInterface(),$o=Di.createInterface(),es=(e,t,n,r,i)=>{let a=[];if(!e)throw Error(`Invalid subdomain`);let o=`${e}.${t}`;if(a.push({to:y(i.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:$o.encodeFunctionData(`setName`,[``]),comment:`Unsetting your current VeChain nickname of the account ${d(r?.address??``,4,4)}`,abi:$o.getFunction(`setName`)}),n){a.push({to:y(i.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:$o.encodeFunctionData(`setName`,[o]),comment:`Setting your VeChain nickname to ${o}`,abi:$o.getFunction(`setName`)});let e=new xn.Interface([`function setAddr(bytes32 node, address addr)`]),t=xn.namehash(o);a.push({to:y(i.type).vetDomainsPublicResolverAddress,value:`0x0`,data:e.encodeFunctionData(`setAddr`,[t,r?.address||``]),comment:`Setting the address for ${o} to ${d(r?.address??``,4,4)}`,abi:e.getFunction(`setAddr`)})}else if(ns(t))a.push({to:y(i.type).veWorldSubdomainClaimerContractAddress,value:`0x0`,data:Qo.encodeFunctionData(`claim`,[e,y(i.type).vetDomainsPublicResolverAddress]),comment:`Claim VeChain subdomain: ${e}.${t}`,abi:Qo.getFunction(`claim`)}),a.push({to:y(i.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:$o.encodeFunctionData(`setName`,[e+`.`+t]),comment:`Set ${e}.${t} as the VeChain nickname of the account ${d(r?.address??``,4,4)}`,abi:$o.getFunction(`setName`)});else throw Error(`This hook only supports .veworld.vet subdomains`);return a},ts=({subdomain:e,domain:t,onSuccess:n,onError:r,alreadyOwned:i=!1})=>{let a=sr(),{account:o}=Q(),{network:s}=$(),{refresh:c}=Xo(e+`.`+t,o?.address??``),l=U(()=>es(e,t,i,o,s),[e,t,i,o,s]),u=U(async()=>{let r=`${e}.${t}`;await Zo(a,o?.address??``,r,e,t,s.type),c(),n?.()},[n,e,t,a,o,s.type,c]),d=Xc({signerAccountAddress:o?.address??``,privyUIOptions:{title:`Sign to claim your VeChain nickname`,description:`Claim ${e}.${t} as your VeChain nickname`,buttonText:`Sign to continue`},onTxConfirmed:u,onTxFailedOrCancelled:()=>{r?.()}});return{...d,clauses:l,sendTransaction:async()=>d.sendTransaction(l())}},ns=e=>e.endsWith(`veworld.vet`),rs=Di.createInterface(),is=(e,t,n,r)=>{let i=[];if(!e)throw Error(`Invalid domain`);if(t){i.push({to:y(r.type).vetDomainsReverseRegistrarAddress,value:`0x0`,data:rs.encodeFunctionData(`setName`,[e]),comment:`Setting your VeChain nickname to ${e}`,abi:rs.getFunction(`setName`)});let t=new xn.Interface([`function setAddr(bytes32 node, address addr)`]),a=xn.namehash(e);i.push({to:y(r.type).vetDomainsPublicResolverAddress,value:`0x0`,data:t.encodeFunctionData(`setAddr`,[a,n?.address||``]),comment:`Setting the address for ${e} to ${d(n?.address??``,4,4)}`,abi:t.getFunction(`setAddr`)})}else throw Error(`Primary .vet domains are not supported yet`);return i},as=({domain:e,onSuccess:t,onError:n,alreadyOwned:r=!1})=>{let{network:i}=$(),a=sr(),{account:o}=Q(),{refresh:s}=Xo(e,o?.address??``),c=U(()=>is(e,r,o,i),[e,r,o,i]),l=U(async()=>{await Zo(a,o?.address??``,e,``,e.endsWith(`.vet`)?e:`${e}.vet`,i.type),s(),t?.()},[t,e,a,o,i.type,s]),u=Xc({signerAccountAddress:o?.address??``,privyUIOptions:{title:`Sign to claim your VeChain nickname`,description:`Claim ${e} as your VeChain nickname`,buttonText:`Sign to continue`},onTxConfirmed:l,onTxFailedOrCancelled:n});return{...u,clauses:c,sendTransaction:async()=>u.sendTransaction(c())}},os=e=>[`VECHAIN_KIT_DOMAIN`,e,`IS_DOMAIN_PROTECTED`],ss=Dn.ofAbi(Oi.abi),cs=async(e,t,n)=>{let r=y(t).veWorldSubdomainClaimerContractAddress;return(await e.contracts.load(r,ss.abi).read.isDomainProtected(n))[0]},ls=(e,t=!0)=>{let n=Qn(),{network:r}=$();return or({queryKey:os(e),queryFn:()=>cs(n,r.type,e),enabled:!!e&&t&&!!r.type,retry:(e,t)=>{if(t instanceof Error){let e=t.message.toLowerCase();if(e.includes(`cancel`)||e.includes(`abort`))return!1}return e<2},gcTime:1e3*60*5,staleTime:1e3*60})},us=Wi.object({name:Wi.string()}),ds=Wi.object({domains:Wi.array(us)}),fs=async(e,t,n)=>{if(!t)throw Error(`Address is required`);let r=y(e).graphQlIndexerUrl,i=`query Registrations {
|
|
122
122
|
domains(
|
|
123
123
|
where: ${n?`{owner: "${t.toLowerCase()}", parent_: {name: "${n}"}}`:`{owner: "${t.toLowerCase()}"}`}
|
|
124
124
|
) {
|
|
@@ -197,7 +197,7 @@ import{$ as e,C as t,D as n,G as r,H as i,J as a,Q as o,S as s,T as c,U as l,V a
|
|
|
197
197
|
font-family: ${t} !important;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
`}),Kd=({children:e,theme:t,bodyFont:n,headingFont:r})=>Y(ba,{value:G(()=>Wd(),[]),children:[J(Gd,{bodyFont:n,headingFont:r}),J(mt,{theme:t,resetCSS:!1,portalZIndex:void 0,children:e})]}),qd=({darkMode:e})=>{try{if(h(`[data-chakra-color-mode]`))return null}catch(e){console.error(e)}return J(vt,{initialColorMode:e?`dark`:`light`})},Jd=gn({portalRootRef:void 0,tokens:void 0,themeConfig:void 0}),Yd=()=>{let e=_n(Jd);if(!e)throw Error(`useVechainKitTheme must be used within a VechainKitThemeProvider`);return e},Xd=({darkMode:e=!1})=>{let{setColorMode:t,colorMode:n}=un();return W(()=>{let r=e?`dark`:`light`;n!==r&&t(r)},[e]),J(q,{})},Zd=({children:e,darkMode:t=!1,theme:n})=>{let r=vn(null),i=_n($m),a=i?i.theme:void 0,o=n??a,s=G(()=>vo(_o(t),yo(o,t)),[t,o]),c=G(()=>({...Hd(t,o),config:{...Hd(t,o).config,initialColorMode:t?`dark`:`light`}}),[t,o]);return Y(Jd.Provider,{value:{portalRootRef:r,tokens:s,themeConfig:o},children:[J(qd,{darkMode:t}),Y(Kd,{theme:c,bodyFont:s.fonts.body,headingFont:s.fonts.heading,children:[J(Xd,{darkMode:t}),J(j,{id:`vechain-kit-root`,ref:r,bg:`transparent`,borderRadius:`12px`,children:e})]}),J(Ud,{})]})},Qd=gn(null),$d=()=>{let e=_n(Qd);if(!e)throw Error(`useModal must be used within ModalProvider`);return e},ef=({children:e})=>{let{darkMode:t,theme:n}=$(),[r,i]=K(!1),[a,o]=K(`main`),[s,c]=K(!1),{setSource:l,connectV2:u}=$n(),d=U((e,t)=>{A()&&window.vechain&&window.vechain.isInAppBrowser?(l(`veworld`),u(null)):(o(e??`main`),c(t??!1),i(!0))},[]),f=U(()=>{i(!1),o(`main`),c(!1)},[]),[p,m]=K(!1),[h,g]=K(!1),[_,v]=K(`main`),y=U((e,t)=>{v(e??`main`),g(t?.isolatedView??!1),m(!0)},[]),b=U(()=>{m(!1),v(`main`),setTimeout(()=>{g(!1)},300)},[]),[x,S]=K(!1),C=U(()=>S(!0),[]),w=U(()=>S(!1),[]),[T,E]=K(!1),D=U(()=>E(!0),[]),O=U(()=>E(!1),[]),[k,ee]=K(!1),[te,ne]=K(void 0),re=U(e=>{ne(e),ee(!0)},[]),ie=U(()=>ee(!1),[]);return Y(Qd.Provider,{value:{openConnectModal:d,closeConnectModal:f,isConnectModalOpen:r,connectModalContent:a,setConnectModalContent:o,connectModalPreventAutoClose:s,setConnectModalPreventAutoClose:c,openAccountModal:y,closeAccountModal:b,isAccountModalOpen:p,setAccountModalContent:v,accountModalContent:_,isolatedView:h,openTransactionModal:C,closeTransactionModal:w,isTransactionModalOpen:x,openTransactionToast:D,closeTransactionToast:O,isTransactionToastOpen:T,openUpgradeSmartAccountModal:re,closeUpgradeSmartAccountModal:ie,isUpgradeSmartAccountModalOpen:k},children:[e,Y(Zd,{darkMode:t,theme:n,children:[J(fd,{isOpen:r,onClose:f,initialContent:a,preventAutoClose:s}),J(cd,{isOpen:p,onClose:b,initialContent:_}),J(Cd,{isOpen:k,onClose:ie,style:te})]})]})},tf=()=>{let{loginMethods:e}=$(),t=e?.length===1&&e[0].method===`dappkit`,{openConnectModal:n,closeConnectModal:r,isConnectModalOpen:i}=$d(),{open:a,close:o}=tr();return{open:t?a:e=>n(e),close:t?o:r,isOpen:t?!1:i}},nf=({children:e})=>J(q,{children:e}),rf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:()=>e(),close:t,isOpen:n}},af=({children:e})=>J(q,{children:e}),of=()=>{let{openTransactionModal:e,closeTransactionModal:t,isTransactionModalOpen:n}=$d();return{open:e,close:t,isOpen:n}},sf=({children:e})=>J(q,{children:e}),cf=()=>{let{openTransactionToast:e,closeTransactionToast:t,isTransactionToastOpen:n}=$d();return{open:e,close:t,isOpen:n}},lf=({children:e})=>J(q,{children:e}),uf=()=>{let{connection:e}=Q(),{openConnectModal:t,closeConnectModal:n,isConnectModalOpen:r,openAccountModal:i,closeAccountModal:a,isAccountModalOpen:o}=$d();return{open:n=>{e.isConnected?i(void 0,n):t()},close:()=>{o&&a(),r&&n()},isOpen:r||o}},df=({children:e})=>J(q,{children:e}),ff=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`choose-name`,props:{setCurrentContent:r,onBack:()=>r(`main`),initialContentSource:`main`}},t)},close:()=>{t()},isOpen:n}},pf=({children:e})=>J(q,{children:e}),mf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`send-token`,props:{setCurrentContent:r}},t)},close:()=>{t()},isOpen:n}},hf=({children:e})=>J(q,{children:e}),gf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`swap-token`,props:{setCurrentContent:r,fromTokenAddress:t?.fromTokenAddress,toTokenAddress:t?.toTokenAddress}},{isolatedView:t?.isolatedView})},close:()=>{t()},isOpen:n}},_f=({children:e})=>J(q,{children:e}),vf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`ecosystem`,t)},close:()=>{t()},isOpen:n}},yf=({children:e})=>J(q,{children:e}),bf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`notifications`,t)},close:()=>{t()},isOpen:n}},xf=({children:e})=>J(q,{children:e}),Sf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`faq`,props:{onGoBack:()=>r(`main`),showLanguageSelector:!1}},t)},close:()=>{t()},isOpen:n}},Cf=({children:e})=>J(q,{children:e}),wf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:()=>{e({type:`account-customization`,props:{setCurrentContent:r}})},close:()=>{t()},isOpen:n}},Tf=({children:e})=>J(q,{children:e}),Ef=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`receive-token`,t)},close:()=>{t()},isOpen:n}},Df=({children:e})=>J(q,{children:e}),Of=()=>{let{privy:e,loginMethods:t}=$(),n=e?.appId===_,r=e=>t?Array.isArray(e)?e.some(e=>t.some(t=>t.method===e)):t.some(t=>t.method===e):!0,i=G(()=>t?t.length===0||r(`ecosystem`):!0,[t]),a=G(()=>r(`vechain`),[t]),o=G(()=>r(`dappkit`),[t]),s=G(()=>r(`passkey`),[t]),c=G(()=>r(`email`),[t]),l={showGoogleLogin:G(()=>r(`google`),[t]),showEmailLogin:c,showPasskey:s,showVeChainLogin:a,showDappKit:o,showEcosystem:i,showMoreLogin:G(()=>r(`more`),[t]),showGithubLogin:G(()=>r(`github`),[t]),isOfficialVeChainApp:!1};return e?n?{...l,isOfficialVeChainApp:!0}:{...l}:{...l,showGoogleLogin:!1,showEmailLogin:!1,showPasskey:!1,showMoreLogin:!1}},kf=e=>{let{openUpgradeSmartAccountModal:t,closeUpgradeSmartAccountModal:n,isUpgradeSmartAccountModalOpen:r}=$d();return{open:()=>t(e),close:n,isOpen:r}},Af=({children:e})=>J(q,{children:e}),jf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`profile`,t)},close:()=>{t()},isOpen:n}},Mf=({children:e})=>J(q,{children:e}),Nf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`settings`,t)},close:()=>{t()},isOpen:n}},Pf=({children:e})=>J(q,{children:e}),Ff=()=>{let[e,t]=K(!1),[n,r]=K(null),[i,a]=K(null),{connection:o,account:s}=Q(),{requestCertificate:c}=er(),l=Qm();return{signMessage:U(async e=>{if(!s)throw Error(`Account not found`);t(!0),a(null),r(null);try{let t=null;return t=o.isConnectedWithDappKit?(await c({purpose:`agreement`,payload:{type:`text`,content:e}},{signer:s.address})).signature:await l.signMessage(e),r(t),t}catch(e){let t=e instanceof Error?e:Error(String(e));throw a(t),t}finally{t(!1)}},[o,l,s?.address]),isSigningPending:e,signature:n,error:i,reset:U(()=>{t(!1),r(null),a(null)},[])}},If=()=>{let[e,t]=K(!1),[n,r]=K(null),[i,a]=K(null),{signer:o}=$n(),{connection:s}=Q(),c=Qm();return{signTypedData:U(async(e,n)=>{t(!0),a(null),r(null);try{let t;if(s.isConnectedWithDappKit){let r={...e.domain,salt:e.domain?.salt?Buffer.from(e.domain.salt).toString(`hex`):void 0};t=await o.signTypedData(r,e.types,e.message,void 0,n)}else t=await c.signTypedData(e);return r(t),t}catch(e){if(e&&typeof e==`object`&&`statusCode`in e&&e.statusCode===4001){let e=Error(`User denied signature request`);throw a(e),e}let t=e instanceof Error?e:Error(typeof e==`object`?JSON.stringify(e):String(e));throw console.error(t),a(t),t}finally{t(!1)}},[s,c]),isSigningPending:e,signature:n,error:i,reset:U(()=>{t(!1),r(null),a(null)},[])}},Lf=()=>{let{loginWithPasskey:e}=Un();return{loginWithPasskey:async()=>{try{await e()}catch(e){throw e}}}};let Rf=!1;const zf=()=>{let{createWallet:e}=Bn(),{initOAuth:t}=Hn({onComplete:U(async({isNewUser:t})=>{if(t&&!Rf){Rf=!0;try{await e()}catch(e){throw Rf=!1,console.error(`Failed to create wallet:`,e),e}}},[e])});return{initOAuth:async({provider:e})=>{try{await t({provider:e})}catch(e){throw e}}}},Bf=()=>{let e=`vechain_kit_cross_app_connection`;return{setConnectionCache:U(t=>{let n={timestamp:Date.now(),ecosystemApp:t};de(e,JSON.stringify(n))},[]),getConnectionCache:U(()=>{let t=x(e);return t?JSON.parse(t):null},[]),clearConnectionCache:U(()=>{w(e)},[])}},Vf=()=>{let{login:e}=Oc(),{setConnectionCache:t}=Bf(),{data:n}=Ho([_]);return{login:async()=>{try{await e(_),t({name:`VeChain`,logoUrl:n?.[_]?.logo_url,appId:_,website:Qe})}catch(e){throw wc({error:e,mobileBrowserPopupMessage:`Your mobile browser blocked the login window. Please click 'Try again' to open the login window or change your browser settings.`,rejectedMessage:`Login request was cancelled.`,defaultMessage:`There was an unexpected issue logging in with VeChain. Please try again or contact support.`})}}}},Hf=`vechain-kit-app-hub-apps`,Uf=`vechain-kit-app-hub-apps-expiry`,Wf=()=>[`VECHAIN_KIT`,`appHub`,`apps`],Gf=async()=>{if(typeof window<`u`)try{let e=x(Hf),t=x(Uf);if(e&&t){let n=parseInt(t,10);if(Date.now()<n)return JSON.parse(e)}}catch{console.warn(`Invalid app-hub cache, fetching fresh data`)}let e=new URL(`contents/apps`,Ie),t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch app directories`);let n=(await t.json()).map(async e=>{if(e.type!==`dir`)return null;let t=new URL(`master/apps/${e.name}/manifest.json`,Ge),n=await fetch(t);if(!n.ok)return console.warn(`Failed to fetch manifest for ${e.name}`),null;try{let t=await n.json(),r=new URL(`master/apps/${e.name}/logo.png`,Ge);return{id:e.name,name:t.name,description:t.desc,url:t.href,logo:r.toString(),category:t.category,tags:t.tags||[],isVeWorldSupported:t.isVeWorldSupported||!1,repo:t.repo,contracts:t.contracts,veBetterDaoId:t.veBetterDaoId}}catch(t){return console.warn(`Error parsing manifest for ${e.name}:`,t),null}}),r=(await Promise.all(n)).filter(e=>e!==null);if(typeof window<`u`)try{de(Hf,JSON.stringify(r)),de(Uf,(Date.now()+864e5).toString())}catch(e){console.warn(`Failed to cache app-hub data:`,e)}return r},Kf=()=>or({queryKey:Wf(),queryFn:async()=>{try{return await Gf()}catch(e){let t=localStorage.getItem(Hf);if(t)return JSON.parse(t);throw e}},staleTime:1e3*60*60,retry:2}),qf=({abi:e,address:t,method:n})=>[`callClause`,t,n],Jf=e=>e.map(e=>typeof e==`bigint`?e.toString():Array.isArray(e)?Jf(e):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,typeof t==`bigint`?t.toString():t])):e),Yf=({abi:e,address:t,method:n,args:r})=>[`callClause`,t,n,...r?.length?Jf(r):[]],Xf=({address:e,abi:t,method:n,args:r,queryOptions:i})=>{let a=Qn();return or({queryKey:Yf({abi:t,address:e,method:n,args:r}),queryFn:async()=>ee({thor:a,contractAddress:e,abi:t,method:n,args:r}),...i})},Zf=({thor:e,calls:t,queryKey:n,enabled:r=!0})=>or({queryKey:n,queryFn:()=>ne({thor:e,calls:t}),enabled:r}),Qf=()=>{let{currentLanguage:e,setLanguage:t}=$();return{currentLanguage:e,setLanguage:t}},$f=()=>{let{currentCurrency:e,setCurrency:t}=$();return{currentCurrency:e,setCurrency:t}},ep=()=>{let[e,t]=K(!0),n=`vechain_kit_feature_announcement_closed`;return W(()=>{x(n)&&t(!1)},[]),{isVisible:e,closeAnnouncement:()=>{de(n,`true`),t(!1)}}},tp=()=>{let{network:e}=$();return e.nodeUrl??y(e.type).nodeUrl},np=()=>{let[e,t]=K(!0);return W(()=>{if(!A()){t(!1);return}let e=()=>{t(window.matchMedia(`(display-mode: standalone)`).matches||window.standalone||document.referrer.includes(`android-app://`))};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),e},rp=()=>{W(()=>{let e=document.querySelector(`.chakra-modal__content`);e&&(e.scrollTop=0)},[])},ip=async(e,t)=>{if(!t)throw Error(`Address is required`);let n=await e.accounts.getAccount(On.of(t));return{balance:Ii(BigInt(n.balance)).toString(),energy:Ii(BigInt(n.energy)).toString()}},ap=e=>[`VECHAIN_KIT_BALANCE`,e],op=e=>{let t=Qn();return or({queryKey:ap(e),queryFn:()=>ip(t,e),enabled:!!e&&On.isValid(e),refetchInterval:1e4})},sp=async(e,t,n)=>{if(!n)throw Error(`Network type is required`);if(!t)throw Error(`Version is required`);let r=e.contracts.load(y(n).accountFactoryAddress,Ci.abi),i;switch(t){case 1:case 2:i=r.read.accountImplementationV1();break;case 3:i=r.read.accountImplementationV3();break;default:throw Error(`Invalid version, must be between 1 and 3`)}let a=await i;if(!a)throw Error(`Failed to get account implementation address`);return a[0].toString()},cp=(e,t)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`IMPLEMENTATION_ADDRESS`,e,t],lp=e=>{let t=Qn(),{network:n}=$();return or({queryKey:cp(e,n.type),queryFn:async()=>sp(t,e,n.type),enabled:!!t&&!!e&&!!n})},up=async(e,t)=>{if(!t)throw Error(`Network type is required`);let n=await e.contracts.load(y(t).accountFactoryAddress,Ci.abi).read.currentAccountImplementationVersion();if(!n)throw Error(`Failed to get current account implementation version`);return parseInt(n[0].toString())},dp=e=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`CURRENT_ACCOUNT_IMPLEMENTATION_VERSION`,e],fp=()=>{let e=Qn(),{network:t}=$();return or({queryKey:dp(t.type),queryFn:async()=>up(e,t.type),enabled:!!e&&!!t})},pp=async(e,t,n)=>{if(!t)throw Error(`Owner address is required`);if(!n)throw Error(`Network type is required`);let r=await e.contracts.load(y(n).accountFactoryAddress,Ci.abi).read.getAccountAddress(t);if(!r)throw Error(`Failed to get account address of ${t}`);return r[0].toString()},mp=(e,t)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`ADDRESS`,e,t],hp=e=>{let t=Qn(),{network:n}=$();return or({queryKey:mp(e,n.type),queryFn:async()=>pp(t,e,n.type),enabled:!!t&&!!e&&!!n})},gp=Ci.abi,_p=(e,t,n)=>Yf({abi:gp,address:y(n).accountFactoryAddress,method:`getAccountVersion`,args:[e,t]}),vp=(e,t)=>{let{network:n}=$();return Xf({address:y(n.type).accountFactoryAddress,abi:gp,method:`getAccountVersion`,args:[e,t],queryOptions:{select:e=>({version:parseInt(e[0].toString()),isDeployed:e[1]}),enabled:!!e&&!!t}})},yp=Ci.abi,bp=async(e,t,n)=>{if(!t)throw Error(`Owner address is required`);if(!n)throw Error(`Network type is required`);let[r]=await ee({thor:e,abi:yp,contractAddress:y(n).accountFactoryAddress,method:`hasLegacyAccount`,args:[t]});return r},xp=(e,t)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`HAS_V1_SMART_ACCOUNT`,e,t],Sp=e=>{let t=Qn(),{network:n}=$();return or({queryKey:xp(e,n.type),queryFn:async()=>bp(t,e,n.type),enabled:!!t&&!!e&&!!n})},Cp=async(e,t)=>{if(!t)throw Error(`Account address is required`);let n=await e.accounts.getAccount(On.of(String(t)));if(!n)throw Error(`Account not found`);return n.hasCode},wp=e=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`IS_DEPLOYED`,e],Tp=e=>{let t=tp(),n=Aa.at(t);return or({queryKey:wp(e),queryFn:async()=>Cp(n,e),enabled:!!n&&!!e})},Ep=()=>{let e=sr(),{connectedWallet:t,smartAccount:n}=Q(),{network:r}=$();return{refresh:async()=>{let i=t?.address??``,a=n?.address??``;await Promise.all([e.cancelQueries({queryKey:mp(i,r.type)}),e.cancelQueries({queryKey:_p(a,i,r.type)}),e.cancelQueries({queryKey:xp(i,r.type)}),e.cancelQueries({queryKey:dp(r.type)}),e.cancelQueries({queryKey:Mp(a,i,3,r.type)}),e.cancelQueries({queryKey:Fp(a,3,r.type)}),e.cancelQueries({queryKey:cp(3,r.type)})]),await Promise.all([e.refetchQueries({queryKey:mp(i,r.type)}),e.refetchQueries({queryKey:_p(a,i,r.type)}),e.refetchQueries({queryKey:xp(i,r.type)}),e.refetchQueries({queryKey:dp(r.type)}),e.refetchQueries({queryKey:Mp(a,i,3,r.type)}),e.refetchQueries({queryKey:Fp(a,3,r.type)}),e.refetchQueries({queryKey:cp(3,r.type)})])}}},Dp=()=>{let e=sr(),{smartAccount:t}=Q();return{refresh:async()=>{let n=t?.address??``;await Promise.all([e.cancelQueries({queryKey:kp(n)}),e.cancelQueries({queryKey:wp(n)})]),await Promise.all([e.refetchQueries({queryKey:kp(n)}),e.refetchQueries({queryKey:wp(n)})])}}},Op=async(e,t,n)=>{if(!n)return{address:void 0};let r=await e.contracts.load(y(t).accountFactoryAddress,Ci.abi).read.getAccountAddress(n);if(!r)throw Error(`Failed to get account address of ${n}`);let i=On.of(r[0].toString()),a=await e.accounts.getAccount(i);if(!a)throw Error(`Failed to get account detail of ${i}`);return{address:i.toString(),isDeployed:a.hasCode}},kp=e=>[`VECHAIN_KIT_SMART_ACCOUNT`,e],Ap=e=>{let{network:t}=$(),n=Qn();return or({queryKey:kp(e),queryFn:()=>Op(n,t.type,e),enabled:!!e&&!!t.type&&!!n})},jp=async(e,t,n,r,i)=>{let a=await e.contracts.load(y(i).accountFactoryAddress,Ci.abi).read.upgradeRequired(t,n,BigInt(r));if(!a)throw Error(`Failed to get upgrade required of contract address ${y(i).accountFactoryAddress}`);return a[0]},Mp=(e,t,n,r)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`UPGRADE_REQUIRED`,e,t,n,r],Np=(e,t,n)=>{let r=Qn(),{network:i}=$();return or({queryKey:Mp(e,t,n,i.type),queryFn:async()=>jp(r,e,t,n,i.type),enabled:!!r&&!!e&&!!t&&!!i.type})},Pp=async(e,t,n,r)=>{let i=await e.contracts.load(y(r).accountFactoryAddress,Ci.abi).read.upgradeRequiredForAccount(t,BigInt(n));if(!i)throw Error(`Failed to get upgrade required for contract address ${t}`);return i[0]},Fp=(e,t,n)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`NEEDS_UPGRADE_FOR_ACCOUNT`,e,t,n],Ip=(e,t)=>{let n=Qn(),{network:r}=$();return or({queryKey:Fp(e,t,r.type),queryFn:async()=>Pp(n,e,t,r.type),enabled:!!n&&!!r&&!!e&&!!t&&e!==``})},Lp=wi.createInterface(),Rp=({smartAccountAddress:e,targetVersion:t,onSuccess:n,onError:r})=>{let{refresh:i}=Ep(),{refresh:a}=Dp(),{data:o}=lp(t),s=U(async()=>{if(!e||!D(e))throw Error(`Invalid smart account address`);if(!o)throw Error(`Unable to fetch implementation address for version ${t}`);return[{to:e,value:`0x0`,data:Lp.encodeFunctionData(`upgradeToAndCall`,[o,`0x`]),comment:`Upgrade account to version ${t}`,abi:Lp.getFunction(`upgradeToAndCall`).format(`json`)}]},[e,o,t]),c=Xc({privyUIOptions:{title:`Upgrade Smart Account`,description:`Upgrading your account at ${d(e)} to version ${t}`,buttonText:`Sign to continue`},onTxConfirmed:async()=>{await Promise.all([i(),a()]),n?.()},onTxFailedOrCancelled:async()=>{r?.()}});return{...c,sendTransaction:async()=>c.sendTransaction(await s())}},zp=()=>[`VECHAIN_KIT`,`CURRENT_BLOCK`],Bp=10*ie.SECOND,Vp=()=>{let e=Qn();return or({queryKey:zp(),queryFn:async()=>{let t=await e.blocks.getBestBlockExpanded();if(!t)throw Error(`Failed to fetch current block`);return t},staleTime:1e3*60,refetchInterval:Bp})},Hp=async e=>{let t=await e.blocks.getGenesisBlock();if(!t)throw Error(`Genesis block not found`);return t.id},Up=()=>[`VECHAIN_KIT_CHAIN_ID`],Wp=()=>{let e=Qn();return or({queryKey:Up(),queryFn:()=>Hp(e),enabled:!!e})},Gp=1e3,Kp=async({thor:e,order:t=`asc`,offset:n=0,limit:r=Gp,from:i=0,to:a=e.blocks.getHeadBlock()?.number,filterCriteria:o})=>{let s=await e.logs.filterEventLogs({range:{from:i,to:a,unit:`block`},options:{offset:n,limit:r},order:t,criteriaSet:o});if(!s)throw Error(`Failed to fetch events`);return s},qp=async({nodeUrl:e,thor:t,order:n=`asc`,from:r=0,to:i,filterCriteria:a})=>{let o=[],s=0;for(;;){let c=await Kp({nodeUrl:e,thor:t,filterCriteria:a,from:r,to:i??2**53-1,limit:Gp,order:n,offset:s});if(o.push(...c),c.length<Gp)return o;s+=Gp}},Jp=xi.createInterface(),Yp=(e,t,n,r)=>{if(!e||!t||!D(e))throw Error(`Invalid receiver address or amount`);let i=[];return i.push({to:n,value:`0x0`,data:Jp.encodeFunctionData(`transfer`,[e,Bi(t)]),comment:`Transfer ${t} ${r} to ${e}`,abi:Jp.getFunction(`transfer`)}),i},Xp=({fromAddress:e,receiverAddress:t,amount:n,tokenAddress:r,tokenName:i,onSuccess:a,onError:o})=>{let{refresh:s}=jc(),c=G(()=>Yp(t,n,r,i),[t,n,r,i]),l=Xc({signerAccountAddress:e,privyUIOptions:{title:`Confirm Transfer`,description:`Transfer ${n} ${i} to ${d(t)}`,buttonText:`Sign to continue`},onTxConfirmed:async()=>{s(),a?.()},onTxFailedOrCancelled:async e=>{o?.(e instanceof Error?e.message:String(e))}});return{...l,clauses:c,sendTransaction:async()=>l.sendTransaction(c)}},Zp=(e,t)=>{if(!e||!t||!D(e))throw Error(`Invalid receiver address or amount`);if(isNaN(Number(t)))throw Error(`Invalid amount`);let n=[];try{n.push({to:e,value:Bi(t).toString(),data:`0x`,comment:`Transfer ${t} VET to ${e}`})}catch(e){throw console.error(`Error building clauses:`,e),Error(`Invalid amount format`)}return n},Qp=({fromAddress:e,receiverAddress:t,amount:n,onSuccess:r,onError:i})=>{let{refresh:a}=jc(),o=G(()=>Zp(t,n),[t,n]),s=Xc({signerAccountAddress:e,privyUIOptions:{title:`Confirm Transfer`,description:`Transfer ${n} VET to ${d(t)}`,buttonText:`Sign to continue`},onTxConfirmed:async()=>{a(),r?.()},onTxFailedOrCancelled:async e=>{i?.(e instanceof Error?e.message:String(e))}});return{...s,clauses:o,sendTransaction:async()=>s.sendTransaction(o)}},$p=({clauseBuilder:e,refetchQueryKeys:t,invalidateCache:n=!0,onSuccess:r,onFailure:i,suggestedMaxGas:a,gasPadding:o,delegationUrl:s})=>{let{account:c}=Q(),l=sr(),u=U(async()=>{n&&t?.forEach(async e=>{await l.cancelQueries({queryKey:e}),await l.refetchQueries({queryKey:e})}),r?.()},[n,r,l,t]),d=Xc({signerAccountAddress:c?.address,onTxConfirmed:u,suggestedMaxGas:a,onTxFailedOrCancelled:i,gasPadding:o,delegationUrl:s}),f=U(async t=>{d.sendTransaction(e(t),s)},[e,d,s]);return{...d,sendTransaction:f}},em=10*ie.SECOND,tm=e=>[`VECHAIN_KIT`,`TX_RECEIPT`,e],nm=(e,t=5)=>{let n=Qn();return or({queryKey:tm(e),queryFn:async()=>{let r=await n.transactions.waitForTransaction(e,{timeoutMs:t*em,intervalMs:3e3});if(!r)throw Error(`Transaction receipt not found`);return r},enabled:!!e})},rm=(e,t)=>{let n=Ni({abi:t,data:e.data.toString(),topics:e.topics.map(e=>e.toString())});return{meta:e.meta,decodedData:n}},im=({eventName:e,filterParams:t})=>[e,t?JSON.stringify(t):`all`],am=({abi:e,contractAddress:t,eventName:n,filterParams:r,mapResponse:i,nodeUrl:a})=>{let o=Qn();return or({queryFn:U(async()=>{if(!o)return[];let s=o.contracts.load(t,e).getEventAbi(n),c=s.encodeFilterTopicsNoNull(r??{}),l=(await qp({thor:o,nodeUrl:a,filterCriteria:[{criteria:{address:t,topic0:c[0]??void 0,topic1:c[1]??void 0,topic2:c[2]??void 0,topic3:c[3]??void 0,topic4:c[4]??void 0},eventAbi:s}]})).map(t=>rm(t,e));if(l.some(({decodedData:e})=>e.eventName!==n))throw Error(`Unknown event`);return l.map(e=>i({meta:e.meta,decodedData:e.decodedData}))},[o,t,e,n,r,i,a]),queryKey:G(()=>im({eventName:n,filterParams:r}),[n,r]),enabled:!!o})};function om({clauses:e,chainId:t,verifyingContract:n}){let r=[],i=[],a=[];return e.forEach(e=>{r.push(e.to??``),i.push(String(e.value)),typeof e.data==`object`&&`abi`in e.data?a.push(Fi(e.data)):a.push(e.data||`0x`)}),{domain:{name:`Wallet`,version:`1`,chainId:t,verifyingContract:n},types:{ExecuteBatchWithAuthorization:[{name:`to`,type:`address[]`},{name:`value`,type:`uint256[]`},{name:`data`,type:`bytes[]`},{name:`validAfter`,type:`uint256`},{name:`validBefore`,type:`uint256`},{name:`nonce`,type:`bytes32`}],EIP712Domain:[{name:`name`,type:`string`},{name:`version`,type:`string`},{name:`chainId`,type:`uint256`},{name:`verifyingContract`,type:`address`}]},primaryType:`ExecuteBatchWithAuthorization`,message:{to:r,value:i,data:a,validAfter:0,validBefore:Math.floor(Date.now()/1e3)+300,nonce:xn.hexlify(xn.randomBytes(32))}}}function sm({clause:e,chainId:t,smartAccount:n}){return{domain:{name:`Wallet`,version:`1`,chainId:t,verifyingContract:n.address??``},types:{ExecuteWithAuthorization:[{name:`to`,type:`address`},{name:`value`,type:`uint256`},{name:`data`,type:`bytes`},{name:`validAfter`,type:`uint256`},{name:`validBefore`,type:`uint256`}],EIP712Domain:[{name:`name`,type:`string`},{name:`version`,type:`string`},{name:`chainId`,type:`uint256`},{name:`verifyingContract`,type:`address`}]},primaryType:`ExecuteWithAuthorization`,message:{validAfter:0,validBefore:Math.floor(Date.now()/1e3)+60,to:e.to,value:String(e.value),data:(typeof e.data==`object`&&`abi`in e.data?Fi(e.data):e.data)||`0x`}}}function cm(){let{connection:e,connectedWallet:t}=Q(),{signTypedData:n}=Oc(),{signTypedData:r}=Kn(),{network:i}=$(),{data:a}=Wp();return{connection:e,connectedWallet:t,signTypedDataWithCrossApp:n,signTypedDataPrivy:r,network:i,chainId:a}}const lm=()=>{let{connection:e,connectedWallet:t,signTypedDataWithCrossApp:n,signTypedDataPrivy:r,network:i,chainId:a}=cm(),o=async e=>{let{version:t}=e;return t&&t<3?await s(e):await c(e)};async function s(o){let{clauses:s,smartAccount:c,title:l=`Sign Transaction`,description:u,buttonText:d=`Sign`}=o,f=[],p=s.map(e=>sm({clause:e,chainId:a,smartAccount:c})),m=[];for(let i=0;i<p.length;i++){let a=p[i],o=s[i];if(!o)throw Error(`Transaction clause at index ${i} is undefined`);if(e.isConnectedWithCrossApp){let e=await n({...a,address:t?.address,types:Object.fromEntries(Object.entries(a.types).map(([e,t])=>[e,[...t]]))});m.push(e);continue}let c=o.data,f=(await r(a,{uiOptions:{title:l,description:u??(s[i].comment||(typeof c==`object`&&c&&`functionName`in c?c.functionName:` `)),buttonText:d}})).signature;m.push(f)}return c.isDeployed||f.push(kn.callFunction(On.of(y(i.type).accountFactoryAddress),Dn.ofAbi(Ci.abi).getFunction(`createAccount`),[t?.address??``])),p.forEach((e,t)=>{f.push(kn.callFunction(On.of(c.address??``),Dn.ofAbi(wi.abi).getFunction(`executeWithAuthorization`),[e.message.to,BigInt(e.message.value),e.message.data,BigInt(e.message.validAfter),BigInt(e.message.validBefore),m[t]]))}),f}async function c(o){let{clauses:s,smartAccount:c,title:l,description:u,buttonText:d=`Sign`}=o,f=[],p=om({clauses:s,chainId:a,verifyingContract:c.address??``}),m;return m=e.isConnectedWithCrossApp?await n({...p,address:t?.address}):(await r(p,{uiOptions:{title:l,description:u,buttonText:d}})).signature,c.isDeployed||f.push(kn.callFunction(On.of(y(i.type).accountFactoryAddress),Dn.ofAbi(Ci.abi).getFunction(`createAccount`),[t?.address??``])),f.push(kn.callFunction(On.of(c.address??``),Dn.ofAbi(wi.abi).getFunction(`executeBatchWithAuthorization`),[p.message.to,p.message.value?.map(e=>BigInt(e))??0,p.message.data,BigInt(p.message.validAfter),BigInt(p.message.validBefore),p.message.nonce,m])),f}return{buildClausesWithAuth:o}};let um=function(e){return e.CUSTOM_TOKENS=`vechain_kit_custom_tokens`,e.ECOSYSTEM_SHORTCUTS=`vechain-kit-ecosystem-shortcuts`,e.CURRENCY=`vechain_kit_currency`,e.NODE_URL=`vechain_kit_node_url`,e.NETWORK=`vechain_kit_network`,e.GAS_TOKEN_PREFERENCES=`vechain_kit_gas_token_preferences`,e.SHOW_ASSETS=`vechain_kit_show_assets`,e}({});const dm=(e,t)=>{let[n,r]=K(()=>{try{let n=x(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}});return W(()=>{de(e,JSON.stringify(n))},[e,n]),[n,r]},fm=`vechain-kit-storage-change`,pm=(e,t)=>{let[n,r]=K(()=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(`Error loading from localStorage:`,e),t}}),i=vn(!1);return W(()=>{if(!(typeof window>`u`)){if(i.current){i.current=!1;return}try{window.localStorage.setItem(e,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(fm,{detail:{key:e,value:n}}))}catch(e){console.error(`Error writing to localStorage:`,e)}}},[e,n]),W(()=>{if(typeof window>`u`)return;let t=t=>{if(t.key===e&&t.newValue)try{let e=JSON.parse(t.newValue);JSON.stringify(e)!==JSON.stringify(n)&&(i.current=!0,r(e))}catch(e){console.error(`Error parsing storage value:`,e)}},a=(t=>{if(t.detail.key===e)try{let t=window.localStorage.getItem(e);if(t){let e=JSON.parse(t);JSON.stringify(e)!==JSON.stringify(n)&&(i.current=!0,r(e))}}catch(e){console.error(`Error parsing storage value:`,e)}});return window.addEventListener(`storage`,t),window.addEventListener(fm,a),()=>{window.removeEventListener(`storage`,t),window.removeEventListener(fm,a)}},[e,n]),[n,r,U(()=>{if(!(typeof window>`u`))try{let i=window.localStorage.getItem(e),a=i?JSON.parse(i):t;JSON.stringify(a)!==JSON.stringify(n)&&r(a)}catch(e){console.error(`Error syncing localStorage:`,e)}},[e,t,n]),U(()=>{if(typeof window>`u`)return t;let n=window.localStorage.getItem(e);return n?JSON.parse(n):t},[e,t])]},mm=()=>{let[e,t]=dm(um.ECOSYSTEM_SHORTCUTS,[]);return{shortcuts:e,addShortcut:n=>{e.some(e=>e.url===n.url)||t([...e,n])},removeShortcut:n=>{t(e.filter(e=>e.url!==n))},isShortcut:t=>e.some(e=>e.url===t)}},hm=async(e,t,n,r,i)=>{let a=new URL(`estimate/clauses/${r.toLowerCase()}`,t);return a.searchParams.set(`type`,`smartaccount`),a.searchParams.set(`speed`,i),await(await fetch(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clauses:n,signer:e})})).json()},gm=async e=>{let t=new URL(`deposit/account`,e);return await(await fetch(t,{method:`GET`,headers:{"Content-Type":`application/json`}})).json()},_m=async(e,t,n,r)=>{let i=new URL(`sign/transaction/authorized/${n.toLowerCase()}`,r);return await(await fetch(i,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({raw:e,origin:t,token:n.toLowerCase()})})).json()},vm=async(e,t,n,r)=>{let i=await t.gas.estimateGas(e,n?.address??``),a=Math.max(i.totalGas,0);return await t.transactions.buildTransactionBody(e,a,{isDelegated:r})};function ym(e,t){return Nn.of(e.body,Na.concatBytes(e.signature??new Uint8Array,jn.of(t.slice(2)).bytes))}function bm(e,t){return Nn.decode(jn.of(e.slice(2)).bytes,t)}const xm=()=>{let{connectedWallet:e}=Q(),{data:t}=Ap(e?.address??``),{data:n}=vp(t?.address??``,e?.address??``),{preferences:r}=Sm(),i=xi.createInterface(),{network:a}=$(),{buildClausesWithAuth:s}=lm(),c=Aa.at(y(a.type).nodeUrl);return{sendTransactionUsingGenericDelegator:U(async({clauses:e,genericDelegatorUrl:a})=>{try{let l=r.gasTokenToUse,d=await hm(t?.address??``,a,e,l,`medium`),f=await gm(a),p={to:l===`VET`?f.depositAccount:o[l].address,value:l===`VET`?Bi(d.transactionCost?.toString()??`0`).toString():`0x0`,data:l===`VET`?`0x`:i.encodeFunctionData(`transfer`,[f.depositAccount,Bi(d.transactionCost?.toString()??`0`)]),comment:`Transfer ${d.transactionCost} ${l} to ${f.depositAccount}`,abi:l===`VET`?void 0:i.getFunction(`transfer`)},m=await s({clauses:[...e,p],smartAccount:t,version:n?.version??0}),h=await vm(m,c,u,!0),g=await Nn.of(h).signAsSender(jn.of(u.privateKey).bytes),_=await _m(jn.of(g.encoded).toString(),u.address,l,a),v=ym(g,_.signature),y={clauses:m,simulateTransactionOptions:{caller:u.address??``,gasPayer:_.address}},b=await c.transactions.simulateTransaction(y.clauses,{...y.simulateTransactionOptions});for(let e=0;e<b.length;e++)if(b[e].reverted)throw Error(b[e].vmError);return(await c.transactions.sendTransaction(v)).id}catch(e){console.error(`Error sending transaction using generic delegator`,e)}throw Error(`Failed to send transaction using generic delegator, no gas tokens have sufficient balance or are enabled in Gas Token Preferences`)},[r,t,n,s,c,u])}},Sm=()=>{let[e,t]=pm(um.GAS_TOKEN_PREFERENCES,a);return{preferences:e,supportedTokens:o,updatePreferences:U(e=>{t(t=>({...t,...e}))},[t]),reorderTokenPriority:U(e=>{t(t=>{let n=e.filter(e=>t.availableGasTokens.includes(e)&&!t.excludedTokens.includes(e));return{...t,tokenPriority:e,availableGasTokens:n,gasTokenToUse:n[0]??t.gasTokenToUse}})},[t]),toggleTokenExclusion:U(e=>{t(t=>{let n=t.excludedTokens.includes(e),r=n?t.excludedTokens.filter(t=>t!==e):[...t.excludedTokens,e],i=t.tokenPriority.indexOf(e),a=n?[...t.availableGasTokens.slice(0,i),e,...t.availableGasTokens.slice(i)]:t.availableGasTokens.filter(t=>t!==e);return{...t,excludedTokens:r,availableGasTokens:a,gasTokenToUse:a[0]??t.gasTokenToUse}})},[t])}},Cm=({clauses:e,enabled:t=!0,tokens:n,sendingAmount:r,sendingTokenSymbol:i})=>{let{connectedWallet:a,account:o}=Q(),{data:s}=Ap(a?.address??``),{feeDelegation:c}=$(),{balances:l}=zs(o?.address??``),{updatePreferences:u}=Sm();return or({queryKey:[`gas-estimation`,JSON.stringify(e),JSON.stringify(n),r,i],queryFn:async()=>{let t=null;for(let a of n)try{let n=await hm(s?.address??``,c?.genericDelegatorUrl??``,e,a,`medium`),o=n.transactionCost,d=Number(l.find(e=>e.symbol===a)?.balance||0),f=o+(r&&i&&a===i?Number(r):0);if(d>=f)return u({gasTokenToUse:a}),{...n,usedToken:a};t=Error(`Insufficient ${a} balance: has ${d}, needs ${f}`)}catch(e){t=e}throw t||Error(`All gas tokens failed estimation or have insufficient balance`)},enabled:t&&e.length>0&&!!s?.address&&!!c?.genericDelegatorUrl&&n.length>0&&l.length>0,staleTime:30*1e3,gcTime:300*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,retry:!1,retryDelay:1e3})},wm=({clauses:e,tokens:t,enabled:n=!0})=>{let{connectedWallet:r}=Q(),{data:i}=Ap(r?.address??``),{feeDelegation:a}=$();return or({queryKey:[`gas-estimation-all-tokens`,JSON.stringify(e),JSON.stringify(t)],queryFn:async()=>{let n={};return await Promise.all(t.map(async t=>{try{n[t]={cost:(await hm(i?.address??``,a?.genericDelegatorUrl??``,e,t,`medium`)).transactionCost||0,loading:!1}}catch(e){n[t]={cost:0,loading:!1,error:e instanceof Error?e.message:`Unknown error`}}})),n},enabled:n&&e.length>0&&!!i?.address&&!!a?.genericDelegatorUrl&&t.length>0,staleTime:30*1e3,gcTime:300*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1})},Tm=({symbol:t,amount:n,currencyValue:r,currentCurrency:i,isDisabled:a,onClick:o,...s})=>{let c=V(`colors`,`vechain-kit-text-primary`),l=V(`colors`,`vechain-kit-text-secondary`),[u]=dm(um.SHOW_ASSETS,!0);return Y(M,{height:`72px`,variant:`ghost`,justifyContent:`space-between`,isDisabled:a,p:4,w:`100%`,_disabled:{cursor:`not-allowed`,opacity:.5},onClick:o,"data-testid":`asset-${t}`,...s,children:[Y(N,{children:[S[t]?H.cloneElement(S[t],{boxSize:`24px`,borderRadius:`full`}):J(Ot,{src:e[t],alt:`${t} logo`,boxSize:`24px`,borderRadius:`full`,fallback:J(j,{boxSize:`24px`,borderRadius:`full`,bg:`whiteAlpha.200`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:J(z,{fontSize:`10px`,fontWeight:`bold`,color:c,children:t.slice(0,3)})})}),J(z,{color:c,children:t})]}),Y(B,{align:`flex-end`,spacing:0,children:[Y(z,{color:c,children:[u?n.toLocaleString(void 0,{maximumFractionDigits:2}):`*`.repeat(4),` `]}),J(z,{fontSize:`sm`,color:l,"data-testid":`${t}-balance`,children:u?qs(r,{currency:i}):`*`.repeat(4)})]})]})},Em=({address:e,domain:t,imageSrc:n,imageAlt:r=`Account`,hideAddress:i=!1,balance:a,tokenAddress:o})=>{let{t:s}=X(),c=V(`colors`,`vechain-kit-text-primary`),l=V(`colors`,`vechain-kit-text-secondary`),u=V(`colors`,`vechain-kit-card`),{isLoading:f}=Zs({address:e}),{tokens:p,isLoading:m}=Xs({address:e}),h=G(()=>o?p.find(e=>e.address===o):null,[p,o]),g=G(()=>a===void 0?h?Number(h.balance):0:a,[a,h]),_=h?.symbol||``;return f||m?Y(N,{minH:`50px`,justify:`space-between`,p:4,borderRadius:`2xl`,bg:u,children:[Y(N,{children:[J(qt,{boxSize:`40px`,borderRadius:`full`}),Y(B,{align:`start`,spacing:0,children:[J(qt,{height:`16px`,width:`120px`,borderRadius:`md`}),!i&&J(qt,{mt:2,height:`12px`,width:`100px`,borderRadius:`md`})]})]}),Y(B,{justify:`flex-start`,align:`flex-end`,spacing:0,mr:2,children:[J(z,{fontSize:`sm`,fontWeight:`medium`,color:c,children:s(`Balance`)}),J(qt,{height:`12px`,width:`80px`,borderRadius:`md`})]})]}):Y(N,{minH:`50px`,justify:`space-between`,p:4,borderRadius:`2xl`,bg:u,children:[Y(N,{children:[J(Ot,{src:n,alt:r,boxSize:`40px`,borderRadius:`full`,objectFit:`cover`}),J(B,{align:`start`,spacing:0,children:t?Y(q,{children:[J(z,{fontWeight:`medium`,fontSize:`sm`,color:c,children:t}),!i&&J(z,{fontSize:`xs`,color:l,children:d(e,6,4)})]}):J(z,{fontWeight:`medium`,fontSize:`sm`,color:c,children:d(e,6,4)})})]}),Y(B,{justify:`flex-start`,align:`flex-end`,spacing:0,mr:2,children:[J(z,{fontSize:`sm`,fontWeight:`medium`,color:c,children:s(`Balance`)}),Y(z,{fontSize:`xs`,color:l,children:[g.toLocaleString(void 0,{maximumFractionDigits:2}),_&&` ${_}`]})]})]})},Dm=({onClick:e,...t})=>J(Dt,{"aria-label":`FAQ`,icon:J(P,{as:kr,fontSize:`17px`}),size:`sm`,variant:`vechainKitHeaderIconButtons`,position:`absolute`,lineHeight:`normal`,left:`10px`,top:`8px`,onClick:e,...t}),Om=({children:e,...t})=>(rp(),J(B,{...t,children:e})),km=({wallet:e,props:t})=>{let n=vn(e?.image),r=vn(e?.address);return W(()=>{r.current!==e?.address&&(n.current=e?.image,r.current=e?.address)},[e?.address]),W(()=>{e?.image&&!e.isLoadingMetadata&&(n.current=e.image)},[e?.image,e?.isLoadingMetadata]),!t?.src&&!e?.image&&!n.current||e?.isLoadingMetadata?J(qt,{rounded:`full`,width:t?.width,height:t?.height}):J(Ot,{src:t?.src||e?.image||n.current,alt:t?.alt||e?.domain,objectFit:`cover`,rounded:`full`,...t})},Am=({transactionError:e,isSubmitting:t,isTxWaitingConfirmation:n,onConfirm:r,onRetry:i,transactionPendingText:a,txReceipt:o,isSubmitForm:s=!1,buttonText:c,isDisabled:l=!1,style:u,onError:d,gasEstimationError:f,hasEnoughGasBalance:p=!0,isLoadingGasEstimation:m=!1,showGasEstimationError:h=!1,context:g=`transaction`})=>{let{t:_}=X(),{darkMode:v}=$(),{network:b}=$(),x=G(()=>e?e.reason||_(`Something went wrong. Please try again.`):null,[e,_]);W(()=>{x&&d?.(x)},[x,d]);let S=G(()=>{if(u?.accentColor)return`${u.accentColor} !important`},[u?.accentColor]),C=G(()=>{if(!h||m||!(f||p))return null;if(!p&&!f)return{message:_(`You don't have any gas tokens enabled. Please enable at least one gas token in Gas Token Preferences.`)};if(f){let e=``;switch(g){case`send`:e=_(`Insufficient balance to complete this transfer and cover gas fees.`);break;case`customization`:e=_(`Insufficient balance to update your profile and cover gas fees.`);break;case`domain`:e=_(`Insufficient balance to claim this domain and cover gas fees.`);break;default:e=_(`Insufficient balance to complete this transaction and cover gas fees.`)}return{message:e}}return null},[f,p,m,h,g,_]);return Y(B,{width:`full`,spacing:4,children:[x&&J(j,{p:3,borderRadius:`md`,bg:v?`rgba(218, 90, 90, 0.1)`:`rgba(218, 90, 90, 0.05)`,borderWidth:`1px`,borderColor:v?`rgba(218, 90, 90, 0.3)`:`rgba(218, 90, 90, 0.2)`,w:`full`,children:J(z,{color:`#da5a5a`,fontSize:`sm`,fontWeight:`medium`,"data-testid":`tx-send-error-msg`,children:x})}),C&&!x&&J(j,{p:3,borderRadius:`md`,bg:v?`rgba(218, 90, 90, 0.1)`:`rgba(218, 90, 90, 0.05)`,borderWidth:`1px`,borderColor:v?`rgba(218, 90, 90, 0.3)`:`rgba(218, 90, 90, 0.2)`,w:`full`,children:J(z,{color:`#da5a5a`,fontSize:`sm`,fontWeight:`medium`,"data-testid":`gas-estimation-error`,children:C.message})}),J(M,{px:4,variant:x?`vechainKitSecondary`:`vechainKitPrimary`,bg:S,onClick:()=>x&&i?i():r(),type:s?`submit`:`button`,isLoading:t,isDisabled:l,loadingText:n?_(`Waiting wallet confirmation...`):a,"data-testid":`confirm-button`,children:x?_(`Retry`):c||_(`Confirm`)}),x&&o?.meta.txID&&J(Nt,{isExternal:!0,fontSize:`sm`,color:v?`whiteAlpha.600`:`blackAlpha.600`,textAlign:`center`,width:`full`,href:`${y(b.type).explorerUrl}/${o?.meta.txID}`,target:`_blank`,rel:`noopener noreferrer`,children:_(`View transaction on the explorer`)})]})},jm=({onClick:e,hasUnreadNotifications:t,...n})=>J(Dt,{"aria-label":`Notifications`,size:`sm`,variant:`ghost`,position:`absolute`,borderRadius:`50%`,left:`10px`,top:`10px`,onClick:e,icon:Y(j,{position:`relative`,children:[J(vr,{fontSize:`20px`}),t&&J(j,{position:`absolute`,top:`-1px`,right:`-1px`,minWidth:`8px`,height:`8px`,bg:`red.500`,borderRadius:`full`})]}),...n}),Mm=({isOpen:e,onClose:t,selectedToken:n,onTokenSelect:r,availableTokens:i,tokenEstimations:a,walletAddress:s})=>{let{t:c}=X(),{balances:l}=zs(s),[u,d]=H.useState(n),[f,p]=H.useState(!1),m=V(`colors`,`vechain-kit-text-primary`),h=V(`colors`,`vechain-kit-text-secondary`),g=V(`colors`,`vechain-kit-text-tertiary`),_=V(`colors`,`vechain-kit-error`),v=e=>e?g:`transparent`,y=e=>e?m:`transparent`;H.useEffect(()=>{e&&(d(n),p(!1))},[e,n]);let b=()=>{r(u,f),t()},x=e=>{let t=l.find(t=>t.symbol===e);return t?Number(t.balance).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):`0.00`},C=e=>{let t=l.find(t=>t.symbol===e),n=a[e];return!t||!n?!1:Number(t.balance)<n.cost};return Y(zo,{isOpen:e,onClose:t,size:`sm`,children:[Y(R,{children:[J(z,{fontSize:`lg`,fontWeight:`semibold`,color:m,children:c(`Fee token`)}),J(z,{fontSize:`sm`,fontWeight:`normal`,color:h,mt:1,children:c(`Select the token to pay the fee with`)})]}),J(F,{children:Y(B,{spacing:2,align:`stretch`,children:[i.map(e=>{let t=o[e],n=u===e,r=a[e]||{cost:0,loading:!0},i=C(e);return J(j,{cursor:i?`not-allowed`:`pointer`,bg:v(n),border:`1px`,borderColor:y(n),borderRadius:`md`,p:3,transition:`all 0.2s ease`,_hover:{backgroundColor:i?v(n):h&&`#ffffff12`,borderColor:i?y(n):h},opacity:i?.5:1,onClick:()=>!i&&d(e),children:Y(N,{spacing:3,justify:`space-between`,children:[Y(N,{spacing:3,flex:1,children:[H.cloneElement(S[e],{boxSize:`36px`,borderRadius:`full`}),Y(B,{align:`start`,spacing:0,children:[J(z,{fontWeight:`medium`,color:m,children:t.symbol}),Y(z,{fontSize:`xs`,color:h,children:[c(`Balance`),`:`,` `,x(e)]}),i&&J(z,{fontSize:`xs`,color:_,children:c(`Insufficient balance`)})]})]}),J(B,{align:`end`,spacing:0,children:r.loading?J(qt,{height:`16px`,width:`60px`}):Y(q,{children:[J(z,{fontSize:`sm`,fontWeight:`semibold`,color:m,children:le(r.cost,2)}),J(z,{fontSize:`xs`,color:h,children:t.symbol})]})})]})},e)}),u!==n&&Y(St,{display:`flex`,alignItems:`center`,justifyContent:`space-between`,children:[J(Ct,{htmlFor:`remember-choice`,mb:`0`,fontSize:`sm`,color:m,children:c(`Use this token for future transactions`)}),J(Xt,{id:`remember-choice`,isChecked:f,onChange:e=>p(e.target.checked),color:m})]})]})}),J(L,{children:Y(B,{spacing:3,w:`full`,children:[J(M,{variant:`vechainKitPrimary`,onClick:b,isDisabled:C(u),children:c(`Apply`)}),J(M,{variant:`ghost`,width:`full`,onClick:t,children:c(`Cancel`)})]})})]})},Nm=({estimation:e,isLoading:t,isLoadingTransaction:n,onTokenChange:r,clauses:i=[],userSelectedToken:a})=>{let{t:s}=X(),{feeDelegation:c}=$(),{connection:l,account:u}=Q(),{preferences:d,reorderTokenPriority:f}=Sm(),{isOpen:p,onOpen:m,onClose:h}=fn(),g=V(`colors`,`vechain-kit-text-primary`),_=V(`colors`,`vechain-kit-text-secondary`),[v,y]=K(()=>{let e={};return d.availableGasTokens.forEach(t=>{e[t]={cost:0,loading:!0}}),e}),{data:b,isLoading:x}=wm({clauses:i,tokens:d.availableGasTokens,enabled:i.length>0});W(()=>{!x&&b&&y(b)},[b,x]),W(()=>{e&&y(t=>({...t,[e.usedToken]:{cost:e.transactionCost||0,loading:!1}}))},[e]),W(()=>{x&&y(d.availableGasTokens.reduce((e,t)=>(e[t]={cost:0,loading:!0},e),{}))},[x,d.availableGasTokens]);let C=U((t,n)=>{n&&f([t,...d.tokenPriority.filter(e=>e!==t)]),r&&t!==e?.usedToken&&r(t)},[e,r,f,d.tokenPriority]);if(c?.delegatorUrl||l.isConnectedWithDappKit||d.availableGasTokens.length===0)return null;let{balances:w}=zs(u?.address??``),T=e=>{let t=w.find(t=>t.symbol===e),n=v[e];return!t||!n||n.loading?!0:Number(t.balance)<n.cost},E=e?.usedToken,D=d.availableGasTokens,O;E?O=E:a&&D.includes(a)?O=a:(O=D.find(e=>v[e]&&!v[e].loading&&!T(e)),O||=D.find(e=>v[e]&&!v[e].loading),O||=D[0]);let k=O?v[O]:void 0,A=E&&e?.transactionCost?e.transactionCost:k?.cost||0,ee=O?o[O]:void 0;return Y(q,{children:[J(bt,{mt:3}),Y(N,{mt:3,w:`full`,justifyContent:`start`,alignItems:`center`,children:[Y(B,{align:`start`,spacing:0,w:`full`,children:[J(z,{fontSize:`sm`,fontWeight:`light`,textAlign:`left`,w:`full`,color:_,children:s(`Fee`)}),J(N,{align:`start`,justifyContent:`space-between`,spacing:0,w:`full`,children:J(N,{justifyContent:`flex-start`,w:`full`,children:t||!E&&(!k||k.loading)||!ee?Y(q,{children:[J(qt,{height:`16px`,width:`120px`,borderRadius:`md`}),J(qt,{height:`16px`,width:`60px`,borderRadius:`md`})]}):Y(q,{children:[Y(z,{color:g,fontSize:`sm`,fontWeight:`semibold`,children:[le(A,2),` `,ee.symbol]}),Y(z,{color:_,fontSize:`xs`,children:[`≈`,` $`,(A*.01).toFixed(2)]})]})})})]}),Y(M,{onClick:m,variant:`outline`,size:`sm`,borderRadius:`full`,px:6,disabled:n,color:_,borderColor:_,_hover:{bg:_},leftIcon:H.cloneElement(S[O||d.availableGasTokens[0]],{boxSize:`20px`,borderRadius:`full`}),children:[J(z,{fontSize:`sm`,fontWeight:`semibold`,children:O||d.availableGasTokens[0]}),J(P,{as:Cr,boxSize:5,color:_})]})]}),J(Mm,{isOpen:p,onClose:h,selectedToken:O||d.availableGasTokens[0],onTokenSelect:C,availableTokens:d.availableGasTokens,tokenEstimations:v,walletAddress:u?.address??``})]})},Pm=Ca`
|
|
200
|
+
`}),Kd=({children:e,theme:t,bodyFont:n,headingFont:r})=>Y(ba,{value:G(()=>Wd(),[]),children:[J(Gd,{bodyFont:n,headingFont:r}),J(mt,{theme:t,resetCSS:!1,portalZIndex:void 0,children:e})]}),qd=({darkMode:e})=>{try{if(h(`[data-chakra-color-mode]`))return null}catch(e){console.error(e)}return J(vt,{initialColorMode:e?`dark`:`light`})},Jd=gn({portalRootRef:void 0,tokens:void 0,themeConfig:void 0}),Yd=()=>{let e=_n(Jd);if(!e)throw Error(`useVechainKitTheme must be used within a VechainKitThemeProvider`);return e},Xd=({darkMode:e=!1})=>{let{setColorMode:t,colorMode:n}=un();return W(()=>{let r=e?`dark`:`light`;n!==r&&t(r)},[e]),J(q,{})},Zd=({children:e,darkMode:t=!1,theme:n})=>{let r=vn(null),i=_n($m),a=i?i.theme:void 0,o=n??a,s=G(()=>vo(_o(t),yo(o,t)),[t,o]),c=G(()=>({...Hd(t,o),config:{...Hd(t,o).config,initialColorMode:t?`dark`:`light`}}),[t,o]);return Y(Jd.Provider,{value:{portalRootRef:r,tokens:s,themeConfig:o},children:[J(qd,{darkMode:t}),Y(Kd,{theme:c,bodyFont:s.fonts.body,headingFont:s.fonts.heading,children:[J(Xd,{darkMode:t}),J(j,{id:`vechain-kit-root`,ref:r,bg:`transparent`,borderRadius:`12px`,children:e})]}),J(Ud,{})]})},Qd=gn(null),$d=()=>{let e=_n(Qd);if(!e)throw Error(`useModal must be used within ModalProvider`);return e},ef=({children:e})=>{let{darkMode:t,theme:n}=$(),[r,i]=K(!1),[a,o]=K(`main`),[s,c]=K(!1),{setSource:l,connectV2:u}=$n(),d=U((e,t)=>{A()&&window.vechain&&window.vechain.isInAppBrowser?(l(`veworld`),u(null)):(o(e??`main`),c(t??!1),i(!0))},[]),f=U(()=>{i(!1),o(`main`),c(!1)},[]),[p,m]=K(!1),[h,g]=K(!1),[_,v]=K(`main`),y=U((e,t)=>{v(e??`main`),g(t?.isolatedView??!1),m(!0)},[]),b=U(()=>{m(!1),v(`main`),setTimeout(()=>{g(!1)},300)},[]),[x,S]=K(!1),C=U(()=>S(!0),[]),w=U(()=>S(!1),[]),[T,E]=K(!1),D=U(()=>E(!0),[]),O=U(()=>E(!1),[]),[k,ee]=K(!1),[te,ne]=K(void 0),re=U(e=>{ne(e),ee(!0)},[]),ie=U(()=>ee(!1),[]);return Y(Qd.Provider,{value:{openConnectModal:d,closeConnectModal:f,isConnectModalOpen:r,connectModalContent:a,setConnectModalContent:o,connectModalPreventAutoClose:s,setConnectModalPreventAutoClose:c,openAccountModal:y,closeAccountModal:b,isAccountModalOpen:p,setAccountModalContent:v,accountModalContent:_,isolatedView:h,openTransactionModal:C,closeTransactionModal:w,isTransactionModalOpen:x,openTransactionToast:D,closeTransactionToast:O,isTransactionToastOpen:T,openUpgradeSmartAccountModal:re,closeUpgradeSmartAccountModal:ie,isUpgradeSmartAccountModalOpen:k},children:[e,Y(Zd,{darkMode:t,theme:n,children:[J(fd,{isOpen:r,onClose:f,initialContent:a,preventAutoClose:s}),J(cd,{isOpen:p,onClose:b,initialContent:_}),J(Cd,{isOpen:k,onClose:ie,style:te})]})]})},tf=()=>{let{loginMethods:e}=$(),t=e?.length===1&&e[0].method===`dappkit`,{openConnectModal:n,closeConnectModal:r,isConnectModalOpen:i}=$d(),{open:a,close:o}=tr();return{open:t?a:e=>n(e),close:t?o:r,isOpen:t?!1:i}},nf=({children:e})=>J(q,{children:e}),rf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:()=>e(),close:t,isOpen:n}},af=({children:e})=>J(q,{children:e}),of=()=>{let{openTransactionModal:e,closeTransactionModal:t,isTransactionModalOpen:n}=$d();return{open:e,close:t,isOpen:n}},sf=({children:e})=>J(q,{children:e}),cf=()=>{let{openTransactionToast:e,closeTransactionToast:t,isTransactionToastOpen:n}=$d();return{open:e,close:t,isOpen:n}},lf=({children:e})=>J(q,{children:e}),uf=()=>{let{connection:e}=Q(),{openConnectModal:t,closeConnectModal:n,isConnectModalOpen:r,openAccountModal:i,closeAccountModal:a,isAccountModalOpen:o}=$d();return{open:n=>{e.isConnected?i(void 0,n):t()},close:()=>{o&&a(),r&&n()},isOpen:r||o}},df=({children:e})=>J(q,{children:e}),ff=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`choose-name`,props:{setCurrentContent:r,onBack:()=>r(`main`),initialContentSource:`main`}},t)},close:()=>{t()},isOpen:n}},pf=({children:e})=>J(q,{children:e}),mf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`send-token`,props:{setCurrentContent:r}},t)},close:()=>{t()},isOpen:n}},hf=({children:e})=>J(q,{children:e}),gf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`swap-token`,props:{setCurrentContent:r,fromTokenAddress:t?.fromTokenAddress,toTokenAddress:t?.toTokenAddress}},{isolatedView:t?.isolatedView})},close:()=>{t()},isOpen:n}},_f=({children:e})=>J(q,{children:e}),vf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`ecosystem`,t)},close:()=>{t()},isOpen:n}},yf=({children:e})=>J(q,{children:e}),bf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`notifications`,t)},close:()=>{t()},isOpen:n}},xf=({children:e})=>J(q,{children:e}),Sf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:t=>{e({type:`faq`,props:{onGoBack:()=>r(`main`),showLanguageSelector:!1}},t)},close:()=>{t()},isOpen:n}},Cf=({children:e})=>J(q,{children:e}),wf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n,setAccountModalContent:r}=$d();return{open:()=>{e({type:`account-customization`,props:{setCurrentContent:r}})},close:()=>{t()},isOpen:n}},Tf=({children:e})=>J(q,{children:e}),Ef=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`receive-token`,t)},close:()=>{t()},isOpen:n}},Df=({children:e})=>J(q,{children:e}),Of=()=>{let{privy:e,loginMethods:t}=$(),n=e?.appId===_,r=e=>t?Array.isArray(e)?e.some(e=>t.some(t=>t.method===e)):t.some(t=>t.method===e):!0,i=G(()=>t?t.length===0||r(`ecosystem`):!0,[t]),a=G(()=>r(`vechain`),[t]),o=G(()=>r(`dappkit`),[t]),s=G(()=>r(`passkey`),[t]),c=G(()=>r(`email`),[t]),l={showGoogleLogin:G(()=>r(`google`),[t]),showEmailLogin:c,showPasskey:s,showVeChainLogin:a,showDappKit:o,showEcosystem:i,showMoreLogin:G(()=>r(`more`),[t]),showGithubLogin:G(()=>r(`github`),[t]),isOfficialVeChainApp:!1};return e?n?{...l,isOfficialVeChainApp:!0}:{...l}:{...l,showGoogleLogin:!1,showEmailLogin:!1,showPasskey:!1,showMoreLogin:!1}},kf=e=>{let{openUpgradeSmartAccountModal:t,closeUpgradeSmartAccountModal:n,isUpgradeSmartAccountModalOpen:r}=$d();return{open:()=>t(e),close:n,isOpen:r}},Af=({children:e})=>J(q,{children:e}),jf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`profile`,t)},close:()=>{t()},isOpen:n}},Mf=({children:e})=>J(q,{children:e}),Nf=()=>{let{openAccountModal:e,closeAccountModal:t,isAccountModalOpen:n}=$d();return{open:t=>{e(`settings`,t)},close:()=>{t()},isOpen:n}},Pf=({children:e})=>J(q,{children:e}),Ff=()=>{let[e,t]=K(!1),[n,r]=K(null),[i,a]=K(null),{connection:o,account:s}=Q(),{requestCertificate:c}=er(),l=Qm();return{signMessage:U(async e=>{if(!s)throw Error(`Account not found`);t(!0),a(null),r(null);try{let t=null;return t=o.isConnectedWithDappKit?(await c({purpose:`agreement`,payload:{type:`text`,content:e}},{signer:s.address})).signature:await l.signMessage(e),r(t),t}catch(e){let t=e instanceof Error?e:Error(String(e));throw a(t),t}finally{t(!1)}},[o,l,s?.address]),isSigningPending:e,signature:n,error:i,reset:U(()=>{t(!1),r(null),a(null)},[])}},If=()=>{let[e,t]=K(!1),[n,r]=K(null),[i,a]=K(null),{signer:o}=$n(),{connection:s}=Q(),c=Qm();return{signTypedData:U(async(e,n)=>{t(!0),a(null),r(null);try{let t;if(s.isConnectedWithDappKit){let r={...e.domain,salt:e.domain?.salt?Buffer.from(e.domain.salt).toString(`hex`):void 0};t=await o.signTypedData(r,e.types,e.message,void 0,n)}else t=await c.signTypedData(e);return r(t),t}catch(e){if(e&&typeof e==`object`&&`statusCode`in e&&e.statusCode===4001){let e=Error(`User denied signature request`);throw a(e),e}let t=e instanceof Error?e:Error(typeof e==`object`?JSON.stringify(e):String(e));throw console.error(t),a(t),t}finally{t(!1)}},[s,c]),isSigningPending:e,signature:n,error:i,reset:U(()=>{t(!1),r(null),a(null)},[])}},Lf=()=>{let{loginWithPasskey:e}=Un();return{loginWithPasskey:async()=>{try{await e()}catch(e){throw e}}}};let Rf=!1;const zf=()=>{let{createWallet:e}=Bn(),{initOAuth:t}=Hn({onComplete:U(async({isNewUser:t})=>{if(t&&!Rf){Rf=!0;try{await e()}catch(e){throw Rf=!1,console.error(`Failed to create wallet:`,e),e}}},[e])});return{initOAuth:async({provider:e})=>{try{await t({provider:e})}catch(e){throw e}}}},Bf=()=>{let e=`vechain_kit_cross_app_connection`;return{setConnectionCache:U(t=>{let n={timestamp:Date.now(),ecosystemApp:t};de(e,JSON.stringify(n))},[]),getConnectionCache:U(()=>{let t=x(e);return t?JSON.parse(t):null},[]),clearConnectionCache:U(()=>{w(e)},[])}},Vf=()=>{let{login:e}=Oc(),{setConnectionCache:t}=Bf(),{data:n}=Ho([_]);return{login:async()=>{try{await e(_),t({name:`VeChain`,logoUrl:n?.[_]?.logo_url,appId:_,website:Qe})}catch(e){throw wc({error:e,mobileBrowserPopupMessage:`Your mobile browser blocked the login window. Please click 'Try again' to open the login window or change your browser settings.`,rejectedMessage:`Login request was cancelled.`,defaultMessage:`There was an unexpected issue logging in with VeChain. Please try again or contact support.`})}}}},Hf=`vechain-kit-app-hub-apps`,Uf=`vechain-kit-app-hub-apps-expiry`,Wf=()=>[`VECHAIN_KIT`,`appHub`,`apps`],Gf=async()=>{if(typeof window<`u`)try{let e=x(Hf),t=x(Uf);if(e&&t){let n=parseInt(t,10);if(Date.now()<n)return JSON.parse(e)}}catch{console.warn(`Invalid app-hub cache, fetching fresh data`)}let e=new URL(`contents/apps`,Ie),t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch app directories`);let n=(await t.json()).map(async e=>{if(e.type!==`dir`)return null;let t=new URL(`master/apps/${e.name}/manifest.json`,Ge),n=await fetch(t);if(!n.ok)return console.warn(`Failed to fetch manifest for ${e.name}`),null;try{let t=await n.json(),r=new URL(`master/apps/${e.name}/logo.png`,Ge);return{id:e.name,name:t.name,description:t.desc,url:t.href,logo:r.toString(),category:t.category,tags:t.tags||[],isVeWorldSupported:t.isVeWorldSupported||!1,repo:t.repo,contracts:t.contracts,veBetterDaoId:t.veBetterDaoId}}catch(t){return console.warn(`Error parsing manifest for ${e.name}:`,t),null}}),r=(await Promise.all(n)).filter(e=>e!==null);if(typeof window<`u`)try{de(Hf,JSON.stringify(r)),de(Uf,(Date.now()+864e5).toString())}catch(e){console.warn(`Failed to cache app-hub data:`,e)}return r},Kf=()=>or({queryKey:Wf(),queryFn:async()=>{try{return await Gf()}catch(e){let t=localStorage.getItem(Hf);if(t)return JSON.parse(t);throw e}},staleTime:1e3*60*60,retry:2}),qf=({abi:e,address:t,method:n})=>[`callClause`,t,n],Jf=e=>e.map(e=>typeof e==`bigint`?e.toString():Array.isArray(e)?Jf(e):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,typeof t==`bigint`?t.toString():t])):e),Yf=({abi:e,address:t,method:n,args:r})=>[`callClause`,t,n,...r?.length?Jf(r):[]],Xf=({address:e,abi:t,method:n,args:r,queryOptions:i})=>{let a=Qn();return or({queryKey:Yf({abi:t,address:e,method:n,args:r}),queryFn:async()=>ee({thor:a,contractAddress:e,abi:t,method:n,args:r}),...i})},Zf=({thor:e,calls:t,queryKey:n,enabled:r=!0})=>or({queryKey:n,queryFn:()=>ne({thor:e,calls:t}),enabled:r}),Qf=()=>{let{currentLanguage:e,setLanguage:t}=$();return{currentLanguage:e,setLanguage:t}},$f=()=>{let{currentCurrency:e,setCurrency:t}=$();return{currentCurrency:e,setCurrency:t}},ep=()=>{let[e,t]=K(!0),n=`vechain_kit_feature_announcement_closed`;return W(()=>{x(n)&&t(!1)},[]),{isVisible:e,closeAnnouncement:()=>{de(n,`true`),t(!1)}}},tp=()=>{let{network:e}=$();return e.nodeUrl??y(e.type).nodeUrl},np=()=>{let[e,t]=K(!0);return W(()=>{if(!A()){t(!1);return}let e=()=>{t(window.matchMedia(`(display-mode: standalone)`).matches||window.standalone||document.referrer.includes(`android-app://`))};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),e},rp=()=>{W(()=>{let e=document.querySelector(`.chakra-modal__content`);e&&(e.scrollTop=0)},[])},ip=async(e,t)=>{if(!t)throw Error(`Address is required`);let n=await e.accounts.getAccount(On.of(t));return{balance:Ii(BigInt(n.balance)).toString(),energy:Ii(BigInt(n.energy)).toString()}},ap=e=>[`VECHAIN_KIT_BALANCE`,e],op=e=>{let t=Qn();return or({queryKey:ap(e),queryFn:()=>ip(t,e),enabled:!!e&&On.isValid(e),refetchInterval:1e4})},sp=async(e,t,n)=>{if(!n)throw Error(`Network type is required`);if(!t)throw Error(`Version is required`);let r=e.contracts.load(y(n).accountFactoryAddress,Ci.abi),i;switch(t){case 1:case 2:i=r.read.accountImplementationV1();break;case 3:i=r.read.accountImplementationV3();break;default:throw Error(`Invalid version, must be between 1 and 3`)}let a=await i;if(!a)throw Error(`Failed to get account implementation address`);return a[0].toString()},cp=(e,t)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`IMPLEMENTATION_ADDRESS`,e,t],lp=e=>{let t=Qn(),{network:n}=$();return or({queryKey:cp(e,n.type),queryFn:async()=>sp(t,e,n.type),enabled:!!t&&!!e&&!!n})},up=async(e,t)=>{if(!t)throw Error(`Network type is required`);let n=await e.contracts.load(y(t).accountFactoryAddress,Ci.abi).read.currentAccountImplementationVersion();if(!n)throw Error(`Failed to get current account implementation version`);return parseInt(n[0].toString())},dp=e=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`CURRENT_ACCOUNT_IMPLEMENTATION_VERSION`,e],fp=()=>{let e=Qn(),{network:t}=$();return or({queryKey:dp(t.type),queryFn:async()=>up(e,t.type),enabled:!!e&&!!t})},pp=async(e,t,n)=>{if(!t)throw Error(`Owner address is required`);if(!n)throw Error(`Network type is required`);let r=await e.contracts.load(y(n).accountFactoryAddress,Ci.abi).read.getAccountAddress(t);if(!r)throw Error(`Failed to get account address of ${t}`);return r[0].toString()},mp=(e,t)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`ADDRESS`,e,t],hp=e=>{let t=Qn(),{network:n}=$();return or({queryKey:mp(e,n.type),queryFn:async()=>pp(t,e,n.type),enabled:!!t&&!!e&&!!n})},gp=Ci.abi,_p=(e,t,n)=>Yf({abi:gp,address:y(n).accountFactoryAddress,method:`getAccountVersion`,args:[e,t]}),vp=(e,t)=>{let{network:n}=$();return Xf({address:y(n.type).accountFactoryAddress,abi:gp,method:`getAccountVersion`,args:[e,t],queryOptions:{select:e=>({version:parseInt(e[0].toString()),isDeployed:e[1]}),enabled:!!e&&!!t}})},yp=Ci.abi,bp=async(e,t,n)=>{if(!t)throw Error(`Owner address is required`);if(!n)throw Error(`Network type is required`);let[r]=await ee({thor:e,abi:yp,contractAddress:y(n).accountFactoryAddress,method:`hasLegacyAccount`,args:[t]});return r},xp=(e,t)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`HAS_V1_SMART_ACCOUNT`,e,t],Sp=e=>{let t=Qn(),{network:n}=$();return or({queryKey:xp(e,n.type),queryFn:async()=>bp(t,e,n.type),enabled:!!t&&!!e&&!!n})},Cp=async(e,t)=>{if(!t)throw Error(`Account address is required`);let n=await e.accounts.getAccount(On.of(String(t)));if(!n)throw Error(`Account not found`);return n.hasCode},wp=e=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`IS_DEPLOYED`,e],Tp=e=>{let t=tp(),n=Aa.at(t);return or({queryKey:wp(e),queryFn:async()=>Cp(n,e),enabled:!!n&&!!e})},Ep=()=>{let e=sr(),{connectedWallet:t,smartAccount:n}=Q(),{network:r}=$();return{refresh:async()=>{let i=t?.address??``,a=n?.address??``;await Promise.all([e.cancelQueries({queryKey:mp(i,r.type)}),e.cancelQueries({queryKey:_p(a,i,r.type)}),e.cancelQueries({queryKey:xp(i,r.type)}),e.cancelQueries({queryKey:dp(r.type)}),e.cancelQueries({queryKey:Mp(a,i,3,r.type)}),e.cancelQueries({queryKey:Fp(a,3,r.type)}),e.cancelQueries({queryKey:cp(3,r.type)})]),await Promise.all([e.refetchQueries({queryKey:mp(i,r.type)}),e.refetchQueries({queryKey:_p(a,i,r.type)}),e.refetchQueries({queryKey:xp(i,r.type)}),e.refetchQueries({queryKey:dp(r.type)}),e.refetchQueries({queryKey:Mp(a,i,3,r.type)}),e.refetchQueries({queryKey:Fp(a,3,r.type)}),e.refetchQueries({queryKey:cp(3,r.type)})])}}},Dp=()=>{let e=sr(),{smartAccount:t}=Q();return{refresh:async()=>{let n=t?.address??``;await Promise.all([e.cancelQueries({queryKey:kp(n)}),e.cancelQueries({queryKey:wp(n)})]),await Promise.all([e.refetchQueries({queryKey:kp(n)}),e.refetchQueries({queryKey:wp(n)})])}}},Op=async(e,t,n)=>{if(!n)return{address:void 0};let r=await e.contracts.load(y(t).accountFactoryAddress,Ci.abi).read.getAccountAddress(n);if(!r)throw Error(`Failed to get account address of ${n}`);let i=On.of(r[0].toString()),a=await e.accounts.getAccount(i);if(!a)throw Error(`Failed to get account detail of ${i}`);return{address:i.toString(),isDeployed:a.hasCode}},kp=e=>[`VECHAIN_KIT_SMART_ACCOUNT`,e],Ap=e=>{let{network:t}=$(),n=Qn();return or({queryKey:kp(e),queryFn:()=>Op(n,t.type,e),enabled:!!e&&!!t.type&&!!n})},jp=async(e,t,n,r,i)=>{let a=await e.contracts.load(y(i).accountFactoryAddress,Ci.abi).read.upgradeRequired(t,n,BigInt(r));if(!a)throw Error(`Failed to get upgrade required of contract address ${y(i).accountFactoryAddress}`);return a[0]},Mp=(e,t,n,r)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`UPGRADE_REQUIRED`,e,t,n,r],Np=(e,t,n)=>{let r=Qn(),{network:i}=$();return or({queryKey:Mp(e,t,n,i.type),queryFn:async()=>jp(r,e,t,n,i.type),enabled:!!r&&!!e&&!!t&&!!i.type})},Pp=async(e,t,n,r)=>{let i=await e.contracts.load(y(r).accountFactoryAddress,Ci.abi).read.upgradeRequiredForAccount(t,BigInt(n));if(!i)throw Error(`Failed to get upgrade required for contract address ${t}`);return i[0]},Fp=(e,t,n)=>[`VECHAIN_KIT`,`SMART_ACCOUNT`,`FACTORY`,`NEEDS_UPGRADE_FOR_ACCOUNT`,e,t,n],Ip=(e,t)=>{let n=Qn(),{network:r}=$();return or({queryKey:Fp(e,t,r.type),queryFn:async()=>Pp(n,e,t,r.type),enabled:!!n&&!!r&&!!e&&!!t&&e!==``})},Lp=wi.createInterface(),Rp=({smartAccountAddress:e,targetVersion:t,onSuccess:n,onError:r})=>{let{refresh:i}=Ep(),{refresh:a}=Dp(),{data:o}=lp(t),s=U(async()=>{if(!e||!D(e))throw Error(`Invalid smart account address`);if(!o)throw Error(`Unable to fetch implementation address for version ${t}`);return[{to:e,value:`0x0`,data:Lp.encodeFunctionData(`upgradeToAndCall`,[o,`0x`]),comment:`Upgrade account to version ${t}`,abi:Lp.getFunction(`upgradeToAndCall`).format(`json`)}]},[e,o,t]),c=Xc({privyUIOptions:{title:`Upgrade Smart Account`,description:`Upgrading your account at ${d(e)} to version ${t}`,buttonText:`Sign to continue`},onTxConfirmed:async()=>{await Promise.all([i(),a()]),n?.()},onTxFailedOrCancelled:async()=>{r?.()}});return{...c,sendTransaction:async()=>c.sendTransaction(await s())}},zp=()=>[`VECHAIN_KIT`,`CURRENT_BLOCK`],Bp=10*ie.SECOND,Vp=()=>{let e=Qn();return or({queryKey:zp(),queryFn:async()=>{let t=await e.blocks.getBestBlockExpanded();if(!t)throw Error(`Failed to fetch current block`);return t},staleTime:1e3*60,refetchInterval:Bp})},Hp=async e=>{let t=await e.blocks.getGenesisBlock();if(!t)throw Error(`Genesis block not found`);return t.id},Up=()=>[`VECHAIN_KIT_CHAIN_ID`],Wp=()=>{let e=Qn();return or({queryKey:Up(),queryFn:()=>Hp(e),enabled:!!e})},Gp=1e3,Kp=async({thor:e,order:t=`asc`,offset:n=0,limit:r=Gp,from:i=0,to:a=e.blocks.getHeadBlock()?.number,filterCriteria:o})=>{let s=await e.logs.filterEventLogs({range:{from:i,to:a,unit:`block`},options:{offset:n,limit:r},order:t,criteriaSet:o});if(!s)throw Error(`Failed to fetch events`);return s},qp=async({nodeUrl:e,thor:t,order:n=`asc`,from:r=0,to:i,filterCriteria:a})=>{let o=[],s=0;for(;;){let c=await Kp({nodeUrl:e,thor:t,filterCriteria:a,from:r,to:i??2**53-1,limit:Gp,order:n,offset:s});if(o.push(...c),c.length<Gp)return o;s+=Gp}},Jp=xi.createInterface(),Yp=(e,t,n,r)=>{if(!e||!t||!D(e))throw Error(`Invalid receiver address or amount`);let i=[];return i.push({to:n,value:`0x0`,data:Jp.encodeFunctionData(`transfer`,[e,Bi(t)]),comment:`Transfer ${t} ${r} to ${e}`,abi:Jp.getFunction(`transfer`)}),i},Xp=({fromAddress:e,receiverAddress:t,amount:n,tokenAddress:r,tokenName:i,onSuccess:a,onError:o})=>{let{refresh:s}=jc(),c=G(()=>Yp(t,n,r,i),[t,n,r,i]),l=Xc({signerAccountAddress:e,privyUIOptions:{title:`Confirm Transfer`,description:`Transfer ${n} ${i} to ${d(t)}`,buttonText:`Sign to continue`},onTxConfirmed:async()=>{s(),a?.()},onTxFailedOrCancelled:async e=>{o?.(e instanceof Error?e.message:String(e))}});return{...l,clauses:c,sendTransaction:async()=>l.sendTransaction(c)}},Zp=(e,t)=>{if(!e||!t||!D(e))throw Error(`Invalid receiver address or amount`);if(isNaN(Number(t)))throw Error(`Invalid amount`);let n=[];try{n.push({to:e,value:Bi(t).toString(),data:`0x`,comment:`Transfer ${t} VET to ${e}`})}catch(e){throw console.error(`Error building clauses:`,e),Error(`Invalid amount format`)}return n},Qp=({fromAddress:e,receiverAddress:t,amount:n,onSuccess:r,onError:i})=>{let{refresh:a}=jc(),o=G(()=>Zp(t,n),[t,n]),s=Xc({signerAccountAddress:e,privyUIOptions:{title:`Confirm Transfer`,description:`Transfer ${n} VET to ${d(t)}`,buttonText:`Sign to continue`},onTxConfirmed:async()=>{a(),r?.()},onTxFailedOrCancelled:async e=>{i?.(e instanceof Error?e.message:String(e))}});return{...s,clauses:o,sendTransaction:async()=>s.sendTransaction(o)}},$p=({clauseBuilder:e,refetchQueryKeys:t,invalidateCache:n=!0,onSuccess:r,onFailure:i,suggestedMaxGas:a,gasPadding:o,delegationUrl:s})=>{let{account:c}=Q(),l=sr(),u=U(async()=>{n&&t?.forEach(async e=>{await l.cancelQueries({queryKey:e}),await l.refetchQueries({queryKey:e})}),r?.()},[n,r,l,t]),d=Xc({signerAccountAddress:c?.address,onTxConfirmed:u,suggestedMaxGas:a,onTxFailedOrCancelled:i,gasPadding:o,delegationUrl:s}),f=U(async t=>{d.sendTransaction(e(t),s)},[e,d,s]);return{...d,sendTransaction:f}},em=10*ie.SECOND,tm=e=>[`VECHAIN_KIT`,`TX_RECEIPT`,e],nm=(e,t=5)=>{let n=Qn();return or({queryKey:tm(e),queryFn:async()=>{let r=await n.transactions.waitForTransaction(e,{timeoutMs:t*em,intervalMs:3e3});if(!r)throw Error(`Transaction receipt not found`);return r},enabled:!!e})},rm=(e,t)=>{let n=Ni({abi:t,data:e.data.toString(),topics:e.topics.map(e=>e.toString())});return{meta:e.meta,decodedData:n}},im=({eventName:e,filterParams:t})=>[e,t?JSON.stringify(t):`all`],am=({abi:e,contractAddress:t,eventName:n,filterParams:r,mapResponse:i,nodeUrl:a})=>{let o=Qn();return or({queryFn:U(async()=>{if(!o)return[];let s=o.contracts.load(t,e).getEventAbi(n),c=s.encodeFilterTopicsNoNull(r??{}),l=(await qp({thor:o,nodeUrl:a,filterCriteria:[{criteria:{address:t,topic0:c[0]??void 0,topic1:c[1]??void 0,topic2:c[2]??void 0,topic3:c[3]??void 0,topic4:c[4]??void 0},eventAbi:s}]})).map(t=>rm(t,e));if(l.some(({decodedData:e})=>e.eventName!==n))throw Error(`Unknown event`);return l.map(e=>i({meta:e.meta,decodedData:e.decodedData}))},[o,t,e,n,r,i,a]),queryKey:G(()=>im({eventName:n,filterParams:r}),[n,r]),enabled:!!o})};function om({clauses:e,chainId:t,verifyingContract:n}){let r=[],i=[],a=[];return e.forEach(e=>{r.push(e.to??``),i.push(String(e.value)),typeof e.data==`object`&&`abi`in e.data?a.push(Fi(e.data)):a.push(e.data||`0x`)}),{domain:{name:`Wallet`,version:`1`,chainId:t,verifyingContract:n},types:{ExecuteBatchWithAuthorization:[{name:`to`,type:`address[]`},{name:`value`,type:`uint256[]`},{name:`data`,type:`bytes[]`},{name:`validAfter`,type:`uint256`},{name:`validBefore`,type:`uint256`},{name:`nonce`,type:`bytes32`}],EIP712Domain:[{name:`name`,type:`string`},{name:`version`,type:`string`},{name:`chainId`,type:`uint256`},{name:`verifyingContract`,type:`address`}]},primaryType:`ExecuteBatchWithAuthorization`,message:{to:r,value:i,data:a,validAfter:0,validBefore:Math.floor(Date.now()/1e3)+300,nonce:xn.hexlify(xn.randomBytes(32))}}}function sm({clause:e,chainId:t,smartAccount:n}){return{domain:{name:`Wallet`,version:`1`,chainId:t,verifyingContract:n.address??``},types:{ExecuteWithAuthorization:[{name:`to`,type:`address`},{name:`value`,type:`uint256`},{name:`data`,type:`bytes`},{name:`validAfter`,type:`uint256`},{name:`validBefore`,type:`uint256`}],EIP712Domain:[{name:`name`,type:`string`},{name:`version`,type:`string`},{name:`chainId`,type:`uint256`},{name:`verifyingContract`,type:`address`}]},primaryType:`ExecuteWithAuthorization`,message:{validAfter:0,validBefore:Math.floor(Date.now()/1e3)+60,to:e.to,value:String(e.value),data:(typeof e.data==`object`&&`abi`in e.data?Fi(e.data):e.data)||`0x`}}}function cm(){let{connection:e,connectedWallet:t}=Q(),{signTypedData:n}=Oc(),{signTypedData:r}=Kn(),{network:i}=$(),{data:a}=Wp();return{connection:e,connectedWallet:t,signTypedDataWithCrossApp:n,signTypedDataPrivy:r,network:i,chainId:a}}const lm=()=>{let{connection:e,connectedWallet:t,signTypedDataWithCrossApp:n,signTypedDataPrivy:r,network:i,chainId:a}=cm(),o=async e=>{let{version:t}=e;return t&&t<3?await s(e):await c(e)};async function s(o){let{clauses:s,smartAccount:c,title:l=`Sign Transaction`,description:u,buttonText:d=`Sign`}=o,f=[],p=s.map(e=>sm({clause:e,chainId:a,smartAccount:c})),m=[];for(let i=0;i<p.length;i++){let a=p[i],o=s[i];if(!o)throw Error(`Transaction clause at index ${i} is undefined`);if(e.isConnectedWithCrossApp){let e=await n({...a,address:t?.address,types:Object.fromEntries(Object.entries(a.types).map(([e,t])=>[e,[...t]]))});m.push(e);continue}let c=o.data,f=(await r(a,{uiOptions:{title:l,description:u??(s[i].comment||(typeof c==`object`&&c&&`functionName`in c?c.functionName:` `)),buttonText:d}})).signature;m.push(f)}return c.isDeployed||f.push(kn.callFunction(On.of(y(i.type).accountFactoryAddress),Dn.ofAbi(Ci.abi).getFunction(`createAccount`),[t?.address??``])),p.forEach((e,t)=>{f.push(kn.callFunction(On.of(c.address??``),Dn.ofAbi(wi.abi).getFunction(`executeWithAuthorization`),[e.message.to,BigInt(e.message.value),e.message.data,BigInt(e.message.validAfter),BigInt(e.message.validBefore),m[t]]))}),f}async function c(o){let{clauses:s,smartAccount:c,title:l,description:u,buttonText:d=`Sign`}=o,f=[],p=om({clauses:s,chainId:a,verifyingContract:c.address??``}),m;return m=e.isConnectedWithCrossApp?await n({...p,address:t?.address}):(await r(p,{uiOptions:{title:l,description:u,buttonText:d}})).signature,c.isDeployed||f.push(kn.callFunction(On.of(y(i.type).accountFactoryAddress),Dn.ofAbi(Ci.abi).getFunction(`createAccount`),[t?.address??``])),f.push(kn.callFunction(On.of(c.address??``),Dn.ofAbi(wi.abi).getFunction(`executeBatchWithAuthorization`),[p.message.to,p.message.value?.map(e=>BigInt(e))??0,p.message.data,BigInt(p.message.validAfter),BigInt(p.message.validBefore),p.message.nonce,m])),f}return{buildClausesWithAuth:o}};let um=function(e){return e.CUSTOM_TOKENS=`vechain_kit_custom_tokens`,e.ECOSYSTEM_SHORTCUTS=`vechain-kit-ecosystem-shortcuts`,e.CURRENCY=`vechain_kit_currency`,e.NODE_URL=`vechain_kit_node_url`,e.NETWORK=`vechain_kit_network`,e.GAS_TOKEN_PREFERENCES=`vechain_kit_gas_token_preferences`,e.SHOW_ASSETS=`vechain_kit_show_assets`,e}({});const dm=(e,t)=>{let[n,r]=K(()=>{try{let n=x(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}});return W(()=>{de(e,JSON.stringify(n))},[e,n]),[n,r]},fm=`vechain-kit-storage-change`,pm=(e,t)=>{let[n,r]=K(()=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(`Error loading from localStorage:`,e),t}}),i=vn(!1);return W(()=>{if(!(typeof window>`u`)){if(i.current){i.current=!1;return}try{window.localStorage.setItem(e,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(fm,{detail:{key:e,value:n}}))}catch(e){console.error(`Error writing to localStorage:`,e)}}},[e,n]),W(()=>{if(typeof window>`u`)return;let t=t=>{if(t.key===e&&t.newValue)try{let e=JSON.parse(t.newValue);JSON.stringify(e)!==JSON.stringify(n)&&(i.current=!0,r(e))}catch(e){console.error(`Error parsing storage value:`,e)}},a=(t=>{if(t.detail.key===e)try{let t=window.localStorage.getItem(e);if(t){let e=JSON.parse(t);JSON.stringify(e)!==JSON.stringify(n)&&(i.current=!0,r(e))}}catch(e){console.error(`Error parsing storage value:`,e)}});return window.addEventListener(`storage`,t),window.addEventListener(fm,a),()=>{window.removeEventListener(`storage`,t),window.removeEventListener(fm,a)}},[e,n]),[n,r,U(()=>{if(!(typeof window>`u`))try{let i=window.localStorage.getItem(e),a=i?JSON.parse(i):t;JSON.stringify(a)!==JSON.stringify(n)&&r(a)}catch(e){console.error(`Error syncing localStorage:`,e)}},[e,t,n]),U(()=>{if(typeof window>`u`)return t;let n=window.localStorage.getItem(e);return n?JSON.parse(n):t},[e,t])]},mm=()=>{let[e,t]=dm(um.ECOSYSTEM_SHORTCUTS,[]);return{shortcuts:e,addShortcut:n=>{e.some(e=>e.url===n.url)||t([...e,n])},removeShortcut:n=>{t(e.filter(e=>e.url!==n))},isShortcut:t=>e.some(e=>e.url===t)}},hm=async(e,t,n,r,i)=>{let a=new URL(`estimate/clauses/${r.toLowerCase()}`,t);return a.searchParams.set(`type`,`smartaccount`),a.searchParams.set(`speed`,i),await(await fetch(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clauses:n,signer:e})})).json()},gm=async e=>{let t=new URL(`deposit/account`,e);return await(await fetch(t,{method:`GET`,headers:{"Content-Type":`application/json`}})).json()},_m=async(e,t,n,r)=>{let i=new URL(`sign/transaction/authorized/${n.toLowerCase()}`,r);return await(await fetch(i,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({raw:e,origin:t,token:n.toLowerCase()})})).json()},vm=async(e,t,n,r)=>{let i=await t.gas.estimateGas(e,n?.address??``,{gasPadding:1}),a=Math.max(i.totalGas,0);return await t.transactions.buildTransactionBody(e,a,{isDelegated:r})};function ym(e,t){return Nn.of(e.body,Na.concatBytes(e.signature??new Uint8Array,jn.of(t.slice(2)).bytes))}function bm(e,t){return Nn.decode(jn.of(e.slice(2)).bytes,t)}const xm=()=>{let{connectedWallet:e}=Q(),{data:t}=Ap(e?.address??``),{data:n}=vp(t?.address??``,e?.address??``),{preferences:r}=Sm(),i=xi.createInterface(),{network:a}=$(),{buildClausesWithAuth:s}=lm(),c=Aa.at(y(a.type).nodeUrl);return{sendTransactionUsingGenericDelegator:U(async({clauses:e,genericDelegatorUrl:a})=>{try{let l=r.gasTokenToUse,d=await hm(t?.address??``,a,e,l,`medium`),f=await gm(a),p={to:l===`VET`?f.depositAccount:o[l].address,value:l===`VET`?Bi(d.transactionCost?.toString()??`0`).toString():`0x0`,data:l===`VET`?`0x`:i.encodeFunctionData(`transfer`,[f.depositAccount,Bi(d.transactionCost?.toString()??`0`)]),comment:`Transfer ${d.transactionCost} ${l} to ${f.depositAccount}`,abi:l===`VET`?void 0:i.getFunction(`transfer`)},m=await s({clauses:[...e,p],smartAccount:t,version:n?.version??0}),h=await vm(m,c,u,!0),g=await Nn.of(h).signAsSender(jn.of(u.privateKey).bytes),_=await _m(jn.of(g.encoded).toString(),u.address,l,a),v=ym(g,_.signature),y={clauses:m,simulateTransactionOptions:{caller:u.address??``,gasPayer:_.address}},b=await c.transactions.simulateTransaction(y.clauses,{...y.simulateTransactionOptions});for(let e=0;e<b.length;e++)if(b[e].reverted)throw Error(b[e].vmError);return(await c.transactions.sendTransaction(v)).id}catch(e){console.error(`Error sending transaction using generic delegator`,e)}throw Error(`Failed to send transaction using generic delegator, no gas tokens have sufficient balance or are enabled in Gas Token Preferences`)},[r,t,n,s,c,u])}},Sm=()=>{let[e,t]=pm(um.GAS_TOKEN_PREFERENCES,a);return{preferences:e,supportedTokens:o,updatePreferences:U(e=>{t(t=>({...t,...e}))},[t]),reorderTokenPriority:U(e=>{t(t=>{let n=e.filter(e=>t.availableGasTokens.includes(e)&&!t.excludedTokens.includes(e));return{...t,tokenPriority:e,availableGasTokens:n,gasTokenToUse:n[0]??t.gasTokenToUse}})},[t]),toggleTokenExclusion:U(e=>{t(t=>{let n=t.excludedTokens.includes(e),r=n?t.excludedTokens.filter(t=>t!==e):[...t.excludedTokens,e],i=t.tokenPriority.indexOf(e),a=n?[...t.availableGasTokens.slice(0,i),e,...t.availableGasTokens.slice(i)]:t.availableGasTokens.filter(t=>t!==e);return{...t,excludedTokens:r,availableGasTokens:a,gasTokenToUse:a[0]??t.gasTokenToUse}})},[t])}},Cm=({clauses:e,enabled:t=!0,tokens:n,sendingAmount:r,sendingTokenSymbol:i})=>{let{connectedWallet:a,account:o}=Q(),{data:s}=Ap(a?.address??``),{feeDelegation:c}=$(),{balances:l}=zs(o?.address??``),{updatePreferences:u}=Sm();return or({queryKey:[`gas-estimation`,JSON.stringify(e),JSON.stringify(n),r,i],queryFn:async()=>{let t=null;for(let a of n)try{let n=await hm(s?.address??``,c?.genericDelegatorUrl??``,e,a,`medium`),o=n.transactionCost,d=Number(l.find(e=>e.symbol===a)?.balance||0),f=o+(r&&i&&a===i?Number(r):0);if(d>=f)return u({gasTokenToUse:a}),{...n,usedToken:a};t=Error(`Insufficient ${a} balance: has ${d}, needs ${f}`)}catch(e){t=e}throw t||Error(`All gas tokens failed estimation or have insufficient balance`)},enabled:t&&e.length>0&&!!s?.address&&!!c?.genericDelegatorUrl&&n.length>0&&l.length>0,staleTime:30*1e3,gcTime:300*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,retry:!1,retryDelay:1e3})},wm=({clauses:e,tokens:t,enabled:n=!0})=>{let{connectedWallet:r}=Q(),{data:i}=Ap(r?.address??``),{feeDelegation:a}=$();return or({queryKey:[`gas-estimation-all-tokens`,JSON.stringify(e),JSON.stringify(t)],queryFn:async()=>{let n={};return await Promise.all(t.map(async t=>{try{n[t]={cost:(await hm(i?.address??``,a?.genericDelegatorUrl??``,e,t,`medium`)).transactionCost||0,loading:!1}}catch(e){n[t]={cost:0,loading:!1,error:e instanceof Error?e.message:`Unknown error`}}})),n},enabled:n&&e.length>0&&!!i?.address&&!!a?.genericDelegatorUrl&&t.length>0,staleTime:30*1e3,gcTime:300*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1})},Tm=({symbol:t,amount:n,currencyValue:r,currentCurrency:i,isDisabled:a,onClick:o,...s})=>{let c=V(`colors`,`vechain-kit-text-primary`),l=V(`colors`,`vechain-kit-text-secondary`),[u]=dm(um.SHOW_ASSETS,!0);return Y(M,{height:`72px`,variant:`ghost`,justifyContent:`space-between`,isDisabled:a,p:4,w:`100%`,_disabled:{cursor:`not-allowed`,opacity:.5},onClick:o,"data-testid":`asset-${t}`,...s,children:[Y(N,{children:[S[t]?H.cloneElement(S[t],{boxSize:`24px`,borderRadius:`full`}):J(Ot,{src:e[t],alt:`${t} logo`,boxSize:`24px`,borderRadius:`full`,fallback:J(j,{boxSize:`24px`,borderRadius:`full`,bg:`whiteAlpha.200`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:J(z,{fontSize:`10px`,fontWeight:`bold`,color:c,children:t.slice(0,3)})})}),J(z,{color:c,children:t})]}),Y(B,{align:`flex-end`,spacing:0,children:[Y(z,{color:c,children:[u?n.toLocaleString(void 0,{maximumFractionDigits:2}):`*`.repeat(4),` `]}),J(z,{fontSize:`sm`,color:l,"data-testid":`${t}-balance`,children:u?qs(r,{currency:i}):`*`.repeat(4)})]})]})},Em=({address:e,domain:t,imageSrc:n,imageAlt:r=`Account`,hideAddress:i=!1,balance:a,tokenAddress:o})=>{let{t:s}=X(),c=V(`colors`,`vechain-kit-text-primary`),l=V(`colors`,`vechain-kit-text-secondary`),u=V(`colors`,`vechain-kit-card`),{isLoading:f}=Zs({address:e}),{tokens:p,isLoading:m}=Xs({address:e}),h=G(()=>o?p.find(e=>e.address===o):null,[p,o]),g=G(()=>a===void 0?h?Number(h.balance):0:a,[a,h]),_=h?.symbol||``;return f||m?Y(N,{minH:`50px`,justify:`space-between`,p:4,borderRadius:`2xl`,bg:u,children:[Y(N,{children:[J(qt,{boxSize:`40px`,borderRadius:`full`}),Y(B,{align:`start`,spacing:0,children:[J(qt,{height:`16px`,width:`120px`,borderRadius:`md`}),!i&&J(qt,{mt:2,height:`12px`,width:`100px`,borderRadius:`md`})]})]}),Y(B,{justify:`flex-start`,align:`flex-end`,spacing:0,mr:2,children:[J(z,{fontSize:`sm`,fontWeight:`medium`,color:c,children:s(`Balance`)}),J(qt,{height:`12px`,width:`80px`,borderRadius:`md`})]})]}):Y(N,{minH:`50px`,justify:`space-between`,p:4,borderRadius:`2xl`,bg:u,children:[Y(N,{children:[J(Ot,{src:n,alt:r,boxSize:`40px`,borderRadius:`full`,objectFit:`cover`}),J(B,{align:`start`,spacing:0,children:t?Y(q,{children:[J(z,{fontWeight:`medium`,fontSize:`sm`,color:c,children:t}),!i&&J(z,{fontSize:`xs`,color:l,children:d(e,6,4)})]}):J(z,{fontWeight:`medium`,fontSize:`sm`,color:c,children:d(e,6,4)})})]}),Y(B,{justify:`flex-start`,align:`flex-end`,spacing:0,mr:2,children:[J(z,{fontSize:`sm`,fontWeight:`medium`,color:c,children:s(`Balance`)}),Y(z,{fontSize:`xs`,color:l,children:[g.toLocaleString(void 0,{maximumFractionDigits:2}),_&&` ${_}`]})]})]})},Dm=({onClick:e,...t})=>J(Dt,{"aria-label":`FAQ`,icon:J(P,{as:kr,fontSize:`17px`}),size:`sm`,variant:`vechainKitHeaderIconButtons`,position:`absolute`,lineHeight:`normal`,left:`10px`,top:`8px`,onClick:e,...t}),Om=({children:e,...t})=>(rp(),J(B,{...t,children:e})),km=({wallet:e,props:t})=>{let n=vn(e?.image),r=vn(e?.address);return W(()=>{r.current!==e?.address&&(n.current=e?.image,r.current=e?.address)},[e?.address]),W(()=>{e?.image&&!e.isLoadingMetadata&&(n.current=e.image)},[e?.image,e?.isLoadingMetadata]),!t?.src&&!e?.image&&!n.current||e?.isLoadingMetadata?J(qt,{rounded:`full`,width:t?.width,height:t?.height}):J(Ot,{src:t?.src||e?.image||n.current,alt:t?.alt||e?.domain,objectFit:`cover`,rounded:`full`,...t})},Am=({transactionError:e,isSubmitting:t,isTxWaitingConfirmation:n,onConfirm:r,onRetry:i,transactionPendingText:a,txReceipt:o,isSubmitForm:s=!1,buttonText:c,isDisabled:l=!1,style:u,onError:d,gasEstimationError:f,hasEnoughGasBalance:p=!0,isLoadingGasEstimation:m=!1,showGasEstimationError:h=!1,context:g=`transaction`})=>{let{t:_}=X(),{darkMode:v}=$(),{network:b}=$(),x=G(()=>e?e.reason||_(`Something went wrong. Please try again.`):null,[e,_]);W(()=>{x&&d?.(x)},[x,d]);let S=G(()=>{if(u?.accentColor)return`${u.accentColor} !important`},[u?.accentColor]),C=G(()=>{if(!h||m||!(f||p))return null;if(!p&&!f)return{message:_(`You don't have any gas tokens enabled. Please enable at least one gas token in Gas Token Preferences.`)};if(f){let e=``;switch(g){case`send`:e=_(`Insufficient balance to complete this transfer and cover gas fees.`);break;case`customization`:e=_(`Insufficient balance to update your profile and cover gas fees.`);break;case`domain`:e=_(`Insufficient balance to claim this domain and cover gas fees.`);break;default:e=_(`Insufficient balance to complete this transaction and cover gas fees.`)}return{message:e}}return null},[f,p,m,h,g,_]);return Y(B,{width:`full`,spacing:4,children:[x&&J(j,{p:3,borderRadius:`md`,bg:v?`rgba(218, 90, 90, 0.1)`:`rgba(218, 90, 90, 0.05)`,borderWidth:`1px`,borderColor:v?`rgba(218, 90, 90, 0.3)`:`rgba(218, 90, 90, 0.2)`,w:`full`,children:J(z,{color:`#da5a5a`,fontSize:`sm`,fontWeight:`medium`,"data-testid":`tx-send-error-msg`,children:x})}),C&&!x&&J(j,{p:3,borderRadius:`md`,bg:v?`rgba(218, 90, 90, 0.1)`:`rgba(218, 90, 90, 0.05)`,borderWidth:`1px`,borderColor:v?`rgba(218, 90, 90, 0.3)`:`rgba(218, 90, 90, 0.2)`,w:`full`,children:J(z,{color:`#da5a5a`,fontSize:`sm`,fontWeight:`medium`,"data-testid":`gas-estimation-error`,children:C.message})}),J(M,{px:4,variant:x?`vechainKitSecondary`:`vechainKitPrimary`,bg:S,onClick:()=>x&&i?i():r(),type:s?`submit`:`button`,isLoading:t,isDisabled:l,loadingText:n?_(`Waiting wallet confirmation...`):a,"data-testid":`confirm-button`,children:x?_(`Retry`):c||_(`Confirm`)}),x&&o?.meta.txID&&J(Nt,{isExternal:!0,fontSize:`sm`,color:v?`whiteAlpha.600`:`blackAlpha.600`,textAlign:`center`,width:`full`,href:`${y(b.type).explorerUrl}/${o?.meta.txID}`,target:`_blank`,rel:`noopener noreferrer`,children:_(`View transaction on the explorer`)})]})},jm=({onClick:e,hasUnreadNotifications:t,...n})=>J(Dt,{"aria-label":`Notifications`,size:`sm`,variant:`ghost`,position:`absolute`,borderRadius:`50%`,left:`10px`,top:`10px`,onClick:e,icon:Y(j,{position:`relative`,children:[J(vr,{fontSize:`20px`}),t&&J(j,{position:`absolute`,top:`-1px`,right:`-1px`,minWidth:`8px`,height:`8px`,bg:`red.500`,borderRadius:`full`})]}),...n}),Mm=({isOpen:e,onClose:t,selectedToken:n,onTokenSelect:r,availableTokens:i,tokenEstimations:a,walletAddress:s})=>{let{t:c}=X(),{balances:l}=zs(s),[u,d]=H.useState(n),[f,p]=H.useState(!1),m=V(`colors`,`vechain-kit-text-primary`),h=V(`colors`,`vechain-kit-text-secondary`),g=V(`colors`,`vechain-kit-text-tertiary`),_=V(`colors`,`vechain-kit-error`),v=e=>e?g:`transparent`,y=e=>e?m:`transparent`;H.useEffect(()=>{e&&(d(n),p(!1))},[e,n]);let b=()=>{r(u,f),t()},x=e=>{let t=l.find(t=>t.symbol===e);return t?Number(t.balance).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):`0.00`},C=e=>{let t=l.find(t=>t.symbol===e),n=a[e];return!t||!n?!1:Number(t.balance)<n.cost};return Y(zo,{isOpen:e,onClose:t,size:`sm`,children:[Y(R,{children:[J(z,{fontSize:`lg`,fontWeight:`semibold`,color:m,children:c(`Fee token`)}),J(z,{fontSize:`sm`,fontWeight:`normal`,color:h,mt:1,children:c(`Select the token to pay the fee with`)})]}),J(F,{children:Y(B,{spacing:2,align:`stretch`,children:[i.map(e=>{let t=o[e],n=u===e,r=a[e]||{cost:0,loading:!0},i=C(e);return J(j,{cursor:i?`not-allowed`:`pointer`,bg:v(n),border:`1px`,borderColor:y(n),borderRadius:`md`,p:3,transition:`all 0.2s ease`,_hover:{backgroundColor:i?v(n):h&&`#ffffff12`,borderColor:i?y(n):h},opacity:i?.5:1,onClick:()=>!i&&d(e),children:Y(N,{spacing:3,justify:`space-between`,children:[Y(N,{spacing:3,flex:1,children:[H.cloneElement(S[e],{boxSize:`36px`,borderRadius:`full`}),Y(B,{align:`start`,spacing:0,children:[J(z,{fontWeight:`medium`,color:m,children:t.symbol}),Y(z,{fontSize:`xs`,color:h,children:[c(`Balance`),`:`,` `,x(e)]}),i&&J(z,{fontSize:`xs`,color:_,children:c(`Insufficient balance`)})]})]}),J(B,{align:`end`,spacing:0,children:r.loading?J(qt,{height:`16px`,width:`60px`}):Y(q,{children:[J(z,{fontSize:`sm`,fontWeight:`semibold`,color:m,children:le(r.cost,2)}),J(z,{fontSize:`xs`,color:h,children:t.symbol})]})})]})},e)}),u!==n&&Y(St,{display:`flex`,alignItems:`center`,justifyContent:`space-between`,children:[J(Ct,{htmlFor:`remember-choice`,mb:`0`,fontSize:`sm`,color:m,children:c(`Use this token for future transactions`)}),J(Xt,{id:`remember-choice`,isChecked:f,onChange:e=>p(e.target.checked),color:m})]})]})}),J(L,{children:Y(B,{spacing:3,w:`full`,children:[J(M,{variant:`vechainKitPrimary`,onClick:b,isDisabled:C(u),children:c(`Apply`)}),J(M,{variant:`ghost`,width:`full`,onClick:t,children:c(`Cancel`)})]})})]})},Nm=({estimation:e,isLoading:t,isLoadingTransaction:n,onTokenChange:r,clauses:i=[],userSelectedToken:a})=>{let{t:s}=X(),{feeDelegation:c}=$(),{connection:l,account:u}=Q(),{preferences:d,reorderTokenPriority:f}=Sm(),{isOpen:p,onOpen:m,onClose:h}=fn(),g=V(`colors`,`vechain-kit-text-primary`),_=V(`colors`,`vechain-kit-text-secondary`),[v,y]=K(()=>{let e={};return d.availableGasTokens.forEach(t=>{e[t]={cost:0,loading:!0}}),e}),{data:b,isLoading:x}=wm({clauses:i,tokens:d.availableGasTokens,enabled:i.length>0});W(()=>{!x&&b&&y(b)},[b,x]),W(()=>{e&&y(t=>({...t,[e.usedToken]:{cost:e.transactionCost||0,loading:!1}}))},[e]),W(()=>{x&&y(d.availableGasTokens.reduce((e,t)=>(e[t]={cost:0,loading:!0},e),{}))},[x,d.availableGasTokens]);let C=U((t,n)=>{n&&f([t,...d.tokenPriority.filter(e=>e!==t)]),r&&t!==e?.usedToken&&r(t)},[e,r,f,d.tokenPriority]);if(c?.delegatorUrl||l.isConnectedWithDappKit||d.availableGasTokens.length===0)return null;let{balances:w}=zs(u?.address??``),T=e=>{let t=w.find(t=>t.symbol===e),n=v[e];return!t||!n||n.loading?!0:Number(t.balance)<n.cost},E=e?.usedToken,D=d.availableGasTokens,O;E?O=E:a&&D.includes(a)?O=a:(O=D.find(e=>v[e]&&!v[e].loading&&!T(e)),O||=D.find(e=>v[e]&&!v[e].loading),O||=D[0]);let k=O?v[O]:void 0,A=E&&e?.transactionCost?e.transactionCost:k?.cost||0,ee=O?o[O]:void 0;return Y(q,{children:[J(bt,{mt:3}),Y(N,{mt:3,w:`full`,justifyContent:`start`,alignItems:`center`,children:[Y(B,{align:`start`,spacing:0,w:`full`,children:[J(z,{fontSize:`sm`,fontWeight:`light`,textAlign:`left`,w:`full`,color:_,children:s(`Fee`)}),J(N,{align:`start`,justifyContent:`space-between`,spacing:0,w:`full`,children:J(N,{justifyContent:`flex-start`,w:`full`,children:t||!E&&(!k||k.loading)||!ee?Y(q,{children:[J(qt,{height:`16px`,width:`120px`,borderRadius:`md`}),J(qt,{height:`16px`,width:`60px`,borderRadius:`md`})]}):Y(q,{children:[Y(z,{color:g,fontSize:`sm`,fontWeight:`semibold`,children:[le(A,2),` `,ee.symbol]}),Y(z,{color:_,fontSize:`xs`,children:[`≈`,` $`,(A*.01).toFixed(2)]})]})})})]}),Y(M,{onClick:m,variant:`outline`,size:`sm`,borderRadius:`full`,px:6,disabled:n,color:_,borderColor:_,_hover:{bg:_},leftIcon:H.cloneElement(S[O||d.availableGasTokens[0]],{boxSize:`20px`,borderRadius:`full`}),children:[J(z,{fontSize:`sm`,fontWeight:`semibold`,children:O||d.availableGasTokens[0]}),J(P,{as:Cr,boxSize:5,color:_})]})]}),J(Mm,{isOpen:p,onClose:h,selectedToken:O||d.availableGasTokens[0],onTokenSelect:C,availableTokens:d.availableGasTokens,tokenEstimations:v,walletAddress:u?.address??``})]})},Pm=Ca`
|
|
201
201
|
from {
|
|
202
202
|
transform: translateY(-100%);
|
|
203
203
|
opacity: 0;
|
|
@@ -215,7 +215,7 @@ import{$ as e,C as t,D as n,G as r,H as i,J as a,Q as o,S as s,T as c,U as l,V a
|
|
|
215
215
|
transform: translateY(-100%);
|
|
216
216
|
opacity: 0;
|
|
217
217
|
}
|
|
218
|
-
`,Im=({message:e,duration:t=2e3,onClose:n})=>{let[r,i]=K(!0),a=V(`colors`,`vechain-kit-text-primary`),o=dn(`#f0f9ff`,`#0000009e`),s=dn(`#bfdbfe`,`#3b3b3b`),c=V(`colors`,`vechain-kit-primary`);return W(()=>{let e=setTimeout(()=>{i(!1),setTimeout(()=>{n?.()},300)},t);return()=>clearTimeout(e)},[t,n]),J(j,{position:`absolute`,w:`fit-content`,margin:`auto`,animation:`${r?Pm:Fm} 0.3s ease-in-out`,zIndex:10,children:J(j,{bg:o,borderWidth:1,borderColor:s,borderRadius:`md`,px:4,py:3,mx:4,mt:2,children:Y(N,{spacing:3,align:`center`,children:[J(P,{as:Sr,boxSize:5,color:c,flexShrink:0}),J(z,{fontSize:`sm`,fontWeight:`500`,color:a,flex:1,children:e})]})})})},Lm=({showFeedback:e=!1})=>{let{t}=X(),[n,r]=K(!1);return W(()=>{r(!!e)},[e]),n?J(Im,{message:t(`Account Changed`),duration:2e3,onClose:()=>{r(!1)}}):null},Rm=({isOpen:e,onClose:t,steps:n,activeStep:r,goToPrevious:i,setActiveStep:a,disableBackButton:o,disableCloseButton:s,closeOnOverlayClick:c=!0,isCloseable:l=!0})=>{let u=()=>{a(0),t()},[d]=pn(`(min-width: 1060px)`),f=n[r],p=r===0,m=!p&&!o||f?.title||d&&!s;return f?J(zo,{closeOnOverlayClick:c,isOpen:e,onClose:u,isCloseable:l,blockScrollOnMount:!0,children:J(lt,{p:0,bg:`none`,children:Y(ut,{p:0,children:[m?Y(Z,{children:[f?.title?J(R,{children:f.title}):null,!p&&!o?J(Oo,{onClick:i}):null,d&&!s?J(I,{onClick:t}):null]}):null,f?.description?J(z,{fontSize:{base:14,md:16},fontWeight:400,px:4,children:f?.description}):null,J(lr.div,{initial:`hidden`,animate:`visible`,style:{width:`100%`},children:f.content},f.key)]})})}):null},zm=({document:e,register:t,isText:n=!1})=>{let{t:r}=X(),{darkMode:i}=$(),a=e.displayName??r(`Policy`),o=i?`whiteAlpha.400`:`blackAlpha.400`,s=i?`blue.300`:`blue.500`,c=i?`blue.200`:`blue.700`,l=(()=>{if(!e.documentType)return a;switch(e.documentType){case`terms`:return e.displayName||`Terms of Service`;case`privacy`:return e.displayName||`Privacy Policy`;case`cookies`:return e.displayName||`Cookie Policy`;default:return e.displayName||`Legal Document`}})();return n?Y(Nt,{href:e.url,isExternal:!0,color:`blue.500`,textDecoration:`underline`,_hover:{color:`blue.300`,textDecoration:`underline`},fontWeight:`medium`,display:`contents`,alignItems:`center`,children:[J(kt,{...t(e.id,{required:e.required}),type:`checkbox`,hidden:!0}),l,J(P,{as:Pr,ml:1,boxSize:3})]},e.id):J(N,{width:`full`,borderRadius:`md`,transition:`all 0.2s`,children:Y(N,{align:`flex-start`,spacing:3,width:`full`,children:[J(ht,{mt:`2px`,size:`md`,colorScheme:`blue`,borderColor:o,...t(e.id,{required:e.required}),"data-testid":`tnc-checkbox`}),Y(z,{fontSize:`xs`,children:[r(`I have read and agree to `),Y(Nt,{href:e.url,isExternal:!0,color:s,textDecoration:`underline`,_hover:{color:c,textDecoration:`underline`},fontWeight:`medium`,display:`contents`,alignItems:`center`,children:[l,J(P,{as:Pr,ml:1})]}),e.required&&J(z,{as:`span`,color:`red.500`,fontWeight:`bold`,children:`*`})]})]})},e.id)},Bm=({onAgree:e,onReject:t,onlyOptionalDocuments:n=!1})=>{let{t:r}=X(),{darkMode:i}=$(),{documentsNotAgreed:a}=Jm(),{requiredDocuments:o,optionalDocuments:s}=G(()=>a.reduce((e,t)=>(t.required?e.requiredDocuments.push(t):e.optionalDocuments.push(t),e),{requiredDocuments:[],optionalDocuments:[]}),[a]),{handleSubmit:c,register:l,formState:{isValid:u},watch:d}=ra({defaultValues:G(()=>a.reduce((e,t)=>(e[t.id]=t.required,e),{}),[a])}),f=d(),p=G(()=>a.filter(e=>f[e.id]),[a,f]),m=a?.length===p.length,h=U(t=>{let n=new Set(Object.entries(t).filter(([e,t])=>t).map(([e])=>e));return e(a.filter(e=>n.has(e.id)))},[a,e]),g=i?`#3a3a3a`:`#eaeaea`,_=i?`#2a2a2a`:`#f5f5f5`,v=i?`gray.300`:`gray.600`,y=i?`0 2px 8px rgba(0, 0, 0, 0.2)`:`0 2px 8px rgba(0, 0, 0, 0.05)`,b=o.length>0,x=s.length>0,S=G(()=>{let e=s.filter(e=>f[e.id]).length;return r(m?`Accept all`:n&&e===0?`Ignore and continue`:b&&!x||b&&e===0?`Accept`:`Accept selected`)},[n,m,s,f]),C=e=>e===o.length-2&&o.length>1?r(` and `):`, `;return J(Yt,{width:`full`,children:Y(`form`,{onSubmit:c(h),children:[J(Z,{children:J(R,{children:r(`Terms and Policies`)})}),J(F,{children:Y(B,{align:`stretch`,spacing:5,width:`full`,children:[b&&Y(z,{as:`span`,fontSize:`sm`,children:[r(`By continuing, you agree to`),` `,o.map((e,t)=>Y(hn,{children:[J(zm,{document:e,register:l,isText:!0},e.id),t<o.length-1?C(t):null]},e.id)),`.`,` `,r(`Please take a moment to review all the policies, with acceptance being mandatory to continue.`)]}),n&&J(z,{fontSize:`sm`,color:v,mb:3,children:J(Ln,{i18nKey:`<bold>Your privacy matters.</bold> You’re in control, accept to enable optional features like cookies that help us enhance your experience.`,components:{bold:J(z,{as:`span`,fontWeight:`semibold`,color:v})}})}),x&&Y(Yt,{p:4,borderRadius:`xl`,bg:_,borderWidth:`1px`,borderColor:g,boxShadow:y,spacing:5,children:[J(z,{fontSize:`md`,fontWeight:`bold`,color:v,children:r(`Optional`)}),J(B,{align:`stretch`,spacing:4,children:s.map(e=>J(zm,{document:e,register:l},e.id))})]})]})}),J(L,{children:Y(B,{width:`full`,spacing:3,children:[J(M,{variant:`vechainKitPrimary`,width:`full`,type:`submit`,isDisabled:!u,"data-testid":`accept-tnc-button`,children:S}),!n&&J(M,{variant:`ghost`,width:`full`,onClick:t,"data-testid":`reject-tnc-button`,colorScheme:`red`,children:r(`Reject and logout`)})]})})]})})};var Vm=function(e){return e.REVIEW_DOCUMENTS=`REVIEW_DOCUMENTS`,e.REJECT_DOCUMENTS=`REJECT_DOCUMENTS`,e}(Vm||{});const Hm=({isOpen:e,onAgree:t,handleLogout:n,onlyOptionalDocuments:r})=>{let{t:i}=X(),{activeStep:a,goToPrevious:o,setActiveStep:s,goToNext:c}=mn({index:0,count:Object.keys(Vm).length}),l=()=>{s(0)},u=()=>{c()},d=()=>{n(),l()};return J(Rm,{isOpen:e,onClose:()=>{},goToPrevious:o,goToNext:c,setActiveStep:s,steps:G(()=>[{key:Vm.REVIEW_DOCUMENTS,content:J(Bm,{onAgree:t,onReject:u,onlyOptionalDocuments:r})},{key:Vm.REJECT_DOCUMENTS,content:J(Du,{onDisconnect:d,onBack:o,onClose:o,text:i(`Are you sure you want to reject the policies and disconnect?`),showCloseButton:!1})}],[Bm,Du,t,d]),disableCloseButton:!0,disableBackButton:!0,isCloseable:!1,closeOnOverlayClick:!1,activeStep:a})},Um=e=>`${e.documentType}-${e.url.replace(/[^\w-]+/g,`-`)}-v${e.version}`,Wm=e=>e.map(e=>({...e,id:Um(e)})),Gm=e=>e.filter(e=>!e.required),Km=(e,t)=>{let n=Date.now();return e.map(e=>({...e,walletAddress:t,timestamp:n}))},qm=gn(void 0),Jm=()=>_n(qm)||{hasAgreedToRequiredDocuments:!0,agreements:[],walletAddress:void 0,documents:[],documentsNotAgreed:[]},Ym=({children:e})=>{let{connection:t,account:n,disconnect:r}=Q(),{darkMode:i,legalDocuments:a,theme:o}=$(),[s,c]=pm(`vechain-kit-legal-documents`,[]),[l,u]=pm(`vechain-kit-legal-documents-optional-reject`,[]),[d,f]=K(!1),p=U((e,t)=>l.some(n=>O(n.walletAddress,t)&&n.id===e.id),[l]),[m,h]=G(()=>{let e=Wm([{items:a?.cookiePolicy||[],type:ue.COOKIES,source:se.APPLICATION},{items:a?.privacyPolicy||[],type:ue.PRIVACY,source:se.APPLICATION},{items:a?.termsAndConditions||[],type:ue.TERMS,source:se.APPLICATION}].flatMap(e=>e.items.map(t=>({...t,documentType:e.type,documentSource:e.source}))));return[e,e.filter(e=>e.required)]},[a]),g=G(()=>n?.address?m.filter(e=>s.some(t=>O(t.walletAddress,n.address)&&t.id===e.id)?!1:!l.some(t=>O(t.walletAddress,n.address)&&t.id===e.id)):[],[m,n?.address,s,l]),_=G(()=>!h.length||!n?.address?!0:h.every(e=>s.some(t=>O(t.walletAddress,n.address)&&t.id===e.id)),[h,s,n?.address]),v=G(()=>{if(!n?.address||!g?.length)return!1;let e=Gm(g);return e.length===0?!1:e.some(e=>!p(e,n.address))},[g,n?.address,Gm,p]),y=G(()=>_&&v,[_,v]);G(()=>{let e=new Set(s.map(e=>e.id));return m.some(t=>e.has(t.id))},[m,s]),W(()=>{t.isConnected&&n?.address?f(!_||v):f(!1)},[t.isConnected,n?.address,_,v]);let b=U((e,t)=>{let n=Array.isArray(e)?e:[e];if(!n.length)return;let r=Km(n,t);c([...s.filter(e=>!O(e.walletAddress,t)||!n.some(t=>t.id===e.id)),...r])},[s,Km]),x=U(e=>{if(!n?.address)return;let t=Gm(g);if(t.length===0)return;let r=e.map(e=>e.id),i=t.filter(e=>!r.includes(e.id));if(!i?.length)return;let a=Km(i,n.address);u(e=>[...e,...a])},[n?.address,g,Gm,Km]),S=U(e=>{if(!n?.address)return;let t=Array.isArray(e)?e:[e];t.length>0&&b(t,n.address),x(t),f(!1)},[n?.address,b,x]);return Y(qm.Provider,{value:{hasAgreedToRequiredDocuments:_,agreements:s,walletAddress:n?.address,documents:m,documentsNotAgreed:g},children:[e,J(Zd,{darkMode:i,theme:o,children:J(Hm,{isOpen:d,onAgree:S,handleLogout:y?()=>{}:()=>{r(),f(!1)},onlyOptionalDocuments:y})})]})},Xm=gn(null),Zm=({children:e,nodeUrl:t,delegatorUrl:n=ae(),delegateAllTransactions:r,genericDelegator:i})=>{let{signTypedData:a,exportWallet:o,signMessage:s}=Kn(),{signTypedData:c,signMessage:l}=Oc(),{connection:d,connectedWallet:f}=Q(),{network:p}=$(),{data:m}=Ap(f?.address??``),{data:h}=vp(m?.address??``,f?.address??``),{data:g}=Sp(f?.address??``),{buildClausesWithAuth:_}=lm(),{sendTransactionUsingGenericDelegator:v}=xm(),b=Aa.at(t),x=async(e,r,i,a)=>{if(!m?.address)throw Error(`Smart account address is not set`);let o=new ja(b,i??new Oa([{privateKey:Buffer.from(u.privateKey.slice(2),`hex`),address:u.address}],{gasPayer:{gasPayerServiceUrl:r??n}}),!0),s=a??await o.getSigner(u.address),c=Ma.transactionBodyToTransactionRequestInput(e,u.address),l=await s.signTransaction(c),d=new URL(`transactions`,t),{id:f}=await fetch(d,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({raw:l})}).then(e=>e.json());return f},S=U(async({txClauses:e=[],title:t=`Sign Transaction`,description:r,buttonText:a=`Sign`,delegationUrl:o})=>{if(!m||m&&!m.address||!f||f&&!f.address)throw Error(`Address or embedded wallet is missing`);if(i&&!o)return await v({clauses:e,genericDelegatorUrl:n??``});let s=await _({clauses:e,smartAccount:m,version:g?1:h?.version??3,title:t,description:r,buttonText:a}),c={clauses:s,simulateTransactionOptions:{caller:u.address}},l=await b.transactions.simulateTransaction(c.clauses,{...c.simulateTransactionOptions});for(let e=0;e<l.length;e++)if(l[e].reverted)return console.error(`simulatedTx1[i].vmError: ${l[e].vmError}`),l[e].vmError;return await x(await vm(s,b,u,!0),o)},[v,i,m,f,n,_,g,h,b]);return J(Xm.Provider,{value:{accountFactory:y(p.type).accountFactoryAddress,sendTransaction:S,signMessage:async e=>d.isConnectedWithCrossApp?await l(e):(await s({message:e})).signature,signTypedData:async e=>d.isConnectedWithCrossApp?await c({...e,address:f?.address,types:Object.fromEntries(Object.entries(e.types).map(([e,t])=>[e,[...t]]))}):(await a(e)).signature,exportWallet:o,delegateAllTransactions:r},children:e})},Qm=()=>{let e=_n(Xm);if(!e)throw Error(`usePrivyWalletProvider must be used within a PrivyWalletProvider`);return e},$m=gn(null),$=()=>{let e=_n($m);if(!e)throw Error(`useVeChainKitConfig must be used within VeChainKit`);return e},eh=e=>{let t=[],n={...e};if(n.dappKit||={allowedWallets:[`veworld`]},(n.privy!==void 0||n.loginMethods?.some(e=>e.method===`vechain`||e.method===`ecosystem`))&&(n.feeDelegation?!n.feeDelegation.delegatorUrl&&!n.feeDelegation.genericDelegatorUrl&&(n.feeDelegation.genericDelegatorUrl=ae()):n.feeDelegation={genericDelegatorUrl:ae()}),!n.network||!n.network.type)n.network={type:`main`};else{let e=n.network.type;[`main`,`test`,`solo`].includes(e)||t.push(`network.type must be either "main", "test" or "solo"`)}if(n.loginMethods||=[{method:`vechain`,gridColumn:4},{method:`ecosystem`,gridColumn:4},{method:`dappkit`,gridColumn:4}],n.loginMethods&&!n.privy){let e=n.loginMethods.filter(e=>[`email`,`google`,`passkey`,`more`].includes(e.method));e.length>0&&t.push(`Login methods ${e.map(e=>`"${e.method}"`).join(`, `)} require Privy configuration. Please either remove these methods or configure the privy prop.`)}if(n?.legalDocuments&&(n.legalDocuments.termsAndConditions&&n.legalDocuments.termsAndConditions.forEach(e=>{T(e.url)||t.push(`legalDocuments.termsAndConditions.url is invalid: ${e.url}`)}),n.legalDocuments.privacyPolicy&&n.legalDocuments.privacyPolicy.forEach(e=>{T(e.url)||t.push(`legalDocuments.privacyPolicy.url is invalid: ${e.url}`)}),n.legalDocuments.cookiePolicy&&n.legalDocuments.cookiePolicy.forEach(e=>{T(e.url)||t.push(`legalDocuments.cookiePolicy.url is invalid: ${e.url}`)})),t.length>0)throw Error(`VeChainKit Configuration Error:
|
|
218
|
+
`,Im=({message:e,duration:t=2e3,onClose:n})=>{let[r,i]=K(!0),a=V(`colors`,`vechain-kit-text-primary`),o=dn(`#f0f9ff`,`#0000009e`),s=dn(`#bfdbfe`,`#3b3b3b`),c=V(`colors`,`vechain-kit-primary`);return W(()=>{let e=setTimeout(()=>{i(!1),setTimeout(()=>{n?.()},300)},t);return()=>clearTimeout(e)},[t,n]),J(j,{position:`absolute`,w:`fit-content`,margin:`auto`,animation:`${r?Pm:Fm} 0.3s ease-in-out`,zIndex:10,children:J(j,{bg:o,borderWidth:1,borderColor:s,borderRadius:`md`,px:4,py:3,mx:4,mt:2,children:Y(N,{spacing:3,align:`center`,children:[J(P,{as:Sr,boxSize:5,color:c,flexShrink:0}),J(z,{fontSize:`sm`,fontWeight:`500`,color:a,flex:1,children:e})]})})})},Lm=({showFeedback:e=!1})=>{let{t}=X(),[n,r]=K(!1);return W(()=>{r(!!e)},[e]),n?J(Im,{message:t(`Account Changed`),duration:2e3,onClose:()=>{r(!1)}}):null},Rm=({isOpen:e,onClose:t,steps:n,activeStep:r,goToPrevious:i,setActiveStep:a,disableBackButton:o,disableCloseButton:s,closeOnOverlayClick:c=!0,isCloseable:l=!0})=>{let u=()=>{a(0),t()},[d]=pn(`(min-width: 1060px)`),f=n[r],p=r===0,m=!p&&!o||f?.title||d&&!s;return f?J(zo,{closeOnOverlayClick:c,isOpen:e,onClose:u,isCloseable:l,blockScrollOnMount:!0,children:J(lt,{p:0,bg:`none`,children:Y(ut,{p:0,children:[m?Y(Z,{children:[f?.title?J(R,{children:f.title}):null,!p&&!o?J(Oo,{onClick:i}):null,d&&!s?J(I,{onClick:t}):null]}):null,f?.description?J(z,{fontSize:{base:14,md:16},fontWeight:400,px:4,children:f?.description}):null,J(lr.div,{initial:`hidden`,animate:`visible`,style:{width:`100%`},children:f.content},f.key)]})})}):null},zm=({document:e,register:t,isText:n=!1})=>{let{t:r}=X(),{darkMode:i}=$(),a=e.displayName??r(`Policy`),o=i?`whiteAlpha.400`:`blackAlpha.400`,s=i?`blue.300`:`blue.500`,c=i?`blue.200`:`blue.700`,l=(()=>{if(!e.documentType)return a;switch(e.documentType){case`terms`:return e.displayName||`Terms of Service`;case`privacy`:return e.displayName||`Privacy Policy`;case`cookies`:return e.displayName||`Cookie Policy`;default:return e.displayName||`Legal Document`}})();return n?Y(Nt,{href:e.url,isExternal:!0,color:`blue.500`,textDecoration:`underline`,_hover:{color:`blue.300`,textDecoration:`underline`},fontWeight:`medium`,display:`contents`,alignItems:`center`,children:[J(kt,{...t(e.id,{required:e.required}),type:`checkbox`,hidden:!0}),l,J(P,{as:Pr,ml:1,boxSize:3})]},e.id):J(N,{width:`full`,borderRadius:`md`,transition:`all 0.2s`,children:Y(N,{align:`flex-start`,spacing:3,width:`full`,children:[J(ht,{mt:`2px`,size:`md`,colorScheme:`blue`,borderColor:o,...t(e.id,{required:e.required}),"data-testid":`tnc-checkbox`}),Y(z,{fontSize:`xs`,children:[r(`I have read and agree to `),Y(Nt,{href:e.url,isExternal:!0,color:s,textDecoration:`underline`,_hover:{color:c,textDecoration:`underline`},fontWeight:`medium`,display:`contents`,alignItems:`center`,children:[l,J(P,{as:Pr,ml:1})]}),e.required&&J(z,{as:`span`,color:`red.500`,fontWeight:`bold`,children:`*`})]})]})},e.id)},Bm=({onAgree:e,onReject:t,onlyOptionalDocuments:n=!1})=>{let{t:r}=X(),{darkMode:i}=$(),{documentsNotAgreed:a}=Jm(),{requiredDocuments:o,optionalDocuments:s}=G(()=>a.reduce((e,t)=>(t.required?e.requiredDocuments.push(t):e.optionalDocuments.push(t),e),{requiredDocuments:[],optionalDocuments:[]}),[a]),{handleSubmit:c,register:l,formState:{isValid:u},watch:d}=ra({defaultValues:G(()=>a.reduce((e,t)=>(e[t.id]=t.required,e),{}),[a])}),f=d(),p=G(()=>a.filter(e=>f[e.id]),[a,f]),m=a?.length===p.length,h=U(t=>{let n=new Set(Object.entries(t).filter(([e,t])=>t).map(([e])=>e));return e(a.filter(e=>n.has(e.id)))},[a,e]),g=i?`#3a3a3a`:`#eaeaea`,_=i?`#2a2a2a`:`#f5f5f5`,v=i?`gray.300`:`gray.600`,y=i?`0 2px 8px rgba(0, 0, 0, 0.2)`:`0 2px 8px rgba(0, 0, 0, 0.05)`,b=o.length>0,x=s.length>0,S=G(()=>{let e=s.filter(e=>f[e.id]).length;return r(m?`Accept all`:n&&e===0?`Ignore and continue`:b&&!x||b&&e===0?`Accept`:`Accept selected`)},[n,m,s,f]),C=e=>e===o.length-2&&o.length>1?r(` and `):`, `;return J(Yt,{width:`full`,children:Y(`form`,{onSubmit:c(h),children:[J(Z,{children:J(R,{children:r(`Terms and Policies`)})}),J(F,{children:Y(B,{align:`stretch`,spacing:5,width:`full`,children:[b&&Y(z,{as:`span`,fontSize:`sm`,children:[r(`By continuing, you agree to`),` `,o.map((e,t)=>Y(hn,{children:[J(zm,{document:e,register:l,isText:!0},e.id),t<o.length-1?C(t):null]},e.id)),`.`,` `,r(`Please take a moment to review all the policies, with acceptance being mandatory to continue.`)]}),n&&J(z,{fontSize:`sm`,color:v,mb:3,children:J(Ln,{i18nKey:`<bold>Your privacy matters.</bold> You’re in control, accept to enable optional features like cookies that help us enhance your experience.`,components:{bold:J(z,{as:`span`,fontWeight:`semibold`,color:v})}})}),x&&Y(Yt,{p:4,borderRadius:`xl`,bg:_,borderWidth:`1px`,borderColor:g,boxShadow:y,spacing:5,children:[J(z,{fontSize:`md`,fontWeight:`bold`,color:v,children:r(`Optional`)}),J(B,{align:`stretch`,spacing:4,children:s.map(e=>J(zm,{document:e,register:l},e.id))})]})]})}),J(L,{children:Y(B,{width:`full`,spacing:3,children:[J(M,{variant:`vechainKitPrimary`,width:`full`,type:`submit`,isDisabled:!u,"data-testid":`accept-tnc-button`,children:S}),!n&&J(M,{variant:`ghost`,width:`full`,onClick:t,"data-testid":`reject-tnc-button`,colorScheme:`red`,children:r(`Reject and logout`)})]})})]})})};var Vm=function(e){return e.REVIEW_DOCUMENTS=`REVIEW_DOCUMENTS`,e.REJECT_DOCUMENTS=`REJECT_DOCUMENTS`,e}(Vm||{});const Hm=({isOpen:e,onAgree:t,handleLogout:n,onlyOptionalDocuments:r})=>{let{t:i}=X(),{activeStep:a,goToPrevious:o,setActiveStep:s,goToNext:c}=mn({index:0,count:Object.keys(Vm).length}),l=()=>{s(0)},u=()=>{c()},d=()=>{n(),l()};return J(Rm,{isOpen:e,onClose:()=>{},goToPrevious:o,goToNext:c,setActiveStep:s,steps:G(()=>[{key:Vm.REVIEW_DOCUMENTS,content:J(Bm,{onAgree:t,onReject:u,onlyOptionalDocuments:r})},{key:Vm.REJECT_DOCUMENTS,content:J(Du,{onDisconnect:d,onBack:o,onClose:o,text:i(`Are you sure you want to reject the policies and disconnect?`),showCloseButton:!1})}],[Bm,Du,t,d]),disableCloseButton:!0,disableBackButton:!0,isCloseable:!1,closeOnOverlayClick:!1,activeStep:a})},Um=e=>`${e.documentType}-${e.url.replace(/[^\w-]+/g,`-`)}-v${e.version}`,Wm=e=>e.map(e=>({...e,id:Um(e)})),Gm=e=>e.filter(e=>!e.required),Km=(e,t)=>{let n=Date.now();return e.map(e=>({...e,walletAddress:t,timestamp:n}))},qm=gn(void 0),Jm=()=>_n(qm)||{hasAgreedToRequiredDocuments:!0,agreements:[],walletAddress:void 0,documents:[],documentsNotAgreed:[]},Ym=({children:e})=>{let{connection:t,account:n,disconnect:r}=Q(),{darkMode:i,legalDocuments:a,theme:o}=$(),[s,c]=pm(`vechain-kit-legal-documents`,[]),[l,u]=pm(`vechain-kit-legal-documents-optional-reject`,[]),[d,f]=K(!1),p=U((e,t)=>l.some(n=>O(n.walletAddress,t)&&n.id===e.id),[l]),[m,h]=G(()=>{let e=Wm([{items:a?.cookiePolicy||[],type:ue.COOKIES,source:se.APPLICATION},{items:a?.privacyPolicy||[],type:ue.PRIVACY,source:se.APPLICATION},{items:a?.termsAndConditions||[],type:ue.TERMS,source:se.APPLICATION}].flatMap(e=>e.items.map(t=>({...t,documentType:e.type,documentSource:e.source}))));return[e,e.filter(e=>e.required)]},[a]),g=G(()=>n?.address?m.filter(e=>s.some(t=>O(t.walletAddress,n.address)&&t.id===e.id)?!1:!l.some(t=>O(t.walletAddress,n.address)&&t.id===e.id)):[],[m,n?.address,s,l]),_=G(()=>!h.length||!n?.address?!0:h.every(e=>s.some(t=>O(t.walletAddress,n.address)&&t.id===e.id)),[h,s,n?.address]),v=G(()=>{if(!n?.address||!g?.length)return!1;let e=Gm(g);return e.length===0?!1:e.some(e=>!p(e,n.address))},[g,n?.address,Gm,p]),y=G(()=>_&&v,[_,v]);G(()=>{let e=new Set(s.map(e=>e.id));return m.some(t=>e.has(t.id))},[m,s]),W(()=>{t.isConnected&&n?.address?f(!_||v):f(!1)},[t.isConnected,n?.address,_,v]);let b=U((e,t)=>{let n=Array.isArray(e)?e:[e];if(!n.length)return;let r=Km(n,t);c([...s.filter(e=>!O(e.walletAddress,t)||!n.some(t=>t.id===e.id)),...r])},[s,Km]),x=U(e=>{if(!n?.address)return;let t=Gm(g);if(t.length===0)return;let r=e.map(e=>e.id),i=t.filter(e=>!r.includes(e.id));if(!i?.length)return;let a=Km(i,n.address);u(e=>[...e,...a])},[n?.address,g,Gm,Km]),S=U(e=>{if(!n?.address)return;let t=Array.isArray(e)?e:[e];t.length>0&&b(t,n.address),x(t),f(!1)},[n?.address,b,x]);return Y(qm.Provider,{value:{hasAgreedToRequiredDocuments:_,agreements:s,walletAddress:n?.address,documents:m,documentsNotAgreed:g},children:[e,J(Zd,{darkMode:i,theme:o,children:J(Hm,{isOpen:d,onAgree:S,handleLogout:y?()=>{}:()=>{r(),f(!1)},onlyOptionalDocuments:y})})]})},Xm=gn(null),Zm=({children:e,nodeUrl:t,delegatorUrl:n=ae(),delegateAllTransactions:r,genericDelegator:i})=>{let{signTypedData:a,exportWallet:o,signMessage:s}=Kn(),{signTypedData:c,signMessage:l}=Oc(),{connection:d,connectedWallet:f}=Q(),{network:p}=$(),{data:m}=Ap(f?.address??``),{data:h}=vp(m?.address??``,f?.address??``),{data:g}=Sp(f?.address??``),{buildClausesWithAuth:_}=lm(),{sendTransactionUsingGenericDelegator:v}=xm(),b=Aa.at(t),x=async(e,r,i,a)=>{if(!m?.address)throw Error(`Smart account address is not set`);let o=new ja(b,i??new Oa([{privateKey:Buffer.from(u.privateKey.slice(2),`hex`),address:u.address}],{gasPayer:{gasPayerServiceUrl:r??n}}),!0),s=a??await o.getSigner(u.address),c=Ma.transactionBodyToTransactionRequestInput(e,u.address),l=await s.signTransaction(c),d=new URL(`transactions`,t),{id:f}=await fetch(d,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({raw:l})}).then(e=>e.json());return f},S=U(async({txClauses:e=[],title:t=`Sign Transaction`,description:r,buttonText:a=`Sign`,delegationUrl:o})=>{if(!m||m&&!m.address||!f||f&&!f.address)throw Error(`Address or embedded wallet is missing`);if(i&&!o)return await v({clauses:e,genericDelegatorUrl:n??``});let s=await _({clauses:e,smartAccount:m,version:h?.version??(g?1:3),title:t,description:r,buttonText:a}),c={clauses:s,simulateTransactionOptions:{caller:u.address}},l=await b.transactions.simulateTransaction(c.clauses,{...c.simulateTransactionOptions});for(let e=0;e<l.length;e++)if(l[e].reverted)return console.error(`simulatedTx1[i].vmError: ${l[e].vmError}`),l[e].vmError;return await x(await vm(s,b,u,!0),o)},[v,i,m,f,n,_,g,h,b]);return J(Xm.Provider,{value:{accountFactory:y(p.type).accountFactoryAddress,sendTransaction:S,signMessage:async e=>d.isConnectedWithCrossApp?await l(e):(await s({message:e})).signature,signTypedData:async e=>d.isConnectedWithCrossApp?await c({...e,address:f?.address,types:Object.fromEntries(Object.entries(e.types).map(([e,t])=>[e,[...t]]))}):(await a(e)).signature,exportWallet:o,delegateAllTransactions:r},children:e})},Qm=()=>{let e=_n(Xm);if(!e)throw Error(`usePrivyWalletProvider must be used within a PrivyWalletProvider`);return e},$m=gn(null),$=()=>{let e=_n($m);if(!e)throw Error(`useVeChainKitConfig must be used within VeChainKit`);return e},eh=e=>{let t=[],n={...e};if(n.dappKit||={allowedWallets:[`veworld`]},(n.privy!==void 0||n.loginMethods?.some(e=>e.method===`vechain`||e.method===`ecosystem`))&&(n.feeDelegation?!n.feeDelegation.delegatorUrl&&!n.feeDelegation.genericDelegatorUrl&&(n.feeDelegation.genericDelegatorUrl=ae()):n.feeDelegation={genericDelegatorUrl:ae()}),!n.network||!n.network.type)n.network={type:`main`};else{let e=n.network.type;[`main`,`test`,`solo`].includes(e)||t.push(`network.type must be either "main", "test" or "solo"`)}if(n.loginMethods||=[{method:`vechain`,gridColumn:4},{method:`ecosystem`,gridColumn:4},{method:`dappkit`,gridColumn:4}],n.loginMethods&&!n.privy){let e=n.loginMethods.filter(e=>[`email`,`google`,`passkey`,`more`].includes(e.method));e.length>0&&t.push(`Login methods ${e.map(e=>`"${e.method}"`).join(`, `)} require Privy configuration. Please either remove these methods or configure the privy prop.`)}if(n?.legalDocuments&&(n.legalDocuments.termsAndConditions&&n.legalDocuments.termsAndConditions.forEach(e=>{T(e.url)||t.push(`legalDocuments.termsAndConditions.url is invalid: ${e.url}`)}),n.legalDocuments.privacyPolicy&&n.legalDocuments.privacyPolicy.forEach(e=>{T(e.url)||t.push(`legalDocuments.privacyPolicy.url is invalid: ${e.url}`)}),n.legalDocuments.cookiePolicy&&n.legalDocuments.cookiePolicy.forEach(e=>{T(e.url)||t.push(`legalDocuments.cookiePolicy.url is invalid: ${e.url}`)})),t.length>0)throw Error(`VeChainKit Configuration Error:
|
|
219
219
|
`+t.join(`
|
|
220
220
|
`));return n},th=`vechain_kit_currency`,nh=e=>{let{children:t,privy:n,feeDelegation:r,dappKit:i,loginModalUI:a,loginMethods:o,darkMode:s=!1,i18n:c,language:l=`en`,network:u,allowCustomTokens:d,allowCommunityTokens:p=!1,legalDocuments:m,defaultCurrency:h=`usd`,theme:g,onLanguageChange:_,onCurrencyChange:v}=eh(e),b=u?.type??`main`,S=u?.nodeUrl??y(b).nodeUrl,C={...u,type:b,nodeUrl:S},w=i??{allowedWallets:[`veworld`]},[T,E]=K(()=>typeof window<`u`&&x(`i18nextLng`)||l),[D,O]=K(()=>{try{return x(th)||h}catch{return h}}),k=vn(!1),A=vn(!1),ee=o,te=G(()=>ee?.find(e=>e.method===`ecosystem`)?.allowedApps??f.map(e=>e.id),[ee]),ne,ie;n?(ne=n.appId,ie=n.clientId):(ne=`clzdb5k0b02b9qvzjm6jpknsc`,ie=`client-WY2oy87y6KNrHFnpXuwVsiFMkwPZKTYpExtjvUQuMbCMF`),W(()=>{ro(no),c&&Object.keys(c).forEach(e=>{no.addResourceBundle(e,`translation`,c[e],!0,!0)});let e=(typeof window<`u`?x(`i18nextLng`):null)||T;e&&no.language!==e&&(k.current=!0,no.changeLanguage(e),e!==T&&E(e),k.current=!1)},[]),W(()=>{let e=typeof window<`u`?x(`i18nextLng`):null;l&&!e&&l!==T&&(k.current=!0,no.changeLanguage(l),E(l),k.current=!1)},[l,T]),W(()=>{let e=e=>{!k.current&&e!==T&&(E(e),_?.(e))};return no.on(`languageChanged`,e),()=>{no.off(`languageChanged`,e)}},[T,_]),W(()=>{let e=x(th);h&&!e&&h!==D&&(A.current=!0,O(h),de(th,h),A.current=!1)},[h,D]),W(()=>{let e=()=>{try{let e=x(th);if(e&&e!==D&&!A.current){let t=e;O(t),v?.(t)}}catch{}};e();let t=t=>{t.key===th&&t.newValue&&e()};window.addEventListener(`storage`,t);let n=setInterval(e,500);return()=>{window.removeEventListener(`storage`,t),clearInterval(n)}},[D,v]);let ae=e=>{k.current=!0,no.changeLanguage(e),E(e),k.current=!1},oe=e=>{A.current=!0,O(e),de(th,e),A.current=!1};W(()=>{de(re.NETWORK,b)},[b]);let se=G(()=>vo(_o(s),yo(g,s)),[g,s]),ce=G(()=>xo(se,s),[se,s]),le=G(()=>So(se,s),[se,s]);return W(()=>{let e=bo(se.colors.background.card,s),t=bo(se.colors.background.cardElevated,s),n=s?`transparent`:`#ffffff`,r=s?`transparent`:`#ffffff`,i=s?`transparent`:`#ffffff`;wo(le,se.effects.backdropFilter.modal,e,t,n,r,i,se.colors.border.default)},[le,se.effects.backdropFilter.modal,se.colors.background.card,se.colors.background.cardElevated,se.colors.border.default,s]),W(()=>{Co()},[]),Y(Do,{children:[J(Jn,{initialIsOpen:!1}),J(Dc,{privyEcosystemAppIDS:te,children:J($m.Provider,{value:{privy:n,privyEcosystemAppIDS:te,feeDelegation:r,dappKit:w,loginModalUI:a,loginMethods:ee,darkMode:s,i18n:c,currentLanguage:T,network:C,allowCustomTokens:d,allowCommunityTokens:p,legalDocuments:m,currentCurrency:D,theme:g,setLanguage:ae,setCurrency:oe},children:J(zn,{appId:ne,clientId:ie,config:{loginMethodsAndOrder:{primary:n?.loginMethods.slice(0,4)??[],overflow:n?.loginMethods.slice(4)??[]},externalWallets:{walletConnect:{enabled:!1}},appearance:{theme:s?`dark`:`light`,accentColor:n?.appearance.accentColor??(se.buttons.primaryButton.bg?.startsWith(`#`)?se.buttons.primaryButton.bg:s?`#3182CE`:`#2B6CB0`),loginMessage:n?.appearance.loginMessage,logo:n?.appearance.logo},embeddedWallets:{createOnLogin:n?.embeddedWallets?.createOnLogin??`all-users`},passkeys:{shouldUnlinkOnUnenrollMfa:!1},customOAuthRedirectUrl:n?.customOAuthRedirectUrl},children:J(Yn,{node:C.nodeUrl,alwaysShowConnect:!0,v2Api:{enabled:w.v2Api?.enabled??!0,external:w.v2Api?.external??!1},language:T,logLevel:w.logLevel,modalParent:w.modalParent,onSourceClick:w.onSourceClick,usePersistence:w.usePersistence??!0,allowedWallets:w.allowedWallets,walletConnectOptions:w.walletConnectOptions,themeMode:s?`DARK`:`LIGHT`,themeVariables:w.themeVariables?{...ce,...w.themeVariables}:ce,children:J(Zm,{nodeUrl:C.nodeUrl,delegatorUrl:r?.delegatorUrl??r?.genericDelegatorUrl,delegateAllTransactions:r?.delegateAllTransactions??!1,genericDelegator:!!(!r?.delegatorUrl&&r?.genericDelegatorUrl),children:J(ef,{children:J(Ym,{children:t})})})})})})})]})};export{km as AccountAvatar,Tf as AccountCustomizationModalProvider,Jl as AccountDetailsButton,Al as AccountMainContent,cd as AccountModal,af as AccountModalProvider,Xl as AccountSelector,Yl as ActionButton,ko as AddressDisplay,Em as AddressDisplayCard,Tm as AssetButton,fu as AssetsContent,Ql as BalanceSection,zo as BaseModal,We as BetterSwapLogo,mu as BridgeContent,t as CURRENCY_SYMBOLS,hu as ChangeCurrencyContent,Bl as ChooseNameContent,pf as ChooseNameModalProvider,Wl as ChooseNameSearchContent,Gl as ChooseNameSummaryContent,Xd as ColorModeSync,fd as ConnectModal,nf as ConnectModalProvider,md as ConnectPopover,pd as ConnectionButton,au as CrossAppConnectionSecurityCard,ou as CustomizationContent,su as CustomizationSummaryContent,Xn as DAppKitWalletButton,Tl as DappKitButton,Du as DisconnectConfirmContent,iu as DomainRequiredAlert,s as ENS_TEXT_RECORDS,Ol as EcosystemButton,dd as EcosystemContent,yl as EmailLoginButton,ud as ErrorContent,ru as ExchangeWarningAlert,yf as ExploreEcosystemModalProvider,ql as FAQContent,Cf as FAQModalProvider,nu as FeatureAnnouncementCard,Nm as GasFeeSummary,Mm as GasFeeTokenSelector,yu as GasTokenSettingsContent,Me as GitHubLogo,Pe as GoogleLogo,Im as InlineFeedback,gu as LanguageSettingsContent,zm as LegalDocumentItem,se as LegalDocumentSource,ue as LegalDocumentType,Hm as LegalDocumentsModal,Ym as LegalDocumentsProvider,ld as LoadingContent,um as LocalStorageKey,xl as LoginWithGithubButton,bl as LoginWithGoogleButton,zc as MAX_IMAGE_SIZE,kl as MainContent,pu as ManageCustomTokenContent,Oo as ModalBackButton,Dm as ModalFAQButton,jm as ModalNotificationButton,ef as ModalProvider,ce as NFTMediaType,xf as NotificationsModalProvider,Bs as PRICE_FEED_IDS,wl as PasskeyLoginButton,El as PrivyButton,Ve as PrivyLogo,Zm as PrivyWalletProvider,uu as ProfileContent,Mf as ProfileModalProvider,tu as QuickActionsSection,Df as ReceiveModalProvider,Fl as ReceiveTokenContent,ju as RemoveWalletConfirmContent,Om as ScrollToTopWrapper,jl as SelectTokenContent,Au as SelectWalletContent,Nl as SendTokenContent,hf as SendTokenModalProvider,Pl as SendTokenSummaryContent,bu as SettingsContent,Pf as SettingsModalProvider,rd as ShareButtons,vd as SocialIcons,Io as StickyFooterContainer,Z as StickyHeaderContainer,zl as SwapTokenContent,_f as SwapTokenModalProvider,Eu as TermsAndPrivacyContent,ka as ThorClient,Am as TransactionButtonAndStatus,ad as TransactionModal,id as TransactionModalContent,sf as TransactionModalProvider,bd as TransactionToast,lf as TransactionToastProvider,Ne as TwitterLogo,du as UpgradeSmartAccountContent,Cd as UpgradeSmartAccountModal,Af as UpgradeSmartAccountModalProvider,Ee as VETLogo,we as VTHOLogo,ge as VeBetterIcon,ye as VeBetterIconDark,Se as VeBetterIconLight,De as VeBetterLogo,$e as VeBetterLogoDark,pe as VeBetterLogoLight,$m as VeChainKitContext,nh as VeChainKitProvider,Cl as VeChainLoginButton,Sl as VeChainWithPrivyLoginButton,c as VePassportUserStatus,Je as VeTradeLogo,He as VeWorldLogoDark,Ce as VeWorldLogoLight,qe as VechainEnergy,Ae as VechainIcon,ve as VechainIconDark,ke as VechainIconLight,Zd as VechainKitThemeProvider,be as VechainLogo,Ke as VechainLogoDark,_e as VechainLogoHorizontalDark,je as VechainLogoHorizontalLight,xe as VechainLogoLight,No as VersionFooter,_d as WalletButton,df as WalletModalProvider,Lm as WalletSwitchFeedback,om as buildBatchAuthorizationTypedData,oe as buildCallClauses,Ss as buildClauses,Yp as buildERC20Clauses,sm as buildSingleAuthorizationTypedData,Zp as buildVETClauses,is as buildVetDomainClauses,v as calculateTotalCost,Kc as compressImages,zp as currentBlockQueryKey,rm as decodeEventLog,bm as decodeRawTx,_m as delegateAuthorized,vm as estimateAndBuildTxBody,hm as estimateGas,ee as executeCallClause,ne as executeMultipleClausesCall,Gf as fetchAppHubApps,Bo as fetchPrivyAppInfo,Uo as fetchPrivyStatus,le as formatGasCost,pp as getAccountAddress,mp as getAccountAddressQueryKey,ip as getAccountBalance,ap as getAccountBalanceQueryKey,sp as getAccountImplementationAddress,cp as getAccountImplementationAddressQueryKey,_p as getAccountVersionQueryKey,qp as getAllEventLogs,Wf as getAppHubAppsQueryKey,Ms as getAvatarLegacy,Ns as getAvatarLegacyQueryKey,Os as getAvatarOfAddressQueryKey,hs as getAvatarQueryKey,oc as getB3trBalanceQueryKey,qf as getCallClauseQueryKey,Yf as getCallClauseQueryKeyWithArgs,Hp as getChainId,Up as getChainIdQueryKey,y as getConfig,up as getCurrentAccountImplementationVersion,dp as getCurrentAccountImplementationVersionQueryKey,ec as getCurrentAllocationsRoundIdQueryKey,cc as getCustomTokenBalanceQueryKey,rc as getCustomTokenInfoQueryKey,gm as getDepositAccount,fs as getDomainsOfAddress,ps as getDomainsOfAddressQueryKey,Jo as getEnsRecordExistsQueryKey,uc as getErc20BalanceQueryKey,Kp as getEventLogs,im as getEventsKey,bp as getHasV1SmartAccount,xp as getHasV1SmartAccountQueryKey,Bc as getIpfsImage,Vc as getIpfsImageQueryKey,Ic as getIpfsMetadata,Lc as getIpfsMetadataQueryKey,Cp as getIsDeployed,wp as getIsDeployedQueryKey,os as getIsDomainProtectedQueryKey,mc as getIsPersonQueryKey,Vo as getPrivyAppInfoQueryKey,ws as getResolverAddressQueryKey,vc as getRoundXAppsQueryKey,Op as getSmartAccount,kp as getSmartAccountQueryKey,vs as getTextRecords,ys as getTextRecordsQueryKey,nc as getTokenInfo,Vs as getTokenUsdPrice,Hs as getTokenUsdPriceQueryKey,jp as getUpgradeRequired,Pp as getUpgradeRequiredForAccount,Fp as getUpgradeRequiredForAccountQueryKey,Mp as getUpgradeRequiredQueryKey,Go as getVechainDomainQueryKey,fc as getVot3BalanceQueryKey,Nc as getXAppMetadata,xc as getXAppsSharesQueryKey,Gc as imageCompressionOptions,ym as signVip191Transaction,tm as txReceiptQueryKey,op as useAccountBalance,wf as useAccountCustomizationModal,lp as useAccountImplementationAddress,rf as useAccountModal,Ml as useAccountModalOptions,Kf as useAppHubApps,lm as useBuildClauses,$p as useBuildTransaction,Xf as useCallClause,ff as useChooseNameModal,ts as useClaimVeWorldSubdomain,as as useClaimVetDomain,tf as useConnectModal,Bf as useCrossAppConnectionCache,Ys as useCurrency,fp as useCurrentAccountImplementationVersion,tc as useCurrentAllocationsRoundId,Vp as useCurrentBlock,$f as useCurrentCurrency,Qf as useCurrentLanguage,ac as useCustomTokens,$n as useDAppKitWallet,tr as useDAppKitWalletModal,mm as useEcosystemShortcuts,Yo as useEnsRecordExists,wm as useEstimateAllTokens,am as useEvents,vf as useExploreEcosystemModal,Sf as useFAQModal,ep as useFeatureAnnouncement,Ho as useFetchAppInfo,Wo as useFetchPrivyStatus,Yc as useGasEstimate,Sm as useGasTokenSelection,xm as useGenericDelegator,Cm as useGenericDelegatorFeeEstimation,hp as useGetAccountAddress,vp as useGetAccountVersion,gs as useGetAvatar,Fs as useGetAvatarLegacy,ks as useGetAvatarOfAddress,sc as useGetB3trBalance,Wp as useGetChainId,lc as useGetCustomTokenBalances,ic as useGetCustomTokenInfo,ms as useGetDomainsOfAddress,dc as useGetErc20Balance,tp as useGetNodeUrl,Ts as useGetResolverAddress,bs as useGetTextRecords,Us as useGetTokenUsdPrice,pc as useGetVot3Balance,Sp as useHasV1SmartAccount,Hc as useIpfsImage,Uc as useIpfsImageList,Rc as useIpfsMetadata,Wc as useIpfsMetadatas,ls as useIsDomainProtected,np as useIsPWA,hc as useIsPerson,Tp as useIsSmartAccountDeployed,Jm as useLegalDocuments,dm as useLocalStorage,Of as useLoginModalContent,zf as useLoginWithOAuth,Lf as useLoginWithPasskey,Vf as useLoginWithVeChain,Wn as useMfaEnrollment,$d as useModal,Cc as useMostVotedAppsInRound,Zf as useMultipleClausesCall,Bu as useNotificationAlerts,Vu as useNotifications,bf as useNotificationsModal,Gn as usePrivy,Qm as usePrivyWalletProvider,jf as useProfileModal,Ef as useReceiveModal,jc as useRefreshBalances,Ep as useRefreshFactoryQueries,Xo as useRefreshMetadata,Dp as useRefreshSmartAccountQueries,yc as useRoundXApps,rp as useScrollToTop,mf as useSendTokenModal,Xc as useSendTransaction,qn as useSetWalletRecovery,Nf as useSettingsModal,Ff as useSignMessage,If as useSignTypedData,Jc as useSingleImageUpload,Ap as useSmartAccount,Fo as useStickyHeaderContext,_l as useSwapQuotes,gf as useSwapTokenModal,Zc as useSwapTransaction,Mc as useSwitchWallet,pm as useSyncableLocalStorage,Zn as useThor,zs as useTokenBalances,Ws as useTokenPrices,Xs as useTokensWithValues,Zs as useTotalBalance,of as useTransactionModal,cf as useTransactionToast,Xp as useTransferERC20,Qp as useTransferVET,nm as useTxReceipt,Rs as useUnsetDomain,Cs as useUpdateTextRecord,Np as useUpgradeRequired,Ip as useUpgradeRequiredForAccount,Rp as useUpgradeSmartAccount,kf as useUpgradeSmartAccountModal,qc as useUploadImages,$ as useVeChainKitConfig,Ko as useVechainDomain,Yd as useVechainKitThemeConfig,Q as useWallet,kc as useWalletMetadata,uf as useWalletModal,Ac as useWalletStorage,Fc as useXAppMetadata,Sc as useXAppsShares};
|
|
221
221
|
//# sourceMappingURL=index.mjs.map
|