@privy-io/react-auth 1.95.2 → 1.95.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.
Files changed (41) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/context-Unj5mD8K.js +1 -0
  3. package/dist/cjs/getEmbeddedConnectedWallet-DMZM38WV.js +1 -0
  4. package/dist/cjs/index.js +154 -150
  5. package/dist/cjs/smart-wallets-D_pDHYlr.js +1 -0
  6. package/dist/cjs/smart-wallets.js +1 -1
  7. package/dist/cjs/solana.js +1 -1
  8. package/dist/cjs/ui.js +16 -10
  9. package/dist/cjs/{useFundWallet-BHF-4PZu.js → useFundWallet-BIeYj1if.js} +3 -2
  10. package/dist/cjs/useSolanaWallets-CRYEB54t.js +1 -0
  11. package/dist/cjs/{privy-context-BOQWqAyX.js → useWallets-BXXojOrQ.js} +1 -1
  12. package/dist/dts/index.d.mts +7 -4
  13. package/dist/dts/index.d.ts +7 -4
  14. package/dist/dts/{solana-D5xAHDt7.d.mts → solana-ByUtVSFD.d.mts} +5 -1
  15. package/dist/dts/{solana-D5xAHDt7.d.ts → solana-ByUtVSFD.d.ts} +5 -1
  16. package/dist/dts/solana.d.mts +2 -2
  17. package/dist/dts/solana.d.ts +2 -2
  18. package/dist/dts/{types-BwcPm4mZ.d.mts → types-CJoUyidF.d.mts} +1 -1
  19. package/dist/dts/{types-BwcPm4mZ.d.ts → types-CJoUyidF.d.ts} +1 -1
  20. package/dist/dts/ui.d.mts +1 -1
  21. package/dist/dts/ui.d.ts +1 -1
  22. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  23. package/dist/esm/context-BXivPMz8.mjs +1 -0
  24. package/dist/esm/getEmbeddedConnectedWallet-ComEChZh.mjs +1 -0
  25. package/dist/esm/index.mjs +211 -207
  26. package/dist/esm/smart-wallets-Cf_4SaVH.mjs +1 -0
  27. package/dist/esm/smart-wallets.mjs +1 -1
  28. package/dist/esm/solana.mjs +1 -1
  29. package/dist/esm/ui.mjs +30 -24
  30. package/dist/esm/{useFundWallet-BmJ1B36W.mjs → useFundWallet-CQLW4Zdx.mjs} +6 -5
  31. package/dist/esm/useSolanaWallets-D4OrykNN.mjs +1 -0
  32. package/dist/esm/{privy-context-DffpuNH1.mjs → useWallets-BfKlC62m.mjs} +1 -1
  33. package/package.json +5 -5
  34. package/dist/cjs/getEmbeddedConnectedWallet-DGmyS1bb.js +0 -1
  35. package/dist/cjs/smart-wallets-D1j3W4UB.js +0 -1
  36. package/dist/cjs/useSolanaWallets-DvYv01E-.js +0 -1
  37. package/dist/cjs/useWallets-7cJEdKfK.js +0 -1
  38. package/dist/esm/getEmbeddedConnectedWallet-CqgZB8tC.mjs +0 -1
  39. package/dist/esm/smart-wallets-BoKTDMNm.mjs +0 -1
  40. package/dist/esm/useSolanaWallets-DhN1MwR8.mjs +0 -1
  41. package/dist/esm/useWallets-BxVlmjSu.mjs +0 -1
@@ -1 +1 @@
1
- "use strict";var e,t=require("ofetch"),r=require("react");class n extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,r){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=r}}class i extends n{constructor(e,t,r,n,i,s){super(r,n,i),this.type=e,this.status=t,this.data=s}}class s extends n{constructor(e,t,r){super(e,t,r),this.type="client_error"}}const a=e=>e instanceof n?e:e instanceof Error?new s(e.message,e):new s(`Internal error: ${e}`);exports.PrivyErrorCode=void 0,(e=exports.PrivyErrorCode||(exports.PrivyErrorCode={})).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",e.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",e.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",e.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",e.INVALID_DATA="invalid_data",e.INVALID_CAPTCHA="invalid_captcha",e.LINKED_TO_ANOTHER_USER="linked_to_another_user",e.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",e.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",e.FAILED_TO_UPDATE_ACCOUNT="failed_to_update_account",e.USER_EXITED_UPDATE_FLOW="exited_update_flow",e.ALLOWLIST_REJECTED="allowlist_rejected",e.OAUTH_USER_DENIED="oauth_user_denied",e.OAUTH_UNEXPECTED="oauth_unexpected",e.UNKNOWN_AUTH_ERROR="unknown_auth_error",e.USER_EXITED_AUTH_FLOW="exited_auth_flow",e.USER_EXITED_LINK_FLOW="exited_link_flow",e.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",e.MUST_BE_AUTHENTICATED="must_be_authenticated",e.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",e.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",e.CLIENT_REQUEST_TIMEOUT="client_request_timeout",e.INVALID_CREDENTIALS="invalid_credentials",e.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",e.UNKNOWN_MFA_ERROR="unknown_mfa_error",e.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",e.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",e.EMBEDDED_WALLET_CREATE_ERROR="embedded_wallet_create_error",e.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",e.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",e.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",e.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",e.TRANSACTION_FAILURE="transaction_failure",e.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",e.NOT_SUPPORTED="not_supported",e.CAPTCHA_TIMEOUT="captcha_timeout",e.INVALID_MESSAGE="invalid_message",e.UNABLE_TO_SIGN="unable_to_sign",e.CAPTCHA_FAILURE="captcha_failure",e.CAPTCHA_DISABLED="captcha_disabled",e.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",e.TOO_MANY_REQUESTS="too_many_requests",e.USER_LIMIT_REACHED="max_accounts_reached",e.DISALLOWED_LOGIN_METHOD="disallowed_login_method",e.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",e.PASSKEY_NOT_ALLOWED="passkey_not_allowed",e.USER_DOES_NOT_EXIST="user_does_not_exist",e.INSUFFICIENT_BALANCE="insufficient_balance",e.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required";const o=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},l=r.createContext({isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],solanaWallets:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},noPromptOnSignature:{current:!1},nativeTokenSymbolForChainId:o,initializeWalletProxy:o,getAuthMeta:o,getAuthFlow:o,closePrivyModal:o,openPrivyModal:o,connectWallet:o,initLoginWithWallet:o,loginWithWallet:o,initLoginWithFarcaster:o,loginWithFarcaster:o,loginWithCode:o,initLoginWithEmail:o,initLoginWithSms:o,initUpdateEmail:o,initUpdatePhone:o,resendEmailCode:o,resendSmsCode:o,initLoginWithHeadlessOAuth:o,loginWithHeadlessOAuth:o,crossAppAuthFlow:o,initLoginWithOAuth:o,recoveryOAuthFlow:o,loginWithOAuth:o,passkeyAuthState:{status:"initial"},setPasskeyAuthState:o,initLoginWithPasskey:o,loginWithPasskey:o,initLinkWithPasskey:o,linkWithPasskey:o,refreshUser:o,loginWithGuestAccountFlow:o,walletProxy:null,createAnalyticsEvent:o,acceptTerms:o,getUsdTokenPrice:o,getUsdPriceForSol:o,recoverPrimaryWallet:o,updateWallets:o,fundWallet:o,fundSolanaWallet:o,setReadyToTrue:o,requestFarcasterSignerStatus:o,initLoginWithTelegram:o,loginWithTelegram:o,generateSiweMessage:o,generateSiweMessageForSmartWallet:o,linkWithSiwe:o,linkSmartWallet:o,delegateWallet:o,revokeDelegatedWallets:o,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:o,exportSolanaWallet:o,solanaSignMessage:o,connectCoinbaseSmartWallet:o,initiateAccountTransfer:o,emailOtpState:{status:"initial"},setEmailOtpState:o,smsOtpState:{status:"initial"},setSmsOtpState:o,siweState:{status:"initial"},setSiweState:o,oAuthState:{status:"initial"},setOAuthState:o,isHeadlessOAuthLoading:!1}),_=r.createContext({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:o,login:o,connectOrCreateWallet:o,linkEmail:o,linkPhone:o,linkFarcaster:o,linkWallet:o,startCrossAppAuthFlow:o,linkGoogle:o,linkTwitter:o,linkDiscord:o,linkGithub:o,linkSpotify:o,linkInstagram:o,linkTelegram:o,linkTiktok:o,linkLinkedIn:o,linkApple:o,linkPasskey:o,updateEmail:o,updatePhone:o,logout:o,getAccessToken:o,getEthereumProvider:o,getEthersProvider:o,getWeb3jsProvider:o,unlinkEmail:o,unlinkPhone:o,unlinkWallet:o,unlinkGoogle:o,unlinkTwitter:o,unlinkDiscord:o,unlinkGithub:o,unlinkSpotify:o,unlinkInstagram:o,unlinkTiktok:o,unlinkLinkedIn:o,unlinkApple:o,unlinkCrossAppAccount:o,unlinkFarcaster:o,unlinkTelegram:o,unlinkPasskey:o,setActiveWallet:o,forkSession:o,createWallet:o,signMessage:o,signTypedData:o,enrollInMfa:o,initEnrollmentWithSms:o,initEnrollmentWithTotp:o,initEnrollmentWithPasskey:o,promptMfa:o,init:o,submitEnrollmentWithSms:o,submitEnrollmentWithTotp:o,submitEnrollmentWithPasskey:o,unenroll:o,submit:o,cancel:o,sendTransaction:o,sendSolanaTransaction:o,exportWallet:o,setWalletPassword:o,setWalletRecovery:o,requestFarcasterSignerFromWarpcast:o,getFarcasterSignerPublicKey:o,signFarcasterMessage:o,createGuestAccount:o,signMessageWithCrossAppWallet:o,signTypedDataWithCrossAppWallet:o,sendTransactionWithCrossAppWallet:o,isModalOpen:!1,mfaMethods:[]});exports.InternalPrivyContext=l,exports.PrivyApiError=i,exports.PrivyClientError=s,exports.PrivyConnectorError=class extends n{constructor(e,t,r){super(e,t,r),this.type="connector_error"}},exports.PrivyContext=_,exports.PrivyEmbeddedWalletError=class extends s{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}},exports.PrivyError=n,exports.PrivyNotReadyError=class extends s{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}},exports.PrivyTimeoutError=class extends s{constructor(){super("Request timed out",void 0,"client_request_timeout")}},exports.PrivyUnauthenticatedError=class extends s{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}},exports.PrivyUserLimitReachedError=class extends s{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}},exports.formatApiError=e=>{if(e instanceof n)return e;if(!(e instanceof t.FetchError))return a(e);if(!e.response)return new i("api_error",null,e.message,e);let{type:r,message:s,error:o,code:l}=e.data;return new i(r||"ApiError",e.response.status,s||o,e,l,e.data)},exports.formatPrivyError=a,exports.notImplemented=o,exports.notImplementedWithMessage=e=>()=>{throw Error(e.trim())},exports.usePrivyContext=()=>r.useContext(_),exports.usePrivyInternal=()=>r.useContext(l);
1
+ "use strict";var e,t=require("ofetch"),r=require("react");class n extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,r){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=r}}class i extends n{constructor(e,t,r,n,i,s){super(r,n,i),this.type=e,this.status=t,this.data=s}}class s extends n{constructor(e,t,r){super(e,t,r),this.type="client_error"}}const a=e=>e instanceof n?e:e instanceof Error?new s(e.message,e):new s(`Internal error: ${e}`);exports.PrivyErrorCode=void 0,(e=exports.PrivyErrorCode||(exports.PrivyErrorCode={})).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",e.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",e.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",e.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",e.INVALID_DATA="invalid_data",e.INVALID_CAPTCHA="invalid_captcha",e.LINKED_TO_ANOTHER_USER="linked_to_another_user",e.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",e.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",e.FAILED_TO_UPDATE_ACCOUNT="failed_to_update_account",e.USER_EXITED_UPDATE_FLOW="exited_update_flow",e.ALLOWLIST_REJECTED="allowlist_rejected",e.OAUTH_USER_DENIED="oauth_user_denied",e.OAUTH_UNEXPECTED="oauth_unexpected",e.UNKNOWN_AUTH_ERROR="unknown_auth_error",e.USER_EXITED_AUTH_FLOW="exited_auth_flow",e.USER_EXITED_LINK_FLOW="exited_link_flow",e.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",e.MUST_BE_AUTHENTICATED="must_be_authenticated",e.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",e.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",e.CLIENT_REQUEST_TIMEOUT="client_request_timeout",e.INVALID_CREDENTIALS="invalid_credentials",e.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",e.UNKNOWN_MFA_ERROR="unknown_mfa_error",e.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",e.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",e.EMBEDDED_WALLET_CREATE_ERROR="embedded_wallet_create_error",e.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",e.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",e.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",e.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",e.TRANSACTION_FAILURE="transaction_failure",e.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",e.NOT_SUPPORTED="not_supported",e.CAPTCHA_TIMEOUT="captcha_timeout",e.INVALID_MESSAGE="invalid_message",e.UNABLE_TO_SIGN="unable_to_sign",e.CAPTCHA_FAILURE="captcha_failure",e.CAPTCHA_DISABLED="captcha_disabled",e.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",e.TOO_MANY_REQUESTS="too_many_requests",e.USER_LIMIT_REACHED="max_accounts_reached",e.DISALLOWED_LOGIN_METHOD="disallowed_login_method",e.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",e.PASSKEY_NOT_ALLOWED="passkey_not_allowed",e.USER_DOES_NOT_EXIST="user_does_not_exist",e.INSUFFICIENT_BALANCE="insufficient_balance",e.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required";const o=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},l=r.createContext({isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],solanaWallets:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},noPromptOnSignature:{current:!1},nativeTokenSymbolForChainId:o,initializeWalletProxy:o,getAuthMeta:o,getAuthFlow:o,closePrivyModal:o,openPrivyModal:o,connectWallet:o,initLoginWithWallet:o,loginWithWallet:o,initLoginWithFarcaster:o,loginWithFarcaster:o,loginWithCode:o,initLoginWithEmail:o,initLoginWithSms:o,initUpdateEmail:o,initUpdatePhone:o,resendEmailCode:o,resendSmsCode:o,initLoginWithHeadlessOAuth:o,loginWithHeadlessOAuth:o,crossAppAuthFlow:o,initLoginWithOAuth:o,recoveryOAuthFlow:o,loginWithOAuth:o,passkeyAuthState:{status:"initial"},setPasskeyAuthState:o,initLoginWithPasskey:o,loginWithPasskey:o,initLinkWithPasskey:o,linkWithPasskey:o,refreshUser:o,loginWithGuestAccountFlow:o,walletProxy:null,createAnalyticsEvent:o,acceptTerms:o,getUsdTokenPrice:o,getUsdPriceForSol:o,recoverPrimaryWallet:o,updateWallets:o,fundWallet:o,fundSolanaWallet:o,setReadyToTrue:o,requestFarcasterSignerStatus:o,initLoginWithTelegram:o,loginWithTelegram:o,generateSiweMessage:o,generateSiweMessageForSmartWallet:o,linkWithSiwe:o,linkSmartWallet:o,delegateWallet:o,revokeDelegatedWallets:o,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:o,exportSolanaWallet:o,solanaSignMessage:o,connectCoinbaseSmartWallet:o,initiateAccountTransfer:o,emailOtpState:{status:"initial"},setEmailOtpState:o,smsOtpState:{status:"initial"},setSmsOtpState:o,siweState:{status:"initial"},setSiweState:o,oAuthState:{status:"initial"},setOAuthState:o,isHeadlessOAuthLoading:!1}),_=r.createContext({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:o,login:o,connectOrCreateWallet:o,linkEmail:o,linkPhone:o,linkFarcaster:o,linkWallet:o,startCrossAppAuthFlow:o,linkGoogle:o,linkTwitter:o,linkDiscord:o,linkGithub:o,linkSpotify:o,linkInstagram:o,linkTelegram:o,linkTiktok:o,linkLinkedIn:o,linkApple:o,linkPasskey:o,updateEmail:o,updatePhone:o,logout:o,getAccessToken:o,getEthereumProvider:o,getEthersProvider:o,getWeb3jsProvider:o,unlinkEmail:o,unlinkPhone:o,unlinkWallet:o,unlinkGoogle:o,unlinkTwitter:o,unlinkDiscord:o,unlinkGithub:o,unlinkSpotify:o,unlinkInstagram:o,unlinkTiktok:o,unlinkLinkedIn:o,unlinkApple:o,unlinkCrossAppAccount:o,unlinkFarcaster:o,unlinkTelegram:o,unlinkPasskey:o,setActiveWallet:o,forkSession:o,createWallet:o,signMessage:o,signTypedData:o,enrollInMfa:o,initEnrollmentWithSms:o,initEnrollmentWithTotp:o,initEnrollmentWithPasskey:o,promptMfa:o,init:o,submitEnrollmentWithSms:o,submitEnrollmentWithTotp:o,submitEnrollmentWithPasskey:o,unenroll:o,submit:o,cancel:o,sendTransaction:o,sendSolanaTransaction:o,exportWallet:o,setWalletPassword:o,setWalletRecovery:o,requestFarcasterSignerFromWarpcast:o,getFarcasterSignerPublicKey:o,signFarcasterMessage:o,createGuestAccount:o,signMessageWithCrossAppWallet:o,signTypedDataWithCrossAppWallet:o,sendTransactionWithCrossAppWallet:o,isModalOpen:!1,mfaMethods:[]}),u=r.createContext(null);exports.InternalPrivyContext=l,exports.PrivyApiError=i,exports.PrivyClientError=s,exports.PrivyConnectorError=class extends n{constructor(e,t,r){super(e,t,r),this.type="connector_error"}},exports.PrivyContext=_,exports.PrivyEmbeddedWalletError=class extends s{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}},exports.PrivyError=n,exports.PrivyNotReadyError=class extends s{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}},exports.PrivyTimeoutError=class extends s{constructor(){super("Request timed out",void 0,"client_request_timeout")}},exports.PrivyUnauthenticatedError=class extends s{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}},exports.PrivyUserLimitReachedError=class extends s{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}},exports.UseWalletsContext=u,exports.formatApiError=e=>{if(e instanceof n)return e;if(!(e instanceof t.FetchError))return a(e);if(!e.response)return new i("api_error",null,e.message,e);let{type:r,message:s,error:o,code:l}=e.data;return new i(r||"ApiError",e.response.status,s||o,e,l,e.data)},exports.formatPrivyError=a,exports.notImplemented=o,exports.notImplementedWithMessage=e=>()=>{throw Error(e.trim())},exports.usePrivyContext=()=>r.useContext(_),exports.usePrivyInternal=()=>r.useContext(l),exports.useWallets=function(){let e=r.useContext(u);return null===e?(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1}):e};
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as CustomAuthFlowState } from './types-BwcPm4mZ.js';
4
- export { am as Apple, aw as AppleOAuthWithMetadata, aL as ConnectedSolanaWallet, aE as ContractUIOptions, ap as CrossAppAccount, az as CrossAppAccountWithMetadata, aj as Discord, as as DiscordOAuthWithMetadata, aB as Email, ae as EmailWithMetadata, aI as Farcaster, ax as FarcasterWithMetadata, ak as Github, at as GithubOAuthWithMetadata, ah as Google, aq as GoogleOAuthWithMetadata, al as LinkedIn, av as LinkedInOAuthWithMetadata, aK as LoginMethodOrderOption, a5 as MessageTypes, a7 as MoonpayConfig, a8 as MoonpayCurrencyCode, aG as MoonpayFundingConfig, a9 as MoonpayPaymentMethod, aF as NativeFundingConfig, ad as NonEmptyArray, aJ as Passkey, aA as PasskeyWithMetadata, aC as Phone, af as PhoneWithMetadata, aH as PriceDisplayOptions, aa as Quantity, ac as SolanaCluster, a6 as SolanaFundingConfig, ao as Telegram, ay as TelegramWithMetadata, an as Tiktok, au as TiktokOAuthWithMetadata, ab as TransactionLog, aD as TransactionUIOptions, ai as Twitter, ar as TwitterOAuthWithMetadata, a4 as TypedMessage, ag as WalletWithMetadata } from './types-BwcPm4mZ.js';
3
+ import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as CustomAuthFlowState } from './types-CJoUyidF.js';
4
+ export { am as Apple, ax as AppleOAuthWithMetadata, aM as ConnectedSolanaWallet, aF as ContractUIOptions, ap as CrossAppAccount, aA as CrossAppAccountWithMetadata, aj as Discord, at as DiscordOAuthWithMetadata, aC as Email, ae as EmailWithMetadata, aJ as Farcaster, ay as FarcasterWithMetadata, ak as Github, au as GithubOAuthWithMetadata, ah as Google, ar as GoogleOAuthWithMetadata, aq as LinkedAccountWithMetadata, al as LinkedIn, aw as LinkedInOAuthWithMetadata, aL as LoginMethodOrderOption, a5 as MessageTypes, a7 as MoonpayConfig, a8 as MoonpayCurrencyCode, aH as MoonpayFundingConfig, a9 as MoonpayPaymentMethod, aG as NativeFundingConfig, ad as NonEmptyArray, aK as Passkey, aB as PasskeyWithMetadata, aD as Phone, af as PhoneWithMetadata, aI as PriceDisplayOptions, aa as Quantity, ac as SolanaCluster, a6 as SolanaFundingConfig, ao as Telegram, az as TelegramWithMetadata, an as Tiktok, av as TiktokOAuthWithMetadata, ab as TransactionLog, aE as TransactionUIOptions, ai as Twitter, as as TwitterOAuthWithMetadata, a4 as TypedMessage, ag as WalletWithMetadata } from './types-CJoUyidF.js';
5
5
  import { ExternalProvider, StaticJsonRpcProvider, Web3Provider } from '@ethersproject/providers';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { TurnstileProps } from '@marsidev/react-turnstile';
@@ -16,8 +16,8 @@ import * as _solana_web3_js from '@solana/web3.js';
16
16
  import { Connection } from '@solana/web3.js';
17
17
  import { AbstractProvider } from 'web3-core';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './solana-D5xAHDt7.js';
20
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-D5xAHDt7.js';
19
+ import { P as PrivyEvents } from './solana-ByUtVSFD.js';
20
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-ByUtVSFD.js';
21
21
  import 'viem';
22
22
  import '@privy-io/js-sdk-core';
23
23
  import '@metamask/eth-sig-util';
@@ -1266,6 +1266,9 @@ interface UseWalletsInterface {
1266
1266
  * The user's connected wallets.
1267
1267
  */
1268
1268
  wallets: ConnectedWallet[];
1269
+ /**
1270
+ * Whether the wallets are ready to be used.
1271
+ */
1269
1272
  ready: boolean;
1270
1273
  }
1271
1274
  declare function useWallets(): UseWalletsInterface;
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as CustomAuthFlowState } from './types-BwcPm4mZ.js';
4
- export { am as Apple, aw as AppleOAuthWithMetadata, aL as ConnectedSolanaWallet, aE as ContractUIOptions, ap as CrossAppAccount, az as CrossAppAccountWithMetadata, aj as Discord, as as DiscordOAuthWithMetadata, aB as Email, ae as EmailWithMetadata, aI as Farcaster, ax as FarcasterWithMetadata, ak as Github, at as GithubOAuthWithMetadata, ah as Google, aq as GoogleOAuthWithMetadata, al as LinkedIn, av as LinkedInOAuthWithMetadata, aK as LoginMethodOrderOption, a5 as MessageTypes, a7 as MoonpayConfig, a8 as MoonpayCurrencyCode, aG as MoonpayFundingConfig, a9 as MoonpayPaymentMethod, aF as NativeFundingConfig, ad as NonEmptyArray, aJ as Passkey, aA as PasskeyWithMetadata, aC as Phone, af as PhoneWithMetadata, aH as PriceDisplayOptions, aa as Quantity, ac as SolanaCluster, a6 as SolanaFundingConfig, ao as Telegram, ay as TelegramWithMetadata, an as Tiktok, au as TiktokOAuthWithMetadata, ab as TransactionLog, aD as TransactionUIOptions, ai as Twitter, ar as TwitterOAuthWithMetadata, a4 as TypedMessage, ag as WalletWithMetadata } from './types-BwcPm4mZ.js';
3
+ import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as CustomAuthFlowState } from './types-CJoUyidF.js';
4
+ export { am as Apple, ax as AppleOAuthWithMetadata, aM as ConnectedSolanaWallet, aF as ContractUIOptions, ap as CrossAppAccount, aA as CrossAppAccountWithMetadata, aj as Discord, at as DiscordOAuthWithMetadata, aC as Email, ae as EmailWithMetadata, aJ as Farcaster, ay as FarcasterWithMetadata, ak as Github, au as GithubOAuthWithMetadata, ah as Google, ar as GoogleOAuthWithMetadata, aq as LinkedAccountWithMetadata, al as LinkedIn, aw as LinkedInOAuthWithMetadata, aL as LoginMethodOrderOption, a5 as MessageTypes, a7 as MoonpayConfig, a8 as MoonpayCurrencyCode, aH as MoonpayFundingConfig, a9 as MoonpayPaymentMethod, aG as NativeFundingConfig, ad as NonEmptyArray, aK as Passkey, aB as PasskeyWithMetadata, aD as Phone, af as PhoneWithMetadata, aI as PriceDisplayOptions, aa as Quantity, ac as SolanaCluster, a6 as SolanaFundingConfig, ao as Telegram, az as TelegramWithMetadata, an as Tiktok, av as TiktokOAuthWithMetadata, ab as TransactionLog, aE as TransactionUIOptions, ai as Twitter, as as TwitterOAuthWithMetadata, a4 as TypedMessage, ag as WalletWithMetadata } from './types-CJoUyidF.js';
5
5
  import { ExternalProvider, StaticJsonRpcProvider, Web3Provider } from '@ethersproject/providers';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { TurnstileProps } from '@marsidev/react-turnstile';
@@ -16,8 +16,8 @@ import * as _solana_web3_js from '@solana/web3.js';
16
16
  import { Connection } from '@solana/web3.js';
17
17
  import { AbstractProvider } from 'web3-core';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './solana-D5xAHDt7.js';
20
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-D5xAHDt7.js';
19
+ import { P as PrivyEvents } from './solana-ByUtVSFD.js';
20
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-ByUtVSFD.js';
21
21
  import 'viem';
22
22
  import '@privy-io/js-sdk-core';
23
23
  import '@metamask/eth-sig-util';
@@ -1266,6 +1266,9 @@ interface UseWalletsInterface {
1266
1266
  * The user's connected wallets.
1267
1267
  */
1268
1268
  wallets: ConnectedWallet[];
1269
+ /**
1270
+ * Whether the wallets are ready to be used.
1271
+ */
1269
1272
  ready: boolean;
1270
1273
  }
1271
1274
  declare function useWallets(): UseWalletsInterface;
@@ -1,4 +1,4 @@
1
- import { aM as PrivyErrorCode, c as User, Q as LoginMethod, aN as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aL as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-BwcPm4mZ.js';
1
+ import { aN as PrivyErrorCode, c as User, Q as LoginMethod, aq as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aM as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-CJoUyidF.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
 
4
4
  /**
@@ -293,6 +293,10 @@ interface PrivyEvents {
293
293
  * @returns createWallet {() => Promise<Wallet>} an method to create an embedded Solana wallet.
294
294
  */
295
295
  interface UseSolanaWalletsInterface {
296
+ /**
297
+ * Whether the wallets are ready to be used.
298
+ */
299
+ ready: boolean;
296
300
  /**
297
301
  * An array of the connected Solana wallets for the user. Currently, this will only contain the embedded
298
302
  * Solana wallet if the user has created one.
@@ -1,4 +1,4 @@
1
- import { aM as PrivyErrorCode, c as User, Q as LoginMethod, aN as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aL as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-BwcPm4mZ.js';
1
+ import { aN as PrivyErrorCode, c as User, Q as LoginMethod, aq as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aM as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-CJoUyidF.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
 
4
4
  /**
@@ -293,6 +293,10 @@ interface PrivyEvents {
293
293
  * @returns createWallet {() => Promise<Wallet>} an method to create an embedded Solana wallet.
294
294
  */
295
295
  interface UseSolanaWalletsInterface {
296
+ /**
297
+ * Whether the wallets are ready to be used.
298
+ */
299
+ ready: boolean;
296
300
  /**
297
301
  * An array of the connected Solana wallets for the user. Currently, this will only contain the embedded
298
302
  * Solana wallet if the user has created one.
@@ -1,5 +1,5 @@
1
- export { aL as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-BwcPm4mZ.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-D5xAHDt7.js';
1
+ export { aM as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-CJoUyidF.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-ByUtVSFD.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
- export { aL as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-BwcPm4mZ.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-D5xAHDt7.js';
1
+ export { aM as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-CJoUyidF.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-ByUtVSFD.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -2091,4 +2091,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
2091
2091
  type SolanaRpcRequestType = solana_signMessage;
2092
2092
  type SolanaRpcResponseType = solana_signMessageResponse;
2093
2093
 
2094
- export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type PasskeyWithMetadata as aA, type Email as aB, type Phone as aC, type TransactionUIOptions as aD, type ContractUIOptions as aE, type NativeFundingConfig as aF, type MoonpayFundingConfig as aG, type PriceDisplayOptions as aH, type Farcaster as aI, type Passkey as aJ, type LoginMethodOrderOption as aK, type ConnectedSolanaWallet as aL, PrivyErrorCode as aM, type LinkedAccountWithMetadata as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type GoogleOAuthWithMetadata as aq, type TwitterOAuthWithMetadata as ar, type DiscordOAuthWithMetadata as as, type GithubOAuthWithMetadata as at, type TiktokOAuthWithMetadata as au, type LinkedInOAuthWithMetadata as av, type AppleOAuthWithMetadata as aw, type FarcasterWithMetadata as ax, type TelegramWithMetadata as ay, type CrossAppAccountWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
2094
+ export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type CrossAppAccountWithMetadata as aA, type PasskeyWithMetadata as aB, type Email as aC, type Phone as aD, type TransactionUIOptions as aE, type ContractUIOptions as aF, type NativeFundingConfig as aG, type MoonpayFundingConfig as aH, type PriceDisplayOptions as aI, type Farcaster as aJ, type Passkey as aK, type LoginMethodOrderOption as aL, type ConnectedSolanaWallet as aM, PrivyErrorCode as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type LinkedAccountWithMetadata as aq, type GoogleOAuthWithMetadata as ar, type TwitterOAuthWithMetadata as as, type DiscordOAuthWithMetadata as at, type GithubOAuthWithMetadata as au, type TiktokOAuthWithMetadata as av, type LinkedInOAuthWithMetadata as aw, type AppleOAuthWithMetadata as ax, type FarcasterWithMetadata as ay, type TelegramWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
@@ -2091,4 +2091,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
2091
2091
  type SolanaRpcRequestType = solana_signMessage;
2092
2092
  type SolanaRpcResponseType = solana_signMessageResponse;
2093
2093
 
2094
- export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type PasskeyWithMetadata as aA, type Email as aB, type Phone as aC, type TransactionUIOptions as aD, type ContractUIOptions as aE, type NativeFundingConfig as aF, type MoonpayFundingConfig as aG, type PriceDisplayOptions as aH, type Farcaster as aI, type Passkey as aJ, type LoginMethodOrderOption as aK, type ConnectedSolanaWallet as aL, PrivyErrorCode as aM, type LinkedAccountWithMetadata as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type GoogleOAuthWithMetadata as aq, type TwitterOAuthWithMetadata as ar, type DiscordOAuthWithMetadata as as, type GithubOAuthWithMetadata as at, type TiktokOAuthWithMetadata as au, type LinkedInOAuthWithMetadata as av, type AppleOAuthWithMetadata as aw, type FarcasterWithMetadata as ax, type TelegramWithMetadata as ay, type CrossAppAccountWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
2094
+ export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type CrossAppAccountWithMetadata as aA, type PasskeyWithMetadata as aB, type Email as aC, type Phone as aD, type TransactionUIOptions as aE, type ContractUIOptions as aF, type NativeFundingConfig as aG, type MoonpayFundingConfig as aH, type PriceDisplayOptions as aI, type Farcaster as aJ, type Passkey as aK, type LoginMethodOrderOption as aL, type ConnectedSolanaWallet as aM, PrivyErrorCode as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type LinkedAccountWithMetadata as aq, type GoogleOAuthWithMetadata as ar, type TwitterOAuthWithMetadata as as, type DiscordOAuthWithMetadata as at, type GithubOAuthWithMetadata as au, type TiktokOAuthWithMetadata as av, type LinkedInOAuthWithMetadata as aw, type AppleOAuthWithMetadata as ax, type FarcasterWithMetadata as ay, type TelegramWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
package/dist/dts/ui.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-BwcPm4mZ.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-CJoUyidF.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
package/dist/dts/ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-BwcPm4mZ.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-CJoUyidF.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{createWalletClient as r,custom as t}from"viem";import{toAccount as n}from"viem/accounts";import{abstractTestnet as a}from"viem/chains";import{h as i}from"./user-EiUNCG17.mjs";import{h as s,u as o}from"./privy-context-DffpuNH1.mjs";import{u as c,M as m,g as p}from"./getEmbeddedConnectedWallet-CqgZB8tC.mjs";import{a4 as l,U as d}from"./useWallets-BxVlmjSu.mjs";import{c as E}from"./smart-wallets-BoKTDMNm.mjs";import"@ethersproject/address";import"ofetch";import"react";import"react/jsx-runtime";import"@ethersproject/providers";import"tinycolor2";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"zod";import"bs58";import"ethers";import"libphonenumber-js/max";function u(){let{user:u}=s(),{noPromptOnSignature:g,openPrivyModal:y,chains:f,appId:T,rpcConfig:h}=o(),{wallets:D}=l(),{setModalData:I}=c(),N=async()=>{let i=p(D);if(!i)throw Error("No connected wallet found");let s=f.find((e=>e.id===a.id));if(!s)throw Error("Chain not configured");await i.switchChain(s.id);let o=await i.getEthereumProvider(),c=r({account:i.address,transport:t(o)}),m=n({address:i.address,signMessage:c.signMessage,signTransaction:c.signTransaction,signTypedData:c.signTypedData});return await e({chain:{...s,rpcUrls:{default:{http:[d(s,h,T)]}}},signer:m})};return{signMessage:async({message:e})=>{let r=await N();return new Promise((async(t,n)=>{let{entropyId:a,entropyIdVerifier:s}=i(u);g.current=!0,I({connectWallet:{entropyId:a,entropyIdVerifier:s,onCompleteNavigateTo:m.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(m.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},signTypedData:async e=>{let r=await N();return new Promise((async(t,n)=>{g.current=!0;let{entropyId:a,entropyIdVerifier:s}=i(u);I({connectWallet:{entropyId:a,entropyIdVerifier:s,onCompleteNavigateTo:m.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(m.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let r=await N(),t=[];return t="calls"in e&&void 0!==e.calls?[...e.calls]:[e],new Promise((async(n,a)=>{g.current=!0;let{entropyId:s,entropyIdVerifier:o}=i(u);I({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:m.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:E({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:r.account.address,walletIndex:null},getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>t.length>1?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>n(e.hash),onFailure:a,uiOptions:{}}}),y(m.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))}}}export{u as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{createWalletClient as r,custom as t}from"viem";import{toAccount as n}from"viem/accounts";import{abstractTestnet as a}from"viem/chains";import{h as i}from"./user-EiUNCG17.mjs";import{h as s,u as o,l as c}from"./useWallets-BfKlC62m.mjs";import{u as m,M as l,g as p}from"./getEmbeddedConnectedWallet-ComEChZh.mjs";import{U as d}from"./context-BXivPMz8.mjs";import{c as E}from"./smart-wallets-Cf_4SaVH.mjs";import"@ethersproject/address";import"ofetch";import"react";import"react/jsx-runtime";import"@ethersproject/providers";import"tinycolor2";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"zod";import"bs58";import"ethers";import"libphonenumber-js/max";function u(){let{user:u}=s(),{noPromptOnSignature:g,openPrivyModal:y,chains:f,appId:T,rpcConfig:h}=o(),{wallets:D}=c(),{setModalData:I}=m(),N=async()=>{let i=p(D);if(!i)throw Error("No connected wallet found");let s=f.find((e=>e.id===a.id));if(!s)throw Error("Chain not configured");await i.switchChain(s.id);let o=await i.getEthereumProvider(),c=r({account:i.address,transport:t(o)}),m=n({address:i.address,signMessage:c.signMessage,signTransaction:c.signTransaction,signTypedData:c.signTypedData});return await e({chain:{...s,rpcUrls:{default:{http:[d(s,h,T)]}}},signer:m})};return{signMessage:async({message:e})=>{let r=await N();return new Promise((async(t,n)=>{let{entropyId:a,entropyIdVerifier:s}=i(u);g.current=!0,I({connectWallet:{entropyId:a,entropyIdVerifier:s,onCompleteNavigateTo:l.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},signTypedData:async e=>{let r=await N();return new Promise((async(t,n)=>{g.current=!0;let{entropyId:a,entropyIdVerifier:s}=i(u);I({connectWallet:{entropyId:a,entropyIdVerifier:s,onCompleteNavigateTo:l.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let r=await N(),t=[];return t="calls"in e&&void 0!==e.calls?[...e.calls]:[e],new Promise((async(n,a)=>{g.current=!0;let{entropyId:s,entropyIdVerifier:o}=i(u);I({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:l.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:E({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:r.account.address,walletIndex:null},getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>t.length>1?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>n(e.hash),onFailure:a,uiOptions:{}}}),y(l.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))}}}export{u as useAbstractSmartWallets};
@@ -0,0 +1 @@
1
+ import{StaticJsonRpcProvider as e}from"@ethersproject/providers";import{c as t}from"./useWallets-BfKlC62m.mjs";import{jsx as a}from"react/jsx-runtime";import{useState as r,useMemo as n,useEffect as l,useContext as i,createContext as o}from"react";import s from"tinycolor2";const p="https://auth.privy.io",c=2e4,u=1400,h=2500,d=4e3,m="1.95.3",f="privy:token",g="privy-token",y="privy:refresh_token",b="privy-refresh-token",w="privy:pat",v="privy:id_token",C="privy-id-token",k="privy-session",E="privy:session_transfer_token",W="privy:caid",S=e=>`privy:guest:${e}`,x=e=>`privy:cross-app:${e}`,U="privy:state_code",O="privy:code_verifier",A="privy:headless_oauth",M="privy:oauth_disable_signup",T=e=>`privy:wallet:${e}`,P="privy:connectors",F="privy:connections",H=12e4,L=1,_="0x1",D=3e4,I="https://api.moonpay.com/v1",j="https://api.moonpay.com/v1",B="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",z="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",R="deprecated";const K=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isClover?"Clover":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally||e.isTaho?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0,$=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==K(e))return!1;if(e.providers)for(let t of e.providers)if(!$(t))return!1;return!0},q=()=>{if("phantom"in window){let e=window;if(e?.phantom?.ethereum?.isPhantom&&e?.phantom?.ethereum?.chainId)return!0}return!1},Z=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers)for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0;return!1},N=(e,t)=>{let a=[],r=[];for(let[n,l]of e.entries())n<t?a.push(l):r.push(l);return[a,r]},G=e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),X=(e,t)=>{let a=e.slice(0),r=[];for(;a.length;)r.push(a.splice(0,t));return r},Y=(e,t=3,a=4,r="ethereum")=>{if(!e)return"";let n="ethereum"===r?2:0;return t+a+n+3>=e.length?e:`${e.slice(0,n+t)}...${e.slice(e.length-a,e.length)}`},J=(e,t=3,a=4)=>Y(e,t,a,"solana"),V=e=>new Promise((t=>setTimeout(t,e)));function Q(e,{interval:t=100,timeout:a=5e3}={}){return new Promise(((r,n)=>{let l,i=0,o=()=>{i>=a?n("Max attempts reached without result"):(l=e(),i+=t,null==l?setTimeout(o,t):r(l))};o()}))}const ee=(e,t={})=>{let a=t.delayMs||150,r=t.maxAttempts||270;return new Promise((async(n,l)=>{let i=!1,o=0;for(;!i&&o<r;){if(t.abortSignal?.aborted)return;e().then((e=>{i=!0,n(e)}),((...e)=>{i=!0,l(...e)})),o+=1,await V(a)}i||l(Error("Exceeded max attempts before resolving function"))}))},te=(e,t,a={},r={})=>{let n=new URL(t,e);for(let[e,t]of Object.entries(a))void 0!==t&&n.searchParams.set(e,t);let l=Object.entries(r);if(l.length>0){let e=new URLSearchParams;for(let[t,a]of l)e.append(t,a);n.hash=e.toString()}return n.href},ae=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),re=e=>"string"==typeof e?e:"0x"+e.toString(16);async function ne({store:e,walletList:t,externalWalletConfig:a,walletChainType:r,timeout:n=3e3}){let l=!1,i=window;return new Promise((o=>{function s(){if(l)return;l=!0,window.removeEventListener("ethereum#initialized",s);let n=e.getProviders();console.debug("Detected injected providers:",n.map((e=>e.info)));let i=[];for(let e of n)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===r&&"app.phantom"===e.info.rdns||i.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==r)for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let a=[];if(t.providers?.length)for(let e of t.providers)e&&a.push(e);return a.push(e.ethereum),a}()){let t=K(e);if(!n.some((e=>e.info.name===t))){if($(e,!0)&&!i.find((e=>"metamask"===e.type))){i.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!i.find((e=>"phantom"===e.type))){i.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!i.find((e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==a.coinbaseWallet?.connectionOptions))){i.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}i.find((e=>"unknown_browser_extension"===e.type))||i.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}o(i)}i.ethereum?s():(window.addEventListener("ethereum#initialized",s,{once:!0}),setTimeout((()=>{s()}),n))}))}function le(e){return`eip155:${String(Number(e))}`}const ie=(e,a,r,n)=>{let l=Number(e),i=a.find((e=>e.id===l));if(!i)throw new t(`Unsupported chainId ${e}`,4901);return oe(i,r,n)},oe=(e,a,r)=>{let n,l=e.id,i=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])n=e.rpcUrls.privyWalletOverride.http[0];else if(a.rpcUrls&&a.rpcUrls[i])n=a.rpcUrls[i];else if(e.rpcUrls.privy?.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",r),n=t.toString()}else n=e.rpcUrls.public?.http[0]?e.rpcUrls.public.http[0]:e.rpcUrls.default?.http[0];if(!n)throw new t(`No RPC url found for ${l}`);return n},se=(e,a)=>{let r=Number(e),n=a.find((e=>e.id===r));if(!n)throw new t(`Unsupported chainId ${e}`,4901);return n.blockExplorers?.default.url},pe=(a,r,n,l)=>{let i=Number(a),o=r.find((e=>e.id===i));if(!o)throw new t(`Unsupported chainId ${a}`,4901);return new e(o.rpcUrls.privyWalletOverride&&o.rpcUrls.privyWalletOverride.http[0]?o.rpcUrls.privyWalletOverride.http[0]:n.rpcUrls&&n.rpcUrls[i]?n.rpcUrls[i]:o.rpcUrls.privy?.http[0]?{url:o.rpcUrls.privy.http[0],headers:{"privy-app-id":l.appId}}:o.rpcUrls.public?.http[0]?o.rpcUrls.public.http[0]:o.rpcUrls.default?.http[0])},ce=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},a=e.types.EIP712Domain??Object.entries(e.domain).map((([e,a])=>{if(null!=a&&"string"==typeof e&&e in t)return{name:e,type:t[e]}})).filter((e=>void 0!==e));return{...e,types:{...e.types,EIP712Domain:a}}};function ue(e,{min:t,max:a}){return Math.min(Math.max(e,t),a)}const he={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}},de={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0},me={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}}},fe={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},testnet:!0},ge={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-mainnet.rpc.privy.systems"]},blast:{http:["https://base-mainnet.blastapi.io"],webSocket:["wss://base-mainnet.blastapi.io"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://basescan.org"},default:{name:"Basescan",url:"https://basescan.org"}}},ye={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0},be={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1},we={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1},ve={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://mainnet.rpc.privy.systems"]},alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}}},Ce={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-mainnet.rpc.privy.systems"]},alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}}},ke={id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]},infura:{http:["https://optimism-sepolia.infura.io/v3"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},testnet:!0},Ee={id:137,name:"Polygon Mainnet",network:"polygon",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-mainnet.rpc.privy.systems"]},alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}}},We={id:80002,name:"Polygon Amoy",network:"polygon-amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-amoy.rpc.privy.systems"]},infura:{http:["https://polygon-amoy.infura.io/v3"],webSocket:["wss://polygon-amoy.infura.io/ws/v3"]},default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"OK LINK",url:"https://www.oklink.com/amoy"}},testnet:!0},Se={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{privy:{http:["https://sepolia.rpc.privy.systems"]},alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},testnet:!0},xe={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}}},Ue=[he,de,Se,ve,Ce,ke,Ee,We,be,{id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0},{id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}},{id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}},ge,ye,{id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0},{id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}},we,{id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0},me,fe,xe,{id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0},{id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0},{id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}},{id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}},{id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}}],Oe=new Set(Ue.map((e=>e.id))),Ae={appearance:{landingHeader:"Log in or sign up",theme:"light",accentColor:"#676FFF",walletList:["detected_wallets","metamask","coinbase_wallet","rainbow","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",rpcConfig:{rpcUrls:{},rpcTimeouts:{}},externalWallets:{coinbaseWallet:{connectionOptions:"all"}},embeddedWallets:{extendedCalldataDecoding:!1},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let Me=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","wallet_connect","detected_wallets","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe"]),Te=e=>Me.has(e),Pe=(e,t,a)=>a.indexOf(e)===t;const Fe=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(Te).filter(Pe):e?e.filter(Te).filter(Pe):Ae.appearance.walletList;function He(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}}function Le(e){let t=e.filter((e=>!Oe.has(e.id)));return Ue.concat(t)}function _e(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}let De="#FFFFFF";function Ie(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return s({...e.toHsl(),l:a})}function je({backgroundTheme:e,accentHex:t}){let a;switch(e){case"light":a=De;break;case"dark":a="#1E1E1D";break;default:a=e}let r=s(a),n=s(t),l=s("#51BA81"),i=s("#FFB74D"),o=s("#EC6351"),p=function(e){return e<.8&&e>.2&&console.warn("Background color is not light or dark enough, which could lead to accessibility issues."),e>.5?"light":"dark"}(r.getLuminance()),c=Ie(r,"light"===p?-.04:.11),u=Ie(r,"light"===p?-.88:.87),h=Ie(r,"light"===p?-.7:.75),d=Ie(r,"light"===p?-.43:.45).desaturate("light"===p?60:20),m=Ie(r,"light"===p?-.08:.25).desaturate("light"===p?60:20),f=Ie(n,.15),g=Ie(n,.25),y=Ie(n,-.06),b=Ie(n,-.6),w=Ie(o,.3),v=Ie(i,.3),C=s(n.getLuminance()>.5?"#040217":De),k=Ie(l,-.16),E=Ie(l,.4);return{colorScheme:p,background:r.toHslString(),background2:c.toHslString(),foreground:u.toHslString(),foreground2:h.toHslString(),foreground3:d.toHslString(),foreground4:m.toHslString(),accent:n.toHslString(),accentLight:f.toHslString(),accentLightest:g.toHslString(),accentDark:y.toHslString(),accentDarkest:b.toHslString(),foregroundAccent:C.toHslString(),success:l.toHslString(),successDark:k.toHslString(),successLight:E.toHslString(),error:o.toHslString(),errorLight:w.toHslString(),warn:i.toHslString(),warnLight:v.toHslString()}}function Be(e,t,a){let r,n,l,i,o,s,p,c,u,h,d,m,f,g,y,b,w=a?console.warn:()=>{};t?.loginMethods?(r=t.loginMethods.includes("email"),n=t.loginMethods.includes("sms"),i=t.loginMethods.includes("wallet"),o=t.loginMethods.includes("google"),s=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),h=t.loginMethods.includes("instagram"),c=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("github"),d=t.loginMethods.includes("linkedin"),f=t.loginMethods.includes("apple"),g=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram")):(r=e.emailAuth,n=e.smsAuth,i=e.walletAuth||e.solanaWalletAuth,o=e.googleOAuth,s=e.twitterOAuth,p=e.discordOAuth,m=e.githubOAuth,u=e.spotifyOAuth,h=e.instagramOAuth,c=e.tiktokOAuth,d=e.linkedinOAuth,f=e.appleOAuth,g=e.farcasterAuth,y=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?l=!1:e.passkeyAuth&&(l=!0);let v=[r,n].filter(Boolean),C=[o,s,p,m,u,h,c,d,f,g,y].filter(Boolean),k=[i].filter(Boolean);if(v.length+C.length+k.length===0)throw Error("You must enable at least one login method");let E=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;E&&0===k.length?(w("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),E=!1):E||C.length+v.length!==0||(w("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),E=!0);let W=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&w("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let S=Fe({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),x=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],a=[];for(let a of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(a)?console.warn(`Duplicated login method: ${a}`):t.push(a);for(let r of e.overflow??[])t.includes(r)||a.includes(r)?console.warn(`Duplicated login method: ${r}`):a.push(r);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),U=t?.intl?.defaultCountry??"US",{chains:O,defaultChain:A}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:a,hasRpcConfigDefined:r}){let n;if(e&&t&&console.warn("You should only specify one of `additionalChains` or `supportedChains`. Using `supportedChains`."),t){if(0===t.length)throw Error("`supportedChains` must contain at least one chain");t.filter((e=>e.rpcUrls.privyWalletOverride)).length>0&&r&&console.warn("You have specified at least one `supportedChain` with `privyWalletOverride` but also have `rpcConfig` defined. The `rpcConfig` will be ignored. `rpcConfig` is deprecated and you should use `privyWalletOverride` in a `supportedChain`."),n=t.map((e=>{if(e.rpcUrls.privyWalletOverride)return e;let t=Ue.find((t=>t.id===e.id)),a=t?.rpcUrls.privy?.http[0];return a?_e(e,a):e}))}else n=Ue.concat(e??[]);let l=t?n[0]:ve,i=a??l;if(!n.find((e=>e.id===i.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:n,defaultChain:i}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),M=!!t?.defaultChain,T=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,P=!(e.enforceWalletUis??1);if(b=e.legacyWalletUiConfig??1?T?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??P:P,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==b)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:F,...H}=t?.embeddedWallets??{};return e.solanaWalletAuth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`"),{id:e.id,name:e.name,allowlistConfig:e.allowlistConfig,legacyWalletUiConfig:e.legacyWalletUiConfig,appearance:{logo:t?.appearance?.logo??e.logoUrl,landingHeader:t?.appearance?.landingHeader??Ae.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:je({backgroundTheme:t?.appearance?.theme??Ae.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??Ae.appearance.accentColor}),loginGroupPriority:E?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:S,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.walletAuth??!1,solanaWalletAuth:e.solanaWalletAuth??!1})},loginMethods:{wallet:i,email:r,sms:n,passkey:l,google:o,twitter:s,discord:p,github:m,spotify:u,instagram:h,tiktok:c,linkedin:d,apple:f,farcaster:g,telegram:y},disablePlusEmails:e.disablePlusEmails,loginMethodsAndOrder:x,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??Ae.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??Ae.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??Ae.rpcConfig.rpcTimeouts},chains:O,defaultChain:A,intl:{defaultCountry:U},shouldEnforceDefaultChainOnConnect:M,captchaEnabled:e.captchaEnabled??Ae.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??Ae.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:W},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof F?{requireUserOwnedRecoveryOnCreate:F}:{},...T?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...H,noPromptOnSignature:b,showWalletUIs:t?.embeddedWallets?.showWalletUIs,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:T?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??Ae._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??Ae.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??Ae.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??Ae.fundingMethodConfig.moonpay.useSandbox}}}}let ze={showWalletLoginFirst:!0,allowlistConfig:{errorTitle:null,errorDetail:null,errorCtaText:null,errorCtaLink:null},walletAuth:!0,emailAuth:!0,smsAuth:!1,googleOAuth:!1,twitterOAuth:!1,discordOAuth:!1,githubOAuth:!1,linkedinOAuth:!1,appleOAuth:!1,disablePlusEmails:!1,termsAndConditionsUrl:null,privacyPolicyUrl:null,embeddedWalletConfig:{createOnLogin:"off",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]},fiatOnRampEnabled:!1,captchaEnabled:!1,captchaSiteKey:""};const Re=Be(ze,void 0,!1);let Ke=o({appConfig:Re,isServerConfigLoaded:!1});const $e=({children:e,legacyCreateEmbeddedWalletFlag:t,client:i,clientConfig:o})=>{let[s,p]=r(null),c=n((()=>Be(s??ze,o,!!s)),[s,o]);return l((()=>{if(!s)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:a,additionalChains:r,supportedChains:n,defaultChain:l,externalWallets:i,...o}=e;return{...o,...r?{additionalChains:r.map((e=>e.id))}:void 0,...n?{supportedChains:n.map((e=>e.id))}:void 0,...l?{defaultChain:l.id}:void 0,...i?{walletConnect:i.walletConnect,coinbaseWallet:i.coinbaseWallet,solana:{connectors:i.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0,legacyCreateEmbeddedWalletFlag:t}}(o,t),a=function(e,t=0){let a=3735928559^t,r=1103547991^t;for(let t,n=0;n<e.length;n++)a=Math.imul(a^(t=e.charCodeAt(n)),2654435761),r=Math.imul(r^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&(r=Math.imul(r^r>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),r=`privy:sent:${s.id}:${a}`;localStorage.getItem(r)||(i.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(r,"t"))}),[o,t,s]),l((()=>{s||(async()=>{try{let e=await i.getServerConfig();e.customApiUrl&&i.updateApiUrl(e.customApiUrl),p(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),a(Ke.Provider,{value:{appConfig:c,isServerConfigLoaded:!!s},children:e})},qe=()=>{let{appConfig:e}=i(Ke);return e},Ze=()=>{let{isServerConfigLoaded:e}=i(Ke);return e};export{we as $,qe as A,u as B,O as C,H as D,Z as E,E as F,Y as G,A as H,v as I,V as J,h as K,te as L,X as M,ue as N,M as O,w as P,Le as Q,y as R,U as S,L as T,oe as U,m as V,D as W,he as X,me as Y,ge as Z,be as _,T as a,ve as a0,Ce as a1,Ee as a2,xe as a3,d as a4,J as a5,j as a6,I as a7,z as a8,B as a9,G as aa,N as ab,Se as ac,ke as ad,We as ae,ye as af,fe as ag,de as ah,$e as ai,Ze as aj,Ue as ak,He as al,_e as am,se as an,Re as ao,_ as b,Oe as c,pe as d,ce as e,le as f,S as g,ie as h,ee as i,P as j,ne as k,q as l,F as m,f as n,x as o,Q as p,k as q,R as r,ae as s,re as t,g as u,b as v,C as w,p as x,c as y,W as z};
@@ -0,0 +1 @@
1
+ import{jsx as E,jsxs as _}from"react/jsx-runtime";import{useState as N,useEffect as A,useRef as S,useContext as T,createContext as R}from"react";import{A as C,ao as D}from"./context-BXivPMz8.mjs";import{n as L}from"./useWallets-BfKlC62m.mjs";function I({src:_,...N}){return E("img",{src:_,...N,style:{display:"none"}})}var O,e;(O=e||(e={})).LANDING="LANDING",O.CONNECT_OR_CREATE="CONNECT_OR_CREATE",O.AWAITING_CONNECTION="AWAITING_CONNECTION",O.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",O.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",O.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",O.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",O.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",O.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",O.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",O.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",O.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",O.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",O.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",O.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",O.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",O.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",O.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",O.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",O.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",O.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",O.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",O.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",O.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",O.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",O.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",O.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",O.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",O.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",O.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",O.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",O.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",O.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",O.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",O.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",O.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",O.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",O.EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN",O.INSTALL_PHANTOM_SCREEN="INSTALL_PHANTOM_SCREEN",O.PHANTOM_INTERSTITIAL_SCREEN="PHANTOM_INTERSTITIAL_SCREEN",O.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",O.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",O.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",O.FUNDING_EDIT_AMOUNT_SCREEN="FUNDING_EDIT_AMOUNT_SCREEN",O.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",O.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",O.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",O.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",O.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",O.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",O.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",O.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",O.CAPTCHA_SCREEN="CAPTCHA_SCREEN",O.ERROR_SCREEN="ERROR_SCREEN",O.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",O.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",O.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN";const a=R({ready:!1,app:D,currentScreen:null,lastScreen:null,navigate:L,navigateBack:L,resetNavigation:L,setModalData:L,onUserCloseViaDialogOrKeybindRef:void 0});let W=[e.LANDING,e.CONNECT_ONLY_LANDING_SCREEN,null];const M=T=>{let R=C(),D=T.authenticated,[L,O]=N(T.initialScreen);A((()=>{D||W.includes(T.initialScreen)||T.setInitialScreen(null)}),[D]);let e=S(null);A((()=>{T.open||(e.current=null)}),[T.open]),A((()=>{e.current=null}),[T.initialScreen]);let M={ready:!!R.id,app:R,data:T.data,setModalData:T.setModalData,currentScreen:T.initialScreen,lastScreen:L,navigate:(E,_=!0)=>{T.setInitialScreen(E),_&&O(T.initialScreen)},navigateBack:()=>{T.setInitialScreen(L)},resetNavigation:()=>{T.setInitialScreen(null),O(null)},onUserCloseViaDialogOrKeybindRef:e};return _(a.Provider,{value:M,children:[("string"==typeof R.appearance.logo||"img"===R.appearance.logo?.type)&&E(I,{src:"string"==typeof R.appearance.logo?R.appearance.logo:R.appearance.logo.props.src}),T.children]})},n=()=>T(a);function t(E){return E.find((E=>"privy"===E.walletClientType&&"embedded"===E.connectorType&&!E.imported))??null}export{e as M,M as a,t as g,n as u};