@privy-io/react-auth 3.0.1 → 3.1.0-beta-20251002001741

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 (37) hide show
  1. package/dist/cjs/SignRequestScreen-DV1Heklf.js +27 -0
  2. package/dist/cjs/abstract-smart-wallets.js +1 -1
  3. package/dist/cjs/index.js +3 -3
  4. package/dist/cjs/{smart-wallets-y1iwNp9C.js → smart-wallets-DeEe61HL.js} +1 -1
  5. package/dist/cjs/smart-wallets.js +1 -1
  6. package/dist/cjs/solana.js +1 -1
  7. package/dist/cjs/ui.js +1 -1
  8. package/dist/cjs/{use-export-wallet-BCC4davd.js → use-export-wallet-tRGLWjW_.js} +1 -1
  9. package/dist/cjs/{useActiveWallet-B5PAGqSK.js → useActiveWallet-gTHZwo4V.js} +1 -1
  10. package/dist/cjs/{usePrivy-D-rpmVV5.js → usePrivy-BEkYq46W.js} +1 -1
  11. package/dist/dts/extended-chains.d.mts +1 -2
  12. package/dist/dts/extended-chains.d.ts +1 -2
  13. package/dist/dts/farcaster.d.mts +1 -2
  14. package/dist/dts/farcaster.d.ts +1 -2
  15. package/dist/dts/index.d.mts +2 -3
  16. package/dist/dts/index.d.ts +2 -3
  17. package/dist/dts/smart-wallets.d.mts +1 -2
  18. package/dist/dts/smart-wallets.d.ts +1 -2
  19. package/dist/dts/solana.d.mts +40 -32
  20. package/dist/dts/solana.d.ts +40 -32
  21. package/dist/dts/{types-D0jOlnAF.d.mts → types-Dj3OrBM7.d.mts} +134 -135
  22. package/dist/dts/{types-D0jOlnAF.d.ts → types-Dj3OrBM7.d.ts} +134 -135
  23. package/dist/dts/ui.d.mts +1 -2
  24. package/dist/dts/ui.d.ts +1 -2
  25. package/dist/esm/SignRequestScreen-BoXouQjU.mjs +25 -0
  26. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  27. package/dist/esm/index.mjs +6 -6
  28. package/dist/esm/{smart-wallets-DXnL6fHN.mjs → smart-wallets-BmQ4aRYi.mjs} +1 -1
  29. package/dist/esm/smart-wallets.mjs +1 -1
  30. package/dist/esm/solana.mjs +1 -1
  31. package/dist/esm/ui.mjs +1 -1
  32. package/dist/esm/{use-export-wallet-Duyde2UB.mjs → use-export-wallet-Cd7-p_d9.mjs} +1 -1
  33. package/dist/esm/{useActiveWallet-58s-VNmj.mjs → useActiveWallet-DbX_sPZP.mjs} +1 -1
  34. package/dist/esm/{usePrivy-ZXeOLg-E.mjs → usePrivy-wMqZ49nw.mjs} +1 -1
  35. package/package.json +6 -12
  36. package/dist/cjs/SignRequestScreen-CN1o6lNS.js +0 -27
  37. package/dist/esm/SignRequestScreen-NOqdMm22.mjs +0 -25
@@ -1,5 +1,5 @@
1
- import { W as Wallet, b as SignMessageModalUIOptions, S as SolanaChain, c as SolanaStandardWallet, C as CreateWalletOptions, a as SendTransactionModalUIOptions, d as SolanaFundingConfig } from './types-D0jOlnAF.js';
2
- export { e as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-D0jOlnAF.js';
1
+ import { W as Wallet, b as SignMessageModalUIOptions, S as SolanaChain, c as SolanaStandardWallet, C as CreateWalletOptions, a as SendTransactionModalUIOptions, d as SolanaFundingConfig } from './types-Dj3OrBM7.js';
2
+ export { e as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-Dj3OrBM7.js';
3
3
  import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
4
4
  import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
5
5
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
@@ -12,7 +12,6 @@ import 'react';
12
12
  import 'viem';
13
13
  import '@privy-io/public-api';
14
14
  import '@base-org/account';
15
- import '@metamask/eth-sig-util';
16
15
 
17
16
  interface UseImportWalletInterface {
18
17
  /**
@@ -198,6 +197,16 @@ interface UseExportWalletInterface {
198
197
  }
199
198
  declare function useExportWallet(): UseExportWalletInterface;
200
199
 
200
+ type SignMessageInput = {
201
+ message: Uint8Array;
202
+ wallet: ConnectedStandardSolanaWallet;
203
+ options?: {
204
+ uiOptions?: SignMessageModalUIOptions;
205
+ };
206
+ };
207
+ type SignMessageOutput = {
208
+ signature: Uint8Array;
209
+ };
201
210
  /**
202
211
  * Use this hook to sign a message using a Solana embedded wallet.
203
212
  */
@@ -205,18 +214,22 @@ type UseSignMessage = {
205
214
  /**
206
215
  * Prompts a user to sign a message using a Solana standard wallet.
207
216
  */
208
- signMessage: (o: {
209
- message: Uint8Array;
210
- wallet: ConnectedStandardSolanaWallet;
211
- options?: {
212
- uiOptions?: SignMessageModalUIOptions;
213
- };
214
- }) => Promise<{
215
- signature: Uint8Array;
216
- }>;
217
+ signMessage(input: SignMessageInput): Promise<SignMessageOutput>;
218
+ signMessage(...inputs: SignMessageInput[]): Promise<SignMessageOutput[]>;
217
219
  };
218
220
  declare function useSignMessage(): UseSignMessage;
219
221
 
222
+ type SignTransactionInput = {
223
+ transaction: Uint8Array;
224
+ wallet: ConnectedStandardSolanaWallet;
225
+ chain?: SolanaChain;
226
+ options?: SolanaSignTransactionOptions & {
227
+ uiOptions?: SendTransactionModalUIOptions;
228
+ };
229
+ };
230
+ type SignTransactionOutput = {
231
+ signedTransaction: Uint8Array;
232
+ };
220
233
  /**
221
234
  * Use this hook to sign a transaction using a Solana embedded wallet.
222
235
  */
@@ -224,22 +237,25 @@ type UseSignTransaction = {
224
237
  /**
225
238
  * Prompts a user to sign a transaction using a Solana standard wallet.
226
239
  */
227
- signTransaction: (o: {
228
- transaction: Uint8Array;
229
- wallet: ConnectedStandardSolanaWallet;
230
- chain?: SolanaChain;
231
- options?: SolanaSignTransactionOptions & {
232
- uiOptions?: SendTransactionModalUIOptions;
233
- };
234
- }) => Promise<{
235
- signedTransaction: Uint8Array;
236
- }>;
240
+ signTransaction(input: SignTransactionInput): Promise<SignTransactionOutput>;
241
+ signTransaction(...inputs: SignTransactionInput[]): Promise<SignTransactionOutput[]>;
237
242
  };
238
243
  /**
239
244
  * Use this hook to sign a transaction using a Solana embedded wallet.
240
245
  */
241
246
  declare function useSignTransaction(): UseSignTransaction;
242
247
 
248
+ type SignAndSendTransactionInput = {
249
+ transaction: Uint8Array;
250
+ wallet: ConnectedStandardSolanaWallet;
251
+ chain?: SolanaChain;
252
+ options?: SolanaSignAndSendTransactionOptions & {
253
+ uiOptions?: SendTransactionModalUIOptions;
254
+ };
255
+ };
256
+ type SignAndSendTransactionOutput = {
257
+ signature: Uint8Array;
258
+ };
243
259
  /**
244
260
  * Use this hook to sign and send a transaction using a Solana standard wallet.
245
261
  */
@@ -247,16 +263,8 @@ type UseSignAndSendTransaction = {
247
263
  /**
248
264
  * Prompts a user to sign and send a transaction using a Solana standard wallet.
249
265
  */
250
- signAndSendTransaction: (o: {
251
- transaction: Uint8Array;
252
- wallet: ConnectedStandardSolanaWallet;
253
- chain?: SolanaChain;
254
- options?: SolanaSignAndSendTransactionOptions & {
255
- uiOptions?: SendTransactionModalUIOptions;
256
- };
257
- }) => Promise<{
258
- signature: Uint8Array;
259
- }>;
266
+ signAndSendTransaction(input: SignAndSendTransactionInput): Promise<SignAndSendTransactionOutput>;
267
+ signAndSendTransaction(...inputs: SignAndSendTransactionInput[]): Promise<SignAndSendTransactionOutput[]>;
260
268
  };
261
269
  declare function useSignAndSendTransaction(): UseSignAndSendTransaction;
262
270
 
@@ -8,143 +8,8 @@ import { createBaseAccountSDK } from '@base-org/account';
8
8
  import { WalletWithFeatures, Wallet as Wallet$1 } from '@wallet-standard/base';
9
9
  import { SolanaSignMessageFeature, SolanaSignTransactionFeature, SolanaSignAndSendTransactionFeature, SolanaSignInFeature } from '@solana/wallet-standard-features';
10
10
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
11
- import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
12
11
  import EventEmitter from 'eventemitter3';
13
12
 
14
- /**
15
- * We support a subset of the provider methods found here:
16
- *
17
- * https://ethereum.org/en/developers/docs/apis/json-rpc/#json-rpc-methods
18
- *
19
- * For now, we're focused on signing-related methods because the iframe (this code)
20
- * is the only place that has access to the private key and thus is the only one
21
- * who can create signatures. All other methods do not need the private key and
22
- * can therefore be implemented by clients of the iframe.
23
- */
24
-
25
- declare const SUPPORTED_ETHEREUM_RPC_METHODS: readonly ["eth_sign", "eth_populateTransactionRequest", "eth_signTransaction", "personal_sign", "eth_signTypedData_v4", "csw_signUserOperation", "secp256k1_sign"];
26
- type EthereumRpcMethodType = (typeof SUPPORTED_ETHEREUM_RPC_METHODS)[number];
27
- declare const SUPPORTED_SOLANA_RPC_METHODS: string[];
28
- type SolanaRpcMethodType = (typeof SUPPORTED_SOLANA_RPC_METHODS)[number];
29
- type Quantity = string | number | bigint;
30
- type UnsignedTransactionRequest = {
31
- from?: string;
32
- to?: string;
33
- nonce?: Quantity;
34
- gasLimit?: Quantity;
35
- gasPrice?: Quantity;
36
- data?: ArrayLike<number> | string;
37
- value?: Quantity;
38
- chainId?: number;
39
- type?: number;
40
- accessList?: Array<{
41
- address: string;
42
- storageKeys: Array<string>;
43
- }> | Array<[string, Array<string>]> | Record<string, Array<string>>;
44
- maxPriorityFeePerGas?: Quantity;
45
- maxFeePerGas?: Quantity;
46
- };
47
- type TransactionLog = {
48
- blockNumber: number;
49
- blockHash: string;
50
- transactionIndex: number;
51
- removed: boolean;
52
- address: string;
53
- data: string;
54
- topics: Array<string>;
55
- transactionHash: string;
56
- logIndex: number;
57
- };
58
- type TransactionReceipt = {
59
- to: string;
60
- from: string;
61
- contractAddress: string;
62
- transactionIndex: number;
63
- root?: string;
64
- logs: Array<TransactionLog>;
65
- logsBloom: string;
66
- blockHash: string;
67
- transactionHash: string;
68
- blockNumber: number;
69
- confirmations: number;
70
- byzantium: boolean;
71
- type: number;
72
- status?: number;
73
- gasUsed: string;
74
- cumulativeGasUsed: string;
75
- effectiveGasPrice?: string;
76
- };
77
- interface BaseEthereumRpcRequestType {
78
- method: EthereumRpcMethodType;
79
- }
80
- interface BaseSolanaRpcRequestType {
81
- method: SolanaRpcMethodType;
82
- }
83
- interface eth_populateTransactionRequest extends BaseEthereumRpcRequestType {
84
- method: 'eth_populateTransactionRequest';
85
- params: [UnsignedTransactionRequest];
86
- }
87
- interface eth_populateTransactionRequestResponse {
88
- method: 'eth_populateTransactionRequest';
89
- data: UnsignedTransactionRequest;
90
- }
91
- interface eth_signTransaction extends BaseEthereumRpcRequestType {
92
- method: 'eth_signTransaction';
93
- params: [UnsignedTransactionRequest];
94
- }
95
- interface eth_sign extends BaseEthereumRpcRequestType {
96
- method: 'eth_sign';
97
- params: [address: string, message: string];
98
- }
99
- interface eth_signResponse {
100
- method: 'eth_sign';
101
- data: string;
102
- }
103
- interface personal_sign extends BaseEthereumRpcRequestType {
104
- method: 'personal_sign';
105
- params: [string, string];
106
- }
107
- interface personal_signResponse {
108
- method: 'personal_sign';
109
- data: string;
110
- }
111
- interface eth_signTransactionResponse {
112
- method: 'eth_signTransaction';
113
- data: string;
114
- }
115
- interface eth_signTypedData_v4 extends BaseEthereumRpcRequestType {
116
- method: 'eth_signTypedData_v4';
117
- params: [string, TypedMessage$1<MessageTypes$1> | string];
118
- }
119
- interface eth_signTypedData_v4Response {
120
- method: 'eth_signTypedData_v4';
121
- data: string;
122
- }
123
- interface secp256k1_sign extends BaseEthereumRpcRequestType {
124
- method: 'secp256k1_sign';
125
- params: [`0x${string}`];
126
- }
127
- interface secp256k1_signResponse {
128
- method: 'secp256k1_sign';
129
- data: `0x${string}`;
130
- }
131
- interface solana_signMessage extends BaseSolanaRpcRequestType {
132
- method: 'signMessage';
133
- params: {
134
- message: string;
135
- };
136
- }
137
- interface solana_signMessageResponse {
138
- method: 'signMessage';
139
- data: {
140
- signature: string;
141
- };
142
- }
143
- type EthereumRpcRequestType = eth_signTransaction | eth_populateTransactionRequest | eth_sign | personal_sign | eth_signTypedData_v4 | secp256k1_sign;
144
- type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransactionRequestResponse | eth_signResponse | personal_signResponse | eth_signTypedData_v4Response | secp256k1_signResponse;
145
- type SolanaRpcRequestType = solana_signMessage;
146
- type SolanaRpcResponseType = solana_signMessageResponse;
147
-
148
13
  interface ConnectorEvents {
149
14
  walletsUpdated(): void;
150
15
  initialized(): void;
@@ -2276,4 +2141,138 @@ type SessionSignerInput = {
2276
2141
  policyIds?: string[];
2277
2142
  }[];
2278
2143
 
2144
+ /**
2145
+ * We support a subset of the provider methods found here:
2146
+ *
2147
+ * https://ethereum.org/en/developers/docs/apis/json-rpc/#json-rpc-methods
2148
+ *
2149
+ * For now, we're focused on signing-related methods because the iframe (this code)
2150
+ * is the only place that has access to the private key and thus is the only one
2151
+ * who can create signatures. All other methods do not need the private key and
2152
+ * can therefore be implemented by clients of the iframe.
2153
+ */
2154
+
2155
+ declare const SUPPORTED_ETHEREUM_RPC_METHODS: readonly ["eth_sign", "eth_populateTransactionRequest", "eth_signTransaction", "personal_sign", "eth_signTypedData_v4", "csw_signUserOperation", "secp256k1_sign"];
2156
+ type EthereumRpcMethodType = (typeof SUPPORTED_ETHEREUM_RPC_METHODS)[number];
2157
+ declare const SUPPORTED_SOLANA_RPC_METHODS: string[];
2158
+ type SolanaRpcMethodType = (typeof SUPPORTED_SOLANA_RPC_METHODS)[number];
2159
+ type Quantity = string | number | bigint;
2160
+ type UnsignedTransactionRequest = {
2161
+ from?: string;
2162
+ to?: string;
2163
+ nonce?: Quantity;
2164
+ gasLimit?: Quantity;
2165
+ gasPrice?: Quantity;
2166
+ data?: ArrayLike<number> | string;
2167
+ value?: Quantity;
2168
+ chainId?: number;
2169
+ type?: number;
2170
+ accessList?: Array<{
2171
+ address: string;
2172
+ storageKeys: Array<string>;
2173
+ }> | Array<[string, Array<string>]> | Record<string, Array<string>>;
2174
+ maxPriorityFeePerGas?: Quantity;
2175
+ maxFeePerGas?: Quantity;
2176
+ };
2177
+ type TransactionLog = {
2178
+ blockNumber: number;
2179
+ blockHash: string;
2180
+ transactionIndex: number;
2181
+ removed: boolean;
2182
+ address: string;
2183
+ data: string;
2184
+ topics: Array<string>;
2185
+ transactionHash: string;
2186
+ logIndex: number;
2187
+ };
2188
+ type TransactionReceipt = {
2189
+ to: string;
2190
+ from: string;
2191
+ contractAddress: string;
2192
+ transactionIndex: number;
2193
+ root?: string;
2194
+ logs: Array<TransactionLog>;
2195
+ logsBloom: string;
2196
+ blockHash: string;
2197
+ transactionHash: string;
2198
+ blockNumber: number;
2199
+ confirmations: number;
2200
+ byzantium: boolean;
2201
+ type: number;
2202
+ status?: number;
2203
+ gasUsed: string;
2204
+ cumulativeGasUsed: string;
2205
+ effectiveGasPrice?: string;
2206
+ };
2207
+ interface BaseEthereumRpcRequestType {
2208
+ method: EthereumRpcMethodType;
2209
+ }
2210
+ interface BaseSolanaRpcRequestType {
2211
+ method: SolanaRpcMethodType;
2212
+ }
2213
+ interface eth_populateTransactionRequest extends BaseEthereumRpcRequestType {
2214
+ method: 'eth_populateTransactionRequest';
2215
+ params: [UnsignedTransactionRequest];
2216
+ }
2217
+ interface eth_populateTransactionRequestResponse {
2218
+ method: 'eth_populateTransactionRequest';
2219
+ data: UnsignedTransactionRequest;
2220
+ }
2221
+ interface eth_signTransaction extends BaseEthereumRpcRequestType {
2222
+ method: 'eth_signTransaction';
2223
+ params: [UnsignedTransactionRequest];
2224
+ }
2225
+ interface eth_sign extends BaseEthereumRpcRequestType {
2226
+ method: 'eth_sign';
2227
+ params: [address: string, message: string];
2228
+ }
2229
+ interface eth_signResponse {
2230
+ method: 'eth_sign';
2231
+ data: string;
2232
+ }
2233
+ interface personal_sign extends BaseEthereumRpcRequestType {
2234
+ method: 'personal_sign';
2235
+ params: [string, string];
2236
+ }
2237
+ interface personal_signResponse {
2238
+ method: 'personal_sign';
2239
+ data: string;
2240
+ }
2241
+ interface eth_signTransactionResponse {
2242
+ method: 'eth_signTransaction';
2243
+ data: string;
2244
+ }
2245
+ interface eth_signTypedData_v4 extends BaseEthereumRpcRequestType {
2246
+ method: 'eth_signTypedData_v4';
2247
+ params: [string, TypedMessage<MessageTypes> | string];
2248
+ }
2249
+ interface eth_signTypedData_v4Response {
2250
+ method: 'eth_signTypedData_v4';
2251
+ data: string;
2252
+ }
2253
+ interface secp256k1_sign extends BaseEthereumRpcRequestType {
2254
+ method: 'secp256k1_sign';
2255
+ params: [`0x${string}`];
2256
+ }
2257
+ interface secp256k1_signResponse {
2258
+ method: 'secp256k1_sign';
2259
+ data: `0x${string}`;
2260
+ }
2261
+ interface solana_signMessage extends BaseSolanaRpcRequestType {
2262
+ method: 'signMessage';
2263
+ params: {
2264
+ message: string;
2265
+ };
2266
+ }
2267
+ interface solana_signMessageResponse {
2268
+ method: 'signMessage';
2269
+ data: {
2270
+ signature: string;
2271
+ };
2272
+ }
2273
+ type EthereumRpcRequestType = eth_signTransaction | eth_populateTransactionRequest | eth_sign | personal_sign | eth_signTypedData_v4 | secp256k1_sign;
2274
+ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransactionRequestResponse | eth_signResponse | personal_signResponse | eth_signTypedData_v4Response | secp256k1_signResponse;
2275
+ type SolanaRpcRequestType = solana_signMessage;
2276
+ type SolanaRpcResponseType = solana_signMessageResponse;
2277
+
2279
2278
  export { type OAuthUserInfo as $, type AppConfig as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type MfaMethod as D, type EthereumRpcRequestType as E, type UnsignedTransactionRequest as F, type FundWalletConfig as G, type HDWalletWithMetadata as H, type ConnectedWallet as I, type CrossAppProviderDetails as J, type OAuthProviderType as K, type LoginToMiniApp as L, type MfaSubmitArgs as M, type MoonpaySignRequest as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type MoonpaySignResponse as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type SmartWalletConfig as T, type User as U, type SiwsMessageType as V, type Wallet as W, type LoginMethod as X, type ExternalWalletMetadata as Y, type TelegramAuthResult as Z, type TelegramWebAppData as _, type SendTransactionModalUIOptions as a, PrivyErrorCode as a0, type LinkedAccountWithMetadata as a1, type BaseConnectedSolanaWallet as a2, type FundingMethod as a3, type OAuthFlowState as a4, type LoginWithCode as a5, type OtpFlowState as a6, type PasskeyFlowState as a7, type SiweFlowState as a8, type BaseAccountSdkType as a9, type LinkedAccountType as aA, type GoogleOAuthWithMetadata as aB, type TwitterOAuthWithMetadata as aC, type DiscordOAuthWithMetadata as aD, type GithubOAuthWithMetadata as aE, type TiktokOAuthWithMetadata as aF, type LineOAuthWithMetadata as aG, type LinkedInOAuthWithMetadata as aH, type AppleOAuthWithMetadata as aI, type FarcasterWithMetadata as aJ, type TelegramWithMetadata as aK, type CrossAppAccountWithMetadata as aL, type PasskeyWithMetadata as aM, type Email as aN, type Phone as aO, type TransactionUIOptions as aP, type ContractUIOptions as aQ, type NativeFundingConfig as aR, type PriceDisplayOptions as aS, type Farcaster as aT, type Passkey as aU, type LoginMethodOrderOption as aV, type SiwsFlowState as aW, type UnsignedTransactionRequestWithChainId as aa, type BaseConnectedWalletType as ab, type SessionSignerInput as ac, type TelegramAuthFlowState as ad, type TypedMessage as ae, type MessageTypes as af, type SmartWallet as ag, type MoonpayCurrencyCode as ah, type MoonpayPaymentMethod as ai, type Quantity as aj, type TransactionLog as ak, type TransactionReceipt as al, type NonEmptyArray as am, type EmailWithMetadata as an, type PhoneWithMetadata as ao, type WalletWithMetadata as ap, type Google as aq, type Twitter as ar, type Discord as as, type Github as at, type LinkedIn as au, type Apple as av, type Tiktok as aw, type Line as ax, type Telegram as ay, type CrossAppAccount as az, type SignMessageModalUIOptions as b, type SolanaStandardWallet as c, type SolanaFundingConfig as d, SolanaWalletConnector as e, type UserRecoveryMethod as f, type SolanaRpcRequestType as g, type EthereumRpcResponseType as h, type SolanaRpcResponseType as i, type EIP1193Provider as j, type EntropyIdVerifier as k, type RequestArguments as l, WalletConnector as m, PrivyProxyProvider as n, type WalletClientType as o, type ConnectedWalletMetadata as p, type PrivyClientConfig as q, type ConnectorType as r, type SetBaseAccountSdkType as s, toSolanaWalletConnectors as t, type WalletListEntry as u, type BaseConnectedWallet as v, type ConnectWalletModalOptions as w, type LoginModalOptions as x, type SetWalletRecoveryOptions as y, type SignTypedDataParams as z };
@@ -8,143 +8,8 @@ import { createBaseAccountSDK } from '@base-org/account';
8
8
  import { WalletWithFeatures, Wallet as Wallet$1 } from '@wallet-standard/base';
9
9
  import { SolanaSignMessageFeature, SolanaSignTransactionFeature, SolanaSignAndSendTransactionFeature, SolanaSignInFeature } from '@solana/wallet-standard-features';
10
10
  import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
11
- import { TypedMessage as TypedMessage$1, MessageTypes as MessageTypes$1 } from '@metamask/eth-sig-util';
12
11
  import EventEmitter from 'eventemitter3';
13
12
 
14
- /**
15
- * We support a subset of the provider methods found here:
16
- *
17
- * https://ethereum.org/en/developers/docs/apis/json-rpc/#json-rpc-methods
18
- *
19
- * For now, we're focused on signing-related methods because the iframe (this code)
20
- * is the only place that has access to the private key and thus is the only one
21
- * who can create signatures. All other methods do not need the private key and
22
- * can therefore be implemented by clients of the iframe.
23
- */
24
-
25
- declare const SUPPORTED_ETHEREUM_RPC_METHODS: readonly ["eth_sign", "eth_populateTransactionRequest", "eth_signTransaction", "personal_sign", "eth_signTypedData_v4", "csw_signUserOperation", "secp256k1_sign"];
26
- type EthereumRpcMethodType = (typeof SUPPORTED_ETHEREUM_RPC_METHODS)[number];
27
- declare const SUPPORTED_SOLANA_RPC_METHODS: string[];
28
- type SolanaRpcMethodType = (typeof SUPPORTED_SOLANA_RPC_METHODS)[number];
29
- type Quantity = string | number | bigint;
30
- type UnsignedTransactionRequest = {
31
- from?: string;
32
- to?: string;
33
- nonce?: Quantity;
34
- gasLimit?: Quantity;
35
- gasPrice?: Quantity;
36
- data?: ArrayLike<number> | string;
37
- value?: Quantity;
38
- chainId?: number;
39
- type?: number;
40
- accessList?: Array<{
41
- address: string;
42
- storageKeys: Array<string>;
43
- }> | Array<[string, Array<string>]> | Record<string, Array<string>>;
44
- maxPriorityFeePerGas?: Quantity;
45
- maxFeePerGas?: Quantity;
46
- };
47
- type TransactionLog = {
48
- blockNumber: number;
49
- blockHash: string;
50
- transactionIndex: number;
51
- removed: boolean;
52
- address: string;
53
- data: string;
54
- topics: Array<string>;
55
- transactionHash: string;
56
- logIndex: number;
57
- };
58
- type TransactionReceipt = {
59
- to: string;
60
- from: string;
61
- contractAddress: string;
62
- transactionIndex: number;
63
- root?: string;
64
- logs: Array<TransactionLog>;
65
- logsBloom: string;
66
- blockHash: string;
67
- transactionHash: string;
68
- blockNumber: number;
69
- confirmations: number;
70
- byzantium: boolean;
71
- type: number;
72
- status?: number;
73
- gasUsed: string;
74
- cumulativeGasUsed: string;
75
- effectiveGasPrice?: string;
76
- };
77
- interface BaseEthereumRpcRequestType {
78
- method: EthereumRpcMethodType;
79
- }
80
- interface BaseSolanaRpcRequestType {
81
- method: SolanaRpcMethodType;
82
- }
83
- interface eth_populateTransactionRequest extends BaseEthereumRpcRequestType {
84
- method: 'eth_populateTransactionRequest';
85
- params: [UnsignedTransactionRequest];
86
- }
87
- interface eth_populateTransactionRequestResponse {
88
- method: 'eth_populateTransactionRequest';
89
- data: UnsignedTransactionRequest;
90
- }
91
- interface eth_signTransaction extends BaseEthereumRpcRequestType {
92
- method: 'eth_signTransaction';
93
- params: [UnsignedTransactionRequest];
94
- }
95
- interface eth_sign extends BaseEthereumRpcRequestType {
96
- method: 'eth_sign';
97
- params: [address: string, message: string];
98
- }
99
- interface eth_signResponse {
100
- method: 'eth_sign';
101
- data: string;
102
- }
103
- interface personal_sign extends BaseEthereumRpcRequestType {
104
- method: 'personal_sign';
105
- params: [string, string];
106
- }
107
- interface personal_signResponse {
108
- method: 'personal_sign';
109
- data: string;
110
- }
111
- interface eth_signTransactionResponse {
112
- method: 'eth_signTransaction';
113
- data: string;
114
- }
115
- interface eth_signTypedData_v4 extends BaseEthereumRpcRequestType {
116
- method: 'eth_signTypedData_v4';
117
- params: [string, TypedMessage$1<MessageTypes$1> | string];
118
- }
119
- interface eth_signTypedData_v4Response {
120
- method: 'eth_signTypedData_v4';
121
- data: string;
122
- }
123
- interface secp256k1_sign extends BaseEthereumRpcRequestType {
124
- method: 'secp256k1_sign';
125
- params: [`0x${string}`];
126
- }
127
- interface secp256k1_signResponse {
128
- method: 'secp256k1_sign';
129
- data: `0x${string}`;
130
- }
131
- interface solana_signMessage extends BaseSolanaRpcRequestType {
132
- method: 'signMessage';
133
- params: {
134
- message: string;
135
- };
136
- }
137
- interface solana_signMessageResponse {
138
- method: 'signMessage';
139
- data: {
140
- signature: string;
141
- };
142
- }
143
- type EthereumRpcRequestType = eth_signTransaction | eth_populateTransactionRequest | eth_sign | personal_sign | eth_signTypedData_v4 | secp256k1_sign;
144
- type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransactionRequestResponse | eth_signResponse | personal_signResponse | eth_signTypedData_v4Response | secp256k1_signResponse;
145
- type SolanaRpcRequestType = solana_signMessage;
146
- type SolanaRpcResponseType = solana_signMessageResponse;
147
-
148
13
  interface ConnectorEvents {
149
14
  walletsUpdated(): void;
150
15
  initialized(): void;
@@ -2276,4 +2141,138 @@ type SessionSignerInput = {
2276
2141
  policyIds?: string[];
2277
2142
  }[];
2278
2143
 
2144
+ /**
2145
+ * We support a subset of the provider methods found here:
2146
+ *
2147
+ * https://ethereum.org/en/developers/docs/apis/json-rpc/#json-rpc-methods
2148
+ *
2149
+ * For now, we're focused on signing-related methods because the iframe (this code)
2150
+ * is the only place that has access to the private key and thus is the only one
2151
+ * who can create signatures. All other methods do not need the private key and
2152
+ * can therefore be implemented by clients of the iframe.
2153
+ */
2154
+
2155
+ declare const SUPPORTED_ETHEREUM_RPC_METHODS: readonly ["eth_sign", "eth_populateTransactionRequest", "eth_signTransaction", "personal_sign", "eth_signTypedData_v4", "csw_signUserOperation", "secp256k1_sign"];
2156
+ type EthereumRpcMethodType = (typeof SUPPORTED_ETHEREUM_RPC_METHODS)[number];
2157
+ declare const SUPPORTED_SOLANA_RPC_METHODS: string[];
2158
+ type SolanaRpcMethodType = (typeof SUPPORTED_SOLANA_RPC_METHODS)[number];
2159
+ type Quantity = string | number | bigint;
2160
+ type UnsignedTransactionRequest = {
2161
+ from?: string;
2162
+ to?: string;
2163
+ nonce?: Quantity;
2164
+ gasLimit?: Quantity;
2165
+ gasPrice?: Quantity;
2166
+ data?: ArrayLike<number> | string;
2167
+ value?: Quantity;
2168
+ chainId?: number;
2169
+ type?: number;
2170
+ accessList?: Array<{
2171
+ address: string;
2172
+ storageKeys: Array<string>;
2173
+ }> | Array<[string, Array<string>]> | Record<string, Array<string>>;
2174
+ maxPriorityFeePerGas?: Quantity;
2175
+ maxFeePerGas?: Quantity;
2176
+ };
2177
+ type TransactionLog = {
2178
+ blockNumber: number;
2179
+ blockHash: string;
2180
+ transactionIndex: number;
2181
+ removed: boolean;
2182
+ address: string;
2183
+ data: string;
2184
+ topics: Array<string>;
2185
+ transactionHash: string;
2186
+ logIndex: number;
2187
+ };
2188
+ type TransactionReceipt = {
2189
+ to: string;
2190
+ from: string;
2191
+ contractAddress: string;
2192
+ transactionIndex: number;
2193
+ root?: string;
2194
+ logs: Array<TransactionLog>;
2195
+ logsBloom: string;
2196
+ blockHash: string;
2197
+ transactionHash: string;
2198
+ blockNumber: number;
2199
+ confirmations: number;
2200
+ byzantium: boolean;
2201
+ type: number;
2202
+ status?: number;
2203
+ gasUsed: string;
2204
+ cumulativeGasUsed: string;
2205
+ effectiveGasPrice?: string;
2206
+ };
2207
+ interface BaseEthereumRpcRequestType {
2208
+ method: EthereumRpcMethodType;
2209
+ }
2210
+ interface BaseSolanaRpcRequestType {
2211
+ method: SolanaRpcMethodType;
2212
+ }
2213
+ interface eth_populateTransactionRequest extends BaseEthereumRpcRequestType {
2214
+ method: 'eth_populateTransactionRequest';
2215
+ params: [UnsignedTransactionRequest];
2216
+ }
2217
+ interface eth_populateTransactionRequestResponse {
2218
+ method: 'eth_populateTransactionRequest';
2219
+ data: UnsignedTransactionRequest;
2220
+ }
2221
+ interface eth_signTransaction extends BaseEthereumRpcRequestType {
2222
+ method: 'eth_signTransaction';
2223
+ params: [UnsignedTransactionRequest];
2224
+ }
2225
+ interface eth_sign extends BaseEthereumRpcRequestType {
2226
+ method: 'eth_sign';
2227
+ params: [address: string, message: string];
2228
+ }
2229
+ interface eth_signResponse {
2230
+ method: 'eth_sign';
2231
+ data: string;
2232
+ }
2233
+ interface personal_sign extends BaseEthereumRpcRequestType {
2234
+ method: 'personal_sign';
2235
+ params: [string, string];
2236
+ }
2237
+ interface personal_signResponse {
2238
+ method: 'personal_sign';
2239
+ data: string;
2240
+ }
2241
+ interface eth_signTransactionResponse {
2242
+ method: 'eth_signTransaction';
2243
+ data: string;
2244
+ }
2245
+ interface eth_signTypedData_v4 extends BaseEthereumRpcRequestType {
2246
+ method: 'eth_signTypedData_v4';
2247
+ params: [string, TypedMessage<MessageTypes> | string];
2248
+ }
2249
+ interface eth_signTypedData_v4Response {
2250
+ method: 'eth_signTypedData_v4';
2251
+ data: string;
2252
+ }
2253
+ interface secp256k1_sign extends BaseEthereumRpcRequestType {
2254
+ method: 'secp256k1_sign';
2255
+ params: [`0x${string}`];
2256
+ }
2257
+ interface secp256k1_signResponse {
2258
+ method: 'secp256k1_sign';
2259
+ data: `0x${string}`;
2260
+ }
2261
+ interface solana_signMessage extends BaseSolanaRpcRequestType {
2262
+ method: 'signMessage';
2263
+ params: {
2264
+ message: string;
2265
+ };
2266
+ }
2267
+ interface solana_signMessageResponse {
2268
+ method: 'signMessage';
2269
+ data: {
2270
+ signature: string;
2271
+ };
2272
+ }
2273
+ type EthereumRpcRequestType = eth_signTransaction | eth_populateTransactionRequest | eth_sign | personal_sign | eth_signTypedData_v4 | secp256k1_sign;
2274
+ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransactionRequestResponse | eth_signResponse | personal_signResponse | eth_signTypedData_v4Response | secp256k1_signResponse;
2275
+ type SolanaRpcRequestType = solana_signMessage;
2276
+ type SolanaRpcResponseType = solana_signMessageResponse;
2277
+
2279
2278
  export { type OAuthUserInfo as $, type AppConfig as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type MfaMethod as D, type EthereumRpcRequestType as E, type UnsignedTransactionRequest as F, type FundWalletConfig as G, type HDWalletWithMetadata as H, type ConnectedWallet as I, type CrossAppProviderDetails as J, type OAuthProviderType as K, type LoginToMiniApp as L, type MfaSubmitArgs as M, type MoonpaySignRequest as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type MoonpaySignResponse as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type SmartWalletConfig as T, type User as U, type SiwsMessageType as V, type Wallet as W, type LoginMethod as X, type ExternalWalletMetadata as Y, type TelegramAuthResult as Z, type TelegramWebAppData as _, type SendTransactionModalUIOptions as a, PrivyErrorCode as a0, type LinkedAccountWithMetadata as a1, type BaseConnectedSolanaWallet as a2, type FundingMethod as a3, type OAuthFlowState as a4, type LoginWithCode as a5, type OtpFlowState as a6, type PasskeyFlowState as a7, type SiweFlowState as a8, type BaseAccountSdkType as a9, type LinkedAccountType as aA, type GoogleOAuthWithMetadata as aB, type TwitterOAuthWithMetadata as aC, type DiscordOAuthWithMetadata as aD, type GithubOAuthWithMetadata as aE, type TiktokOAuthWithMetadata as aF, type LineOAuthWithMetadata as aG, type LinkedInOAuthWithMetadata as aH, type AppleOAuthWithMetadata as aI, type FarcasterWithMetadata as aJ, type TelegramWithMetadata as aK, type CrossAppAccountWithMetadata as aL, type PasskeyWithMetadata as aM, type Email as aN, type Phone as aO, type TransactionUIOptions as aP, type ContractUIOptions as aQ, type NativeFundingConfig as aR, type PriceDisplayOptions as aS, type Farcaster as aT, type Passkey as aU, type LoginMethodOrderOption as aV, type SiwsFlowState as aW, type UnsignedTransactionRequestWithChainId as aa, type BaseConnectedWalletType as ab, type SessionSignerInput as ac, type TelegramAuthFlowState as ad, type TypedMessage as ae, type MessageTypes as af, type SmartWallet as ag, type MoonpayCurrencyCode as ah, type MoonpayPaymentMethod as ai, type Quantity as aj, type TransactionLog as ak, type TransactionReceipt as al, type NonEmptyArray as am, type EmailWithMetadata as an, type PhoneWithMetadata as ao, type WalletWithMetadata as ap, type Google as aq, type Twitter as ar, type Discord as as, type Github as at, type LinkedIn as au, type Apple as av, type Tiktok as aw, type Line as ax, type Telegram as ay, type CrossAppAccount as az, type SignMessageModalUIOptions as b, type SolanaStandardWallet as c, type SolanaFundingConfig as d, SolanaWalletConnector as e, type UserRecoveryMethod as f, type SolanaRpcRequestType as g, type EthereumRpcResponseType as h, type SolanaRpcResponseType as i, type EIP1193Provider as j, type EntropyIdVerifier as k, type RequestArguments as l, WalletConnector as m, PrivyProxyProvider as n, type WalletClientType as o, type ConnectedWalletMetadata as p, type PrivyClientConfig as q, type ConnectorType as r, type SetBaseAccountSdkType as s, toSolanaWalletConnectors as t, type WalletListEntry as u, type BaseConnectedWallet as v, type ConnectWalletModalOptions as w, type LoginModalOptions as x, type SetWalletRecoveryOptions as y, type SignTypedDataParams as z };