@privy-io/react-auth 2.5.0 → 2.6.0-beta-20250226191315

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.
Files changed (39) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/{importWallet-BtdsBO9M.js → importWallet-BhQ3FPCk.js} +1 -1
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/{prepareFundingModalData-CMUHp5LX.js → prepareFundingModalData-DgIFwnFX.js} +1 -1
  5. package/dist/cjs/{smart-wallets-DHKPQ7Hq.js → smart-wallets-C2qNlSmy.js} +1 -1
  6. package/dist/cjs/smart-wallets.js +1 -1
  7. package/dist/cjs/solana.js +1 -1
  8. package/dist/cjs/ui.js +1 -1
  9. package/dist/cjs/{useActiveWallet-CvVqVDpF.js → useActiveWallet-C7kSBhFG.js} +1 -1
  10. package/dist/cjs/{useFundWallet-CdZgj4jB.js → useFundWallet-0hWzXm5r.js} +1 -1
  11. package/dist/cjs/useWallets-BwQl7PE9.js +1 -0
  12. package/dist/dts/farcaster.d.mts +1 -1
  13. package/dist/dts/farcaster.d.ts +1 -1
  14. package/dist/dts/index.d.mts +4 -4
  15. package/dist/dts/index.d.ts +4 -4
  16. package/dist/dts/smart-wallets.d.mts +1 -1
  17. package/dist/dts/smart-wallets.d.ts +1 -1
  18. package/dist/dts/solana.d.mts +4 -4
  19. package/dist/dts/solana.d.ts +4 -4
  20. package/dist/dts/{types-PXMhPoaJ.d.mts → types-cJoXquFV.d.mts} +6 -1
  21. package/dist/dts/{types-PXMhPoaJ.d.ts → types-cJoXquFV.d.ts} +6 -1
  22. package/dist/dts/ui.d.mts +1 -1
  23. package/dist/dts/ui.d.ts +1 -1
  24. package/dist/dts/{useSolanaWallets-CKvyD1ZQ.d.mts → useSolanaWallets-C6q1MrJz.d.mts} +1 -1
  25. package/dist/dts/{useSolanaWallets-CKvyD1ZQ.d.ts → useSolanaWallets-C6q1MrJz.d.ts} +1 -1
  26. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  27. package/dist/esm/{importWallet-CuDZ5ksz.mjs → importWallet-D8ELt7bt.mjs} +1 -1
  28. package/dist/esm/index.mjs +2 -2
  29. package/dist/esm/{prepareFundingModalData-Dv7ze5Ty.mjs → prepareFundingModalData-C-5u93ll.mjs} +1 -1
  30. package/dist/esm/{smart-wallets-Bq9f1kpC.mjs → smart-wallets-CGuxJeB7.mjs} +1 -1
  31. package/dist/esm/smart-wallets.mjs +1 -1
  32. package/dist/esm/solana.mjs +1 -1
  33. package/dist/esm/ui.mjs +1 -1
  34. package/dist/esm/{useActiveWallet-GrupFUTI.mjs → useActiveWallet-D1MyMvZC.mjs} +1 -1
  35. package/dist/esm/{useFundWallet-BNlRCc3a.mjs → useFundWallet-C6gImZc-.mjs} +1 -1
  36. package/dist/esm/useWallets-CkDw0BZc.mjs +1 -0
  37. package/package.json +3 -3
  38. package/dist/cjs/useWallets-BM8XHFTr.js +0 -1
  39. package/dist/esm/useWallets-CIsjbJl7.mjs +0 -1
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-PXMhPoaJ.js';
10
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-cJoXquFV.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
13
  import 'eventemitter3';
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
7
7
  import * as viem from 'viem';
8
8
  import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
9
9
  import { SmartWalletType } from '@privy-io/js-sdk-core';
10
- import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-PXMhPoaJ.js';
10
+ import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-cJoXquFV.js';
11
11
  import '@solana/wallet-adapter-base';
12
12
  import '@privy-io/public-api';
13
13
  import 'eventemitter3';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-PXMhPoaJ.js';
2
- export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-PXMhPoaJ.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-CKvyD1ZQ.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CKvyD1ZQ.js';
1
+ import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-cJoXquFV.js';
2
+ export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-cJoXquFV.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-C6q1MrJz.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-C6q1MrJz.js';
5
5
  import { SendTransactionOptions } from '@solana/wallet-adapter-base';
6
6
  import { Connection } from '@solana/web3.js';
7
7
  import 'react';
@@ -1,7 +1,7 @@
1
- import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-PXMhPoaJ.js';
2
- export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-PXMhPoaJ.js';
3
- import { P as PrivyEvents } from './useSolanaWallets-CKvyD1ZQ.js';
4
- export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-CKvyD1ZQ.js';
1
+ import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-cJoXquFV.js';
2
+ export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-cJoXquFV.js';
3
+ import { P as PrivyEvents } from './useSolanaWallets-C6q1MrJz.js';
4
+ export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-C6q1MrJz.js';
5
5
  import { SendTransactionOptions } from '@solana/wallet-adapter-base';
6
6
  import { Connection } from '@solana/web3.js';
7
7
  import 'react';
@@ -1707,7 +1707,12 @@ interface AllowlistConfig {
1707
1707
  }
1708
1708
  type EmbeddedWalletCreateOnLoginConfig = 'users-without-wallets' | 'all-users' | 'off';
1709
1709
  interface EmbeddedWalletsConfig {
1710
- createOnLogin: EmbeddedWalletCreateOnLoginConfig;
1710
+ ethereum: {
1711
+ createOnLogin: EmbeddedWalletCreateOnLoginConfig;
1712
+ };
1713
+ solana: {
1714
+ createOnLogin: EmbeddedWalletCreateOnLoginConfig;
1715
+ };
1711
1716
  requireUserOwnedRecoveryOnCreate: boolean;
1712
1717
  userOwnedRecoveryOptions: UserRecoveryMethod[];
1713
1718
  }
@@ -1707,7 +1707,12 @@ interface AllowlistConfig {
1707
1707
  }
1708
1708
  type EmbeddedWalletCreateOnLoginConfig = 'users-without-wallets' | 'all-users' | 'off';
1709
1709
  interface EmbeddedWalletsConfig {
1710
- createOnLogin: EmbeddedWalletCreateOnLoginConfig;
1710
+ ethereum: {
1711
+ createOnLogin: EmbeddedWalletCreateOnLoginConfig;
1712
+ };
1713
+ solana: {
1714
+ createOnLogin: EmbeddedWalletCreateOnLoginConfig;
1715
+ };
1711
1716
  requireUserOwnedRecoveryOnCreate: boolean;
1712
1717
  userOwnedRecoveryOptions: UserRecoveryMethod[];
1713
1718
  }
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, C as Chain } from './types-PXMhPoaJ.js';
2
+ import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-cJoXquFV.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
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, C as Chain } from './types-PXMhPoaJ.js';
2
+ import { R as RuntimeLoginOverridableOptions, C as Chain } from './types-cJoXquFV.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Cluster } from '@privy-io/js-sdk-core';
5
5
  import '@solana/wallet-adapter-base';
@@ -1,4 +1,4 @@
1
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-PXMhPoaJ.js';
1
+ import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-cJoXquFV.js';
2
2
  import { MouseEvent } from 'react';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-PXMhPoaJ.js';
1
+ import { P as PrivyErrorCode, U as User, a as LoginMethod, b as LinkedAccountWithMetadata, B as BaseConnectedEthereumWallet, c as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, d as UserRecoveryMethod, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, O as OAuthTokens, C as Chain, F as FundingMethod, f as SolanaCluster, g as ConnectedSolanaWallet, h as CreateWalletOptions } from './types-cJoXquFV.js';
2
2
  import { MouseEvent } from 'react';
3
3
 
4
4
  /**
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{hexToNumber as n,createWalletClient as r,custom as a,http as t}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as s}from"viem/chains";import{r as o,E as c,u as l,ab as d,M as p}from"./useWallets-CIsjbJl7.mjs";import{u as m}from"./internal-context-mSHyF0Gq.mjs";import{a as E}from"./getPublicClient-wHgCncHx.mjs";import{g as u}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as y}from"./smart-wallets-Bq9f1kpC.mjs";import"viem/utils";import"react/jsx-runtime";import"react";import"tinycolor2";import"ofetch";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"@privy-io/js-sdk-core";function g(){let{user:g}=o(),{hideWalletUIs:f,openPrivyModal:I,chains:T,appId:C,rpcConfig:N}=m(),{wallets:D}=c(),{setModalData:_}=l(),h=async(o=s.id)=>{let c=u(D);if(!c)throw Error("No connected wallet found");let l="string"==typeof o?n(o):o;if(![s.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=T.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await c.switchChain(d.id);let p=await c.getEthereumProvider(),m=r({account:c.address,transport:a(p)}),y=i({address:c.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:t(E(d,N,C)),publicTransport:t(E(d,N,C)),signer:y})};return{signMessage:async({message:e},n)=>{let r=await h(n);return new Promise((async(n,a)=>{let{entropyId:t,entropyIdVerifier:i}=d(g);f.current=!0,_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTypedData:async(e,n)=>{let r=await h(n);return new Promise((async(n,a)=>{f.current=!0;let{entropyId:t,entropyIdVerifier:i}=d(g);_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},sendTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>a?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>{if(!a)return n.signTransaction(e);throw Error("Batch transactions not supported for signing")},onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))}}}export{g as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{hexToNumber as n,createWalletClient as r,custom as a,http as t}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as s}from"viem/chains";import{r as o,E as c,u as l,ab as d,M as p}from"./useWallets-CkDw0BZc.mjs";import{u as m}from"./internal-context-mSHyF0Gq.mjs";import{a as E}from"./getPublicClient-wHgCncHx.mjs";import{g as u}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as y}from"./smart-wallets-CGuxJeB7.mjs";import"viem/utils";import"react/jsx-runtime";import"react";import"tinycolor2";import"ofetch";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"@privy-io/js-sdk-core";function g(){let{user:g}=o(),{hideWalletUIs:f,openPrivyModal:I,chains:T,appId:C,rpcConfig:N}=m(),{wallets:D}=c(),{setModalData:_}=l(),h=async(o=s.id)=>{let c=u(D);if(!c)throw Error("No connected wallet found");let l="string"==typeof o?n(o):o;if(![s.id,2741].includes(l))throw Error("Error, only Abstract chains are supported");let d=T.find((e=>e.id===l));if(!d)throw Error("Chain not configured");await c.switchChain(d.id);let p=await c.getEthereumProvider(),m=r({account:c.address,transport:a(p)}),y=i({address:c.address,signMessage:m.signMessage,signTransaction:m.signTransaction,signTypedData:m.signTypedData});return await e({chain:d,transport:t(E(d,N,C)),publicTransport:t(E(d,N,C)),signer:y})};return{signMessage:async({message:e},n)=>{let r=await h(n);return new Promise((async(n,a)=>{let{entropyId:t,entropyIdVerifier:i}=d(g);f.current=!0,_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTypedData:async(e,n)=>{let r=await h(n);return new Promise((async(n,a)=>{f.current=!0;let{entropyId:t,entropyIdVerifier:i}=d(g);_({connectWallet:{entropyId:t,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>n(e),onFailure:a,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},sendTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>a?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))},signTransaction:async e=>{let n=await h(e.chainId),r=[],a="calls"in e&&void 0!==e.calls;return r=a?[...e.calls]:[e],new Promise((async(t,i)=>{f.current=!0;let{entropyId:s,entropyIdVerifier:o}=d(g);_({connectWallet:{entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:y({calls:r,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:s,entropyIdVerifier:o,transactingWallet:{address:n.account.address,walletIndex:null},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>{if(!a)return n.signTransaction(e);throw Error("Batch transactions not supported for signing")},onSuccess:e=>t(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),I(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{f.current=!1}))}}}export{g as useAbstractSmartWallets};
@@ -1 +1 @@
1
- import{$ as e,a5 as t}from"./useWallets-CIsjbJl7.mjs";import{a,P as r}from"./internal-context-mSHyF0Gq.mjs";const i=async({emitPrivyEvent:i,getAccessToken:n,initializeWalletProxy:o,refreshSessionAndUser:s,user:l},{privateKey:c,chainType:E})=>{if(!l)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");let[T,m]=await Promise.all([n(),o(15e3)]);if(!m||!T)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");await m.importWallet({privateKey:c,accessToken:T,chainType:E});let u=await s(),w="solana"===E?e(u):t(u);if(!w)throw i("createWallet","onError",a.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return i("createWallet","onSuccess",{wallet:w}),w};export{i};
1
+ import{$ as e,a5 as t}from"./useWallets-CkDw0BZc.mjs";import{a,P as r}from"./internal-context-mSHyF0Gq.mjs";const i=async({emitPrivyEvent:i,getAccessToken:n,initializeWalletProxy:o,refreshSessionAndUser:s,user:l},{privateKey:c,chainType:E})=>{if(!l)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");let[T,m]=await Promise.all([n(),o(15e3)]);if(!m||!T)throw i("linkAccount","onError",a.MUST_BE_AUTHENTICATED,{linkMethod:"siwe"}),new r("User must be authenticated before linking an account.");await m.importWallet({privateKey:c,accessToken:T,chainType:E});let u=await s(),w="solana"===E?e(u):t(u);if(!w)throw i("createWallet","onError",a.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to import wallet");return i("createWallet","onSuccess",{wallet:w}),w};export{i};