@privy-io/react-auth 1.10.0-beta.9 → 1.10.0
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.cjs.js +224 -106
- package/dist/index.d.ts +15 -1
- package/dist/index.esm.js +224 -106
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -116,7 +116,11 @@ interface User {
|
|
|
116
116
|
email?: Email;
|
|
117
117
|
/** The user's phone number, if they have linked one. It cannot be linked to another user. */
|
|
118
118
|
phone?: Phone;
|
|
119
|
-
/** The user's wallet address, if they have linked one. It cannot be linked to another user.
|
|
119
|
+
/** The user's active wallet address, if they have linked at least one wallet. It cannot be linked to another user.
|
|
120
|
+
* If a user links a new wallet, that one is automatically set as active.
|
|
121
|
+
* Developers can call setActiveWallet() to change the active wallet.
|
|
122
|
+
* The active wallet is the wallet that will be used for transactions and signing.
|
|
123
|
+
**/
|
|
120
124
|
wallet?: Wallet;
|
|
121
125
|
/** The user's Google account, if they have linked one. It cannot be linked to another user. */
|
|
122
126
|
google?: Google;
|
|
@@ -286,6 +290,16 @@ interface PrivyInterface {
|
|
|
286
290
|
* Unlink a Discord social account from a user, by passing the discord subject ID. Note that you can only unlink a social account if the user has at least one other account.
|
|
287
291
|
*/
|
|
288
292
|
unlinkDiscord: (subject: string) => Promise<User>;
|
|
293
|
+
/**
|
|
294
|
+
* Set one of the authenticated wallet addresses (part of user.linkedAccounts with type 'wallet'). as the active wallet.
|
|
295
|
+
* If you pass a wallet that's not one of the linkedAccounts, this will throw an error.
|
|
296
|
+
*
|
|
297
|
+
* The active wallet will be the one that getEthersProvider() will use as a signer (used for signing & transactions).
|
|
298
|
+
* It is also the wallet present at `user.wallet`, and that value is updated when this is called.
|
|
299
|
+
*
|
|
300
|
+
* Note that when you link a new wallet, it becomes 'active' by default.
|
|
301
|
+
*/
|
|
302
|
+
setActiveWallet: (address: string) => void;
|
|
289
303
|
/**
|
|
290
304
|
* @experimental
|
|
291
305
|
* 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.
|