@privy-io/react-auth 1.18.0-beta.6 → 1.18.0-beta.8

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/index.d.ts CHANGED
@@ -322,14 +322,7 @@ type WalletId = '1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a36
322
322
  */
323
323
  declare class WCWalletConnector extends WalletConnector {
324
324
  private connectionManager;
325
- constructor(connectionManager: WCConnectionManager, proxyProvider: PrivyProxyProvider, address: string | null,
326
- /**
327
- * If provided, the connector will attempt to establish a connection directly using this
328
- * wallet. If omitted, but an address is provided, the connector may still attempt to link
329
- * up to a wallet, but may be unable to. If a wallet cannot be determined, the standard WC
330
- * modal is shown.
331
- */
332
- walletId?: WalletId);
325
+ constructor(connectionManager: WCConnectionManager, proxyProvider: PrivyProxyProvider, address: string | null);
333
326
  setActive(): Promise<boolean>;
334
327
  connect(options: {
335
328
  showPrompt: boolean;
@@ -352,6 +345,10 @@ declare class WCWalletConnector extends WalletConnector {
352
345
  * Access the underlying WCProvider directly with proper typings
353
346
  */
354
347
  private get walletProvider();
348
+ /**
349
+ * Set the underlying WCProvider with proper typings
350
+ */
351
+ setWalletProvider(walletProvider: WCProvider): void;
355
352
  }
356
353
  /**
357
354
  * An object representation of the Wallet Connect V1 protocol. This is used to initiate and manage connections
@@ -359,13 +356,25 @@ declare class WCWalletConnector extends WalletConnector {
359
356
  */
360
357
  declare class WCConnectionManager {
361
358
  private _storageIdToProvider;
359
+ private reconnectDelayMs;
360
+ private reconnectBackoff;
362
361
  constructor();
363
362
  /**
364
363
  * Builds a new WCWalletConnector instance
365
364
  *
366
- * If walletId is specified, attempts to launch into that specific flow
365
+ * If walletId is specified, attempts to launch into that specific flow.
366
+ *
367
+ * IMPORTANT! Nothing in this flow can be costly in order to properly launch our deep links. See:
368
+ * https://docs.walletconnect.com/1.0/mobile-linking#ios-app-link-constraints
369
+ */
370
+ createConnector(proxyProvider: PrivyProxyProvider, address: string | null,
371
+ /**
372
+ * If provided, the connector will attempt to establish a connection directly using this
373
+ * wallet. If omitted, but an address is provided, the connector may still attempt to link
374
+ * up to a wallet, but may be unable to. If a wallet cannot be determined, the standard WC
375
+ * modal is shown.
367
376
  */
368
- createConnector(provider: PrivyProxyProvider, address: string | null, walletId?: WalletId): WCWalletConnector;
377
+ walletId?: WalletId): WCWalletConnector;
369
378
  /**
370
379
  * Disconnects all active Wallet Connect sessions.
371
380
  */
@@ -380,13 +389,14 @@ declare class WCConnectionManager {
380
389
  * Given an address, either fetch (reusing a stored connection) or create a new one if no stored
381
390
  * connection is found
382
391
  */
383
- getOrCreateProviderForAddress(address: string | null, walletId: WalletId | undefined): WCProvider;
392
+ getProviderForAddress(address: string | null, walletId: WalletId | undefined): WCProvider | undefined;
393
+ private createProviderWithStorageId;
384
394
  /**
385
395
  * Create a WC provider and add an entry to the internal provider registry keyed on the internal
386
396
  * WC storageId. If walletId is specified, attempts to launch the WC flow for that particular
387
397
  * wallet
388
398
  */
389
- createProvider(storageId: string, walletId: WalletId | undefined): WCProvider;
399
+ createProvider(connector: WCWalletConnector, walletId?: WalletId): WCProvider;
390
400
  /**
391
401
  * Replace the given provider, *assuming it's the one with null address*
392
402
  *
@@ -394,7 +404,7 @@ declare class WCConnectionManager {
394
404
  * seeing - WC sessions wouldn't open a new modal/etc when doing `provider.enable()` if it had
395
405
  * previously been rejected: https://github.com/Uniswap/web3-react/issues/217
396
406
  */
397
- replaceProvider(provider: WCProvider): WCProvider;
407
+ replaceProvider(connector: WCWalletConnector, provider: WCProvider): WCProvider;
398
408
  /**
399
409
  * Enables the provider. Under the hood, this calls connect() and 'eth_RequestAccounts'.
400
410
  */