@privy-io/react-auth 1.87.0 → 1.88.0-beta-20240926135515

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
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("tinycolor2"),o=require("./internal-context.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(n);const a={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","rabby_wallet","safe"]),s=e=>i.has(e),p=(e,t,n)=>n.indexOf(e)===t;const c=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(s).filter(p):e?e.filter(s).filter(p):a.appearance.walletList,m={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}},d={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0},u={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"}}},h={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},g={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"}}},f={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0},y={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1},b={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1},C={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"}}},E={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"}}},w={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},k={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"}}},v={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},S={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},x={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"}}},I=[m,d,S,C,E,w,k,v,y,{id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0},{id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}},{id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}},g,f,{id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0},{id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}},b,{id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0},u,h,x,{id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0},{id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0},{id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}},{id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}},{id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}}],A=new Set(I.map((e=>e.id)));let O="#FFFFFF";function T(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return l.default({...e.toHsl(),l:n})}function _({backgroundTheme:e,accentHex:t}){let n;switch(e){case"light":n=O;break;case"dark":n="#1E1E1D";break;default:n=e}let o=l.default(n),r=l.default(t),a=l.default("#51BA81"),i=l.default("#FFB74D"),s=l.default("#EC6351"),p=function(e){return e<.8&&e>.2&&console.warn("Background color is not light or dark enough, which could lead to accessibility issues."),e>.5?"light":"dark"}(o.getLuminance()),c=T(o,"light"===p?-.04:.11),m=T(o,"light"===p?-.88:.87),d=T(o,"light"===p?-.7:.75),u=T(o,"light"===p?-.43:.45).desaturate("light"===p?60:20),h=T(o,"light"===p?-.08:.25).desaturate("light"===p?60:20),g=T(r,.15),f=T(r,-.06),y=T(s,.3),b=T(i,.3),C=l.default(r.getLuminance()>.5?"#040217":O),E=T(a,-.16),w=T(a,.4);return{colorScheme:p,background:o.toHslString(),background2:c.toHslString(),foreground:m.toHslString(),foreground2:d.toHslString(),foreground3:u.toHslString(),foreground4:h.toHslString(),accent:r.toHslString(),accentLight:g.toHslString(),accentDark:f.toHslString(),foregroundAccent:C.toHslString(),success:a.toHslString(),successDark:E.toHslString(),successLight:w.toHslString(),error:s.toHslString(),errorLight:y.toHslString(),warn:i.toHslString(),warnLight:b.toHslString()}}function U(e,t,n){let o,r,l,i,s,p,m,d,u,h,g,f,y,b,E,w,k=n?console.warn:()=>{};t?.loginMethods?(o=t.loginMethods.includes("email"),r=t.loginMethods.includes("sms"),i=t.loginMethods.includes("wallet"),s=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),m=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),h=t.loginMethods.includes("instagram"),d=t.loginMethods.includes("tiktok"),f=t.loginMethods.includes("github"),g=t.loginMethods.includes("linkedin"),y=t.loginMethods.includes("apple"),b=t.loginMethods.includes("farcaster"),E=t.loginMethods.includes("telegram")):(o=e.emailAuth,r=e.smsAuth,i=e.walletAuth,s=e.googleOAuth,p=e.twitterOAuth,m=e.discordOAuth,f=e.githubOAuth,u=e.spotifyOAuth,h=e.instagramOAuth,d=e.tiktokOAuth,g=e.linkedinOAuth,y=e.appleOAuth,b=e.farcasterAuth,E=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?l=!1:e.passkeyAuth&&(l=!0);let v=[o,r].filter(Boolean),S=[s,p,m,f,u,h,d,g,y,b,E].filter(Boolean),x=[i].filter(Boolean);if(v.length+S.length+x.length===0)throw Error("You must enable at least one login method");let A=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;A&&0===x.length?(k("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),A=!1):A||S.length+v.length!==0||(k("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),A=!0);let O=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&k("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let T=c({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),U=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n 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(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let o of e.overflow??[])t.includes(o)||n.includes(o)?console.warn(`Duplicated login method: ${o}`):n.push(o);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),W=t?.intl?.defaultCountry??"US",{chains:L,defaultChain:M}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:n,hasRpcConfigDefined:o}){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&&o&&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=>e.rpcUrls.privyWalletOverride?e:I.find((t=>t.id===e.id))??e))}else r=I.concat(e??[]);let l=t?r[0]:C,a=n??l;if(!r.find((e=>e.id===a.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:r,defaultChain:a}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),P=!!t?.defaultChain,F=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,H=!(e.enforceWalletUis??1);if(w=e.legacyWalletUiConfig??1?F?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??H:H,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==w)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:R,...D}=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??a.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:_({backgroundTheme:t?.appearance?.theme??a.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??a.appearance.accentColor}),loginGroupPriority:A?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:T,walletChainType:t?.appearance?.walletChainType??"ethereum-only"},loginMethods:{wallet:i,email:o,sms:r,passkey:l,google:s,twitter:p,discord:m,github:f,spotify:u,instagram:h,tiktok:d,linkedin:g,apple:y,farcaster:b,telegram:E},loginMethodsAndOrder:U,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??a.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??a.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??a.rpcConfig.rpcTimeouts},chains:L,defaultChain:M,intl:{defaultCountry:W},shouldEnforceDefaultChainOnConnect:P,captchaEnabled:e.captchaEnabled??a.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??a.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:O},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof R?{requireUserOwnedRecoveryOnCreate:R}:{},...F?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...D,noPromptOnSignature:w},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:F?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??a._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??a.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??a.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??a.fundingMethodConfig.moonpay.useSandbox}}}}let W={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 L=U(W,void 0,!1);let M=t.createContext({appConfig:L,isServerConfigLoaded:!1});const P=t.createContext({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:o.notImplemented,login:o.notImplemented,connectOrCreateWallet:o.notImplemented,linkEmail:o.notImplemented,linkPhone:o.notImplemented,linkFarcaster:o.notImplemented,linkWallet:o.notImplemented,startCrossAppAuthFlow:o.notImplemented,linkGoogle:o.notImplemented,linkTwitter:o.notImplemented,linkDiscord:o.notImplemented,linkGithub:o.notImplemented,linkSpotify:o.notImplemented,linkInstagram:o.notImplemented,linkTelegram:o.notImplemented,linkTiktok:o.notImplemented,linkLinkedIn:o.notImplemented,linkApple:o.notImplemented,linkPasskey:o.notImplemented,updateEmail:o.notImplemented,updatePhone:o.notImplemented,logout:o.notImplemented,getAccessToken:o.notImplemented,getEthereumProvider:o.notImplemented,getEthersProvider:o.notImplemented,getWeb3jsProvider:o.notImplemented,unlinkEmail:o.notImplemented,unlinkPhone:o.notImplemented,unlinkWallet:o.notImplemented,unlinkGoogle:o.notImplemented,unlinkTwitter:o.notImplemented,unlinkDiscord:o.notImplemented,unlinkGithub:o.notImplemented,unlinkSpotify:o.notImplemented,unlinkInstagram:o.notImplemented,unlinkTiktok:o.notImplemented,unlinkLinkedIn:o.notImplemented,unlinkApple:o.notImplemented,unlinkCrossAppAccount:o.notImplemented,unlinkFarcaster:o.notImplemented,unlinkTelegram:o.notImplemented,unlinkPasskey:o.notImplemented,setActiveWallet:o.notImplemented,forkSession:o.notImplemented,createWallet:o.notImplemented,importWallet:o.notImplemented,signMessage:o.notImplemented,signTypedData:o.notImplemented,enrollInMfa:o.notImplemented,initEnrollmentWithSms:o.notImplemented,initEnrollmentWithTotp:o.notImplemented,initEnrollmentWithPasskey:o.notImplemented,promptMfa:o.notImplemented,init:o.notImplemented,submitEnrollmentWithSms:o.notImplemented,submitEnrollmentWithTotp:o.notImplemented,submitEnrollmentWithPasskey:o.notImplemented,unenroll:o.notImplemented,submit:o.notImplemented,cancel:o.notImplemented,sendTransaction:o.notImplemented,sendSolanaTransaction:o.notImplemented,exportWallet:o.notImplemented,setWalletPassword:o.notImplemented,setWalletRecovery:o.notImplemented,requestFarcasterSignerFromWarpcast:o.notImplemented,getFarcasterSignerPublicKey:o.notImplemented,signFarcasterMessage:o.notImplemented,createGuestAccount:o.notImplemented,initLoginWithEmail:o.notImplemented,initLoginWithSms:o.notImplemented,otpState:{status:"initial"},loginWithCode:o.notImplemented,fundWallet:o.notImplemented,initLoginWithHeadlessOAuth:o.notImplemented,loginWithHeadlessOAuth:o.notImplemented,generateSiweMessage:o.notImplemented,linkWithSiwe:o.notImplemented,signMessageWithCrossAppWallet:o.notImplemented,signTypedDataWithCrossAppWallet:o.notImplemented,sendTransactionWithCrossAppWallet:o.notImplemented,isHeadlessOAuthLoading:!1,isModalOpen:!1,mfaMethods:[]}),F=t.createContext(null);exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CONNECTORS_STATE_KEY="privy:connectors",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_APP_CONFIG=L,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEFAULT_SUPPORTED_CHAINS=I,exports.DEFAULT_SUPPORTED_CHAIN_IDS=A,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.FORKED_TOKEN_STORAGE_KEY="privy:session_transfer_token",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PrivyAppConfigProvider=({children:n,legacyCreateEmbeddedWalletFlag:o,client:r,clientConfig:l})=>{let[a,i]=t.useState(null),s=t.useMemo((()=>U(a??W,l,!!a)),[a,l]);return t.useEffect((()=>{if(!a)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:n,additionalChains:o,supportedChains:r,defaultChain:l,externalWallets:a,...i}=e;return{...i,...o?{additionalChains:o.map((e=>e.id))}:void 0,...r?{supportedChains:r.map((e=>e.id))}:void 0,...l?{defaultChain:l.id}:void 0,...a?{walletConnect:a.walletConnect,coinbaseWallet:a.coinbaseWallet,solana:{connectors:a.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0,legacyCreateEmbeddedWalletFlag:t}}(l,o),t=function(e,t=0){let n=3735928559^t,o=1103547991^t;for(let t,r=0;r<e.length;r++)n=Math.imul(n^(t=e.charCodeAt(r)),2654435761),o=Math.imul(o^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&(o=Math.imul(o^o>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${a.id}:${t}`;localStorage.getItem(n)||(r.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[l,o,a]),t.useEffect((()=>{a||(async()=>{try{let e=await r.getServerConfig();e.customApiUrl&&r.updateApiUrl(e.customApiUrl),i(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),e.jsx(M.Provider,{value:{appConfig:s,isServerConfigLoaded:!!a},children:n})},exports.PrivyContext=P,exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.TOKEN_COOKIE_KEY="privy-token",exports.TOKEN_STORAGE_KEY="privy:token",exports.UseWalletsContext=F,exports.VERSION="1.87.0",exports.WALLET_PROXY_TIMEOUT=3e4,exports.arbitrum=m,exports.arbitrumSepolia=d,exports.avalanche=u,exports.avalancheFuji=h,exports.base=g,exports.baseSepolia=f,exports.celo=y,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.linea=b,exports.mainnet=C,exports.optimism=E,exports.optimismSepolia=w,exports.polygon=k,exports.polygonAmoy=v,exports.sepolia=S,exports.useAppConfig=()=>{let{appConfig:e}=t.useContext(M);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=t.useContext(M);return e},exports.usePrivy=()=>t.useContext(P),exports.useWallets=function(){let e=t.useContext(F);if(null===e)throw Error("`useWallets` was called outside the PrivyProvider component");return e},exports.zora=x;
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("tinycolor2"),o=require("./internal-context.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(n);const a={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","rabby_wallet","safe"]),s=e=>i.has(e),p=(e,t,n)=>n.indexOf(e)===t;const c=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(s).filter(p):e?e.filter(s).filter(p):a.appearance.walletList,m={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}},d={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0},u={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"}}},h={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},g={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"}}},f={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0},y={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1},b={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1},C={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"}}},E={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"}}},w={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},k={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"}}},v={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},S={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},x={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"}}},I=[m,d,S,C,E,w,k,v,y,{id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0},{id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}},{id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}},g,f,{id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0},{id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}},b,{id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0},u,h,x,{id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0},{id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0},{id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}},{id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}},{id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}}],A=new Set(I.map((e=>e.id)));let O="#FFFFFF";function T(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return l.default({...e.toHsl(),l:n})}function _({backgroundTheme:e,accentHex:t}){let n;switch(e){case"light":n=O;break;case"dark":n="#1E1E1D";break;default:n=e}let o=l.default(n),r=l.default(t),a=l.default("#51BA81"),i=l.default("#FFB74D"),s=l.default("#EC6351"),p=function(e){return e<.8&&e>.2&&console.warn("Background color is not light or dark enough, which could lead to accessibility issues."),e>.5?"light":"dark"}(o.getLuminance()),c=T(o,"light"===p?-.04:.11),m=T(o,"light"===p?-.88:.87),d=T(o,"light"===p?-.7:.75),u=T(o,"light"===p?-.43:.45).desaturate("light"===p?60:20),h=T(o,"light"===p?-.08:.25).desaturate("light"===p?60:20),g=T(r,.15),f=T(r,-.06),y=T(s,.3),b=T(i,.3),C=l.default(r.getLuminance()>.5?"#040217":O),E=T(a,-.16),w=T(a,.4);return{colorScheme:p,background:o.toHslString(),background2:c.toHslString(),foreground:m.toHslString(),foreground2:d.toHslString(),foreground3:u.toHslString(),foreground4:h.toHslString(),accent:r.toHslString(),accentLight:g.toHslString(),accentDark:f.toHslString(),foregroundAccent:C.toHslString(),success:a.toHslString(),successDark:E.toHslString(),successLight:w.toHslString(),error:s.toHslString(),errorLight:y.toHslString(),warn:i.toHslString(),warnLight:b.toHslString()}}function U(e,t,n){let o,r,l,i,s,p,m,d,u,h,g,f,y,b,E,w,k=n?console.warn:()=>{};t?.loginMethods?(o=t.loginMethods.includes("email"),r=t.loginMethods.includes("sms"),i=t.loginMethods.includes("wallet"),s=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),m=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),h=t.loginMethods.includes("instagram"),d=t.loginMethods.includes("tiktok"),f=t.loginMethods.includes("github"),g=t.loginMethods.includes("linkedin"),y=t.loginMethods.includes("apple"),b=t.loginMethods.includes("farcaster"),E=t.loginMethods.includes("telegram")):(o=e.emailAuth,r=e.smsAuth,i=e.walletAuth,s=e.googleOAuth,p=e.twitterOAuth,m=e.discordOAuth,f=e.githubOAuth,u=e.spotifyOAuth,h=e.instagramOAuth,d=e.tiktokOAuth,g=e.linkedinOAuth,y=e.appleOAuth,b=e.farcasterAuth,E=e.telegramAuth),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential?l=!1:e.passkeyAuth&&(l=!0);let v=[o,r].filter(Boolean),S=[s,p,m,f,u,h,d,g,y,b,E].filter(Boolean),x=[i].filter(Boolean);if(v.length+S.length+x.length===0)throw Error("You must enable at least one login method");let A=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;A&&0===x.length?(k("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),A=!1):A||S.length+v.length!==0||(k("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),A=!0);let O=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&k("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let T=c({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),U=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n 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(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let o of e.overflow??[])t.includes(o)||n.includes(o)?console.warn(`Duplicated login method: ${o}`):n.push(o);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),W=t?.intl?.defaultCountry??"US",{chains:L,defaultChain:M}=function({additionalChains:e,supportedChains:t,defaultChainFromConfig:n,hasRpcConfigDefined:o}){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&&o&&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=>e.rpcUrls.privyWalletOverride?e:I.find((t=>t.id===e.id))??e))}else r=I.concat(e??[]);let l=t?r[0]:C,a=n??l;if(!r.find((e=>e.id===a.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:r,defaultChain:a}}({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),P=!!t?.defaultChain,F=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,H=!(e.enforceWalletUis??1);if(w=e.legacyWalletUiConfig??1?F?t?.embeddedWallets?.noPromptOnSignature??!0:t?.embeddedWallets?.noPromptOnSignature??H:H,!1===t?.embeddedWallets?.waitForTransactionConfirmation&&!0!==w)throw Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:R,...D}=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??a.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:_({backgroundTheme:t?.appearance?.theme??a.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??a.appearance.accentColor}),loginGroupPriority:A?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:T,walletChainType:t?.appearance?.walletChainType??"ethereum-only"},loginMethods:{wallet:i,email:o,sms:r,passkey:l,google:s,twitter:p,discord:m,github:f,spotify:u,instagram:h,tiktok:d,linkedin:g,apple:y,farcaster:b,telegram:E},loginMethodsAndOrder:U,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??a.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??a.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??a.rpcConfig.rpcTimeouts},chains:L,defaultChain:M,intl:{defaultCountry:W},shouldEnforceDefaultChainOnConnect:P,captchaEnabled:e.captchaEnabled??a.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??a.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:O},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{...e.embeddedWalletConfig,..."boolean"==typeof R?{requireUserOwnedRecoveryOnCreate:R}:{},...F?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...D,noPromptOnSignature:w},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:F?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??a._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??a.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??a.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??a.fundingMethodConfig.moonpay.useSandbox}}}}let W={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 L=U(W,void 0,!1);let M=t.createContext({appConfig:L,isServerConfigLoaded:!1});const P=t.createContext({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:o.notImplemented,login:o.notImplemented,connectOrCreateWallet:o.notImplemented,linkEmail:o.notImplemented,linkPhone:o.notImplemented,linkFarcaster:o.notImplemented,linkWallet:o.notImplemented,startCrossAppAuthFlow:o.notImplemented,linkGoogle:o.notImplemented,linkTwitter:o.notImplemented,linkDiscord:o.notImplemented,linkGithub:o.notImplemented,linkSpotify:o.notImplemented,linkInstagram:o.notImplemented,linkTelegram:o.notImplemented,linkTiktok:o.notImplemented,linkLinkedIn:o.notImplemented,linkApple:o.notImplemented,linkPasskey:o.notImplemented,updateEmail:o.notImplemented,updatePhone:o.notImplemented,logout:o.notImplemented,getAccessToken:o.notImplemented,getEthereumProvider:o.notImplemented,getEthersProvider:o.notImplemented,getWeb3jsProvider:o.notImplemented,unlinkEmail:o.notImplemented,unlinkPhone:o.notImplemented,unlinkWallet:o.notImplemented,unlinkGoogle:o.notImplemented,unlinkTwitter:o.notImplemented,unlinkDiscord:o.notImplemented,unlinkGithub:o.notImplemented,unlinkSpotify:o.notImplemented,unlinkInstagram:o.notImplemented,unlinkTiktok:o.notImplemented,unlinkLinkedIn:o.notImplemented,unlinkApple:o.notImplemented,unlinkCrossAppAccount:o.notImplemented,unlinkFarcaster:o.notImplemented,unlinkTelegram:o.notImplemented,unlinkPasskey:o.notImplemented,setActiveWallet:o.notImplemented,forkSession:o.notImplemented,createWallet:o.notImplemented,importWallet:o.notImplemented,signMessage:o.notImplemented,signTypedData:o.notImplemented,enrollInMfa:o.notImplemented,initEnrollmentWithSms:o.notImplemented,initEnrollmentWithTotp:o.notImplemented,initEnrollmentWithPasskey:o.notImplemented,promptMfa:o.notImplemented,init:o.notImplemented,submitEnrollmentWithSms:o.notImplemented,submitEnrollmentWithTotp:o.notImplemented,submitEnrollmentWithPasskey:o.notImplemented,unenroll:o.notImplemented,submit:o.notImplemented,cancel:o.notImplemented,sendTransaction:o.notImplemented,sendSolanaTransaction:o.notImplemented,exportWallet:o.notImplemented,setWalletPassword:o.notImplemented,setWalletRecovery:o.notImplemented,requestFarcasterSignerFromWarpcast:o.notImplemented,getFarcasterSignerPublicKey:o.notImplemented,signFarcasterMessage:o.notImplemented,createGuestAccount:o.notImplemented,initLoginWithEmail:o.notImplemented,initLoginWithSms:o.notImplemented,otpState:{status:"initial"},loginWithCode:o.notImplemented,fundWallet:o.notImplemented,initLoginWithHeadlessOAuth:o.notImplemented,loginWithHeadlessOAuth:o.notImplemented,generateSiweMessage:o.notImplemented,linkWithSiwe:o.notImplemented,signMessageWithCrossAppWallet:o.notImplemented,signTypedDataWithCrossAppWallet:o.notImplemented,sendTransactionWithCrossAppWallet:o.notImplemented,isHeadlessOAuthLoading:!1,isModalOpen:!1,mfaMethods:[]}),F=t.createContext(null);exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CONNECTORS_STATE_KEY="privy:connectors",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_APP_CONFIG=L,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEFAULT_SUPPORTED_CHAINS=I,exports.DEFAULT_SUPPORTED_CHAIN_IDS=A,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.FORKED_TOKEN_STORAGE_KEY="privy:session_transfer_token",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PrivyAppConfigProvider=({children:n,legacyCreateEmbeddedWalletFlag:o,client:r,clientConfig:l})=>{let[a,i]=t.useState(null),s=t.useMemo((()=>U(a??W,l,!!a)),[a,l]);return t.useEffect((()=>{if(!a)return;let e=function(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:n,additionalChains:o,supportedChains:r,defaultChain:l,externalWallets:a,...i}=e;return{...i,...o?{additionalChains:o.map((e=>e.id))}:void 0,...r?{supportedChains:r.map((e=>e.id))}:void 0,...l?{defaultChain:l.id}:void 0,...a?{walletConnect:a.walletConnect,coinbaseWallet:a.coinbaseWallet,solana:{connectors:a.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0,legacyCreateEmbeddedWalletFlag:t}}(l,o),t=function(e,t=0){let n=3735928559^t,o=1103547991^t;for(let t,r=0;r<e.length;r++)n=Math.imul(n^(t=e.charCodeAt(r)),2654435761),o=Math.imul(o^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),4294967296*(2097151&(o=Math.imul(o^o>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${a.id}:${t}`;localStorage.getItem(n)||(r.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[l,o,a]),t.useEffect((()=>{a||(async()=>{try{let e=await r.getServerConfig();e.customApiUrl&&r.updateApiUrl(e.customApiUrl),i(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),e.jsx(M.Provider,{value:{appConfig:s,isServerConfigLoaded:!!a},children:n})},exports.PrivyContext=P,exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.TOKEN_COOKIE_KEY="privy-token",exports.TOKEN_STORAGE_KEY="privy:token",exports.UseWalletsContext=F,exports.VERSION="1.88.0-beta-20240926135515",exports.WALLET_PROXY_TIMEOUT=3e4,exports.arbitrum=m,exports.arbitrumSepolia=d,exports.avalanche=u,exports.avalancheFuji=h,exports.base=g,exports.baseSepolia=f,exports.celo=y,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.linea=b,exports.mainnet=C,exports.optimism=E,exports.optimismSepolia=w,exports.polygon=k,exports.polygonAmoy=v,exports.sepolia=S,exports.useAppConfig=()=>{let{appConfig:e}=t.useContext(M);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=t.useContext(M);return e},exports.usePrivy=()=>t.useContext(P),exports.useWallets=function(){let e=t.useContext(F);if(null===e)throw Error("`useWallets` was called outside the PrivyProvider component");return e},exports.zora=x;
@@ -16,7 +16,7 @@ import { Connection } from '@solana/web3.js';
16
16
  import { AbstractProvider } from 'web3-core';
17
17
  import { SupportedSolanaTransaction, SolanaTransactionReceipt } from './solana.js';
18
18
  export { UseSolanaWalletsInterface, useSolanaWallets } from './solana.js';
19
- import { SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse } from '@privy-io/public-api';
19
+ import { CustomMetadataType, SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse } from '@privy-io/public-api';
20
20
  import { FetchOptions } from 'ofetch';
21
21
  import '@metamask/eth-sig-util';
22
22
  import 'viem';
@@ -230,7 +230,7 @@ interface GetCurrentUserResponse {
230
230
  refresh_token_expires_in_seconds?: number;
231
231
  scopes?: string[];
232
232
  };
233
- custom_metadata?: Record<string, string>;
233
+ custom_metadata?: CustomMetadataType;
234
234
  }
235
235
 
236
236
  interface DefaultsType {
@@ -1829,7 +1829,7 @@ type UseLoginWithEmail = {
1829
1829
  * @returns loginWithCode - {@link loginWithCode} - logs a user in with a one-time-code, maximum 5 attempts.
1830
1830
  * @returns state - {@link OtpFlowState} - the current state of the login with Email flow.
1831
1831
  */
1832
- declare const useLoginWithEmail: () => UseLoginWithEmail;
1832
+ declare const useLoginWithEmail: (callbacks?: PrivyEvents["login"]) => UseLoginWithEmail;
1833
1833
 
1834
1834
  type UseLoginWithPasskey = {
1835
1835
  /**
@@ -1901,7 +1901,7 @@ type UseLoginWithSms = {
1901
1901
  * @returns loginWithCode - {@link loginWithCode} - logs a user in with a one-time-code, maximum 5 attempts.
1902
1902
  * @returns state - {@link OtpFlowState} - the current state of the login with Email flow.
1903
1903
  */
1904
- declare const useLoginWithSms: () => UseLoginWithSms;
1904
+ declare const useLoginWithSms: (callbacks?: PrivyEvents["login"]) => UseLoginWithSms;
1905
1905
 
1906
1906
  type UseLinkWithSiwe = {
1907
1907
  /**
@@ -1948,7 +1948,7 @@ type UseLinkWithSiwe = {
1948
1948
  * @returns generateSiweMessage - {@link generateSiweMessage} generates a SIWE message for a given EIP-55 wallet address and eip-155 chain ID.
1949
1949
  * @returns linkWithSiwe - {@link linkWithSiwe} - Links a wallet to a user via the signature created for the SIWE message.
1950
1950
  */
1951
- declare const useLinkWithSiwe: () => UseLinkWithSiwe;
1951
+ declare const useLinkWithSiwe: (callbacks?: PrivyEvents["linkAccount"]) => UseLinkWithSiwe;
1952
1952
 
1953
1953
  /**
1954
1954
  * Use this hook to register your app's logic for prompting users to complete MFA.
@@ -16,7 +16,7 @@ import { Connection } from '@solana/web3.js';
16
16
  import { AbstractProvider } from 'web3-core';
17
17
  import { SupportedSolanaTransaction, SolanaTransactionReceipt } from './solana.js';
18
18
  export { UseSolanaWalletsInterface, useSolanaWallets } from './solana.js';
19
- import { SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse } from '@privy-io/public-api';
19
+ import { CustomMetadataType, SmartWalletType, PrivyCoinbaseOnRampInitInput, PrivyCoinbaseOnRampInitResponse, PrivyCoinbaseOnRampStatusResponse } from '@privy-io/public-api';
20
20
  import { FetchOptions } from 'ofetch';
21
21
  import '@metamask/eth-sig-util';
22
22
  import 'viem';
@@ -230,7 +230,7 @@ interface GetCurrentUserResponse {
230
230
  refresh_token_expires_in_seconds?: number;
231
231
  scopes?: string[];
232
232
  };
233
- custom_metadata?: Record<string, string>;
233
+ custom_metadata?: CustomMetadataType;
234
234
  }
235
235
 
236
236
  interface DefaultsType {
@@ -1829,7 +1829,7 @@ type UseLoginWithEmail = {
1829
1829
  * @returns loginWithCode - {@link loginWithCode} - logs a user in with a one-time-code, maximum 5 attempts.
1830
1830
  * @returns state - {@link OtpFlowState} - the current state of the login with Email flow.
1831
1831
  */
1832
- declare const useLoginWithEmail: () => UseLoginWithEmail;
1832
+ declare const useLoginWithEmail: (callbacks?: PrivyEvents["login"]) => UseLoginWithEmail;
1833
1833
 
1834
1834
  type UseLoginWithPasskey = {
1835
1835
  /**
@@ -1901,7 +1901,7 @@ type UseLoginWithSms = {
1901
1901
  * @returns loginWithCode - {@link loginWithCode} - logs a user in with a one-time-code, maximum 5 attempts.
1902
1902
  * @returns state - {@link OtpFlowState} - the current state of the login with Email flow.
1903
1903
  */
1904
- declare const useLoginWithSms: () => UseLoginWithSms;
1904
+ declare const useLoginWithSms: (callbacks?: PrivyEvents["login"]) => UseLoginWithSms;
1905
1905
 
1906
1906
  type UseLinkWithSiwe = {
1907
1907
  /**
@@ -1948,7 +1948,7 @@ type UseLinkWithSiwe = {
1948
1948
  * @returns generateSiweMessage - {@link generateSiweMessage} generates a SIWE message for a given EIP-55 wallet address and eip-155 chain ID.
1949
1949
  * @returns linkWithSiwe - {@link linkWithSiwe} - Links a wallet to a user via the signature created for the SIWE message.
1950
1950
  */
1951
- declare const useLinkWithSiwe: () => UseLinkWithSiwe;
1951
+ declare const useLinkWithSiwe: (callbacks?: PrivyEvents["linkAccount"]) => UseLinkWithSiwe;
1952
1952
 
1953
1953
  /**
1954
1954
  * Use this hook to register your app's logic for prompting users to complete MFA.
@@ -1,7 +1,7 @@
1
1
  import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
2
2
  import { ExternalProvider, StaticJsonRpcProvider, Web3Provider } from '@ethersproject/providers';
3
3
  import EventEmitter from 'eventemitter3';
4
- import { PasskeyAuthenticateInputType, SmartWalletType } from '@privy-io/public-api';
4
+ import { PasskeyAuthenticateInputType, CustomMetadataType, SmartWalletType } from '@privy-io/public-api';
5
5
  import { Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
6
6
  import { ReactElement } from 'react';
7
7
  import { Hex } from 'viem';
@@ -1303,7 +1303,7 @@ interface User {
1303
1303
  /** Whether or not the user is a guest */
1304
1304
  isGuest: boolean;
1305
1305
  /** Custom metadata field for a given user account */
1306
- customMetadata?: Record<string, string>;
1306
+ customMetadata?: CustomMetadataType;
1307
1307
  }
1308
1308
  type OAuthTokens = {
1309
1309
  /** The OAuth provider. */
@@ -1,7 +1,7 @@
1
1
  import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
2
2
  import { ExternalProvider, StaticJsonRpcProvider, Web3Provider } from '@ethersproject/providers';
3
3
  import EventEmitter from 'eventemitter3';
4
- import { PasskeyAuthenticateInputType, SmartWalletType } from '@privy-io/public-api';
4
+ import { PasskeyAuthenticateInputType, CustomMetadataType, SmartWalletType } from '@privy-io/public-api';
5
5
  import { Adapter, WalletError, MessageSignerWalletAdapterProps, WalletAdapterProps, SignerWalletAdapterProps } from '@solana/wallet-adapter-base';
6
6
  import { ReactElement } from 'react';
7
7
  import { Hex } from 'viem';
@@ -1303,7 +1303,7 @@ interface User {
1303
1303
  /** Whether or not the user is a guest */
1304
1304
  isGuest: boolean;
1305
1305
  /** Custom metadata field for a given user account */
1306
- customMetadata?: Record<string, string>;
1306
+ customMetadata?: CustomMetadataType;
1307
1307
  }
1308
1308
  type OAuthTokens = {
1309
1309
  /** The OAuth provider. */