@privy-io/react-auth 3.6.0 → 3.6.1
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/EmbeddedWalletConnectingScreen-DmH8RMAY.js +27 -0
- package/dist/cjs/{SignRequestScreen-DBTM8mH6.js → SignRequestScreen-DELDI80-.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{events-context-B1SQ9SZZ.js → events-context-CJ1M8bnZ.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{smart-wallets-DS5H3O_R.js → smart-wallets-N48ncX_X.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/use-export-wallet-DT6dr7Z0.js +2 -0
- package/dist/cjs/{useActiveWallet-DSa22Ge3.js → useActiveWallet-u2yYoS5O.js} +1 -1
- package/dist/cjs/{usePrivy-BRFNEdKI.js → usePrivy-BiM8CWww.js} +1 -1
- package/dist/dts/{events-context-B1q54lAU.d.mts → events-context-CCElA92Y.d.mts} +1 -1
- package/dist/dts/{events-context-B1q54lAU.d.ts → events-context-CCElA92Y.d.ts} +1 -1
- package/dist/dts/extended-chains.d.mts +1 -1
- package/dist/dts/extended-chains.d.ts +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +4 -4
- package/dist/dts/index.d.ts +4 -4
- package/dist/dts/internal.d.mts +1 -1
- package/dist/dts/internal.d.ts +1 -1
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +3 -3
- package/dist/dts/solana.d.ts +3 -3
- package/dist/dts/{types-BSeKsLfK.d.mts → types-B6UNnZ2P.d.mts} +8 -1
- package/dist/dts/{types-BSeKsLfK.d.ts → types-B6UNnZ2P.d.ts} +8 -1
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-DTl397rT.mjs +25 -0
- package/dist/esm/{SignRequestScreen-B2NV0Hvv.mjs → SignRequestScreen-Ca9hEGyq.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/{events-context-DpXp5E_5.mjs → events-context-DGSLy4O3.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/index.mjs +6 -6
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{smart-wallets-X-vN2hVx.mjs → smart-wallets-p7WscfjP.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/use-export-wallet-CwTc9_pt.mjs +1 -0
- package/dist/esm/{useActiveWallet-6VCN4YGN.mjs → useActiveWallet-D2LLcdLS.mjs} +1 -1
- package/dist/esm/{usePrivy-DLA1ZqHR.mjs → usePrivy-BDEzTFuZ.mjs} +1 -1
- package/package.json +5 -4
- package/dist/cjs/EmbeddedWalletConnectingScreen-fhtSGmI2.js +0 -27
- package/dist/cjs/use-export-wallet-DPcrptkc.js +0 -2
- package/dist/esm/EmbeddedWalletConnectingScreen-DNdaS6u7.mjs +0 -25
- package/dist/esm/use-export-wallet-CPIcGGw7.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./internal-context-CeWKmK5u.js"),r=require("@privy-io/js-sdk-core"),t=require("react"),n=require("./EmbeddedWalletConnectingScreen-fhtSGmI2.js"),a=require("./events-context-B1SQ9SZZ.js");function i(e){let r=e.replace("eip155:","");if(r)return parseInt(r);throw Error("Chain ID not compatible with CAIP-2 format.")}const o=e=>e.filter((e=>"wallets"===e.method||("exchange"===e.method?"coinbase"===e.provider:"card"===e.method||"payment-request"===e.method?"coinbase"===e.provider||"moonpay"===e.provider:(e.method,!1)))),l={[r.mainnet.id]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[r.sepolia.id]:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",[r.optimism.id]:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",[r.optimismSepolia.id]:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",[r.polygon.id]:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",[r.polygonAmoy.id]:"0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",[r.base.id]:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",[r.baseSepolia.id]:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",[r.avalanche.id]:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",[r.avalancheFuji.id]:"0x5425890298aed601595a70ab815c96711a31bc65",[r.arbitrum.id]:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",[r.arbitrumSepolia.id]:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"};const d=e=>e.reduce(((e,r)=>!e||e.walletIndex<r.walletIndex?r:e),null),s=async({appConfig:r,getAccessToken:t,initializeWalletProxy:a,user:i,privy:o,emitPrivyEvent:l,recoverEmbeddedWallet:s,setModalData:u,openModal:p,setUser:E,options:f,timeoutDuration:h,refreshSessionAndUser:y,chainType:m})=>{let[v,g]=await Promise.all([a(h),t()]);if(!g||!i)throw l("createWallet","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");if(!v&&r.customAuth?.enabled)throw l("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");if(f&&"walletIndex"in f&&"number"==typeof f.walletIndex){if("user-controlled-server-wallets-only"===r.embeddedWallets.mode)throw l("createWallet","onError",e.PrivyErrorCode.INVALID_DATA),Error("Invalid input, use `createAdditional` instead of `walletIndex` to create additional wallets.");return c({accessToken:g,appConfig:r,privy:o,emitPrivyEvent:l,openModal:p,proxy:v,refreshSessionAndUser:y,recoverEmbeddedWallet:s,setModalData:u,user:i,walletIndex:f.walletIndex,chainType:m,setUser:E})}let C=f&&"createAdditional"in f&&f.createAdditional,w=n.getPrivyWalletsWithFilter(i,{chainType:m});if(w[0]&&!C)throw l("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_ALREADY_EXISTS),Error("User already has an embedded wallet.");return c({accessToken:g,appConfig:r,privy:o,emitPrivyEvent:l,openModal:p,proxy:v,recoverEmbeddedWallet:s,setModalData:u,user:i,walletIndex:(d(w)?.walletIndex??-1)+1,chainType:m,refreshSessionAndUser:y,setUser:E})};let c=async({accessToken:r,appConfig:t,privy:a,emitPrivyEvent:i,proxy:o,refreshSessionAndUser:l,recoverEmbeddedWallet:d,user:s,walletIndex:c,setModalData:p,openModal:E,chainType:f,setUser:h})=>{if(c<0)throw i("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_CREATE_ERROR),Error(`A negative walletIndex (${c}) is invalid.`);let y=n.getPrivyPrimaryWallet(s);if(c>0&&!y)throw i("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND),Error("Must have an existing embedded wallet to create an additional wallet.");if(t.embeddedWallets.requireUserOwnedRecoveryOnCreate&&"user-controlled-server-wallets-only"===t.embeddedWallets.mode)throw i("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_CREATE_ERROR),Error("User owned recovery not yet supported for this app.");if(!y&&t.embeddedWallets.requireUserOwnedRecoveryOnCreate)return await u({emitPrivyEvent:i,setModalData:p,openModal:E,chainType:f});let m=n.getPrivyWalletsWithFilter(s,{chainType:f,walletIndex:c})[0];if(m)return{user:s,account:m};if(0===c&&!o)return u({emitPrivyEvent:i,setModalData:p,openModal:E,chainType:f});if(!o)throw i("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");return n.createWalletAtIndex({appConfig:t,walletIndex:c,chainType:f,user:s,accessToken:r,proxy:o,refreshSessionAndUser:l,privy:a,recoverEmbeddedWallet:d,setUser:h})},u=async({emitPrivyEvent:r,setModalData:t,openModal:a,chainType:i})=>new Promise(((o,l)=>{t({createWallet:{onSuccess:({user:e,account:t})=>{r("createWallet","onSuccess",{wallet:t}),o({user:e,account:t})},onFailure:t=>{r("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),l(t)},callAuthOnSuccessOnClose:!1,shouldCreateEth:"ethereum"===i,shouldCreateSol:"solana"===i}}),a(n.EmbeddedWalletOnAccountCreateScreen)}));const p=()=>{let r=a.useAppConfig(),t=a.useEmitPrivyEvent(),{setModalData:i}=n.usePrivyModal(),{initializeWalletProxy:o,recoverEmbeddedWallet:l,setUser:d,openModal:c,refreshSessionAndUser:u,privy:p,client:E}=e.usePrivyInternal();return{create:async({chainType:n,options:f,latestUser:h})=>{let y=h;if(y||(y=await u()),!y)throw t("createWallet","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");return await s({appConfig:r,privy:p,getAccessToken:()=>E.getAccessToken(),refreshSessionAndUser:u,initializeWalletProxy:o,user:y,emitPrivyEvent:t,recoverEmbeddedWallet:l,setModalData:i,openModal:c,setUser:d,options:f,timeoutDuration:a.WALLET_PROXY_TIMEOUT,chainType:n})}}};function E(e){let{create:r}=p();return a.usePrivyEventSubscription("createWallet",e),{createWallet:async e=>{e&&"target"in e&&e&&(e=void 0);let{account:t}=await r({chainType:"ethereum",options:e});return t}}}const f=async({emitPrivyEvent:r,getAccessToken:t,initializeWalletProxy:a,refreshSessionAndUser:i,user:o,appConfig:l},{privateKey:d,chainType:s,additionalSigners:c})=>{if(!o)throw r("linkAccount","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new e.PrivyClientError("User must be authenticated before linking an account.");let u="user-controlled-server-wallets-only"===l.embeddedWallets.mode?"tee":"on-device";if(c&&"on-device"===u)throw new e.PrivyClientError("Specifying additionalSigners is only supported for TEE execution and this app uses On-device execution. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide");let[p,E]=await Promise.all([t(),a(15e3)]);if(!E||!p)throw r("linkAccount","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new e.PrivyClientError("User must be authenticated before linking an account.");let{address:f}=await E.importWallet({privateKey:d,accessToken:p,chainType:s,mode:u,additionalSigners:c}),h=await i(),y="solana"===s?n.getImportedPrivySolanaWallets(h):n.getImportedPrivyEthereumWallets(h),m=y?.find((e=>e.address===f));if(!m)throw r("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return r("createWallet","onSuccess",{wallet:m}),m},h=()=>{let{user:r}=n.usePrivyContext(),{client:i,refreshSessionAndUser:o,initializeWalletProxy:l}=e.usePrivyInternal(),d=a.useEmitPrivyEvent(),s=a.useAppConfig();return{importWallet:t.useCallback((({privateKey:e,additionalSigners:t})=>f({getAccessToken:()=>i.getAccessToken(),user:r,initializeWalletProxy:l,refreshSessionAndUser:o,emitPrivyEvent:d,appConfig:s},{privateKey:e,chainType:"ethereum",additionalSigners:t})),[r,i,o,l,d,s])}};exports.extractChainIdFromCAIP2=i,exports.filterSupportedOptions=o,exports.importWallet=f,exports.isFirstClassChainWallet=function(e){return["ethereum","solana"].includes(e.chainType)},exports.prepareFundingModalData=({address:r,appConfig:t,fundWalletConfig:n,methodScreen:a,chainIdOverride:d,comingFromSendTransactionScreen:s=!1})=>{let c,u;if(!t.fundingConfig)throw Error("Wallet funding is not enabled");let p=o(t.fundingConfig.options);if(p.length<1)throw Error("Wallet funding is not enabled");c=d||(n?.chain?n.chain.id:i(t.fundingConfig.defaultRecommendedCurrency.chain));let E=t.chains.find((e=>e.id===c));if(!E)throw new e.PrivyClientError(`Funding chain ${c} is not in PrivyProvider chains list`);let f=n?.amount??t.fundingConfig.defaultRecommendedAmount,h=!1;function y(){if(!c)return;let e=l[c];p.find((e=>"wallets"===e.method))&&!e&&console.warn("Attempting to fund with USDC on chain where USDC address is not known. Funding via external wallet will be disabled."),u=e,h=!0}n&&"asset"in n?"USDC"===n.asset?y():"string"!=typeof n.asset&&"erc20"in n.asset&&(h=((e,r)=>e===l[r.id])(u=n.asset.erc20,E)):"USDC"===t.fundingConfig.defaultRecommendedCurrency.asset&&y();let m=n?.defaultFundingMethod;return{chainType:"ethereum",address:r,amount:f,chain:E,erc20Address:u,erc20ContractInfo:h?{symbol:"USDC",decimals:6}:void 0,isUSDC:h,methodScreen:a,supportedOptions:p,comingFromSendTransactionScreen:s,defaultFundingMethod:m,usingDefaultFundingMethod:!!m,preferredCardProvider:n?.card?.preferredProvider,crossChainBridgingEnabled:t.fundingConfig.crossChainBridgingEnabled??!1,solanaChain:"solana:mainnet",uiConfig:n&&"uiConfig"in n?n.uiConfig:void 0,externalSolanaFundingScreen:null}},exports.prepareSolanaFundingModalData=function({address:e,fundWalletConfig:r,appConfig:t,comingFromSendTransactionScreen:n,externalSolanaFundingScreen:a,methodScreen:i}){if(!t.fundingConfig)throw Error("Wallet funding is not enabled");let l=o(t.fundingConfig.options);if(l.length<1)throw Error("Wallet funding is not enabled");if("USDC"===r?.asset&&"solana:testnet"===r?.chain)throw Error("USDC funding is not supported on the Solana testnet");let d=r?.amount??t.fundingConfig.defaultRecommendedAmount,s=r?.defaultFundingMethod;return{chainType:"solana",address:e,supportedOptions:l,amount:d,isUSDC:"USDC"===r?.asset,methodScreen:i,comingFromSendTransactionScreen:n,chain:r?.chain||"solana:mainnet",crossChainBridgingEnabled:t.fundingConfig.crossChainBridgingEnabled??!1,defaultFundingMethod:s,preferredCardProvider:r?.card?.preferredProvider,usingDefaultFundingMethod:!!s,uiConfig:r?.uiConfig,externalSolanaFundingScreen:a}},exports.useCreateWallet=E,exports.useCreateWalletInternal=p,exports.useImportWallet=h,exports.usePrivy=()=>{let{importWallet:e}=h(),{createWallet:r}=E();return{...t.useContext(n.PrivyContext),importWallet:e,createWallet:r}};
|
|
1
|
+
"use strict";var e=require("./internal-context-CeWKmK5u.js"),r=require("@privy-io/js-sdk-core"),t=require("react"),n=require("./EmbeddedWalletConnectingScreen-DmH8RMAY.js"),a=require("./events-context-CJ1M8bnZ.js");function i(e){let r=e.replace("eip155:","");if(r)return parseInt(r);throw Error("Chain ID not compatible with CAIP-2 format.")}const o=e=>e.filter((e=>"wallets"===e.method||("exchange"===e.method?"coinbase"===e.provider:"card"===e.method||"payment-request"===e.method?"coinbase"===e.provider||"moonpay"===e.provider:(e.method,!1)))),l={[r.mainnet.id]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[r.sepolia.id]:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",[r.optimism.id]:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",[r.optimismSepolia.id]:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",[r.polygon.id]:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",[r.polygonAmoy.id]:"0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",[r.base.id]:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",[r.baseSepolia.id]:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",[r.avalanche.id]:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",[r.avalancheFuji.id]:"0x5425890298aed601595a70ab815c96711a31bc65",[r.arbitrum.id]:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",[r.arbitrumSepolia.id]:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"};const d=e=>e.reduce(((e,r)=>!e||e.walletIndex<r.walletIndex?r:e),null),s=async({appConfig:r,getAccessToken:t,initializeWalletProxy:a,user:i,privy:o,emitPrivyEvent:l,recoverEmbeddedWallet:s,setModalData:u,openModal:p,setUser:E,options:f,timeoutDuration:h,refreshSessionAndUser:y,chainType:m})=>{let[v,g]=await Promise.all([a(h),t()]);if(!g||!i)throw l("createWallet","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");if(!v&&r.customAuth?.enabled)throw l("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");if(f&&"walletIndex"in f&&"number"==typeof f.walletIndex){if("user-controlled-server-wallets-only"===r.embeddedWallets.mode)throw l("createWallet","onError",e.PrivyErrorCode.INVALID_DATA),Error("Invalid input, use `createAdditional` instead of `walletIndex` to create additional wallets.");return c({accessToken:g,appConfig:r,privy:o,emitPrivyEvent:l,openModal:p,proxy:v,refreshSessionAndUser:y,recoverEmbeddedWallet:s,setModalData:u,user:i,walletIndex:f.walletIndex,chainType:m,setUser:E})}let C=f&&"createAdditional"in f&&f.createAdditional,w=n.getPrivyWalletsWithFilter(i,{chainType:m});if(w[0]&&!C)throw l("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_ALREADY_EXISTS),Error("User already has an embedded wallet.");return c({accessToken:g,appConfig:r,privy:o,emitPrivyEvent:l,openModal:p,proxy:v,recoverEmbeddedWallet:s,setModalData:u,user:i,walletIndex:(d(w)?.walletIndex??-1)+1,chainType:m,refreshSessionAndUser:y,setUser:E})};let c=async({accessToken:r,appConfig:t,privy:a,emitPrivyEvent:i,proxy:o,refreshSessionAndUser:l,recoverEmbeddedWallet:d,user:s,walletIndex:c,setModalData:p,openModal:E,chainType:f,setUser:h})=>{if(c<0)throw i("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_CREATE_ERROR),Error(`A negative walletIndex (${c}) is invalid.`);let y=n.getPrivyPrimaryWallet(s);if(c>0&&!y)throw i("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND),Error("Must have an existing embedded wallet to create an additional wallet.");if(t.embeddedWallets.requireUserOwnedRecoveryOnCreate&&"user-controlled-server-wallets-only"===t.embeddedWallets.mode)throw i("createWallet","onError",e.PrivyErrorCode.EMBEDDED_WALLET_CREATE_ERROR),Error("User owned recovery not yet supported for this app.");if(!y&&t.embeddedWallets.requireUserOwnedRecoveryOnCreate)return await u({emitPrivyEvent:i,setModalData:p,openModal:E,chainType:f});let m=n.getPrivyWalletsWithFilter(s,{chainType:f,walletIndex:c})[0];if(m)return{user:s,account:m};if(0===c&&!o)return u({emitPrivyEvent:i,setModalData:p,openModal:E,chainType:f});if(!o)throw i("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to connect to wallet proxy");return n.createWalletAtIndex({appConfig:t,walletIndex:c,chainType:f,user:s,accessToken:r,proxy:o,refreshSessionAndUser:l,privy:a,recoverEmbeddedWallet:d,setUser:h})},u=async({emitPrivyEvent:r,setModalData:t,openModal:a,chainType:i})=>new Promise(((o,l)=>{t({createWallet:{onSuccess:({user:e,account:t})=>{r("createWallet","onSuccess",{wallet:t}),o({user:e,account:t})},onFailure:t=>{r("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),l(t)},callAuthOnSuccessOnClose:!1,shouldCreateEth:"ethereum"===i,shouldCreateSol:"solana"===i}}),a(n.EmbeddedWalletOnAccountCreateScreen)}));const p=()=>{let r=a.useAppConfig(),t=a.useEmitPrivyEvent(),{setModalData:i}=n.usePrivyModal(),{initializeWalletProxy:o,recoverEmbeddedWallet:l,setUser:d,openModal:c,refreshSessionAndUser:u,privy:p,client:E}=e.usePrivyInternal();return{create:async({chainType:n,options:f,latestUser:h})=>{let y=h;if(y||(y=await u()),!y)throw t("createWallet","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED),Error("User must be authenticated before creating a Privy wallet");return await s({appConfig:r,privy:p,getAccessToken:()=>E.getAccessToken(),refreshSessionAndUser:u,initializeWalletProxy:o,user:y,emitPrivyEvent:t,recoverEmbeddedWallet:l,setModalData:i,openModal:c,setUser:d,options:f,timeoutDuration:a.WALLET_PROXY_TIMEOUT,chainType:n})}}};function E(e){let{create:r}=p();return a.usePrivyEventSubscription("createWallet",e),{createWallet:async e=>{e&&"target"in e&&e&&(e=void 0);let{account:t}=await r({chainType:"ethereum",options:e});return t}}}const f=async({emitPrivyEvent:r,getAccessToken:t,initializeWalletProxy:a,refreshSessionAndUser:i,user:o,appConfig:l},{privateKey:d,chainType:s,additionalSigners:c})=>{if(!o)throw r("linkAccount","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new e.PrivyClientError("User must be authenticated before linking an account.");let u="user-controlled-server-wallets-only"===l.embeddedWallets.mode?"tee":"on-device";if(c&&"on-device"===u)throw new e.PrivyClientError("Specifying additionalSigners is only supported for TEE execution and this app uses On-device execution. Learn more https://docs.privy.io/recipes/tee-wallet-migration-guide");let[p,E]=await Promise.all([t(),a(15e3)]);if(!E||!p)throw r("linkAccount","onError",e.PrivyErrorCode.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new e.PrivyClientError("User must be authenticated before linking an account.");let{address:f}=await E.importWallet({privateKey:d,accessToken:p,chainType:s,mode:u,additionalSigners:c}),h=await i(),y="solana"===s?n.getImportedPrivySolanaWallets(h):n.getImportedPrivyEthereumWallets(h),m=y?.find((e=>e.address===f));if(!m)throw r("createWallet","onError",e.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return r("createWallet","onSuccess",{wallet:m}),m},h=()=>{let{user:r}=n.usePrivyContext(),{client:i,refreshSessionAndUser:o,initializeWalletProxy:l}=e.usePrivyInternal(),d=a.useEmitPrivyEvent(),s=a.useAppConfig();return{importWallet:t.useCallback((({privateKey:e,additionalSigners:t})=>f({getAccessToken:()=>i.getAccessToken(),user:r,initializeWalletProxy:l,refreshSessionAndUser:o,emitPrivyEvent:d,appConfig:s},{privateKey:e,chainType:"ethereum",additionalSigners:t})),[r,i,o,l,d,s])}};exports.extractChainIdFromCAIP2=i,exports.filterSupportedOptions=o,exports.importWallet=f,exports.isFirstClassChainWallet=function(e){return["ethereum","solana"].includes(e.chainType)},exports.prepareFundingModalData=({address:r,appConfig:t,fundWalletConfig:n,methodScreen:a,chainIdOverride:d,comingFromSendTransactionScreen:s=!1})=>{let c,u;if(!t.fundingConfig)throw Error("Wallet funding is not enabled");let p=o(t.fundingConfig.options);if(p.length<1)throw Error("Wallet funding is not enabled");c=d||(n?.chain?n.chain.id:i(t.fundingConfig.defaultRecommendedCurrency.chain));let E=t.chains.find((e=>e.id===c));if(!E)throw new e.PrivyClientError(`Funding chain ${c} is not in PrivyProvider chains list`);let f=n?.amount??t.fundingConfig.defaultRecommendedAmount,h=!1;function y(){if(!c)return;let e=l[c];p.find((e=>"wallets"===e.method))&&!e&&console.warn("Attempting to fund with USDC on chain where USDC address is not known. Funding via external wallet will be disabled."),u=e,h=!0}n&&"asset"in n?"USDC"===n.asset?y():"string"!=typeof n.asset&&"erc20"in n.asset&&(h=((e,r)=>e===l[r.id])(u=n.asset.erc20,E)):"USDC"===t.fundingConfig.defaultRecommendedCurrency.asset&&y();let m=n?.defaultFundingMethod;return{chainType:"ethereum",address:r,amount:f,chain:E,erc20Address:u,erc20ContractInfo:h?{symbol:"USDC",decimals:6}:void 0,isUSDC:h,methodScreen:a,supportedOptions:p,comingFromSendTransactionScreen:s,defaultFundingMethod:m,usingDefaultFundingMethod:!!m,preferredCardProvider:n?.card?.preferredProvider,crossChainBridgingEnabled:t.fundingConfig.crossChainBridgingEnabled??!1,solanaChain:"solana:mainnet",uiConfig:n&&"uiConfig"in n?n.uiConfig:void 0,externalSolanaFundingScreen:null}},exports.prepareSolanaFundingModalData=function({address:e,fundWalletConfig:r,appConfig:t,comingFromSendTransactionScreen:n,externalSolanaFundingScreen:a,methodScreen:i}){if(!t.fundingConfig)throw Error("Wallet funding is not enabled");let l=o(t.fundingConfig.options);if(l.length<1)throw Error("Wallet funding is not enabled");if("USDC"===r?.asset&&"solana:testnet"===r?.chain)throw Error("USDC funding is not supported on the Solana testnet");let d=r?.amount??t.fundingConfig.defaultRecommendedAmount,s=r?.defaultFundingMethod;return{chainType:"solana",address:e,supportedOptions:l,amount:d,isUSDC:"USDC"===r?.asset,methodScreen:i,comingFromSendTransactionScreen:n,chain:r?.chain||"solana:mainnet",crossChainBridgingEnabled:t.fundingConfig.crossChainBridgingEnabled??!1,defaultFundingMethod:s,preferredCardProvider:r?.card?.preferredProvider,usingDefaultFundingMethod:!!s,uiConfig:r?.uiConfig,externalSolanaFundingScreen:a}},exports.useCreateWallet=E,exports.useCreateWalletInternal=p,exports.useImportWallet=h,exports.usePrivy=()=>{let{importWallet:e}=h(),{createWallet:r}=E();return{...t.useContext(n.PrivyContext),importWallet:e,createWallet:r}};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
2
|
-
import { U as User, L as LoginMethod, a as LinkedAccountWithMetadata, P as PrivyErrorCode, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, O as OAuthTokens, F as FundingMethod, S as SolanaChain } from './types-
|
|
2
|
+
import { U as User, L as LoginMethod, a as LinkedAccountWithMetadata, P as PrivyErrorCode, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, O as OAuthTokens, F as FundingMethod, S as SolanaChain } from './types-B6UNnZ2P.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `CallbackError` optionally includes a second parameter with further error details.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
2
|
-
import { U as User, L as LoginMethod, a as LinkedAccountWithMetadata, P as PrivyErrorCode, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, O as OAuthTokens, F as FundingMethod, S as SolanaChain } from './types-
|
|
2
|
+
import { U as User, L as LoginMethod, a as LinkedAccountWithMetadata, P as PrivyErrorCode, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, O as OAuthTokens, F as FundingMethod, S as SolanaChain } from './types-B6UNnZ2P.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `CallbackError` optionally includes a second parameter with further error details.
|
package/dist/dts/farcaster.d.mts
CHANGED
package/dist/dts/farcaster.d.ts
CHANGED
package/dist/dts/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { MouseEvent } from 'react';
|
|
3
|
-
import { k as MfaSubmitArgs, c as UserRecoveryMethod, g as SessionSignerInput, E as EthereumRpcRequestType, l as SolanaRpcRequestType, m as EthereumRpcResponseType, n as SolanaRpcResponseType, o as PrivyFarcasterSignerInitResponse, p as EIP1193Provider, q as EntropyIdVerifier$1, H as HDWalletWithMetadata, r as RequestArguments, s as WalletConnector, B as BaseConnectedEthereumWallet, u as PrivyProxyProvider, v as WalletClientType, w as ConnectedWalletMetadata, x as PrivyClientConfig, y as ConnectorType, z as SetBaseAccountSdkType, A as WalletListEntry, D as AppConfig, G as BaseConnectedWallet, j as SolanaWalletConnector, U as User, I as ConnectWalletModalOptions, J as LoginModalOptions, C as CreateWalletOptions, W as Wallet, K as SetWalletRecoveryOptions, f as SignMessageModalUIOptions, N as SignTypedDataParams, M as MfaMethod, Q as UnsignedTransactionRequest, e as SendTransactionModalUIOptions, T as FundWalletConfig, V as ConnectedWallet, O as OAuthTokens, X as CrossAppProviderDetails, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, $ as SiwsMessageType, L as LoginMethod, a0 as ExternalWalletMetadata, a1 as TelegramAuthResult, a2 as TelegramWebAppData, a3 as OAuthUserInfo, a4 as OAuthFlowState, a5 as LoginWithCode, a6 as OtpFlowState, a7 as PasskeyFlowState, a8 as SiweFlowState, a as LinkedAccountWithMetadata, a9 as BaseAccountSdkType, aa as UnsignedTransactionRequestWithChainId, ab as BaseConnectedWalletType, b as BaseConnectedSolanaWallet, ac as TelegramAuthFlowState } from './types-
|
|
4
|
-
export { au as Apple, aH as AppleOAuthWithMetadata, aP as ContractUIOptions, ay as CrossAppAccount, aK as CrossAppAccountWithMetadata, ar as Discord, aC as DiscordOAuthWithMetadata, aM as Email, am as EmailWithMetadata, aS as Farcaster, aI as FarcasterWithMetadata, as as Github, aD as GithubOAuthWithMetadata, ap as Google, aA as GoogleOAuthWithMetadata, aw as Line, aF as LineOAuthWithMetadata, az as LinkedAccountType, at as LinkedIn, aG as LinkedInOAuthWithMetadata, aU as LoginMethodOrderOption, ae as MessageTypes, ag as MoonpayCurrencyCode, ah as MoonpayPaymentMethod, aQ as NativeFundingConfig, al as NonEmptyArray, aT as Passkey, aL as PasskeyWithMetadata, aN as Phone, an as PhoneWithMetadata, aR as PriceDisplayOptions, P as PrivyErrorCode, aW as PrivyI18nStrings, ai as Quantity, aV as SiwsFlowState, af as SmartWallet, ax as Telegram, aJ as TelegramWithMetadata, av as Tiktok, aE as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aO as TransactionUIOptions, aq as Twitter, aB as TwitterOAuthWithMetadata, ad as TypedMessage, ao as WalletWithMetadata } from './types-
|
|
3
|
+
import { k as MfaSubmitArgs, c as UserRecoveryMethod, g as SessionSignerInput, E as EthereumRpcRequestType, l as SolanaRpcRequestType, m as EthereumRpcResponseType, n as SolanaRpcResponseType, o as PrivyFarcasterSignerInitResponse, p as EIP1193Provider, q as EntropyIdVerifier$1, H as HDWalletWithMetadata, r as RequestArguments, s as WalletConnector, B as BaseConnectedEthereumWallet, u as PrivyProxyProvider, v as WalletClientType, w as ConnectedWalletMetadata, x as PrivyClientConfig, y as ConnectorType, z as SetBaseAccountSdkType, A as WalletListEntry, D as AppConfig, G as BaseConnectedWallet, j as SolanaWalletConnector, U as User, I as ConnectWalletModalOptions, J as LoginModalOptions, C as CreateWalletOptions, W as Wallet, K as SetWalletRecoveryOptions, f as SignMessageModalUIOptions, N as SignTypedDataParams, M as MfaMethod, Q as UnsignedTransactionRequest, e as SendTransactionModalUIOptions, T as FundWalletConfig, V as ConnectedWallet, O as OAuthTokens, X as CrossAppProviderDetails, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, $ as SiwsMessageType, L as LoginMethod, a0 as ExternalWalletMetadata, a1 as TelegramAuthResult, a2 as TelegramWebAppData, a3 as OAuthUserInfo, a4 as OAuthFlowState, a5 as LoginWithCode, a6 as OtpFlowState, a7 as PasskeyFlowState, a8 as SiweFlowState, a as LinkedAccountWithMetadata, a9 as BaseAccountSdkType, aa as UnsignedTransactionRequestWithChainId, ab as BaseConnectedWalletType, b as BaseConnectedSolanaWallet, ac as TelegramAuthFlowState } from './types-B6UNnZ2P.js';
|
|
4
|
+
export { au as Apple, aH as AppleOAuthWithMetadata, aP as ContractUIOptions, ay as CrossAppAccount, aK as CrossAppAccountWithMetadata, ar as Discord, aC as DiscordOAuthWithMetadata, aM as Email, am as EmailWithMetadata, aS as Farcaster, aI as FarcasterWithMetadata, as as Github, aD as GithubOAuthWithMetadata, ap as Google, aA as GoogleOAuthWithMetadata, aw as Line, aF as LineOAuthWithMetadata, az as LinkedAccountType, at as LinkedIn, aG as LinkedInOAuthWithMetadata, aU as LoginMethodOrderOption, ae as MessageTypes, ag as MoonpayCurrencyCode, ah as MoonpayPaymentMethod, aQ as NativeFundingConfig, al as NonEmptyArray, aT as Passkey, aL as PasskeyWithMetadata, aN as Phone, an as PhoneWithMetadata, aR as PriceDisplayOptions, P as PrivyErrorCode, aW as PrivyI18nStrings, ai as Quantity, aV as SiwsFlowState, af as SmartWallet, ax as Telegram, aJ as TelegramWithMetadata, av as Tiktok, aE as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aO as TransactionUIOptions, aq as Twitter, aB as TwitterOAuthWithMetadata, ad as TypedMessage, ao as WalletWithMetadata } from './types-B6UNnZ2P.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import EventEmitter from 'eventemitter3';
|
|
@@ -15,8 +15,8 @@ import { Address, HttpTransport, Hex } from 'viem';
|
|
|
15
15
|
import * as _simplewebauthn_browser from '@simplewebauthn/browser';
|
|
16
16
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/browser';
|
|
17
17
|
import { FetchOptions } from 'ofetch';
|
|
18
|
-
import { P as PrivyEvents } from './events-context-
|
|
19
|
-
export { C as CallbackError } from './events-context-
|
|
18
|
+
import { P as PrivyEvents } from './events-context-CCElA92Y.js';
|
|
19
|
+
export { C as CallbackError } from './events-context-CCElA92Y.js';
|
|
20
20
|
import * as viem_accounts from 'viem/accounts';
|
|
21
21
|
import '@coinbase/wallet-sdk';
|
|
22
22
|
import '@solana/kit';
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { MouseEvent } from 'react';
|
|
3
|
-
import { k as MfaSubmitArgs, c as UserRecoveryMethod, g as SessionSignerInput, E as EthereumRpcRequestType, l as SolanaRpcRequestType, m as EthereumRpcResponseType, n as SolanaRpcResponseType, o as PrivyFarcasterSignerInitResponse, p as EIP1193Provider, q as EntropyIdVerifier$1, H as HDWalletWithMetadata, r as RequestArguments, s as WalletConnector, B as BaseConnectedEthereumWallet, u as PrivyProxyProvider, v as WalletClientType, w as ConnectedWalletMetadata, x as PrivyClientConfig, y as ConnectorType, z as SetBaseAccountSdkType, A as WalletListEntry, D as AppConfig, G as BaseConnectedWallet, j as SolanaWalletConnector, U as User, I as ConnectWalletModalOptions, J as LoginModalOptions, C as CreateWalletOptions, W as Wallet, K as SetWalletRecoveryOptions, f as SignMessageModalUIOptions, N as SignTypedDataParams, M as MfaMethod, Q as UnsignedTransactionRequest, e as SendTransactionModalUIOptions, T as FundWalletConfig, V as ConnectedWallet, O as OAuthTokens, X as CrossAppProviderDetails, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, $ as SiwsMessageType, L as LoginMethod, a0 as ExternalWalletMetadata, a1 as TelegramAuthResult, a2 as TelegramWebAppData, a3 as OAuthUserInfo, a4 as OAuthFlowState, a5 as LoginWithCode, a6 as OtpFlowState, a7 as PasskeyFlowState, a8 as SiweFlowState, a as LinkedAccountWithMetadata, a9 as BaseAccountSdkType, aa as UnsignedTransactionRequestWithChainId, ab as BaseConnectedWalletType, b as BaseConnectedSolanaWallet, ac as TelegramAuthFlowState } from './types-
|
|
4
|
-
export { au as Apple, aH as AppleOAuthWithMetadata, aP as ContractUIOptions, ay as CrossAppAccount, aK as CrossAppAccountWithMetadata, ar as Discord, aC as DiscordOAuthWithMetadata, aM as Email, am as EmailWithMetadata, aS as Farcaster, aI as FarcasterWithMetadata, as as Github, aD as GithubOAuthWithMetadata, ap as Google, aA as GoogleOAuthWithMetadata, aw as Line, aF as LineOAuthWithMetadata, az as LinkedAccountType, at as LinkedIn, aG as LinkedInOAuthWithMetadata, aU as LoginMethodOrderOption, ae as MessageTypes, ag as MoonpayCurrencyCode, ah as MoonpayPaymentMethod, aQ as NativeFundingConfig, al as NonEmptyArray, aT as Passkey, aL as PasskeyWithMetadata, aN as Phone, an as PhoneWithMetadata, aR as PriceDisplayOptions, P as PrivyErrorCode, aW as PrivyI18nStrings, ai as Quantity, aV as SiwsFlowState, af as SmartWallet, ax as Telegram, aJ as TelegramWithMetadata, av as Tiktok, aE as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aO as TransactionUIOptions, aq as Twitter, aB as TwitterOAuthWithMetadata, ad as TypedMessage, ao as WalletWithMetadata } from './types-
|
|
3
|
+
import { k as MfaSubmitArgs, c as UserRecoveryMethod, g as SessionSignerInput, E as EthereumRpcRequestType, l as SolanaRpcRequestType, m as EthereumRpcResponseType, n as SolanaRpcResponseType, o as PrivyFarcasterSignerInitResponse, p as EIP1193Provider, q as EntropyIdVerifier$1, H as HDWalletWithMetadata, r as RequestArguments, s as WalletConnector, B as BaseConnectedEthereumWallet, u as PrivyProxyProvider, v as WalletClientType, w as ConnectedWalletMetadata, x as PrivyClientConfig, y as ConnectorType, z as SetBaseAccountSdkType, A as WalletListEntry, D as AppConfig, G as BaseConnectedWallet, j as SolanaWalletConnector, U as User, I as ConnectWalletModalOptions, J as LoginModalOptions, C as CreateWalletOptions, W as Wallet, K as SetWalletRecoveryOptions, f as SignMessageModalUIOptions, N as SignTypedDataParams, M as MfaMethod, Q as UnsignedTransactionRequest, e as SendTransactionModalUIOptions, T as FundWalletConfig, V as ConnectedWallet, O as OAuthTokens, X as CrossAppProviderDetails, Y as MoonpaySignRequest, Z as MoonpaySignResponse, _ as SmartWalletConfig, $ as SiwsMessageType, L as LoginMethod, a0 as ExternalWalletMetadata, a1 as TelegramAuthResult, a2 as TelegramWebAppData, a3 as OAuthUserInfo, a4 as OAuthFlowState, a5 as LoginWithCode, a6 as OtpFlowState, a7 as PasskeyFlowState, a8 as SiweFlowState, a as LinkedAccountWithMetadata, a9 as BaseAccountSdkType, aa as UnsignedTransactionRequestWithChainId, ab as BaseConnectedWalletType, b as BaseConnectedSolanaWallet, ac as TelegramAuthFlowState } from './types-B6UNnZ2P.js';
|
|
4
|
+
export { au as Apple, aH as AppleOAuthWithMetadata, aP as ContractUIOptions, ay as CrossAppAccount, aK as CrossAppAccountWithMetadata, ar as Discord, aC as DiscordOAuthWithMetadata, aM as Email, am as EmailWithMetadata, aS as Farcaster, aI as FarcasterWithMetadata, as as Github, aD as GithubOAuthWithMetadata, ap as Google, aA as GoogleOAuthWithMetadata, aw as Line, aF as LineOAuthWithMetadata, az as LinkedAccountType, at as LinkedIn, aG as LinkedInOAuthWithMetadata, aU as LoginMethodOrderOption, ae as MessageTypes, ag as MoonpayCurrencyCode, ah as MoonpayPaymentMethod, aQ as NativeFundingConfig, al as NonEmptyArray, aT as Passkey, aL as PasskeyWithMetadata, aN as Phone, an as PhoneWithMetadata, aR as PriceDisplayOptions, P as PrivyErrorCode, aW as PrivyI18nStrings, ai as Quantity, aV as SiwsFlowState, af as SmartWallet, ax as Telegram, aJ as TelegramWithMetadata, av as Tiktok, aE as TiktokOAuthWithMetadata, aj as TransactionLog, ak as TransactionReceipt, aO as TransactionUIOptions, aq as Twitter, aB as TwitterOAuthWithMetadata, ad as TypedMessage, ao as WalletWithMetadata } from './types-B6UNnZ2P.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import EventEmitter from 'eventemitter3';
|
|
@@ -15,8 +15,8 @@ import { Address, HttpTransport, Hex } from 'viem';
|
|
|
15
15
|
import * as _simplewebauthn_browser from '@simplewebauthn/browser';
|
|
16
16
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/browser';
|
|
17
17
|
import { FetchOptions } from 'ofetch';
|
|
18
|
-
import { P as PrivyEvents } from './events-context-
|
|
19
|
-
export { C as CallbackError } from './events-context-
|
|
18
|
+
import { P as PrivyEvents } from './events-context-CCElA92Y.js';
|
|
19
|
+
export { C as CallbackError } from './events-context-CCElA92Y.js';
|
|
20
20
|
import * as viem_accounts from 'viem/accounts';
|
|
21
21
|
import '@coinbase/wallet-sdk';
|
|
22
22
|
import '@solana/kit';
|
package/dist/dts/internal.d.mts
CHANGED
package/dist/dts/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import { e as SendTransactionModalUIOptions, f as SignMessageModalUIOptions } from './types-
|
|
3
|
+
import { e as SendTransactionModalUIOptions, f as SignMessageModalUIOptions } from './types-B6UNnZ2P.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { EIP1193Provider, Chain, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema, SendTransactionParameters, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters } from 'viem';
|
|
6
6
|
import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import { e as SendTransactionModalUIOptions, f as SignMessageModalUIOptions } from './types-
|
|
3
|
+
import { e as SendTransactionModalUIOptions, f as SignMessageModalUIOptions } from './types-B6UNnZ2P.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { EIP1193Provider, Chain, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema, SendTransactionParameters, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters } from 'viem';
|
|
6
6
|
import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
|
package/dist/dts/solana.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { g as SessionSignerInput, W as Wallet, f as SignMessageModalUIOptions, S as SolanaChain, h as SolanaStandardWallet, C as CreateWalletOptions, e as SendTransactionModalUIOptions, i as SolanaFundingConfig } from './types-
|
|
2
|
-
export { j as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-
|
|
1
|
+
import { g as SessionSignerInput, W as Wallet, f as SignMessageModalUIOptions, S as SolanaChain, h as SolanaStandardWallet, C as CreateWalletOptions, e as SendTransactionModalUIOptions, i as SolanaFundingConfig } from './types-B6UNnZ2P.js';
|
|
2
|
+
export { j as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-B6UNnZ2P.js';
|
|
3
3
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
4
4
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
5
5
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import { SolanaSignAndSendTransactionOptions, SolanaSignTransactionOptions, ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
8
8
|
export { ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
9
|
-
import { P as PrivyEvents } from './events-context-
|
|
9
|
+
import { P as PrivyEvents } from './events-context-CCElA92Y.js';
|
|
10
10
|
import '@coinbase/wallet-sdk';
|
|
11
11
|
import '@simplewebauthn/browser';
|
|
12
12
|
import '@solana/kit';
|
package/dist/dts/solana.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { g as SessionSignerInput, W as Wallet, f as SignMessageModalUIOptions, S as SolanaChain, h as SolanaStandardWallet, C as CreateWalletOptions, e as SendTransactionModalUIOptions, i as SolanaFundingConfig } from './types-
|
|
2
|
-
export { j as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-
|
|
1
|
+
import { g as SessionSignerInput, W as Wallet, f as SignMessageModalUIOptions, S as SolanaChain, h as SolanaStandardWallet, C as CreateWalletOptions, e as SendTransactionModalUIOptions, i as SolanaFundingConfig } from './types-B6UNnZ2P.js';
|
|
2
|
+
export { j as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-B6UNnZ2P.js';
|
|
3
3
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
4
4
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
5
5
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import { SolanaSignAndSendTransactionOptions, SolanaSignTransactionOptions, ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
8
8
|
export { ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
9
|
-
import { P as PrivyEvents } from './events-context-
|
|
9
|
+
import { P as PrivyEvents } from './events-context-CCElA92Y.js';
|
|
10
10
|
import '@coinbase/wallet-sdk';
|
|
11
11
|
import '@simplewebauthn/browser';
|
|
12
12
|
import '@solana/kit';
|
|
@@ -1116,7 +1116,9 @@ type PriceDisplayOptions = {
|
|
|
1116
1116
|
};
|
|
1117
1117
|
type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'base_account' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
|
|
1118
1118
|
/** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
|
|
1119
|
-
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'wallet_connect_qr_solana'
|
|
1119
|
+
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'wallet_connect_qr_solana'
|
|
1120
|
+
/** @deprecated rabby_wallet is no longer supported */
|
|
1121
|
+
| 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack' | 'binance' | 'binanceus' | 'bitget_wallet';
|
|
1120
1122
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
1121
1123
|
type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderID | `privy:${string}` | 'farcaster' | 'telegram';
|
|
1122
1124
|
type ExternalWalletsConfig = {
|
|
@@ -2207,6 +2209,11 @@ type ExternalConnectWalletModalOptions = {
|
|
|
2207
2209
|
* When set, the connect view will skip the wallets list and go straight to the wallet connection.
|
|
2208
2210
|
*/
|
|
2209
2211
|
preSelectedWalletId?: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* Whether to hide the modal header content (wallet icon, title, and description).
|
|
2214
|
+
* The close button and padding will still be shown. Defaults to false (header is visible).
|
|
2215
|
+
*/
|
|
2216
|
+
hideHeader?: boolean;
|
|
2210
2217
|
};
|
|
2211
2218
|
/** Options for Privy's `createWallet` method */
|
|
2212
2219
|
type CreateWalletOptions = {
|
|
@@ -1116,7 +1116,9 @@ type PriceDisplayOptions = {
|
|
|
1116
1116
|
};
|
|
1117
1117
|
type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'base_account' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
|
|
1118
1118
|
/** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
|
|
1119
|
-
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'wallet_connect_qr_solana'
|
|
1119
|
+
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'wallet_connect_qr' | 'wallet_connect_qr_solana'
|
|
1120
|
+
/** @deprecated rabby_wallet is no longer supported */
|
|
1121
|
+
| 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'haha_wallet' | 'safe' | 'solflare' | 'backpack' | 'binance' | 'binanceus' | 'bitget_wallet';
|
|
1120
1122
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
1121
1123
|
type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderID | `privy:${string}` | 'farcaster' | 'telegram';
|
|
1122
1124
|
type ExternalWalletsConfig = {
|
|
@@ -2207,6 +2209,11 @@ type ExternalConnectWalletModalOptions = {
|
|
|
2207
2209
|
* When set, the connect view will skip the wallets list and go straight to the wallet connection.
|
|
2208
2210
|
*/
|
|
2209
2211
|
preSelectedWalletId?: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* Whether to hide the modal header content (wallet icon, title, and description).
|
|
2214
|
+
* The close button and padding will still be shown. Defaults to false (header is visible).
|
|
2215
|
+
*/
|
|
2216
|
+
hideHeader?: boolean;
|
|
2210
2217
|
};
|
|
2211
2218
|
/** Options for Privy's `createWallet` method */
|
|
2212
2219
|
type CreateWalletOptions = {
|
package/dist/dts/ui.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-B6UNnZ2P.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
5
5
|
import '@coinbase/wallet-sdk';
|
package/dist/dts/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-B6UNnZ2P.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
5
5
|
import '@coinbase/wallet-sdk';
|