@privy-io/react-auth 2.4.3 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{importWallet-BvzASqsr.js → importWallet-DnBwVibu.js} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/{prepareFundingModalData-C8wPeHar.js → prepareFundingModalData-Cb2nv4dG.js} +1 -1
- package/dist/cjs/{smart-wallets-DlC_5Y5l.js → smart-wallets-CBoK3FJE.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/useActiveWallet-CcpSCPoL.js +5 -0
- package/dist/cjs/{useFundWallet-2Ezrz28N.js → useFundWallet-BhlJigGm.js} +1 -1
- package/dist/cjs/{useWallets-DobnZGpT.js → useWallets-y1wsvg5v.js} +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +8 -7
- package/dist/dts/index.d.ts +8 -7
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +4 -4
- package/dist/dts/solana.d.ts +4 -4
- package/dist/dts/{types-CjeWF_LJ.d.mts → types-vsXbDWiC.d.mts} +2 -0
- package/dist/dts/{types-CjeWF_LJ.d.ts → types-vsXbDWiC.d.ts} +2 -0
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/dts/{useSolanaWallets-CXnYSqQR.d.mts → useSolanaWallets-xlc6faTU.d.mts} +1 -1
- package/dist/dts/{useSolanaWallets-CXnYSqQR.d.ts → useSolanaWallets-xlc6faTU.d.ts} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/{importWallet-DfwAobLp.mjs → importWallet-C-D57oRC.mjs} +1 -1
- package/dist/esm/index.mjs +21 -21
- package/dist/esm/{prepareFundingModalData-R09VUVWm.mjs → prepareFundingModalData-CFokVw8r.mjs} +1 -1
- package/dist/esm/{smart-wallets-BKO_VzqX.mjs → smart-wallets-BvnCDN7T.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{useActiveWallet-CRQOoJef.mjs → useActiveWallet-BzMUJJr8.mjs} +5 -5
- package/dist/esm/{useFundWallet-vjrQZZWa.mjs → useFundWallet-DAS_ErNP.mjs} +1 -1
- package/dist/esm/useWallets-0lCjD0UF.mjs +1 -0
- package/package.json +5 -5
- package/dist/cjs/useActiveWallet-DUvjidjw.js +0 -5
- package/dist/esm/useWallets-Bm3b-V02.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{q as a,u as t,M as r}from"./useWallets-
|
|
1
|
+
import{useCallback as e}from"react";import{q as a,u as t,M as r}from"./useWallets-0lCjD0UF.mjs";import{c as s,u as n,x as o,q as l}from"./prepareFundingModalData-CFokVw8r.mjs";import{Connection as i,PublicKey as c,Transaction as m,SystemProgram as d,TransactionInstruction as u,VersionedTransaction as p,TransactionMessage as f}from"@solana/web3.js";import{getSolanaRpcEndpointForCluster as w}from"@privy-io/js-sdk-core";import{u as g}from"./internal-context-DBDJ7qsa.mjs";var h={id:s,getBalance:({address:e,cluster:a})=>new i(w(a)).getBalance(new c(e)),createTransferTransaction:async({from:e,to:a,amount:t,cluster:r})=>{let s=new c(e),n=new m;n.add(d.transfer({fromPubkey:s,toPubkey:new c(a),lamports:t}));let o=new i(w(r)),l=await o.getLatestBlockhash();return n.recentBlockhash=l.blockhash,n.feePayer=s,{transaction:n,connection:o}},createBridgeTransactionFromRelayQuote:async({quote:e,from:a,cluster:t})=>{let r=e.steps[0]?.items?.[0];if(!r)return;let s=r.data.instructions.map((({keys:e,programId:a,data:t})=>new u({keys:e.map((({pubkey:e,isSigner:a,isWritable:t})=>({pubkey:new c(e),isSigner:a,isWritable:t}))),programId:new c(a),data:Buffer.from(t,"hex")}))),n=r.data.addressLookupTableAddresses?.map((e=>new c(e))),o=new i(w(t)),l=await Promise.all((n??[]).map((async e=>o.getAddressLookupTable(e).then((e=>e.value))))),{blockhash:m}=await o.getLatestBlockhash();return{transaction:new p(new f({payerKey:new c(a),instructions:s,recentBlockhash:m}).compileToV0Message(l)),connection:o}}};const k=s=>{n("fundSolanaWallet",s);let i=a(),{setModalData:c}=t(),{openModal:m}=g();return o(h),{fundWallet:e((async(e,a)=>{let t=r.FUNDING_METHOD_SELECTION_SCREEN;c({funding:l({address:e,appConfig:i,fundWalletConfig:a,methodScreen:t})}),m(t)}),[i,c,m])}};export{h as t,k as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getAddress as e}from"viem/utils";import{jsx as t,jsxs as a}from"react/jsx-runtime";import{useState as i,useMemo as r,useEffect as n,useContext as l,createContext as s,useRef as o}from"react";import c from"tinycolor2";import{n as p}from"./internal-context-DBDJ7qsa.mjs";const d="https://auth.privy.io",u=2e4,E=1400,m=2500,h=4e3,_="2.4.4",f="privy:token",y="privy-token",A="privy:refresh_token",g="privy-refresh-token",C="privy:pat",N="privy:id_token",b="privy-id-token",S="privy-session",T="privy:session_transfer_token",v="privy:caid",w=e=>`privy:guest:${e}`,k=e=>`privy:cross-app:${e}`,L="privy:state_code",O="privy:code_verifier",R="privy:headless_oauth",I="privy:oauth_disable_signup",D=e=>`privy:wallet:${e}`,W="privy:connectors",M="privy:connections",U=12e4,P=1,x="0x1",F=3e4,G="https://api.moonpay.com/v1",H="https://api.moonpay.com/v1",B="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",V="deprecated";function K(e){return e?new Date(1e3*e):null}function Y(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt??e.verifiedAt).getTime()-(t.firstVerifiedAt??t.verifiedAt).getTime())).find((e=>e.type===t))}const z=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType&&0===e.walletIndex))||null,q=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType)),$=e=>q(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),X=(e,t)=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.chainType===t)),Z=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType)),J=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType&&0===e.walletIndex))||null,Q=e=>Z(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),ee=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType))||null,te=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType))||null,ae=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.address===t))||null,ie=e=>z(e)??J(e),re=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")},ne=e=>{let t=ie(e);if(!t)throw Error("Failed to find primary wallet");return re(t)},le=(t,a)=>{let i=X(t,"ethereum").find((t=>e(t.address)===e(a)));return{signingWallet:i,rootWallet:i?i.imported?i:z(t):void 0}},se=(e,t)=>{let a=X(e,"solana").find((e=>e.address===t));return a?a.imported||0===a.walletIndex?{signingWallet:a,rootWallet:a}:{signingWallet:a,rootWallet:J(e)}:{}};function oe(e){if(!e)return null;let t=function(e){let t=[];for(let a of e){let e=a.type;switch(a.type){case"wallet":let i={id:a.id,address:a.address,type:a.type,imported:a.imported,delegated:a.delegated,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at),chainType:a.chain_type,walletClientType:a.wallet_client_type,connectorType:a.connector_type,recoveryMethod:a.recovery_method,walletIndex:a.wallet_index};t.push(i);break;case"smart_wallet":let r={address:a.address,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at),smartWalletType:a.smart_wallet_type};t.push(r);break;case"cross_app":let n={type:a.type,subject:a.subject,embeddedWallets:a.embedded_wallets,smartWallets:a.smart_wallets,providerApp:{id:a.provider_app_id},verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(n);break;case"email":let l={address:a.address,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(l);break;case"phone":let s={number:a.phoneNumber,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(s);break;case"google_oauth":let o={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(o);break;case"spotify_oauth":let c={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(c);break;case"instagram_oauth":let p={subject:a.subject,username:a.username,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(p);break;case"twitter_oauth":let d={subject:a.subject,username:a.username,name:a.name,type:a.type,profilePictureUrl:a.profile_picture_url,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(d);break;case"discord_oauth":let u={subject:a.subject,username:a.username,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(u);break;case"github_oauth":let E={subject:a.subject,username:a.username,name:a.name,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(E);break;case"tiktok_oauth":let m={subject:a.subject,username:a.username,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(m);break;case"linkedin_oauth":let h={subject:a.subject,name:a.name,email:a.email,vanityName:a.vanity_name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(h);break;case"apple_oauth":let _={subject:a.subject,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(_);break;case"custom_auth":t.push({type:a.type,customUserId:a.custom_user_id,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)});break;case"farcaster":let f={type:a.type,fid:a.fid,ownerAddress:a.owner_address,displayName:a.display_name,username:a.username,bio:a.bio,pfp:a.profile_picture_url,url:a.homepage_url,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at),signerPublicKey:a.signer_public_key};t.push(f);break;case"passkey":let y={type:a.type,enrolledInMfa:a.enrolled_in_mfa,credentialId:a.credential_id,authenticatorName:a.authenticator_name,createdWithDevice:a.created_with_device,createdWithOs:a.created_with_os,createdWithBrowser:a.created_with_browser,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(y);break;case"telegram":let A={type:a.type,telegramUserId:a.telegram_user_id,firstName:a.first_name,lastName:a.last_name,username:a.username,photoUrl:a.photo_url,verifiedAt:K(a.first_verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(A);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),a=Y(t,"wallet"),i=Y(t,"smart_wallet"),r=Y(t,"email"),n=Y(t,"phone"),l=Y(t,"google_oauth"),s=Y(t,"twitter_oauth"),o=Y(t,"discord_oauth"),c=Y(t,"github_oauth"),p=Y(t,"spotify_oauth"),d=Y(t,"instagram_oauth"),u=Y(t,"tiktok_oauth"),E=Y(t,"linkedin_oauth"),m=Y(t,"apple_oauth"),h=Y(t,"farcaster"),_=Y(t,"telegram"),f=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:K(t)})));return{id:e.id,createdAt:K(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:n&&{number:n?.number},wallet:a&&{id:a.id,address:a.address,chainType:a.chainType,walletClientType:a.walletClientType,connectorType:a.connectorType,recoveryMethod:a.recoveryMethod,imported:a.imported,delegated:a.delegated,walletIndex:a.walletIndex},smartWallet:i&&{address:i.address,smartWalletType:i.smartWalletType},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:s&&{subject:s.subject,username:s.username,name:s.name,profilePictureUrl:s.profilePictureUrl},discord:o&&{subject:o.subject,username:o.username,email:o.email},github:c&&{subject:c.subject,username:c.username,name:c.name,email:c.email},spotify:p&&{subject:p.subject,email:p.email,name:p.name},instagram:d&&{subject:d.subject,username:d.username},tiktok:u&&{subject:u.subject,username:u.username,name:u.name},linkedin:E&&{subject:E.subject,name:E.name,email:E.email,vanityName:E.vanityName},apple:m&&{subject:m.subject,email:m.email},farcaster:h&&{fid:h.fid,ownerAddress:h.ownerAddress,displayName:h.displayName,username:h.username,bio:h.bio,pfp:h.pfp,url:h.url,signerPublicKey:h.signerPublicKey},telegram:_&&{telegramUserId:_.telegramUserId,firstName:_.firstName,lastName:_.lastName,username:_.username,photoUrl:_.photoUrl},delegatedWallets:[],mfaMethods:f.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}const ce={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"}}},pe={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},de={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"}}},ue={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},Ee={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"}}},me={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},he={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},_e={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},fe={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"}}},ye={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"}}},Ae={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},ge={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"}}},Ce={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},Ne={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},be={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"}}},Se=[ce,pe,Ne,fe,ye,Ae,ge,Ce,he,{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"}}},Ee,me,{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"}}},_e,{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},de,ue,be,{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"}}}],Te=new Set(Se.map((e=>e.id)));function ve({src:e,...a}){/*#__PURE__*/return t("img",{src:e,...a,style:{display:"none"}})}const we={appearance:{landingHeader:"Log in or sign up",theme:"light",accentColor:"#676FFF",walletList:["detected_wallets","metamask","coinbase_wallet","rainbow","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",externalWallets:{coinbaseWallet:{connectionOptions:"all"}},embeddedWallets:{extendedCalldataDecoding:!1},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let ke=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","solflare","backpack"]),Le=e=>ke.has(e),Oe=(e,t,a)=>a.indexOf(e)===t;const Re=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(Le).filter(Oe):e?e.filter(Le).filter(Oe):we.appearance.walletList;function Ie(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}}function De(e){let t=e.filter((e=>!Te.has(e.id)));return Se.concat(t)}function We(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}const Me=792703809,Ue="11111111111111111111111111111111",Pe="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";function xe(e){return e.includes("testnet")?"testnet":e.includes("devnet")?"devnet":"mainnet-beta"}function Fe(e,t){return`https://explorer.solana.com/tx/${e}?cluster=${t}`}function Ge(e,t){return`https://explorer.solana.com/account/${e}?cluster=${t}`}function He({name:e,rpcUrl:t}){if(t)return t;switch(e){case"mainnet-beta":return"https://api.mainnet-beta.solana.com";case"testnet":return"https://api.testnet.solana.com";case"devnet":return"https://api.devnet.solana.com"}}let Be="#FFFFFF";function je(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return c({...e.toHsl(),l:a})}function Ve({backgroundTheme:e,accentHex:t}){let a;switch(e){case"light":a=Be;break;case"dark":a="#1E1E1D";break;default:a=e}let i=c(a),r=c(t),n=c("#51BA81"),l=c("#FFB74D"),s=c("#EC6351"),o=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"}(i.getLuminance()),p=je(i,"light"===o?-.04:.11),d=je(i,"light"===o?-.08:.16),u=je(i,"light"===o?-.88:.87),E=je(i,"light"===o?-.7:.75),m=je(i,"light"===o?-.43:.45).desaturate("light"===o?60:20),h=je(i,"light"===o?-.08:.25).desaturate("light"===o?60:20),_=je(r,.15),f=je(r,.25),y=je(r,-.06),A=je(r,-.6),g=je(s,.3),C=je(l,.3),N=c(r.getLuminance()>.5?"#040217":Be),b=je(n,-.16),S=je(n,.4);return{colorScheme:o,background:i.toHslString(),background2:p.toHslString(),background3:d.toHslString(),foreground:u.toHslString(),foreground2:E.toHslString(),foreground3:m.toHslString(),foreground4:h.toHslString(),accent:r.toHslString(),accentLight:_.toHslString(),accentLightest:f.toHslString(),accentDark:y.toHslString(),accentDarkest:A.toHslString(),foregroundAccent:N.toHslString(),success:n.toHslString(),successDark:b.toHslString(),successLight:S.toHslString(),error:s.toHslString(),errorLight:g.toHslString(),warn:l.toHslString(),warnLight:C.toHslString()}}function Ke(e,t,a,i){let r,n,l,s,o,c,p,d,u,E,m,h,_,f,y,A=a?console.warn:()=>{};t?.loginMethods?(r=t.loginMethods.includes("email"),n=t.loginMethods.includes("sms"),s=t.loginMethods.includes("wallet"),o=t.loginMethods.includes("google"),c=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),E=t.loginMethods.includes("instagram"),d=t.loginMethods.includes("tiktok"),h=t.loginMethods.includes("github"),m=t.loginMethods.includes("linkedin"),_=t.loginMethods.includes("apple"),f=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram"),l=t.loginMethods.includes("passkey")):(r=e.emailAuth,n=e.smsAuth,s=e.walletAuth||e.solanaWalletAuth,o=e.googleOAuth,c=e.twitterOAuth,p=e.discordOAuth,h=e.githubOAuth,u=e.spotifyOAuth,E=e.instagramOAuth,d=e.tiktokOAuth,m=e.linkedinOAuth,_=e.appleOAuth,f=e.farcasterAuth,y=e.telegramAuth,l=e.passkeyAuth),e.passkeyAuth&&(l=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(l=!1);let g=[r,n].filter(Boolean),C=[o,c,p,h,u,E,d,m,_,f,y].filter(Boolean),N=[s].filter(Boolean),b=t?.loginMethods?.includes("passkey")??!1,S=e.passkeysForSignupEnabled??!1,T=[l&&(S||b)].filter(Boolean);if(g.length+C.length+N.length+T.length===0)throw Error("You must enable at least one login method");let v=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;v&&0===N.length?(A("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),v=!1):v||C.length+g.length!==0||(A("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),v=!0);let w=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&A("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let k=Re({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),L=(({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 i of e.overflow??[])t.includes(i)||a.includes(i)?console.warn(`Duplicated login method: ${i}`):a.push(i);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),O=t?.intl?.defaultCountry??"US",{chains:R,defaultChain:I}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=e.map((e=>{if(e.rpcUrls.privyWalletOverride)return e;let t=Se.find((t=>t.id===e.id)),a=t?.rpcUrls.privy?.http[0];return a?We(e,a):e}))}else a=[...Se];let i=e?a[0]:fe,r=t??i;if(!a.find((e=>e.id===r.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),D=!!t?.defaultChain,W=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,M=t?.embeddedWallets?.requireUserPasswordOnCreate,U=t?.embeddedWallets?.createOnLogin,P=W?"all-users":e.embeddedWalletConfig.createOnLogin,x=t?.solanaClusters??[];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??we.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Ve({backgroundTheme:t?.appearance?.theme??we.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??we.appearance.accentColor}),loginGroupPriority:v?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:k,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:s,email:r,sms:n,passkey:l,google:o,twitter:c,discord:p,github:h,spotify:u,instagram:E,tiktok:d,linkedin:m,apple:_,farcaster:f,telegram:y},disablePlusEmails:e.disablePlusEmails,loginMethodsAndOrder:L,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??we.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:{}},chains:R,solanaClusters:{"mainnet-beta":x.find((e=>"mainnet-beta"===e.name))?.rpcUrl||"https://api.mainnet-beta.solana.com",testnet:x.find((e=>"testnet"===e.name))?.rpcUrl||"https://api.testnet.solana.com",devnet:x.find((e=>"devnet"===e.name))?.rpcUrl||"https://api.devnet.solana.com"},defaultChain:I,intl:{defaultCountry:O},shouldEnforceDefaultChainOnConnect:D,captchaEnabled:e.captchaEnabled??we.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??we.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:w},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{requireUserOwnedRecoveryOnCreate:M??(!W&&e.embeddedWalletConfig.requireUserOwnedRecoveryOnCreate),userOwnedRecoveryOptions:W?["user-passcode"]:e.embeddedWalletConfig.userOwnedRecoveryOptions,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:U??t?.embeddedWallets?.ethereum?.createOnLogin??P},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??"off"},showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforceWalletUis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??i??"https://auth.privy.io"}},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink},customAuth:W?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration,passkeysForSignupEnabled:e.passkeysForSignupEnabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??we._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??we.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??we.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??we.fundingMethodConfig.moonpay.useSandbox}}}}let Ye={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:"",enforceWalletUis:!1,legacyWalletUiConfig:!1};const ze=Ke(Ye,void 0,!1);let qe=/*#__PURE__*/s({appConfig:ze,isServerConfigLoaded:!1});const $e=({children:e,client:a,clientConfig:l})=>{let[s,o]=i(null),c=r((()=>Ke(s??Ye,l,!!s,"undefined"!=typeof window?window.location.origin:void 0)),[s,l]);return n((()=>{if(!s)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:a,defaultChain:i,externalWallets:r,...n}=e;return{...n,...a?{supportedChains:a.map((e=>e.id))}:void 0,...i?{defaultChain:i.id}:void 0,...r?{walletConnect:r.walletConnect,coinbaseWallet:r.coinbaseWallet,solana:{connectors:r.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(l),t=function(e,t=0){let a=3735928559^t,i=1103547991^t;for(let t,r=0;r<e.length;r++)a=Math.imul(a^(t=e.charCodeAt(r)),2654435761),i=Math.imul(i^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&(i=Math.imul(i^i>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),i=`privy:sent:${s.id}:${t}`;localStorage.getItem(i)||(a.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(i,"t"))}),[l,s]),n((()=>{s||(async()=>{try{let e=await a.getServerConfig();e.customApiUrl&&a.updateApiUrl(e.customApiUrl),o(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/t(qe.Provider,{value:{appConfig:c,isServerConfigLoaded:!!s},children:e})},Xe=()=>{let{appConfig:e}=l(qe);return e},Ze=()=>{let{isServerConfigLoaded:e}=l(qe);return e};var Je,Qe=((Je={}).LANDING="LANDING",Je.CONNECT_OR_CREATE="CONNECT_OR_CREATE",Je.AWAITING_CONNECTION="AWAITING_CONNECTION",Je.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",Je.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",Je.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",Je.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",Je.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",Je.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",Je.SELECT_PASSKEY_SIGNUP_OR_LOGIN="SELECT_PASSKEY_SIGNUP_OR_LOGIN",Je.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",Je.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",Je.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",Je.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",Je.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",Je.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",Je.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",Je.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",Je.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",Je.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",Je.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",Je.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",Je.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",Je.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",Je.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",Je.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",Je.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",Je.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",Je.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",Je.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",Je.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",Je.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",Je.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",Je.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",Je.EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN",Je.INSTALL_WALLET_SCREEN="INSTALL_WALLET_SCREEN",Je.WALLET_INTERSTITIAL_SCREEN="WALLET_INTERSTITIAL_SCREEN",Je.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",Je.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",Je.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",Je.FUNDING_EDIT_AMOUNT_SCREEN="FUNDING_EDIT_AMOUNT_SCREEN",Je.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",Je.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",Je.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",Je.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",Je.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",Je.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",Je.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",Je.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",Je.CAPTCHA_SCREEN="CAPTCHA_SCREEN",Je.ERROR_SCREEN="ERROR_SCREEN",Je.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",Je.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",Je.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN",Je);const et=/*#__PURE__*/s({ready:!1,app:ze,currentScreen:null,lastScreen:null,navigate:p,navigateBack:p,resetNavigation:p,setModalData:p,onUserCloseViaDialogOrKeybindRef:void 0});let tt=[Qe.LANDING,Qe.CONNECT_ONLY_LANDING_SCREEN,null];const at=e=>{let r=Xe(),l=e.authenticated,[s,c]=i(e.initialScreen);n((()=>{l||tt.includes(e.initialScreen)||e.setInitialScreen(null)}),[l]);let p=o(null);n((()=>{e.open||(p.current=null)}),[e.open]),n((()=>{p.current=null}),[e.initialScreen]);let d={ready:!!r.id,app:r,data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:s,navigate:(t,a=!0)=>{e.setInitialScreen(t),a&&c(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(s)},resetNavigation:()=>{e.setInitialScreen(null),c(null)},onUserCloseViaDialogOrKeybindRef:p};/*#__PURE__*/return a(et.Provider,{value:d,children:[("string"==typeof r.appearance.logo||"img"===r.appearance.logo?.type)&&/*#__PURE__*/t(ve,{src:"string"==typeof r.appearance.logo?r.appearance.logo:r.appearance.logo.props.src}),e.children]})},it=()=>l(et),rt=/*#__PURE__*/s({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,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,createWallet: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,signTransaction:p,exportWallet:p,setWalletPassword:p,setWalletRecovery:p,requestFarcasterSignerFromWarpcast:p,getFarcasterSignerPublicKey:p,signFarcasterMessage:p,createGuestAccount:p,signMessageWithCrossAppWallet:p,signTypedDataWithCrossAppWallet:p,sendTransactionWithCrossAppWallet:p,isModalOpen:!1,mfaMethods:[]}),nt=()=>l(rt),lt=/*#__PURE__*/s(null);function st(){let e=l(lt);return null===e?(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1}):e}export{Fe as $,P as A,xe as B,O as C,Te as D,st as E,T as F,Me as G,R as H,N as I,Ue as J,h as K,He as L,Qe as M,Pe as N,I as O,C as P,fe as Q,A as R,L as S,Ee as T,ye as U,_ as V,F as W,ge as X,ce as Y,rt as Z,Ge as _,U as a,te as a0,se as a1,$e as a2,Ze as a3,Z as a4,q as a5,ee as a6,$ as a7,le as a8,lt as a9,at as aa,Q as ab,ne as ac,Se as ad,Ie as ae,We as af,D as ag,x as ah,de as ai,he as aj,_e as ak,be as al,H as am,G as an,j as ao,B as ap,Ne as aq,Ae as ar,Ce as as,me as at,ue as au,pe as av,W as b,re as c,M as d,f as e,k as f,w as g,S as h,V as i,oe as j,y as k,g as l,b as m,d as n,u as o,v as p,Xe as q,nt as r,E as s,m as t,it as u,ae as v,z as w,J as x,ie as y,De as z};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privy-io/react-auth",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "React client for the Privy Auth API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -136,14 +136,14 @@
|
|
|
136
136
|
"@heroicons/react": "^2.1.1",
|
|
137
137
|
"@marsidev/react-turnstile": "^0.4.1",
|
|
138
138
|
"@metamask/eth-sig-util": "^6.0.0",
|
|
139
|
-
"@privy-io/js-sdk-core": "0.44.
|
|
139
|
+
"@privy-io/js-sdk-core": "0.44.1",
|
|
140
140
|
"@simplewebauthn/browser": "^9.0.1",
|
|
141
141
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
142
142
|
"@solana/wallet-standard-wallet-adapter-base": "^1.1.2",
|
|
143
143
|
"@solana/wallet-standard-wallet-adapter-react": "^1.1.2",
|
|
144
144
|
"@wallet-standard/app": "^1.0.1",
|
|
145
|
-
"@walletconnect/ethereum-provider": "^2.
|
|
146
|
-
"@walletconnect/modal": "^2.
|
|
145
|
+
"@walletconnect/ethereum-provider": "^2.18.0",
|
|
146
|
+
"@walletconnect/modal": "^2.7.0",
|
|
147
147
|
"base64-js": "^1.5.1",
|
|
148
148
|
"dotenv": "^16.0.3",
|
|
149
149
|
"encoding": "^0.1.13",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"@jest/globals": "^29.7.0",
|
|
176
176
|
"@privy-io/build-config": "*",
|
|
177
177
|
"@privy-io/eslint-config-custom": "*",
|
|
178
|
-
"@privy-io/public-api": "2.18.
|
|
178
|
+
"@privy-io/public-api": "2.18.8",
|
|
179
179
|
"@privy-io/testing": "*",
|
|
180
180
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
181
181
|
"@rollup/plugin-node-resolve": "^15.3.0",
|