@privy-io/react-auth 1.26.0-beta.1 → 1.26.0-beta.10

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
@@ -362,7 +362,7 @@ interface Wallet {
362
362
  walletClient: 'privy' | 'unknown';
363
363
  }
364
364
  /**
365
- * Object representation of a connected wallet.
365
+ * Object representation of a base connected wallet from a wallet connector.
366
366
  */
367
367
  interface BaseConnectedWallet {
368
368
  /** The wallet address. */
@@ -371,20 +371,45 @@ interface BaseConnectedWallet {
371
371
  chainId: string;
372
372
  /** The first time this wallet was connected without break. */
373
373
  connectedAt: number;
374
- /** The wallet client where this key-pair is stored. */
374
+ /**
375
+ * @experimental **Experimental**: This property is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
376
+ *
377
+ * The wallet client where this key-pair is stored.
378
+ * e.g. metamask, rainbow, coinbase_wallet, etc.
379
+ */
375
380
  walletClientType: WalletClientType;
376
- /** The connector used to initiate the connection with the wallet client. */
381
+ /**
382
+ * @experimental **Experimental**: This property is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
383
+ *
384
+ * The connector used to initiate the connection with the wallet client.
385
+ * e.g. injected, wallet_connect, coinbase_wallet, etc.
386
+ */
377
387
  connectorType: ConnectorType;
378
388
  /** Returns true if the wallet is connected, false otherwise */
379
389
  isConnected: () => Promise<boolean>;
380
390
  /** Helper methods to build providers for interfacing with this wallet. */
381
- getEthereumProvider: () => EIP1193Provider;
382
- getEthersProvider: () => Web3Provider;
383
- getWeb3jsProvider: () => AbstractProvider;
384
- /** Disconnect method does not work on all connector types and will no-op if
385
- * that is the case (metamask does not support programmatic disconnects) */
391
+ getEthereumProvider: () => Promise<EIP1193Provider>;
392
+ getEthersProvider: () => Promise<Web3Provider>;
393
+ getWeb3jsProvider: () => Promise<AbstractProvider>;
394
+ /**
395
+ * Perform personal_sign with the user's wallet.
396
+ *
397
+ * @param {string} message The message to sign.
398
+ * @returns {string} The resulting signature.
399
+ */
400
+ sign: (message: string) => Promise<string>;
401
+ /**
402
+ * @experimental **Experimental**: This property is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
403
+ *
404
+ * Disconnect method does not work on all connector types and will no-op if
405
+ * an incompatible connector is used (metamask and phantom do not support
406
+ * programmatic disconnects)
407
+ */
386
408
  disconnect: () => void;
387
409
  }
410
+ /**
411
+ * Object representation of a connected wallet.
412
+ */
388
413
  interface ConnectedWallet extends BaseConnectedWallet {
389
414
  /** True if this wallet is linked to the authenticated user. False if it is not yet linked or
390
415
  * the user has not yet authenticated. */
@@ -947,13 +972,13 @@ interface PrivyInterface {
947
972
  */
948
973
  setActiveWallet: (address: string) => Promise<void>;
949
974
  /**
950
- * @experimental **Experimental**: This feature is {@link https://docs.privy.io/guide/faq/experimental-features subject to change at any time}.
975
+ * @experimental **Experimental**: This feature is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
951
976
  *
952
977
  * Get a short-lived, one-time-use token to start a new Privy session from the existing authenticated session. Raises an exception if the current session was already forked from a previous session.
953
978
  */
954
979
  forkSession: () => Promise<string>;
955
980
  /**
956
- * @experimental **Experimental**: This feature is {@link https://docs.privy.io/guide/faq/experimental-features subject to change at any time}.
981
+ * @experimental **Experimental**: This feature is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
957
982
  *
958
983
  * Prompts a user to create an Ethereum wallet through Privy.
959
984
  *
@@ -965,7 +990,7 @@ interface PrivyInterface {
965
990
  */
966
991
  createWallet: () => Promise<Wallet>;
967
992
  /**
968
- * @experimental **Experimental**: This feature is {@link https://docs.privy.io/guide/faq/experimental-features subject to change at any time}.
993
+ * @experimental **Experimental**: This feature is {@link https://docs.privy.io/guide/guides/experimental-features subject to change at any time}.
969
994
  *
970
995
  * Prompts a user to sign a message using their Privy wallet.
971
996
  *