@privy-io/api-types 0.8.0 → 0.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/CHANGELOG.md +57 -0
- package/client.d.mts +35 -32
- package/client.d.mts.map +1 -1
- package/client.d.ts +35 -32
- package/client.d.ts.map +1 -1
- package/client.js +22 -8
- package/client.js.map +1 -1
- package/client.mjs +22 -8
- 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/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.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 +177 -129
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +177 -129
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +650 -648
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +650 -648
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +84 -84
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +84 -84
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/funding.d.mts +42 -42
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +42 -42
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +19 -18
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +19 -18
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +270 -266
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +270 -266
- package/resources/intents.d.ts.map +1 -1
- package/resources/key-quorums.d.mts +20 -20
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +20 -20
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/kraken-embed.d.mts +62 -19
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +62 -19
- 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 +360 -231
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +360 -231
- package/resources/policies.d.ts.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 +8 -11
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +8 -11
- 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 +56 -66
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +56 -66
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +457 -448
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +457 -448
- package/resources/users.d.ts.map +1 -1
- package/resources/wallet-actions.d.mts +450 -41
- package/resources/wallet-actions.d.mts.map +1 -1
- package/resources/wallet-actions.d.ts +450 -41
- package/resources/wallet-actions.d.ts.map +1 -1
- package/resources/wallets/balance.d.mts +2 -1
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +2 -1
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs.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 +16 -31
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +16 -31
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +1 -1
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs +1 -1
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +1475 -1172
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +1475 -1172
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +10 -6
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +10 -6
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +1345 -582
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +1345 -582
- 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 +661 -455
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/accounts.ts +157 -103
- package/src/resources/aggregations.ts +55 -55
- package/src/resources/apps.ts +232 -166
- package/src/resources/client-auth.ts +890 -890
- package/src/resources/embedded-wallets.ts +123 -123
- package/src/resources/funding.ts +66 -66
- package/src/resources/index.ts +521 -431
- package/src/resources/intents.ts +326 -322
- package/src/resources/key-quorums.ts +23 -23
- package/src/resources/kraken-embed.ts +116 -19
- package/src/resources/organizations.ts +82 -0
- package/src/resources/policies.ts +495 -339
- package/src/resources/shared.ts +34 -34
- package/src/resources/swaps.ts +9 -14
- package/src/resources/transactions.ts +88 -115
- package/src/resources/users.ts +664 -653
- package/src/resources/wallet-actions.ts +585 -56
- package/src/resources/wallets/balance.ts +2 -1
- package/src/resources/wallets/index.ts +158 -138
- package/src/resources/wallets/transactions.ts +20 -83
- package/src/resources/wallets/wallets.ts +1997 -1563
- package/src/resources/webhooks.ts +1652 -700
- 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.mts
CHANGED
|
@@ -237,176 +237,89 @@ export declare class Users extends APIResource {
|
|
|
237
237
|
}
|
|
238
238
|
export type UsersCursor = Cursor<User>;
|
|
239
239
|
/**
|
|
240
|
-
*
|
|
241
|
-
*/
|
|
242
|
-
export interface LinkedAccountEmail {
|
|
243
|
-
address: string;
|
|
244
|
-
first_verified_at: number | null;
|
|
245
|
-
latest_verified_at: number | null;
|
|
246
|
-
type: 'email';
|
|
247
|
-
verified_at: number;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* A phone number account linked to the user.
|
|
240
|
+
* The authenticated user.
|
|
251
241
|
*/
|
|
252
|
-
export interface
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
242
|
+
export interface AuthenticatedUser {
|
|
243
|
+
token: string | null;
|
|
244
|
+
privy_access_token: string | null;
|
|
245
|
+
refresh_token: string | null;
|
|
246
|
+
/**
|
|
247
|
+
* Instructs the client on how to handle tokens received
|
|
248
|
+
*/
|
|
249
|
+
session_update_action: 'set' | 'ignore' | 'clear';
|
|
250
|
+
/**
|
|
251
|
+
* A Privy user object.
|
|
252
|
+
*/
|
|
253
|
+
user: User;
|
|
254
|
+
identity_token?: string;
|
|
255
|
+
is_new_user?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* OAuth tokens associated with the user.
|
|
258
|
+
*/
|
|
259
|
+
oauth_tokens?: OAuthTokens;
|
|
259
260
|
}
|
|
260
261
|
/**
|
|
261
|
-
*
|
|
262
|
+
* An embedded wallet associated with a cross-app account.
|
|
262
263
|
*/
|
|
263
|
-
export interface
|
|
264
|
+
export interface CrossAppEmbeddedWallet {
|
|
264
265
|
address: string;
|
|
265
|
-
chain_type: 'solana' | 'ethereum';
|
|
266
|
-
type: 'wallet' | 'smart_wallet';
|
|
267
266
|
}
|
|
268
267
|
/**
|
|
269
|
-
*
|
|
268
|
+
* A smart wallet associated with a cross-app account.
|
|
270
269
|
*/
|
|
271
|
-
export interface
|
|
270
|
+
export interface CrossAppSmartWallet {
|
|
272
271
|
address: string;
|
|
273
|
-
chain_type: 'ethereum';
|
|
274
|
-
first_verified_at: number | null;
|
|
275
|
-
latest_verified_at: number | null;
|
|
276
|
-
type: 'wallet';
|
|
277
|
-
verified_at: number;
|
|
278
|
-
wallet_client: 'unknown';
|
|
279
|
-
chain_id?: string;
|
|
280
|
-
connector_type?: string;
|
|
281
|
-
wallet_client_type?: string;
|
|
282
272
|
}
|
|
283
273
|
/**
|
|
284
|
-
*
|
|
274
|
+
* Custom metadata associated with the user.
|
|
285
275
|
*/
|
|
286
|
-
export
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
latest_verified_at: number | null;
|
|
290
|
-
/**
|
|
291
|
-
* The supported smart wallet providers.
|
|
292
|
-
*/
|
|
293
|
-
smart_wallet_type: EmbeddedWalletsAPI.SmartWalletType;
|
|
294
|
-
type: 'smart_wallet';
|
|
295
|
-
verified_at: number;
|
|
296
|
-
smart_wallet_version?: string;
|
|
297
|
-
}
|
|
276
|
+
export type CustomMetadata = {
|
|
277
|
+
[key: string]: string | number | boolean;
|
|
278
|
+
};
|
|
298
279
|
/**
|
|
299
|
-
*
|
|
280
|
+
* The method used to recover an embedded wallet account.
|
|
300
281
|
*/
|
|
301
|
-
export
|
|
302
|
-
address: string;
|
|
303
|
-
chain_type: 'solana';
|
|
304
|
-
first_verified_at: number | null;
|
|
305
|
-
latest_verified_at: number | null;
|
|
306
|
-
type: 'wallet';
|
|
307
|
-
verified_at: number;
|
|
308
|
-
wallet_client: 'unknown';
|
|
309
|
-
connector_type?: string;
|
|
310
|
-
wallet_client_type?: string;
|
|
311
|
-
}
|
|
282
|
+
export type EmbeddedWalletRecoveryMethod = 'privy' | 'user-passcode' | 'google-drive' | 'icloud' | 'recovery-encryption-key' | 'privy-v2';
|
|
312
283
|
/**
|
|
313
|
-
* A
|
|
284
|
+
* A linked account for the user.
|
|
314
285
|
*/
|
|
315
|
-
export
|
|
316
|
-
fid: number;
|
|
317
|
-
first_verified_at: number | null;
|
|
318
|
-
latest_verified_at: number | null;
|
|
319
|
-
owner_address: string;
|
|
320
|
-
type: 'farcaster';
|
|
321
|
-
verified_at: number;
|
|
322
|
-
bio?: string;
|
|
323
|
-
display_name?: string;
|
|
324
|
-
homepage_url?: string;
|
|
325
|
-
profile_picture?: string;
|
|
326
|
-
profile_picture_url?: string;
|
|
327
|
-
signer_public_key?: string;
|
|
328
|
-
username?: string;
|
|
329
|
-
}
|
|
286
|
+
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;
|
|
330
287
|
/**
|
|
331
|
-
*
|
|
288
|
+
* The payload for importing an Apple account.
|
|
332
289
|
*/
|
|
333
|
-
export interface
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
latest_verified_at: number | null;
|
|
338
|
-
type: 'passkey';
|
|
339
|
-
verified_at: number;
|
|
340
|
-
authenticator_name?: string;
|
|
341
|
-
created_with_browser?: string;
|
|
342
|
-
created_with_device?: string;
|
|
343
|
-
created_with_os?: string;
|
|
344
|
-
public_key?: string;
|
|
290
|
+
export interface LinkedAccountAppleInput {
|
|
291
|
+
subject: string;
|
|
292
|
+
type: 'apple_oauth';
|
|
293
|
+
email?: string;
|
|
345
294
|
}
|
|
346
295
|
/**
|
|
347
|
-
*
|
|
296
|
+
* An Apple OAuth account linked to the user.
|
|
348
297
|
*/
|
|
349
|
-
export interface
|
|
298
|
+
export interface LinkedAccountAppleOAuth {
|
|
299
|
+
email: string | null;
|
|
350
300
|
first_verified_at: number | null;
|
|
351
301
|
latest_verified_at: number | null;
|
|
352
|
-
|
|
353
|
-
type: '
|
|
302
|
+
subject: string;
|
|
303
|
+
type: 'apple_oauth';
|
|
354
304
|
verified_at: number;
|
|
355
|
-
first_name?: string | null;
|
|
356
|
-
last_name?: string | null;
|
|
357
|
-
photo_url?: string | null;
|
|
358
|
-
username?: string | null;
|
|
359
305
|
}
|
|
360
306
|
/**
|
|
361
|
-
*
|
|
362
|
-
*/
|
|
363
|
-
export type EmbeddedWalletRecoveryMethod = 'privy' | 'user-passcode' | 'google-drive' | 'icloud' | 'recovery-encryption-key' | 'privy-v2';
|
|
364
|
-
/**
|
|
365
|
-
* An Ethereum embedded wallet account linked to the user.
|
|
307
|
+
* An authorization key linked to the user.
|
|
366
308
|
*/
|
|
367
|
-
export interface
|
|
368
|
-
id: string | null;
|
|
369
|
-
address: string;
|
|
370
|
-
chain_id: string;
|
|
371
|
-
chain_type: 'ethereum';
|
|
372
|
-
connector_type: 'embedded';
|
|
373
|
-
delegated: boolean;
|
|
309
|
+
export interface LinkedAccountAuthorizationKey {
|
|
374
310
|
first_verified_at: number | null;
|
|
375
|
-
imported: boolean;
|
|
376
311
|
latest_verified_at: number | null;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
*/
|
|
380
|
-
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
381
|
-
type: 'wallet';
|
|
312
|
+
public_key: string;
|
|
313
|
+
type: 'authorization_key';
|
|
382
314
|
verified_at: number;
|
|
383
|
-
wallet_client: 'privy';
|
|
384
|
-
wallet_client_type: 'privy';
|
|
385
|
-
wallet_index: number;
|
|
386
315
|
}
|
|
387
316
|
/**
|
|
388
|
-
*
|
|
317
|
+
* Base schema for wallet accounts linked to the user.
|
|
389
318
|
*/
|
|
390
|
-
export interface
|
|
391
|
-
id: string | null;
|
|
319
|
+
export interface LinkedAccountBaseWallet {
|
|
392
320
|
address: string;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
connector_type: 'embedded';
|
|
396
|
-
delegated: boolean;
|
|
397
|
-
first_verified_at: number | null;
|
|
398
|
-
imported: boolean;
|
|
399
|
-
latest_verified_at: number | null;
|
|
400
|
-
public_key: string;
|
|
401
|
-
/**
|
|
402
|
-
* The method used to recover an embedded wallet account.
|
|
403
|
-
*/
|
|
404
|
-
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
405
|
-
type: 'wallet';
|
|
406
|
-
verified_at: number;
|
|
407
|
-
wallet_client: 'privy';
|
|
408
|
-
wallet_client_type: 'privy';
|
|
409
|
-
wallet_index: number;
|
|
321
|
+
chain_type: 'solana' | 'ethereum';
|
|
322
|
+
type: 'wallet' | 'smart_wallet';
|
|
410
323
|
}
|
|
411
324
|
/**
|
|
412
325
|
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
@@ -456,6 +369,19 @@ export interface LinkedAccountBitcoinTaprootEmbeddedWallet {
|
|
|
456
369
|
wallet_client_type: 'privy';
|
|
457
370
|
wallet_index: number;
|
|
458
371
|
}
|
|
372
|
+
/**
|
|
373
|
+
* A cross-app account linked to the user.
|
|
374
|
+
*/
|
|
375
|
+
export interface LinkedAccountCrossApp {
|
|
376
|
+
embedded_wallets: Array<CrossAppEmbeddedWallet>;
|
|
377
|
+
first_verified_at: number | null;
|
|
378
|
+
latest_verified_at: number | null;
|
|
379
|
+
provider_app_id: string;
|
|
380
|
+
smart_wallets: Array<CrossAppSmartWallet>;
|
|
381
|
+
subject: string;
|
|
382
|
+
type: 'cross_app';
|
|
383
|
+
verified_at: number;
|
|
384
|
+
}
|
|
459
385
|
/**
|
|
460
386
|
* A curve signing embedded wallet account linked to the user.
|
|
461
387
|
*/
|
|
@@ -483,72 +409,49 @@ export interface LinkedAccountCurveSigningEmbeddedWallet {
|
|
|
483
409
|
wallet_client_type: 'privy';
|
|
484
410
|
wallet_index: number;
|
|
485
411
|
}
|
|
486
|
-
export type LinkedAccountEmbeddedWallet = LinkedAccountEthereumEmbeddedWallet | LinkedAccountSolanaEmbeddedWallet | LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountCurveSigningEmbeddedWallet;
|
|
487
412
|
/**
|
|
488
|
-
*
|
|
413
|
+
* The payload for importing a Custom JWT account.
|
|
489
414
|
*/
|
|
490
|
-
export
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
* An Ethereum embedded wallet account linked to the user.
|
|
494
|
-
*/
|
|
495
|
-
interface LinkedAccountEthereumEmbeddedWallet extends Omit<UsersAPI.LinkedAccountEthereumEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
496
|
-
id: string;
|
|
497
|
-
recovery_method: 'privy-v2';
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* A Solana embedded wallet account linked to the user.
|
|
501
|
-
*/
|
|
502
|
-
interface LinkedAccountSolanaEmbeddedWallet extends Omit<UsersAPI.LinkedAccountSolanaEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
503
|
-
id: string;
|
|
504
|
-
recovery_method: 'privy-v2';
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
508
|
-
*/
|
|
509
|
-
interface LinkedAccountBitcoinSegwitEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinSegwitEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
510
|
-
id: string;
|
|
511
|
-
recovery_method: 'privy-v2';
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* A Bitcoin Taproot embedded wallet account linked to the user.
|
|
515
|
-
*/
|
|
516
|
-
interface LinkedAccountBitcoinTaprootEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinTaprootEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
517
|
-
id: string;
|
|
518
|
-
recovery_method: 'privy-v2';
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* A curve signing embedded wallet account linked to the user.
|
|
522
|
-
*/
|
|
523
|
-
interface LinkedAccountCurveSigningEmbeddedWallet extends Omit<UsersAPI.LinkedAccountCurveSigningEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
524
|
-
id: string;
|
|
525
|
-
recovery_method: 'privy-v2';
|
|
526
|
-
}
|
|
415
|
+
export interface LinkedAccountCustomJwtInput {
|
|
416
|
+
custom_user_id: string;
|
|
417
|
+
type: 'custom_auth';
|
|
527
418
|
}
|
|
528
419
|
/**
|
|
529
|
-
* A
|
|
420
|
+
* A custom JWT account linked to the user.
|
|
530
421
|
*/
|
|
531
|
-
export interface
|
|
532
|
-
|
|
422
|
+
export interface LinkedAccountCustomJwt {
|
|
423
|
+
custom_user_id: string;
|
|
533
424
|
first_verified_at: number | null;
|
|
534
425
|
latest_verified_at: number | null;
|
|
535
|
-
|
|
536
|
-
subject: string;
|
|
537
|
-
type: 'google_oauth';
|
|
426
|
+
type: 'custom_auth';
|
|
538
427
|
verified_at: number;
|
|
539
428
|
}
|
|
540
429
|
/**
|
|
541
|
-
* A
|
|
430
|
+
* A custom OAuth account linked to the user.
|
|
542
431
|
*/
|
|
543
|
-
export interface
|
|
432
|
+
export interface LinkedAccountCustomOAuth {
|
|
544
433
|
first_verified_at: number | null;
|
|
545
434
|
latest_verified_at: number | null;
|
|
546
|
-
name: string | null;
|
|
547
|
-
profile_picture_url: string | null;
|
|
548
435
|
subject: string;
|
|
549
|
-
|
|
550
|
-
|
|
436
|
+
/**
|
|
437
|
+
* The ID of a custom OAuth provider, set up for this app. Must start with
|
|
438
|
+
* "custom:".
|
|
439
|
+
*/
|
|
440
|
+
type: ClientAuthAPI.CustomOAuthProviderID;
|
|
551
441
|
verified_at: number;
|
|
442
|
+
email?: string;
|
|
443
|
+
name?: string;
|
|
444
|
+
profile_picture_url?: string;
|
|
445
|
+
username?: string;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* The payload for importing a Discord account.
|
|
449
|
+
*/
|
|
450
|
+
export interface LinkedAccountDiscordInput {
|
|
451
|
+
subject: string;
|
|
452
|
+
type: 'discord_oauth';
|
|
453
|
+
username: string;
|
|
454
|
+
email?: string;
|
|
552
455
|
}
|
|
553
456
|
/**
|
|
554
457
|
* A Discord OAuth account linked to the user.
|
|
@@ -563,241 +466,282 @@ export interface LinkedAccountDiscordOAuth {
|
|
|
563
466
|
verified_at: number;
|
|
564
467
|
}
|
|
565
468
|
/**
|
|
566
|
-
*
|
|
469
|
+
* An email account linked to the user.
|
|
567
470
|
*/
|
|
568
|
-
export interface
|
|
569
|
-
|
|
471
|
+
export interface LinkedAccountEmail {
|
|
472
|
+
address: string;
|
|
570
473
|
first_verified_at: number | null;
|
|
571
474
|
latest_verified_at: number | null;
|
|
572
|
-
|
|
573
|
-
subject: string;
|
|
574
|
-
type: 'github_oauth';
|
|
575
|
-
username: string | null;
|
|
475
|
+
type: 'email';
|
|
576
476
|
verified_at: number;
|
|
577
477
|
}
|
|
578
478
|
/**
|
|
579
|
-
*
|
|
479
|
+
* The payload for importing an email account.
|
|
580
480
|
*/
|
|
581
|
-
export interface
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
latest_verified_at: number | null;
|
|
585
|
-
subject: string;
|
|
586
|
-
type: 'linkedin_oauth';
|
|
587
|
-
verified_at: number;
|
|
588
|
-
name?: string;
|
|
589
|
-
vanity_name?: string;
|
|
481
|
+
export interface LinkedAccountEmailInput {
|
|
482
|
+
address: string;
|
|
483
|
+
type: 'email';
|
|
590
484
|
}
|
|
485
|
+
export type LinkedAccountEmbeddedWallet = LinkedAccountEthereumEmbeddedWallet | LinkedAccountSolanaEmbeddedWallet | LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountCurveSigningEmbeddedWallet;
|
|
591
486
|
/**
|
|
592
|
-
*
|
|
487
|
+
* An embedded wallet account with an ID.
|
|
593
488
|
*/
|
|
594
|
-
export
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
489
|
+
export type LinkedAccountEmbeddedWalletWithID = LinkedAccountEmbeddedWalletWithID.LinkedAccountEthereumEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountSolanaEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinSegwitEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinTaprootEmbeddedWallet | LinkedAccountEmbeddedWalletWithID.LinkedAccountCurveSigningEmbeddedWallet;
|
|
490
|
+
export declare namespace LinkedAccountEmbeddedWalletWithID {
|
|
491
|
+
/**
|
|
492
|
+
* An Ethereum embedded wallet account linked to the user.
|
|
493
|
+
*/
|
|
494
|
+
interface LinkedAccountEthereumEmbeddedWallet extends Omit<UsersAPI.LinkedAccountEthereumEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
495
|
+
id: string;
|
|
496
|
+
recovery_method: 'privy-v2';
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* A Solana embedded wallet account linked to the user.
|
|
500
|
+
*/
|
|
501
|
+
interface LinkedAccountSolanaEmbeddedWallet extends Omit<UsersAPI.LinkedAccountSolanaEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
502
|
+
id: string;
|
|
503
|
+
recovery_method: 'privy-v2';
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
507
|
+
*/
|
|
508
|
+
interface LinkedAccountBitcoinSegwitEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinSegwitEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
509
|
+
id: string;
|
|
510
|
+
recovery_method: 'privy-v2';
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* A Bitcoin Taproot embedded wallet account linked to the user.
|
|
514
|
+
*/
|
|
515
|
+
interface LinkedAccountBitcoinTaprootEmbeddedWallet extends Omit<UsersAPI.LinkedAccountBitcoinTaprootEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
516
|
+
id: string;
|
|
517
|
+
recovery_method: 'privy-v2';
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* A curve signing embedded wallet account linked to the user.
|
|
521
|
+
*/
|
|
522
|
+
interface LinkedAccountCurveSigningEmbeddedWallet extends Omit<UsersAPI.LinkedAccountCurveSigningEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
523
|
+
id: string;
|
|
524
|
+
recovery_method: 'privy-v2';
|
|
525
|
+
}
|
|
602
526
|
}
|
|
603
527
|
/**
|
|
604
|
-
* An
|
|
528
|
+
* An Ethereum wallet account linked to the user.
|
|
605
529
|
*/
|
|
606
|
-
export interface
|
|
530
|
+
export interface LinkedAccountEthereum {
|
|
531
|
+
address: string;
|
|
532
|
+
chain_type: 'ethereum';
|
|
607
533
|
first_verified_at: number | null;
|
|
608
534
|
latest_verified_at: number | null;
|
|
609
|
-
|
|
610
|
-
type: 'instagram_oauth';
|
|
611
|
-
username: string | null;
|
|
535
|
+
type: 'wallet';
|
|
612
536
|
verified_at: number;
|
|
537
|
+
wallet_client: 'unknown';
|
|
538
|
+
chain_id?: string;
|
|
539
|
+
connector_type?: string;
|
|
540
|
+
wallet_client_type?: string;
|
|
613
541
|
}
|
|
614
542
|
/**
|
|
615
|
-
*
|
|
543
|
+
* An Ethereum embedded wallet account linked to the user.
|
|
616
544
|
*/
|
|
617
|
-
export interface
|
|
545
|
+
export interface LinkedAccountEthereumEmbeddedWallet {
|
|
546
|
+
id: string | null;
|
|
547
|
+
address: string;
|
|
548
|
+
chain_id: string;
|
|
549
|
+
chain_type: 'ethereum';
|
|
550
|
+
connector_type: 'embedded';
|
|
551
|
+
delegated: boolean;
|
|
618
552
|
first_verified_at: number | null;
|
|
553
|
+
imported: boolean;
|
|
619
554
|
latest_verified_at: number | null;
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
555
|
+
/**
|
|
556
|
+
* The method used to recover an embedded wallet account.
|
|
557
|
+
*/
|
|
558
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
559
|
+
type: 'wallet';
|
|
624
560
|
verified_at: number;
|
|
561
|
+
wallet_client: 'privy';
|
|
562
|
+
wallet_client_type: 'privy';
|
|
563
|
+
wallet_index: number;
|
|
625
564
|
}
|
|
626
565
|
/**
|
|
627
|
-
* A
|
|
566
|
+
* A Farcaster account linked to the user.
|
|
628
567
|
*/
|
|
629
|
-
export interface
|
|
630
|
-
|
|
568
|
+
export interface LinkedAccountFarcaster {
|
|
569
|
+
fid: number;
|
|
631
570
|
first_verified_at: number | null;
|
|
632
571
|
latest_verified_at: number | null;
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
subject: string;
|
|
636
|
-
type: 'line_oauth';
|
|
572
|
+
owner_address: string;
|
|
573
|
+
type: 'farcaster';
|
|
637
574
|
verified_at: number;
|
|
575
|
+
bio?: string;
|
|
576
|
+
display_name?: string;
|
|
577
|
+
homepage_url?: string;
|
|
578
|
+
profile_picture?: string;
|
|
579
|
+
profile_picture_url?: string;
|
|
580
|
+
signer_public_key?: string;
|
|
581
|
+
username?: string;
|
|
638
582
|
}
|
|
639
583
|
/**
|
|
640
|
-
*
|
|
584
|
+
* The payload for importing a Farcaster account.
|
|
641
585
|
*/
|
|
642
|
-
export interface
|
|
643
|
-
|
|
644
|
-
|
|
586
|
+
export interface LinkedAccountFarcasterInput {
|
|
587
|
+
fid: number;
|
|
588
|
+
owner_address: string;
|
|
589
|
+
type: 'farcaster';
|
|
590
|
+
bio?: string;
|
|
591
|
+
display_name?: string;
|
|
592
|
+
homepage_url?: string;
|
|
593
|
+
profile_picture_url?: string;
|
|
594
|
+
username?: string;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* The payload for importing a Github account.
|
|
598
|
+
*/
|
|
599
|
+
export interface LinkedAccountGitHubInput {
|
|
645
600
|
subject: string;
|
|
646
|
-
type: '
|
|
647
|
-
username: string
|
|
648
|
-
|
|
601
|
+
type: 'github_oauth';
|
|
602
|
+
username: string;
|
|
603
|
+
email?: string;
|
|
604
|
+
name?: string;
|
|
649
605
|
}
|
|
650
606
|
/**
|
|
651
|
-
*
|
|
607
|
+
* A GitHub OAuth account linked to the user.
|
|
652
608
|
*/
|
|
653
|
-
export interface
|
|
609
|
+
export interface LinkedAccountGitHubOAuth {
|
|
654
610
|
email: string | null;
|
|
655
611
|
first_verified_at: number | null;
|
|
656
612
|
latest_verified_at: number | null;
|
|
613
|
+
name: string | null;
|
|
657
614
|
subject: string;
|
|
658
|
-
type: '
|
|
615
|
+
type: 'github_oauth';
|
|
616
|
+
username: string | null;
|
|
659
617
|
verified_at: number;
|
|
660
618
|
}
|
|
661
619
|
/**
|
|
662
|
-
*
|
|
620
|
+
* The payload for importing a Google account.
|
|
663
621
|
*/
|
|
664
|
-
export interface
|
|
665
|
-
|
|
666
|
-
|
|
622
|
+
export interface LinkedAccountGoogleInput {
|
|
623
|
+
email: string;
|
|
624
|
+
name: string;
|
|
667
625
|
subject: string;
|
|
668
|
-
|
|
669
|
-
* The ID of a custom OAuth provider, set up for this app. Must start with
|
|
670
|
-
* "custom:".
|
|
671
|
-
*/
|
|
672
|
-
type: ClientAuthAPI.CustomOAuthProviderID;
|
|
673
|
-
verified_at: number;
|
|
674
|
-
email?: string;
|
|
675
|
-
name?: string;
|
|
676
|
-
profile_picture_url?: string;
|
|
677
|
-
username?: string;
|
|
626
|
+
type: 'google_oauth';
|
|
678
627
|
}
|
|
679
628
|
/**
|
|
680
|
-
* A
|
|
629
|
+
* A Google OAuth account linked to the user.
|
|
681
630
|
*/
|
|
682
|
-
export interface
|
|
683
|
-
|
|
631
|
+
export interface LinkedAccountGoogleOAuth {
|
|
632
|
+
email: string;
|
|
684
633
|
first_verified_at: number | null;
|
|
685
634
|
latest_verified_at: number | null;
|
|
686
|
-
|
|
635
|
+
name: string | null;
|
|
636
|
+
subject: string;
|
|
637
|
+
type: 'google_oauth';
|
|
687
638
|
verified_at: number;
|
|
688
639
|
}
|
|
689
640
|
/**
|
|
690
|
-
*
|
|
641
|
+
* The input for adding a linked account to a user.
|
|
691
642
|
*/
|
|
692
|
-
export
|
|
693
|
-
address: string;
|
|
694
|
-
}
|
|
643
|
+
export type LinkedAccountInput = LinkedAccountWalletInput | LinkedAccountEmailInput | LinkedAccountPhoneInput | LinkedAccountGoogleInput | LinkedAccountTwitterInput | LinkedAccountDiscordInput | LinkedAccountGitHubInput | LinkedAccountSpotifyInput | LinkedAccountInstagramInput | LinkedAccountTiktokInput | LinkedAccountLineInput | LinkedAccountTwitchInput | LinkedAccountAppleInput | LinkedAccountLinkedInInput | LinkedAccountFarcasterInput | LinkedAccountTelegramInput | LinkedAccountCustomJwtInput | LinkedAccountPasskeyInput;
|
|
695
644
|
/**
|
|
696
|
-
*
|
|
645
|
+
* The payload for importing an Instagram account.
|
|
697
646
|
*/
|
|
698
|
-
export interface
|
|
699
|
-
|
|
647
|
+
export interface LinkedAccountInstagramInput {
|
|
648
|
+
subject: string;
|
|
649
|
+
type: 'instagram_oauth';
|
|
650
|
+
username: string;
|
|
700
651
|
}
|
|
701
652
|
/**
|
|
702
|
-
*
|
|
653
|
+
* An Instagram OAuth account linked to the user.
|
|
703
654
|
*/
|
|
704
|
-
export interface
|
|
705
|
-
embedded_wallets: Array<CrossAppEmbeddedWallet>;
|
|
655
|
+
export interface LinkedAccountInstagramOAuth {
|
|
706
656
|
first_verified_at: number | null;
|
|
707
657
|
latest_verified_at: number | null;
|
|
708
|
-
provider_app_id: string;
|
|
709
|
-
smart_wallets: Array<CrossAppSmartWallet>;
|
|
710
658
|
subject: string;
|
|
711
|
-
type: '
|
|
659
|
+
type: 'instagram_oauth';
|
|
660
|
+
username: string | null;
|
|
712
661
|
verified_at: number;
|
|
713
662
|
}
|
|
714
663
|
/**
|
|
715
|
-
*
|
|
664
|
+
* The payload for importing a LINE account.
|
|
716
665
|
*/
|
|
717
|
-
export interface
|
|
666
|
+
export interface LinkedAccountLineInput {
|
|
667
|
+
subject: string;
|
|
668
|
+
type: 'line_oauth';
|
|
669
|
+
email?: string;
|
|
670
|
+
name?: string;
|
|
671
|
+
profile_picture_url?: string;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* A LINE OAuth account linked to the user.
|
|
675
|
+
*/
|
|
676
|
+
export interface LinkedAccountLineOAuth {
|
|
677
|
+
email: string | null;
|
|
718
678
|
first_verified_at: number | null;
|
|
719
679
|
latest_verified_at: number | null;
|
|
720
|
-
|
|
721
|
-
|
|
680
|
+
name: string | null;
|
|
681
|
+
profile_picture_url: string | null;
|
|
682
|
+
subject: string;
|
|
683
|
+
type: 'line_oauth';
|
|
722
684
|
verified_at: number;
|
|
723
685
|
}
|
|
724
686
|
/**
|
|
725
|
-
*
|
|
726
|
-
*/
|
|
727
|
-
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;
|
|
728
|
-
/**
|
|
729
|
-
* The possible types of linked accounts.
|
|
730
|
-
*/
|
|
731
|
-
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;
|
|
732
|
-
/**
|
|
733
|
-
* A SMS MFA method.
|
|
687
|
+
* The payload for importing a LinkedIn account.
|
|
734
688
|
*/
|
|
735
|
-
export interface
|
|
736
|
-
|
|
737
|
-
|
|
689
|
+
export interface LinkedAccountLinkedInInput {
|
|
690
|
+
subject: string;
|
|
691
|
+
type: 'linkedin_oauth';
|
|
692
|
+
email?: string;
|
|
693
|
+
name?: string;
|
|
694
|
+
vanityName?: string;
|
|
738
695
|
}
|
|
739
696
|
/**
|
|
740
|
-
* A
|
|
697
|
+
* A LinkedIn OAuth account linked to the user.
|
|
741
698
|
*/
|
|
742
|
-
export interface
|
|
743
|
-
|
|
699
|
+
export interface LinkedAccountLinkedInOAuth {
|
|
700
|
+
email: string | null;
|
|
701
|
+
first_verified_at: number | null;
|
|
702
|
+
latest_verified_at: number | null;
|
|
703
|
+
subject: string;
|
|
704
|
+
type: 'linkedin_oauth';
|
|
744
705
|
verified_at: number;
|
|
706
|
+
name?: string;
|
|
707
|
+
vanity_name?: string;
|
|
745
708
|
}
|
|
746
709
|
/**
|
|
747
|
-
* A
|
|
710
|
+
* A passkey account linked to the user.
|
|
748
711
|
*/
|
|
749
|
-
export interface
|
|
712
|
+
export interface LinkedAccountPasskey {
|
|
713
|
+
credential_id: string;
|
|
714
|
+
enrolled_in_mfa: boolean;
|
|
715
|
+
first_verified_at: number | null;
|
|
716
|
+
latest_verified_at: number | null;
|
|
750
717
|
type: 'passkey';
|
|
751
718
|
verified_at: number;
|
|
719
|
+
authenticator_name?: string;
|
|
720
|
+
created_with_browser?: string;
|
|
721
|
+
created_with_device?: string;
|
|
722
|
+
created_with_os?: string;
|
|
723
|
+
public_key?: string;
|
|
752
724
|
}
|
|
753
725
|
/**
|
|
754
|
-
*
|
|
755
|
-
*/
|
|
756
|
-
export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
|
|
757
|
-
/**
|
|
758
|
-
* Custom metadata associated with the user.
|
|
759
|
-
*/
|
|
760
|
-
export type CustomMetadata = {
|
|
761
|
-
[key: string]: string | number | boolean;
|
|
762
|
-
};
|
|
763
|
-
/**
|
|
764
|
-
* A Privy user object.
|
|
765
|
-
*/
|
|
766
|
-
export interface User {
|
|
767
|
-
id: string;
|
|
768
|
-
/**
|
|
769
|
-
* Unix timestamp of when the user was created in seconds.
|
|
770
|
-
*/
|
|
771
|
-
created_at: number;
|
|
772
|
-
/**
|
|
773
|
-
* Indicates if the user has accepted the terms of service.
|
|
774
|
-
*/
|
|
775
|
-
has_accepted_terms: boolean;
|
|
776
|
-
/**
|
|
777
|
-
* Indicates if the user is a guest account user.
|
|
778
|
-
*/
|
|
779
|
-
is_guest: boolean;
|
|
780
|
-
linked_accounts: Array<LinkedAccount>;
|
|
781
|
-
mfa_methods: Array<LinkedMfaMethod>;
|
|
782
|
-
/**
|
|
783
|
-
* Custom metadata associated with the user.
|
|
784
|
-
*/
|
|
785
|
-
custom_metadata?: CustomMetadata;
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* The payload for importing a wallet account.
|
|
726
|
+
* The payload for importing a passkey account.
|
|
789
727
|
*/
|
|
790
|
-
export interface
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
728
|
+
export interface LinkedAccountPasskeyInput {
|
|
729
|
+
credential_device_type: 'singleDevice' | 'multiDevice';
|
|
730
|
+
credential_id: string;
|
|
731
|
+
credential_public_key: string;
|
|
732
|
+
credential_username: string;
|
|
733
|
+
type: 'passkey';
|
|
794
734
|
}
|
|
795
735
|
/**
|
|
796
|
-
*
|
|
736
|
+
* A phone number account linked to the user.
|
|
797
737
|
*/
|
|
798
|
-
export interface
|
|
799
|
-
|
|
800
|
-
|
|
738
|
+
export interface LinkedAccountPhone {
|
|
739
|
+
first_verified_at: number | null;
|
|
740
|
+
latest_verified_at: number | null;
|
|
741
|
+
phoneNumber: string;
|
|
742
|
+
type: 'phone';
|
|
743
|
+
verified_at: number;
|
|
744
|
+
number?: string;
|
|
801
745
|
}
|
|
802
746
|
/**
|
|
803
747
|
* The payload for importing a phone account.
|
|
@@ -807,59 +751,103 @@ export interface LinkedAccountPhoneInput {
|
|
|
807
751
|
type: 'phone';
|
|
808
752
|
}
|
|
809
753
|
/**
|
|
810
|
-
*
|
|
754
|
+
* A smart wallet account linked to the user.
|
|
811
755
|
*/
|
|
812
|
-
export interface
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
756
|
+
export interface LinkedAccountSmartWallet {
|
|
757
|
+
address: string;
|
|
758
|
+
first_verified_at: number | null;
|
|
759
|
+
latest_verified_at: number | null;
|
|
760
|
+
/**
|
|
761
|
+
* The supported smart wallet providers.
|
|
762
|
+
*/
|
|
763
|
+
smart_wallet_type: EmbeddedWalletsAPI.SmartWalletType;
|
|
764
|
+
type: 'smart_wallet';
|
|
765
|
+
verified_at: number;
|
|
766
|
+
smart_wallet_version?: string;
|
|
817
767
|
}
|
|
818
768
|
/**
|
|
819
|
-
*
|
|
769
|
+
* A Solana wallet account linked to the user.
|
|
820
770
|
*/
|
|
821
|
-
export interface
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
771
|
+
export interface LinkedAccountSolana {
|
|
772
|
+
address: string;
|
|
773
|
+
chain_type: 'solana';
|
|
774
|
+
first_verified_at: number | null;
|
|
775
|
+
latest_verified_at: number | null;
|
|
776
|
+
type: 'wallet';
|
|
777
|
+
verified_at: number;
|
|
778
|
+
wallet_client: 'unknown';
|
|
779
|
+
connector_type?: string;
|
|
780
|
+
wallet_client_type?: string;
|
|
827
781
|
}
|
|
828
782
|
/**
|
|
829
|
-
*
|
|
783
|
+
* A Solana embedded wallet account linked to the user.
|
|
830
784
|
*/
|
|
831
|
-
export interface
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
785
|
+
export interface LinkedAccountSolanaEmbeddedWallet {
|
|
786
|
+
id: string | null;
|
|
787
|
+
address: string;
|
|
788
|
+
chain_id: string;
|
|
789
|
+
chain_type: 'solana';
|
|
790
|
+
connector_type: 'embedded';
|
|
791
|
+
delegated: boolean;
|
|
792
|
+
first_verified_at: number | null;
|
|
793
|
+
imported: boolean;
|
|
794
|
+
latest_verified_at: number | null;
|
|
795
|
+
public_key: string;
|
|
796
|
+
/**
|
|
797
|
+
* The method used to recover an embedded wallet account.
|
|
798
|
+
*/
|
|
799
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
800
|
+
type: 'wallet';
|
|
801
|
+
verified_at: number;
|
|
802
|
+
wallet_client: 'privy';
|
|
803
|
+
wallet_client_type: 'privy';
|
|
804
|
+
wallet_index: number;
|
|
836
805
|
}
|
|
837
806
|
/**
|
|
838
|
-
* The payload for importing a
|
|
807
|
+
* The payload for importing a Spotify account.
|
|
839
808
|
*/
|
|
840
|
-
export interface
|
|
809
|
+
export interface LinkedAccountSpotifyInput {
|
|
841
810
|
subject: string;
|
|
842
|
-
type: '
|
|
843
|
-
username: string;
|
|
811
|
+
type: 'spotify_oauth';
|
|
844
812
|
email?: string;
|
|
845
813
|
name?: string;
|
|
846
814
|
}
|
|
847
815
|
/**
|
|
848
|
-
*
|
|
816
|
+
* A Spotify OAuth account linked to the user.
|
|
849
817
|
*/
|
|
850
|
-
export interface
|
|
818
|
+
export interface LinkedAccountSpotifyOAuth {
|
|
819
|
+
email: string | null;
|
|
820
|
+
first_verified_at: number | null;
|
|
821
|
+
latest_verified_at: number | null;
|
|
822
|
+
name: string | null;
|
|
851
823
|
subject: string;
|
|
852
824
|
type: 'spotify_oauth';
|
|
853
|
-
|
|
854
|
-
name?: string;
|
|
825
|
+
verified_at: number;
|
|
855
826
|
}
|
|
856
827
|
/**
|
|
857
|
-
*
|
|
828
|
+
* A Telegram account linked to the user.
|
|
858
829
|
*/
|
|
859
|
-
export interface
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
830
|
+
export interface LinkedAccountTelegram {
|
|
831
|
+
first_verified_at: number | null;
|
|
832
|
+
latest_verified_at: number | null;
|
|
833
|
+
telegram_user_id: string;
|
|
834
|
+
type: 'telegram';
|
|
835
|
+
verified_at: number;
|
|
836
|
+
first_name?: string | null;
|
|
837
|
+
last_name?: string | null;
|
|
838
|
+
photo_url?: string | null;
|
|
839
|
+
username?: string | null;
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* The payload for importing a Telegram account.
|
|
843
|
+
*/
|
|
844
|
+
export interface LinkedAccountTelegramInput {
|
|
845
|
+
telegram_user_id: string;
|
|
846
|
+
type: 'telegram';
|
|
847
|
+
first_name?: string;
|
|
848
|
+
last_name?: string;
|
|
849
|
+
photo_url?: string;
|
|
850
|
+
username?: string;
|
|
863
851
|
}
|
|
864
852
|
/**
|
|
865
853
|
* The payload for importing a Tiktok account.
|
|
@@ -871,14 +859,16 @@ export interface LinkedAccountTiktokInput {
|
|
|
871
859
|
username: string;
|
|
872
860
|
}
|
|
873
861
|
/**
|
|
874
|
-
*
|
|
862
|
+
* A TikTok OAuth account linked to the user.
|
|
875
863
|
*/
|
|
876
|
-
export interface
|
|
864
|
+
export interface LinkedAccountTiktokOAuth {
|
|
865
|
+
first_verified_at: number | null;
|
|
866
|
+
latest_verified_at: number | null;
|
|
867
|
+
name: string | null;
|
|
877
868
|
subject: string;
|
|
878
|
-
type: '
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
profile_picture_url?: string;
|
|
869
|
+
type: 'tiktok_oauth';
|
|
870
|
+
username: string | null;
|
|
871
|
+
verified_at: number;
|
|
882
872
|
}
|
|
883
873
|
/**
|
|
884
874
|
* The payload for importing a Twitch account.
|
|
@@ -889,68 +879,120 @@ export interface LinkedAccountTwitchInput {
|
|
|
889
879
|
username?: string;
|
|
890
880
|
}
|
|
891
881
|
/**
|
|
892
|
-
*
|
|
882
|
+
* A Twitch OAuth account linked to the user.
|
|
893
883
|
*/
|
|
894
|
-
export interface
|
|
884
|
+
export interface LinkedAccountTwitchOAuth {
|
|
885
|
+
first_verified_at: number | null;
|
|
886
|
+
latest_verified_at: number | null;
|
|
895
887
|
subject: string;
|
|
896
|
-
type: '
|
|
897
|
-
|
|
888
|
+
type: 'twitch_oauth';
|
|
889
|
+
username: string | null;
|
|
890
|
+
verified_at: number;
|
|
898
891
|
}
|
|
899
892
|
/**
|
|
900
|
-
* The payload for importing a
|
|
893
|
+
* The payload for importing a Twitter account.
|
|
901
894
|
*/
|
|
902
|
-
export interface
|
|
895
|
+
export interface LinkedAccountTwitterInput {
|
|
896
|
+
name: string;
|
|
903
897
|
subject: string;
|
|
904
|
-
type: '
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
vanityName?: string;
|
|
898
|
+
type: 'twitter_oauth';
|
|
899
|
+
username: string;
|
|
900
|
+
profile_picture_url?: string;
|
|
908
901
|
}
|
|
909
902
|
/**
|
|
910
|
-
*
|
|
903
|
+
* A Twitter OAuth account linked to the user.
|
|
911
904
|
*/
|
|
912
|
-
export interface
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
905
|
+
export interface LinkedAccountTwitterOAuth {
|
|
906
|
+
first_verified_at: number | null;
|
|
907
|
+
latest_verified_at: number | null;
|
|
908
|
+
name: string | null;
|
|
909
|
+
profile_picture_url: string | null;
|
|
910
|
+
subject: string;
|
|
911
|
+
type: 'twitter_oauth';
|
|
912
|
+
username: string | null;
|
|
913
|
+
verified_at: number;
|
|
921
914
|
}
|
|
922
915
|
/**
|
|
923
|
-
* The
|
|
916
|
+
* The possible types of linked accounts.
|
|
924
917
|
*/
|
|
925
|
-
export
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
918
|
+
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;
|
|
919
|
+
/**
|
|
920
|
+
* The payload for importing a wallet account.
|
|
921
|
+
*/
|
|
922
|
+
export interface LinkedAccountWalletInput {
|
|
923
|
+
address: string;
|
|
924
|
+
chain_type: 'ethereum' | 'solana';
|
|
925
|
+
type: 'wallet';
|
|
932
926
|
}
|
|
933
927
|
/**
|
|
934
|
-
*
|
|
928
|
+
* A multi-factor authentication method linked to the user.
|
|
935
929
|
*/
|
|
936
|
-
export
|
|
937
|
-
|
|
938
|
-
|
|
930
|
+
export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
|
|
931
|
+
/**
|
|
932
|
+
* OAuth tokens associated with the user.
|
|
933
|
+
*/
|
|
934
|
+
export interface OAuthTokens {
|
|
935
|
+
access_token: string;
|
|
936
|
+
provider: string;
|
|
937
|
+
access_token_expires_in_seconds?: number;
|
|
938
|
+
refresh_token?: string;
|
|
939
|
+
refresh_token_expires_in_seconds?: number;
|
|
940
|
+
scopes?: Array<string>;
|
|
939
941
|
}
|
|
940
942
|
/**
|
|
941
|
-
*
|
|
943
|
+
* A Passkey MFA method.
|
|
942
944
|
*/
|
|
943
|
-
export interface
|
|
944
|
-
credential_device_type: 'singleDevice' | 'multiDevice';
|
|
945
|
-
credential_id: string;
|
|
946
|
-
credential_public_key: string;
|
|
947
|
-
credential_username: string;
|
|
945
|
+
export interface PasskeyMfaMethod {
|
|
948
946
|
type: 'passkey';
|
|
947
|
+
verified_at: number;
|
|
949
948
|
}
|
|
950
949
|
/**
|
|
951
|
-
* The
|
|
950
|
+
* The payload for partially updating custom metadata on a user.
|
|
952
951
|
*/
|
|
953
|
-
export
|
|
952
|
+
export interface PatchUsersCustomMetadata {
|
|
953
|
+
/**
|
|
954
|
+
* Custom metadata associated with the user.
|
|
955
|
+
*/
|
|
956
|
+
custom_metadata: CustomMetadata;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* A SMS MFA method.
|
|
960
|
+
*/
|
|
961
|
+
export interface SMSMfaMethod {
|
|
962
|
+
type: 'sms';
|
|
963
|
+
verified_at: number;
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* A TOTP MFA method.
|
|
967
|
+
*/
|
|
968
|
+
export interface TotpMfaMethod {
|
|
969
|
+
type: 'totp';
|
|
970
|
+
verified_at: number;
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* A Privy user object.
|
|
974
|
+
*/
|
|
975
|
+
export interface User {
|
|
976
|
+
id: string;
|
|
977
|
+
/**
|
|
978
|
+
* Unix timestamp of when the user was created in seconds.
|
|
979
|
+
*/
|
|
980
|
+
created_at: number;
|
|
981
|
+
/**
|
|
982
|
+
* Indicates if the user has accepted the terms of service.
|
|
983
|
+
*/
|
|
984
|
+
has_accepted_terms: boolean;
|
|
985
|
+
/**
|
|
986
|
+
* Indicates if the user is a guest account user.
|
|
987
|
+
*/
|
|
988
|
+
is_guest: boolean;
|
|
989
|
+
linked_accounts: Array<LinkedAccount>;
|
|
990
|
+
mfa_methods: Array<LinkedMfaMethod>;
|
|
991
|
+
/**
|
|
992
|
+
* Custom metadata associated with the user.
|
|
993
|
+
*/
|
|
994
|
+
custom_metadata?: CustomMetadata;
|
|
995
|
+
}
|
|
954
996
|
/**
|
|
955
997
|
* The payload for batch creating users.
|
|
956
998
|
*/
|
|
@@ -976,17 +1018,6 @@ export declare namespace UserBatchCreateInput {
|
|
|
976
1018
|
wallets?: Array<EmbeddedWalletsAPI.WalletCreationInput>;
|
|
977
1019
|
}
|
|
978
1020
|
}
|
|
979
|
-
/**
|
|
980
|
-
* OAuth tokens associated with the user.
|
|
981
|
-
*/
|
|
982
|
-
export interface OAuthTokens {
|
|
983
|
-
access_token: string;
|
|
984
|
-
provider: string;
|
|
985
|
-
access_token_expires_in_seconds?: number;
|
|
986
|
-
refresh_token?: string;
|
|
987
|
-
refresh_token_expires_in_seconds?: number;
|
|
988
|
-
scopes?: Array<string>;
|
|
989
|
-
}
|
|
990
1021
|
/**
|
|
991
1022
|
* The user object along their identity token.
|
|
992
1023
|
*/
|
|
@@ -997,28 +1028,6 @@ export interface UserWithIdentityToken {
|
|
|
997
1028
|
*/
|
|
998
1029
|
user: User;
|
|
999
1030
|
}
|
|
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
1031
|
export interface UserCreateParams {
|
|
1023
1032
|
linked_accounts: Array<LinkedAccountInput>;
|
|
1024
1033
|
/**
|
|
@@ -1133,6 +1142,6 @@ export interface UserUnlinkLinkedAccountParams {
|
|
|
1133
1142
|
provider?: string;
|
|
1134
1143
|
}
|
|
1135
1144
|
export declare namespace Users {
|
|
1136
|
-
export { type
|
|
1145
|
+
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, type UsersCursor as UsersCursor, type UserCreateParams as UserCreateParams, type UserListParams as UserListParams, type UserGetByCustomAuthIDParams as UserGetByCustomAuthIDParams, type UserGetByDiscordUsernameParams as UserGetByDiscordUsernameParams, type UserGetByEmailAddressParams as UserGetByEmailAddressParams, type UserGetByFarcasterIDParams as UserGetByFarcasterIDParams, type UserGetByGitHubUsernameParams as UserGetByGitHubUsernameParams, type UserGetByPhoneNumberParams as UserGetByPhoneNumberParams, type UserGetBySmartWalletAddressParams as UserGetBySmartWalletAddressParams, type UserGetByTelegramUserIDParams as UserGetByTelegramUserIDParams, type UserGetByTelegramUsernameParams as UserGetByTelegramUsernameParams, type UserGetByTwitterSubjectParams as UserGetByTwitterSubjectParams, type UserGetByTwitterUsernameParams as UserGetByTwitterUsernameParams, type UserGetByWalletAddressParams as UserGetByWalletAddressParams, type UserPregenerateWalletsParams as UserPregenerateWalletsParams, type UserSearchParams as UserSearchParams, type UserSetCustomMetadataParams as UserSetCustomMetadataParams, type UserUnlinkLinkedAccountParams as UserUnlinkLinkedAccountParams, };
|
|
1137
1146
|
}
|
|
1138
1147
|
//# sourceMappingURL=users.d.mts.map
|