@privy-io/api-types 0.9.0 → 0.11.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/CHANGELOG.md +46 -0
- package/client.d.mts +40 -43
- package/client.d.mts.map +1 -1
- package/client.d.ts +40 -43
- package/client.d.ts.map +1 -1
- package/client.js +28 -20
- package/client.js.map +1 -1
- package/client.mjs +29 -21
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +128 -86
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +128 -86
- package/resources/accounts.d.ts.map +1 -1
- package/resources/aggregations.d.mts +43 -43
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +43 -43
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/apps.d.mts +169 -135
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +169 -135
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +931 -947
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +931 -947
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/client-auth.js.map +1 -1
- package/resources/client-auth.mjs.map +1 -1
- package/resources/embedded-wallets.d.mts +122 -122
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +122 -122
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/fiat.d.mts +110 -0
- package/resources/fiat.d.mts.map +1 -0
- package/resources/fiat.d.ts +110 -0
- package/resources/fiat.d.ts.map +1 -0
- package/resources/fiat.js +9 -0
- package/resources/fiat.js.map +1 -0
- package/resources/fiat.mjs +5 -0
- package/resources/fiat.mjs.map +1 -0
- package/resources/funding.d.mts +86 -86
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +86 -86
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +20 -18
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +20 -18
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +269 -265
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +269 -265
- package/resources/intents.d.ts.map +1 -1
- package/resources/key-quorums.d.mts +15 -146
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +15 -146
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +0 -92
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +0 -92
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +12 -20
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +12 -20
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/organizations.d.mts +65 -0
- package/resources/organizations.d.mts.map +1 -0
- package/resources/organizations.d.ts +65 -0
- package/resources/organizations.d.ts.map +1 -0
- package/resources/organizations.js +9 -0
- package/resources/organizations.js.map +1 -0
- package/resources/organizations.mjs +5 -0
- package/resources/organizations.mjs.map +1 -0
- package/resources/policies.d.mts +261 -553
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +261 -553
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +0 -229
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +0 -229
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +28 -28
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +28 -28
- package/resources/shared.d.ts.map +1 -1
- package/resources/swaps.d.mts +6 -9
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +6 -9
- package/resources/swaps.d.ts.map +1 -1
- package/resources/swaps.js.map +1 -1
- package/resources/swaps.mjs.map +1 -1
- package/resources/transactions.d.mts +80 -96
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +80 -96
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +0 -17
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +0 -17
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +480 -815
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +480 -815
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +0 -272
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +0 -272
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +302 -145
- package/resources/wallet-actions.d.mts.map +1 -1
- package/resources/wallet-actions.d.ts +302 -145
- package/resources/wallet-actions.d.ts.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +7 -2
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +7 -2
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +1 -1
- package/resources/wallets/transactions.mjs +1 -1
- package/resources/wallets/wallets.d.mts +1592 -1580
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +1592 -1580
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +45 -103
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +45 -103
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +935 -877
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +935 -877
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/yield.d.mts +157 -157
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +157 -157
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +650 -618
- package/src/internal/types.ts +6 -8
- package/src/resources/accounts.ts +157 -103
- package/src/resources/aggregations.ts +55 -55
- package/src/resources/apps.ts +221 -178
- package/src/resources/client-auth.ts +1271 -1315
- package/src/resources/embedded-wallets.ts +160 -160
- package/src/resources/fiat.ts +177 -0
- package/src/resources/funding.ts +130 -130
- package/src/resources/index.ts +551 -542
- package/src/resources/intents.ts +326 -322
- package/src/resources/key-quorums.ts +16 -218
- package/src/resources/kraken-embed.ts +14 -22
- package/src/resources/organizations.ts +82 -0
- package/src/resources/policies.ts +383 -848
- package/src/resources/shared.ts +34 -34
- package/src/resources/swaps.ts +5 -10
- package/src/resources/transactions.ts +116 -136
- package/src/resources/users.ts +693 -1160
- package/src/resources/wallet-actions.ts +392 -185
- package/src/resources/wallets/index.ts +160 -156
- package/src/resources/wallets/transactions.ts +18 -3
- package/src/resources/wallets/wallets.ts +2123 -2113
- package/src/resources/webhooks.ts +1172 -1100
- package/src/resources/yield.ts +188 -188
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/users.d.ts
CHANGED
|
@@ -2,240 +2,43 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import * as UsersAPI from "./users.js";
|
|
3
3
|
import * as ClientAuthAPI from "./client-auth.js";
|
|
4
4
|
import * as EmbeddedWalletsAPI from "./embedded-wallets.js";
|
|
5
|
-
import * as SharedAPI from "./shared.js";
|
|
6
5
|
import * as WalletsAPI from "./wallets/wallets.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
6
|
+
export declare class Users extends APIResource {
|
|
7
|
+
}
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* The authenticated user.
|
|
12
10
|
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const user = await client.users.create({
|
|
21
|
-
* linked_accounts: [
|
|
22
|
-
* { address: 'tom.bombadill@privy.io', type: 'email' },
|
|
23
|
-
* ],
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
create(body: UserCreateParams, options?: RequestOptions): APIPromise<User>;
|
|
28
|
-
/**
|
|
29
|
-
* Get all users in your app.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* // Automatically fetches more pages as needed.
|
|
34
|
-
* for await (const user of client.users.list()) {
|
|
35
|
-
* // ...
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
list(query?: UserListParams | null | undefined, options?: RequestOptions): PagePromise<UsersCursor, User>;
|
|
40
|
-
/**
|
|
41
|
-
* Delete a user by user ID.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* await client.users.delete('user_id');
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
delete(userID: string, options?: RequestOptions): APIPromise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Get a user by user ID.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const user = await client.users._get('user_id');
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
_get(userID: string, options?: RequestOptions): APIPromise<User>;
|
|
58
|
-
/**
|
|
59
|
-
* Looks up a user by their custom auth ID.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* const user = await client.users.getByCustomAuthID({
|
|
64
|
-
* custom_user_id: 'custom_user_id',
|
|
65
|
-
* });
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
getByCustomAuthID(body: UserGetByCustomAuthIDParams, options?: RequestOptions): APIPromise<User>;
|
|
69
|
-
/**
|
|
70
|
-
* Looks up a user by their Discord username.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```ts
|
|
74
|
-
* const user = await client.users.getByDiscordUsername({
|
|
75
|
-
* username: 'username',
|
|
76
|
-
* });
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
getByDiscordUsername(body: UserGetByDiscordUsernameParams, options?: RequestOptions): APIPromise<User>;
|
|
80
|
-
/**
|
|
81
|
-
* Looks up a user by their email address.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```ts
|
|
85
|
-
* const user = await client.users.getByEmailAddress({
|
|
86
|
-
* address: 'dev@stainless.com',
|
|
87
|
-
* });
|
|
88
|
-
* ```
|
|
89
|
-
*/
|
|
90
|
-
getByEmailAddress(body: UserGetByEmailAddressParams, options?: RequestOptions): APIPromise<User>;
|
|
91
|
-
/**
|
|
92
|
-
* Looks up a user by their Farcaster ID.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```ts
|
|
96
|
-
* const user = await client.users.getByFarcasterID({
|
|
97
|
-
* fid: 0,
|
|
98
|
-
* });
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
getByFarcasterID(body: UserGetByFarcasterIDParams, options?: RequestOptions): APIPromise<User>;
|
|
102
|
-
/**
|
|
103
|
-
* Looks up a user by their Github username.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```ts
|
|
107
|
-
* const user = await client.users.getByGitHubUsername({
|
|
108
|
-
* username: 'username',
|
|
109
|
-
* });
|
|
110
|
-
* ```
|
|
111
|
-
*/
|
|
112
|
-
getByGitHubUsername(body: UserGetByGitHubUsernameParams, options?: RequestOptions): APIPromise<User>;
|
|
113
|
-
/**
|
|
114
|
-
* Looks up a user by their phone number.
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ```ts
|
|
118
|
-
* const user = await client.users.getByPhoneNumber({
|
|
119
|
-
* number: 'number',
|
|
120
|
-
* });
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
getByPhoneNumber(body: UserGetByPhoneNumberParams, options?: RequestOptions): APIPromise<User>;
|
|
124
|
-
/**
|
|
125
|
-
* Looks up a user by their smart wallet address.
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
* ```ts
|
|
129
|
-
* const user = await client.users.getBySmartWalletAddress({
|
|
130
|
-
* address: 'address',
|
|
131
|
-
* });
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
getBySmartWalletAddress(body: UserGetBySmartWalletAddressParams, options?: RequestOptions): APIPromise<User>;
|
|
135
|
-
/**
|
|
136
|
-
* Looks up a user by their Telegram user ID.
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```ts
|
|
140
|
-
* const user = await client.users.getByTelegramUserID({
|
|
141
|
-
* telegram_user_id: 'telegram_user_id',
|
|
142
|
-
* });
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
getByTelegramUserID(body: UserGetByTelegramUserIDParams, options?: RequestOptions): APIPromise<User>;
|
|
146
|
-
/**
|
|
147
|
-
* Looks up a user by their Telegram username.
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```ts
|
|
151
|
-
* const user = await client.users.getByTelegramUsername({
|
|
152
|
-
* username: 'username',
|
|
153
|
-
* });
|
|
154
|
-
* ```
|
|
155
|
-
*/
|
|
156
|
-
getByTelegramUsername(body: UserGetByTelegramUsernameParams, options?: RequestOptions): APIPromise<User>;
|
|
157
|
-
/**
|
|
158
|
-
* Looks up a user by their Twitter subject.
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* ```ts
|
|
162
|
-
* const user = await client.users.getByTwitterSubject({
|
|
163
|
-
* subject: 'subject',
|
|
164
|
-
* });
|
|
165
|
-
* ```
|
|
166
|
-
*/
|
|
167
|
-
getByTwitterSubject(body: UserGetByTwitterSubjectParams, options?: RequestOptions): APIPromise<User>;
|
|
168
|
-
/**
|
|
169
|
-
* Looks up a user by their Twitter username.
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```ts
|
|
173
|
-
* const user = await client.users.getByTwitterUsername({
|
|
174
|
-
* username: 'username',
|
|
175
|
-
* });
|
|
176
|
-
* ```
|
|
177
|
-
*/
|
|
178
|
-
getByTwitterUsername(body: UserGetByTwitterUsernameParams, options?: RequestOptions): APIPromise<User>;
|
|
179
|
-
/**
|
|
180
|
-
* Looks up a user by their wallet address.
|
|
181
|
-
*
|
|
182
|
-
* @example
|
|
183
|
-
* ```ts
|
|
184
|
-
* const user = await client.users.getByWalletAddress({
|
|
185
|
-
* address: 'address',
|
|
186
|
-
* });
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
getByWalletAddress(body: UserGetByWalletAddressParams, options?: RequestOptions): APIPromise<User>;
|
|
190
|
-
/**
|
|
191
|
-
* Creates an embedded wallet for an existing user.
|
|
192
|
-
*
|
|
193
|
-
* @example
|
|
194
|
-
* ```ts
|
|
195
|
-
* const user = await client.users.pregenerateWallets(
|
|
196
|
-
* 'user_id',
|
|
197
|
-
* { wallets: [{ chain_type: 'ethereum' }] },
|
|
198
|
-
* );
|
|
199
|
-
* ```
|
|
200
|
-
*/
|
|
201
|
-
pregenerateWallets(userID: string, body: UserPregenerateWalletsParams, options?: RequestOptions): APIPromise<User>;
|
|
11
|
+
export interface AuthenticatedUser {
|
|
12
|
+
token: string | null;
|
|
13
|
+
privy_access_token: string | null;
|
|
14
|
+
refresh_token: string | null;
|
|
202
15
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* @example
|
|
206
|
-
* ```ts
|
|
207
|
-
* const user = await client.users.search({
|
|
208
|
-
* searchTerm: 'searchTerm',
|
|
209
|
-
* });
|
|
210
|
-
* ```
|
|
16
|
+
* Instructs the client on how to handle tokens received
|
|
211
17
|
*/
|
|
212
|
-
|
|
18
|
+
session_update_action: 'set' | 'ignore' | 'clear';
|
|
213
19
|
/**
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* @example
|
|
217
|
-
* ```ts
|
|
218
|
-
* const user = await client.users.setCustomMetadata(
|
|
219
|
-
* 'user_id',
|
|
220
|
-
* { custom_metadata: { key: 'value' } },
|
|
221
|
-
* );
|
|
222
|
-
* ```
|
|
20
|
+
* A Privy user object.
|
|
223
21
|
*/
|
|
224
|
-
|
|
22
|
+
user: User;
|
|
23
|
+
identity_token?: string;
|
|
24
|
+
is_new_user?: boolean;
|
|
225
25
|
/**
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
* @example
|
|
229
|
-
* ```ts
|
|
230
|
-
* const user = await client.users.unlinkLinkedAccount(
|
|
231
|
-
* 'user_id',
|
|
232
|
-
* { handle: 'test@test.com', type: 'email' },
|
|
233
|
-
* );
|
|
234
|
-
* ```
|
|
26
|
+
* OAuth tokens associated with the user.
|
|
235
27
|
*/
|
|
236
|
-
|
|
28
|
+
oauth_tokens?: OAuthTokens;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* An embedded wallet associated with a cross-app account.
|
|
32
|
+
*/
|
|
33
|
+
export interface CrossAppEmbeddedWallet {
|
|
34
|
+
address: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A smart wallet associated with a cross-app account.
|
|
38
|
+
*/
|
|
39
|
+
export interface CrossAppSmartWallet {
|
|
40
|
+
address: string;
|
|
237
41
|
}
|
|
238
|
-
export type UsersCursor = Cursor<User>;
|
|
239
42
|
/**
|
|
240
43
|
* Custom metadata associated with the user.
|
|
241
44
|
*/
|
|
@@ -243,126 +46,308 @@ export type CustomMetadata = {
|
|
|
243
46
|
[key: string]: string | number | boolean;
|
|
244
47
|
};
|
|
245
48
|
/**
|
|
246
|
-
* The
|
|
49
|
+
* The method used to recover an embedded wallet account.
|
|
247
50
|
*/
|
|
248
|
-
export
|
|
51
|
+
export type EmbeddedWalletRecoveryMethod = 'privy' | 'user-passcode' | 'google-drive' | 'icloud' | 'recovery-encryption-key' | 'privy-v2';
|
|
52
|
+
/**
|
|
53
|
+
* A linked account for the user.
|
|
54
|
+
*/
|
|
55
|
+
export type LinkedAccount = LinkedAccountEmail | LinkedAccountPhone | LinkedAccountEthereum | LinkedAccountSolana | LinkedAccountSmartWallet | LinkedAccountEthereumEmbeddedWallet | LinkedAccountSolanaEmbeddedWallet | LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountCurveSigningEmbeddedWallet | LinkedAccountGoogleOAuth | LinkedAccountTwitterOAuth | LinkedAccountDiscordOAuth | LinkedAccountGitHubOAuth | LinkedAccountSpotifyOAuth | LinkedAccountInstagramOAuth | LinkedAccountTiktokOAuth | LinkedAccountLineOAuth | LinkedAccountTwitchOAuth | LinkedAccountLinkedInOAuth | LinkedAccountAppleOAuth | LinkedAccountCustomOAuth | LinkedAccountCustomJwt | LinkedAccountFarcaster | LinkedAccountPasskey | LinkedAccountTelegram | LinkedAccountCrossApp | LinkedAccountAuthorizationKey;
|
|
56
|
+
/**
|
|
57
|
+
* The payload for importing an Apple account.
|
|
58
|
+
*/
|
|
59
|
+
export interface LinkedAccountAppleInput {
|
|
60
|
+
subject: string;
|
|
61
|
+
type: 'apple_oauth';
|
|
62
|
+
email?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* An Apple OAuth account linked to the user.
|
|
66
|
+
*/
|
|
67
|
+
export interface LinkedAccountAppleOAuth {
|
|
68
|
+
email: string | null;
|
|
69
|
+
first_verified_at: number | null;
|
|
70
|
+
latest_verified_at: number | null;
|
|
71
|
+
subject: string;
|
|
72
|
+
type: 'apple_oauth';
|
|
73
|
+
verified_at: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* An authorization key linked to the user.
|
|
77
|
+
*/
|
|
78
|
+
export interface LinkedAccountAuthorizationKey {
|
|
79
|
+
first_verified_at: number | null;
|
|
80
|
+
latest_verified_at: number | null;
|
|
81
|
+
public_key: string;
|
|
82
|
+
type: 'authorization_key';
|
|
83
|
+
verified_at: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Base schema for wallet accounts linked to the user.
|
|
87
|
+
*/
|
|
88
|
+
export interface LinkedAccountBaseWallet {
|
|
249
89
|
address: string;
|
|
250
|
-
chain_type: '
|
|
251
|
-
type: 'wallet';
|
|
90
|
+
chain_type: 'solana' | 'ethereum';
|
|
91
|
+
type: 'wallet' | 'smart_wallet';
|
|
252
92
|
}
|
|
253
93
|
/**
|
|
254
|
-
*
|
|
94
|
+
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
255
95
|
*/
|
|
256
|
-
export interface
|
|
96
|
+
export interface LinkedAccountBitcoinSegwitEmbeddedWallet {
|
|
97
|
+
id: string | null;
|
|
257
98
|
address: string;
|
|
258
|
-
|
|
99
|
+
chain_id: string;
|
|
100
|
+
chain_type: 'bitcoin-segwit';
|
|
101
|
+
connector_type: 'embedded';
|
|
102
|
+
delegated: boolean;
|
|
103
|
+
first_verified_at: number | null;
|
|
104
|
+
imported: boolean;
|
|
105
|
+
latest_verified_at: number | null;
|
|
106
|
+
public_key: string;
|
|
107
|
+
/**
|
|
108
|
+
* The method used to recover an embedded wallet account.
|
|
109
|
+
*/
|
|
110
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
111
|
+
type: 'wallet';
|
|
112
|
+
verified_at: number;
|
|
113
|
+
wallet_client: 'privy';
|
|
114
|
+
wallet_client_type: 'privy';
|
|
115
|
+
wallet_index: number;
|
|
259
116
|
}
|
|
260
117
|
/**
|
|
261
|
-
*
|
|
118
|
+
* A Bitcoin Taproot embedded wallet account linked to the user.
|
|
262
119
|
*/
|
|
263
|
-
export interface
|
|
264
|
-
|
|
265
|
-
|
|
120
|
+
export interface LinkedAccountBitcoinTaprootEmbeddedWallet {
|
|
121
|
+
id: string | null;
|
|
122
|
+
address: string;
|
|
123
|
+
chain_id: string;
|
|
124
|
+
chain_type: 'bitcoin-taproot';
|
|
125
|
+
connector_type: 'embedded';
|
|
126
|
+
delegated: boolean;
|
|
127
|
+
first_verified_at: number | null;
|
|
128
|
+
imported: boolean;
|
|
129
|
+
latest_verified_at: number | null;
|
|
130
|
+
public_key: string;
|
|
131
|
+
/**
|
|
132
|
+
* The method used to recover an embedded wallet account.
|
|
133
|
+
*/
|
|
134
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
135
|
+
type: 'wallet';
|
|
136
|
+
verified_at: number;
|
|
137
|
+
wallet_client: 'privy';
|
|
138
|
+
wallet_client_type: 'privy';
|
|
139
|
+
wallet_index: number;
|
|
266
140
|
}
|
|
267
141
|
/**
|
|
268
|
-
*
|
|
142
|
+
* A cross-app account linked to the user.
|
|
269
143
|
*/
|
|
270
|
-
export interface
|
|
271
|
-
|
|
272
|
-
|
|
144
|
+
export interface LinkedAccountCrossApp {
|
|
145
|
+
embedded_wallets: Array<CrossAppEmbeddedWallet>;
|
|
146
|
+
first_verified_at: number | null;
|
|
147
|
+
latest_verified_at: number | null;
|
|
148
|
+
provider_app_id: string;
|
|
149
|
+
smart_wallets: Array<CrossAppSmartWallet>;
|
|
273
150
|
subject: string;
|
|
274
|
-
type: '
|
|
151
|
+
type: 'cross_app';
|
|
152
|
+
verified_at: number;
|
|
275
153
|
}
|
|
276
154
|
/**
|
|
277
|
-
*
|
|
155
|
+
* A curve signing embedded wallet account linked to the user.
|
|
278
156
|
*/
|
|
279
|
-
export interface
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
157
|
+
export interface LinkedAccountCurveSigningEmbeddedWallet {
|
|
158
|
+
id: string | null;
|
|
159
|
+
address: string;
|
|
160
|
+
chain_id: string;
|
|
161
|
+
/**
|
|
162
|
+
* The wallet chain types that support curve-based signing.
|
|
163
|
+
*/
|
|
164
|
+
chain_type: WalletsAPI.CurveSigningChainType;
|
|
165
|
+
connector_type: 'embedded';
|
|
166
|
+
delegated: boolean;
|
|
167
|
+
first_verified_at: number | null;
|
|
168
|
+
imported: boolean;
|
|
169
|
+
latest_verified_at: number | null;
|
|
170
|
+
public_key: string;
|
|
171
|
+
/**
|
|
172
|
+
* The method used to recover an embedded wallet account.
|
|
173
|
+
*/
|
|
174
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
175
|
+
type: 'wallet';
|
|
176
|
+
verified_at: number;
|
|
177
|
+
wallet_client: 'privy';
|
|
178
|
+
wallet_client_type: 'privy';
|
|
179
|
+
wallet_index: number;
|
|
285
180
|
}
|
|
286
181
|
/**
|
|
287
|
-
* The payload for importing a
|
|
182
|
+
* The payload for importing a Custom JWT account.
|
|
288
183
|
*/
|
|
289
|
-
export interface
|
|
290
|
-
|
|
291
|
-
type: '
|
|
292
|
-
username: string;
|
|
293
|
-
email?: string;
|
|
184
|
+
export interface LinkedAccountCustomJwtInput {
|
|
185
|
+
custom_user_id: string;
|
|
186
|
+
type: 'custom_auth';
|
|
294
187
|
}
|
|
295
188
|
/**
|
|
296
|
-
*
|
|
189
|
+
* A custom JWT account linked to the user.
|
|
297
190
|
*/
|
|
298
|
-
export interface
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
191
|
+
export interface LinkedAccountCustomJwt {
|
|
192
|
+
custom_user_id: string;
|
|
193
|
+
first_verified_at: number | null;
|
|
194
|
+
latest_verified_at: number | null;
|
|
195
|
+
type: 'custom_auth';
|
|
196
|
+
verified_at: number;
|
|
304
197
|
}
|
|
305
198
|
/**
|
|
306
|
-
*
|
|
199
|
+
* A custom OAuth account linked to the user.
|
|
307
200
|
*/
|
|
308
|
-
export interface
|
|
201
|
+
export interface LinkedAccountCustomOAuth {
|
|
202
|
+
first_verified_at: number | null;
|
|
203
|
+
latest_verified_at: number | null;
|
|
309
204
|
subject: string;
|
|
310
|
-
|
|
205
|
+
/**
|
|
206
|
+
* The ID of a custom OAuth provider, set up for this app. Must start with
|
|
207
|
+
* "custom:".
|
|
208
|
+
*/
|
|
209
|
+
type: ClientAuthAPI.CustomOAuthProviderID;
|
|
210
|
+
verified_at: number;
|
|
311
211
|
email?: string;
|
|
312
212
|
name?: string;
|
|
213
|
+
profile_picture_url?: string;
|
|
214
|
+
username?: string;
|
|
313
215
|
}
|
|
314
216
|
/**
|
|
315
|
-
* The payload for importing
|
|
217
|
+
* The payload for importing a Discord account.
|
|
316
218
|
*/
|
|
317
|
-
export interface
|
|
219
|
+
export interface LinkedAccountDiscordInput {
|
|
318
220
|
subject: string;
|
|
319
|
-
type: '
|
|
221
|
+
type: 'discord_oauth';
|
|
320
222
|
username: string;
|
|
223
|
+
email?: string;
|
|
321
224
|
}
|
|
322
225
|
/**
|
|
323
|
-
*
|
|
226
|
+
* A Discord OAuth account linked to the user.
|
|
324
227
|
*/
|
|
325
|
-
export interface
|
|
326
|
-
|
|
228
|
+
export interface LinkedAccountDiscordOAuth {
|
|
229
|
+
email: string | null;
|
|
230
|
+
first_verified_at: number | null;
|
|
231
|
+
latest_verified_at: number | null;
|
|
327
232
|
subject: string;
|
|
328
|
-
type: '
|
|
329
|
-
username: string;
|
|
233
|
+
type: 'discord_oauth';
|
|
234
|
+
username: string | null;
|
|
235
|
+
verified_at: number;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* An email account linked to the user.
|
|
239
|
+
*/
|
|
240
|
+
export interface LinkedAccountEmail {
|
|
241
|
+
address: string;
|
|
242
|
+
first_verified_at: number | null;
|
|
243
|
+
latest_verified_at: number | null;
|
|
244
|
+
type: 'email';
|
|
245
|
+
verified_at: number;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* The payload for importing an email account.
|
|
249
|
+
*/
|
|
250
|
+
export interface LinkedAccountEmailInput {
|
|
251
|
+
address: string;
|
|
252
|
+
type: 'email';
|
|
330
253
|
}
|
|
254
|
+
export type LinkedAccountEmbeddedWallet = LinkedAccountEthereumEmbeddedWallet | LinkedAccountSolanaEmbeddedWallet | LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountCurveSigningEmbeddedWallet;
|
|
331
255
|
/**
|
|
332
|
-
*
|
|
256
|
+
* An embedded wallet account with an ID.
|
|
333
257
|
*/
|
|
334
|
-
export
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
258
|
+
export type LinkedAccountEmbeddedWalletWithID = LinkedAccountEmbeddedWalletWithID.LinkedAccountEthereumEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountSolanaEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountCurveSigningEmbeddedWallet;
|
|
259
|
+
export declare namespace LinkedAccountEmbeddedWalletWithID {
|
|
260
|
+
/**
|
|
261
|
+
* An Ethereum embedded wallet account linked to the user.
|
|
262
|
+
*/
|
|
263
|
+
interface LinkedAccountEthereumEmbeddedWallet extends Omit<UsersAPI.LinkedAccountEthereumEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
264
|
+
id: string;
|
|
265
|
+
recovery_method: 'privy-v2';
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* A Solana embedded wallet account linked to the user.
|
|
269
|
+
*/
|
|
270
|
+
interface LinkedAccountSolanaEmbeddedWallet extends Omit<UsersAPI.LinkedAccountSolanaEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
271
|
+
id: string;
|
|
272
|
+
recovery_method: 'privy-v2';
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
276
|
+
*/
|
|
277
|
+
interface LinkedAccountBitcoinSegwitEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinSegwitEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
278
|
+
id: string;
|
|
279
|
+
recovery_method: 'privy-v2';
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* A Bitcoin Taproot embedded wallet account linked to the user.
|
|
283
|
+
*/
|
|
284
|
+
interface LinkedAccountBitcoinTaprootEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinTaprootEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
285
|
+
id: string;
|
|
286
|
+
recovery_method: 'privy-v2';
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* A curve signing embedded wallet account linked to the user.
|
|
290
|
+
*/
|
|
291
|
+
interface LinkedAccountCurveSigningEmbeddedWallet extends Omit<UsersAPI.LinkedAccountCurveSigningEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
292
|
+
id: string;
|
|
293
|
+
recovery_method: 'privy-v2';
|
|
294
|
+
}
|
|
340
295
|
}
|
|
341
296
|
/**
|
|
342
|
-
*
|
|
297
|
+
* An Ethereum wallet account linked to the user.
|
|
343
298
|
*/
|
|
344
|
-
export interface
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
299
|
+
export interface LinkedAccountEthereum {
|
|
300
|
+
address: string;
|
|
301
|
+
chain_type: 'ethereum';
|
|
302
|
+
first_verified_at: number | null;
|
|
303
|
+
latest_verified_at: number | null;
|
|
304
|
+
type: 'wallet';
|
|
305
|
+
verified_at: number;
|
|
306
|
+
wallet_client: 'unknown';
|
|
307
|
+
chain_id?: string;
|
|
308
|
+
connector_type?: string;
|
|
309
|
+
wallet_client_type?: string;
|
|
348
310
|
}
|
|
349
311
|
/**
|
|
350
|
-
*
|
|
312
|
+
* An Ethereum embedded wallet account linked to the user.
|
|
351
313
|
*/
|
|
352
|
-
export interface
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
314
|
+
export interface LinkedAccountEthereumEmbeddedWallet {
|
|
315
|
+
id: string | null;
|
|
316
|
+
address: string;
|
|
317
|
+
chain_id: string;
|
|
318
|
+
chain_type: 'ethereum';
|
|
319
|
+
connector_type: 'embedded';
|
|
320
|
+
delegated: boolean;
|
|
321
|
+
first_verified_at: number | null;
|
|
322
|
+
imported: boolean;
|
|
323
|
+
latest_verified_at: number | null;
|
|
324
|
+
/**
|
|
325
|
+
* The method used to recover an embedded wallet account.
|
|
326
|
+
*/
|
|
327
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
328
|
+
type: 'wallet';
|
|
329
|
+
verified_at: number;
|
|
330
|
+
wallet_client: 'privy';
|
|
331
|
+
wallet_client_type: 'privy';
|
|
332
|
+
wallet_index: number;
|
|
356
333
|
}
|
|
357
334
|
/**
|
|
358
|
-
*
|
|
335
|
+
* A Farcaster account linked to the user.
|
|
359
336
|
*/
|
|
360
|
-
export interface
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
337
|
+
export interface LinkedAccountFarcaster {
|
|
338
|
+
fid: number;
|
|
339
|
+
first_verified_at: number | null;
|
|
340
|
+
latest_verified_at: number | null;
|
|
341
|
+
owner_address: string;
|
|
342
|
+
type: 'farcaster';
|
|
343
|
+
verified_at: number;
|
|
344
|
+
bio?: string;
|
|
345
|
+
display_name?: string;
|
|
346
|
+
homepage_url?: string;
|
|
347
|
+
profile_picture?: string;
|
|
348
|
+
profile_picture_url?: string;
|
|
349
|
+
signer_public_key?: string;
|
|
350
|
+
username?: string;
|
|
366
351
|
}
|
|
367
352
|
/**
|
|
368
353
|
* The payload for importing a Farcaster account.
|
|
@@ -378,152 +363,117 @@ export interface LinkedAccountFarcasterInput {
|
|
|
378
363
|
username?: string;
|
|
379
364
|
}
|
|
380
365
|
/**
|
|
381
|
-
* The payload for importing a
|
|
382
|
-
*/
|
|
383
|
-
export interface LinkedAccountTelegramInput {
|
|
384
|
-
telegram_user_id: string;
|
|
385
|
-
type: 'telegram';
|
|
386
|
-
first_name?: string;
|
|
387
|
-
last_name?: string;
|
|
388
|
-
photo_url?: string;
|
|
389
|
-
username?: string;
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* The payload for importing a Custom JWT account.
|
|
366
|
+
* The payload for importing a Github account.
|
|
393
367
|
*/
|
|
394
|
-
export interface
|
|
395
|
-
|
|
396
|
-
type: '
|
|
368
|
+
export interface LinkedAccountGitHubInput {
|
|
369
|
+
subject: string;
|
|
370
|
+
type: 'github_oauth';
|
|
371
|
+
username: string;
|
|
372
|
+
email?: string;
|
|
373
|
+
name?: string;
|
|
397
374
|
}
|
|
398
375
|
/**
|
|
399
|
-
*
|
|
376
|
+
* A GitHub OAuth account linked to the user.
|
|
400
377
|
*/
|
|
401
|
-
export interface
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
378
|
+
export interface LinkedAccountGitHubOAuth {
|
|
379
|
+
email: string | null;
|
|
380
|
+
first_verified_at: number | null;
|
|
381
|
+
latest_verified_at: number | null;
|
|
382
|
+
name: string | null;
|
|
383
|
+
subject: string;
|
|
384
|
+
type: 'github_oauth';
|
|
385
|
+
username: string | null;
|
|
386
|
+
verified_at: number;
|
|
407
387
|
}
|
|
408
388
|
/**
|
|
409
|
-
* The
|
|
410
|
-
*/
|
|
411
|
-
export type LinkedAccountInput = LinkedAccountWalletInput | LinkedAccountEmailInput | LinkedAccountPhoneInput | LinkedAccountGoogleInput | LinkedAccountTwitterInput | LinkedAccountDiscordInput | LinkedAccountGitHubInput | LinkedAccountSpotifyInput | LinkedAccountInstagramInput | LinkedAccountTiktokInput | LinkedAccountLineInput | LinkedAccountTwitchInput | LinkedAccountAppleInput | LinkedAccountLinkedInInput | LinkedAccountFarcasterInput | LinkedAccountTelegramInput | LinkedAccountCustomJwtInput | LinkedAccountPasskeyInput;
|
|
412
|
-
/**
|
|
413
|
-
* The payload for batch creating users.
|
|
389
|
+
* The payload for importing a Google account.
|
|
414
390
|
*/
|
|
415
|
-
export interface
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
linked_accounts: Array<UsersAPI.LinkedAccountInput>;
|
|
421
|
-
create_embedded_wallet?: boolean;
|
|
422
|
-
create_ethereum_smart_wallet?: boolean;
|
|
423
|
-
create_ethereum_wallet?: boolean;
|
|
424
|
-
create_n_embedded_wallets?: number;
|
|
425
|
-
create_n_ethereum_wallets?: number;
|
|
426
|
-
create_solana_wallet?: boolean;
|
|
427
|
-
/**
|
|
428
|
-
* Custom metadata associated with the user.
|
|
429
|
-
*/
|
|
430
|
-
custom_metadata?: UsersAPI.CustomMetadata;
|
|
431
|
-
/**
|
|
432
|
-
* Wallets to create.
|
|
433
|
-
*/
|
|
434
|
-
wallets?: Array<EmbeddedWalletsAPI.WalletCreationInput>;
|
|
435
|
-
}
|
|
391
|
+
export interface LinkedAccountGoogleInput {
|
|
392
|
+
email: string;
|
|
393
|
+
name: string;
|
|
394
|
+
subject: string;
|
|
395
|
+
type: 'google_oauth';
|
|
436
396
|
}
|
|
437
397
|
/**
|
|
438
|
-
*
|
|
398
|
+
* A Google OAuth account linked to the user.
|
|
439
399
|
*/
|
|
440
|
-
export interface
|
|
441
|
-
|
|
400
|
+
export interface LinkedAccountGoogleOAuth {
|
|
401
|
+
email: string;
|
|
442
402
|
first_verified_at: number | null;
|
|
443
403
|
latest_verified_at: number | null;
|
|
444
|
-
|
|
404
|
+
name: string | null;
|
|
405
|
+
subject: string;
|
|
406
|
+
type: 'google_oauth';
|
|
445
407
|
verified_at: number;
|
|
446
408
|
}
|
|
447
409
|
/**
|
|
448
|
-
*
|
|
410
|
+
* The input for adding a linked account to a user.
|
|
449
411
|
*/
|
|
450
|
-
export
|
|
451
|
-
first_verified_at: number | null;
|
|
452
|
-
latest_verified_at: number | null;
|
|
453
|
-
phoneNumber: string;
|
|
454
|
-
type: 'phone';
|
|
455
|
-
verified_at: number;
|
|
456
|
-
number?: string;
|
|
457
|
-
}
|
|
412
|
+
export type LinkedAccountInput = LinkedAccountWalletInput | LinkedAccountEmailInput | LinkedAccountPhoneInput | LinkedAccountGoogleInput | LinkedAccountTwitterInput | LinkedAccountDiscordInput | LinkedAccountGitHubInput | LinkedAccountSpotifyInput | LinkedAccountInstagramInput | LinkedAccountTiktokInput | LinkedAccountLineInput | LinkedAccountTwitchInput | LinkedAccountAppleInput | LinkedAccountLinkedInInput | LinkedAccountFarcasterInput | LinkedAccountTelegramInput | LinkedAccountCustomJwtInput | LinkedAccountPasskeyInput;
|
|
458
413
|
/**
|
|
459
|
-
*
|
|
414
|
+
* The payload for importing an Instagram account.
|
|
460
415
|
*/
|
|
461
|
-
export interface
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
416
|
+
export interface LinkedAccountInstagramInput {
|
|
417
|
+
subject: string;
|
|
418
|
+
type: 'instagram_oauth';
|
|
419
|
+
username: string;
|
|
465
420
|
}
|
|
466
421
|
/**
|
|
467
|
-
* An
|
|
422
|
+
* An Instagram OAuth account linked to the user.
|
|
468
423
|
*/
|
|
469
|
-
export interface
|
|
470
|
-
address: string;
|
|
471
|
-
chain_type: 'ethereum';
|
|
424
|
+
export interface LinkedAccountInstagramOAuth {
|
|
472
425
|
first_verified_at: number | null;
|
|
473
426
|
latest_verified_at: number | null;
|
|
474
|
-
|
|
427
|
+
subject: string;
|
|
428
|
+
type: 'instagram_oauth';
|
|
429
|
+
username: string | null;
|
|
475
430
|
verified_at: number;
|
|
476
|
-
wallet_client: 'unknown';
|
|
477
|
-
chain_id?: string;
|
|
478
|
-
connector_type?: string;
|
|
479
|
-
wallet_client_type?: string;
|
|
480
431
|
}
|
|
481
432
|
/**
|
|
482
|
-
*
|
|
433
|
+
* The payload for importing a LINE account.
|
|
483
434
|
*/
|
|
484
|
-
export interface
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
*/
|
|
491
|
-
smart_wallet_type: EmbeddedWalletsAPI.SmartWalletType;
|
|
492
|
-
type: 'smart_wallet';
|
|
493
|
-
verified_at: number;
|
|
494
|
-
smart_wallet_version?: string;
|
|
435
|
+
export interface LinkedAccountLineInput {
|
|
436
|
+
subject: string;
|
|
437
|
+
type: 'line_oauth';
|
|
438
|
+
email?: string;
|
|
439
|
+
name?: string;
|
|
440
|
+
profile_picture_url?: string;
|
|
495
441
|
}
|
|
496
442
|
/**
|
|
497
|
-
* A
|
|
443
|
+
* A LINE OAuth account linked to the user.
|
|
498
444
|
*/
|
|
499
|
-
export interface
|
|
500
|
-
|
|
501
|
-
chain_type: 'solana';
|
|
445
|
+
export interface LinkedAccountLineOAuth {
|
|
446
|
+
email: string | null;
|
|
502
447
|
first_verified_at: number | null;
|
|
503
448
|
latest_verified_at: number | null;
|
|
504
|
-
|
|
449
|
+
name: string | null;
|
|
450
|
+
profile_picture_url: string | null;
|
|
451
|
+
subject: string;
|
|
452
|
+
type: 'line_oauth';
|
|
505
453
|
verified_at: number;
|
|
506
|
-
wallet_client: 'unknown';
|
|
507
|
-
connector_type?: string;
|
|
508
|
-
wallet_client_type?: string;
|
|
509
454
|
}
|
|
510
455
|
/**
|
|
511
|
-
*
|
|
456
|
+
* The payload for importing a LinkedIn account.
|
|
512
457
|
*/
|
|
513
|
-
export interface
|
|
514
|
-
|
|
458
|
+
export interface LinkedAccountLinkedInInput {
|
|
459
|
+
subject: string;
|
|
460
|
+
type: 'linkedin_oauth';
|
|
461
|
+
email?: string;
|
|
462
|
+
name?: string;
|
|
463
|
+
vanityName?: string;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* A LinkedIn OAuth account linked to the user.
|
|
467
|
+
*/
|
|
468
|
+
export interface LinkedAccountLinkedInOAuth {
|
|
469
|
+
email: string | null;
|
|
515
470
|
first_verified_at: number | null;
|
|
516
471
|
latest_verified_at: number | null;
|
|
517
|
-
|
|
518
|
-
type: '
|
|
472
|
+
subject: string;
|
|
473
|
+
type: 'linkedin_oauth';
|
|
519
474
|
verified_at: number;
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
homepage_url?: string;
|
|
523
|
-
profile_picture?: string;
|
|
524
|
-
profile_picture_url?: string;
|
|
525
|
-
signer_public_key?: string;
|
|
526
|
-
username?: string;
|
|
475
|
+
name?: string;
|
|
476
|
+
vanity_name?: string;
|
|
527
477
|
}
|
|
528
478
|
/**
|
|
529
479
|
* A passkey account linked to the user.
|
|
@@ -542,129 +492,70 @@ export interface LinkedAccountPasskey {
|
|
|
542
492
|
public_key?: string;
|
|
543
493
|
}
|
|
544
494
|
/**
|
|
545
|
-
*
|
|
495
|
+
* The payload for importing a passkey account.
|
|
546
496
|
*/
|
|
547
|
-
export interface
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
first_name?: string | null;
|
|
554
|
-
last_name?: string | null;
|
|
555
|
-
photo_url?: string | null;
|
|
556
|
-
username?: string | null;
|
|
497
|
+
export interface LinkedAccountPasskeyInput {
|
|
498
|
+
credential_device_type: 'singleDevice' | 'multiDevice';
|
|
499
|
+
credential_id: string;
|
|
500
|
+
credential_public_key: string;
|
|
501
|
+
credential_username: string;
|
|
502
|
+
type: 'passkey';
|
|
557
503
|
}
|
|
558
504
|
/**
|
|
559
|
-
*
|
|
560
|
-
*/
|
|
561
|
-
export type EmbeddedWalletRecoveryMethod = 'privy' | 'user-passcode' | 'google-drive' | 'icloud' | 'recovery-encryption-key' | 'privy-v2';
|
|
562
|
-
/**
|
|
563
|
-
* An Ethereum embedded wallet account linked to the user.
|
|
505
|
+
* A phone number account linked to the user.
|
|
564
506
|
*/
|
|
565
|
-
export interface
|
|
566
|
-
id: string | null;
|
|
567
|
-
address: string;
|
|
568
|
-
chain_id: string;
|
|
569
|
-
chain_type: 'ethereum';
|
|
570
|
-
connector_type: 'embedded';
|
|
571
|
-
delegated: boolean;
|
|
507
|
+
export interface LinkedAccountPhone {
|
|
572
508
|
first_verified_at: number | null;
|
|
573
|
-
imported: boolean;
|
|
574
509
|
latest_verified_at: number | null;
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
*/
|
|
578
|
-
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
579
|
-
type: 'wallet';
|
|
510
|
+
phoneNumber: string;
|
|
511
|
+
type: 'phone';
|
|
580
512
|
verified_at: number;
|
|
581
|
-
|
|
582
|
-
wallet_client_type: 'privy';
|
|
583
|
-
wallet_index: number;
|
|
513
|
+
number?: string;
|
|
584
514
|
}
|
|
585
515
|
/**
|
|
586
|
-
*
|
|
516
|
+
* The payload for importing a phone account.
|
|
587
517
|
*/
|
|
588
|
-
export interface
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
chain_id: string;
|
|
592
|
-
chain_type: 'solana';
|
|
593
|
-
connector_type: 'embedded';
|
|
594
|
-
delegated: boolean;
|
|
595
|
-
first_verified_at: number | null;
|
|
596
|
-
imported: boolean;
|
|
597
|
-
latest_verified_at: number | null;
|
|
598
|
-
public_key: string;
|
|
599
|
-
/**
|
|
600
|
-
* The method used to recover an embedded wallet account.
|
|
601
|
-
*/
|
|
602
|
-
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
603
|
-
type: 'wallet';
|
|
604
|
-
verified_at: number;
|
|
605
|
-
wallet_client: 'privy';
|
|
606
|
-
wallet_client_type: 'privy';
|
|
607
|
-
wallet_index: number;
|
|
518
|
+
export interface LinkedAccountPhoneInput {
|
|
519
|
+
number: string;
|
|
520
|
+
type: 'phone';
|
|
608
521
|
}
|
|
609
522
|
/**
|
|
610
|
-
* A
|
|
523
|
+
* A smart wallet account linked to the user.
|
|
611
524
|
*/
|
|
612
|
-
export interface
|
|
613
|
-
id: string | null;
|
|
525
|
+
export interface LinkedAccountSmartWallet {
|
|
614
526
|
address: string;
|
|
615
|
-
chain_id: string;
|
|
616
|
-
chain_type: 'bitcoin-segwit';
|
|
617
|
-
connector_type: 'embedded';
|
|
618
|
-
delegated: boolean;
|
|
619
527
|
first_verified_at: number | null;
|
|
620
|
-
imported: boolean;
|
|
621
528
|
latest_verified_at: number | null;
|
|
622
|
-
public_key: string;
|
|
623
529
|
/**
|
|
624
|
-
* The
|
|
530
|
+
* The supported smart wallet providers.
|
|
625
531
|
*/
|
|
626
|
-
|
|
627
|
-
type: '
|
|
532
|
+
smart_wallet_type: EmbeddedWalletsAPI.SmartWalletType;
|
|
533
|
+
type: 'smart_wallet';
|
|
628
534
|
verified_at: number;
|
|
629
|
-
|
|
630
|
-
wallet_client_type: 'privy';
|
|
631
|
-
wallet_index: number;
|
|
535
|
+
smart_wallet_version?: string;
|
|
632
536
|
}
|
|
633
537
|
/**
|
|
634
|
-
* A
|
|
538
|
+
* A Solana wallet account linked to the user.
|
|
635
539
|
*/
|
|
636
|
-
export interface
|
|
637
|
-
id: string | null;
|
|
540
|
+
export interface LinkedAccountSolana {
|
|
638
541
|
address: string;
|
|
639
|
-
|
|
640
|
-
chain_type: 'bitcoin-taproot';
|
|
641
|
-
connector_type: 'embedded';
|
|
642
|
-
delegated: boolean;
|
|
542
|
+
chain_type: 'solana';
|
|
643
543
|
first_verified_at: number | null;
|
|
644
|
-
imported: boolean;
|
|
645
544
|
latest_verified_at: number | null;
|
|
646
|
-
public_key: string;
|
|
647
|
-
/**
|
|
648
|
-
* The method used to recover an embedded wallet account.
|
|
649
|
-
*/
|
|
650
|
-
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
651
545
|
type: 'wallet';
|
|
652
546
|
verified_at: number;
|
|
653
|
-
wallet_client: '
|
|
654
|
-
|
|
655
|
-
|
|
547
|
+
wallet_client: 'unknown';
|
|
548
|
+
connector_type?: string;
|
|
549
|
+
wallet_client_type?: string;
|
|
656
550
|
}
|
|
657
551
|
/**
|
|
658
|
-
* A
|
|
552
|
+
* A Solana embedded wallet account linked to the user.
|
|
659
553
|
*/
|
|
660
|
-
export interface
|
|
554
|
+
export interface LinkedAccountSolanaEmbeddedWallet {
|
|
661
555
|
id: string | null;
|
|
662
556
|
address: string;
|
|
663
557
|
chain_id: string;
|
|
664
|
-
|
|
665
|
-
* The wallet chain types that support curve-based signing.
|
|
666
|
-
*/
|
|
667
|
-
chain_type: WalletsAPI.CurveSigningChainType;
|
|
558
|
+
chain_type: 'solana';
|
|
668
559
|
connector_type: 'embedded';
|
|
669
560
|
delegated: boolean;
|
|
670
561
|
first_verified_at: number | null;
|
|
@@ -681,110 +572,14 @@ export interface LinkedAccountCurveSigningEmbeddedWallet {
|
|
|
681
572
|
wallet_client_type: 'privy';
|
|
682
573
|
wallet_index: number;
|
|
683
574
|
}
|
|
684
|
-
export type LinkedAccountEmbeddedWallet = LinkedAccountEthereumEmbeddedWallet | LinkedAccountSolanaEmbeddedWallet | LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountCurveSigningEmbeddedWallet;
|
|
685
|
-
/**
|
|
686
|
-
* An embedded wallet account with an ID.
|
|
687
|
-
*/
|
|
688
|
-
export type LinkedAccountEmbeddedWalletWithID = LinkedAccountEmbeddedWalletWithID.LinkedAccountEthereumEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountSolanaEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountCurveSigningEmbeddedWallet;
|
|
689
|
-
export declare namespace LinkedAccountEmbeddedWalletWithID {
|
|
690
|
-
/**
|
|
691
|
-
* An Ethereum embedded wallet account linked to the user.
|
|
692
|
-
*/
|
|
693
|
-
interface LinkedAccountEthereumEmbeddedWallet extends Omit<UsersAPI.LinkedAccountEthereumEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
694
|
-
id: string;
|
|
695
|
-
recovery_method: 'privy-v2';
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* A Solana embedded wallet account linked to the user.
|
|
699
|
-
*/
|
|
700
|
-
interface LinkedAccountSolanaEmbeddedWallet extends Omit<UsersAPI.LinkedAccountSolanaEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
701
|
-
id: string;
|
|
702
|
-
recovery_method: 'privy-v2';
|
|
703
|
-
}
|
|
704
|
-
/**
|
|
705
|
-
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
706
|
-
*/
|
|
707
|
-
interface LinkedAccountBitcoinSegwitEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinSegwitEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
708
|
-
id: string;
|
|
709
|
-
recovery_method: 'privy-v2';
|
|
710
|
-
}
|
|
711
|
-
/**
|
|
712
|
-
* A Bitcoin Taproot embedded wallet account linked to the user.
|
|
713
|
-
*/
|
|
714
|
-
interface LinkedAccountBitcoinTaprootEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinTaprootEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
715
|
-
id: string;
|
|
716
|
-
recovery_method: 'privy-v2';
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* A curve signing embedded wallet account linked to the user.
|
|
720
|
-
*/
|
|
721
|
-
interface LinkedAccountCurveSigningEmbeddedWallet extends Omit<UsersAPI.LinkedAccountCurveSigningEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
722
|
-
id: string;
|
|
723
|
-
recovery_method: 'privy-v2';
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* A Google OAuth account linked to the user.
|
|
728
|
-
*/
|
|
729
|
-
export interface LinkedAccountGoogleOAuth {
|
|
730
|
-
email: string;
|
|
731
|
-
first_verified_at: number | null;
|
|
732
|
-
latest_verified_at: number | null;
|
|
733
|
-
name: string | null;
|
|
734
|
-
subject: string;
|
|
735
|
-
type: 'google_oauth';
|
|
736
|
-
verified_at: number;
|
|
737
|
-
}
|
|
738
|
-
/**
|
|
739
|
-
* A Twitter OAuth account linked to the user.
|
|
740
|
-
*/
|
|
741
|
-
export interface LinkedAccountTwitterOAuth {
|
|
742
|
-
first_verified_at: number | null;
|
|
743
|
-
latest_verified_at: number | null;
|
|
744
|
-
name: string | null;
|
|
745
|
-
profile_picture_url: string | null;
|
|
746
|
-
subject: string;
|
|
747
|
-
type: 'twitter_oauth';
|
|
748
|
-
username: string | null;
|
|
749
|
-
verified_at: number;
|
|
750
|
-
}
|
|
751
|
-
/**
|
|
752
|
-
* A Discord OAuth account linked to the user.
|
|
753
|
-
*/
|
|
754
|
-
export interface LinkedAccountDiscordOAuth {
|
|
755
|
-
email: string | null;
|
|
756
|
-
first_verified_at: number | null;
|
|
757
|
-
latest_verified_at: number | null;
|
|
758
|
-
subject: string;
|
|
759
|
-
type: 'discord_oauth';
|
|
760
|
-
username: string | null;
|
|
761
|
-
verified_at: number;
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* A GitHub OAuth account linked to the user.
|
|
765
|
-
*/
|
|
766
|
-
export interface LinkedAccountGitHubOAuth {
|
|
767
|
-
email: string | null;
|
|
768
|
-
first_verified_at: number | null;
|
|
769
|
-
latest_verified_at: number | null;
|
|
770
|
-
name: string | null;
|
|
771
|
-
subject: string;
|
|
772
|
-
type: 'github_oauth';
|
|
773
|
-
username: string | null;
|
|
774
|
-
verified_at: number;
|
|
775
|
-
}
|
|
776
575
|
/**
|
|
777
|
-
*
|
|
576
|
+
* The payload for importing a Spotify account.
|
|
778
577
|
*/
|
|
779
|
-
export interface
|
|
780
|
-
email: string | null;
|
|
781
|
-
first_verified_at: number | null;
|
|
782
|
-
latest_verified_at: number | null;
|
|
578
|
+
export interface LinkedAccountSpotifyInput {
|
|
783
579
|
subject: string;
|
|
784
|
-
type: '
|
|
785
|
-
|
|
580
|
+
type: 'spotify_oauth';
|
|
581
|
+
email?: string;
|
|
786
582
|
name?: string;
|
|
787
|
-
vanity_name?: string;
|
|
788
583
|
}
|
|
789
584
|
/**
|
|
790
585
|
* A Spotify OAuth account linked to the user.
|
|
@@ -799,15 +594,38 @@ export interface LinkedAccountSpotifyOAuth {
|
|
|
799
594
|
verified_at: number;
|
|
800
595
|
}
|
|
801
596
|
/**
|
|
802
|
-
*
|
|
597
|
+
* A Telegram account linked to the user.
|
|
803
598
|
*/
|
|
804
|
-
export interface
|
|
599
|
+
export interface LinkedAccountTelegram {
|
|
805
600
|
first_verified_at: number | null;
|
|
806
601
|
latest_verified_at: number | null;
|
|
807
|
-
|
|
808
|
-
type: '
|
|
809
|
-
username: string | null;
|
|
602
|
+
telegram_user_id: string;
|
|
603
|
+
type: 'telegram';
|
|
810
604
|
verified_at: number;
|
|
605
|
+
first_name?: string | null;
|
|
606
|
+
last_name?: string | null;
|
|
607
|
+
photo_url?: string | null;
|
|
608
|
+
username?: string | null;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* The payload for importing a Telegram account.
|
|
612
|
+
*/
|
|
613
|
+
export interface LinkedAccountTelegramInput {
|
|
614
|
+
telegram_user_id: string;
|
|
615
|
+
type: 'telegram';
|
|
616
|
+
first_name?: string;
|
|
617
|
+
last_name?: string;
|
|
618
|
+
photo_url?: string;
|
|
619
|
+
username?: string;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* The payload for importing a Tiktok account.
|
|
623
|
+
*/
|
|
624
|
+
export interface LinkedAccountTiktokInput {
|
|
625
|
+
name: string | null;
|
|
626
|
+
subject: string;
|
|
627
|
+
type: 'tiktok_oauth';
|
|
628
|
+
username: string;
|
|
811
629
|
}
|
|
812
630
|
/**
|
|
813
631
|
* A TikTok OAuth account linked to the user.
|
|
@@ -822,17 +640,12 @@ export interface LinkedAccountTiktokOAuth {
|
|
|
822
640
|
verified_at: number;
|
|
823
641
|
}
|
|
824
642
|
/**
|
|
825
|
-
*
|
|
643
|
+
* The payload for importing a Twitch account.
|
|
826
644
|
*/
|
|
827
|
-
export interface
|
|
828
|
-
email: string | null;
|
|
829
|
-
first_verified_at: number | null;
|
|
830
|
-
latest_verified_at: number | null;
|
|
831
|
-
name: string | null;
|
|
832
|
-
profile_picture_url: string | null;
|
|
645
|
+
export interface LinkedAccountTwitchInput {
|
|
833
646
|
subject: string;
|
|
834
|
-
type: '
|
|
835
|
-
|
|
647
|
+
type: 'twitch_oauth';
|
|
648
|
+
username?: string;
|
|
836
649
|
}
|
|
837
650
|
/**
|
|
838
651
|
* A Twitch OAuth account linked to the user.
|
|
@@ -846,87 +659,71 @@ export interface LinkedAccountTwitchOAuth {
|
|
|
846
659
|
verified_at: number;
|
|
847
660
|
}
|
|
848
661
|
/**
|
|
849
|
-
*
|
|
662
|
+
* The payload for importing a Twitter account.
|
|
850
663
|
*/
|
|
851
|
-
export interface
|
|
852
|
-
|
|
853
|
-
first_verified_at: number | null;
|
|
854
|
-
latest_verified_at: number | null;
|
|
664
|
+
export interface LinkedAccountTwitterInput {
|
|
665
|
+
name: string;
|
|
855
666
|
subject: string;
|
|
856
|
-
type: '
|
|
857
|
-
|
|
667
|
+
type: 'twitter_oauth';
|
|
668
|
+
username: string;
|
|
669
|
+
profile_picture_url?: string;
|
|
858
670
|
}
|
|
859
671
|
/**
|
|
860
|
-
* A
|
|
672
|
+
* A Twitter OAuth account linked to the user.
|
|
861
673
|
*/
|
|
862
|
-
export interface
|
|
674
|
+
export interface LinkedAccountTwitterOAuth {
|
|
863
675
|
first_verified_at: number | null;
|
|
864
676
|
latest_verified_at: number | null;
|
|
677
|
+
name: string | null;
|
|
678
|
+
profile_picture_url: string | null;
|
|
865
679
|
subject: string;
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
* "custom:".
|
|
869
|
-
*/
|
|
870
|
-
type: ClientAuthAPI.CustomOAuthProviderID;
|
|
680
|
+
type: 'twitter_oauth';
|
|
681
|
+
username: string | null;
|
|
871
682
|
verified_at: number;
|
|
872
|
-
email?: string;
|
|
873
|
-
name?: string;
|
|
874
|
-
profile_picture_url?: string;
|
|
875
|
-
username?: string;
|
|
876
683
|
}
|
|
877
684
|
/**
|
|
878
|
-
*
|
|
685
|
+
* The possible types of linked accounts.
|
|
879
686
|
*/
|
|
880
|
-
export
|
|
881
|
-
custom_user_id: string;
|
|
882
|
-
first_verified_at: number | null;
|
|
883
|
-
latest_verified_at: number | null;
|
|
884
|
-
type: 'custom_auth';
|
|
885
|
-
verified_at: number;
|
|
886
|
-
}
|
|
687
|
+
export type LinkedAccountType = 'email' | 'phone' | 'wallet' | 'smart_wallet' | 'google_oauth' | 'twitter_oauth' | 'discord_oauth' | 'github_oauth' | 'spotify_oauth' | 'instagram_oauth' | 'tiktok_oauth' | 'line_oauth' | 'twitch_oauth' | 'linkedin_oauth' | 'apple_oauth' | 'custom_auth' | 'farcaster' | 'passkey' | 'telegram' | 'cross_app' | 'authorization_key' | ClientAuthAPI.CustomOAuthProviderID;
|
|
887
688
|
/**
|
|
888
|
-
*
|
|
689
|
+
* The payload for importing a wallet account.
|
|
889
690
|
*/
|
|
890
|
-
export interface
|
|
691
|
+
export interface LinkedAccountWalletInput {
|
|
891
692
|
address: string;
|
|
693
|
+
chain_type: 'ethereum' | 'solana';
|
|
694
|
+
type: 'wallet';
|
|
892
695
|
}
|
|
893
696
|
/**
|
|
894
|
-
* A
|
|
697
|
+
* A multi-factor authentication method linked to the user.
|
|
895
698
|
*/
|
|
896
|
-
export
|
|
897
|
-
address: string;
|
|
898
|
-
}
|
|
699
|
+
export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
|
|
899
700
|
/**
|
|
900
|
-
*
|
|
701
|
+
* OAuth tokens associated with the user.
|
|
901
702
|
*/
|
|
902
|
-
export interface
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
type: 'cross_app';
|
|
910
|
-
verified_at: number;
|
|
703
|
+
export interface OAuthTokens {
|
|
704
|
+
access_token: string;
|
|
705
|
+
provider: string;
|
|
706
|
+
access_token_expires_in_seconds?: number;
|
|
707
|
+
refresh_token?: string;
|
|
708
|
+
refresh_token_expires_in_seconds?: number;
|
|
709
|
+
scopes?: Array<string>;
|
|
911
710
|
}
|
|
912
711
|
/**
|
|
913
|
-
*
|
|
712
|
+
* A Passkey MFA method.
|
|
914
713
|
*/
|
|
915
|
-
export interface
|
|
916
|
-
|
|
917
|
-
latest_verified_at: number | null;
|
|
918
|
-
public_key: string;
|
|
919
|
-
type: 'authorization_key';
|
|
714
|
+
export interface PasskeyMfaMethod {
|
|
715
|
+
type: 'passkey';
|
|
920
716
|
verified_at: number;
|
|
921
717
|
}
|
|
922
718
|
/**
|
|
923
|
-
*
|
|
924
|
-
*/
|
|
925
|
-
export type LinkedAccount = LinkedAccountEmail | LinkedAccountPhone | LinkedAccountEthereum | LinkedAccountSolana | LinkedAccountSmartWallet | LinkedAccountEthereumEmbeddedWallet | LinkedAccountSolanaEmbeddedWallet | LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountCurveSigningEmbeddedWallet | LinkedAccountGoogleOAuth | LinkedAccountTwitterOAuth | LinkedAccountDiscordOAuth | LinkedAccountGitHubOAuth | LinkedAccountSpotifyOAuth | LinkedAccountInstagramOAuth | LinkedAccountTiktokOAuth | LinkedAccountLineOAuth | LinkedAccountTwitchOAuth | LinkedAccountLinkedInOAuth | LinkedAccountAppleOAuth | LinkedAccountCustomOAuth | LinkedAccountCustomJwt | LinkedAccountFarcaster | LinkedAccountPasskey | LinkedAccountTelegram | LinkedAccountCrossApp | LinkedAccountAuthorizationKey;
|
|
926
|
-
/**
|
|
927
|
-
* The possible types of linked accounts.
|
|
719
|
+
* The payload for partially updating custom metadata on a user.
|
|
928
720
|
*/
|
|
929
|
-
export
|
|
721
|
+
export interface PatchUsersCustomMetadata {
|
|
722
|
+
/**
|
|
723
|
+
* Custom metadata associated with the user.
|
|
724
|
+
*/
|
|
725
|
+
custom_metadata: CustomMetadata;
|
|
726
|
+
}
|
|
930
727
|
/**
|
|
931
728
|
* A SMS MFA method.
|
|
932
729
|
*/
|
|
@@ -941,17 +738,6 @@ export interface TotpMfaMethod {
|
|
|
941
738
|
type: 'totp';
|
|
942
739
|
verified_at: number;
|
|
943
740
|
}
|
|
944
|
-
/**
|
|
945
|
-
* A Passkey MFA method.
|
|
946
|
-
*/
|
|
947
|
-
export interface PasskeyMfaMethod {
|
|
948
|
-
type: 'passkey';
|
|
949
|
-
verified_at: number;
|
|
950
|
-
}
|
|
951
|
-
/**
|
|
952
|
-
* A multi-factor authentication method linked to the user.
|
|
953
|
-
*/
|
|
954
|
-
export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
|
|
955
741
|
/**
|
|
956
742
|
* A Privy user object.
|
|
957
743
|
*/
|
|
@@ -977,15 +763,29 @@ export interface User {
|
|
|
977
763
|
custom_metadata?: CustomMetadata;
|
|
978
764
|
}
|
|
979
765
|
/**
|
|
980
|
-
*
|
|
766
|
+
* The payload for batch creating users.
|
|
981
767
|
*/
|
|
982
|
-
export interface
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
768
|
+
export interface UserBatchCreateInput {
|
|
769
|
+
users: Array<UserBatchCreateInput.User>;
|
|
770
|
+
}
|
|
771
|
+
export declare namespace UserBatchCreateInput {
|
|
772
|
+
interface User {
|
|
773
|
+
linked_accounts: Array<UsersAPI.LinkedAccountInput>;
|
|
774
|
+
create_embedded_wallet?: boolean;
|
|
775
|
+
create_ethereum_smart_wallet?: boolean;
|
|
776
|
+
create_ethereum_wallet?: boolean;
|
|
777
|
+
create_n_embedded_wallets?: number;
|
|
778
|
+
create_n_ethereum_wallets?: number;
|
|
779
|
+
create_solana_wallet?: boolean;
|
|
780
|
+
/**
|
|
781
|
+
* Custom metadata associated with the user.
|
|
782
|
+
*/
|
|
783
|
+
custom_metadata?: UsersAPI.CustomMetadata;
|
|
784
|
+
/**
|
|
785
|
+
* Wallets to create.
|
|
786
|
+
*/
|
|
787
|
+
wallets?: Array<EmbeddedWalletsAPI.WalletCreationInput>;
|
|
788
|
+
}
|
|
989
789
|
}
|
|
990
790
|
/**
|
|
991
791
|
* The user object along their identity token.
|
|
@@ -997,142 +797,7 @@ export interface UserWithIdentityToken {
|
|
|
997
797
|
*/
|
|
998
798
|
user: User;
|
|
999
799
|
}
|
|
1000
|
-
/**
|
|
1001
|
-
* The authenticated user.
|
|
1002
|
-
*/
|
|
1003
|
-
export interface AuthenticatedUser {
|
|
1004
|
-
token: string | null;
|
|
1005
|
-
privy_access_token: string | null;
|
|
1006
|
-
refresh_token: string | null;
|
|
1007
|
-
/**
|
|
1008
|
-
* Instructs the client on how to handle tokens received
|
|
1009
|
-
*/
|
|
1010
|
-
session_update_action: 'set' | 'ignore' | 'clear';
|
|
1011
|
-
/**
|
|
1012
|
-
* A Privy user object.
|
|
1013
|
-
*/
|
|
1014
|
-
user: User;
|
|
1015
|
-
identity_token?: string;
|
|
1016
|
-
is_new_user?: boolean;
|
|
1017
|
-
/**
|
|
1018
|
-
* OAuth tokens associated with the user.
|
|
1019
|
-
*/
|
|
1020
|
-
oauth_tokens?: OAuthTokens;
|
|
1021
|
-
}
|
|
1022
|
-
export interface UserCreateParams {
|
|
1023
|
-
linked_accounts: Array<LinkedAccountInput>;
|
|
1024
|
-
/**
|
|
1025
|
-
* Custom metadata associated with the user.
|
|
1026
|
-
*/
|
|
1027
|
-
custom_metadata?: CustomMetadata;
|
|
1028
|
-
/**
|
|
1029
|
-
* Wallets to create for the user.
|
|
1030
|
-
*/
|
|
1031
|
-
wallets?: Array<UserCreateParams.Wallet>;
|
|
1032
|
-
}
|
|
1033
|
-
export declare namespace UserCreateParams {
|
|
1034
|
-
interface Wallet {
|
|
1035
|
-
/**
|
|
1036
|
-
* The wallet chain types.
|
|
1037
|
-
*/
|
|
1038
|
-
chain_type: WalletsAPI.WalletChainType;
|
|
1039
|
-
/**
|
|
1040
|
-
* Additional signers for the wallet.
|
|
1041
|
-
*/
|
|
1042
|
-
additional_signers?: Array<Wallet.AdditionalSigner>;
|
|
1043
|
-
/**
|
|
1044
|
-
* Create a smart wallet with this wallet as the signer. Only supported for wallets
|
|
1045
|
-
* with `chain_type: "ethereum"`.
|
|
1046
|
-
*/
|
|
1047
|
-
create_smart_wallet?: boolean;
|
|
1048
|
-
/**
|
|
1049
|
-
* Policy IDs to enforce on the wallet. Currently, only one policy is supported per
|
|
1050
|
-
* wallet.
|
|
1051
|
-
*/
|
|
1052
|
-
policy_ids?: Array<string>;
|
|
1053
|
-
}
|
|
1054
|
-
namespace Wallet {
|
|
1055
|
-
interface AdditionalSigner {
|
|
1056
|
-
/**
|
|
1057
|
-
* A unique identifier for a key quorum.
|
|
1058
|
-
*/
|
|
1059
|
-
signer_id: SharedAPI.KeyQuorumID;
|
|
1060
|
-
/**
|
|
1061
|
-
* The array of policy IDs that will be applied to wallet requests. If specified,
|
|
1062
|
-
* this will override the base policy IDs set on the wallet. Currently, only one
|
|
1063
|
-
* policy is supported per signer.
|
|
1064
|
-
*/
|
|
1065
|
-
override_policy_ids?: Array<string>;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
export interface UserListParams extends CursorParams {
|
|
1070
|
-
}
|
|
1071
|
-
export interface UserGetByCustomAuthIDParams {
|
|
1072
|
-
custom_user_id: string;
|
|
1073
|
-
}
|
|
1074
|
-
export interface UserGetByDiscordUsernameParams {
|
|
1075
|
-
username: string;
|
|
1076
|
-
}
|
|
1077
|
-
export interface UserGetByEmailAddressParams {
|
|
1078
|
-
address: string;
|
|
1079
|
-
}
|
|
1080
|
-
export interface UserGetByFarcasterIDParams {
|
|
1081
|
-
fid: number;
|
|
1082
|
-
}
|
|
1083
|
-
export interface UserGetByGitHubUsernameParams {
|
|
1084
|
-
username: string;
|
|
1085
|
-
}
|
|
1086
|
-
export interface UserGetByPhoneNumberParams {
|
|
1087
|
-
number: string;
|
|
1088
|
-
}
|
|
1089
|
-
export interface UserGetBySmartWalletAddressParams {
|
|
1090
|
-
address: string;
|
|
1091
|
-
}
|
|
1092
|
-
export interface UserGetByTelegramUserIDParams {
|
|
1093
|
-
telegram_user_id: string;
|
|
1094
|
-
}
|
|
1095
|
-
export interface UserGetByTelegramUsernameParams {
|
|
1096
|
-
username: string;
|
|
1097
|
-
}
|
|
1098
|
-
export interface UserGetByTwitterSubjectParams {
|
|
1099
|
-
subject: string;
|
|
1100
|
-
}
|
|
1101
|
-
export interface UserGetByTwitterUsernameParams {
|
|
1102
|
-
username: string;
|
|
1103
|
-
}
|
|
1104
|
-
export interface UserGetByWalletAddressParams {
|
|
1105
|
-
address: string;
|
|
1106
|
-
}
|
|
1107
|
-
export interface UserPregenerateWalletsParams {
|
|
1108
|
-
wallets: Array<EmbeddedWalletsAPI.WalletCreationInput>;
|
|
1109
|
-
}
|
|
1110
|
-
export type UserSearchParams = UserSearchParams.Variant0 | UserSearchParams.Variant1;
|
|
1111
|
-
export declare namespace UserSearchParams {
|
|
1112
|
-
interface Variant0 {
|
|
1113
|
-
searchTerm: string;
|
|
1114
|
-
}
|
|
1115
|
-
interface Variant1 {
|
|
1116
|
-
emails: Array<string>;
|
|
1117
|
-
phoneNumbers: Array<string>;
|
|
1118
|
-
walletAddresses: Array<string>;
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
export interface UserSetCustomMetadataParams {
|
|
1122
|
-
/**
|
|
1123
|
-
* Custom metadata associated with the user.
|
|
1124
|
-
*/
|
|
1125
|
-
custom_metadata: CustomMetadata;
|
|
1126
|
-
}
|
|
1127
|
-
export interface UserUnlinkLinkedAccountParams {
|
|
1128
|
-
handle: string;
|
|
1129
|
-
/**
|
|
1130
|
-
* The possible types of linked accounts.
|
|
1131
|
-
*/
|
|
1132
|
-
type: LinkedAccountType;
|
|
1133
|
-
provider?: string;
|
|
1134
|
-
}
|
|
1135
800
|
export declare namespace Users {
|
|
1136
|
-
export { type
|
|
801
|
+
export { type AuthenticatedUser as AuthenticatedUser, type CrossAppEmbeddedWallet as CrossAppEmbeddedWallet, type CrossAppSmartWallet as CrossAppSmartWallet, type CustomMetadata as CustomMetadata, type EmbeddedWalletRecoveryMethod as EmbeddedWalletRecoveryMethod, type LinkedAccount as LinkedAccount, type LinkedAccountAppleInput as LinkedAccountAppleInput, type LinkedAccountAppleOAuth as LinkedAccountAppleOAuth, type LinkedAccountAuthorizationKey as LinkedAccountAuthorizationKey, type LinkedAccountBaseWallet as LinkedAccountBaseWallet, type LinkedAccountBitcoinSegwitEmbeddedWallet as LinkedAccountBitcoinSegwitEmbeddedWallet, type LinkedAccountBitcoinTaprootEmbeddedWallet as LinkedAccountBitcoinTaprootEmbeddedWallet, type LinkedAccountCrossApp as LinkedAccountCrossApp, type LinkedAccountCurveSigningEmbeddedWallet as LinkedAccountCurveSigningEmbeddedWallet, type LinkedAccountCustomJwtInput as LinkedAccountCustomJwtInput, type LinkedAccountCustomJwt as LinkedAccountCustomJwt, type LinkedAccountCustomOAuth as LinkedAccountCustomOAuth, type LinkedAccountDiscordInput as LinkedAccountDiscordInput, type LinkedAccountDiscordOAuth as LinkedAccountDiscordOAuth, type LinkedAccountEmail as LinkedAccountEmail, type LinkedAccountEmailInput as LinkedAccountEmailInput, type LinkedAccountEmbeddedWallet as LinkedAccountEmbeddedWallet, type LinkedAccountEmbeddedWalletWithID as LinkedAccountEmbeddedWalletWithID, type LinkedAccountEthereum as LinkedAccountEthereum, type LinkedAccountEthereumEmbeddedWallet as LinkedAccountEthereumEmbeddedWallet, type LinkedAccountFarcaster as LinkedAccountFarcaster, type LinkedAccountFarcasterInput as LinkedAccountFarcasterInput, type LinkedAccountGitHubInput as LinkedAccountGitHubInput, type LinkedAccountGitHubOAuth as LinkedAccountGitHubOAuth, type LinkedAccountGoogleInput as LinkedAccountGoogleInput, type LinkedAccountGoogleOAuth as LinkedAccountGoogleOAuth, type LinkedAccountInput as LinkedAccountInput, type LinkedAccountInstagramInput as LinkedAccountInstagramInput, type LinkedAccountInstagramOAuth as LinkedAccountInstagramOAuth, type LinkedAccountLineInput as LinkedAccountLineInput, type LinkedAccountLineOAuth as LinkedAccountLineOAuth, type LinkedAccountLinkedInInput as LinkedAccountLinkedInInput, type LinkedAccountLinkedInOAuth as LinkedAccountLinkedInOAuth, type LinkedAccountPasskey as LinkedAccountPasskey, type LinkedAccountPasskeyInput as LinkedAccountPasskeyInput, type LinkedAccountPhone as LinkedAccountPhone, type LinkedAccountPhoneInput as LinkedAccountPhoneInput, type LinkedAccountSmartWallet as LinkedAccountSmartWallet, type LinkedAccountSolana as LinkedAccountSolana, type LinkedAccountSolanaEmbeddedWallet as LinkedAccountSolanaEmbeddedWallet, type LinkedAccountSpotifyInput as LinkedAccountSpotifyInput, type LinkedAccountSpotifyOAuth as LinkedAccountSpotifyOAuth, type LinkedAccountTelegram as LinkedAccountTelegram, type LinkedAccountTelegramInput as LinkedAccountTelegramInput, type LinkedAccountTiktokInput as LinkedAccountTiktokInput, type LinkedAccountTiktokOAuth as LinkedAccountTiktokOAuth, type LinkedAccountTwitchInput as LinkedAccountTwitchInput, type LinkedAccountTwitchOAuth as LinkedAccountTwitchOAuth, type LinkedAccountTwitterInput as LinkedAccountTwitterInput, type LinkedAccountTwitterOAuth as LinkedAccountTwitterOAuth, type LinkedAccountType as LinkedAccountType, type LinkedAccountWalletInput as LinkedAccountWalletInput, type LinkedMfaMethod as LinkedMfaMethod, type OAuthTokens as OAuthTokens, type PasskeyMfaMethod as PasskeyMfaMethod, type PatchUsersCustomMetadata as PatchUsersCustomMetadata, type SMSMfaMethod as SMSMfaMethod, type TotpMfaMethod as TotpMfaMethod, type User as User, type UserBatchCreateInput as UserBatchCreateInput, type UserWithIdentityToken as UserWithIdentityToken, };
|
|
1137
802
|
}
|
|
1138
803
|
//# sourceMappingURL=users.d.ts.map
|