@privy-io/react-auth 1.9.0 → 1.10.0-beta.2
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 +66 -66
- package/dist/index.d.ts +4 -2
- package/dist/index.esm.js +67 -67
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ import { AbstractProvider } from 'web3-core';
|
|
|
4
4
|
|
|
5
5
|
declare const SUPPORTED_WALLET_TYPES: readonly ["metamask", "coinbase_wallet", "wallet_connect"];
|
|
6
6
|
declare type WalletType = typeof SUPPORTED_WALLET_TYPES[number];
|
|
7
|
+
declare type LinkedAccountType = 'wallet' | 'email' | 'phone' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth';
|
|
7
8
|
/** @ignore */
|
|
8
9
|
interface LinkMetadata {
|
|
9
10
|
/** Account type, most commonly useful when filtering through linkedAccounts */
|
|
10
|
-
type:
|
|
11
|
+
type: LinkedAccountType;
|
|
11
12
|
/** Datetime when this account was linked to the user. */
|
|
12
13
|
verifiedAt: Date;
|
|
13
14
|
}
|
|
@@ -104,6 +105,7 @@ interface DiscordOAuthWithMetadata extends LinkMetadata, Discord {
|
|
|
104
105
|
/** Denotes that this is a Discord account. */
|
|
105
106
|
type: 'discord_oauth';
|
|
106
107
|
}
|
|
108
|
+
declare type LinkedAccountWithMetadata = WalletWithMetadata | EmailWithMetadata | PhoneWithMetadata | GoogleOAuthWithMetadata | TwitterOAuthWithMetadata | DiscordOAuthWithMetadata;
|
|
107
109
|
interface User {
|
|
108
110
|
/** The Privy-issued DID for the user. If you need to store additional information
|
|
109
111
|
* about a user, you can use this DID to reference them. */
|
|
@@ -124,7 +126,7 @@ interface User {
|
|
|
124
126
|
discord?: Discord;
|
|
125
127
|
/** The list of accounts associated with this user. Each account contains additional metadata
|
|
126
128
|
* that may be helpful for advanced use cases. */
|
|
127
|
-
linkedAccounts: Array<
|
|
129
|
+
linkedAccounts: Array<LinkedAccountWithMetadata>;
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
declare function getAccessToken(): Promise<string | null>;
|