@privy-io/react-auth 1.94.1 → 1.94.3-beta-20241118141256

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 (30) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/{getEmbeddedConnectedWallet-BAWFwm3E.js → getEmbeddedConnectedWallet-Del3IDYI.js} +1 -1
  3. package/dist/cjs/index.js +310 -310
  4. package/dist/cjs/smart-wallets-DJPOfurY.js +1 -0
  5. package/dist/cjs/smart-wallets.js +1 -1
  6. package/dist/cjs/ui.js +1 -1
  7. package/dist/cjs/{useFundWallet-6RBQbyke.js → useFundWallet-BeSetwKW.js} +1 -1
  8. package/dist/cjs/{useWallets-DS5oOPnB.js → useWallets-C0z7M7ns.js} +1 -1
  9. package/dist/dts/index.d.mts +9 -7
  10. package/dist/dts/index.d.ts +9 -7
  11. package/dist/dts/{solana-PuIs0zwD.d.mts → solana-HIKrfby6.d.mts} +1 -1
  12. package/dist/dts/{solana-PuIs0zwD.d.ts → solana-HIKrfby6.d.ts} +1 -1
  13. package/dist/dts/solana.d.mts +2 -2
  14. package/dist/dts/solana.d.ts +2 -2
  15. package/dist/dts/{types-STuZuryK.d.mts → types-D0KmEjpU.d.mts} +7 -3
  16. package/dist/dts/{types-STuZuryK.d.ts → types-D0KmEjpU.d.ts} +7 -3
  17. package/dist/dts/ui.d.mts +1 -1
  18. package/dist/dts/ui.d.ts +1 -1
  19. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  20. package/dist/esm/{getEmbeddedConnectedWallet-CrtphMZJ.mjs → getEmbeddedConnectedWallet-D3Za0fyV.mjs} +1 -1
  21. package/dist/esm/index.mjs +306 -306
  22. package/dist/esm/smart-wallets-a33-nifX.mjs +1 -0
  23. package/dist/esm/smart-wallets.mjs +1 -1
  24. package/dist/esm/ui.mjs +1 -1
  25. package/dist/esm/{useFundWallet-FgeN9XU6.mjs → useFundWallet-DU2VXB6Y.mjs} +1 -1
  26. package/dist/esm/useWallets-NYcDMECu.mjs +1 -0
  27. package/package.json +3 -3
  28. package/dist/cjs/smart-wallets-C_uID25w.js +0 -1
  29. package/dist/esm/smart-wallets-BkY69ru9.mjs +0 -1
  30. package/dist/esm/useWallets-2CoAaSEx.mjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),t=require("viem"),a=require("./privy-context-BWc1w1jF.js"),n=require("./useWallets-C0z7M7ns.js"),r=require("./getEmbeddedConnectedWallet-Del3IDYI.js"),i=require("permissionless"),o=require("permissionless/accounts"),s=require("permissionless/clients/pimlico"),l=require("viem/account-abstraction"),d=require("zod"),u=require("bs58"),c=require("ethers"),p=require("libphonenumber-js/max");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=_(d),z=_(u);let g;var b=((g=b||{}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",g.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",g.MISSING_OR_INVALID_PRIVY_CLIENT_ID="missing_or_invalid_privy_client_id",g.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",g.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",g.MISSING_OR_INVALID_MFA="missing_or_invalid_mfa",g.EXPIRED_OR_INVALID_MFA_TOKEN="expired_or_invalid_mfa_token",g.INVALID_DATA="invalid_data",g.INVALID_CREDENTIALS="invalid_credentials",g.INVALID_CAPTCHA="invalid_captcha",g.LINKED_TO_ANOTHER_USER="linked_to_another_user",g.ALLOWLIST_REJECTED="allowlist_rejected",g.CANNOT_UNLINK_EMBEDDED_WALLET="cannot_unlink_embedded_wallet",g.CANNOT_UNLINK_SOLE_ACCOUNT="cannot_unlink_sole_account",g.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",g.LINKED_ACCOUNT_NOT_FOUND="linked_account_not_found",g.TOO_MANY_REQUESTS="too_many_requests",g.INVALID_ORIGIN="invalid_origin",g.MISSING_ORIGIN="missing_origin",g.INVALID_NATIVE_APP_ID="invalid_native_app_id",g.TOKEN_ALREADY_USED="token_already_used",g.ALREADY_LOGGED_OUT="already_logged_out",g.NOT_SUPPORTED="not_supported",g.USER_UNSUBSCRIBED="user_unsubscribed",g.MAX_APPS_REACHED="max_apps_reached",g.USER_LIMIT_REACHED="max_accounts_reached",g.DEVICE_REVOKED="device_revoked",g.WALLET_PASSWORD_EXISTS="wallet_password_exists",g.OAUTH_STATE_MISMATCH="oauth_state_mismatch",g.MAX_DENYLIST_ENTRIES_REACHED="max_denylist_entries_reached",g.DISALLOWED_LOGIN_METHOD="disallowed_login_method",g.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",g.DISALLOWED_RECOVERY_METHOD="disallowed_recovery_method",g.LEGACY_DASHBOARD_LOGIN_CONFIGURATION="legacy_dashboard_login_configuration",g.CANNOT_SET_PASSWORD="cannot_set_password",g.INVALID_PKCE_PARAMETERS="invalid_pkce_parameters",g.INVALID_APP_URL_SCHEME_CONFIGURATION="invalid_app_url_scheme_configuration",g.CROSS_APP_CONNECTION_NOT_ALLOWED="cross_app_connection_not_allowed",g.USER_DOES_NOT_EXIST="user_does_not_exist",g.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",g.USER_HAS_NOT_DELEGATED_WALLET="user_has_not_delegated_wallet",g.FEATURE_NOT_ENABLED="feature_not_enabled",g),h=class extends Error{toString(){return`${this.constructor.name}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,a,n){super(t),this.code=a,this.status=e,this.responseData=n}},f=class extends h{constructor(e,t){super(400,e,t||"invalid_data")}},y=class extends h{constructor(e,t){super(401,e,t)}},v=class extends h{constructor(e,t){super(422,e,t)}};function I(e,t){return Object.keys(t).forEach((function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[a]}})})),e}function S(e,t,a,n){Object.defineProperty(e,t,{get:a,set:n,enumerable:!0,configurable:!0})}d.z.object({error:d.z.string(),cause:d.z.string().optional(),code:d.z.nativeEnum(b).optional()});var k={},A={};S(A,"AnalyticsEvent",(()=>T));let T={path:"/api/v1/analytics_events",method:"POST"};var E={};S(E,"AppConfig",(()=>P));let P={path:"/api/v1/apps/:app_id",method:"GET"};var w={};S(w,"CoinbaseOnRampInit",(()=>j)),S(w,"CoinbaseOnRampStatus",(()=>O));let j={path:"/api/v1/funding/coinbase_on_ramp/init",method:"POST"},O={path:"/api/v1/funding/coinbase_on_ramp/status",method:"GET"};var C={};S(C,"GetCrossAppConnections",(()=>R));let R={path:"/api/v1/apps/:app_id/cross-app/connections",method:"GET"};var N={};S(N,"CustomJWTAuthenticate",(()=>D));let D={path:"/api/v1/custom_jwt_account/authenticate",method:"POST"};var x={};S(x,"FarcasterInit",(()=>W)),S(x,"FarcasterAuthenticate",(()=>L)),S(x,"FarcasterLink",(()=>M)),S(x,"FarcasterUnlink",(()=>U)),S(x,"FarcasterStatus",(()=>F));let W={path:"/api/v1/farcaster/init",method:"POST"},L={path:"/api/v1/farcaster/authenticate",method:"POST"},M={path:"/api/v1/farcaster/link",method:"POST"},U={path:"/api/v1/farcaster/unlink",method:"POST"},F={path:"/api/v1/farcaster/status",method:"GET"};var G={};S(G,"FarcasterSignerInit",(()=>V)),S(G,"FarcasterSignerStatus",(()=>q));let V={path:"/api/v1/farcaster/signer/init",method:"POST"},q={path:"/api/v1/farcaster/signer/status",method:"POST"};var B={};S(B,"GuestAuthenticate",(()=>K));let K={path:"/api/v1/guest/authenticate",method:"POST"};var $={};S($,"MfaPasskeyInit",(()=>H)),S($,"MfaPasskeyVerify",(()=>Y)),S($,"MfaPasskeyEnrollment",(()=>J));let H={path:"/api/v1/mfa/passkeys/init",method:"POST"},Y={path:"/api/v1/mfa/passkeys/verify",method:"POST"},J={path:"/api/v1/mfa/passkeys/enrollment",method:"POST"};var Q={};S(Q,"MfaPasswordlessSmsEnroll",(()=>X)),S(Q,"MfaPasswordlessSmsVerify",(()=>Z)),S(Q,"MfaPasswordlessSmsInit",(()=>ee)),S(Q,"MfaPasswordlessSmsUnenroll",(()=>te));let X={path:"/api/v1/mfa/passwordless_sms/enroll",method:"POST"},Z={path:"/api/v1/mfa/passwordless_sms/verify",method:"POST"},ee={path:"/api/v1/mfa/passwordless_sms/init",method:"POST"},te={path:"/api/v1/mfa/passwordless_sms/unenroll",method:"POST"};var ae={};S(ae,"MfaTotpEnroll",(()=>ne)),S(ae,"MfaTotpVerify",(()=>re)),S(ae,"MfaTotpInit",(()=>ie)),S(ae,"MfaTotpUnenroll",(()=>oe));let ne={path:"/api/v1/mfa/totp/enroll",method:"POST"},re={path:"/api/v1/mfa/totp/verify",method:"POST"},ie={path:"/api/v1/mfa/totp/init",method:"POST"},oe={path:"/api/v1/mfa/totp/unenroll",method:"POST"};var se={};S(se,"OAuthAuthenticate",(()=>le)),S(se,"OAuthInit",(()=>de)),S(se,"OAuthLink",(()=>ue)),S(se,"OAuthUnlink",(()=>ce));let le={path:"/api/v1/oauth/authenticate",method:"POST"},de={path:"/api/v1/oauth/init",method:"POST"},ue={path:"/api/v1/oauth/link",method:"POST"},ce={path:"/api/v1/oauth/unlink",method:"POST"};var pe={};S(pe,"OAuthProviderAuthorize",(()=>_e)),S(pe,"OAuthProviderVerify",(()=>me));let _e={path:"/oauth/authorization_code",method:"POST"},me={path:"/oauth/verify",method:"POST"};var ze={};S(ze,"PasskeyLink",(()=>ge)),S(ze,"PasskeyAuthenticate",(()=>be)),S(ze,"PasskeyAuthenticateInit",(()=>he)),S(ze,"PasskeyLinkInit",(()=>fe)),S(ze,"PasskeyUnlink",(()=>ye));let ge={path:"/api/v1/passkeys/link",method:"POST"},be={path:"/api/v1/passkeys/authenticate",method:"POST"},he={path:"/api/v1/passkeys/authenticate/init",method:"POST"},fe={path:"/api/v1/passkeys/link/init",method:"POST"},ye={path:"/api/v1/passkeys/unlink",method:"POST"};var ve={};S(ve,"PasswordlessAuthenticate",(()=>Ie)),S(ve,"PasswordlessInit",(()=>Se)),S(ve,"PasswordlessLink",(()=>ke)),S(ve,"PasswordlessUnlink",(()=>Ae)),S(ve,"PasswordlessUpdate",(()=>Te));let Ie={path:"/api/v1/passwordless/authenticate",method:"POST"},Se={path:"/api/v1/passwordless/init",method:"POST"},ke={path:"/api/v1/passwordless/link",method:"POST"},Ae={path:"/api/v1/passwordless/unlink",method:"POST"},Te={path:"/api/v1/passwordless/update",method:"POST"};var Ee={};S(Ee,"PasswordlessSmsAuthenticate",(()=>Pe)),S(Ee,"PasswordlessSmsInit",(()=>we)),S(Ee,"PasswordlessSmsLink",(()=>je)),S(Ee,"PasswordlessSmsUnlink",(()=>Oe)),S(Ee,"PasswordlessSmsUpdate",(()=>Ce));let Pe={path:"/api/v1/passwordless_sms/authenticate",method:"POST"},we={path:"/api/v1/passwordless_sms/init",method:"POST"},je={path:"/api/v1/passwordless_sms/link",method:"POST"},Oe={path:"/api/v1/passwordless_sms/unlink",method:"POST"},Ce={path:"/api/v1/passwordless_sms/update",method:"POST"};var Re={};S(Re,"RecoveryKeyMaterial",(()=>Ne)),S(Re,"RecoveryOAuthInit",(()=>De)),S(Re,"RecoveryOAuthAuthenticate",(()=>xe)),S(Re,"RecoveryOAuthInitICloud",(()=>We)),S(Re,"RecoveryOAuthCallbackICloudExpo",(()=>Le)),S(Re,"RecoveryConfigurationICloud",(()=>Me));let Ne={path:"/api/v1/embedded_wallets/:address/recovery/key_material",method:"POST"},De={path:"/api/v1/recovery/oauth/init",method:"POST"},xe={path:"/api/v1/recovery/oauth/authenticate",method:"POST"},We={path:"/api/v1/recovery/oauth/init_icloud",method:"POST"},Le={path:"/api/v1/recovery/oauth/callback_icloud/:app_id/expo_ios",method:"GET"},Me={path:"/api/v1/recovery/configuration_icloud",method:"POST"};var Ue={};S(Ue,"getPathWithParams",(()=>Fe));let Fe=(e,t)=>t?Object.entries(t).reduce(((e,[t,a])=>e.replace(`:${t}`,`${a}`)),e):e;var Ge={};S(Ge,"RefreshSession",(()=>Ve)),S(Ge,"Logout",(()=>qe));let Ve={path:"/api/v1/sessions",method:"POST"},qe={path:"/api/v1/sessions/logout",method:"POST"};var Be={};S(Be,"GetSmartWalletConfig",(()=>Ke)),S(Be,"PostSmartWalletConfig",(()=>$e));let Ke={path:"/api/v1/apps/:app_id/smart_wallets",method:"GET"},$e={path:"/api/v1/apps/:app_id/smart_wallets",method:"POST"};var He={};S(He,"SiweInit",(()=>Ye)),S(He,"SiweAuthenticate",(()=>Je)),S(He,"SiweLink",(()=>Qe)),S(He,"SiweLinkSmartWallet",(()=>Xe)),S(He,"SiweUnlink",(()=>Ze));let Ye={path:"/api/v1/siwe/init",method:"POST"},Je={path:"/api/v1/siwe/authenticate",method:"POST"},Qe={path:"/api/v1/siwe/link",method:"POST"},Xe={path:"/api/v1/siwe/link_smart_wallet",method:"POST"},Ze={path:"/api/v1/siwe/unlink",method:"POST"};var et={};S(et,"SiwsInit",(()=>tt)),S(et,"SiwsAuthenticate",(()=>at)),S(et,"SiwsLink",(()=>nt)),S(et,"SiwsUnlink",(()=>rt));let tt={path:"/api/v1/siws/init",method:"POST"},at={path:"/api/v1/siws/authenticate",method:"POST"},nt={path:"/api/v1/siws/link",method:"POST"},rt={path:"/api/v1/siws/unlink",method:"POST"};var it={};S(it,"AcceptTermsOnUser",(()=>ot));let ot={path:"/api/v1/users/me/accept_terms",method:"POST"};var st={};S(st,"TelegramAuthenticate",(()=>lt)),S(st,"TelegramLink",(()=>dt)),S(st,"TelegramUnlink",(()=>ut));let lt={path:"/api/v1/telegram/authenticate",method:"POST"},dt={path:"/api/v1/telegram/link",method:"POST"},ut={path:"/api/v1/telegram/unlink",method:"POST"};I(k,A),I(k,E),I(k,w),I(k,C),I(k,N),I(k,x),I(k,G),I(k,B),I(k,$),I(k,Q),I(k,ae),I(k,se),I(k,pe),I(k,ze),I(k,ve),I(k,Ee),I(k,Re),I(k,Ue),I(k,Ge),I(k,Be),I(k,He),I(k,et),I(k,it),I(k,st);var ct={},pt={};S(pt,"AnalyticsEventInput",(()=>_t));let _t=d.z.object({event_name:d.z.string().max(255),client_id:d.z.string().max(255).nullable(),payload:d.z.record(d.z.any()).optional()});var mt={};S(mt,"AccountIdFromPath",(()=>Tt)),S(mt,"AppIdFromPath",(()=>Et)),S(mt,"Pagination",(()=>Pt));var zt={};S(zt,"UserId",(()=>gt)),S(zt,"Email",(()=>bt)),S(zt,"PasswordlessCode",(()=>ht)),S(zt,"WalletAddress",(()=>ft)),S(zt,"normalizeEthereumAddress",(()=>kt)),S(zt,"SolanaWalletAddress",(()=>yt)),S(zt,"PhoneNumber",(()=>vt)),S(zt,"normalizePhoneNumber",(()=>It)),S(zt,"isValidAddress",(()=>St)),S(zt,"AuthenticateMode",(()=>At));let gt=d.z.string({required_error:"Privy DID must be included",invalid_type_error:"Privy DID is not a valid string"}).min(1).transform((e=>e.replace("did:privy:",""))),bt=d.z.string({required_error:"Email address must be provided",invalid_type_error:"Email address must be a valid string"}).email("Invalid email address").transform((e=>e.toLowerCase())),ht=d.z.string({required_error:"Verification code must be provided",invalid_type_error:"Invalid verification code"}).length(6,"Verification code must have 6 digits."),ft=d.z.string({required_error:"Ethereum address must be provided",invalid_type_error:"Invalid Ethereum address"}).transform(((e,t)=>kt(e)||(t.addIssue({code:d.z.ZodIssueCode.custom,message:"Invalid Ethereum address"}),d.z.NEVER))),yt=d.z.string({required_error:"Solana address must be provided",invalid_type_error:"Invalid Solana address"}).trim().transform(((e,t)=>{try{z.default.decode(e)}catch(e){return t.addIssue({code:d.z.ZodIssueCode.custom,message:"Invalid Solana address"}),d.z.NEVER}return e})),vt=d.z.string({required_error:"Phone number must be included",invalid_type_error:"Phone number is not a valid string"}).refine((e=>{try{return void 0!==It(e)}catch(e){return!1}}),{message:"Phone number is not valid"}).transform((e=>It(e)||""));function It(e){let t=p.parsePhoneNumber(e,"US");if(t?.isPossible())return t.formatInternational()}function St(e){return!!kt(e)}function kt(e){if("string"==typeof e)try{return c.ethers.utils.getAddress(e.trim())}catch(e){}}let At=d.z.object({mode:d.z.enum(["no-signup","login-or-sign-up"]).optional()}),Tt=d.z.object({account_id:d.z.string({required_error:"Account ID must be provided",invalid_type_error:"Account ID is not a valid string"}).min(1)}),Et=d.z.object({app_id:d.z.string({required_error:"App ID must be provided",invalid_type_error:"App ID is not a valid string"}).min(1)}).transform((({app_id:e})=>({app_id:e,appId:e}))).catch((({error:e})=>{throw new f(e.message,b.MISSING_OR_INVALID_PRIVY_APP_ID)})),Pt=d.z.object({cursor:gt.optional(),limit:d.z.coerce.number().max(100,{message:"Query limit can be at maximum 100 records."}).optional()});var wt={};S(wt,"AppResponseSchema",(()=>Wt));var jt={};S(jt,"EmbeddedWalletConfigSchema",(()=>Ct)),S(jt,"TelegramAuthConfigSchema",(()=>Rt)),S(jt,"FundingMethodEnum",(()=>Nt)),S(jt,"FundingMethodArraySchema",(()=>Dt)),S(jt,"FundingConfigSchema",(()=>xt));let Ot=m.default.object({chain:m.default.string(),asset:m.default.enum(["native-currency","USDC"]).optional()}),Ct=m.default.object({create_on_login:m.default.enum(["users-without-wallets","all-users","off"]),user_owned_recovery_options:m.default.array(m.default.enum(["user-passcode","google-drive","icloud"])),require_user_owned_recovery_on_create:m.default.boolean().optional(),require_user_password_on_create:m.default.boolean().optional()}),Rt=m.default.object({bot_id:m.default.string(),bot_name:m.default.string(),link_enabled:m.default.boolean(),seamless_auth_enabled:m.default.boolean()}),Nt=m.default.enum(["moonpay","coinbase-onramp","external"]),Dt=m.default.array(Nt),xt=m.default.object({default_recommended_currency:Ot,default_recommended_amount:m.default.string(),methods:Dt,prompt_funding_on_wallet_creation:m.default.boolean(),cross_chain_bridging_enabled:m.default.boolean()}),Wt=d.z.object({id:d.z.string(),name:d.z.string(),logo_url:d.z.string().nullable(),icon_url:d.z.string().nullable(),terms_and_conditions_url:d.z.string().nullable(),privacy_policy_url:d.z.string().nullable(),require_users_accept_terms:d.z.boolean().nullable(),theme:d.z.string(),accent_color:d.z.string().nullable(),show_wallet_login_first:d.z.boolean(),allowed_domains:d.z.array(d.z.string()),allowed_native_app_ids:d.z.array(d.z.string()),allowed_native_app_url_schemes:d.z.array(d.z.string()),wallet_auth:d.z.boolean(),email_auth:d.z.boolean(),sms_auth:d.z.boolean(),google_oauth:d.z.boolean(),twitter_oauth:d.z.boolean(),discord_oauth:d.z.boolean(),github_oauth:d.z.boolean(),spotify_oauth:d.z.boolean(),instagram_oauth:d.z.boolean(),tiktok_oauth:d.z.boolean(),linkedin_oauth:d.z.boolean(),apple_oauth:d.z.boolean(),farcaster_auth:d.z.boolean(),passkey_auth:d.z.boolean(),telegram_auth:d.z.boolean(),guest_auth:d.z.boolean(),solana_wallet_auth:d.z.boolean(),disable_plus_emails:d.z.boolean(),allowlist_enabled:d.z.boolean(),allowlist_config:d.z.object({error_title:d.z.string().nullable(),error_detail:d.z.string().nullable(),cta_text:d.z.string().nullable(),cta_link:d.z.string().nullable()}),wallet_connect_cloud_project_id:d.z.string().nullable(),custom_api_url:d.z.string().nullable(),embedded_wallet_config:Ct,enforce_wallet_uis:d.z.boolean(),legacy_wallet_ui_config:d.z.boolean(),fiat_on_ramp_enabled:d.z.boolean(),captcha_enabled:d.z.boolean(),twitter_oauth_on_mobile_enabled:d.z.boolean(),mfa_methods:d.z.array(d.z.enum(["sms","totp","passkey"])),captcha_site_key:d.z.string().optional(),verification_key:d.z.string(),telegram_auth_config:Rt.optional(),funding_config:xt.optional(),max_linked_wallets_per_user:d.z.number().nullable(),farcaster_link_wallets_enabled:d.z.boolean()});var Lt={};S(Lt,"CoinbaseOnRampInitInput",(()=>qt)),S(Lt,"CoinbaseOnRampInitResponse",(()=>Bt)),S(Lt,"CoinbaseOnRampStatusResponse",(()=>Kt));let Mt=d.z.enum(["ethereum","bitcoin","base","avacchain","optimism","solana","polygon","arbitrum","stellar"]),Ut=d.z.enum(["eth","ETH","USDC"]).transform((e=>e.toUpperCase())),Ft=d.z.enum(["SOL"]).transform((e=>e.toUpperCase())),Gt=d.z.object({addresses:d.z.array(d.z.object({address:ft,blockchains:d.z.array(Mt)})).max(1).min(1),assets:d.z.array(Ut).optional()}),Vt=d.z.object({addresses:d.z.array(d.z.object({address:yt,blockchains:d.z.array(Mt)})).max(1).min(1),assets:d.z.array(Ft).optional()}),qt=d.z.union([Gt,Vt]),Bt=d.z.object({app_id:d.z.string(),session_token:d.z.string(),channel_id:d.z.string(),partner_user_id:d.z.string()}),Kt=d.z.object({status:d.z.enum(["pending","success","failure"])});var $t={};S($t,"CrossAppConnectionsResponse",(()=>Ht));let Ht=d.z.object({connections:d.z.array(d.z.object({provider_app_id:d.z.string(),provider_app_name:d.z.string(),provider_app_icon_url:d.z.string().url().nullable(),provider_app_custom_api_url:d.z.string().url().nullable(),read_only:d.z.boolean()}))});var Yt={};S(Yt,"AuthenticateJwtInput",(()=>Jt));let Jt=m.default.object({token:m.default.string().optional()});var Qt={};S(Qt,"VerifyEmailInput",(()=>Zt)),S(Qt,"AuthenticateEmailInput",(()=>ea)),S(Qt,"InitEmailInput",(()=>ta)),S(Qt,"UnlinkEmailInput",(()=>aa)),S(Qt,"UpdateEmailInput",(()=>na)),S(Qt,"TransferEmailInput",(()=>ra));let Xt=d.z.object({nonce:d.z.string()}),Zt=d.z.object({code:ht,email:bt}),ea=Zt.merge(At),ta=d.z.object({email:bt,token:d.z.string().optional()}),aa=d.z.object({address:bt}),na=d.z.object({oldAddress:bt,newAddress:bt,code:ht}),ra=Xt.extend({email:bt});var ia={};S(ia,"JsonWebKey",(()=>oa)),S(ia,"JsonWebKeySet",(()=>sa));let oa=d.z.object({kty:d.z.string(),use:d.z.enum(["sig","enc"]).optional(),key_ops:d.z.array(d.z.enum(["sign","verify","encrypt","decrypt","wrapKey","unwrapKey","deriveKey","deriveBits"])).optional(),alg:d.z.enum(["RS256"]),kid:d.z.string().optional(),x5u:d.z.string().optional(),x5c:d.z.array(d.z.string()).optional(),x5t:d.z.string().optional(),"x5t#S256":d.z.string().optional(),n:d.z.string().optional(),e:d.z.string().optional(),d:d.z.string().optional()}),sa=d.z.object({keys:d.z.array(oa)});var la={};S(la,"FarcasterConnectInitResponse",(()=>da)),S(la,"FarcasterConnectStatusCompletedResponse",(()=>ua)),S(la,"FarcasterConnectStatusPendingResponse",(()=>ca)),S(la,"FarcasterAuthenticateInput",(()=>pa)),S(la,"FarcasterLinkInput",(()=>_a)),S(la,"FarcasterInitInput",(()=>ma)),S(la,"FarcasterUnlinkInput",(()=>za)),S(la,"TransferFarcasterInput",(()=>ga));let da=d.z.object({channel_token:d.z.string(),connect_uri:d.z.string()}),ua=d.z.object({state:d.z.literal("completed"),nonce:d.z.string(),message:d.z.string(),signature:d.z.string(),fid:d.z.number(),username:d.z.string(),display_name:d.z.string(),bio:d.z.string(),pfp_url:d.z.string()}),ca=d.z.object({state:d.z.literal("pending"),nonce:d.z.string()}),pa=d.z.object({channel_token:d.z.string(),message:d.z.string(),signature:d.z.string(),fid:d.z.number()}).merge(At),_a=d.z.object({channel_token:d.z.string(),message:d.z.string(),signature:d.z.string(),fid:d.z.number()}),ma=d.z.object({token:d.z.string().optional(),redirect_url:d.z.string().url().optional(),relying_party:d.z.string().optional()}),za=d.z.object({fid:d.z.number()}),ga=Xt.extend({farcaster_id:d.z.string(),farcaster_embedded_address:d.z.string()});var ba={};S(ba,"FarcasterSignerInitInput",(()=>ha)),S(ba,"FarcasterSignerInitResponse",(()=>fa)),S(ba,"FarcasterSignerStatusResponse",(()=>ya));let ha=d.z.object({ed25519_public_key:d.z.string().refine((e=>e.startsWith("0x")&&66===e.length)),deadline:d.z.bigint().optional().default((()=>BigInt(Math.floor(Date.now()/1e3)+3600)))}),fa=d.z.discriminatedUnion("status",[d.z.object({public_key:d.z.string(),status:d.z.literal("pending_approval"),signer_approval_url:d.z.string()}),d.z.object({public_key:d.z.string(),status:d.z.literal("approved"),fid:d.z.bigint()}),d.z.object({public_key:d.z.string(),status:d.z.literal("revoked"),fid:d.z.bigint()})]),ya=d.z.discriminatedUnion("status",[d.z.object({public_key:d.z.string(),status:d.z.literal("pending_approval")}),d.z.object({public_key:d.z.string(),status:d.z.literal("approved"),fid:d.z.bigint()}),d.z.object({public_key:d.z.string(),status:d.z.literal("revoked"),fid:d.z.bigint()})]);var va={};S(va,"AuthenticateGuestInput",(()=>Ia));let Ia=d.z.object({guest_credential:d.z.string().length(43)}).strict();var Sa={};S(Sa,"EmailIdTokenEntry",(()=>Pn)),S(Sa,"PhoneIdTokenEntry",(()=>wn)),S(Sa,"EthereumIdTokenEntry",(()=>jn)),S(Sa,"SolanaIdTokenEntry",(()=>On)),S(Sa,"FarcasterIdTokenEntry",(()=>Cn)),S(Sa,"PasskeyIdTokenEntry",(()=>Rn)),S(Sa,"TelegramIdTokenEntry",(()=>Nn)),S(Sa,"EthereumEmbeddedWalletIdTokenEntry",(()=>Dn)),S(Sa,"SolanaEmbeddedWalletIdTokenEntry",(()=>xn)),S(Sa,"GoogleOauthIdTokenEntry",(()=>Wn)),S(Sa,"TwitterOauthIdTokenEntry",(()=>Ln)),S(Sa,"DiscordOauthIdTokenEntry",(()=>Mn)),S(Sa,"GithubOauthIdTokenEntry",(()=>Un)),S(Sa,"LinkedInOauthIdTokenEntry",(()=>Fn)),S(Sa,"SpotifyOauthIdTokenEntry",(()=>Gn)),S(Sa,"InstagramOauthIdTokenEntry",(()=>Vn)),S(Sa,"TiktokOauthIdTokenEntry",(()=>qn)),S(Sa,"AppleOauthIdTokenEntry",(()=>Bn)),S(Sa,"CustomJwtIdTokenEntry",(()=>Kn)),S(Sa,"CrossAppIdTokenEntry",(()=>$n)),S(Sa,"SmartWalletIdTokenEntry",(()=>Hn));var ka={};S(ka,"EmailAccount",(()=>Ua)),S(ka,"PhoneAccount",(()=>Fa)),S(ka,"BaseWalletAccount",(()=>Ga)),S(ka,"EthereumAccount",(()=>Va)),S(ka,"SmartWalletAccount",(()=>qa)),S(ka,"SolanaAccount",(()=>Ba)),S(ka,"FarcasterAccount",(()=>Ka)),S(ka,"PasskeyAccount",(()=>$a)),S(ka,"TelegramAccount",(()=>Ha)),S(ka,"EthereumEmbeddedWalletAccount",(()=>Qa)),S(ka,"SolanaEmbeddedWalletAccount",(()=>Xa)),S(ka,"BitcoinSegwitEmbeddedWalletAccount",(()=>Za)),S(ka,"BitcoinTaprootEmbeddedWalletAccount",(()=>en)),S(ka,"GoogleOauthAccount",(()=>tn)),S(ka,"TwitterOauthAccount",(()=>an)),S(ka,"DiscordOauthAccount",(()=>nn)),S(ka,"GithubOauthAccount",(()=>rn)),S(ka,"LinkedInOauthAccount",(()=>on)),S(ka,"SpotifyOauthAccount",(()=>sn)),S(ka,"InstagramOauthAccount",(()=>ln)),S(ka,"TiktokOauthAccount",(()=>dn)),S(ka,"AppleOauthAccount",(()=>un)),S(ka,"CustomJwtAccount",(()=>cn)),S(ka,"CrossAppEmbeddedWallet",(()=>pn)),S(ka,"CrossAppSmartWallet",(()=>_n)),S(ka,"CrossAppAccount",(()=>mn)),S(ka,"LinkedAccount",(()=>zn)),S(ka,"SmsMfaMethod",(()=>gn)),S(ka,"TotpMfaMethod",(()=>bn)),S(ka,"PasskeyMfaMethod",(()=>hn)),S(ka,"LinkedMfaMethod",(()=>fn)),S(ka,"CustomMetadata",(()=>yn)),S(ka,"OAuthTokens",(()=>vn)),S(ka,"User",(()=>In)),S(ka,"SessionUpdateActionEnum",(()=>Sn)),S(ka,"AuthenticatedUser",(()=>kn)),S(ka,"LoggedOutUser",(()=>An)),S(ka,"MaybeUser",(()=>Tn));var Aa={};S(Aa,"SmartWalletProvider",(()=>Ca)),S(Aa,"AlchemyPaymasterContextSchema",(()=>Na)),S(Aa,"SmartWalletNetworkConfigurationInputSchema",(()=>xa)),S(Aa,"SmartWalletConfigurationSchema",(()=>Wa)),S(Aa,"SmartWalletConfigurationInputSchema",(()=>La)),S(Aa,"SmartWalletConfigurationResponseSchema",(()=>Ma)),S(Aa,"SAFE",(()=>Ta)),S(Aa,"KERNEL",(()=>Ea)),S(Aa,"LIGHT_ACCOUNT",(()=>wa)),S(Aa,"BICONOMY",(()=>Pa)),S(Aa,"COINBASE_SMART_WALLET",(()=>ja)),S(Aa,"SUPPORTED_SMART_WALLET_TYPES",(()=>Oa));let Ta="safe",Ea="kernel",Pa="biconomy",wa="light_account",ja="coinbase_smart_wallet",Oa=[Ta,Ea,Pa,wa,ja],Ca=d.z.enum(Oa,{invalid_type_error:"Please specify a supported provider.",required_error:"Please specify a supported provider."}),Ra=d.z.string().regex(/^eip155:\d+$/,"Chain ID must be an eip155 chain ID"),Na=d.z.object({policy_id:d.z.string().uuid()}),Da=d.z.object({chain_id:Ra,bundler_url:d.z.string(),paymaster_url:d.z.string().optional(),rpc_url:d.z.string().optional(),chain_name:d.z.string().optional(),paymaster_context:Na.optional()}),xa=d.z.object({chain_id:Ra,bundler_url:d.z.string().optional(),paymaster_url:d.z.string().optional(),rpc_url:d.z.string().optional(),chain_name:d.z.string().optional(),paymaster_context:Na.optional()}),Wa=d.z.discriminatedUnion("enabled",[d.z.object({enabled:d.z.literal(!1)}),d.z.object({enabled:d.z.literal(!0),smart_wallet_type:Ca,configured_networks:d.z.array(Da).min(1)})]),La=d.z.discriminatedUnion("enabled",[d.z.object({enabled:d.z.literal(!1)}),d.z.object({enabled:d.z.literal(!0),smart_wallet_type:Ca,configured_networks:d.z.array(xa).min(1)})]),Ma=Wa,Ua=d.z.object({type:d.z.literal("email"),address:d.z.string(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),Fa=d.z.object({type:d.z.literal("phone"),phoneNumber:d.z.string(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),Ga=d.z.object({type:d.z.enum(["wallet","smart_wallet"]),address:d.z.string(),chain_type:d.z.enum(["solana","ethereum"])}),Va=d.z.object({type:d.z.literal("wallet"),address:d.z.string(),chain_id:d.z.string().optional(),chain_type:d.z.literal("ethereum"),wallet_client:d.z.literal("unknown"),wallet_client_type:d.z.string().optional(),connector_type:d.z.string().optional(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),qa=d.z.object({type:d.z.literal("smart_wallet"),address:d.z.string(),smart_wallet_type:Ca,verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),Ba=d.z.object({type:d.z.literal("wallet"),address:d.z.string(),chain_type:d.z.literal("solana"),wallet_client:d.z.literal("unknown"),wallet_client_type:d.z.string().optional(),connector_type:d.z.string().optional(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),Ka=d.z.object({type:d.z.literal("farcaster"),fid:d.z.number(),owner_address:ft,username:d.z.string().optional(),display_name:d.z.string().optional(),bio:d.z.string().optional(),profile_picture:d.z.string().optional(),profile_picture_url:d.z.string().optional(),homepage_url:d.z.string().optional(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable(),signer_public_key:d.z.string().optional()}),$a=d.z.object({type:d.z.literal("passkey"),created_with_browser:d.z.string().optional(),created_with_os:d.z.string().optional(),created_with_device:d.z.string().optional(),credential_id:d.z.string(),authenticator_name:d.z.string().optional(),enrolled_in_mfa:d.z.boolean(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),Ha=d.z.object({type:d.z.literal("telegram"),telegram_user_id:d.z.string(),first_name:d.z.string().nullish(),last_name:d.z.string().nullish(),username:d.z.string().nullish(),photo_url:d.z.string().nullish(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}).transform((e=>({...e,telegramUserId:e.telegram_user_id,firstName:e.first_name}))),Ya=d.z.enum(["privy","user-passcode","google-drive","icloud"]),Ja=d.z.object({type:d.z.literal("wallet"),address:d.z.string(),imported:d.z.boolean().default(!1),delegated:d.z.boolean().default(!1),wallet_index:d.z.number(),chain_id:d.z.string(),chain_type:d.z.string(),wallet_client:d.z.literal("privy"),wallet_client_type:d.z.literal("privy"),connector_type:d.z.literal("embedded"),recovery_method:Ya,verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),Qa=Ja.merge(d.z.object({chain_type:d.z.literal("ethereum")})),Xa=Ja.merge(d.z.object({chain_type:d.z.literal("solana"),public_key:d.z.string()})),Za=Ja.merge(d.z.object({chain_type:d.z.literal("bitcoin-segwit"),public_key:d.z.string()})),en=Ja.merge(d.z.object({chain_type:d.z.literal("bitcoin-taproot"),public_key:d.z.string()})),tn=d.z.object({type:d.z.literal("google_oauth"),subject:d.z.string(),email:d.z.string(),name:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),an=d.z.object({type:d.z.literal("twitter_oauth"),subject:d.z.string(),username:d.z.string().nullable(),name:d.z.string().nullable(),profile_picture_url:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),nn=d.z.object({type:d.z.literal("discord_oauth"),subject:d.z.string(),username:d.z.string().nullable(),email:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),rn=d.z.object({type:d.z.literal("github_oauth"),subject:d.z.string(),username:d.z.string().nullable(),name:d.z.string().nullable(),email:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),on=d.z.object({type:d.z.literal("linkedin_oauth"),subject:d.z.string(),name:d.z.string().optional(),email:d.z.string().nullable(),vanity_name:d.z.string().optional(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),sn=d.z.object({type:d.z.literal("spotify_oauth"),subject:d.z.string(),email:d.z.string().nullable(),name:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),ln=d.z.object({type:d.z.literal("instagram_oauth"),subject:d.z.string(),username:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),dn=d.z.object({type:d.z.literal("tiktok_oauth"),subject:d.z.string(),username:d.z.string().nullable(),name:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),un=d.z.object({type:d.z.literal("apple_oauth"),subject:d.z.string(),email:d.z.string().nullable(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),cn=d.z.object({type:d.z.literal("custom_auth"),custom_user_id:d.z.string(),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),pn=d.z.object({address:d.z.string()}),_n=d.z.object({address:d.z.string()}),mn=d.z.object({type:d.z.literal("cross_app"),subject:d.z.string(),provider_app_id:d.z.string(),embedded_wallets:d.z.array(pn),smart_wallets:d.z.array(_n),verified_at:d.z.number(),first_verified_at:d.z.number().nullable(),latest_verified_at:d.z.number().nullable()}),zn=d.z.union([Ua,Fa,Va,Ba,qa,Qa,Xa,Za,en,tn,an,nn,rn,sn,ln,dn,on,un,cn,Ka,$a,Ha,mn]),gn=d.z.object({type:d.z.literal("sms"),verified_at:d.z.number()}),bn=d.z.object({type:d.z.literal("totp"),verified_at:d.z.number()}),hn=d.z.object({type:d.z.literal("passkey"),verified_at:d.z.number()}),fn=d.z.union([gn,bn,hn]),yn=d.z.record(d.z.string(),d.z.union([d.z.string(),d.z.number(),d.z.boolean()])),vn=d.z.object({provider:d.z.string(),access_token:d.z.string(),access_token_expires_in_seconds:d.z.number().optional(),refresh_token:d.z.string().optional(),refresh_token_expires_in_seconds:d.z.number().optional(),scopes:d.z.array(d.z.string()).optional()}),In=d.z.object({id:d.z.string(),linked_accounts:d.z.array(zn),mfa_methods:d.z.array(fn),created_at:d.z.number(),has_accepted_terms:d.z.boolean(),is_guest:d.z.boolean(),custom_metadata:yn.optional()}),Sn=d.z.enum(["set","ignore","clear"]),kn=d.z.object({user:In,token:d.z.string().min(1).nullable(),privy_access_token:d.z.string().min(1).nullable(),refresh_token:d.z.string().min(1).nullable(),identity_token:d.z.string().min(1).optional(),is_new_user:d.z.boolean().optional(),oauth_tokens:vn.optional(),oauth_provider_tokens:d.z.object({provider:d.z.string(),access_token:d.z.string(),access_token_expires_in_seconds:d.z.number().optional(),refresh_token:d.z.string().optional(),scopes:d.z.array(d.z.string()).optional()}).optional(),session_update_action:Sn}),An=d.z.object({user:d.z.null(),token:d.z.null(),refresh_token:d.z.null(),session_update_action:d.z.literal(Sn.Values.clear)}),Tn=d.z.union([kn,An]),En={lv:d.z.number().nullable()},Pn=Ua.pick({type:!0,address:!0}).extend(En),wn=Fa.pick({type:!0,phoneNumber:!0}).extend(En).transform((({phoneNumber:e,...t})=>({phone_number:e,...t}))),jn=Va.pick({type:!0,address:!0,chain_type:!0,wallet_client_type:!0}).extend(En),On=Ba.pick({type:!0,address:!0,chain_type:!0,wallet_client_type:!0}).extend(En),Cn=Ka.pick({type:!0,fid:!0,username:!0,owner_address:!0}).extend(En).transform((({owner_address:e,...t})=>({oa:e,...t}))),Rn=$a.pick({type:!0,credential_id:!0}).extend(En),Nn=d.z.object({type:d.z.literal("telegram"),telegram_user_id:d.z.string(),username:d.z.string().nullish(),lv:d.z.number().nullable()}),Dn=Qa.pick({type:!0,address:!0,chain_type:!0,wallet_client_type:!0}).extend(En),xn=Xa.pick({type:!0,address:!0,chain_type:!0,wallet_client_type:!0}).extend(En),Wn=tn.pick({type:!0,subject:!0,email:!0}).extend(En),Ln=an.pick({type:!0,subject:!0,username:!0}).extend(En),Mn=nn.pick({type:!0,subject:!0,username:!0}).extend(En),Un=rn.pick({type:!0,subject:!0,username:!0}).extend(En),Fn=on.pick({type:!0,subject:!0,email:!0}).extend(En),Gn=sn.pick({type:!0,subject:!0,email:!0}).extend(En),Vn=ln.pick({type:!0,subject:!0,username:!0}).extend(En),qn=dn.pick({type:!0,subject:!0,username:!0}).extend(En),Bn=un.pick({type:!0,subject:!0,email:!0}).extend(En),Kn=cn.pick({type:!0,custom_user_id:!0}).extend(En),$n=mn.pick({type:!0,subject:!0,provider_app_id:!0,embedded_wallets:!0,smart_wallets:!0}).extend(En),Hn=qa.pick({type:!0,smart_wallet_type:!0,address:!0}).extend(En);var Yn={};S(Yn,"MfaVerifyResponse",(()=>Jn)),S(Yn,"MfaSmsInitInput",(()=>Zn)),S(Yn,"MfaSmsAuthenticateEnrollInput",(()=>er)),S(Yn,"MfaSmsEnrollInput",(()=>tr)),S(Yn,"MfaSmsVerifyInput",(()=>ar)),S(Yn,"MfaTotpInput",(()=>nr)),S(Yn,"ResponseTotpInitMfa",(()=>rr));let Jn=m.default.object({token:m.default.string()}).strict(),Qn=m.default.object({action:m.default.literal("verify")}).strict(),Xn=m.default.object({action:m.default.literal("enroll"),phoneNumber:vt}).strict(),Zn=m.default.union([Qn,Xn]),er=m.default.object({action:m.default.literal("enroll").optional(),code:ht,phoneNumber:vt}).strict(),tr=m.default.object({code:ht,phoneNumber:vt}).strict(),ar=m.default.object({code:ht}).strict(),nr=m.default.object({code:ht}).strict(),rr=m.default.object({totpSecret:m.default.string(),totpAuthUrl:m.default.string()}).strict();var ir={};S(ir,"MfaPasskeyInitInput",(()=>br)),S(ir,"ResponsePasskeyInitMfa",(()=>hr)),S(ir,"MfaPasskeyVerifyInput",(()=>fr)),S(ir,"MfaEnrollmentPasskeyInput",(()=>yr));var or={};S(or,"PasskeyAuthenticatorVerifyOptions",(()=>sr)),S(or,"PasskeyAuthenticatorEnrollmentOptions",(()=>lr)),S(or,"PasskeyAuthenticatorVerifyResponse",(()=>dr)),S(or,"PasskeyAuthenticatorEnrollmentResponse",(()=>ur)),S(or,"PasskeyInitInput",(()=>cr)),S(or,"ResponsePasskeyInitAuthenticate",(()=>pr)),S(or,"ResponsePasskeyInitLink",(()=>_r)),S(or,"PasskeyLinkInput",(()=>mr)),S(or,"PasskeyAuthenticateInput",(()=>zr)),S(or,"UnlinkPasskeyInput",(()=>gr));let sr=m.default.object({challenge:m.default.string(),timeout:m.default.number().optional(),rp_id:m.default.string().optional(),allow_credentials:m.default.array(m.default.object({id:m.default.string(),type:m.default.string(),transports:m.default.array(m.default.string()).optional()})).optional(),user_verification:m.default.string().optional(),extensions:m.default.object({app_id:m.default.string().optional(),cred_props:m.default.boolean().optional(),hmac_create_secret:m.default.boolean().optional()}).optional()}),lr=m.default.object({rp:m.default.object({name:m.default.string(),id:m.default.string().optional()}),user:m.default.object({id:m.default.string(),name:m.default.string(),display_name:m.default.string()}),challenge:m.default.string(),pub_key_cred_params:m.default.array(m.default.object({alg:m.default.number(),type:m.default.literal("public-key")})),timeout:m.default.number().optional(),exclude_credentials:m.default.array(m.default.object({id:m.default.string(),type:m.default.string(),transports:m.default.array(m.default.string()).optional()})).optional(),authenticator_selection:m.default.object({authenticator_attachment:m.default.string().optional(),require_resident_key:m.default.boolean().optional(),resident_key:m.default.string().optional(),user_verification:m.default.string().optional()}).optional(),attestation:m.default.string().optional(),extensions:m.default.object({app_id:m.default.string().optional(),cred_props:m.default.object({rk:m.default.boolean().optional()}).optional(),hmac_create_secret:m.default.boolean().optional()}).optional()}),dr=m.default.object({id:m.default.string(),raw_id:m.default.string(),response:m.default.object({client_data_json:m.default.string(),authenticator_data:m.default.string(),signature:m.default.string(),user_handle:m.default.string().optional()}),authenticator_attachment:m.default.string().optional(),client_extension_results:m.default.object({app_id:m.default.boolean().optional(),cred_props:m.default.object({rk:m.default.boolean().optional()}).optional(),hmac_create_secret:m.default.boolean().optional()}),type:m.default.literal("public-key")}),ur=m.default.object({id:m.default.string(),raw_id:m.default.string(),response:m.default.object({client_data_json:m.default.string(),attestation_object:m.default.string(),authenticator_data:m.default.string().optional(),transports:m.default.array(m.default.any()).optional(),public_key_algorithm:m.default.number().optional(),public_key:m.default.string().optional()}),authenticator_attachment:m.default.string().optional(),client_extension_results:m.default.object({app_id:m.default.boolean().optional(),cred_props:m.default.object({rk:m.default.boolean().optional()}).optional(),hmac_create_secret:m.default.boolean().optional()}),type:m.default.literal("public-key")}),cr=m.default.object({relying_party:m.default.string().url().optional(),token:m.default.string().optional()}).strict(),pr=m.default.object({relying_party:m.default.string().url().optional(),options:sr}).strict(),_r=m.default.object({relying_party:m.default.string().url().optional(),options:lr}).strict(),mr=m.default.object({relying_party:m.default.string().url().optional(),authenticator_response:ur}).strict(),zr=m.default.object({relying_party:m.default.string().url().optional(),challenge:m.default.string(),authenticator_response:dr}).strict(),gr=m.default.object({credential_id:m.default.string()}),br=m.default.object({relying_party:m.default.string().url().optional()}).strict(),hr=m.default.object({options:sr}).strict(),fr=m.default.object({authenticator_response:dr,relying_party:m.default.string().url().optional()}).strict(),yr=m.default.object({credential_ids:m.default.array(m.default.string())});var vr={};S(vr,"ExternalOAuthProvider",(()=>Sr)),S(vr,"OAuthProvider",(()=>kr)),S(vr,"AuthenticateOauthInput",(()=>Ar)),S(vr,"OAuthInitInput",(()=>Tr)),S(vr,"LinkOAuthInput",(()=>Er)),S(vr,"OAuthUnlinkInput",(()=>Pr)),S(vr,"OAuthInitResponse",(()=>wr)),S(vr,"OAuthLinkResponse",(()=>jr)),S(vr,"TransferOAuthInput",(()=>Or)),S(vr,"SUPPORTED_OAUTH_PROVIDERS",(()=>Ir));let Ir=["google","discord","twitter","github","spotify","instagram","tiktok","linkedin","apple"],Sr=d.z.enum(Ir,{invalid_type_error:"Please specify a supported provider.",required_error:"Please specify a supported provider."}),kr=Sr.or(d.z.custom((e=>"string"==typeof e&&/^privy:[a-z0-9]{25}$/i.test(e)),{message:"Please specify a supported provider."})),Ar=d.z.object({authorization_code:d.z.string(),state_code:d.z.string(),code_verifier:d.z.string().min(43).max(128).optional(),code_type:d.z.enum(["raw"]).optional()}).merge(At).catch((()=>{throw new y("Please specify authorization_code and state_code.",b.INVALID_CREDENTIALS)})),Tr=d.z.object({redirect_to:d.z.string({required_error:"Please provide a redirect_to value."}),provider:kr,token:d.z.string().optional(),state_code:d.z.string().optional(),code_challenge:d.z.string().optional()}),Er=d.z.object({authorization_code:d.z.string(),state_code:d.z.string(),code_verifier:d.z.string().min(43).max(128).optional(),code_type:d.z.enum(["raw"]).optional()}),Pr=d.z.object({subject:d.z.string(),provider:kr}),wr=d.z.object({url:d.z.string()}),jr=In.extend({oauth_tokens:vn.optional()}),Or=Xt.extend({userInfo:d.z.object({subject:d.z.string(),name:d.z.string().optional(),username:d.z.string().optional(),profilePictureUrl:d.z.string().optional(),email:d.z.string().optional(),vanityName:d.z.string().optional()})});var Cr={};S(Cr,"AuthorizationCodeInput",(()=>Rr));let Rr=d.z.object({redirect_to:d.z.string(),state:d.z.string(),code_challenge:d.z.string()});var Nr={};S(Nr,"EmptyObject",(()=>Dr)),S(Nr,"SuccessObject",(()=>xr));let Dr=d.z.record(d.z.string(),d.z.never()),xr=d.z.object({success:d.z.boolean()});var Wr={};S(Wr,"RecoveryKeyMaterialInput",(()=>Lr)),S(Wr,"RecoveryKeyMaterialResponse",(()=>Mr)),S(Wr,"OAuthAuthenticateRecoveryResponse",(()=>Ur)),S(Wr,"OAuthInitRecoveryInput",(()=>Fr)),S(Wr,"OAuthInitICloudRecoveryInput",(()=>Gr)),S(Wr,"OAuthCallbackICloudExpoInput",(()=>Vr)),S(Wr,"OAuthCallbackICloudExpoResponse",(()=>qr)),S(Wr,"RecoveryConfigurationICloudInput",(()=>Br)),S(Wr,"RecoveryConfigurationICloudResponse",(()=>Kr));let Lr=d.z.object({chain_type:d.z.string().optional()}),Mr=d.z.object({recovery_type:d.z.enum(["user_passcode_derived_recovery_key","privy_passcode_derived_recovery_key","privy_generated_recovery_key","google_drive_recovery_secret","icloud_recovery_secret"]),recovery_key_derivation_salt:d.z.string(),recovery_code:d.z.string(),recovery_key:d.z.string(),file_id:d.z.string(),icloud_record_name:d.z.string()}),Ur=d.z.object({access_token:d.z.string()}),Fr=d.z.object({redirect_to:d.z.string({required_error:"Please provide a redirect_to value."}),token:d.z.string().optional(),state_code:d.z.string().optional(),code_challenge:d.z.string().optional()}),Gr=d.z.object({client_type:d.z.enum(["web","expo-ios"])}),Vr=d.z.object({ckWebAuthToken:d.z.string()}).transform((e=>({ckWebAuthToken:e.ckWebAuthToken}))).catch((()=>{throw new y("Missing ckWebAuthToken.",b.INVALID_DATA)})),qr=Dr,Br=d.z.object({client_type:d.z.enum(["web","expo-ios"])}),Kr=d.z.object({api_token:d.z.string(),container_identifier:d.z.string(),environment:d.z.string()});var $r={};S($r,"SiweInput",(()=>Hr)),S($r,"SmartWalletSiweInput",(()=>Yr)),S($r,"AuthenticateSiweInput",(()=>Jr)),S($r,"SiweAddressInput",(()=>Qr)),S($r,"SiweInitInput",(()=>Xr)),S($r,"SiweNonce",(()=>Zr)),S($r,"TransferSiweInput",(()=>ei));let Hr=d.z.object({message:d.z.string({invalid_type_error:"Invalid SIWE message"}),signature:d.z.string({invalid_type_error:"Invalid SIWE signature"}),chainId:d.z.string().max(41).nullable().default(null),walletClientType:d.z.string().max(64).nullable().default(null),connectorType:d.z.string().max(64).nullable().default(null)}),Yr=d.z.object({message:d.z.string({invalid_type_error:"Invalid SIWE message"}),signature:d.z.string({invalid_type_error:"Invalid SIWE signature"}),smart_wallet_type:Ca}),Jr=Hr.merge(At),Qr=d.z.object({address:ft}),Xr=d.z.object({address:ft,token:d.z.string().optional()}),Zr=d.z.object({nonce:d.z.string(),address:d.z.string(),expires_at:d.z.string()}),ei=Xt.extend({address:ft,chainId:d.z.string().max(41).nullable().default(null),walletClientType:d.z.string().max(64).nullable().default(null),connectorType:d.z.string().max(64).nullable().default(null)});var ti={};S(ti,"SiwsInput",(()=>ai)),S(ti,"AuthenticateSiwsInput",(()=>ni)),S(ti,"SiwsAddressInput",(()=>ri)),S(ti,"SiwsInitInput",(()=>ii)),S(ti,"SiwsNonce",(()=>oi));let ai=d.z.object({message:d.z.string({invalid_type_error:"Invalid SIWS message"}),signature:d.z.string({invalid_type_error:"Invalid SIWS signature"}),walletClientType:d.z.string().max(64).nullable().default(null),connectorType:d.z.string().max(64).nullable().default(null)}),ni=ai.merge(At),ri=d.z.object({address:yt}),ii=d.z.object({address:yt,token:d.z.string().optional()}),oi=d.z.object({nonce:d.z.string(),address:d.z.string(),expires_at:d.z.string()});var si={};S(si,"VerifyPhoneInput",(()=>li)),S(si,"AuthenticatePhoneInput",(()=>di)),S(si,"PasswordlessSmsPhoneInput",(()=>ui)),S(si,"UnlinkPhoneInput",(()=>ci)),S(si,"UpdatePhoneInput",(()=>pi)),S(si,"TransferPhoneInput",(()=>_i));let li=d.z.object({code:ht.catch((()=>{throw new v("Invalid SMS verification code",b.INVALID_CREDENTIALS)})),phoneNumber:vt.catch((()=>{throw new v("Invalid phone number",b.INVALID_CREDENTIALS)}))}),di=li.merge(At),ui=d.z.object({phoneNumber:vt.catch((()=>{throw new v("Invalid phone number",b.INVALID_DATA)})),token:d.z.string().optional()}),ci=d.z.object({phoneNumber:vt}),pi=d.z.object({old_phone_number:vt,new_phone_number:vt,code:ht}),_i=Xt.extend({phoneNumber:vt});var mi={};S(mi,"TelegramAuthenticateInput",(()=>gi)),S(mi,"TelegramLinkInput",(()=>bi)),S(mi,"TelegramUnlinkInput",(()=>hi)),S(mi,"TransferTelegramInput",(()=>fi));let zi=m.default.object({id:m.default.number(),first_name:m.default.string(),auth_date:m.default.number(),hash:m.default.string(),username:m.default.string().optional(),last_name:m.default.string().optional(),photo_url:m.default.string().optional()}),gi=m.default.object({captcha_token:m.default.string().optional(),telegram_auth_result:zi.optional(),telegram_web_app_data:m.default.object({query_id:m.default.string().optional(),auth_date:m.default.number(),hash:m.default.string(),user:m.default.string(),chat_instance:m.default.string().optional(),chat_type:m.default.string().optional(),start_param:m.default.string().optional(),signature:m.default.string().optional()}).optional()}).merge(At),bi=gi.omit({telegram_web_app_data:!0}).required({telegram_auth_result:!0}),hi=m.default.object({telegram_user_id:m.default.string()}),fi=Xt.extend({telegram_auth_result:zi});var yi={};S(yi,"RefreshTokenInput",(()=>vi)),S(yi,"OptionalRefreshTokenInput",(()=>Ii)),S(yi,"ForkedToken",(()=>Si));let vi=d.z.object({refresh_token:d.z.string()}),Ii=vi.partial(),Si=d.z.object({token:d.z.string(),refresh_token:d.z.string(),new_session_refresh_token:d.z.string()});var ki={};S(ki,"DelegatedActionsConsentInput",(()=>Ai));let Ai=d.z.object({encrypted_tee_share:d.z.string(),app_share:d.z.string(),delegated_addresses:d.z.array(d.z.object({chain_type:d.z.union([d.z.literal("solana"),d.z.literal("ethereum")]),address:d.z.string(),wallet_index:d.z.number().default(0)}))});var Ti={};S(Ti,"WalletApiSolanaSignTransactionRpcInput",(()=>wi)),S(Ti,"WalletApiSolanaSignMessageRpcInput",(()=>ji)),S(Ti,"UnsignedEthereumTransaction",(()=>Ri)),S(Ti,"WalletApiEthereumSignTransactionRpcInput",(()=>Ni)),S(Ti,"WalletApiEthereumPersonalSignRpcInputParams",(()=>Di)),S(Ti,"WalletApiEthereumPersonalSignRpcInput",(()=>xi)),S(Ti,"WalletApiEthereumSignTypedDataRpcInput",(()=>Wi)),S(Ti,"WalletApiRpcInput",(()=>Li)),S(Ti,"WalletApiSolanaSignTransactionRpcResponse",(()=>Mi)),S(Ti,"WalletApiSolanaSignMessageRpcResponse",(()=>Ui)),S(Ti,"WalletApiEthereumSignTransactionRpcResponse",(()=>Fi)),S(Ti,"WalletApiEthereumPersonalSignRpcResponse",(()=>Gi)),S(Ti,"WalletApiEthereumSignTypedDataRpcResponse",(()=>Vi)),S(Ti,"WalletApiRpcResponse",(()=>qi)),S(Ti,"WalletApiRegisterAuthorizationKeyInput",(()=>Bi));let Ei=d.z.object({address:d.z.string(),chain_type:d.z.literal("solana")}),Pi=d.z.object({address:d.z.string(),chain_type:d.z.literal("ethereum")}),wi=d.z.object({method:d.z.literal("signTransaction"),params:d.z.object({transaction:d.z.string(),encoding:d.z.literal("base64")})}).merge(Ei),ji=d.z.object({method:d.z.literal("signMessage"),params:d.z.object({message:d.z.string(),encoding:d.z.literal("base64")})}).merge(Ei),Oi=d.z.string().startsWith("0x"),Ci=d.z.union([Oi,d.z.number()]),Ri=d.z.object({from:ft.optional(),to:ft.optional(),nonce:Ci.optional(),chain_id:d.z.number().optional(),data:Oi.optional(),value:Ci.optional(),type:d.z.union([d.z.literal(0),d.z.literal(1),d.z.literal(2)]).optional(),gas_limit:Ci.optional(),gas_price:Ci.optional(),max_fee_per_gas:Ci.optional(),max_priority_fee_per_gas:Ci.optional()}),Ni=d.z.object({method:d.z.literal("eth_signTransaction"),params:d.z.object({transaction:Ri})}).merge(Pi),Di=d.z.object({message:d.z.string(),encoding:d.z.union([d.z.literal("utf-8"),d.z.literal("hex")])}),xi=d.z.object({method:d.z.literal("personal_sign"),params:Di}).merge(Pi),Wi=d.z.object({method:d.z.literal("eth_signTypedData_v4"),params:d.z.object({typed_data:d.z.object({domain:d.z.record(d.z.string(),d.z.any()),types:d.z.record(d.z.string(),d.z.any()),message:d.z.record(d.z.string(),d.z.any()),primary_type:d.z.string()})})}).merge(Pi),Li=d.z.discriminatedUnion("method",[wi,ji,Ni,xi,Wi]),Mi=d.z.object({method:d.z.literal("signTransaction"),data:d.z.object({signed_transaction:d.z.string(),encoding:d.z.literal("base64")})}),Ui=d.z.object({method:d.z.literal("signMessage"),data:d.z.object({signature:d.z.string(),encoding:d.z.literal("base64")})}),Fi=d.z.object({method:d.z.literal("eth_signTransaction"),data:d.z.object({signed_transaction:d.z.string(),encoding:d.z.literal("rlp")})}),Gi=d.z.object({method:d.z.literal("personal_sign"),data:d.z.object({signature:d.z.string(),encoding:d.z.literal("hex")})}),Vi=d.z.object({method:d.z.literal("eth_signTypedData_v4"),data:d.z.object({signature:d.z.string(),encoding:d.z.literal("hex")})}),qi=d.z.discriminatedUnion("method",[Mi,Ui,Fi,Gi,Vi]),Bi=d.z.object({public_key:d.z.string()});I(ct,pt),I(ct,mt),I(ct,wt),I(ct,jt),I(ct,Lt),I(ct,zt),I(ct,$t),I(ct,Yt),I(ct,Qt),I(ct,ia),I(ct,la),I(ct,ba),I(ct,va),I(ct,Sa),I(ct,Yn),I(ct,ir),I(ct,vr),I(ct,Cr),I(ct,Nr),I(ct,or),I(ct,Wr),I(ct,$r),I(ct,ti),I(ct,si),I(ct,Aa),I(ct,mi),I(ct,yi),I(ct,ka),I(ct,ki),I(ct,Ti);let Ki={address:l.entryPoint06Address,version:"0.6"},$i={address:l.entryPoint07Address,version:"0.7"},Hi=({owner:e,smartWalletType:t,publicClient:a})=>{switch(t){case Ta:return o.toSafeSmartAccount({client:a,entryPoint:$i,owners:[e],version:"1.4.1"});case Ea:return o.toEcdsaKernelSmartAccount({client:a,version:"0.3.1",entryPoint:$i,owners:[e]});case Pa:return o.toBiconomySmartAccount({client:a,owners:[e],entryPoint:Ki});case wa:return o.toLightSmartAccount({client:a,entryPoint:Ki,owner:e,version:"1.1.0"});case ja:return async function({client:e,owner:t}){let[a]=await t.request({method:"eth_accounts"});if(!a)throw Error("Unable to request embedded owner for eth_accounts");return await l.toCoinbaseSmartAccount({client:e,owners:[{type:"local",source:"privy",address:a,sign:async({hash:e})=>await t.request({method:"secp256k1_sign",params:[e]})}]})}({client:a,owner:e});default:throw Error(`Invalid smart account type: ${t}.`)}},Yi=["rpc.zerodev.app","public.pimlico.io","api.pimlico.io"];const Ji=({calls:e,chain:t,maxPriorityFeePerGas:a,maxFeePerGas:n,nonce:r})=>e.map((e=>({to:e.to||void 0,data:e.data,value:e.value,chainId:t.id,nonce:r,maxFeePerGas:n,maxPriorityFeePerGas:a}))),Qi=async({chain:e,paymasterContext:r,embeddedWallet:o,user:l,smartWalletsConfig:d,rpcConfig:u,privyAppId:c})=>{if(!d?.enabled||!l||!o)return;let p=await o.getEthereumProvider(),_=d?.configuredNetworks.find((t=>t.chainId===`eip155:${e.id}`));if(!_)throw new a.PrivyClientError(`The chain ${e.name} (eip155:${e.id}) must be configured in the smart wallet configuration in your dashboard`);let m=l.smartWallet?.smartWalletType??d.smartWalletType,z=n.getJsonRpcEndpointFromChain(e,u,c),g=t.createPublicClient({chain:e,transport:t.http(z)}),b=r??_.paymasterContext,h=await(async({owner:e,smartWalletType:a,chain:n,publicClient:r,bundlerUrl:o,paymasterUrl:l,paymasterContext:d})=>{let u=await Hi({owner:e,smartWalletType:a,publicClient:r}),c=s.createPimlicoClient({transport:t.http(o),entryPoint:u.entryPoint}),p=l?s.createPimlicoClient({transport:t.http(l),entryPoint:u.entryPoint}):void 0;return i.createSmartAccountClient({account:u,chain:n,paymaster:p,paymasterContext:d,bundlerTransport:t.http(o),userOperation:{estimateFeesPerGas:async()=>{if(Yi.some((e=>o.includes(e))))return await c.getUserOperationGasPrice().then((e=>e.fast));{let e=await r.estimateFeesPerGas();return{...e,maxFeePerGas:150n*e.maxFeePerGas/100n,maxPriorityFeePerGas:150n*e.maxPriorityFeePerGas/100n}}}}})})({owner:p,smartWalletType:m,chain:e,publicClient:g,paymasterContext:b,..._});if(!h)throw new a.PrivyClientError(`Failed to create smart wallet client for chain ${e.name} (eip155:${e.id})`);return h};exports.callsToTransactionRequests=Ji,exports.getSmartWalletClient=Qi,exports.useSmartWalletsWrapper=({clientConfig:t,smartWalletsConfig:i})=>{let{noPromptOnSignature:o,openPrivyModal:s,appId:l}=a.usePrivyInternal(),d=n.useAppConfig(),{setModalData:u}=r.usePrivyModal(),{user:c}=a.usePrivyContext(),{chains:p}=n.useAppConfig(),{chainId:_,clients:m,setChainId:z,chainIdState:g}=(()=>{let t=e.useRef(),[a,n]=e.useState();return{clients:e.useRef({}),setChainId:e=>{t.current=e,n(e)},chainId:t,chainIdState:a}})(),b=p.find((e=>e.id===g)),{wallets:h}=n.useWallets(),f=e.useCallback((async()=>_.current),[_]),y=e.useCallback((async({id:e})=>{if(!m.current[e]){let a=r.getEmbeddedConnectedWallet(h),n=await Qi({chain:p.find((t=>t.id===e)),embeddedWallet:a,user:c,paymasterContext:t?.paymasterContext,smartWalletsConfig:i,rpcConfig:d.rpcConfig,privyAppId:l});n&&(m.current[e]=n)}z(e)}),[p,t,h,c,i]);return{wrapSmartAccountClient:e=>{m.current[e.chain.id]=e,g||z(e.chain.id);return{...e,sendTransaction:async e=>{let t=void 0===d.embeddedWallets.showWalletUIs?d.embeddedWallets.noPromptOnSignature:!d.embeddedWallets.showWalletUIs,n=m.current[_.current];if(!n)throw new a.PrivyClientError(`Smart wallet client for chain (eip155:${_.current}) not found`);if(t)return o.current=!0,await n.sendTransaction(e).finally((()=>o.current=!1));let i=[];"calls"in e&&void 0!==e.calls?i=[...e.calls]:"to"in e&&(i=[{to:e.to,value:e.value||BigInt(0),data:e.data||"0x"}]);let l=async()=>{if(!n.paymaster)return!1;let{paymasterAndData:t,paymasterData:a}=await n.prepareUserOperation({calls:i,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0});return Number(t??a??0)>0};return new Promise((async(t,d)=>{o.current=!0;let{entropyId:p,entropyIdVerifier:_}=a.getEntropyDetailsFromUser(c);u({connectWallet:{entropyId:p,entropyIdVerifier:_,onCompleteNavigateTo:r.ModalScreen.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:Ji({calls:i,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:p,entropyIdVerifier:_,transactingWallet:{address:n.account.address,walletIndex:null},getIsSponsored:l,onConfirm:()=>n.sendTransaction(e),onSuccess:e=>t(e.hash),onFailure:d,uiOptions:{}}}),s(r.ModalScreen.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{o.current=!1}))},signMessage:async({message:e})=>{let t=void 0===d.embeddedWallets.showWalletUIs?d.embeddedWallets.noPromptOnSignature:!d.embeddedWallets.showWalletUIs,n=m.current[_.current];if(!n)throw new a.PrivyClientError(`Smart wallet client for chain (eip155:${_.current}) not found`);return t?(o.current=!0,await n.signMessage({message:e}).finally((()=>o.current=!1))):new Promise((async(t,i)=>{let{entropyId:l,entropyIdVerifier:d}=a.getEntropyDetailsFromUser(c);o.current=!0,u({connectWallet:{entropyId:l,entropyIdVerifier:d,onCompleteNavigateTo:r.ModalScreen.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>n.signMessage({message:e}),onSuccess:e=>t(e),onFailure:i,uiOptions:{}}}),s(r.ModalScreen.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{o.current=!1}))},signTypedData:async e=>{let t=void 0===d.embeddedWallets.showWalletUIs?d.embeddedWallets.noPromptOnSignature:!d.embeddedWallets.showWalletUIs,n=m.current[_.current];if(!n)throw new a.PrivyClientError(`Smart wallet client for chain (eip155:${_.current}) not found`);return t?(o.current=!0,await n.signTypedData(e).finally((()=>o.current=!1))):new Promise((async(t,i)=>{o.current=!0;let{entropyId:l,entropyIdVerifier:d}=a.getEntropyDetailsFromUser(c);u({connectWallet:{entropyId:l,entropyIdVerifier:d,onCompleteNavigateTo:r.ModalScreen.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>n.signTypedData(e),onSuccess:e=>t(e),onFailure:i,uiOptions:{}}}),s(r.ModalScreen.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{o.current=!1}))},getChainId:f,chain:b,switchChain:y}}}};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./useWallets-DS5oOPnB.js"),i=require("./privy-context-BWc1w1jF.js"),n=require("./getEmbeddedConnectedWallet-BAWFwm3E.js"),a=require("./smart-wallets-C_uID25w.js");require("@ethersproject/providers"),require("tinycolor2"),require("ofetch"),require("@ethersproject/address"),require("viem"),require("permissionless"),require("permissionless/accounts"),require("permissionless/clients/pimlico"),require("viem/account-abstraction"),require("zod"),require("bs58"),require("ethers"),require("libphonenumber-js/max");let l=r.createContext({client:void 0});let s=r.createContext({config:void 0}),c=()=>{let{config:e}=r.useContext(s);return{config:e}},o=({children:t})=>{let[n,a]=r.useState(void 0),{client:l}=i.usePrivyInternal();return r.useEffect((()=>{!n&&l&&(async()=>{try{if(!l)return void console.warn("No client found");let e=await l.getSmartWalletsConfig();a(e)}catch(e){console.warn("Error generating smart wallet config: ",e)}})()}),[!!l]),e.jsx(s.Provider,{value:{config:n},children:t})},u=({config:l,children:s})=>{let{config:o}=c(),{appId:u}=i.usePrivyInternal(),{chains:f,defaultChain:g,rpcConfig:m}=t.useAppConfig(),{wallets:p}=t.useWallets(),{user:h}=i.usePrivyContext(),[v,C]=r.useState(),y=n.getEmbeddedConnectedWallet(p);return r.useEffect((()=>{(async()=>{if(!o?.enabled)return;let e=o.configuredNetworks.find((e=>e.chainId===`eip155:${g.id}`))?g:f.find((e=>o.configuredNetworks.map((e=>e.chainId)).includes(`eip155:${e.id}`)));if(!e)throw new i.PrivyClientError("Could not find smart wallets chain configurations for any Privy client configured chains. Please configure smart wallets for your chains in the Privy dashboard.");C(await a.getSmartWalletClient({chain:e,privyAppId:u,paymasterContext:l?.paymasterContext,rpcConfig:m,embeddedWallet:y,user:h,smartWalletsConfig:o}))})()}),[!!o?.enabled,!!h?.smartWallet,!!y]),e.jsx(d.Provider,{value:{client:v,config:l},children:s})},d=r.createContext({client:void 0,config:void 0}),f=({children:t})=>{let{client:n,config:s}=(()=>{let{client:e,config:t}=r.useContext(d);return{client:e,config:t}})(),{config:o}=c(),{wrapSmartAccountClient:u}=a.useSmartWalletsWrapper({clientConfig:s,smartWalletsConfig:o}),{user:f}=i.usePrivyContext(),{generateSiweMessageForSmartWallet:g,linkSmartWallet:m,noPromptOnSignature:p}=i.usePrivyInternal();return r.useEffect((()=>{(async()=>{if(n&&f&&!f?.smartWallet&&o?.enabled)try{let e=await g({address:n.account.address,chainId:`eip155:${n.chain.id}`});p.current=!0;let r=await n.signMessage({message:e});await m({signature:r,message:e,smartWalletType:o.smartWalletType})}catch(e){console.error("Error creating smart wallet:",e)}finally{p.current=!1}})()}),[!!n,!!f?.smartWallet,!!o?.enabled]),e.jsx(l.Provider,{value:{client:f?.smartWallet&&n?u(n):void 0},children:t})};exports.SmartWalletsProvider=({config:r,children:t})=>e.jsx(o,{children:e.jsx(u,{config:r,children:e.jsx(f,{children:t})})}),exports.useSmartWallets=()=>{let{client:e}=r.useContext(l);return{client:e}};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./useWallets-C0z7M7ns.js"),i=require("./privy-context-BWc1w1jF.js"),n=require("./getEmbeddedConnectedWallet-Del3IDYI.js"),a=require("./smart-wallets-DJPOfurY.js");require("@ethersproject/providers"),require("tinycolor2"),require("ofetch"),require("@ethersproject/address"),require("viem"),require("permissionless"),require("permissionless/accounts"),require("permissionless/clients/pimlico"),require("viem/account-abstraction"),require("zod"),require("bs58"),require("ethers"),require("libphonenumber-js/max");let l=r.createContext({client:void 0});let s=r.createContext({config:void 0}),c=()=>{let{config:e}=r.useContext(s);return{config:e}},o=({children:t})=>{let[n,a]=r.useState(void 0),{client:l}=i.usePrivyInternal();return r.useEffect((()=>{!n&&l&&(async()=>{try{if(!l)return void console.warn("No client found");let e=await l.getSmartWalletsConfig();a(e)}catch(e){console.warn("Error generating smart wallet config: ",e)}})()}),[!!l]),e.jsx(s.Provider,{value:{config:n},children:t})},u=({config:l,children:s})=>{let{config:o}=c(),{appId:u}=i.usePrivyInternal(),{chains:f,defaultChain:g,rpcConfig:m}=t.useAppConfig(),{wallets:p}=t.useWallets(),{user:h}=i.usePrivyContext(),[v,C]=r.useState(),y=n.getEmbeddedConnectedWallet(p);return r.useEffect((()=>{(async()=>{if(!o?.enabled)return;let e=o.configuredNetworks.find((e=>e.chainId===`eip155:${g.id}`))?g:f.find((e=>o.configuredNetworks.map((e=>e.chainId)).includes(`eip155:${e.id}`)));if(!e)throw new i.PrivyClientError("Could not find smart wallets chain configurations for any Privy client configured chains. Please configure smart wallets for your chains in the Privy dashboard.");C(await a.getSmartWalletClient({chain:e,privyAppId:u,paymasterContext:l?.paymasterContext,rpcConfig:m,embeddedWallet:y,user:h,smartWalletsConfig:o}))})()}),[!!o?.enabled,!!h?.smartWallet,!!y]),e.jsx(d.Provider,{value:{client:v,config:l},children:s})},d=r.createContext({client:void 0,config:void 0}),f=({children:t})=>{let{client:n,config:s}=(()=>{let{client:e,config:t}=r.useContext(d);return{client:e,config:t}})(),{config:o}=c(),{wrapSmartAccountClient:u}=a.useSmartWalletsWrapper({clientConfig:s,smartWalletsConfig:o}),{user:f}=i.usePrivyContext(),{generateSiweMessageForSmartWallet:g,linkSmartWallet:m,noPromptOnSignature:p}=i.usePrivyInternal();return r.useEffect((()=>{(async()=>{if(n&&f&&!f?.smartWallet&&o?.enabled)try{let e=await g({address:n.account.address,chainId:`eip155:${n.chain.id}`});p.current=!0;let r=await n.signMessage({message:e});await m({signature:r,message:e,smartWalletType:o.smartWalletType})}catch(e){console.error("Error creating smart wallet:",e)}finally{p.current=!1}})()}),[!!n,!!f?.smartWallet,!!o?.enabled]),e.jsx(l.Provider,{value:{client:f?.smartWallet&&n?u(n):void 0},children:t})};exports.SmartWalletsProvider=({config:r,children:t})=>e.jsx(o,{children:e.jsx(u,{config:r,children:e.jsx(f,{children:t})})}),exports.useSmartWallets=()=>{let{client:e}=r.useContext(l);return{client:e}};
package/dist/cjs/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("./privy-context-BWc1w1jF.js"),s=require("./useFundWallet-6RBQbyke.js"),r=require("./useWallets-DS5oOPnB.js"),i=require("styled-components"),n=require("@heroicons/react/24/outline/CheckIcon"),l=require("react"),o=require("@floating-ui/react");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}require("ofetch"),require("@ethersproject/address"),require("./events-context-D4csIP2K.js"),require("@heroicons/react/24/outline/Square2StackIcon"),require("@ethersproject/bignumber"),require("@ethersproject/units"),require("viem"),require("@ethersproject/providers"),require("tinycolor2");var c=a(n),h=d(l);const p=t=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M9.99999 10.8333C12.3012 10.8333 14.1667 8.96785 14.1667 6.66667C14.1667 4.36548 12.3012 2.5 9.99999 2.5C7.69881 2.5 5.83333 4.36548 5.83333 6.66667C5.83333 8.96785 7.69881 10.8333 9.99999 10.8333ZM9.99999 10.8333C11.7681 10.8333 13.4638 11.5357 14.714 12.786C15.9643 14.0362 16.6667 15.7319 16.6667 17.5M9.99999 10.8333C8.23188 10.8333 6.53619 11.5357 5.28595 12.786C4.03571 14.0362 3.33333 15.7319 3.33333 17.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),x=i.styled.button`
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("./privy-context-BWc1w1jF.js"),s=require("./useFundWallet-BeSetwKW.js"),r=require("./useWallets-C0z7M7ns.js"),i=require("styled-components"),n=require("@heroicons/react/24/outline/CheckIcon"),l=require("react"),o=require("@floating-ui/react");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}require("ofetch"),require("@ethersproject/address"),require("./events-context-D4csIP2K.js"),require("@heroicons/react/24/outline/Square2StackIcon"),require("@ethersproject/bignumber"),require("@ethersproject/units"),require("viem"),require("@ethersproject/providers"),require("tinycolor2");var c=a(n),h=d(l);const p=t=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:e.jsx("path",{d:"M9.99999 10.8333C12.3012 10.8333 14.1667 8.96785 14.1667 6.66667C14.1667 4.36548 12.3012 2.5 9.99999 2.5C7.69881 2.5 5.83333 4.36548 5.83333 6.66667C5.83333 8.96785 7.69881 10.8333 9.99999 10.8333ZM9.99999 10.8333C11.7681 10.8333 13.4638 11.5357 14.714 12.786C15.9643 14.0362 16.6667 15.7319 16.6667 17.5M9.99999 10.8333C8.23188 10.8333 6.53619 11.5357 5.28595 12.786C4.03571 14.0362 3.33333 15.7319 3.33333 17.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})}),x=i.styled.button`
2
2
  --size: ${({$size:e})=>`${e}px`};
3
3
 
4
4
  -webkit-font-smoothing: antialiased;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react"),r=require("react/jsx-runtime"),t=require("styled-components"),o=require("./useWallets-DS5oOPnB.js"),a=require("./events-context-D4csIP2K.js"),c=require("./privy-context-BWc1w1jF.js"),i=require("@heroicons/react/24/outline/Square2StackIcon"),n=require("@ethersproject/bignumber"),l=require("@ethersproject/units"),s=require("viem");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=d(i);let u=e=>n.BigNumber.from(e);class p{get(e){let r=localStorage.getItem(e);return null===r?void 0:JSON.parse(r)}put(e,r){void 0!==r?localStorage.setItem(e,JSON.stringify(r)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map((([e])=>e))}}var v="undefined"!=typeof window&&window.localStorage?new p:new class{get(e){return this._cache[e]}put(e,r){void 0!==r?this._cache[e]=r:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};const g=t.styled.span`
1
+ "use strict";var e=require("react"),r=require("react/jsx-runtime"),t=require("styled-components"),o=require("./useWallets-C0z7M7ns.js"),a=require("./events-context-D4csIP2K.js"),c=require("./privy-context-BWc1w1jF.js"),i=require("@heroicons/react/24/outline/Square2StackIcon"),n=require("@ethersproject/bignumber"),l=require("@ethersproject/units"),s=require("viem");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=d(i);let u=e=>n.BigNumber.from(e);class p{get(e){let r=localStorage.getItem(e);return null===r?void 0:JSON.parse(r)}put(e,r){void 0!==r?localStorage.setItem(e,JSON.stringify(r)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map((([e])=>e))}}var v="undefined"!=typeof window&&window.localStorage?new p:new class{get(e){return this._cache[e]}put(e,r){void 0!==r?this._cache[e]=r:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};const g=t.styled.span`
2
2
  && {
3
3
  width: 82px;
4
4
  height: 82px;
@@ -1 +1 @@
1
- "use strict";var e=require("@ethersproject/providers"),t=require("./privy-context-BWc1w1jF.js"),r=require("react/jsx-runtime"),a=require("react");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(require("tinycolor2"));const l=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,i=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==l(e))return!1;if(e.providers)for(let t of e.providers)if(!i(t))return!1;return!0},s=(e,t=3,r=4,a="ethereum")=>{if(!e)return"";let n="ethereum"===a?2:0;return t+r+n+3>=e.length?e:`${e.slice(0,n+t)}...${e.slice(e.length-r,e.length)}`},p=e=>new Promise((t=>setTimeout(t,e)));const c=(e,r,a)=>{let n,o=e.id,l=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])n=e.rpcUrls.privyWalletOverride.http[0];else if(r.rpcUrls&&r.rpcUrls[l])n=r.rpcUrls[l];else if(e.rpcUrls.privy?.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",a),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.PrivyConnectorError(`No RPC url found for ${o}`);return n};const u={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"}}},d={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},h={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"}}},m={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},f={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"}}},g={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},y={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},b={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},w={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"}}},C={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"}}},v={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},E={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"}}},x={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},k={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},S={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"}}},O=[u,d,k,w,C,v,E,x,y,{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"}}},f,g,{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"}}},b,{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},h,m,S,{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"}}}],A=new Set(O.map((e=>e.id))),_={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 U=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"]),T=e=>U.has(e),W=(e,t,r)=>r.indexOf(e)===t;const P=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(T).filter(W):e?e.filter(T).filter(W):_.appearance.walletList;function M(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}let I="#FFFFFF";function F(e,t){let r=Math.max(0,Math.min(1,e.toHsl().l+t));return o.default({...e.toHsl(),l:r})}function L({backgroundTheme:e,accentHex:t}){let r;switch(e){case"light":r=I;break;case"dark":r="#1E1E1D";break;default:r=e}let a=o.default(r),n=o.default(t),l=o.default("#51BA81"),i=o.default("#FFB74D"),s=o.default("#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"}(a.getLuminance()),c=F(a,"light"===p?-.04:.11),u=F(a,"light"===p?-.88:.87),d=F(a,"light"===p?-.7:.75),h=F(a,"light"===p?-.43:.45).desaturate("light"===p?60:20),m=F(a,"light"===p?-.08:.25).desaturate("light"===p?60:20),f=F(n,.15),g=F(n,.25),y=F(n,-.06),b=F(n,-.6),w=F(s,.3),C=F(i,.3),v=o.default(n.getLuminance()>.5?"#040217":I),E=F(l,-.16),x=F(l,.4);return{colorScheme:p,background:a.toHslString(),background2:c.toHslString(),foreground:u.toHslString(),foreground2:d.toHslString(),foreground3:h.toHslString(),foreground4:m.toHslString(),accent:n.toHslString(),accentLight:f.toHslString(),accentLightest:g.toHslString(),accentDark:y.toHslString(),accentDarkest:b.toHslString(),foregroundAccent:v.toHslString(),success:l.toHslString(),successDark:E.toHslString(),successLight:x.toHslString(),error:s.toHslString(),errorLight:w.toHslString(),warn:i.toHslString(),warnLight:C.toHslString()}}function D(e,t,r){let a,n,o,l,i,s,p,c,u,d,h,m,f,g,y,b,C=r?console.warn:()=>{};t?.loginMethods?(a=t.loginMethods.includes("email"),n=t.loginMethods.includes("sms"),l=t.loginMethods.includes("wallet"),i=t.loginMethods.includes("google"),s=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),d=t.loginMethods.includes("instagram"),c=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("github"),h=t.loginMethods.includes("linkedin"),f=t.loginMethods.includes("apple"),g=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram")):(a=e.emailAuth,n=e.smsAuth,l=e.walletAuth||e.solanaWalletAuth,i=e.googleOAuth,s=e.twitterOAuth,p=e.discordOAuth,m=e.githubOAuth,u=e.spotifyOAuth,d=e.instagramOAuth,c=e.tiktokOAuth,h=e.linkedinOAuth,f=e.appleOAuth,g=e.farcasterAuth,y=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?o=!1:e.passkeyAuth&&(o=!0);let v=[a,n].filter(Boolean),E=[i,s,p,m,u,d,c,h,f,g,y].filter(Boolean),x=[l].filter(Boolean);if(v.length+E.length+x.length===0)throw Error("You must enable at least one login method");let k=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;k&&0===x.length?(C("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),k=!1):k||E.length+v.length!==0||(C("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),k=!0);let S=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&C("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let A=P({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),U=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],r=[];for(let r 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(r)?console.warn(`Duplicated login method: ${r}`):t.push(r);for(let a of e.overflow??[])t.includes(a)||r.includes(a)?console.warn(`Duplicated login method: ${a}`):r.push(a);return{primary:t,overflow:r}})({input:t?.loginMethodsAndOrder}),T=t?.intl?.defaultCountry??"US",{chains:W,defaultChain:I}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:r,hasRpcConfigDefined:a}){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&&a&&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=O.find((t=>t.id===e.id)),r=t?.rpcUrls.privy?.http[0];return r?M(e,r):e}))}else n=O.concat(e??[]);let o=t?n[0]:w,l=r??o;if(!n.find((e=>e.id===l.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:n,defaultChain:l}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),F=!!t?.defaultChain,D=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,R=!(e.enforceWalletUis??1);if(b=e.legacyWalletUiConfig??1?D?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??R:R,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==b)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:H,...K}=t?.embeddedWallets??{};return{id:e.id,name:e.name,allowlistConfig:e.allowlistConfig,legacyWalletUiConfig:e.legacyWalletUiConfig,appearance:{logo:t?.appearance?.logo??e.logoUrl,landingHeader:t?.appearance?.landingHeader??_.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:L({backgroundTheme:t?.appearance?.theme??_.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??_.appearance.accentColor}),loginGroupPriority:k?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:A,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:l,email:a,sms:n,passkey:o,google:i,twitter:s,discord:p,github:m,spotify:u,instagram:d,tiktok:c,linkedin:h,apple:f,farcaster:g,telegram:y},disablePlusEmails:e.disablePlusEmails,loginMethodsAndOrder:U,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??_.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??_.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??_.rpcConfig.rpcTimeouts},chains:W,defaultChain:I,intl:{defaultCountry:T},shouldEnforceDefaultChainOnConnect:F,captchaEnabled:e.captchaEnabled??_.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??_.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:S},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof H?{requireUserOwnedRecoveryOnCreate:H}:{},...D?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...K,noPromptOnSignature:b,showWalletUIs:t?.embeddedWallets?.showWalletUIs,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:D?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??_._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??_.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??_.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??_.fundingMethodConfig.moonpay.useSandbox}}}}let R={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 H=D(R,void 0,!1);let K=a.createContext({appConfig:H,isServerConfigLoaded:!1});const N=a.createContext(null);exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CONNECTORS_STATE_KEY="privy:connectors",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_APP_CONFIG=H,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEFAULT_SUPPORTED_CHAINS=O,exports.DEFAULT_SUPPORTED_CHAIN_IDS=A,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.FORKED_TOKEN_STORAGE_KEY="privy:session_transfer_token",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:e,legacyCreateEmbeddedWalletFlag:t,client:n,clientConfig:o})=>{let[l,i]=a.useState(null),s=a.useMemo((()=>D(l??R,o,!!l)),[l,o]);return a.useEffect((()=>{if(!l)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:r,additionalChains:a,supportedChains:n,defaultChain:o,externalWallets:l,...i}=e;return{...i,...a?{additionalChains:a.map((e=>e.id))}:void 0,...n?{supportedChains:n.map((e=>e.id))}:void 0,...o?{defaultChain:o.id}:void 0,...l?{walletConnect:l.walletConnect,coinbaseWallet:l.coinbaseWallet,solana:{connectors:l.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0,legacyCreateEmbeddedWalletFlag:t}}(o,t),r=function(e,t=0){let r=3735928559^t,a=1103547991^t;for(let t,n=0;n<e.length;n++)r=Math.imul(r^(t=e.charCodeAt(n)),2654435761),a=Math.imul(a^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),4294967296*(2097151&(a=Math.imul(a^a>>>16,2246822507)^Math.imul(r^r>>>13,3266489909)))+(r>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${l.id}:${r}`;localStorage.getItem(a)||(n.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[o,t,l]),a.useEffect((()=>{l||(async()=>{try{let e=await n.getServerConfig();e.customApiUrl&&n.updateApiUrl(e.customApiUrl),i(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),r.jsx(K.Provider,{value:{appConfig:s,isServerConfigLoaded:!!l},children:e})},exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.UseWalletsContext=N,exports.VERSION="1.94.1",exports.WALLET_PROXY_TIMEOUT=3e4,exports.addPrivyRpcToChain=M,exports.addRpcUrlOverrideToChain=function(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}},exports.addToDefaultChains=function(e){let t=e.filter((e=>!A.has(e.id)));return O.concat(t)},exports.arbitrum=u,exports.arbitrumSepolia=d,exports.avalanche=h,exports.avalancheFuji=m,exports.base=f,exports.baseSepolia=g,exports.celo=y,exports.clamp=function(e,{min:t,max:r}){return Math.min(Math.max(e,t),r)},exports.constructURL=(e,t,r={},a={})=>{let n=new URL(t,e);for(let[e,t]of Object.entries(r))void 0!==t&&n.searchParams.set(e,t);let o=Object.entries(a);if(o.length>0){let e=new URLSearchParams;for(let[t,r]of o)e.append(t,r);n.hash=e.toString()}return n.href},exports.convert1dTo2dArray=(e,t)=>{let r=e.slice(0),a=[];for(;r.length;)a.push(r.splice(0,t));return a},exports.detectInjectedConnectors=async function({store:e,walletList:t,externalWalletConfig:r,walletChainType:a,timeout:n=3e3}){let o=!1,s=window;return new Promise((p=>{function c(){if(o)return;o=!0,window.removeEventListener("ethereum#initialized",c);let n=e.getProviders();console.debug("Detected injected providers:",n.map((e=>e.info)));let s=[];for(let e of n)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===a&&"app.phantom"===e.info.rdns||s.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==a)for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let r=[];if(t.providers?.length)for(let e of t.providers)e&&r.push(e);return r.push(e.ethereum),r}()){let t=l(e);if(!n.some((e=>e.info.name===t))){if(i(e,!0)&&!s.find((e=>"metamask"===e.type))){s.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!s.find((e=>"phantom"===e.type))){s.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!s.find((e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==r.coinbaseWallet?.connectionOptions))){s.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}s.find((e=>"unknown_browser_extension"===e.type))||s.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}p(s)}s.ethereum?c():(window.addEventListener("ethereum#initialized",c,{once:!0}),setTimeout((()=>{c()}),n))}))},exports.formatChainIdToCAIP2=function(e){return`eip155:${String(Number(e))}`},exports.formatSolanaWalletAddress=(e,t=3,r=4)=>s(e,t,r,"solana"),exports.formatWalletAddress=s,exports.generateTypedDataWithDomainType=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},r=e.types.EIP712Domain??Object.entries(e.domain).map((([e,r])=>{if(null!=r&&"string"==typeof e&&e in t)return{name:e,type:t[e]}})).filter((e=>void 0!==e));return{...e,types:{...e.types,EIP712Domain:r}}},exports.getBlockExplorer=(e,r)=>{let a=Number(e),n=r.find((e=>e.id===a));if(!n)throw new t.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return n.blockExplorers?.default.url},exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getJsonRpcEndpoint=(e,r,a,n)=>{let o=Number(e),l=r.find((e=>e.id===o));if(!l)throw new t.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return c(l,a,n)},exports.getJsonRpcEndpointFromChain=c,exports.getJsonRpcProvider=(r,a,n,o)=>{let l=Number(r),i=a.find((e=>e.id===l));if(!i)throw new t.PrivyConnectorError(`Unsupported chainId ${r}`,4901);return new e.StaticJsonRpcProvider(i.rpcUrls.privyWalletOverride&&i.rpcUrls.privyWalletOverride.http[0]?i.rpcUrls.privyWalletOverride.http[0]:n.rpcUrls&&n.rpcUrls[l]?n.rpcUrls[l]:i.rpcUrls.privy?.http[0]?{url:i.rpcUrls.privy.http[0],headers:{"privy-app-id":o.appId}}:i.rpcUrls.public?.http[0]?i.rpcUrls.public.http[0]:i.rpcUrls.default?.http[0])},exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.invokeUntilSettled=(e,t={})=>{let r=t.delayMs||150,a=t.maxAttempts||270;return new Promise((async(n,o)=>{let l=!1,i=0;for(;!l&&i<a;){if(t.abortSignal?.aborted)return;e().then((e=>{l=!0,n(e)}),((...e)=>{l=!0,o(...e)})),i+=1,await p(r)}l||o(Error("Exceeded max attempts before resolving function"))}))},exports.isCoinbaseWalletInstalled=()=>{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},exports.isPhantomInstalled=()=>{if("phantom"in window){let e=window;if(e?.phantom?.ethereum?.isPhantom&&e?.phantom?.ethereum?.chainId)return!0}return!1},exports.linea=b,exports.mainnet=w,exports.optimism=C,exports.optimismSepolia=v,exports.pollForResult=function(e,{interval:t=100,timeout:r=5e3}={}){return new Promise(((a,n)=>{let o,l=0,i=()=>{l>=r?n("Max attempts reached without result"):(o=e(),l+=t,null==o?setTimeout(i,t):a(o))};i()}))},exports.polygon=E,exports.polygonAmoy=x,exports.sepolia=k,exports.sleep=p,exports.splitAtIndex=(e,t)=>{let r=[],a=[];for(let[n,o]of e.entries())n<t?r.push(o):a.push(o);return[r,a]},exports.stripEmoji=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),exports.toHex=e=>"string"==typeof e?e:"0x"+e.toString(16),exports.useAppConfig=()=>{let{appConfig:e}=a.useContext(K);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=a.useContext(K);return e},exports.useWallets=function(){let e=a.useContext(N);if(null===e)throw Error("`useWallets` was called outside the PrivyProvider component");return e},exports.validateEmail=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,}))$/),exports.zora=S;
1
+ "use strict";var e=require("@ethersproject/providers"),t=require("./privy-context-BWc1w1jF.js"),r=require("react/jsx-runtime"),a=require("react");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(require("tinycolor2"));const l=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,i=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==l(e))return!1;if(e.providers)for(let t of e.providers)if(!i(t))return!1;return!0},s=(e,t=3,r=4,a="ethereum")=>{if(!e)return"";let n="ethereum"===a?2:0;return t+r+n+3>=e.length?e:`${e.slice(0,n+t)}...${e.slice(e.length-r,e.length)}`},p=e=>new Promise((t=>setTimeout(t,e)));const c=(e,r,a)=>{let n,o=e.id,l=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])n=e.rpcUrls.privyWalletOverride.http[0];else if(r.rpcUrls&&r.rpcUrls[l])n=r.rpcUrls[l];else if(e.rpcUrls.privy?.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",a),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.PrivyConnectorError(`No RPC url found for ${o}`);return n};const u={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"}}},d={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},h={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"}}},m={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},f={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"}}},g={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},y={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},b={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},w={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"}}},v={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"}}},C={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},E={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"}}},x={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},k={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},S={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"}}},O=[u,d,k,w,v,C,E,x,y,{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"}}},f,g,{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"}}},b,{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},h,m,S,{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"}}}],A=new Set(O.map((e=>e.id))),_={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 U=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"]),T=e=>U.has(e),W=(e,t,r)=>r.indexOf(e)===t;const P=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(T).filter(W):e?e.filter(T).filter(W):_.appearance.walletList;function M(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}let I="#FFFFFF";function F(e,t){let r=Math.max(0,Math.min(1,e.toHsl().l+t));return o.default({...e.toHsl(),l:r})}function L({backgroundTheme:e,accentHex:t}){let r;switch(e){case"light":r=I;break;case"dark":r="#1E1E1D";break;default:r=e}let a=o.default(r),n=o.default(t),l=o.default("#51BA81"),i=o.default("#FFB74D"),s=o.default("#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"}(a.getLuminance()),c=F(a,"light"===p?-.04:.11),u=F(a,"light"===p?-.88:.87),d=F(a,"light"===p?-.7:.75),h=F(a,"light"===p?-.43:.45).desaturate("light"===p?60:20),m=F(a,"light"===p?-.08:.25).desaturate("light"===p?60:20),f=F(n,.15),g=F(n,.25),y=F(n,-.06),b=F(n,-.6),w=F(s,.3),v=F(i,.3),C=o.default(n.getLuminance()>.5?"#040217":I),E=F(l,-.16),x=F(l,.4);return{colorScheme:p,background:a.toHslString(),background2:c.toHslString(),foreground:u.toHslString(),foreground2:d.toHslString(),foreground3:h.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:E.toHslString(),successLight:x.toHslString(),error:s.toHslString(),errorLight:w.toHslString(),warn:i.toHslString(),warnLight:v.toHslString()}}function D(e,t,r){let a,n,o,l,i,s,p,c,u,d,h,m,f,g,y,b,v=r?console.warn:()=>{};t?.loginMethods?(a=t.loginMethods.includes("email"),n=t.loginMethods.includes("sms"),l=t.loginMethods.includes("wallet"),i=t.loginMethods.includes("google"),s=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),d=t.loginMethods.includes("instagram"),c=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("github"),h=t.loginMethods.includes("linkedin"),f=t.loginMethods.includes("apple"),g=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram")):(a=e.emailAuth,n=e.smsAuth,l=e.walletAuth||e.solanaWalletAuth,i=e.googleOAuth,s=e.twitterOAuth,p=e.discordOAuth,m=e.githubOAuth,u=e.spotifyOAuth,d=e.instagramOAuth,c=e.tiktokOAuth,h=e.linkedinOAuth,f=e.appleOAuth,g=e.farcasterAuth,y=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?o=!1:e.passkeyAuth&&(o=!0);let C=[a,n].filter(Boolean),E=[i,s,p,m,u,d,c,h,f,g,y].filter(Boolean),x=[l].filter(Boolean);if(C.length+E.length+x.length===0)throw Error("You must enable at least one login method");let k=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;k&&0===x.length?(v("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),k=!1):k||E.length+C.length!==0||(v("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),k=!0);let S=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&v("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let A=P({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),U=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],r=[];for(let r 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(r)?console.warn(`Duplicated login method: ${r}`):t.push(r);for(let a of e.overflow??[])t.includes(a)||r.includes(a)?console.warn(`Duplicated login method: ${a}`):r.push(a);return{primary:t,overflow:r}})({input:t?.loginMethodsAndOrder}),T=t?.intl?.defaultCountry??"US",{chains:W,defaultChain:I}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:r,hasRpcConfigDefined:a}){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&&a&&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=O.find((t=>t.id===e.id)),r=t?.rpcUrls.privy?.http[0];return r?M(e,r):e}))}else n=O.concat(e??[]);let o=t?n[0]:w,l=r??o;if(!n.find((e=>e.id===l.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:n,defaultChain:l}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),F=!!t?.defaultChain,D=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,R=!(e.enforceWalletUis??1);if(b=e.legacyWalletUiConfig??1?D?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??R:R,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==b)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:H,...K}=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??_.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:L({backgroundTheme:t?.appearance?.theme??_.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??_.appearance.accentColor}),loginGroupPriority:k?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:A,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:l,email:a,sms:n,passkey:o,google:i,twitter:s,discord:p,github:m,spotify:u,instagram:d,tiktok:c,linkedin:h,apple:f,farcaster:g,telegram:y},disablePlusEmails:e.disablePlusEmails,loginMethodsAndOrder:U,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??_.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??_.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??_.rpcConfig.rpcTimeouts},chains:W,defaultChain:I,intl:{defaultCountry:T},shouldEnforceDefaultChainOnConnect:F,captchaEnabled:e.captchaEnabled??_.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??_.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:S},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof H?{requireUserOwnedRecoveryOnCreate:H}:{},...D?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...K,noPromptOnSignature:b,showWalletUIs:t?.embeddedWallets?.showWalletUIs,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:D?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??_._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??_.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??_.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??_.fundingMethodConfig.moonpay.useSandbox}}}}let R={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 H=D(R,void 0,!1);let K=a.createContext({appConfig:H,isServerConfigLoaded:!1});const N=a.createContext(null);exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CONNECTORS_STATE_KEY="privy:connectors",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_APP_CONFIG=H,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEFAULT_SUPPORTED_CHAINS=O,exports.DEFAULT_SUPPORTED_CHAIN_IDS=A,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.FORKED_TOKEN_STORAGE_KEY="privy:session_transfer_token",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:e,legacyCreateEmbeddedWalletFlag:t,client:n,clientConfig:o})=>{let[l,i]=a.useState(null),s=a.useMemo((()=>D(l??R,o,!!l)),[l,o]);return a.useEffect((()=>{if(!l)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:r,additionalChains:a,supportedChains:n,defaultChain:o,externalWallets:l,...i}=e;return{...i,...a?{additionalChains:a.map((e=>e.id))}:void 0,...n?{supportedChains:n.map((e=>e.id))}:void 0,...o?{defaultChain:o.id}:void 0,...l?{walletConnect:l.walletConnect,coinbaseWallet:l.coinbaseWallet,solana:{connectors:l.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0,legacyCreateEmbeddedWalletFlag:t}}(o,t),r=function(e,t=0){let r=3735928559^t,a=1103547991^t;for(let t,n=0;n<e.length;n++)r=Math.imul(r^(t=e.charCodeAt(n)),2654435761),a=Math.imul(a^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),4294967296*(2097151&(a=Math.imul(a^a>>>16,2246822507)^Math.imul(r^r>>>13,3266489909)))+(r>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${l.id}:${r}`;localStorage.getItem(a)||(n.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[o,t,l]),a.useEffect((()=>{l||(async()=>{try{let e=await n.getServerConfig();e.customApiUrl&&n.updateApiUrl(e.customApiUrl),i(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),r.jsx(K.Provider,{value:{appConfig:s,isServerConfigLoaded:!!l},children:e})},exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.UseWalletsContext=N,exports.VERSION="1.94.3-beta-20241118141256",exports.WALLET_PROXY_TIMEOUT=3e4,exports.addPrivyRpcToChain=M,exports.addRpcUrlOverrideToChain=function(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}},exports.addToDefaultChains=function(e){let t=e.filter((e=>!A.has(e.id)));return O.concat(t)},exports.arbitrum=u,exports.arbitrumSepolia=d,exports.avalanche=h,exports.avalancheFuji=m,exports.base=f,exports.baseSepolia=g,exports.celo=y,exports.clamp=function(e,{min:t,max:r}){return Math.min(Math.max(e,t),r)},exports.constructURL=(e,t,r={},a={})=>{let n=new URL(t,e);for(let[e,t]of Object.entries(r))void 0!==t&&n.searchParams.set(e,t);let o=Object.entries(a);if(o.length>0){let e=new URLSearchParams;for(let[t,r]of o)e.append(t,r);n.hash=e.toString()}return n.href},exports.convert1dTo2dArray=(e,t)=>{let r=e.slice(0),a=[];for(;r.length;)a.push(r.splice(0,t));return a},exports.detectInjectedConnectors=async function({store:e,walletList:t,externalWalletConfig:r,walletChainType:a,timeout:n=3e3}){let o=!1,s=window;return new Promise((p=>{function c(){if(o)return;o=!0,window.removeEventListener("ethereum#initialized",c);let n=e.getProviders();console.debug("Detected injected providers:",n.map((e=>e.info)));let s=[];for(let e of n)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===a&&"app.phantom"===e.info.rdns||s.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==a)for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let r=[];if(t.providers?.length)for(let e of t.providers)e&&r.push(e);return r.push(e.ethereum),r}()){let t=l(e);if(!n.some((e=>e.info.name===t))){if(i(e,!0)&&!s.find((e=>"metamask"===e.type))){s.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!s.find((e=>"phantom"===e.type))){s.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!s.find((e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==r.coinbaseWallet?.connectionOptions))){s.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}s.find((e=>"unknown_browser_extension"===e.type))||s.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}p(s)}s.ethereum?c():(window.addEventListener("ethereum#initialized",c,{once:!0}),setTimeout((()=>{c()}),n))}))},exports.formatChainIdToCAIP2=function(e){return`eip155:${String(Number(e))}`},exports.formatSolanaWalletAddress=(e,t=3,r=4)=>s(e,t,r,"solana"),exports.formatWalletAddress=s,exports.generateTypedDataWithDomainType=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},r=e.types.EIP712Domain??Object.entries(e.domain).map((([e,r])=>{if(null!=r&&"string"==typeof e&&e in t)return{name:e,type:t[e]}})).filter((e=>void 0!==e));return{...e,types:{...e.types,EIP712Domain:r}}},exports.getBlockExplorer=(e,r)=>{let a=Number(e),n=r.find((e=>e.id===a));if(!n)throw new t.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return n.blockExplorers?.default.url},exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getJsonRpcEndpoint=(e,r,a,n)=>{let o=Number(e),l=r.find((e=>e.id===o));if(!l)throw new t.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return c(l,a,n)},exports.getJsonRpcEndpointFromChain=c,exports.getJsonRpcProvider=(r,a,n,o)=>{let l=Number(r),i=a.find((e=>e.id===l));if(!i)throw new t.PrivyConnectorError(`Unsupported chainId ${r}`,4901);return new e.StaticJsonRpcProvider(i.rpcUrls.privyWalletOverride&&i.rpcUrls.privyWalletOverride.http[0]?i.rpcUrls.privyWalletOverride.http[0]:n.rpcUrls&&n.rpcUrls[l]?n.rpcUrls[l]:i.rpcUrls.privy?.http[0]?{url:i.rpcUrls.privy.http[0],headers:{"privy-app-id":o.appId}}:i.rpcUrls.public?.http[0]?i.rpcUrls.public.http[0]:i.rpcUrls.default?.http[0])},exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.invokeUntilSettled=(e,t={})=>{let r=t.delayMs||150,a=t.maxAttempts||270;return new Promise((async(n,o)=>{let l=!1,i=0;for(;!l&&i<a;){if(t.abortSignal?.aborted)return;e().then((e=>{l=!0,n(e)}),((...e)=>{l=!0,o(...e)})),i+=1,await p(r)}l||o(Error("Exceeded max attempts before resolving function"))}))},exports.isCoinbaseWalletInstalled=()=>{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},exports.isPhantomInstalled=()=>{if("phantom"in window){let e=window;if(e?.phantom?.ethereum?.isPhantom&&e?.phantom?.ethereum?.chainId)return!0}return!1},exports.linea=b,exports.mainnet=w,exports.optimism=v,exports.optimismSepolia=C,exports.pollForResult=function(e,{interval:t=100,timeout:r=5e3}={}){return new Promise(((a,n)=>{let o,l=0,i=()=>{l>=r?n("Max attempts reached without result"):(o=e(),l+=t,null==o?setTimeout(i,t):a(o))};i()}))},exports.polygon=E,exports.polygonAmoy=x,exports.sepolia=k,exports.sleep=p,exports.splitAtIndex=(e,t)=>{let r=[],a=[];for(let[n,o]of e.entries())n<t?r.push(o):a.push(o);return[r,a]},exports.stripEmoji=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),exports.toHex=e=>"string"==typeof e?e:"0x"+e.toString(16),exports.useAppConfig=()=>{let{appConfig:e}=a.useContext(K);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=a.useContext(K);return e},exports.useWallets=function(){let e=a.useContext(N);if(null===e)throw Error("`useWallets` was called outside the PrivyProvider component");return e},exports.validateEmail=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,}))$/),exports.zora=S;
@@ -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 RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as OAuthProviderType, n as MoonpaySignRequest, o as MoonpaySignResponse, p as SmartWalletConfig, q as PrivyServerConfig, L as LoginMethod, r as SiweWalletMetadata, T as TelegramAuthResult, s as OAuthUserInfo, t as PrivyClientConfig, u as ConnectWalletModalOptions, v as LoginModalOptions, w as CreateWalletOptions, x as Wallet, y as SetWalletRecoveryOptions, z as SignMessageModalUIOptions, A as SignTypedDataParams, D as MfaMethod, F as UnsignedTransactionRequest, G as SendTransactionModalUIOptions, H as FundWalletConfig, I as TransactionReceipt, J as SupportedSolanaTransaction, K as SolanaTransactionReceipt, N as ConnectedWallet, Q as OAuthFlowState, V as LoginWithCode, X as OtpFlowState, Y as PasskeyFlowState, Z as SiweFlowState, _ as UnsignedTransactionRequestWithChainId, $ as CustomAuthFlowState } from './types-STuZuryK.js';
4
- export { ai as Apple, as as AppleOAuthWithMetadata, aH as ConnectedSolanaWallet, aA as ContractUIOptions, al as CrossAppAccount, av as CrossAppAccountWithMetadata, af as Discord, ao as DiscordOAuthWithMetadata, ax as Email, aa as EmailWithMetadata, aE as Farcaster, at as FarcasterWithMetadata, ag as Github, ap as GithubOAuthWithMetadata, ad as Google, am as GoogleOAuthWithMetadata, ah as LinkedIn, ar as LinkedInOAuthWithMetadata, aG as LoginMethodOrderOption, a1 as MessageTypes, a3 as MoonpayConfig, a4 as MoonpayCurrencyCode, aC as MoonpayFundingConfig, a5 as MoonpayPaymentMethod, aB as NativeFundingConfig, a9 as NonEmptyArray, aF as Passkey, aw as PasskeyWithMetadata, ay as Phone, ab as PhoneWithMetadata, aD as PriceDisplayOptions, a6 as Quantity, a8 as SolanaCluster, a2 as SolanaFundingConfig, ak as Telegram, au as TelegramWithMetadata, aj as Tiktok, aq as TiktokOAuthWithMetadata, a7 as TransactionLog, az as TransactionUIOptions, ae as Twitter, an as TwitterOAuthWithMetadata, a0 as TypedMessage, ac as WalletWithMetadata } from './types-STuZuryK.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 RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as CrossAppProviderDetails, n as OAuthProviderType, o as MoonpaySignRequest, p as MoonpaySignResponse, q as SmartWalletConfig, r as PrivyServerConfig, L as LoginMethod, s as SiweWalletMetadata, T as TelegramAuthResult, t as OAuthUserInfo, u as PrivyClientConfig, v as ConnectWalletModalOptions, w as LoginModalOptions, x as CreateWalletOptions, y as Wallet, z as SetWalletRecoveryOptions, A as SignMessageModalUIOptions, D as SignTypedDataParams, F as MfaMethod, G as UnsignedTransactionRequest, H as SendTransactionModalUIOptions, I as FundWalletConfig, J as TransactionReceipt, K as SupportedSolanaTransaction, N as SolanaTransactionReceipt, Q as ConnectedWallet, V as OAuthFlowState, X as LoginWithCode, Y as OtpFlowState, Z as PasskeyFlowState, _ as SiweFlowState, $ as UnsignedTransactionRequestWithChainId, a0 as CustomAuthFlowState } from './types-D0KmEjpU.js';
4
+ export { aj as Apple, at as AppleOAuthWithMetadata, aI as ConnectedSolanaWallet, aB as ContractUIOptions, am as CrossAppAccount, aw as CrossAppAccountWithMetadata, ag as Discord, ap as DiscordOAuthWithMetadata, ay as Email, ab as EmailWithMetadata, aF as Farcaster, au as FarcasterWithMetadata, ah as Github, aq as GithubOAuthWithMetadata, ae as Google, an as GoogleOAuthWithMetadata, ai as LinkedIn, as as LinkedInOAuthWithMetadata, aH as LoginMethodOrderOption, a2 as MessageTypes, a4 as MoonpayConfig, a5 as MoonpayCurrencyCode, aD as MoonpayFundingConfig, a6 as MoonpayPaymentMethod, aC as NativeFundingConfig, aa as NonEmptyArray, aG as Passkey, ax as PasskeyWithMetadata, az as Phone, ac as PhoneWithMetadata, aE as PriceDisplayOptions, a7 as Quantity, a9 as SolanaCluster, a3 as SolanaFundingConfig, al as Telegram, av as TelegramWithMetadata, ak as Tiktok, ar as TiktokOAuthWithMetadata, a8 as TransactionLog, aA as TransactionUIOptions, af as Twitter, ao as TwitterOAuthWithMetadata, a1 as TypedMessage, ad as WalletWithMetadata } from './types-D0KmEjpU.js';
5
5
  import { E as EIP1193Provider, R as RequestArguments, P as PrivyProxyProvider } from './privyProxyProvider-BuMncVkt.js';
6
6
  export { A as AsExternalProvider } from './privyProxyProvider-BuMncVkt.js';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -18,8 +18,8 @@ import * as _solana_web3_js from '@solana/web3.js';
18
18
  import { Connection } from '@solana/web3.js';
19
19
  import { AbstractProvider } from 'web3-core';
20
20
  import { FetchOptions } from 'ofetch';
21
- import { P as PrivyEvents } from './solana-PuIs0zwD.js';
22
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-PuIs0zwD.js';
21
+ import { P as PrivyEvents } from './solana-HIKrfby6.js';
22
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-HIKrfby6.js';
23
23
  import 'viem';
24
24
  import '@privy-io/js-sdk-core';
25
25
  import '@metamask/eth-sig-util';
@@ -982,6 +982,8 @@ declare class PrivyClient {
982
982
  };
983
983
  userVerification: UserVerificationRequirement;
984
984
  }>;
985
+ _cachedProviderAppDetails: Record<string, CrossAppProviderDetails>;
986
+ getCrossAppProviderDetails(appId: string): Promise<CrossAppProviderDetails | undefined>;
985
987
  acceptTerms(): Promise<User>;
986
988
  unlinkEmail(address: string): Promise<User>;
987
989
  unlinkPhone(phoneNumber: string): Promise<User>;
@@ -2595,12 +2597,12 @@ interface UseDelegatedActionsInterface {
2595
2597
  * within a set of pre-defined permissions. Users can always decline or revoke delegation.
2596
2598
  *
2597
2599
  * @param address {string} address of the wallet to delegate
2598
- * @param chainType {'solana'} chain type for the wallet to delegate
2600
+ * @param chainType {'solana' | 'ethereum'} chain type for the wallet to delegate
2599
2601
  * @returns
2600
2602
  */
2601
- delegateWallet: ({ address, chainType }: {
2603
+ delegateWallet: ({ address, chainType, }: {
2602
2604
  address: string;
2603
- chainType: 'solana';
2605
+ chainType: 'solana' | 'ethereum';
2604
2606
  }) => Promise<void>;
2605
2607
  /**
2606
2608
  * Revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
@@ -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 RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as OAuthProviderType, n as MoonpaySignRequest, o as MoonpaySignResponse, p as SmartWalletConfig, q as PrivyServerConfig, L as LoginMethod, r as SiweWalletMetadata, T as TelegramAuthResult, s as OAuthUserInfo, t as PrivyClientConfig, u as ConnectWalletModalOptions, v as LoginModalOptions, w as CreateWalletOptions, x as Wallet, y as SetWalletRecoveryOptions, z as SignMessageModalUIOptions, A as SignTypedDataParams, D as MfaMethod, F as UnsignedTransactionRequest, G as SendTransactionModalUIOptions, H as FundWalletConfig, I as TransactionReceipt, J as SupportedSolanaTransaction, K as SolanaTransactionReceipt, N as ConnectedWallet, Q as OAuthFlowState, V as LoginWithCode, X as OtpFlowState, Y as PasskeyFlowState, Z as SiweFlowState, _ as UnsignedTransactionRequestWithChainId, $ as CustomAuthFlowState } from './types-STuZuryK.js';
4
- export { ai as Apple, as as AppleOAuthWithMetadata, aH as ConnectedSolanaWallet, aA as ContractUIOptions, al as CrossAppAccount, av as CrossAppAccountWithMetadata, af as Discord, ao as DiscordOAuthWithMetadata, ax as Email, aa as EmailWithMetadata, aE as Farcaster, at as FarcasterWithMetadata, ag as Github, ap as GithubOAuthWithMetadata, ad as Google, am as GoogleOAuthWithMetadata, ah as LinkedIn, ar as LinkedInOAuthWithMetadata, aG as LoginMethodOrderOption, a1 as MessageTypes, a3 as MoonpayConfig, a4 as MoonpayCurrencyCode, aC as MoonpayFundingConfig, a5 as MoonpayPaymentMethod, aB as NativeFundingConfig, a9 as NonEmptyArray, aF as Passkey, aw as PasskeyWithMetadata, ay as Phone, ab as PhoneWithMetadata, aD as PriceDisplayOptions, a6 as Quantity, a8 as SolanaCluster, a2 as SolanaFundingConfig, ak as Telegram, au as TelegramWithMetadata, aj as Tiktok, aq as TiktokOAuthWithMetadata, a7 as TransactionLog, az as TransactionUIOptions, ae as Twitter, an as TwitterOAuthWithMetadata, a0 as TypedMessage, ac as WalletWithMetadata } from './types-STuZuryK.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 RpcConfig, d as EntropyIdVerifier$1, W as WalletConnector, B as BaseConnectedEthereumWallet, e as WalletClientType, f as ConnectedWalletMetadata, g as ConnectorType, h as WalletListEntry, i as ExternalWalletsConfig, j as BaseConnectedWallet, k as SolanaWalletConnector, l as User, O as OAuthTokens, m as CrossAppProviderDetails, n as OAuthProviderType, o as MoonpaySignRequest, p as MoonpaySignResponse, q as SmartWalletConfig, r as PrivyServerConfig, L as LoginMethod, s as SiweWalletMetadata, T as TelegramAuthResult, t as OAuthUserInfo, u as PrivyClientConfig, v as ConnectWalletModalOptions, w as LoginModalOptions, x as CreateWalletOptions, y as Wallet, z as SetWalletRecoveryOptions, A as SignMessageModalUIOptions, D as SignTypedDataParams, F as MfaMethod, G as UnsignedTransactionRequest, H as SendTransactionModalUIOptions, I as FundWalletConfig, J as TransactionReceipt, K as SupportedSolanaTransaction, N as SolanaTransactionReceipt, Q as ConnectedWallet, V as OAuthFlowState, X as LoginWithCode, Y as OtpFlowState, Z as PasskeyFlowState, _ as SiweFlowState, $ as UnsignedTransactionRequestWithChainId, a0 as CustomAuthFlowState } from './types-D0KmEjpU.js';
4
+ export { aj as Apple, at as AppleOAuthWithMetadata, aI as ConnectedSolanaWallet, aB as ContractUIOptions, am as CrossAppAccount, aw as CrossAppAccountWithMetadata, ag as Discord, ap as DiscordOAuthWithMetadata, ay as Email, ab as EmailWithMetadata, aF as Farcaster, au as FarcasterWithMetadata, ah as Github, aq as GithubOAuthWithMetadata, ae as Google, an as GoogleOAuthWithMetadata, ai as LinkedIn, as as LinkedInOAuthWithMetadata, aH as LoginMethodOrderOption, a2 as MessageTypes, a4 as MoonpayConfig, a5 as MoonpayCurrencyCode, aD as MoonpayFundingConfig, a6 as MoonpayPaymentMethod, aC as NativeFundingConfig, aa as NonEmptyArray, aG as Passkey, ax as PasskeyWithMetadata, az as Phone, ac as PhoneWithMetadata, aE as PriceDisplayOptions, a7 as Quantity, a9 as SolanaCluster, a3 as SolanaFundingConfig, al as Telegram, av as TelegramWithMetadata, ak as Tiktok, ar as TiktokOAuthWithMetadata, a8 as TransactionLog, aA as TransactionUIOptions, af as Twitter, ao as TwitterOAuthWithMetadata, a1 as TypedMessage, ad as WalletWithMetadata } from './types-D0KmEjpU.js';
5
5
  import { E as EIP1193Provider, R as RequestArguments, P as PrivyProxyProvider } from './privyProxyProvider-BuMncVkt.js';
6
6
  export { A as AsExternalProvider } from './privyProxyProvider-BuMncVkt.js';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -18,8 +18,8 @@ import * as _solana_web3_js from '@solana/web3.js';
18
18
  import { Connection } from '@solana/web3.js';
19
19
  import { AbstractProvider } from 'web3-core';
20
20
  import { FetchOptions } from 'ofetch';
21
- import { P as PrivyEvents } from './solana-PuIs0zwD.js';
22
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-PuIs0zwD.js';
21
+ import { P as PrivyEvents } from './solana-HIKrfby6.js';
22
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-HIKrfby6.js';
23
23
  import 'viem';
24
24
  import '@privy-io/js-sdk-core';
25
25
  import '@metamask/eth-sig-util';
@@ -982,6 +982,8 @@ declare class PrivyClient {
982
982
  };
983
983
  userVerification: UserVerificationRequirement;
984
984
  }>;
985
+ _cachedProviderAppDetails: Record<string, CrossAppProviderDetails>;
986
+ getCrossAppProviderDetails(appId: string): Promise<CrossAppProviderDetails | undefined>;
985
987
  acceptTerms(): Promise<User>;
986
988
  unlinkEmail(address: string): Promise<User>;
987
989
  unlinkPhone(phoneNumber: string): Promise<User>;
@@ -2595,12 +2597,12 @@ interface UseDelegatedActionsInterface {
2595
2597
  * within a set of pre-defined permissions. Users can always decline or revoke delegation.
2596
2598
  *
2597
2599
  * @param address {string} address of the wallet to delegate
2598
- * @param chainType {'solana'} chain type for the wallet to delegate
2600
+ * @param chainType {'solana' | 'ethereum'} chain type for the wallet to delegate
2599
2601
  * @returns
2600
2602
  */
2601
- delegateWallet: ({ address, chainType }: {
2603
+ delegateWallet: ({ address, chainType, }: {
2602
2604
  address: string;
2603
- chainType: 'solana';
2605
+ chainType: 'solana' | 'ethereum';
2604
2606
  }) => Promise<void>;
2605
2607
  /**
2606
2608
  * Revokes the wallet API's ability to transact with a user's delegated wallets. This will revoke
@@ -1,4 +1,4 @@
1
- import { l as User, L as LoginMethod, aI as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aJ as BaseConnectedSolanaWallet, x as Wallet, D as MfaMethod, U as UserRecoveryMethod, K as SolanaTransactionReceipt, C as Chain, aK as FundingMethod, a8 as SolanaCluster, aH as ConnectedSolanaWallet, a2 as SolanaFundingConfig } from './types-STuZuryK.js';
1
+ import { l as User, L as LoginMethod, aJ as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aK as BaseConnectedSolanaWallet, y as Wallet, F as MfaMethod, U as UserRecoveryMethod, N as SolanaTransactionReceipt, C as Chain, aL as FundingMethod, a9 as SolanaCluster, aI as ConnectedSolanaWallet, a3 as SolanaFundingConfig } from './types-D0KmEjpU.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
  import { a as PrivyErrorCode } from './privyProxyProvider-BuMncVkt.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { l as User, L as LoginMethod, aI as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aJ as BaseConnectedSolanaWallet, x as Wallet, D as MfaMethod, U as UserRecoveryMethod, K as SolanaTransactionReceipt, C as Chain, aK as FundingMethod, a8 as SolanaCluster, aH as ConnectedSolanaWallet, a2 as SolanaFundingConfig } from './types-STuZuryK.js';
1
+ import { l as User, L as LoginMethod, aJ as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aK as BaseConnectedSolanaWallet, y as Wallet, F as MfaMethod, U as UserRecoveryMethod, N as SolanaTransactionReceipt, C as Chain, aL as FundingMethod, a9 as SolanaCluster, aI as ConnectedSolanaWallet, a3 as SolanaFundingConfig } from './types-D0KmEjpU.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
  import { a as PrivyErrorCode } from './privyProxyProvider-BuMncVkt.js';
4
4
 
@@ -1,5 +1,5 @@
1
- export { aH as ConnectedSolanaWallet, k as SolanaAdapterConnector, K as SolanaTransactionReceipt, J as SupportedSolanaTransaction, aL as toSolanaWalletConnectors } from './types-STuZuryK.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-PuIs0zwD.js';
1
+ export { aI as ConnectedSolanaWallet, k as SolanaAdapterConnector, N as SolanaTransactionReceipt, K as SupportedSolanaTransaction, aM as toSolanaWalletConnectors } from './types-D0KmEjpU.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-HIKrfby6.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
- export { aH as ConnectedSolanaWallet, k as SolanaAdapterConnector, K as SolanaTransactionReceipt, J as SupportedSolanaTransaction, aL as toSolanaWalletConnectors } from './types-STuZuryK.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-PuIs0zwD.js';
1
+ export { aI as ConnectedSolanaWallet, k as SolanaAdapterConnector, N as SolanaTransactionReceipt, K as SupportedSolanaTransaction, aM as toSolanaWalletConnectors } from './types-D0KmEjpU.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-HIKrfby6.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -552,7 +552,7 @@ interface BaseConnectedWallet {
552
552
  /** Returns true if the wallet is connected, false otherwise */
553
553
  isConnected: () => Promise<boolean>;
554
554
  /**
555
- * @experimental **Experimental**: This property is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
555
+ * @experimental **Experimental**: This property is subject to change at any time.
556
556
  *
557
557
  * Not all wallet clients support programmatic disconnects (e.g. MetaMask, Phantom).
558
558
  * In kind, if the wallet's client does not support programmatic disconnects,
@@ -1067,7 +1067,7 @@ type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' |
1067
1067
  /** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
1068
1068
  | 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'safe';
1069
1069
  type NonEmptyArray<T> = [T, ...T[]];
1070
- type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | 'farcaster' | 'telegram';
1070
+ type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
1071
1071
  type ExternalWalletsConfig = {
1072
1072
  /**
1073
1073
  * Options to configure connections to the Coinbase Wallet (browser extension wallet, mobile wallet, and
@@ -1820,6 +1820,10 @@ type CreateWalletOptions = {
1820
1820
  walletIndex: number;
1821
1821
  };
1822
1822
  type SetWalletRecoveryOptions = {};
1823
+ type CrossAppProviderDetails = {
1824
+ name: string;
1825
+ icon_url: string | null;
1826
+ };
1823
1827
  type CustomAuthFlowState = {
1824
1828
  status: 'initial';
1825
1829
  } | {
@@ -1959,4 +1963,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
1959
1963
  type SolanaRpcRequestType = solana_signMessage;
1960
1964
  type SolanaRpcResponseType = solana_signMessageResponse;
1961
1965
 
1962
- export { type CustomAuthFlowState as $, type SignTypedDataParams as A, type BaseConnectedEthereumWallet as B, type Chain as C, type MfaMethod as D, type EthereumRpcRequestType as E, type UnsignedTransactionRequest as F, type SendTransactionModalUIOptions as G, type FundWalletConfig as H, type TransactionReceipt as I, type SupportedSolanaTransaction as J, type SolanaTransactionReceipt as K, type LoginMethod as L, type MfaSubmitArgs as M, type ConnectedWallet as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type OAuthFlowState as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TelegramAuthResult as T, type UserRecoveryMethod as U, type LoginWithCode as V, WalletConnector as W, type OtpFlowState as X, type PasskeyFlowState as Y, type SiweFlowState as Z, type UnsignedTransactionRequestWithChainId as _, type EthereumRpcResponseType as a, type TypedMessage as a0, type MessageTypes as a1, type SolanaFundingConfig as a2, type MoonpayConfig as a3, type MoonpayCurrencyCode as a4, type MoonpayPaymentMethod as a5, type Quantity as a6, type TransactionLog as a7, type SolanaCluster as a8, type NonEmptyArray as a9, type ContractUIOptions as aA, type NativeFundingConfig as aB, type MoonpayFundingConfig as aC, type PriceDisplayOptions as aD, type Farcaster as aE, type Passkey as aF, type LoginMethodOrderOption as aG, type ConnectedSolanaWallet as aH, type LinkedAccountWithMetadata as aI, type BaseConnectedSolanaWallet as aJ, type FundingMethod as aK, toSolanaWalletConnectors as aL, type EmailWithMetadata as aa, type PhoneWithMetadata as ab, type WalletWithMetadata as ac, type Google as ad, type Twitter as ae, type Discord as af, type Github as ag, type LinkedIn as ah, type Apple as ai, type Tiktok as aj, type Telegram as ak, type CrossAppAccount as al, type GoogleOAuthWithMetadata as am, type TwitterOAuthWithMetadata as an, type DiscordOAuthWithMetadata as ao, type GithubOAuthWithMetadata as ap, type TiktokOAuthWithMetadata as aq, type LinkedInOAuthWithMetadata as ar, type AppleOAuthWithMetadata as as, type FarcasterWithMetadata as at, type TelegramWithMetadata as au, type CrossAppAccountWithMetadata as av, type PasskeyWithMetadata as aw, type Email as ax, type Phone as ay, type TransactionUIOptions as az, type SolanaRpcResponseType as b, type RpcConfig as c, type EntropyIdVerifier as d, type WalletClientType as e, type ConnectedWalletMetadata as f, type ConnectorType as g, type WalletListEntry as h, type ExternalWalletsConfig as i, type BaseConnectedWallet as j, SolanaWalletConnector as k, type User as l, type OAuthProviderType as m, type MoonpaySignRequest as n, type MoonpaySignResponse as o, type SmartWalletConfig as p, type PrivyServerConfig as q, type SiweWalletMetadata as r, type OAuthUserInfo as s, type PrivyClientConfig as t, type ConnectWalletModalOptions as u, type LoginModalOptions as v, type CreateWalletOptions as w, type Wallet as x, type SetWalletRecoveryOptions as y, type SignMessageModalUIOptions as z };
1966
+ export { type UnsignedTransactionRequestWithChainId as $, type SignMessageModalUIOptions as A, type BaseConnectedEthereumWallet as B, type Chain as C, type SignTypedDataParams as D, type EthereumRpcRequestType as E, type MfaMethod as F, type UnsignedTransactionRequest as G, type SendTransactionModalUIOptions as H, type FundWalletConfig as I, type TransactionReceipt as J, type SupportedSolanaTransaction as K, type LoginMethod as L, type MfaSubmitArgs as M, type SolanaTransactionReceipt as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type ConnectedWallet as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TelegramAuthResult as T, type UserRecoveryMethod as U, type OAuthFlowState as V, WalletConnector as W, type LoginWithCode as X, type OtpFlowState as Y, type PasskeyFlowState as Z, type SiweFlowState as _, type EthereumRpcResponseType as a, type CustomAuthFlowState as a0, type TypedMessage as a1, type MessageTypes as a2, type SolanaFundingConfig as a3, type MoonpayConfig as a4, type MoonpayCurrencyCode as a5, type MoonpayPaymentMethod as a6, type Quantity as a7, type TransactionLog as a8, type SolanaCluster as a9, type TransactionUIOptions as aA, type ContractUIOptions as aB, type NativeFundingConfig as aC, type MoonpayFundingConfig as aD, type PriceDisplayOptions as aE, type Farcaster as aF, type Passkey as aG, type LoginMethodOrderOption as aH, type ConnectedSolanaWallet as aI, type LinkedAccountWithMetadata as aJ, type BaseConnectedSolanaWallet as aK, type FundingMethod as aL, toSolanaWalletConnectors as aM, type NonEmptyArray as aa, type EmailWithMetadata as ab, type PhoneWithMetadata as ac, type WalletWithMetadata as ad, type Google as ae, type Twitter as af, type Discord as ag, type Github as ah, type LinkedIn as ai, type Apple as aj, type Tiktok as ak, type Telegram as al, type CrossAppAccount as am, type GoogleOAuthWithMetadata as an, type TwitterOAuthWithMetadata as ao, type DiscordOAuthWithMetadata as ap, type GithubOAuthWithMetadata as aq, type TiktokOAuthWithMetadata as ar, type LinkedInOAuthWithMetadata as as, type AppleOAuthWithMetadata as at, type FarcasterWithMetadata as au, type TelegramWithMetadata as av, type CrossAppAccountWithMetadata as aw, type PasskeyWithMetadata as ax, type Email as ay, type Phone as az, type SolanaRpcResponseType as b, type RpcConfig as c, type EntropyIdVerifier as d, type WalletClientType as e, type ConnectedWalletMetadata as f, type ConnectorType as g, type WalletListEntry as h, type ExternalWalletsConfig as i, type BaseConnectedWallet as j, SolanaWalletConnector as k, type User as l, type CrossAppProviderDetails as m, type OAuthProviderType as n, type MoonpaySignRequest as o, type MoonpaySignResponse as p, type SmartWalletConfig as q, type PrivyServerConfig as r, type SiweWalletMetadata as s, type OAuthUserInfo as t, type PrivyClientConfig as u, type ConnectWalletModalOptions as v, type LoginModalOptions as w, type CreateWalletOptions as x, type Wallet as y, type SetWalletRecoveryOptions as z };