@privy-io/react-auth 1.95.1 → 1.95.2-beta-20241126164238

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 (45) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/getEmbeddedConnectedWallet-DTU4T9TJ.js +1 -0
  3. package/dist/cjs/index.js +297 -297
  4. package/dist/cjs/modal-context-I1Fdpr3p.js +1 -0
  5. package/dist/cjs/prepareFundingModalData-Bswl2oe1.js +1 -0
  6. package/dist/cjs/privy-context-CLUwX6HZ.js +1 -0
  7. package/dist/cjs/smart-wallets-DK3QIVaY.js +1 -0
  8. package/dist/cjs/smart-wallets.js +1 -1
  9. package/dist/cjs/solana.js +1 -1
  10. package/dist/cjs/ui.js +2 -2
  11. package/dist/cjs/{useFundWallet-AQyGHV8J.js → useFundWallet-CF0b-Bzz.js} +3 -3
  12. package/dist/cjs/useWallets-fER6uSW_.js +1 -0
  13. package/dist/dts/index.d.mts +4 -4
  14. package/dist/dts/index.d.ts +4 -4
  15. package/dist/dts/solana.d.mts +79 -4
  16. package/dist/dts/solana.d.ts +79 -4
  17. package/dist/dts/{types-BwcPm4mZ.d.mts → types-CIYA8UPe.d.mts} +1 -1
  18. package/dist/dts/{types-BwcPm4mZ.d.ts → types-CIYA8UPe.d.ts} +1 -1
  19. package/dist/dts/ui.d.mts +1 -1
  20. package/dist/dts/ui.d.ts +1 -1
  21. package/dist/dts/{solana-D5xAHDt7.d.mts → useFundSolanaWallet-B_Whp-i8.d.mts} +1 -1
  22. package/dist/dts/{solana-D5xAHDt7.d.ts → useFundSolanaWallet-B_Whp-i8.d.ts} +1 -1
  23. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  24. package/dist/esm/getEmbeddedConnectedWallet-CSSBWE2p.mjs +1 -0
  25. package/dist/esm/index.mjs +303 -303
  26. package/dist/esm/modal-context-CM9V79tL.mjs +1 -0
  27. package/dist/esm/prepareFundingModalData-htghSii6.mjs +1 -0
  28. package/dist/esm/privy-context-DPGGTP4R.mjs +1 -0
  29. package/dist/esm/smart-wallets-BhrSszZr.mjs +1 -0
  30. package/dist/esm/smart-wallets.mjs +1 -1
  31. package/dist/esm/solana.mjs +1 -1
  32. package/dist/esm/ui.mjs +8 -8
  33. package/dist/esm/{useFundWallet-ByXRecrX.mjs → useFundWallet-BtKi7j4a.mjs} +6 -6
  34. package/dist/esm/useWallets-DmUWD7Ng.mjs +1 -0
  35. package/package.json +2 -2
  36. package/dist/cjs/getEmbeddedConnectedWallet-CwyoH1JD.js +0 -1
  37. package/dist/cjs/privy-context-Cyf8aoOj.js +0 -1
  38. package/dist/cjs/smart-wallets-DfLkHwnE.js +0 -1
  39. package/dist/cjs/useSolanaWallets-X3yIJO4K.js +0 -1
  40. package/dist/cjs/useWallets-CjE39UqR.js +0 -1
  41. package/dist/esm/getEmbeddedConnectedWallet-DQ7twXmj.mjs +0 -1
  42. package/dist/esm/privy-context-CrcnzDDK.mjs +0 -1
  43. package/dist/esm/smart-wallets-Ql59pTa3.mjs +0 -1
  44. package/dist/esm/useSolanaWallets-ByOYtyDO.mjs +0 -1
  45. package/dist/esm/useWallets--4nIqKdE.mjs +0 -1
@@ -1,12 +1,87 @@
1
- export { aL as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-BwcPm4mZ.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-D5xAHDt7.js';
1
+ export { e as ConnectedSolanaWallet, g as SolanaAdapterConnector, S as SolanaTransactionReceipt, h as SupportedSolanaTransaction, t as toSolanaWalletConnectors } from './types-CIYA8UPe.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './useFundSolanaWallet-B_Whp-i8.js';
3
+ import { Connection, Transaction, VersionedTransaction } from '@solana/web3.js';
4
+ import { SolanaCluster } from '@privy-io/js-sdk-core';
3
5
  import '@ethersproject/providers';
4
6
  import '@solana/wallet-adapter-base';
5
7
  import 'react';
6
8
  import 'viem';
7
9
  import 'web3-core';
8
- import '@privy-io/js-sdk-core';
9
10
  import '@privy-io/public-api';
10
11
  import 'eventemitter3';
11
12
  import '@metamask/eth-sig-util';
12
- import '@solana/web3.js';
13
+
14
+ /**
15
+ * Response body for swap and bridge quotes from the Reservoir Relay API.
16
+ *
17
+ * Some properties have been omitted for brevity/we don't use them. Full shape was pulled from
18
+ * https://github.com/reservoirprotocol/relay-kit/blob/a0bfcd6e48746bdecc471123bde5951f60975136/packages/sdk/src/types/Execute.ts#L25
19
+ */
20
+ type EvmTransactionData = {
21
+ from: string;
22
+ to: string;
23
+ data: string;
24
+ value: string;
25
+ maxFeePerGas: string;
26
+ maxPriorityFeePerGas: string;
27
+ chainId: number;
28
+ };
29
+ type SolanaTransactionData = {
30
+ instructions: Array<{
31
+ keys: Array<{
32
+ pubkey: string;
33
+ isSigner: boolean;
34
+ isWritable: boolean;
35
+ }>;
36
+ programId: string;
37
+ data: string;
38
+ }>;
39
+ addressLookupTableAddresses?: string[];
40
+ };
41
+ type Quote<Data extends EvmTransactionData | SolanaTransactionData> = {
42
+ steps: Array<{
43
+ id: string;
44
+ action: string;
45
+ description: string;
46
+ kind: 'transaction' | 'signature';
47
+ requestId: string;
48
+ items?: Array<{
49
+ status: 'complete' | 'incomplete';
50
+ data: Data;
51
+ }>;
52
+ }>;
53
+ };
54
+
55
+ declare const SOLANA_FUNDING_PLUGIN_ID: unique symbol;
56
+
57
+ type SolanaFundingPlugin = {
58
+ id: typeof SOLANA_FUNDING_PLUGIN_ID;
59
+ type: 'solana-funding';
60
+ getBalannce: (o: {
61
+ address: string;
62
+ cluster: SolanaCluster;
63
+ }) => Promise<number>;
64
+ initTransfer: ({ from, to, amount, cluster, }: {
65
+ to: string;
66
+ from: string;
67
+ amount: bigint;
68
+ cluster: SolanaCluster;
69
+ }) => Promise<{
70
+ connection: Connection;
71
+ transaction: Transaction;
72
+ }>;
73
+ initBridge: ({ quote, from, cluster, }: {
74
+ quote: Quote<SolanaTransactionData>;
75
+ from: string;
76
+ cluster: SolanaCluster;
77
+ }) => Promise<{
78
+ connection: Connection;
79
+ transaction: VersionedTransaction;
80
+ } | undefined>;
81
+ };
82
+
83
+ declare const plugin: SolanaFundingPlugin;
84
+
85
+ declare const useSolanaPlugin: () => void;
86
+
87
+ export { plugin, useSolanaPlugin };
@@ -1,12 +1,87 @@
1
- export { aL as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-BwcPm4mZ.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-D5xAHDt7.js';
1
+ export { e as ConnectedSolanaWallet, g as SolanaAdapterConnector, S as SolanaTransactionReceipt, h as SupportedSolanaTransaction, t as toSolanaWalletConnectors } from './types-CIYA8UPe.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './useFundSolanaWallet-B_Whp-i8.js';
3
+ import { Connection, Transaction, VersionedTransaction } from '@solana/web3.js';
4
+ import { SolanaCluster } from '@privy-io/js-sdk-core';
3
5
  import '@ethersproject/providers';
4
6
  import '@solana/wallet-adapter-base';
5
7
  import 'react';
6
8
  import 'viem';
7
9
  import 'web3-core';
8
- import '@privy-io/js-sdk-core';
9
10
  import '@privy-io/public-api';
10
11
  import 'eventemitter3';
11
12
  import '@metamask/eth-sig-util';
12
- import '@solana/web3.js';
13
+
14
+ /**
15
+ * Response body for swap and bridge quotes from the Reservoir Relay API.
16
+ *
17
+ * Some properties have been omitted for brevity/we don't use them. Full shape was pulled from
18
+ * https://github.com/reservoirprotocol/relay-kit/blob/a0bfcd6e48746bdecc471123bde5951f60975136/packages/sdk/src/types/Execute.ts#L25
19
+ */
20
+ type EvmTransactionData = {
21
+ from: string;
22
+ to: string;
23
+ data: string;
24
+ value: string;
25
+ maxFeePerGas: string;
26
+ maxPriorityFeePerGas: string;
27
+ chainId: number;
28
+ };
29
+ type SolanaTransactionData = {
30
+ instructions: Array<{
31
+ keys: Array<{
32
+ pubkey: string;
33
+ isSigner: boolean;
34
+ isWritable: boolean;
35
+ }>;
36
+ programId: string;
37
+ data: string;
38
+ }>;
39
+ addressLookupTableAddresses?: string[];
40
+ };
41
+ type Quote<Data extends EvmTransactionData | SolanaTransactionData> = {
42
+ steps: Array<{
43
+ id: string;
44
+ action: string;
45
+ description: string;
46
+ kind: 'transaction' | 'signature';
47
+ requestId: string;
48
+ items?: Array<{
49
+ status: 'complete' | 'incomplete';
50
+ data: Data;
51
+ }>;
52
+ }>;
53
+ };
54
+
55
+ declare const SOLANA_FUNDING_PLUGIN_ID: unique symbol;
56
+
57
+ type SolanaFundingPlugin = {
58
+ id: typeof SOLANA_FUNDING_PLUGIN_ID;
59
+ type: 'solana-funding';
60
+ getBalannce: (o: {
61
+ address: string;
62
+ cluster: SolanaCluster;
63
+ }) => Promise<number>;
64
+ initTransfer: ({ from, to, amount, cluster, }: {
65
+ to: string;
66
+ from: string;
67
+ amount: bigint;
68
+ cluster: SolanaCluster;
69
+ }) => Promise<{
70
+ connection: Connection;
71
+ transaction: Transaction;
72
+ }>;
73
+ initBridge: ({ quote, from, cluster, }: {
74
+ quote: Quote<SolanaTransactionData>;
75
+ from: string;
76
+ cluster: SolanaCluster;
77
+ }) => Promise<{
78
+ connection: Connection;
79
+ transaction: VersionedTransaction;
80
+ } | undefined>;
81
+ };
82
+
83
+ declare const plugin: SolanaFundingPlugin;
84
+
85
+ declare const useSolanaPlugin: () => void;
86
+
87
+ export { plugin, useSolanaPlugin };
@@ -2091,4 +2091,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
2091
2091
  type SolanaRpcRequestType = solana_signMessage;
2092
2092
  type SolanaRpcResponseType = solana_signMessageResponse;
2093
2093
 
2094
- export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type PasskeyWithMetadata as aA, type Email as aB, type Phone as aC, type TransactionUIOptions as aD, type ContractUIOptions as aE, type NativeFundingConfig as aF, type MoonpayFundingConfig as aG, type PriceDisplayOptions as aH, type Farcaster as aI, type Passkey as aJ, type LoginMethodOrderOption as aK, type ConnectedSolanaWallet as aL, PrivyErrorCode as aM, type LinkedAccountWithMetadata as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type GoogleOAuthWithMetadata as aq, type TwitterOAuthWithMetadata as ar, type DiscordOAuthWithMetadata as as, type GithubOAuthWithMetadata as at, type TiktokOAuthWithMetadata as au, type LinkedInOAuthWithMetadata as av, type AppleOAuthWithMetadata as aw, type FarcasterWithMetadata as ax, type TelegramWithMetadata as ay, type CrossAppAccountWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
2094
+ export { type MoonpaySignResponse as $, type BaseConnectedWallet as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectWalletModalOptions as D, type EthereumRpcRequestType as E, type FundingMethod as F, type LoginModalOptions as G, type CreateWalletOptions as H, type SetWalletRecoveryOptions as I, type SignMessageModalUIOptions as J, type SignTypedDataParams as K, type LoginMethod as L, type MfaMethod as M, type UnsignedTransactionRequest as N, type OAuthTokens as O, PrivyErrorCode as P, type SendTransactionModalUIOptions as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type FundWalletConfig as T, type User as U, type TransactionReceipt as V, type Wallet as W, type ConnectedWallet as X, type CrossAppProviderDetails as Y, type OAuthProviderType as Z, type MoonpaySignRequest as _, type LinkedAccountWithMetadata as a, type SmartWalletConfig as a0, type PrivyServerConfig as a1, type SiweWalletMetadata as a2, type TelegramAuthResult as a3, type OAuthUserInfo as a4, type OAuthFlowState as a5, type LoginWithCode as a6, type OtpFlowState as a7, type PasskeyFlowState as a8, type SiweFlowState as a9, type TiktokOAuthWithMetadata as aA, type LinkedInOAuthWithMetadata as aB, type AppleOAuthWithMetadata as aC, type FarcasterWithMetadata as aD, type TelegramWithMetadata as aE, type CrossAppAccountWithMetadata as aF, type PasskeyWithMetadata as aG, type Email as aH, type Phone as aI, type TransactionUIOptions as aJ, type ContractUIOptions as aK, type NativeFundingConfig as aL, type MoonpayFundingConfig as aM, type PriceDisplayOptions as aN, type Farcaster as aO, type Passkey as aP, type LoginMethodOrderOption as aQ, type UnsignedTransactionRequestWithChainId as aa, type CustomAuthFlowState as ab, type TypedMessage as ac, type MessageTypes as ad, type MoonpayConfig as ae, type MoonpayCurrencyCode as af, type MoonpayPaymentMethod as ag, type Quantity as ah, type TransactionLog as ai, type NonEmptyArray as aj, type EmailWithMetadata as ak, type PhoneWithMetadata as al, type WalletWithMetadata as am, type Google as an, type Twitter as ao, type Discord as ap, type Github as aq, type LinkedIn as ar, type Apple as as, type Tiktok as at, type Telegram as au, type CrossAppAccount as av, type GoogleOAuthWithMetadata as aw, type TwitterOAuthWithMetadata as ax, type DiscordOAuthWithMetadata as ay, type GithubOAuthWithMetadata as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type SolanaCluster as d, type ConnectedSolanaWallet as e, type SolanaFundingConfig as f, SolanaWalletConnector as g, type SupportedSolanaTransaction as h, type PrivyFarcasterSignerInitResponse as i, type MfaSubmitArgs as j, type SolanaRpcRequestType as k, type EthereumRpcResponseType as l, type SolanaRpcResponseType as m, type PrivyClientConfig as n, type EIP1193Provider as o, WalletTimeoutError as p, type RpcConfig as q, type EntropyIdVerifier as r, type RequestArguments as s, toSolanaWalletConnectors as t, WalletConnector as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type ConnectorType as x, type WalletListEntry as y, type ExternalWalletsConfig as z };
@@ -2091,4 +2091,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
2091
2091
  type SolanaRpcRequestType = solana_signMessage;
2092
2092
  type SolanaRpcResponseType = solana_signMessageResponse;
2093
2093
 
2094
- export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type PasskeyWithMetadata as aA, type Email as aB, type Phone as aC, type TransactionUIOptions as aD, type ContractUIOptions as aE, type NativeFundingConfig as aF, type MoonpayFundingConfig as aG, type PriceDisplayOptions as aH, type Farcaster as aI, type Passkey as aJ, type LoginMethodOrderOption as aK, type ConnectedSolanaWallet as aL, PrivyErrorCode as aM, type LinkedAccountWithMetadata as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type GoogleOAuthWithMetadata as aq, type TwitterOAuthWithMetadata as ar, type DiscordOAuthWithMetadata as as, type GithubOAuthWithMetadata as at, type TiktokOAuthWithMetadata as au, type LinkedInOAuthWithMetadata as av, type AppleOAuthWithMetadata as aw, type FarcasterWithMetadata as ax, type TelegramWithMetadata as ay, type CrossAppAccountWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
2094
+ export { type MoonpaySignResponse as $, type BaseConnectedWallet as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectWalletModalOptions as D, type EthereumRpcRequestType as E, type FundingMethod as F, type LoginModalOptions as G, type CreateWalletOptions as H, type SetWalletRecoveryOptions as I, type SignMessageModalUIOptions as J, type SignTypedDataParams as K, type LoginMethod as L, type MfaMethod as M, type UnsignedTransactionRequest as N, type OAuthTokens as O, PrivyErrorCode as P, type SendTransactionModalUIOptions as Q, type RuntimeLoginOverridableOptions as R, type SolanaTransactionReceipt as S, type FundWalletConfig as T, type User as U, type TransactionReceipt as V, type Wallet as W, type ConnectedWallet as X, type CrossAppProviderDetails as Y, type OAuthProviderType as Z, type MoonpaySignRequest as _, type LinkedAccountWithMetadata as a, type SmartWalletConfig as a0, type PrivyServerConfig as a1, type SiweWalletMetadata as a2, type TelegramAuthResult as a3, type OAuthUserInfo as a4, type OAuthFlowState as a5, type LoginWithCode as a6, type OtpFlowState as a7, type PasskeyFlowState as a8, type SiweFlowState as a9, type TiktokOAuthWithMetadata as aA, type LinkedInOAuthWithMetadata as aB, type AppleOAuthWithMetadata as aC, type FarcasterWithMetadata as aD, type TelegramWithMetadata as aE, type CrossAppAccountWithMetadata as aF, type PasskeyWithMetadata as aG, type Email as aH, type Phone as aI, type TransactionUIOptions as aJ, type ContractUIOptions as aK, type NativeFundingConfig as aL, type MoonpayFundingConfig as aM, type PriceDisplayOptions as aN, type Farcaster as aO, type Passkey as aP, type LoginMethodOrderOption as aQ, type UnsignedTransactionRequestWithChainId as aa, type CustomAuthFlowState as ab, type TypedMessage as ac, type MessageTypes as ad, type MoonpayConfig as ae, type MoonpayCurrencyCode as af, type MoonpayPaymentMethod as ag, type Quantity as ah, type TransactionLog as ai, type NonEmptyArray as aj, type EmailWithMetadata as ak, type PhoneWithMetadata as al, type WalletWithMetadata as am, type Google as an, type Twitter as ao, type Discord as ap, type Github as aq, type LinkedIn as ar, type Apple as as, type Tiktok as at, type Telegram as au, type CrossAppAccount as av, type GoogleOAuthWithMetadata as aw, type TwitterOAuthWithMetadata as ax, type DiscordOAuthWithMetadata as ay, type GithubOAuthWithMetadata as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type SolanaCluster as d, type ConnectedSolanaWallet as e, type SolanaFundingConfig as f, SolanaWalletConnector as g, type SupportedSolanaTransaction as h, type PrivyFarcasterSignerInitResponse as i, type MfaSubmitArgs as j, type SolanaRpcRequestType as k, type EthereumRpcResponseType as l, type SolanaRpcResponseType as m, type PrivyClientConfig as n, type EIP1193Provider as o, WalletTimeoutError as p, type RpcConfig as q, type EntropyIdVerifier as r, type RequestArguments as s, toSolanaWalletConnectors as t, WalletConnector as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type ConnectorType as x, type WalletListEntry as y, type ExternalWalletsConfig as z };
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 } from './types-BwcPm4mZ.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-CIYA8UPe.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
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 } from './types-BwcPm4mZ.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-CIYA8UPe.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -1,4 +1,4 @@
1
- import { aM as PrivyErrorCode, c as User, Q as LoginMethod, aN as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aL as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-BwcPm4mZ.js';
1
+ import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, C as Chain, F as FundingMethod, d as SolanaCluster, e as ConnectedSolanaWallet, f as SolanaFundingConfig } from './types-CIYA8UPe.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { aM as PrivyErrorCode, c as User, Q as LoginMethod, aN as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aL as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-BwcPm4mZ.js';
1
+ import { P as PrivyErrorCode, U as User, L as LoginMethod, a as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, b as BaseConnectedSolanaWallet, W as Wallet, M as MfaMethod, c as UserRecoveryMethod, S as SolanaTransactionReceipt, C as Chain, F as FundingMethod, d as SolanaCluster, e as ConnectedSolanaWallet, f as SolanaFundingConfig } from './types-CIYA8UPe.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
 
4
4
  /**
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{createWalletClient as r,custom as t}from"viem";import{toAccount as n}from"viem/accounts";import{abstractTestnet as a}from"viem/chains";import{j as i,u as s,w as o}from"./privy-context-CrcnzDDK.mjs";import{u as c,M as p,g as l}from"./getEmbeddedConnectedWallet-DQ7twXmj.mjs";import{a4 as m,U as d}from"./useWallets--4nIqKdE.mjs";import{c as E}from"./smart-wallets-Ql59pTa3.mjs";import"ofetch";import"@ethersproject/address";import"react";import"react/jsx-runtime";import"@ethersproject/providers";import"tinycolor2";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"zod";import"bs58";import"ethers";import"libphonenumber-js/max";function u(){let{user:u}=i(),{noPromptOnSignature:g,openPrivyModal:y,chains:f,appId:T,rpcConfig:D}=s(),{wallets:I}=m(),{setModalData:h}=c(),N=async()=>{let i=l(I);if(!i)throw Error("No connected wallet found");let s=f.find((e=>e.id===a.id));if(!s)throw Error("Chain not configured");await i.switchChain(s.id);let o=await i.getEthereumProvider(),c=r({account:i.address,transport:t(o)}),p=n({address:i.address,signMessage:c.signMessage,signTransaction:c.signTransaction,signTypedData:c.signTypedData});return await e({chain:{...s,rpcUrls:{default:{http:[d(s,D,T)]}}},signer:p})};return{signMessage:async({message:e})=>{let r=await N();return new Promise((async(t,n)=>{let{entropyId:a,entropyIdVerifier:i}=o(u);g.current=!0,h({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>r.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},signTypedData:async e=>{let r=await N();return new Promise((async(t,n)=>{g.current=!0;let{entropyId:a,entropyIdVerifier:i}=o(u);h({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:p.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{}}}),y(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let r=await N(),t=[];return t="calls"in e&&void 0!==e.calls?[...e.calls]:[e],new Promise((async(n,a)=>{g.current=!0;let{entropyId:i,entropyIdVerifier:s}=o(u);h({connectWallet:{entropyId:i,entropyIdVerifier:s,onCompleteNavigateTo:p.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:E({calls:t,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:i,entropyIdVerifier:s,transactingWallet:{address:r.account.address,walletIndex:null},getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>t.length>1?r.sendTransactionBatch(e):r.sendTransaction(e),onSuccess:e=>n(e.hash),onFailure:a,uiOptions:{}}}),y(p.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))}}}export{u as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{createWalletClient as t,custom as r}from"viem";import{toAccount as n}from"viem/accounts";import{abstractTestnet as a}from"viem/chains";import{G as i,B as o,ad as s}from"./privy-context-DPGGTP4R.mjs";import{u as c,M as m}from"./modal-context-CM9V79tL.mjs";import{u as p,n as l}from"./useWallets-DmUWD7Ng.mjs";import{g as d}from"./getEmbeddedConnectedWallet-CSSBWE2p.mjs";import{c as E}from"./smart-wallets-BhrSszZr.mjs";import"ofetch";import"@ethersproject/address";import"react/jsx-runtime";import"react";import"tinycolor2";import"@ethersproject/providers";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";import"zod";import"bs58";import"ethers";import"libphonenumber-js/max";function u(){let{user:u}=i(),{noPromptOnSignature:g,openPrivyModal:y,chains:f,appId:T,rpcConfig:D}=o(),{wallets:I}=p(),{setModalData:h}=c(),N=async()=>{let i=d(I);if(!i)throw Error("No connected wallet found");let o=f.find((e=>e.id===a.id));if(!o)throw Error("Chain not configured");await i.switchChain(o.id);let s=await i.getEthereumProvider(),c=t({account:i.address,transport:r(s)}),m=n({address:i.address,signMessage:c.signMessage,signTransaction:c.signTransaction,signTypedData:c.signTypedData});return await e({chain:{...o,rpcUrls:{default:{http:[l(o,D,T)]}}},signer:m})};return{signMessage:async({message:e})=>{let t=await N();return new Promise((async(r,n)=>{let{entropyId:a,entropyIdVerifier:i}=s(u);g.current=!0,h({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:m.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>t.signMessage({message:e}),onSuccess:e=>r(e),onFailure:n,uiOptions:{}}}),y(m.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},signTypedData:async e=>{let t=await N();return new Promise((async(r,n)=>{g.current=!0;let{entropyId:a,entropyIdVerifier:i}=s(u);h({connectWallet:{entropyId:a,entropyIdVerifier:i,onCompleteNavigateTo:m.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN,onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>t.signTypedData(e),onSuccess:e=>r(e),onFailure:n,uiOptions:{}}}),y(m.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let t=await N(),r=[];return r="calls"in e&&void 0!==e.calls?[...e.calls]:[e],new Promise((async(n,a)=>{g.current=!0;let{entropyId:i,entropyIdVerifier:o}=s(u);h({connectWallet:{entropyId:i,entropyIdVerifier:o,onCompleteNavigateTo:m.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN,onFailure:()=>{}},sendTransaction:{transactionRequests:E({calls:r,chain:t.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:i,entropyIdVerifier:o,transactingWallet:{address:t.account.address,walletIndex:null},getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r.length>1?t.sendTransactionBatch(e):t.sendTransaction(e),onSuccess:e=>n(e.hash),onFailure:a,uiOptions:{}}}),y(m.EMBEDDED_WALLET_CONNECTING_SCREEN)})).finally((()=>{g.current=!1}))}}}export{u as useAbstractSmartWallets};
@@ -0,0 +1 @@
1
+ function e(e){return e.find((e=>"privy"===e.walletClientType&&"embedded"===e.connectorType&&!e.imported))??null}export{e as g};