@privy-io/react-auth 1.88.3 → 1.88.4-beta-20241004182123

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.
@@ -1 +1 @@
1
- import{FetchError as e}from"ofetch";import{createContext as t,useContext as n}from"react";var i;class a extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,n){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}class s extends a{constructor(e,t,n,i,a,s){super(n,i,a),this.type=e,this.status=t,this.data=s}}class r extends a{constructor(e,t,n){super(e,t,n),this.type="client_error"}}class l extends r{constructor(){super("Request timed out",void 0,"client_request_timeout")}}class o extends a{constructor(e,t,n){super(e,t,n),this.type="connector_error"}}const _=t=>{if(t instanceof a)return t;if(!(t instanceof e))return u(t);if(!t.response)return new s("api_error",null,t.message,t);let{type:n,message:i,error:r,code:l}=t.data;return new s(n||"ApiError",t.response.status,i||r,t,l,t.data)},u=e=>e instanceof a?e:e instanceof Error?new r(e.message,e):new r(`Internal error: ${e}`);var d;(i=d||(d={})).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",i.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",i.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",i.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",i.INVALID_DATA="invalid_data",i.INVALID_CAPTCHA="invalid_captcha",i.LINKED_TO_ANOTHER_USER="linked_to_another_user",i.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",i.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",i.ALLOWLIST_REJECTED="allowlist_rejected",i.OAUTH_USER_DENIED="oauth_user_denied",i.OAUTH_UNEXPECTED="oauth_unexpected",i.UNKNOWN_AUTH_ERROR="unknown_auth_error",i.USER_EXITED_AUTH_FLOW="exited_auth_flow",i.USER_EXITED_LINK_FLOW="exited_link_flow",i.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",i.MUST_BE_AUTHENTICATED="must_be_authenticated",i.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",i.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",i.CLIENT_REQUEST_TIMEOUT="client_request_timeout",i.INVALID_CREDENTIALS="invalid_credentials",i.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",i.UNKNOWN_MFA_ERROR="unknown_mfa_error",i.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",i.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",i.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",i.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",i.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",i.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",i.TRANSACTION_FAILURE="transaction_failure",i.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",i.NOT_SUPPORTED="not_supported",i.CAPTCHA_TIMEOUT="captcha_timeout",i.INVALID_MESSAGE="invalid_message",i.UNABLE_TO_SIGN="unable_to_sign",i.CAPTCHA_FAILURE="captcha_failure",i.CAPTCHA_DISABLED="captcha_disabled",i.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",i.TOO_MANY_REQUESTS="too_many_requests",i.USER_LIMIT_REACHED="max_accounts_reached",i.DISALLOWED_LOGIN_METHOD="disallowed_login_method",i.PASSKEY_NOT_ALLOWED="passkey_not_allowed",i.USER_DOES_NOT_EXIST="user_does_not_exist",i.INSUFFICIENT_BALANCE="insufficient_balance",i.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required";class c extends r{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}}class E extends r{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}}class A extends r{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}}class h extends r{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}}const p=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},S=t({isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],solanaWallets:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},noPromptOnSignature:{current:!1},nativeTokenSymbolForChainId:p,initializeWalletProxy:p,getAuthMeta:p,getAuthFlow:p,closePrivyModal:p,openPrivyModal:p,connectWallet:p,initLoginWithWallet:p,loginWithWallet:p,initLoginWithFarcaster:p,loginWithFarcaster:p,loginWithCode:p,initLoginWithEmail:p,initLoginWithSms:p,initUpdateEmail:p,initUpdatePhone:p,resendEmailCode:p,resendSmsCode:p,initLoginWithHeadlessOAuth:p,loginWithHeadlessOAuth:p,crossAppAuthFlow:p,initLoginWithOAuth:p,recoveryOAuthFlow:p,loginWithOAuth:p,passkeyAuthState:{status:"initial"},setPasskeyAuthState:p,initLoginWithPasskey:p,loginWithPasskey:p,initLinkWithPasskey:p,linkWithPasskey:p,refreshUser:p,loginWithGuestAccountFlow:p,walletProxy:null,createAnalyticsEvent:p,acceptTerms:p,getUsdTokenPrice:p,getUsdPriceForSol:p,recoverEmbeddedEthereumWallet:p,getMoonpaySignedUrl:p,initCoinbaseOnRamp:p,getCoinbaseOnRampStatus:p,updateWallets:p,fundWallet:p,setReadyToTrue:p,requestFarcasterSignerStatus:p,initLoginWithTelegram:p,loginWithTelegram:p,generateSiweMessage:p,linkWithSiwe:p,linkSmartWallet:p,initDelegateAction:p,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:p,recoverEmbeddedSolanaWallet:p,exportSolanaWallet:p,solanaSignMessage:p,connectCoinbaseSmartWallet:p,initiateAccountTransfer:p,emailOtpState:{status:"initial"},setEmailOtpState:p,smsOtpState:{status:"initial"},setSmsOtpState:p,siweState:{status:"initial"},setSiweState:p,oAuthState:{status:"initial"},setOAuthState:p}),T=()=>n(S),m=t({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:p,login:p,connectOrCreateWallet:p,linkEmail:p,linkPhone:p,linkFarcaster:p,linkWallet:p,startCrossAppAuthFlow:p,linkGoogle:p,linkTwitter:p,linkDiscord:p,linkGithub:p,linkSpotify:p,linkInstagram:p,linkTelegram:p,linkTiktok:p,linkLinkedIn:p,linkApple:p,linkPasskey:p,updateEmail:p,updatePhone:p,logout:p,getAccessToken:p,getEthereumProvider:p,getEthersProvider:p,getWeb3jsProvider:p,unlinkEmail:p,unlinkPhone:p,unlinkWallet:p,unlinkGoogle:p,unlinkTwitter:p,unlinkDiscord:p,unlinkGithub:p,unlinkSpotify:p,unlinkInstagram:p,unlinkTiktok:p,unlinkLinkedIn:p,unlinkApple:p,unlinkCrossAppAccount:p,unlinkFarcaster:p,unlinkTelegram:p,unlinkPasskey:p,setActiveWallet:p,forkSession:p,createWallet:p,importWallet:p,signMessage:p,signTypedData:p,enrollInMfa:p,initEnrollmentWithSms:p,initEnrollmentWithTotp:p,initEnrollmentWithPasskey:p,promptMfa:p,init:p,submitEnrollmentWithSms:p,submitEnrollmentWithTotp:p,submitEnrollmentWithPasskey:p,unenroll:p,submit:p,cancel:p,sendTransaction:p,sendSolanaTransaction:p,exportWallet:p,setWalletPassword:p,setWalletRecovery:p,requestFarcasterSignerFromWarpcast:p,getFarcasterSignerPublicKey:p,signFarcasterMessage:p,createGuestAccount:p,initLoginWithEmail:p,initLoginWithSms:p,otpState:{status:"initial"},loginWithCode:p,fundWallet:p,initLoginWithHeadlessOAuth:p,loginWithHeadlessOAuth:p,generateSiweMessage:p,linkWithSiwe:p,signMessageWithCrossAppWallet:p,signTypedDataWithCrossAppWallet:p,sendTransactionWithCrossAppWallet:p,isHeadlessOAuthLoading:!1,isModalOpen:!1,mfaMethods:[]}),W=()=>n(m);export{S as I,r as P,d as a,a as b,o as c,l as d,u as e,_ as f,s as g,W as h,h as i,E as j,A as k,m as l,c as m,p as n,T as u};
1
+ import{FetchError as e}from"ofetch";import{createContext as t,useContext as n}from"react";var i;class a extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,n){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}class s extends a{constructor(e,t,n,i,a,s){super(n,i,a),this.type=e,this.status=t,this.data=s}}class r extends a{constructor(e,t,n){super(e,t,n),this.type="client_error"}}class l extends r{constructor(){super("Request timed out",void 0,"client_request_timeout")}}class o extends a{constructor(e,t,n){super(e,t,n),this.type="connector_error"}}const _=t=>{if(t instanceof a)return t;if(!(t instanceof e))return u(t);if(!t.response)return new s("api_error",null,t.message,t);let{type:n,message:i,error:r,code:l}=t.data;return new s(n||"ApiError",t.response.status,i||r,t,l,t.data)},u=e=>e instanceof a?e:e instanceof Error?new r(e.message,e):new r(`Internal error: ${e}`);var d;(i=d||(d={})).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",i.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",i.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",i.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",i.INVALID_DATA="invalid_data",i.INVALID_CAPTCHA="invalid_captcha",i.LINKED_TO_ANOTHER_USER="linked_to_another_user",i.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",i.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",i.ALLOWLIST_REJECTED="allowlist_rejected",i.OAUTH_USER_DENIED="oauth_user_denied",i.OAUTH_UNEXPECTED="oauth_unexpected",i.UNKNOWN_AUTH_ERROR="unknown_auth_error",i.USER_EXITED_AUTH_FLOW="exited_auth_flow",i.USER_EXITED_LINK_FLOW="exited_link_flow",i.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",i.MUST_BE_AUTHENTICATED="must_be_authenticated",i.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",i.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",i.CLIENT_REQUEST_TIMEOUT="client_request_timeout",i.INVALID_CREDENTIALS="invalid_credentials",i.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",i.UNKNOWN_MFA_ERROR="unknown_mfa_error",i.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",i.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",i.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",i.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",i.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",i.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",i.TRANSACTION_FAILURE="transaction_failure",i.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",i.NOT_SUPPORTED="not_supported",i.CAPTCHA_TIMEOUT="captcha_timeout",i.INVALID_MESSAGE="invalid_message",i.UNABLE_TO_SIGN="unable_to_sign",i.CAPTCHA_FAILURE="captcha_failure",i.CAPTCHA_DISABLED="captcha_disabled",i.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",i.TOO_MANY_REQUESTS="too_many_requests",i.USER_LIMIT_REACHED="max_accounts_reached",i.DISALLOWED_LOGIN_METHOD="disallowed_login_method",i.PASSKEY_NOT_ALLOWED="passkey_not_allowed",i.USER_DOES_NOT_EXIST="user_does_not_exist",i.INSUFFICIENT_BALANCE="insufficient_balance",i.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required";class c extends r{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}}class E extends r{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}}class A extends r{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}}class h extends r{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}}const p=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},S=t({isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],solanaWallets:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},noPromptOnSignature:{current:!1},nativeTokenSymbolForChainId:p,initializeWalletProxy:p,getAuthMeta:p,getAuthFlow:p,closePrivyModal:p,openPrivyModal:p,connectWallet:p,initLoginWithWallet:p,loginWithWallet:p,initLoginWithFarcaster:p,loginWithFarcaster:p,loginWithCode:p,initLoginWithEmail:p,initLoginWithSms:p,initUpdateEmail:p,initUpdatePhone:p,resendEmailCode:p,resendSmsCode:p,initLoginWithHeadlessOAuth:p,loginWithHeadlessOAuth:p,crossAppAuthFlow:p,initLoginWithOAuth:p,recoveryOAuthFlow:p,loginWithOAuth:p,passkeyAuthState:{status:"initial"},setPasskeyAuthState:p,initLoginWithPasskey:p,loginWithPasskey:p,initLinkWithPasskey:p,linkWithPasskey:p,refreshUser:p,loginWithGuestAccountFlow:p,walletProxy:null,createAnalyticsEvent:p,acceptTerms:p,getUsdTokenPrice:p,getUsdPriceForSol:p,recoverEmbeddedEthereumWallet:p,getMoonpaySignedUrl:p,initCoinbaseOnRamp:p,getCoinbaseOnRampStatus:p,updateWallets:p,fundWallet:p,setReadyToTrue:p,requestFarcasterSignerStatus:p,initLoginWithTelegram:p,loginWithTelegram:p,generateSiweMessage:p,generateSiweMessageForSmartWallet:p,linkWithSiwe:p,linkSmartWallet:p,initDelegateAction:p,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:p,recoverEmbeddedSolanaWallet:p,exportSolanaWallet:p,solanaSignMessage:p,connectCoinbaseSmartWallet:p,initiateAccountTransfer:p,emailOtpState:{status:"initial"},setEmailOtpState:p,smsOtpState:{status:"initial"},setSmsOtpState:p,siweState:{status:"initial"},setSiweState:p,oAuthState:{status:"initial"},setOAuthState:p}),T=()=>n(S),m=t({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:p,login:p,connectOrCreateWallet:p,linkEmail:p,linkPhone:p,linkFarcaster:p,linkWallet:p,startCrossAppAuthFlow:p,linkGoogle:p,linkTwitter:p,linkDiscord:p,linkGithub:p,linkSpotify:p,linkInstagram:p,linkTelegram:p,linkTiktok:p,linkLinkedIn:p,linkApple:p,linkPasskey:p,updateEmail:p,updatePhone:p,logout:p,getAccessToken:p,getEthereumProvider:p,getEthersProvider:p,getWeb3jsProvider:p,unlinkEmail:p,unlinkPhone:p,unlinkWallet:p,unlinkGoogle:p,unlinkTwitter:p,unlinkDiscord:p,unlinkGithub:p,unlinkSpotify:p,unlinkInstagram:p,unlinkTiktok:p,unlinkLinkedIn:p,unlinkApple:p,unlinkCrossAppAccount:p,unlinkFarcaster:p,unlinkTelegram:p,unlinkPasskey:p,setActiveWallet:p,forkSession:p,createWallet:p,importWallet:p,signMessage:p,signTypedData:p,enrollInMfa:p,initEnrollmentWithSms:p,initEnrollmentWithTotp:p,initEnrollmentWithPasskey:p,promptMfa:p,init:p,submitEnrollmentWithSms:p,submitEnrollmentWithTotp:p,submitEnrollmentWithPasskey:p,unenroll:p,submit:p,cancel:p,sendTransaction:p,sendSolanaTransaction:p,exportWallet:p,setWalletPassword:p,setWalletRecovery:p,requestFarcasterSignerFromWarpcast:p,getFarcasterSignerPublicKey:p,signFarcasterMessage:p,createGuestAccount:p,initLoginWithEmail:p,initLoginWithSms:p,otpState:{status:"initial"},loginWithCode:p,fundWallet:p,initLoginWithHeadlessOAuth:p,loginWithHeadlessOAuth:p,generateSiweMessage:p,linkWithSiwe:p,signMessageWithCrossAppWallet:p,signTypedDataWithCrossAppWallet:p,sendTransactionWithCrossAppWallet:p,isHeadlessOAuthLoading:!1,isModalOpen:!1,mfaMethods:[]}),W=()=>n(m);export{S as I,r as P,d as a,a as b,o as c,l as d,u as e,_ as f,s as g,W as h,h as i,E as j,A as k,m as l,c as m,p as n,T as u};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useContext as a,useState as t,useEffect as r,createContext as n}from"react";import{u as i,E as s}from"./useWallets.mjs";import{u as o,h as l,P as c}from"./privy-context.mjs";import{u as m,M as d,g as u}from"./getEmbeddedConnectedWallet.mjs";import{createSmartAccountClient as p}from"permissionless";import{toLightSmartAccount as y,toBiconomySmartAccount as g,toEcdsaKernelSmartAccount as E,toSafeSmartAccount as h}from"permissionless/accounts";import{createPimlicoClient as P}from"permissionless/clients/pimlico";import{createPublicClient as f,http as w}from"viem";import{entryPoint06Address as v,entryPoint07Address as T}from"viem/account-abstraction";import"tinycolor2";import"ofetch";let W=({calls:e,chain:a,maxPriorityFeePerGas:t,maxFeePerGas:r,nonce:n})=>e.map((e=>({to:e.to||void 0,data:e.data,value:e.value,chainId:a.id,nonce:n,maxFeePerGas:r,maxPriorityFeePerGas:t})));let S={address:v,version:"0.6"},C={address:T,version:"0.7"},N=async({owner:e,smartWalletType:a,chain:t,bundlerUrl:r,paymasterUrl:n,paymasterContext:i})=>{let s=f({chain:t,transport:w()}),o=await(({owner:e,smartWalletType:a,chain:t})=>{let r=f({chain:t,transport:w()});switch(a){case"safe":return h({client:r,entryPoint:C,owners:[e],version:"1.4.1"});case"kernel":return E({client:r,version:"0.3.1",entryPoint:C,owners:[e]});case"biconomy":return g({client:r,owners:[e],entryPoint:S});case"light_account":return y({client:r,entryPoint:S,owner:e,version:"1.1.0"});default:throw Error(`Invalid smart account type: ${a}.`)}})({owner:e,smartWalletType:a,chain:t}),l=n?P({transport:w(n),entryPoint:o.entryPoint}):void 0;return p({account:o,chain:t,paymaster:l,paymasterContext:i,bundlerTransport:w(r),userOperation:{estimateFeesPerGas:async()=>{let e=await s.estimateFeesPerGas();return{...e,maxFeePerGas:125n*e.maxFeePerGas/100n,maxPriorityFeePerGas:125n*e.maxPriorityFeePerGas/100n}}}})};let x=n({client:void 0});const D=({config:a,children:t})=>e(I,{children:e(M,{config:a,children:e(A,{children:t})})}),_=()=>{let{client:e}=a(x);return{client:e}};let F=n({config:void 0}),G=()=>{let{config:e}=a(F);return{config:e}},I=({children:a})=>{let[n,i]=t(void 0),{client:s}=o();return r((()=>{!n&&s&&(async()=>{try{if(!s)return void console.warn("No client found");let e=await s.getSmartWalletsConfig();i(e)}catch(e){console.warn("Error generating smart wallet config: ",e)}})()}),[!!s]),e(F.Provider,{value:{config:n},children:a})},M=({config:a,children:n})=>{let{config:o}=G(),{defaultChain:m}=i(),[d]=t(m),{wallets:p}=s(),{user:y}=l(),[g,E]=t(),h=u(p);return r((()=>{(async()=>{if(!o?.enabled||!y||!h)return void E(void 0);if(g&&g.chain.id===d.id)return;let e=o.configuredNetworks.find((e=>e.chainId===`eip155:${d.id}`));if(!e)throw new c(`The chain ${d.name} (eip155:${d.id}) must be configured in the smart wallet configuration in your dashboard`);let t=y.smartWallet?.smartWalletType??o.smartWalletType;try{let r=await(async(e,a,t,r,n)=>{let i=await e.getEthereumProvider();return await N({owner:i,smartWalletType:t,chain:a,paymasterContext:n,...r})})(h,d,t,e,a?.paymasterContext);E(r)}catch(e){console.error("Error loading smart wallet:",e)}})()}),[!!o?.enabled,!!y?.smartWallet,!!h]),e(b.Provider,{value:{client:g},children:n})},b=n({client:void 0}),A=({children:t})=>{let{client:n}=(()=>{let{client:e}=a(b);return{client:e}})(),{config:s}=G(),{wrapSmartAccountClient:c}=(()=>{let{noPromptOnSignature:e,openPrivyModal:a}=o(),t=i(),{setModalData:r}=m();return{wrapSmartAccountClient:n=>{let{sendTransaction:i,signMessage:s,signTypedData:o,...l}=n;return{...l,sendTransaction:async n=>{if(t.embeddedWallets.noPromptOnSignature||e.current)return await i(n);let s=[];"calls"in n&&void 0!==n.calls?s=[...n.calls]:"to"in n&&(s=[{to:n.to,value:n.value||BigInt(0),data:n.data||"0x"}]);let o=async()=>{if(!l.paymaster)return!1;let{paymasterAndData:e,paymasterData:a}=await l.prepareUserOperation({calls:s,maxFeePerGas:n.maxFeePerGas,maxPriorityFeePerGas:n.maxPriorityFeePerGas,nonce:n.nonce?BigInt(n.nonce):void 0});return Number(e??a??0)>0};return new Promise((async(t,c)=>{e.current=!0,r({connectWallet:{onCompleteNavigateTo:d.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:W({calls:s,chain:l.chain,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,nonce:n.nonce?BigInt(n.nonce):void 0}),rootWallet:{address:l.account.address},transactingWallet:{address:l.account.address,walletIndex:null},getIsSponsored:o,onConfirm:()=>i(n),onSuccess:e=>t(e.hash),onFailure:c,uiOptions:{}}}),a(d.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{e.current=!1}))},signMessage:async({message:n})=>t.embeddedWallets.noPromptOnSignature||e.current?await s({message:n}):new Promise((async(t,i)=>{e.current=!0,r({connectWallet:{onCompleteNavigateTo:d.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:n,confirmAndSign:()=>s({message:n}),onSuccess:e=>t(e),onFailure:i,uiOptions:{}}}),a(d.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{e.current=!1})),signTypedData:async t=>e.current?await o(t):new Promise((async(n,i)=>{e.current=!0,r({connectWallet:{onCompleteNavigateTo:d.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:t,confirmAndSign:()=>o(t),onSuccess:e=>n(e),onFailure:i,uiOptions:{}}}),a(d.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{e.current=!1}))}}}})(),{user:u}=l(),{generateSiweMessage:p,linkSmartWallet:y,noPromptOnSignature:g}=o();return r((()=>{(async()=>{if(n&&!u?.smartWallet&&s?.enabled)try{let e=await p({address:n.account.address,chainId:`eip155:${n.chain.id}`});g.current=!0;let a=await n.signMessage({message:e});await y({signature:a,message:e,smartWalletType:s.smartWalletType})}catch(e){console.error("Error creating smart wallet:",e)}finally{g.current=!1}})()}),[!!n,!!u?.smartWallet,!!s?.enabled]),e(x.Provider,{value:{client:u?.smartWallet&&n?c(n):void 0},children:t})};export{D as SmartWalletsProvider,_ as useSmartWallets};
1
+ import{jsx as e}from"react/jsx-runtime";import{useContext as a,useState as t,useEffect as r,createContext as n}from"react";import{u as i,E as s}from"./useWallets.mjs";import{u as o,h as l,P as c}from"./privy-context.mjs";import{u as m,M as d,g as u}from"./getEmbeddedConnectedWallet.mjs";import{createSmartAccountClient as p}from"permissionless";import{toLightSmartAccount as y,toBiconomySmartAccount as g,toEcdsaKernelSmartAccount as E,toSafeSmartAccount as h}from"permissionless/accounts";import{createPimlicoClient as P}from"permissionless/clients/pimlico";import{createPublicClient as f,http as w}from"viem";import{entryPoint06Address as v,entryPoint07Address as T}from"viem/account-abstraction";import"tinycolor2";import"ofetch";let W=({calls:e,chain:a,maxPriorityFeePerGas:t,maxFeePerGas:r,nonce:n})=>e.map((e=>({to:e.to||void 0,data:e.data,value:e.value,chainId:a.id,nonce:n,maxFeePerGas:r,maxPriorityFeePerGas:t})));let S={address:v,version:"0.6"},C={address:T,version:"0.7"},N=async({owner:e,smartWalletType:a,chain:t,bundlerUrl:r,paymasterUrl:n,paymasterContext:i})=>{let s=f({chain:t,transport:w()}),o=await(({owner:e,smartWalletType:a,chain:t})=>{let r=f({chain:t,transport:w()});switch(a){case"safe":return h({client:r,entryPoint:C,owners:[e],version:"1.4.1"});case"kernel":return E({client:r,version:"0.3.1",entryPoint:C,owners:[e]});case"biconomy":return g({client:r,owners:[e],entryPoint:S});case"light_account":return y({client:r,entryPoint:S,owner:e,version:"1.1.0"});default:throw Error(`Invalid smart account type: ${a}.`)}})({owner:e,smartWalletType:a,chain:t}),l=n?P({transport:w(n),entryPoint:o.entryPoint}):void 0;return p({account:o,chain:t,paymaster:l,paymasterContext:i,bundlerTransport:w(r),userOperation:{estimateFeesPerGas:async()=>{let e=await s.estimateFeesPerGas();return{...e,maxFeePerGas:125n*e.maxFeePerGas/100n,maxPriorityFeePerGas:125n*e.maxPriorityFeePerGas/100n}}}})};let x=n({client:void 0});const D=({config:a,children:t})=>e(I,{children:e(M,{config:a,children:e(A,{children:t})})}),F=()=>{let{client:e}=a(x);return{client:e}};let _=n({config:void 0}),G=()=>{let{config:e}=a(_);return{config:e}},I=({children:a})=>{let[n,i]=t(void 0),{client:s}=o();return r((()=>{!n&&s&&(async()=>{try{if(!s)return void console.warn("No client found");let e=await s.getSmartWalletsConfig();i(e)}catch(e){console.warn("Error generating smart wallet config: ",e)}})()}),[!!s]),e(_.Provider,{value:{config:n},children:a})},M=({config:a,children:n})=>{let{config:o}=G(),{defaultChain:m}=i(),[d]=t(m),{wallets:p}=s(),{user:y}=l(),[g,E]=t(),h=u(p);return r((()=>{(async()=>{if(!o?.enabled||!y||!h)return void E(void 0);if(g&&g.chain.id===d.id)return;let e=o.configuredNetworks.find((e=>e.chainId===`eip155:${d.id}`));if(!e)throw new c(`The chain ${d.name} (eip155:${d.id}) must be configured in the smart wallet configuration in your dashboard`);let t=y.smartWallet?.smartWalletType??o.smartWalletType;try{let r=await(async(e,a,t,r,n)=>{let i=await e.getEthereumProvider();return await N({owner:i,smartWalletType:t,chain:a,paymasterContext:n,...r})})(h,d,t,e,a?.paymasterContext);E(r)}catch(e){console.error("Error loading smart wallet:",e)}})()}),[!!o?.enabled,!!y?.smartWallet,!!h]),e(b.Provider,{value:{client:g},children:n})},b=n({client:void 0}),A=({children:t})=>{let{client:n}=(()=>{let{client:e}=a(b);return{client:e}})(),{config:s}=G(),{wrapSmartAccountClient:c}=(()=>{let{noPromptOnSignature:e,openPrivyModal:a}=o(),t=i(),{setModalData:r}=m();return{wrapSmartAccountClient:n=>{let{sendTransaction:i,signMessage:s,signTypedData:o,...l}=n;return{...l,sendTransaction:async n=>{if(t.embeddedWallets.noPromptOnSignature||e.current)return await i(n);let s=[];"calls"in n&&void 0!==n.calls?s=[...n.calls]:"to"in n&&(s=[{to:n.to,value:n.value||BigInt(0),data:n.data||"0x"}]);let o=async()=>{if(!l.paymaster)return!1;let{paymasterAndData:e,paymasterData:a}=await l.prepareUserOperation({calls:s,maxFeePerGas:n.maxFeePerGas,maxPriorityFeePerGas:n.maxPriorityFeePerGas,nonce:n.nonce?BigInt(n.nonce):void 0});return Number(e??a??0)>0};return new Promise((async(t,c)=>{e.current=!0,r({connectWallet:{onCompleteNavigateTo:d.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:W({calls:s,chain:l.chain,maxPriorityFeePerGas:n.maxPriorityFeePerGas,maxFeePerGas:n.maxFeePerGas,nonce:n.nonce?BigInt(n.nonce):void 0}),rootWallet:{address:l.account.address},transactingWallet:{address:l.account.address,walletIndex:null},getIsSponsored:o,onConfirm:()=>i(n),onSuccess:e=>t(e.hash),onFailure:c,uiOptions:{}}}),a(d.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{e.current=!1}))},signMessage:async({message:n})=>t.embeddedWallets.noPromptOnSignature||e.current?await s({message:n}):new Promise((async(t,i)=>{e.current=!0,r({connectWallet:{onCompleteNavigateTo:d.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:n,confirmAndSign:()=>s({message:n}),onSuccess:e=>t(e),onFailure:i,uiOptions:{}}}),a(d.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{e.current=!1})),signTypedData:async t=>e.current?await o(t):new Promise((async(n,i)=>{e.current=!0,r({connectWallet:{onCompleteNavigateTo:d.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:t,confirmAndSign:()=>o(t),onSuccess:e=>n(e),onFailure:i,uiOptions:{}}}),a(d.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{e.current=!1}))}}}})(),{user:u}=l(),{generateSiweMessageForSmartWallet:p,linkSmartWallet:y,noPromptOnSignature:g}=o();return r((()=>{(async()=>{if(n&&!u?.smartWallet&&s?.enabled)try{let e=await p({address:n.account.address,chainId:`eip155:${n.chain.id}`});g.current=!0;let a=await n.signMessage({message:e});await y({signature:a,message:e,smartWalletType:s.smartWalletType})}catch(e){console.error("Error creating smart wallet:",e)}finally{g.current=!1}})()}),[!!n,!!u?.smartWallet,!!s?.enabled]),e(x.Provider,{value:{client:u?.smartWallet&&n?c(n):void 0},children:t})};export{D as SmartWalletsProvider,F as useSmartWallets};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,useMemo as a,useEffect as n,useContext as r,createContext as o}from"react";import l from"tinycolor2";const i="https://auth.privy.io",s=2e4,p=1400,c=2500,h=4e3,u="1.88.3",d="privy:token",m="privy-token",g="privy:refresh_token",f="privy-refresh-token",y="privy:id_token",b="privy-id-token",w="privy-session",v="privy:session_transfer_token",C="privy:caid",k=e=>`privy:guest:${e}`,E=e=>`privy:cross-app:${e}`,S="privy:state_code",x="privy:code_verifier",O="privy:headless_oauth",A="privy:oauth_disable_signup",U=e=>`privy:wallet:${e}`,M="privy:connectors",H="privy:connections",L=12e4,W=1,T="0x1",F=3e4,P="https://api.moonpay.com/v1",_="https://api.moonpay.com/v1",z="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",B="deprecated",R={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"}},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let I=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","wallet_connect","detected_wallets","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe"]),D=e=>I.has(e),q=(e,t,a)=>a.indexOf(e)===t;const K=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(D).filter(q):e?e.filter(D).filter(q):R.appearance.walletList,Y={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"}}},Z={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},$={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"}}},G={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},X={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"}}},J={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},N={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},V={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},Q={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"}}},ee={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"}}},te={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},ae={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"}}},ne={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},re={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},oe={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"}}},le=[Y,Z,re,Q,ee,te,ae,ne,N,{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"}}},X,J,{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"}}},V,{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},$,G,oe,{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"}}}],ie=new Set(le.map((e=>e.id)));function se(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}}function pe(e){let t=e.filter((e=>!ie.has(e.id)));return le.concat(t)}let ce="#FFFFFF";function he(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return l({...e.toHsl(),l:a})}function ue({backgroundTheme:e,accentHex:t}){let a;switch(e){case"light":a=ce;break;case"dark":a="#1E1E1D";break;default:a=e}let n=l(a),r=l(t),o=l("#51BA81"),i=l("#FFB74D"),s=l("#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"}(n.getLuminance()),c=he(n,"light"===p?-.04:.11),h=he(n,"light"===p?-.88:.87),u=he(n,"light"===p?-.7:.75),d=he(n,"light"===p?-.43:.45).desaturate("light"===p?60:20),m=he(n,"light"===p?-.08:.25).desaturate("light"===p?60:20),g=he(r,.15),f=he(r,-.06),y=he(s,.3),b=he(i,.3),w=l(r.getLuminance()>.5?"#040217":ce),v=he(o,-.16),C=he(o,.4);return{colorScheme:p,background:n.toHslString(),background2:c.toHslString(),foreground:h.toHslString(),foreground2:u.toHslString(),foreground3:d.toHslString(),foreground4:m.toHslString(),accent:r.toHslString(),accentLight:g.toHslString(),accentDark:f.toHslString(),foregroundAccent:w.toHslString(),success:o.toHslString(),successDark:v.toHslString(),successLight:C.toHslString(),error:s.toHslString(),errorLight:y.toHslString(),warn:i.toHslString(),warnLight:b.toHslString()}}function de(e,t,a){let n,r,o,l,i,s,p,c,h,u,d,m,g,f,y,b,w=a?console.warn:()=>{};t?.loginMethods?(n=t.loginMethods.includes("email"),r=t.loginMethods.includes("sms"),l=t.loginMethods.includes("wallet"),i=t.loginMethods.includes("google"),s=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),h=t.loginMethods.includes("spotify"),u=t.loginMethods.includes("instagram"),c=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("github"),d=t.loginMethods.includes("linkedin"),g=t.loginMethods.includes("apple"),f=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram")):(n=e.emailAuth,r=e.smsAuth,l=e.walletAuth,i=e.googleOAuth,s=e.twitterOAuth,p=e.discordOAuth,m=e.githubOAuth,h=e.spotifyOAuth,u=e.instagramOAuth,c=e.tiktokOAuth,d=e.linkedinOAuth,g=e.appleOAuth,f=e.farcasterAuth,y=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?o=!1:e.passkeyAuth&&(o=!0);let v=[n,r].filter(Boolean),C=[i,s,p,m,h,u,c,d,g,f,y].filter(Boolean),k=[l].filter(Boolean);if(v.length+C.length+k.length===0)throw Error("You must enable at least one login method");let E=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;E&&0===k.length?(w("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),E=!1):E||C.length+v.length!==0||(w("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),E=!0);let S=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&w("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let x=K({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),O=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],a=[];for(let a of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(a)?console.warn(`Duplicated login method: ${a}`):t.push(a);for(let n of e.overflow??[])t.includes(n)||a.includes(n)?console.warn(`Duplicated login method: ${n}`):a.push(n);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),A=t?.intl?.defaultCountry??"US",{chains:U,defaultChain:M}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:a,hasRpcConfigDefined:n}){let r;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&&n&&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`."),r=t.map((e=>{if(e.rpcUrls.privyWalletOverride)return e;let t=le.find((t=>t.id===e.id)),a=t?.rpcUrls.privy?.http[0];return a?function(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}(e,a):e}))}else r=le.concat(e??[]);let o=t?r[0]:Q,l=a??o;if(!r.find((e=>e.id===l.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:r,defaultChain:l}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),H=!!t?.defaultChain,L=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,W=!(e.enforceWalletUis??1);if(b=e.legacyWalletUiConfig??1?L?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??W:W,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==b)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:T,...F}=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??R.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:ue({backgroundTheme:t?.appearance?.theme??R.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??R.appearance.accentColor}),loginGroupPriority:E?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:x,walletChainType:t?.appearance?.walletChainType??"ethereum-only"},loginMethods:{wallet:l,email:n,sms:r,passkey:o,google:i,twitter:s,discord:p,github:m,spotify:h,instagram:u,tiktok:c,linkedin:d,apple:g,farcaster:f,telegram:y},loginMethodsAndOrder:O,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??R.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??R.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??R.rpcConfig.rpcTimeouts},chains:U,defaultChain:M,intl:{defaultCountry:A},shouldEnforceDefaultChainOnConnect:H,captchaEnabled:e.captchaEnabled??R.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??R.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:S},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof T?{requireUserOwnedRecoveryOnCreate:T}:{},...L?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...F,noPromptOnSignature:b},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:L?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??R._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??R.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??R.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??R.fundingMethodConfig.moonpay.useSandbox}}}}let me={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,termsAndConditionsUrl:null,privacyPolicyUrl:null,embeddedWalletConfig:{createOnLogin:"off",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]},fiatOnRampEnabled:!1,captchaEnabled:!1,captchaSiteKey:""};const ge=de(me,void 0,!1);let fe=o({appConfig:ge,isServerConfigLoaded:!1});const ye=({children:r,legacyCreateEmbeddedWalletFlag:o,client:l,clientConfig:i})=>{let[s,p]=t(null),c=a((()=>de(s??me,i,!!s)),[s,i]);return n((()=>{if(!s)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:a,additionalChains:n,supportedChains:r,defaultChain:o,externalWallets:l,...i}=e;return{...i,...n?{additionalChains:n.map((e=>e.id))}:void 0,...r?{supportedChains:r.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}}(i,o),t=function(e,t=0){let a=3735928559^t,n=1103547991^t;for(let t,r=0;r<e.length;r++)a=Math.imul(a^(t=e.charCodeAt(r)),2654435761),n=Math.imul(n^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${s.id}:${t}`;localStorage.getItem(a)||(l.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[i,o,s]),n((()=>{s||(async()=>{try{let e=await l.getServerConfig();e.customApiUrl&&l.updateApiUrl(e.customApiUrl),p(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),e(fe.Provider,{value:{appConfig:c,isServerConfigLoaded:!!s},children:r})},be=()=>{let{appConfig:e}=r(fe);return e},we=()=>{let{isServerConfigLoaded:e}=r(fe);return e},ve=o(null);function Ce(){let e=r(ve);if(null===e)throw Error("`useWallets` was called outside the PrivyProvider component");return e}export{ve as $,ae as A,oe as B,x as C,L as D,Ce as E,v as F,h as G,O as H,y as I,P as J,j as K,z as L,_ as M,re as N,A as O,te as P,ne as Q,g as R,S,d as T,J as U,u as V,F as W,G as X,Z as Y,ye as Z,we as _,U as a,le as a0,se as a1,ge as a2,T as b,M as c,H as d,E as e,w as f,k as g,B as h,m as i,f as j,b as k,i as l,s as m,C as n,p as o,c as p,W as q,pe as r,Y as s,$ as t,be as u,X as v,N as w,V as x,Q as y,ee as z};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useMemo as a,useEffect as n,useContext as r,createContext as o}from"react";import l from"tinycolor2";const i="https://auth.privy.io",s=2e4,p=1400,c=2500,h=4e3,u="1.88.4-beta-20241004182123",d="privy:token",m="privy-token",g="privy:refresh_token",f="privy-refresh-token",y="privy:id_token",b="privy-id-token",w="privy-session",v="privy:session_transfer_token",C="privy:caid",k=e=>`privy:guest:${e}`,E=e=>`privy:cross-app:${e}`,S="privy:state_code",x="privy:code_verifier",O="privy:headless_oauth",A="privy:oauth_disable_signup",U=e=>`privy:wallet:${e}`,M="privy:connectors",H="privy:connections",L=12e4,W=1,T="0x1",F=3e4,P="https://api.moonpay.com/v1",_="https://api.moonpay.com/v1",z="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",B="deprecated",R={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"}},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let I=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","wallet_connect","detected_wallets","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe"]),D=e=>I.has(e),q=(e,t,a)=>a.indexOf(e)===t;const K=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(D).filter(q):e?e.filter(D).filter(q):R.appearance.walletList,Y={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"}}},Z={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},$={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"}}},G={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},X={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"}}},J={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},N={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},V={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},Q={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"}}},ee={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"}}},te={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},ae={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"}}},ne={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},re={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},oe={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"}}},le=[Y,Z,re,Q,ee,te,ae,ne,N,{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"}}},X,J,{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"}}},V,{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},$,G,oe,{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"}}}],ie=new Set(le.map((e=>e.id)));function se(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}}function pe(e){let t=e.filter((e=>!ie.has(e.id)));return le.concat(t)}function ce(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}let he="#FFFFFF";function ue(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return l({...e.toHsl(),l:a})}function de({backgroundTheme:e,accentHex:t}){let a;switch(e){case"light":a=he;break;case"dark":a="#1E1E1D";break;default:a=e}let n=l(a),r=l(t),o=l("#51BA81"),i=l("#FFB74D"),s=l("#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"}(n.getLuminance()),c=ue(n,"light"===p?-.04:.11),h=ue(n,"light"===p?-.88:.87),u=ue(n,"light"===p?-.7:.75),d=ue(n,"light"===p?-.43:.45).desaturate("light"===p?60:20),m=ue(n,"light"===p?-.08:.25).desaturate("light"===p?60:20),g=ue(r,.15),f=ue(r,-.06),y=ue(s,.3),b=ue(i,.3),w=l(r.getLuminance()>.5?"#040217":he),v=ue(o,-.16),C=ue(o,.4);return{colorScheme:p,background:n.toHslString(),background2:c.toHslString(),foreground:h.toHslString(),foreground2:u.toHslString(),foreground3:d.toHslString(),foreground4:m.toHslString(),accent:r.toHslString(),accentLight:g.toHslString(),accentDark:f.toHslString(),foregroundAccent:w.toHslString(),success:o.toHslString(),successDark:v.toHslString(),successLight:C.toHslString(),error:s.toHslString(),errorLight:y.toHslString(),warn:i.toHslString(),warnLight:b.toHslString()}}function me(e,t,a){let n,r,o,l,i,s,p,c,h,u,d,m,g,f,y,b,w=a?console.warn:()=>{};t?.loginMethods?(n=t.loginMethods.includes("email"),r=t.loginMethods.includes("sms"),l=t.loginMethods.includes("wallet"),i=t.loginMethods.includes("google"),s=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),h=t.loginMethods.includes("spotify"),u=t.loginMethods.includes("instagram"),c=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("github"),d=t.loginMethods.includes("linkedin"),g=t.loginMethods.includes("apple"),f=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram")):(n=e.emailAuth,r=e.smsAuth,l=e.walletAuth,i=e.googleOAuth,s=e.twitterOAuth,p=e.discordOAuth,m=e.githubOAuth,h=e.spotifyOAuth,u=e.instagramOAuth,c=e.tiktokOAuth,d=e.linkedinOAuth,g=e.appleOAuth,f=e.farcasterAuth,y=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?o=!1:e.passkeyAuth&&(o=!0);let v=[n,r].filter(Boolean),C=[i,s,p,m,h,u,c,d,g,f,y].filter(Boolean),k=[l].filter(Boolean);if(v.length+C.length+k.length===0)throw Error("You must enable at least one login method");let E=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;E&&0===k.length?(w("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),E=!1):E||C.length+v.length!==0||(w("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),E=!0);let S=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&w("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let x=K({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),O=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],a=[];for(let a of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(a)?console.warn(`Duplicated login method: ${a}`):t.push(a);for(let n of e.overflow??[])t.includes(n)||a.includes(n)?console.warn(`Duplicated login method: ${n}`):a.push(n);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),A=t?.intl?.defaultCountry??"US",{chains:U,defaultChain:M}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:a,hasRpcConfigDefined:n}){let r;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&&n&&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`."),r=t.map((e=>{if(e.rpcUrls.privyWalletOverride)return e;let t=le.find((t=>t.id===e.id)),a=t?.rpcUrls.privy?.http[0];return a?ce(e,a):e}))}else r=le.concat(e??[]);let o=t?r[0]:Q,l=a??o;if(!r.find((e=>e.id===l.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:r,defaultChain:l}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),H=!!t?.defaultChain,L=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,W=!(e.enforceWalletUis??1);if(b=e.legacyWalletUiConfig??1?L?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??W:W,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==b)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:T,...F}=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??R.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:de({backgroundTheme:t?.appearance?.theme??R.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??R.appearance.accentColor}),loginGroupPriority:E?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:x,walletChainType:t?.appearance?.walletChainType??"ethereum-only"},loginMethods:{wallet:l,email:n,sms:r,passkey:o,google:i,twitter:s,discord:p,github:m,spotify:h,instagram:u,tiktok:c,linkedin:d,apple:g,farcaster:f,telegram:y},loginMethodsAndOrder:O,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??R.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??R.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??R.rpcConfig.rpcTimeouts},chains:U,defaultChain:M,intl:{defaultCountry:A},shouldEnforceDefaultChainOnConnect:H,captchaEnabled:e.captchaEnabled??R.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??R.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:S},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof T?{requireUserOwnedRecoveryOnCreate:T}:{},...L?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...F,noPromptOnSignature:b},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:L?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??R._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??R.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??R.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??R.fundingMethodConfig.moonpay.useSandbox}}}}let ge={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,termsAndConditionsUrl:null,privacyPolicyUrl:null,embeddedWalletConfig:{createOnLogin:"off",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]},fiatOnRampEnabled:!1,captchaEnabled:!1,captchaSiteKey:""};const fe=me(ge,void 0,!1);let ye=o({appConfig:fe,isServerConfigLoaded:!1});const be=({children:r,legacyCreateEmbeddedWalletFlag:o,client:l,clientConfig:i})=>{let[s,p]=t(null),c=a((()=>me(s??ge,i,!!s)),[s,i]);return n((()=>{if(!s)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:a,additionalChains:n,supportedChains:r,defaultChain:o,externalWallets:l,...i}=e;return{...i,...n?{additionalChains:n.map((e=>e.id))}:void 0,...r?{supportedChains:r.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}}(i,o),t=function(e,t=0){let a=3735928559^t,n=1103547991^t;for(let t,r=0;r<e.length;r++)a=Math.imul(a^(t=e.charCodeAt(r)),2654435761),n=Math.imul(n^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${s.id}:${t}`;localStorage.getItem(a)||(l.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[i,o,s]),n((()=>{s||(async()=>{try{let e=await l.getServerConfig();e.customApiUrl&&l.updateApiUrl(e.customApiUrl),p(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),e(ye.Provider,{value:{appConfig:c,isServerConfigLoaded:!!s},children:r})},we=()=>{let{appConfig:e}=r(ye);return e},ve=()=>{let{isServerConfigLoaded:e}=r(ye);return e},Ce=o(null);function ke(){let e=r(Ce);if(null===e)throw Error("`useWallets` was called outside the PrivyProvider component");return e}export{Ce as $,ae as A,oe as B,x as C,L as D,ke as E,v as F,h as G,O as H,y as I,P as J,j as K,z as L,_ as M,re as N,A as O,te as P,ne as Q,g as R,S,d as T,J as U,u as V,F as W,G as X,Z as Y,be as Z,ve as _,U as a,le as a0,se as a1,ce as a2,fe as a3,T as b,M as c,H as d,E as e,w as f,k as g,B as h,m as i,f as j,b as k,i as l,s as m,C as n,p as o,c as p,W as q,pe as r,Y as s,$ as t,we as u,X as v,N as w,V as x,Q as y,ee as z};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/react-auth",
3
- "version": "1.88.3",
3
+ "version": "1.88.4-beta-20241004182123",
4
4
  "description": "React client for the Privy Auth API",
5
5
  "keywords": [
6
6
  "authentication",
@@ -74,10 +74,10 @@
74
74
  "README.md"
75
75
  ],
76
76
  "scripts": {
77
- "build": "rollup --config rollup.types.mjs& rollup --config rollup.build.mjs& wait",
77
+ "build": "concurrently \"rollup --config rollup.types.mjs\" \"rollup --config rollup.build.mjs\"",
78
78
  "clean": "rm -rf dist .turbo",
79
79
  "d//": "To parallelize types and code build output rollup recommends running multiple instances",
80
- "dev": "rollup --config rollup.types.mjs --watch& rollup --config rollup.dev.mjs --watch& wait",
80
+ "dev": "concurrently \"rollup --config rollup.types.mjs --watch\" \"rollup --config rollup.dev.mjs --watch\"",
81
81
  "format": "eslint --fix",
82
82
  "lint": "eslint && npx tsc --noEmit",
83
83
  "stories": "cd storybook && vite --port=5702",
@@ -107,7 +107,7 @@
107
107
  "@heroicons/react": "^2.1.1",
108
108
  "@marsidev/react-turnstile": "^0.4.1",
109
109
  "@metamask/eth-sig-util": "^6.0.0",
110
- "@privy-io/js-sdk-core": "0.28.6",
110
+ "@privy-io/js-sdk-core": "0.28.7-beta-20241004182123",
111
111
  "@simplewebauthn/browser": "^9.0.1",
112
112
  "@solana/wallet-adapter-base": "^0.9.23",
113
113
  "@solana/wallet-standard-wallet-adapter-base": "^1.1.2",
@@ -146,7 +146,7 @@
146
146
  "@babel/preset-typescript": "^7.24.7",
147
147
  "@jest/globals": "^29.7.0",
148
148
  "@privy-io/eslint-config-custom": "*",
149
- "@privy-io/public-api": "2.10.4",
149
+ "@privy-io/public-api": "2.10.5-beta-20241004182123",
150
150
  "@rollup/plugin-commonjs": "^26.0.1",
151
151
  "@rollup/plugin-node-resolve": "^15.2.3",
152
152
  "@rollup/plugin-replace": "^5.0.5",
@@ -176,6 +176,7 @@
176
176
  "@types/uuid": "^9.0.2",
177
177
  "@vitejs/plugin-react-swc": "^3.7.0",
178
178
  "babel-jest": "^29.7.0",
179
+ "concurrently": "^9.0.1",
179
180
  "glob": "^10.3.12",
180
181
  "jest-environment-jsdom": "^29.7.0",
181
182
  "rollup": "^4.22.0",