@privy-io/react-auth 2.19.3 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/farcaster.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/privy-provider-NikYcweE.js +29 -0
- package/dist/cjs/smart-wallets-mWRMk0wI.js +1 -0
- 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-sign-with-user-signer-pdwGPuUl.js +1 -0
- package/dist/cjs/{useActiveWallet-C3sUASyl.js → useActiveWallet-D0kSB8pr.js} +1 -1
- package/dist/cjs/{useFundWallet-CjIOl8K5.js → useFundWallet-BLnL9YuU.js} +1 -1
- package/dist/dts/extended-chains.d.mts +3 -3
- package/dist/dts/extended-chains.d.ts +3 -3
- package/dist/dts/farcaster.d.mts +37 -7
- package/dist/dts/farcaster.d.ts +37 -7
- package/dist/dts/index.d.mts +19 -6
- package/dist/dts/index.d.ts +19 -6
- package/dist/dts/smart-wallets.d.mts +3 -2
- package/dist/dts/smart-wallets.d.ts +3 -2
- package/dist/dts/solana.d.mts +4 -4
- package/dist/dts/solana.d.ts +4 -4
- package/dist/dts/{types-ZqHmGCwO.d.mts → types-DYBA51G_.d.mts} +17 -2
- package/dist/dts/{types-ZqHmGCwO.d.ts → types-DYBA51G_.d.ts} +17 -2
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/dts/{useSolanaWallets-idhSZbQC.d.mts → useSolanaWallets-BiSasRT6.d.mts} +1 -1
- package/dist/dts/{useSolanaWallets-idhSZbQC.d.ts → useSolanaWallets-BiSasRT6.d.ts} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/privy-provider-NPBEALzA.mjs +29 -0
- package/dist/esm/smart-wallets-JbwIgnkS.mjs +1 -0
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/ui.mjs +2 -2
- package/dist/esm/use-sign-with-user-signer-CyFzXla-.mjs +1 -0
- package/dist/esm/{useActiveWallet-BJC5_xsQ.mjs → useActiveWallet-MSI4YjRM.mjs} +1 -1
- package/dist/esm/{useFundWallet-C-F8T0D8.mjs → useFundWallet-Cv33RFig.mjs} +1 -1
- package/package.json +6 -6
- package/dist/cjs/privy-provider-BxMgsOWd.js +0 -29
- package/dist/cjs/smart-wallets-B_hWSx5K.js +0 -1
- package/dist/cjs/use-sign-with-user-signer-BQ_24mRh.js +0 -1
- package/dist/esm/privy-provider-DhzPL6wG.mjs +0 -29
- package/dist/esm/smart-wallets-CYZi_N_3.mjs +0 -1
- package/dist/esm/use-sign-with-user-signer-DnNPDfxp.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("viem"),t=require("react"),i=require("./internal-context-B_aIJuQh.js");function r(e){return e?new Date(1e3*e):null}function a(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt??e.verifiedAt).getTime()-(t.firstVerifiedAt??t.verifiedAt).getTime())).find((e=>e.type===t))}const l=e=>e?n(e).find((e=>0===e.walletIndex))??null:null,n=e=>e?s(e,"ethereum"):[],s=(e,t)=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t)),d=e=>e?s(e,"solana"):[],m=e=>e?d(e).find((e=>0===e.walletIndex))??null:null;let o=(t,i)=>t===i||!(!t.startsWith("0x")||!i.startsWith("0x"))&&e.getAddress(t)===e.getAddress(i);const p=/*#__PURE__*/t.createContext({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:i.notImplemented,login:i.notImplemented,connectOrCreateWallet:i.notImplemented,linkEmail:i.notImplemented,linkPhone:i.notImplemented,linkFarcaster:i.notImplemented,linkWallet:i.notImplemented,startCrossAppAuthFlow:i.notImplemented,linkGoogle:i.notImplemented,linkTwitter:i.notImplemented,linkDiscord:i.notImplemented,linkGithub:i.notImplemented,linkSpotify:i.notImplemented,linkInstagram:i.notImplemented,linkTelegram:i.notImplemented,linkTiktok:i.notImplemented,linkLine:i.notImplemented,linkLinkedIn:i.notImplemented,linkApple:i.notImplemented,linkPasskey:i.notImplemented,updateEmail:i.notImplemented,updatePhone:i.notImplemented,logout:i.notImplemented,getAccessToken:i.notImplemented,unlinkEmail:i.notImplemented,unlinkPhone:i.notImplemented,unlinkWallet:i.notImplemented,unlinkGoogle:i.notImplemented,unlinkTwitter:i.notImplemented,unlinkDiscord:i.notImplemented,unlinkGithub:i.notImplemented,unlinkSpotify:i.notImplemented,unlinkInstagram:i.notImplemented,unlinkTiktok:i.notImplemented,unlinkLine:i.notImplemented,unlinkLinkedIn:i.notImplemented,unlinkApple:i.notImplemented,unlinkCrossAppAccount:i.notImplemented,unlinkFarcaster:i.notImplemented,unlinkTelegram:i.notImplemented,unlinkPasskey:i.notImplemented,signMessage:i.notImplemented,signTypedData:i.notImplemented,enrollInMfa:i.notImplemented,initEnrollmentWithSms:i.notImplemented,initEnrollmentWithTotp:i.notImplemented,initEnrollmentWithPasskey:i.notImplemented,promptMfa:i.notImplemented,init:i.notImplemented,submitEnrollmentWithSms:i.notImplemented,submitEnrollmentWithTotp:i.notImplemented,submitEnrollmentWithPasskey:i.notImplemented,unenroll:i.notImplemented,submit:i.notImplemented,cancel:i.notImplemented,sendTransaction:i.notImplemented,signTransaction:i.notImplemented,exportWallet:i.notImplemented,setWalletPassword:i.notImplemented,setWalletRecovery:i.notImplemented,requestFarcasterSignerFromWarpcast:i.notImplemented,getFarcasterSignerPublicKey:i.notImplemented,signFarcasterMessage:i.notImplemented,signMessageWithCrossAppWallet:i.notImplemented,signTypedDataWithCrossAppWallet:i.notImplemented,sendTransactionWithCrossAppWallet:i.notImplemented,isModalOpen:!1,mfaMethods:[]}),u=()=>t.useContext(p);exports.PrivyContext=p,exports.convertUserResponseToUser=function(e){if(!e)return null;let t=function(e){let t=[];for(let i of e){let e=i.type;switch(i.type){case"wallet":let a={id:i.id,address:i.address,type:i.type,imported:i.imported,delegated:i.delegated,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at),chainType:i.chain_type,walletClientType:i.wallet_client_type,connectorType:i.connector_type,recoveryMethod:i.recovery_method,walletIndex:i.wallet_index};t.push(a);break;case"smart_wallet":let l={address:i.address,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at),smartWalletType:i.smart_wallet_type,smartWalletVersion:i.smart_wallet_version};t.push(l);break;case"cross_app":let n={type:i.type,subject:i.subject,embeddedWallets:i.embedded_wallets,smartWallets:i.smart_wallets,providerApp:{id:i.provider_app_id},verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(n);break;case"email":let s={address:i.address,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(s);break;case"phone":let d={number:i.phoneNumber,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(d);break;case"google_oauth":let m={subject:i.subject,email:i.email,name:i.name,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(m);break;case"spotify_oauth":let o={subject:i.subject,email:i.email,name:i.name,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(o);break;case"instagram_oauth":let p={subject:i.subject,username:i.username,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(p);break;case"twitter_oauth":let u={subject:i.subject,username:i.username,name:i.name,type:i.type,profilePictureUrl:i.profile_picture_url,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(u);break;case"discord_oauth":let f={subject:i.subject,username:i.username,email:i.email,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(f);break;case"github_oauth":let c={subject:i.subject,username:i.username,name:i.name,email:i.email,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(c);break;case"tiktok_oauth":let _={subject:i.subject,username:i.username,name:i.name,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(_);break;case"line_oauth":let y={subject:i.subject,name:i.name,email:i.email,profilePictureUrl:i.profile_picture_url,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(y);break;case"linkedin_oauth":let v={subject:i.subject,name:i.name,email:i.email,vanityName:i.vanity_name,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(v);break;case"apple_oauth":let h={subject:i.subject,email:i.email,type:i.type,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(h);break;case"custom_auth":t.push({type:i.type,customUserId:i.custom_user_id,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)});break;case"farcaster":let A={type:i.type,fid:i.fid,ownerAddress:i.owner_address,displayName:i.display_name,username:i.username,bio:i.bio,pfp:i.profile_picture_url,url:i.homepage_url,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at),signerPublicKey:i.signer_public_key};t.push(A);break;case"passkey":let b={type:i.type,enrolledInMfa:i.enrolled_in_mfa,credentialId:i.credential_id,authenticatorName:i.authenticator_name,createdWithDevice:i.created_with_device,createdWithOs:i.created_with_os,createdWithBrowser:i.created_with_browser,verifiedAt:r(i.verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(b);break;case"telegram":let I={type:i.type,telegramUserId:i.telegram_user_id,firstName:i.first_name,lastName:i.last_name,username:i.username,photoUrl:i.photo_url,verifiedAt:r(i.first_verified_at),firstVerifiedAt:r(i.first_verified_at),latestVerifiedAt:r(i.latest_verified_at)};t.push(I);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),i=a(t,"wallet"),l=a(t,"smart_wallet"),n=a(t,"email"),s=a(t,"phone"),d=a(t,"google_oauth"),m=a(t,"twitter_oauth"),o=a(t,"discord_oauth"),p=a(t,"github_oauth"),u=a(t,"spotify_oauth"),f=a(t,"instagram_oauth"),c=a(t,"tiktok_oauth"),_=a(t,"line_oauth"),y=a(t,"linkedin_oauth"),v=a(t,"apple_oauth"),h=a(t,"farcaster"),A=a(t,"telegram"),b=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:r(t)})));return{id:e.id,createdAt:r(e.created_at),linkedAccounts:t,email:n&&{address:n?.address},phone:s&&{number:s?.number},wallet:i&&{id:i.id,address:i.address,chainType:i.chainType,walletClientType:i.walletClientType,connectorType:i.connectorType,recoveryMethod:i.recoveryMethod,imported:i.imported,delegated:i.delegated,walletIndex:i.walletIndex},smartWallet:l&&{address:l.address,smartWalletType:l.smartWalletType,smartWalletVersion:l.smartWalletVersion},google:d&&{subject:d.subject,email:d.email,name:d.name},twitter:m&&{subject:m.subject,username:m.username,name:m.name,profilePictureUrl:m.profilePictureUrl},discord:o&&{subject:o.subject,username:o.username,email:o.email},github:p&&{subject:p.subject,username:p.username,name:p.name,email:p.email},spotify:u&&{subject:u.subject,email:u.email,name:u.name},instagram:f&&{subject:f.subject,username:f.username},tiktok:c&&{subject:c.subject,username:c.username,name:c.name},line:_&&{subject:_.subject,name:_.name,email:_.email,profilePictureUrl:_.profilePictureUrl},linkedin:y&&{subject:y.subject,name:y.name,email:y.email,vanityName:y.vanityName},apple:v&&{subject:v.subject,email:v.email},farcaster:h&&{fid:h.fid,ownerAddress:h.ownerAddress,displayName:h.displayName,username:h.username,bio:h.bio,pfp:h.pfp,url:h.url,signerPublicKey:h.signerPublicKey},telegram:A&&{telegramUserId:A.telegramUserId,firstName:A.firstName,lastName:A.lastName,username:A.username,photoUrl:A.photoUrl},delegatedWallets:[],mfaMethods:b.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}},exports.getAllPrivyWalletsForChainType=s,exports.getConnectedWalletWithAddress=(e,t)=>e.find((e=>o(e.address,t)))||null,exports.getImportedPrivyEthereumWallet=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType))||null,exports.getImportedPrivySolanaWallet=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType))||null,exports.getIsUnifiedWallet=e=>!!e.id&&"privy-v2"===e.recoveryMethod,exports.getPrivyEthereumHDWallets=n,exports.getPrivyEthereumWallet=l,exports.getPrivyPrimaryWallet=e=>l(e)??m(e),exports.getPrivySolanaHDWallets=d,exports.getPrivySolanaWallet=m,exports.getPrivyWalletWithAddress=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&o(e.address,t)))||null,exports.usePrivyContext=u,exports.useSignWithUserSigner=()=>{let{getAccessToken:e}=u(),{walletProxy:r}=i.usePrivyInternal();return t.useMemo((()=>({signWithUserSigner:async({message:t})=>{if(!r)throw Error("Wallet proxy not initialized");let i=await e();if(!i)throw Error("User must be authenticated");let{signature:a}=await r.signWithUserSigner({accessToken:i,message:t});return{signature:a}}})),[r,e])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("./privy-provider-
|
|
1
|
+
"use strict";var e=require("react"),t=require("./privy-provider-NikYcweE.js"),l=require("./use-sign-with-user-signer-pdwGPuUl.js"),n=require("./internal-context-B_aIJuQh.js");exports.useActiveWallet=()=>{let l=t.useAppConfig(),{wallets:n}=t.useWallets(),{wallets:r}=t.useSolanaWallets(),s=t.useActiveWalletStore((e=>e.wallet));e.useEffect((()=>{if(!l.id)return;let e=t.s.get(t.toActiveWalletKey(l.id));t.useActiveWalletStore.setState({wallet:e})}),[l.id]);let i=e.useMemo((()=>{if(!s)return;let[,e]=s.split(":");return n.find((t=>t.address===e))||r.find((t=>t.address===e))}),[s,n,r]),a=e.useMemo((()=>i?"ethereum"===i.type?i.chainId:"solana":void 0),[i]);return{connect:async e=>{e?.reset&&(t.s.del(t.toActiveWalletKey(l.id)),t.useActiveWalletStore.setState({wallet:void 0}));let{wallet:s}=await t.open();if(!s)return{};let[,i]=s.split(":"),a=n.find((e=>e.address===i));if(a)return{wallet:a,network:a.chainId};let u=r.find((e=>e.address===i));return u?{wallet:u,network:"solana"}:{}},setActiveWallet:e.useCallback((e=>{t.setActiveWallet({address:e.address,client:e.walletClientType,appId:l.id})}),[l.id]),wallet:i,network:a}},exports.useConnectWallet=function(n){let{connectWallet:r}=e.useContext(l.PrivyContext);return t.usePrivyEventSubscription("connectWallet",n),{connectWallet:r}},exports.useFundWallet=e=>{t.usePrivyEventSubscription("fundWallet",e);let{fundWallet:l}=n.usePrivyInternal();return{fundWallet:l}},exports.useLogin=function(n){let{login:r}=e.useContext(l.PrivyContext);return t.usePrivyEventSubscription("login",n),{login:r}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),n=require("./privy-provider-
|
|
1
|
+
"use strict";var e=require("react"),n=require("./privy-provider-NikYcweE.js"),t=require("@solana/spl-token"),a=require("@solana/web3.js"),r=require("@privy-io/js-sdk-core"),s=require("./internal-context-B_aIJuQh.js"),o={id:n.SOLANA_FUNDING_PLUGIN_ID,getBalance:({address:e,cluster:n})=>new a.Connection(r.getSolanaRpcEndpointForCluster(n)).getBalance(new a.PublicKey(e)),getTokenBalance:async({address:e,cluster:n,mintAddress:t})=>await new r.SolanaClient({...n,rpcUrl:r.getSolanaRpcEndpointForCluster(n)}).getTokenAccountsByOwner(e,t)||{amount:BigInt(0),decimals:9},createTransferTransaction:async({from:e,to:n,amount:t,cluster:s})=>{let o=new a.PublicKey(e),i=new a.Transaction;i.add(a.SystemProgram.transfer({fromPubkey:o,toPubkey:new a.PublicKey(n),lamports:t}));let c=new a.Connection(r.getSolanaRpcEndpointForCluster(s)),l=await c.getLatestBlockhash();return i.recentBlockhash=l.blockhash,i.feePayer=o,{transaction:i,connection:c}},createSplTransferTransaction:async({from:e,to:n,amount:s,cluster:o,mintAddress:i})=>{let c=new a.PublicKey(i),l=new a.PublicKey(e),u=new a.PublicKey(n),d=new a.Transaction,p=t.getAssociatedTokenAddressSync(c,l),y=t.getAssociatedTokenAddressSync(c,u);d.add(t.createAssociatedTokenAccountIdempotentInstruction(l,y,u,c)),d.add(t.createTransferInstruction(p,y,l,s));let g=new a.Connection(r.getSolanaRpcEndpointForCluster(o)),w=await g.getLatestBlockhash();return d.recentBlockhash=w.blockhash,d.feePayer=l,{transaction:d,connection:g}},createBridgeTransactionFromRelayQuote:async({quote:e,from:t,cluster:s})=>{let o=e.steps[0]?.items?.[0];if(!o)return;let i=o.data.instructions.map((({keys:e,programId:t,data:r})=>new a.TransactionInstruction({keys:e.map((({pubkey:e,isSigner:n,isWritable:t})=>({pubkey:new a.PublicKey(e),isSigner:n,isWritable:t}))),programId:new a.PublicKey(t),data:n.bufferFrom(r,"hex")}))),c=o.data.addressLookupTableAddresses?.map((e=>new a.PublicKey(e))),l=new a.Connection(r.getSolanaRpcEndpointForCluster(s)),u=await Promise.all((c??[]).map((async e=>l.getAddressLookupTable(e).then((e=>e.value))))),{blockhash:d}=await l.getLatestBlockhash();return{transaction:new a.VersionedTransaction(new a.TransactionMessage({payerKey:new a.PublicKey(t),instructions:i,recentBlockhash:d}).compileToV0Message(u)),connection:l}}};exports.t=o,exports.useFundWallet=t=>{n.usePrivyEventSubscription("fundSolanaWallet",t);let a=n.useAppConfig(),{setModalData:r}=n.usePrivyModal(),{openModal:i}=s.usePrivyInternal();return n.useRegisterPlugin(o),{fundWallet:e.useCallback((async(e,t)=>{r({funding:n.prepareSolanaFundingModalData({address:e,appConfig:a,fundWalletConfig:t,methodScreen:n.FundingMethodSelectionScreen})}),i(n.FundingMethodSelectionScreen)}),[a,r,i])}};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { U as User } from './types-
|
|
1
|
+
import { ExtendedChainType, WalletResponseType, CurveSigningChainType } from '@privy-io/public-api';
|
|
2
|
+
import { U as User } from './types-DYBA51G_.js';
|
|
3
3
|
import '@coinbase/wallet-sdk';
|
|
4
4
|
import '@reown/appkit';
|
|
5
5
|
import '@solana/wallet-adapter-base';
|
|
@@ -16,7 +16,7 @@ import 'eventemitter3';
|
|
|
16
16
|
|
|
17
17
|
interface CreateWalletInput {
|
|
18
18
|
/** The chain type of the wallet to create. */
|
|
19
|
-
chainType:
|
|
19
|
+
chainType: ExtendedChainType;
|
|
20
20
|
}
|
|
21
21
|
interface CreateWalletOutput {
|
|
22
22
|
user: User;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { U as User } from './types-
|
|
1
|
+
import { ExtendedChainType, WalletResponseType, CurveSigningChainType } from '@privy-io/public-api';
|
|
2
|
+
import { U as User } from './types-DYBA51G_.js';
|
|
3
3
|
import '@coinbase/wallet-sdk';
|
|
4
4
|
import '@reown/appkit';
|
|
5
5
|
import '@solana/wallet-adapter-base';
|
|
@@ -16,7 +16,7 @@ import 'eventemitter3';
|
|
|
16
16
|
|
|
17
17
|
interface CreateWalletInput {
|
|
18
18
|
/** The chain type of the wallet to create. */
|
|
19
|
-
chainType:
|
|
19
|
+
chainType: ExtendedChainType;
|
|
20
20
|
}
|
|
21
21
|
interface CreateWalletOutput {
|
|
22
22
|
user: User;
|
package/dist/dts/farcaster.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as LoginToFrame, U as User, h as LoginToMiniApp } from './types-DYBA51G_.js';
|
|
2
2
|
import '@coinbase/wallet-sdk';
|
|
3
3
|
import '@reown/appkit';
|
|
4
4
|
import '@solana/wallet-adapter-base';
|
|
@@ -14,9 +14,12 @@ import '@metamask/eth-sig-util';
|
|
|
14
14
|
import '@solana/web3.js';
|
|
15
15
|
import 'eventemitter3';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `UseLoginToMiniAppInterface` instead
|
|
19
|
+
*/
|
|
17
20
|
type UseLoginToFrameInterface = {
|
|
18
21
|
/**
|
|
19
|
-
* Initializes the login to
|
|
22
|
+
* Initializes the login to Farcaster Mini App flow.
|
|
20
23
|
*
|
|
21
24
|
* @returns a Promise that resolves to a nonce that must be signed by the Farcaster wallet.
|
|
22
25
|
*/
|
|
@@ -24,7 +27,7 @@ type UseLoginToFrameInterface = {
|
|
|
24
27
|
nonce: string;
|
|
25
28
|
}>;
|
|
26
29
|
/**
|
|
27
|
-
* Logs in a user into a Farcaster
|
|
30
|
+
* Logs in a user into a Farcaster Mini App with the signed nonce message.
|
|
28
31
|
*
|
|
29
32
|
* @param message - the SIWF message which was signed by the Farcaster wallets
|
|
30
33
|
* @param signature - the signature of the message, verifying the user's Farcaster wallets
|
|
@@ -34,12 +37,39 @@ type UseLoginToFrameInterface = {
|
|
|
34
37
|
};
|
|
35
38
|
/**
|
|
36
39
|
* @experimental
|
|
40
|
+
* @deprecated Use `useLoginToMiniApp` instead
|
|
37
41
|
*
|
|
38
|
-
* Use this hook to log a user into a Farcaster
|
|
42
|
+
* Use this hook to log a user into a Farcaster Mini App
|
|
39
43
|
*
|
|
40
|
-
* @returns initLoginToFrame - initializes a Farcaster
|
|
41
|
-
* @returns loginToFrame - authenticates a user into a Farcaster
|
|
44
|
+
* @returns initLoginToFrame - initializes a Farcaster Mini App login flow.
|
|
45
|
+
* @returns loginToFrame - authenticates a user into a Farcaster Mini App.
|
|
42
46
|
*/
|
|
43
47
|
declare const useLoginToFrame: () => UseLoginToFrameInterface;
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
type UseLoginToMiniAppInterface = {
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the login to Farcaster Mini App flow.
|
|
52
|
+
*
|
|
53
|
+
* @returns a Promise that resolves to a nonce that must be signed by the Farcaster wallet.
|
|
54
|
+
*/
|
|
55
|
+
initLoginToMiniApp: () => Promise<{
|
|
56
|
+
nonce: string;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Logs in a user into a Farcaster Mini App with the signed nonce message.
|
|
60
|
+
*
|
|
61
|
+
* @param message - the SIWF message which was signed by the Farcaster wallets
|
|
62
|
+
* @param signature - the signature of the message, verifying the user's Farcaster wallets
|
|
63
|
+
* @param fid - the Farcaster user ID
|
|
64
|
+
*/
|
|
65
|
+
loginToMiniApp: ({ message, signature }: LoginToMiniApp) => Promise<User | null>;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Use this hook to log a user into a Farcaster Mini App (formerly known as frames)
|
|
69
|
+
*
|
|
70
|
+
* @returns initLoginToMiniApp - initializes a Farcaster Mini App login flow.
|
|
71
|
+
* @returns loginToMiniApp - authenticates a user into a Farcaster Mini App.
|
|
72
|
+
*/
|
|
73
|
+
declare const useLoginToMiniApp: () => UseLoginToMiniAppInterface;
|
|
74
|
+
|
|
75
|
+
export { type UseLoginToFrameInterface, type UseLoginToMiniAppInterface, useLoginToFrame, useLoginToMiniApp };
|
package/dist/dts/farcaster.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as LoginToFrame, U as User, h as LoginToMiniApp } from './types-DYBA51G_.js';
|
|
2
2
|
import '@coinbase/wallet-sdk';
|
|
3
3
|
import '@reown/appkit';
|
|
4
4
|
import '@solana/wallet-adapter-base';
|
|
@@ -14,9 +14,12 @@ import '@metamask/eth-sig-util';
|
|
|
14
14
|
import '@solana/web3.js';
|
|
15
15
|
import 'eventemitter3';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `UseLoginToMiniAppInterface` instead
|
|
19
|
+
*/
|
|
17
20
|
type UseLoginToFrameInterface = {
|
|
18
21
|
/**
|
|
19
|
-
* Initializes the login to
|
|
22
|
+
* Initializes the login to Farcaster Mini App flow.
|
|
20
23
|
*
|
|
21
24
|
* @returns a Promise that resolves to a nonce that must be signed by the Farcaster wallet.
|
|
22
25
|
*/
|
|
@@ -24,7 +27,7 @@ type UseLoginToFrameInterface = {
|
|
|
24
27
|
nonce: string;
|
|
25
28
|
}>;
|
|
26
29
|
/**
|
|
27
|
-
* Logs in a user into a Farcaster
|
|
30
|
+
* Logs in a user into a Farcaster Mini App with the signed nonce message.
|
|
28
31
|
*
|
|
29
32
|
* @param message - the SIWF message which was signed by the Farcaster wallets
|
|
30
33
|
* @param signature - the signature of the message, verifying the user's Farcaster wallets
|
|
@@ -34,12 +37,39 @@ type UseLoginToFrameInterface = {
|
|
|
34
37
|
};
|
|
35
38
|
/**
|
|
36
39
|
* @experimental
|
|
40
|
+
* @deprecated Use `useLoginToMiniApp` instead
|
|
37
41
|
*
|
|
38
|
-
* Use this hook to log a user into a Farcaster
|
|
42
|
+
* Use this hook to log a user into a Farcaster Mini App
|
|
39
43
|
*
|
|
40
|
-
* @returns initLoginToFrame - initializes a Farcaster
|
|
41
|
-
* @returns loginToFrame - authenticates a user into a Farcaster
|
|
44
|
+
* @returns initLoginToFrame - initializes a Farcaster Mini App login flow.
|
|
45
|
+
* @returns loginToFrame - authenticates a user into a Farcaster Mini App.
|
|
42
46
|
*/
|
|
43
47
|
declare const useLoginToFrame: () => UseLoginToFrameInterface;
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
type UseLoginToMiniAppInterface = {
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the login to Farcaster Mini App flow.
|
|
52
|
+
*
|
|
53
|
+
* @returns a Promise that resolves to a nonce that must be signed by the Farcaster wallet.
|
|
54
|
+
*/
|
|
55
|
+
initLoginToMiniApp: () => Promise<{
|
|
56
|
+
nonce: string;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Logs in a user into a Farcaster Mini App with the signed nonce message.
|
|
60
|
+
*
|
|
61
|
+
* @param message - the SIWF message which was signed by the Farcaster wallets
|
|
62
|
+
* @param signature - the signature of the message, verifying the user's Farcaster wallets
|
|
63
|
+
* @param fid - the Farcaster user ID
|
|
64
|
+
*/
|
|
65
|
+
loginToMiniApp: ({ message, signature }: LoginToMiniApp) => Promise<User | null>;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Use this hook to log a user into a Farcaster Mini App (formerly known as frames)
|
|
69
|
+
*
|
|
70
|
+
* @returns initLoginToMiniApp - initializes a Farcaster Mini App login flow.
|
|
71
|
+
* @returns loginToMiniApp - authenticates a user into a Farcaster Mini App.
|
|
72
|
+
*/
|
|
73
|
+
declare const useLoginToMiniApp: () => UseLoginToMiniAppInterface;
|
|
74
|
+
|
|
75
|
+
export { type UseLoginToFrameInterface, type UseLoginToMiniAppInterface, useLoginToFrame, useLoginToMiniApp };
|
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 {
|
|
4
|
-
export {
|
|
3
|
+
import { c as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as EIP1193Provider, u as EntropyIdVerifier$1, H as HDWalletWithMetadata, v as RequestArguments, w as WalletConnector, B as BaseConnectedEthereumWallet, x as PrivyProxyProvider, y as WalletClientType, z as ConnectedWalletMetadata, A as PrivyClientConfig, D as ConnectorType, G as SetBaseAccountSdkType, I as WalletListEntry, J as AppConfig, K as BaseConnectedWallet, m as SolanaWalletConnector, U as User, N as ConnectWalletModalOptions, Q as LoginModalOptions, f as CreateWalletOptions, W as Wallet, T as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, V as SignTypedDataParams, M as MfaMethod, X as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, Y as FundWalletConfig, Z as ConnectedWallet, O as OAuthTokens, _ as CrossAppProviderDetails, $ as OAuthProviderType, a0 as MoonpaySignRequest, a1 as MoonpaySignResponse, a2 as SmartWalletConfig, L as LoginMethod, a3 as ExternalWalletMetadata, a4 as TelegramAuthResult, a5 as TelegramWebAppData, a6 as OAuthUserInfo, a7 as SiwsMessageType, a8 as OAuthFlowState, a9 as LoginWithCode, aa as OtpFlowState, ab as PasskeyFlowState, ac as SiweFlowState, ad as BaseAccountSdkType, ae as UnsignedTransactionRequestWithChainId, af as BaseConnectedWalletType, C as ConnectedSolanaWallet, ag as SessionSignerInput, ah as TelegramAuthFlowState } from './types-DYBA51G_.js';
|
|
4
|
+
export { aA as Apple, aN as AppleOAuthWithMetadata, aV as ContractUIOptions, aE as CrossAppAccount, aQ as CrossAppAccountWithMetadata, ax as Discord, aI as DiscordOAuthWithMetadata, aS as Email, as as EmailWithMetadata, aZ as Farcaster, aO as FarcasterWithMetadata, ay as Github, aJ as GithubOAuthWithMetadata, av as Google, aG as GoogleOAuthWithMetadata, aC as Line, aL as LineOAuthWithMetadata, aF as LinkedAccountType, a as LinkedAccountWithMetadata, az as LinkedIn, aM as LinkedInOAuthWithMetadata, a$ as LoginMethodOrderOption, aj as MessageTypes, al as MoonpayConfig, am as MoonpayCurrencyCode, aX as MoonpayFundingConfig, an as MoonpayPaymentMethod, aW as NativeFundingConfig, ar as NonEmptyArray, a_ as Passkey, aR as PasskeyWithMetadata, aT as Phone, at as PhoneWithMetadata, aY as PriceDisplayOptions, P as PrivyErrorCode, ao as Quantity, ak as SmartWallet, e as SolanaCluster, l as SolanaFundingConfig, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, aD as Telegram, aP as TelegramWithMetadata, aB as Tiktok, aK as TiktokOAuthWithMetadata, ap as TransactionLog, aq as TransactionReceipt, aU as TransactionUIOptions, aw as Twitter, aH as TwitterOAuthWithMetadata, ai as TypedMessage, au as WalletWithMetadata } from './types-DYBA51G_.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import { AppKit } from '@reown/appkit';
|
|
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
|
|
|
16
16
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
|
17
17
|
import { Cluster } from '@solana/web3.js';
|
|
18
18
|
import { FetchOptions } from 'ofetch';
|
|
19
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
20
|
-
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
19
|
+
import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
|
|
20
|
+
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
|
|
21
21
|
import * as viem_accounts from 'viem/accounts';
|
|
22
22
|
import '@coinbase/wallet-sdk';
|
|
23
23
|
import '@solana/wallet-adapter-base';
|
|
@@ -2270,6 +2270,7 @@ interface ResponseSmartWalletAccount {
|
|
|
2270
2270
|
type: 'smart_wallet';
|
|
2271
2271
|
address: string;
|
|
2272
2272
|
smart_wallet_type: SmartWalletType;
|
|
2273
|
+
smart_wallet_version?: string;
|
|
2273
2274
|
verified_at: number;
|
|
2274
2275
|
first_verified_at: number | null;
|
|
2275
2276
|
latest_verified_at: number | null;
|
|
@@ -2721,10 +2722,11 @@ declare class PrivyClient {
|
|
|
2721
2722
|
*
|
|
2722
2723
|
* @returns The user object.
|
|
2723
2724
|
*/
|
|
2724
|
-
linkSmartWallet({ message, signature, smartWalletType, }: {
|
|
2725
|
+
linkSmartWallet({ message, signature, smartWalletType, smartWalletVersion, }: {
|
|
2725
2726
|
message: string;
|
|
2726
2727
|
signature: string;
|
|
2727
2728
|
smartWalletType: SmartWalletType;
|
|
2729
|
+
smartWalletVersion?: string;
|
|
2728
2730
|
}): Promise<User>;
|
|
2729
2731
|
/**
|
|
2730
2732
|
* Headless method to link a new wallet via the Sign-In with Ethereum spec.
|
|
@@ -4218,4 +4220,15 @@ declare const toViemAccount: ({ wallet }: {
|
|
|
4218
4220
|
type: "local";
|
|
4219
4221
|
}>;
|
|
4220
4222
|
|
|
4221
|
-
|
|
4223
|
+
/**
|
|
4224
|
+
* Hook to migrate wallets for apps moving from on-device to TEEs.
|
|
4225
|
+
*
|
|
4226
|
+
* No-op if the app is not set up for TEEs or if the user's wallets are already migrated.
|
|
4227
|
+
*/
|
|
4228
|
+
declare const useMigrateWallets: () => {
|
|
4229
|
+
migrate: () => Promise<{
|
|
4230
|
+
success: boolean;
|
|
4231
|
+
}>;
|
|
4232
|
+
};
|
|
4233
|
+
|
|
4234
|
+
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, toViemAccount, useActiveWallet, useAuthMfa, useAuthMfaEnrollment, useAuthorizationSignature, useBaseAccountSdk, useConnectBaseAccount, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useMigrateWallets, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
|
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 {
|
|
4
|
-
export {
|
|
3
|
+
import { c as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as EIP1193Provider, u as EntropyIdVerifier$1, H as HDWalletWithMetadata, v as RequestArguments, w as WalletConnector, B as BaseConnectedEthereumWallet, x as PrivyProxyProvider, y as WalletClientType, z as ConnectedWalletMetadata, A as PrivyClientConfig, D as ConnectorType, G as SetBaseAccountSdkType, I as WalletListEntry, J as AppConfig, K as BaseConnectedWallet, m as SolanaWalletConnector, U as User, N as ConnectWalletModalOptions, Q as LoginModalOptions, f as CreateWalletOptions, W as Wallet, T as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, V as SignTypedDataParams, M as MfaMethod, X as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, Y as FundWalletConfig, Z as ConnectedWallet, O as OAuthTokens, _ as CrossAppProviderDetails, $ as OAuthProviderType, a0 as MoonpaySignRequest, a1 as MoonpaySignResponse, a2 as SmartWalletConfig, L as LoginMethod, a3 as ExternalWalletMetadata, a4 as TelegramAuthResult, a5 as TelegramWebAppData, a6 as OAuthUserInfo, a7 as SiwsMessageType, a8 as OAuthFlowState, a9 as LoginWithCode, aa as OtpFlowState, ab as PasskeyFlowState, ac as SiweFlowState, ad as BaseAccountSdkType, ae as UnsignedTransactionRequestWithChainId, af as BaseConnectedWalletType, C as ConnectedSolanaWallet, ag as SessionSignerInput, ah as TelegramAuthFlowState } from './types-DYBA51G_.js';
|
|
4
|
+
export { aA as Apple, aN as AppleOAuthWithMetadata, aV as ContractUIOptions, aE as CrossAppAccount, aQ as CrossAppAccountWithMetadata, ax as Discord, aI as DiscordOAuthWithMetadata, aS as Email, as as EmailWithMetadata, aZ as Farcaster, aO as FarcasterWithMetadata, ay as Github, aJ as GithubOAuthWithMetadata, av as Google, aG as GoogleOAuthWithMetadata, aC as Line, aL as LineOAuthWithMetadata, aF as LinkedAccountType, a as LinkedAccountWithMetadata, az as LinkedIn, aM as LinkedInOAuthWithMetadata, a$ as LoginMethodOrderOption, aj as MessageTypes, al as MoonpayConfig, am as MoonpayCurrencyCode, aX as MoonpayFundingConfig, an as MoonpayPaymentMethod, aW as NativeFundingConfig, ar as NonEmptyArray, a_ as Passkey, aR as PasskeyWithMetadata, aT as Phone, at as PhoneWithMetadata, aY as PriceDisplayOptions, P as PrivyErrorCode, ao as Quantity, ak as SmartWallet, e as SolanaCluster, l as SolanaFundingConfig, S as SolanaTransactionReceipt, d as SupportedSolanaTransaction, aD as Telegram, aP as TelegramWithMetadata, aB as Tiktok, aK as TiktokOAuthWithMetadata, ap as TransactionLog, aq as TransactionReceipt, aU as TransactionUIOptions, aw as Twitter, aH as TwitterOAuthWithMetadata, ai as TypedMessage, au as WalletWithMetadata } from './types-DYBA51G_.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import { AppKit } from '@reown/appkit';
|
|
@@ -16,8 +16,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
|
|
|
16
16
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
|
17
17
|
import { Cluster } from '@solana/web3.js';
|
|
18
18
|
import { FetchOptions } from 'ofetch';
|
|
19
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
20
|
-
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
19
|
+
import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
|
|
20
|
+
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
|
|
21
21
|
import * as viem_accounts from 'viem/accounts';
|
|
22
22
|
import '@coinbase/wallet-sdk';
|
|
23
23
|
import '@solana/wallet-adapter-base';
|
|
@@ -2270,6 +2270,7 @@ interface ResponseSmartWalletAccount {
|
|
|
2270
2270
|
type: 'smart_wallet';
|
|
2271
2271
|
address: string;
|
|
2272
2272
|
smart_wallet_type: SmartWalletType;
|
|
2273
|
+
smart_wallet_version?: string;
|
|
2273
2274
|
verified_at: number;
|
|
2274
2275
|
first_verified_at: number | null;
|
|
2275
2276
|
latest_verified_at: number | null;
|
|
@@ -2721,10 +2722,11 @@ declare class PrivyClient {
|
|
|
2721
2722
|
*
|
|
2722
2723
|
* @returns The user object.
|
|
2723
2724
|
*/
|
|
2724
|
-
linkSmartWallet({ message, signature, smartWalletType, }: {
|
|
2725
|
+
linkSmartWallet({ message, signature, smartWalletType, smartWalletVersion, }: {
|
|
2725
2726
|
message: string;
|
|
2726
2727
|
signature: string;
|
|
2727
2728
|
smartWalletType: SmartWalletType;
|
|
2729
|
+
smartWalletVersion?: string;
|
|
2728
2730
|
}): Promise<User>;
|
|
2729
2731
|
/**
|
|
2730
2732
|
* Headless method to link a new wallet via the Sign-In with Ethereum spec.
|
|
@@ -4218,4 +4220,15 @@ declare const toViemAccount: ({ wallet }: {
|
|
|
4218
4220
|
type: "local";
|
|
4219
4221
|
}>;
|
|
4220
4222
|
|
|
4221
|
-
|
|
4223
|
+
/**
|
|
4224
|
+
* Hook to migrate wallets for apps moving from on-device to TEEs.
|
|
4225
|
+
*
|
|
4226
|
+
* No-op if the app is not set up for TEEs or if the user's wallets are already migrated.
|
|
4227
|
+
*/
|
|
4228
|
+
declare const useMigrateWallets: () => {
|
|
4229
|
+
migrate: () => Promise<{
|
|
4230
|
+
success: boolean;
|
|
4231
|
+
}>;
|
|
4232
|
+
};
|
|
4233
|
+
|
|
4234
|
+
export { BaseConnectedWalletType, Captcha, ConnectWalletModalOptions, ConnectedSolanaWallet, ConnectedWallet, ConnectorManager, type CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, type JwtAuthFlowState, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, TelegramAuthFlowState, UnsignedTransactionRequest, type UseAuthorizationSignatureInterface, type UseBaseAccountSdkInterface, type UseConnectBaseAccountInterface, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWalletInterface, type UseLinkJwtAccount, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseLoginWithTelegram, type UseOAuthTokens, type UseRecoverEmbeddedWalletInterface, type UseSessionSignersInterface, type UseSignupWithPasskey, type UseSubscribeToJwtAuthWithFlagInput, type UseSyncJwtBasedAuthStateInput, type UseSyncJwtBasedAuthStateInterface, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, toViemAccount, useActiveWallet, useAuthMfa, useAuthMfaEnrollment, useAuthorizationSignature, useBaseAccountSdk, useConnectBaseAccount, useConnectCoinbaseSmartWallet, useConnectOrCreateWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useFarcasterSigner, useFundWallet, useGuestAccounts, useHeadlessDelegatedActions, useIdentityToken, useImportWallet, useLinkAccount, useLinkJwtAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithFarcasterV2, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSiwe, useLoginWithSms, useLoginWithTelegram, useLogout, useMfa, useMfaEnrollment, useMigrateWallets, useModalStatus, useOAuthTokens, usePrivy, useRecoverEmbeddedWallet, useRegisterMfaListener, useSendTransaction, useSessionSigners, useSetWalletPassword, useSetWalletRecovery, useSign7702Authorization, useSignAuthorization, useSignMessage, useSignTransaction, useSignTypedData, useSignupWithPasskey, useSubscribeToJwtAuthWithFlag, useSyncJwtBasedAuthState, useToken, useUpdateAccount, useUpdateEmail, useUser, useWallets };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
|
|
6
6
|
import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
|
|
@@ -22,9 +22,10 @@ type Call = {
|
|
|
22
22
|
readonly value?: any;
|
|
23
23
|
readonly data?: any;
|
|
24
24
|
};
|
|
25
|
-
declare const signerToSmartAccountClient: ({ owner, smartWalletType, chain, publicClient, bundlerUrl, paymasterUrl, paymasterContext, }: {
|
|
25
|
+
declare const signerToSmartAccountClient: ({ owner, smartWalletType, smartWalletVersion, chain, publicClient, bundlerUrl, paymasterUrl, paymasterContext, }: {
|
|
26
26
|
owner: EIP1193Provider;
|
|
27
27
|
smartWalletType: SmartWalletType;
|
|
28
|
+
smartWalletVersion?: string;
|
|
28
29
|
chain: Chain;
|
|
29
30
|
publicClient: PublicClient;
|
|
30
31
|
bundlerUrl: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
|
|
4
4
|
import { SmartAccountClient } from 'permissionless';
|
|
5
5
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, HttpTransport, WalletClient, PaymasterRpcSchema } from 'viem';
|
|
6
6
|
import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstraction';
|
|
@@ -22,9 +22,10 @@ type Call = {
|
|
|
22
22
|
readonly value?: any;
|
|
23
23
|
readonly data?: any;
|
|
24
24
|
};
|
|
25
|
-
declare const signerToSmartAccountClient: ({ owner, smartWalletType, chain, publicClient, bundlerUrl, paymasterUrl, paymasterContext, }: {
|
|
25
|
+
declare const signerToSmartAccountClient: ({ owner, smartWalletType, smartWalletVersion, chain, publicClient, bundlerUrl, paymasterUrl, paymasterContext, }: {
|
|
26
26
|
owner: EIP1193Provider;
|
|
27
27
|
smartWalletType: SmartWalletType;
|
|
28
|
+
smartWalletVersion?: string;
|
|
28
29
|
chain: Chain;
|
|
29
30
|
publicClient: PublicClient;
|
|
30
31
|
bundlerUrl: string;
|
package/dist/dts/solana.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as Wallet,
|
|
2
|
-
export { C as ConnectedSolanaWallet,
|
|
3
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
4
|
-
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
1
|
+
import { W as Wallet, k as SolanaStandardWallet, l as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
|
|
2
|
+
export { C as ConnectedSolanaWallet, m as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-DYBA51G_.js';
|
|
3
|
+
import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
|
|
4
|
+
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
|
|
5
5
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
6
6
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
7
7
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
package/dist/dts/solana.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as Wallet,
|
|
2
|
-
export { C as ConnectedSolanaWallet,
|
|
3
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
4
|
-
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
1
|
+
import { W as Wallet, k as SolanaStandardWallet, l as SolanaFundingConfig, d as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-DYBA51G_.js';
|
|
2
|
+
export { C as ConnectedSolanaWallet, m as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-DYBA51G_.js';
|
|
3
|
+
import { P as PrivyEvents } from './useSolanaWallets-BiSasRT6.js';
|
|
4
|
+
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BiSasRT6.js';
|
|
5
5
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
6
6
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
7
7
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
@@ -894,6 +894,8 @@ interface SmartWallet {
|
|
|
894
894
|
address: string;
|
|
895
895
|
/** The provider of the smart wallet. */
|
|
896
896
|
smartWalletType: SmartWalletType;
|
|
897
|
+
/** The version of the smart wallet. */
|
|
898
|
+
smartWalletVersion?: string;
|
|
897
899
|
}
|
|
898
900
|
/** Object representation of a user's email. */
|
|
899
901
|
interface Email {
|
|
@@ -1606,6 +1608,13 @@ interface PrivyClientConfig {
|
|
|
1606
1608
|
*/
|
|
1607
1609
|
createOnLogin?: EmbeddedWalletCreateOnLoginConfig;
|
|
1608
1610
|
};
|
|
1611
|
+
/**
|
|
1612
|
+
* Set to `true` to disable automatic migration, if you are migrating
|
|
1613
|
+
* manually via the `useMigrateWallets` hook.
|
|
1614
|
+
*
|
|
1615
|
+
* @default false
|
|
1616
|
+
*/
|
|
1617
|
+
disableAutomaticMigration?: boolean;
|
|
1609
1618
|
/**
|
|
1610
1619
|
* @deprecated. Instead, use the server-driven configuration found in the Privy console: https://dashboard.privy.io/apps/YOUR_APP_ID/embedded. This client-side setting
|
|
1611
1620
|
* is currently honored, but will be fully removed in a future release.
|
|
@@ -1783,6 +1792,7 @@ type SmartWalletConfig = {
|
|
|
1783
1792
|
} | {
|
|
1784
1793
|
enabled: true;
|
|
1785
1794
|
smartWalletType: SmartWalletType;
|
|
1795
|
+
smartWalletVersion?: string;
|
|
1786
1796
|
configuredNetworks: SmartWalletNetworkConfig[];
|
|
1787
1797
|
};
|
|
1788
1798
|
type SmartWalletNetworkConfig = {
|
|
@@ -1890,6 +1900,7 @@ type AppConfig = {
|
|
|
1890
1900
|
solana: {
|
|
1891
1901
|
createOnLogin: NonNullable<PrivyAppResponse['embedded_wallet_config']>['solana']['create_on_login'];
|
|
1892
1902
|
};
|
|
1903
|
+
disableAutomaticMigration: NonNullable<NonNullable<PrivyClientConfig['embeddedWallets']>['disableAutomaticMigration']>;
|
|
1893
1904
|
requireUserOwnedRecoveryOnCreate: NonNullable<PrivyAppResponse['embedded_wallet_config']>['require_user_owned_recovery_on_create'];
|
|
1894
1905
|
userOwnedRecoveryOptions: NonNullable<PrivyAppResponse['embedded_wallet_config']>['user_owned_recovery_options'];
|
|
1895
1906
|
mode: 'legacy-embedded-wallets-only' | 'user-controlled-server-wallets-only';
|
|
@@ -2277,7 +2288,7 @@ type CrossAppProviderDetails = {
|
|
|
2277
2288
|
name: string;
|
|
2278
2289
|
icon_url: string | null;
|
|
2279
2290
|
};
|
|
2280
|
-
type
|
|
2291
|
+
type LoginToMiniApp = {
|
|
2281
2292
|
/**
|
|
2282
2293
|
* The message the Farcaster wallet signed
|
|
2283
2294
|
*/
|
|
@@ -2287,6 +2298,10 @@ type LoginToFrame = {
|
|
|
2287
2298
|
*/
|
|
2288
2299
|
signature: string;
|
|
2289
2300
|
};
|
|
2301
|
+
/**
|
|
2302
|
+
* @deprecated Use `LoginToMiniApp` instead
|
|
2303
|
+
*/
|
|
2304
|
+
type LoginToFrame = LoginToMiniApp;
|
|
2290
2305
|
/**
|
|
2291
2306
|
* For SIWS flows, indicates whether or not the SIWS message is plaintext, or wrapped in a memo transaction
|
|
2292
2307
|
*/
|
|
@@ -2296,4 +2311,4 @@ type SessionSignerInput = {
|
|
|
2296
2311
|
policyIds?: string[];
|
|
2297
2312
|
}[];
|
|
2298
2313
|
|
|
2299
|
-
export { type
|
|
2314
|
+
export { type OAuthProviderType as $, type PrivyClientConfig as A, type BaseConnectedEthereumWallet as B, type ConnectedSolanaWallet as C, type ConnectorType as D, type EthereumRpcRequestType as E, type FundingMethod as F, type SetBaseAccountSdkType as G, type HDWalletWithMetadata as H, type WalletListEntry as I, type AppConfig as J, type BaseConnectedWallet as K, type LoginMethod as L, type MfaMethod as M, type ConnectWalletModalOptions as N, type OAuthTokens as O, PrivyErrorCode as P, type LoginModalOptions as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type SetWalletRecoveryOptions as T, type User as U, type SignTypedDataParams as V, type Wallet as W, type UnsignedTransactionRequest as X, type FundWalletConfig as Y, type ConnectedWallet as Z, type CrossAppProviderDetails as _, type LinkedAccountWithMetadata as a, type LoginMethodOrderOption as a$, type MoonpaySignRequest as a0, type MoonpaySignResponse as a1, type SmartWalletConfig as a2, type ExternalWalletMetadata as a3, type TelegramAuthResult as a4, type TelegramWebAppData as a5, type OAuthUserInfo as a6, type SiwsMessageType as a7, type OAuthFlowState as a8, type LoginWithCode as a9, type Apple as aA, type Tiktok as aB, type Line as aC, type Telegram as aD, type CrossAppAccount as aE, type LinkedAccountType as aF, type GoogleOAuthWithMetadata as aG, type TwitterOAuthWithMetadata as aH, type DiscordOAuthWithMetadata as aI, type GithubOAuthWithMetadata as aJ, type TiktokOAuthWithMetadata as aK, type LineOAuthWithMetadata as aL, type LinkedInOAuthWithMetadata as aM, type AppleOAuthWithMetadata as aN, type FarcasterWithMetadata as aO, type TelegramWithMetadata as aP, type CrossAppAccountWithMetadata as aQ, type PasskeyWithMetadata as aR, type Email as aS, type Phone as aT, type TransactionUIOptions as aU, type ContractUIOptions as aV, type NativeFundingConfig as aW, type MoonpayFundingConfig as aX, type PriceDisplayOptions as aY, type Farcaster as aZ, type Passkey as a_, type OtpFlowState as aa, type PasskeyFlowState as ab, type SiweFlowState as ac, type BaseAccountSdkType as ad, type UnsignedTransactionRequestWithChainId as ae, type BaseConnectedWalletType as af, type SessionSignerInput as ag, type TelegramAuthFlowState as ah, type TypedMessage as ai, type MessageTypes as aj, type SmartWallet as ak, type MoonpayConfig as al, type MoonpayCurrencyCode as am, type MoonpayPaymentMethod as an, type Quantity as ao, type TransactionLog as ap, type TransactionReceipt as aq, type NonEmptyArray as ar, type EmailWithMetadata as as, type PhoneWithMetadata as at, type WalletWithMetadata as au, type Google as av, type Twitter as aw, type Discord as ax, type Github as ay, type LinkedIn as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type SupportedSolanaTransaction as d, type SolanaCluster as e, type CreateWalletOptions as f, type LoginToFrame as g, type LoginToMiniApp as h, type SendTransactionModalUIOptions as i, type SignMessageModalUIOptions as j, type SolanaStandardWallet as k, type SolanaFundingConfig as l, SolanaWalletConnector as m, type PrivyFarcasterSignerInitResponse as n, type MfaSubmitArgs as o, type SolanaRpcRequestType as p, type EthereumRpcResponseType as q, type SolanaRpcResponseType as r, type EIP1193Provider as s, toSolanaWalletConnectors as t, type EntropyIdVerifier as u, type RequestArguments as v, WalletConnector as w, PrivyProxyProvider as x, type WalletClientType as y, type ConnectedWalletMetadata as z };
|