@privy-io/react-auth 1.16.1-beta.6 → 1.17.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +102 -102
- package/dist/index.d.ts +17 -11
- package/dist/index.js +145 -145
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExternalProvider, Web3Provider } from '@ethersproject/providers';
|
|
3
|
-
import
|
|
3
|
+
import WCProvider from '@walletconnect/web3-provider';
|
|
4
4
|
import { AbstractProvider } from 'web3-core';
|
|
5
5
|
import { AxiosResponse, AxiosRequestConfig } from 'axios';
|
|
6
6
|
|
|
@@ -209,6 +209,12 @@ interface PrivyProviderProps {
|
|
|
209
209
|
onSuccess?: (user: User, isNewUser: boolean) => void;
|
|
210
210
|
/** @ignore */
|
|
211
211
|
children: React.ReactNode;
|
|
212
|
+
/**
|
|
213
|
+
* If true, the user will be prompted to create a Privy wallet
|
|
214
|
+
* after they have successfully logged in if they do not currently
|
|
215
|
+
* have any wallet associated with their user account.
|
|
216
|
+
*/
|
|
217
|
+
createPrivyWalletOnLogin?: boolean;
|
|
212
218
|
}
|
|
213
219
|
/**
|
|
214
220
|
* Passes the Privy authentication context to your React components.
|
|
@@ -288,13 +294,13 @@ declare abstract class WalletConnector {
|
|
|
288
294
|
}
|
|
289
295
|
|
|
290
296
|
/**
|
|
291
|
-
* Light wrapper around
|
|
297
|
+
* Light wrapper around WCConnectionManager that uses the global connection manager
|
|
292
298
|
* to manage the local storage layer and avoid conflicts.
|
|
293
299
|
*/
|
|
294
|
-
declare class
|
|
295
|
-
private
|
|
300
|
+
declare class WCWalletConnector extends WalletConnector {
|
|
301
|
+
private _connectionManager;
|
|
296
302
|
private _provider;
|
|
297
|
-
constructor(
|
|
303
|
+
constructor(connectionManager: WCConnectionManager, provider: PrivyProxyProvider, address: string | null);
|
|
298
304
|
connect(options: {
|
|
299
305
|
showPrompt: boolean;
|
|
300
306
|
}): Promise<Wallet | null>;
|
|
@@ -306,14 +312,14 @@ declare class WalletConnectWalletConnector extends WalletConnector {
|
|
|
306
312
|
* An object representation of the Wallet Connect V1 protocol. This is used to initiate and manage connections
|
|
307
313
|
* with any number of wallets.
|
|
308
314
|
*/
|
|
309
|
-
declare class
|
|
315
|
+
declare class WCConnectionManager {
|
|
310
316
|
private _storageIdToProvider;
|
|
311
317
|
private _addressToStorageId;
|
|
312
318
|
constructor();
|
|
313
319
|
/**
|
|
314
|
-
* Builds a new
|
|
320
|
+
* Builds a new WCWalletConnector instance
|
|
315
321
|
*/
|
|
316
|
-
|
|
322
|
+
createConnector(provider: PrivyProxyProvider, address: string | null): WCWalletConnector;
|
|
317
323
|
/**
|
|
318
324
|
* Disconnects all active Wallet Connect sessions.
|
|
319
325
|
*/
|
|
@@ -321,18 +327,18 @@ declare class WalletConnectGlobalWalletConnector {
|
|
|
321
327
|
/**
|
|
322
328
|
* Handles storage retrieval and assignment for WalletConnectProvider instances
|
|
323
329
|
*/
|
|
324
|
-
getProviderForAddress(address: string | null):
|
|
330
|
+
getProviderForAddress(address: string | null): WCProvider;
|
|
325
331
|
/**
|
|
326
332
|
* Updates internal global connector data structures with address mappings as new accounts are added
|
|
327
333
|
*/
|
|
328
|
-
indexProvider(provider:
|
|
334
|
+
indexProvider(provider: WCProvider): void;
|
|
329
335
|
}
|
|
330
336
|
|
|
331
337
|
declare class ConnectorManager {
|
|
332
338
|
walletConnectors: WalletConnector[];
|
|
333
339
|
activeWalletConnector?: WalletConnector;
|
|
334
340
|
initialized: boolean;
|
|
335
|
-
|
|
341
|
+
wcConnectionManager: WCConnectionManager;
|
|
336
342
|
constructor();
|
|
337
343
|
initialize(): void;
|
|
338
344
|
getEthereumProvider: () => EIP1193Provider;
|