@privy-io/node 0.6.1 → 0.7.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 +45 -0
- package/client.d.mts +7 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -7
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/index.d.mts +2 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/index.mjs +2 -1
- package/index.mjs.map +1 -1
- package/lib/auth.d.mts +30 -2
- package/lib/auth.d.mts.map +1 -1
- package/lib/auth.d.ts +30 -2
- package/lib/auth.d.ts.map +1 -1
- package/lib/auth.js +14 -5
- package/lib/auth.js.map +1 -1
- package/lib/auth.mjs +11 -3
- package/lib/auth.mjs.map +1 -1
- package/lib/cryptography.d.mts +35 -3
- package/lib/cryptography.d.mts.map +1 -1
- package/lib/cryptography.d.ts +35 -3
- package/lib/cryptography.d.ts.map +1 -1
- package/lib/cryptography.js +53 -6
- package/lib/cryptography.js.map +1 -1
- package/lib/cryptography.mjs +50 -3
- package/lib/cryptography.mjs.map +1 -1
- package/lib/identity-token.d.mts.map +1 -1
- package/lib/identity-token.d.ts.map +1 -1
- package/lib/identity-token.js +0 -1
- package/lib/identity-token.js.map +1 -1
- package/lib/identity-token.mjs +0 -1
- package/lib/identity-token.mjs.map +1 -1
- package/package.json +13 -1
- package/public-api/services/utils/auth.d.mts +10 -1
- package/public-api/services/utils/auth.d.mts.map +1 -1
- package/public-api/services/utils/auth.d.ts +10 -1
- package/public-api/services/utils/auth.d.ts.map +1 -1
- package/public-api/services/utils/auth.js +16 -5
- package/public-api/services/utils/auth.js.map +1 -1
- package/public-api/services/utils/auth.mjs +17 -6
- package/public-api/services/utils/auth.mjs.map +1 -1
- package/resources/apps.d.mts +26 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +26 -0
- package/resources/apps.d.ts.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/policies.d.mts +68 -115
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +68 -115
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs.map +1 -1
- package/resources/users.d.mts +642 -381
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +642 -381
- package/resources/users.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/wallets.d.mts +98 -4
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +98 -4
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +1 -1
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +1 -1
- package/resources/wallets/wallets.mjs.map +1 -1
- package/solana-kit.d.mts +53 -0
- package/solana-kit.d.mts.map +1 -0
- package/solana-kit.d.ts +53 -0
- package/solana-kit.d.ts.map +1 -0
- package/solana-kit.js +92 -0
- package/solana-kit.js.map +1 -0
- package/solana-kit.mjs +89 -0
- package/solana-kit.mjs.map +1 -0
- package/src/client.ts +131 -3
- package/src/index.ts +5 -0
- package/src/lib/auth.ts +42 -6
- package/src/lib/cryptography.ts +72 -3
- package/src/lib/identity-token.ts +38 -18
- package/src/public-api/services/utils/auth.ts +19 -6
- package/src/resources/apps.ts +46 -0
- package/src/resources/index.ts +66 -2
- package/src/resources/policies.ts +105 -191
- package/src/resources/users.ts +942 -625
- package/src/resources/wallets/index.ts +6 -0
- package/src/resources/wallets/wallets.ts +125 -3
- package/src/solana-kit.ts +148 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/users.ts
CHANGED
|
@@ -333,6 +333,9 @@ export interface AuthenticatedUser {
|
|
|
333
333
|
*/
|
|
334
334
|
session_update_action: 'set' | 'ignore' | 'clear';
|
|
335
335
|
|
|
336
|
+
/**
|
|
337
|
+
* A Privy user object.
|
|
338
|
+
*/
|
|
336
339
|
user: User;
|
|
337
340
|
|
|
338
341
|
identity_token?: string;
|
|
@@ -342,988 +345,1268 @@ export interface AuthenticatedUser {
|
|
|
342
345
|
/**
|
|
343
346
|
* OAuth tokens associated with the user.
|
|
344
347
|
*/
|
|
345
|
-
oauth_tokens?:
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
export namespace AuthenticatedUser {
|
|
349
|
-
/**
|
|
350
|
-
* OAuth tokens associated with the user.
|
|
351
|
-
*/
|
|
352
|
-
export interface OAuthTokens {
|
|
353
|
-
access_token: string;
|
|
354
|
-
|
|
355
|
-
provider: string;
|
|
356
|
-
|
|
357
|
-
access_token_expires_in_seconds?: number;
|
|
358
|
-
|
|
359
|
-
refresh_token?: string;
|
|
360
|
-
|
|
361
|
-
refresh_token_expires_in_seconds?: number;
|
|
362
|
-
|
|
363
|
-
scopes?: Array<string>;
|
|
364
|
-
}
|
|
348
|
+
oauth_tokens?: OAuthTokens;
|
|
365
349
|
}
|
|
366
350
|
|
|
367
351
|
/**
|
|
368
352
|
* A linked account for the user.
|
|
369
353
|
*/
|
|
370
354
|
export type LinkedAccount =
|
|
371
|
-
|
|
|
372
|
-
|
|
|
373
|
-
|
|
|
374
|
-
|
|
|
375
|
-
| LinkedAccount.LinkedAccountCustomJwt
|
|
376
|
-
| LinkedAccount.LinkedAccountAppleOAuth
|
|
377
|
-
| LinkedAccount.LinkedAccountDiscordOAuth
|
|
378
|
-
| LinkedAccount.LinkedAccountGitHubOAuth
|
|
379
|
-
| LinkedAccount.LinkedAccountGoogleOAuth
|
|
380
|
-
| LinkedAccount.LinkedAccountInstagramOAuth
|
|
381
|
-
| LinkedAccount.LinkedAccountLinkedInOAuth
|
|
382
|
-
| LinkedAccount.LinkedAccountSpotifyOAuth
|
|
383
|
-
| LinkedAccount.LinkedAccountTiktokOAuth
|
|
384
|
-
| LinkedAccount.LinkedAccountLineOAuth
|
|
385
|
-
| LinkedAccount.LinkedAccountTwitchOAuth
|
|
386
|
-
| LinkedAccount.LinkedAccountTwitterOAuth
|
|
355
|
+
| LinkedAccountEmail
|
|
356
|
+
| LinkedAccountPhone
|
|
357
|
+
| LinkedAccountEthereum
|
|
358
|
+
| LinkedAccountSolana
|
|
387
359
|
| LinkedAccountSmartWallet
|
|
388
|
-
| LinkedAccount.LinkedAccountPasskey
|
|
389
|
-
| LinkedAccount.LinkedAccountFarcaster
|
|
390
|
-
| LinkedAccount.LinkedAccountTelegram
|
|
391
|
-
| LinkedAccount.LinkedAccountEthereum
|
|
392
360
|
| LinkedAccountEthereumEmbeddedWallet
|
|
393
|
-
| LinkedAccount.LinkedAccountSolana
|
|
394
361
|
| LinkedAccountSolanaEmbeddedWallet
|
|
395
362
|
| LinkedAccountBitcoinSegwitEmbeddedWallet
|
|
396
363
|
| LinkedAccountBitcoinTaprootEmbeddedWallet
|
|
397
364
|
| LinkedAccountCurveSigningEmbeddedWallet
|
|
398
|
-
|
|
|
365
|
+
| LinkedAccountGoogleOAuth
|
|
366
|
+
| LinkedAccountTwitterOAuth
|
|
367
|
+
| LinkedAccountDiscordOAuth
|
|
368
|
+
| LinkedAccountGitHubOAuth
|
|
369
|
+
| LinkedAccountSpotifyOAuth
|
|
370
|
+
| LinkedAccountInstagramOAuth
|
|
371
|
+
| LinkedAccountTiktokOAuth
|
|
372
|
+
| LinkedAccountLineOAuth
|
|
373
|
+
| LinkedAccountTwitchOAuth
|
|
374
|
+
| LinkedAccountLinkedInOAuth
|
|
375
|
+
| LinkedAccountAppleOAuth
|
|
376
|
+
| LinkedAccountCustomOAuth
|
|
377
|
+
| LinkedAccountCustomJwt
|
|
378
|
+
| LinkedAccountFarcaster
|
|
379
|
+
| LinkedAccountPasskey
|
|
380
|
+
| LinkedAccountTelegram
|
|
381
|
+
| LinkedAccountCrossApp
|
|
382
|
+
| LinkedAccountAuthorizationKey;
|
|
399
383
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
384
|
+
/**
|
|
385
|
+
* A Privy user object.
|
|
386
|
+
*/
|
|
387
|
+
export interface User {
|
|
388
|
+
id: string;
|
|
403
389
|
|
|
404
|
-
|
|
390
|
+
/**
|
|
391
|
+
* Unix timestamp of when the user was created in milliseconds.
|
|
392
|
+
*/
|
|
393
|
+
created_at: number;
|
|
405
394
|
|
|
406
|
-
|
|
395
|
+
/**
|
|
396
|
+
* Indicates if the user has accepted the terms of service.
|
|
397
|
+
*/
|
|
398
|
+
has_accepted_terms: boolean;
|
|
407
399
|
|
|
408
|
-
|
|
400
|
+
/**
|
|
401
|
+
* Indicates if the user is a guest account user.
|
|
402
|
+
*/
|
|
403
|
+
is_guest: boolean;
|
|
409
404
|
|
|
410
|
-
|
|
411
|
-
}
|
|
405
|
+
linked_accounts: Array<LinkedAccount>;
|
|
412
406
|
|
|
413
|
-
|
|
414
|
-
first_verified_at: number | null;
|
|
407
|
+
mfa_methods: Array<LinkedMfaMethod>;
|
|
415
408
|
|
|
416
|
-
|
|
409
|
+
/**
|
|
410
|
+
* Custom metadata associated with the user.
|
|
411
|
+
*/
|
|
412
|
+
custom_metadata?: CustomMetadata;
|
|
413
|
+
}
|
|
417
414
|
|
|
418
|
-
|
|
415
|
+
/**
|
|
416
|
+
* An email account linked to the user.
|
|
417
|
+
*/
|
|
418
|
+
export interface LinkedAccountEmail {
|
|
419
|
+
address: string;
|
|
419
420
|
|
|
420
|
-
|
|
421
|
+
first_verified_at: number | null;
|
|
421
422
|
|
|
422
|
-
|
|
423
|
+
latest_verified_at: number | null;
|
|
423
424
|
|
|
424
|
-
|
|
425
|
-
}
|
|
425
|
+
type: 'email';
|
|
426
426
|
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
verified_at: number;
|
|
428
|
+
}
|
|
429
429
|
|
|
430
|
-
|
|
430
|
+
/**
|
|
431
|
+
* A phone number account linked to the user.
|
|
432
|
+
*/
|
|
433
|
+
export interface LinkedAccountPhone {
|
|
434
|
+
first_verified_at: number | null;
|
|
431
435
|
|
|
432
|
-
|
|
436
|
+
latest_verified_at: number | null;
|
|
433
437
|
|
|
434
|
-
|
|
438
|
+
phoneNumber: string;
|
|
435
439
|
|
|
436
|
-
|
|
440
|
+
type: 'phone';
|
|
437
441
|
|
|
438
|
-
|
|
442
|
+
verified_at: number;
|
|
439
443
|
|
|
440
|
-
|
|
444
|
+
number?: string;
|
|
445
|
+
}
|
|
441
446
|
|
|
442
|
-
|
|
443
|
-
|
|
447
|
+
/**
|
|
448
|
+
* Base schema for wallet accounts linked to the user.
|
|
449
|
+
*/
|
|
450
|
+
export interface LinkedAccountBaseWallet {
|
|
451
|
+
address: string;
|
|
444
452
|
|
|
445
|
-
|
|
446
|
-
export interface EmbeddedWallet {
|
|
447
|
-
address: string;
|
|
448
|
-
}
|
|
453
|
+
chain_type: 'solana' | 'ethereum';
|
|
449
454
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
}
|
|
455
|
+
type: 'wallet' | 'smart_wallet';
|
|
456
|
+
}
|
|
454
457
|
|
|
455
|
-
|
|
456
|
-
|
|
458
|
+
/**
|
|
459
|
+
* An Ethereum wallet account linked to the user.
|
|
460
|
+
*/
|
|
461
|
+
export interface LinkedAccountEthereum {
|
|
462
|
+
address: string;
|
|
457
463
|
|
|
458
|
-
|
|
464
|
+
chain_type: 'ethereum';
|
|
459
465
|
|
|
460
|
-
|
|
466
|
+
first_verified_at: number | null;
|
|
461
467
|
|
|
462
|
-
|
|
468
|
+
latest_verified_at: number | null;
|
|
463
469
|
|
|
464
|
-
|
|
465
|
-
}
|
|
470
|
+
type: 'wallet';
|
|
466
471
|
|
|
467
|
-
|
|
468
|
-
custom_user_id: string;
|
|
472
|
+
verified_at: number;
|
|
469
473
|
|
|
470
|
-
|
|
474
|
+
wallet_client: 'unknown';
|
|
471
475
|
|
|
472
|
-
|
|
476
|
+
chain_id?: string;
|
|
473
477
|
|
|
474
|
-
|
|
478
|
+
connector_type?: string;
|
|
475
479
|
|
|
476
|
-
|
|
477
|
-
|
|
480
|
+
wallet_client_type?: string;
|
|
481
|
+
}
|
|
478
482
|
|
|
479
|
-
|
|
480
|
-
|
|
483
|
+
/**
|
|
484
|
+
* The provider for a smart wallet.
|
|
485
|
+
*/
|
|
486
|
+
export type SmartWalletType =
|
|
487
|
+
| 'safe'
|
|
488
|
+
| 'kernel'
|
|
489
|
+
| 'light_account'
|
|
490
|
+
| 'biconomy'
|
|
491
|
+
| 'coinbase_smart_wallet'
|
|
492
|
+
| 'thirdweb';
|
|
481
493
|
|
|
482
|
-
|
|
494
|
+
/**
|
|
495
|
+
* A smart wallet account linked to the user.
|
|
496
|
+
*/
|
|
497
|
+
export interface LinkedAccountSmartWallet {
|
|
498
|
+
address: string;
|
|
483
499
|
|
|
484
|
-
|
|
500
|
+
first_verified_at: number | null;
|
|
485
501
|
|
|
486
|
-
|
|
502
|
+
latest_verified_at: number | null;
|
|
487
503
|
|
|
488
|
-
|
|
504
|
+
/**
|
|
505
|
+
* The provider for a smart wallet.
|
|
506
|
+
*/
|
|
507
|
+
smart_wallet_type: SmartWalletType;
|
|
489
508
|
|
|
490
|
-
|
|
491
|
-
}
|
|
509
|
+
type: 'smart_wallet';
|
|
492
510
|
|
|
493
|
-
|
|
494
|
-
email: string | null;
|
|
511
|
+
verified_at: number;
|
|
495
512
|
|
|
496
|
-
|
|
513
|
+
smart_wallet_version?: string;
|
|
514
|
+
}
|
|
497
515
|
|
|
498
|
-
|
|
516
|
+
/**
|
|
517
|
+
* A Solana wallet account linked to the user.
|
|
518
|
+
*/
|
|
519
|
+
export interface LinkedAccountSolana {
|
|
520
|
+
address: string;
|
|
499
521
|
|
|
500
|
-
|
|
522
|
+
chain_type: 'solana';
|
|
501
523
|
|
|
502
|
-
|
|
524
|
+
first_verified_at: number | null;
|
|
503
525
|
|
|
504
|
-
|
|
526
|
+
latest_verified_at: number | null;
|
|
505
527
|
|
|
506
|
-
|
|
507
|
-
}
|
|
528
|
+
type: 'wallet';
|
|
508
529
|
|
|
509
|
-
|
|
510
|
-
email: string | null;
|
|
530
|
+
verified_at: number;
|
|
511
531
|
|
|
512
|
-
|
|
532
|
+
wallet_client: 'unknown';
|
|
513
533
|
|
|
514
|
-
|
|
534
|
+
connector_type?: string;
|
|
515
535
|
|
|
516
|
-
|
|
536
|
+
wallet_client_type?: string;
|
|
537
|
+
}
|
|
517
538
|
|
|
518
|
-
|
|
539
|
+
/**
|
|
540
|
+
* A Farcaster account linked to the user.
|
|
541
|
+
*/
|
|
542
|
+
export interface LinkedAccountFarcaster {
|
|
543
|
+
fid: number;
|
|
519
544
|
|
|
520
|
-
|
|
545
|
+
first_verified_at: number | null;
|
|
521
546
|
|
|
522
|
-
|
|
547
|
+
latest_verified_at: number | null;
|
|
523
548
|
|
|
524
|
-
|
|
525
|
-
}
|
|
549
|
+
owner_address: string;
|
|
526
550
|
|
|
527
|
-
|
|
528
|
-
email: string;
|
|
551
|
+
type: 'farcaster';
|
|
529
552
|
|
|
530
|
-
|
|
553
|
+
verified_at: number;
|
|
531
554
|
|
|
532
|
-
|
|
555
|
+
bio?: string;
|
|
533
556
|
|
|
534
|
-
|
|
557
|
+
display_name?: string;
|
|
535
558
|
|
|
536
|
-
|
|
559
|
+
homepage_url?: string;
|
|
537
560
|
|
|
538
|
-
|
|
561
|
+
profile_picture?: string;
|
|
539
562
|
|
|
540
|
-
|
|
541
|
-
}
|
|
563
|
+
profile_picture_url?: string;
|
|
542
564
|
|
|
543
|
-
|
|
544
|
-
first_verified_at: number | null;
|
|
565
|
+
signer_public_key?: string;
|
|
545
566
|
|
|
546
|
-
|
|
567
|
+
username?: string;
|
|
568
|
+
}
|
|
547
569
|
|
|
548
|
-
|
|
570
|
+
/**
|
|
571
|
+
* A passkey account linked to the user.
|
|
572
|
+
*/
|
|
573
|
+
export interface LinkedAccountPasskey {
|
|
574
|
+
credential_id: string;
|
|
549
575
|
|
|
550
|
-
|
|
576
|
+
enrolled_in_mfa: boolean;
|
|
551
577
|
|
|
552
|
-
|
|
578
|
+
first_verified_at: number | null;
|
|
553
579
|
|
|
554
|
-
|
|
555
|
-
}
|
|
580
|
+
latest_verified_at: number | null;
|
|
556
581
|
|
|
557
|
-
|
|
558
|
-
email: string | null;
|
|
582
|
+
type: 'passkey';
|
|
559
583
|
|
|
560
|
-
|
|
584
|
+
verified_at: number;
|
|
561
585
|
|
|
562
|
-
|
|
586
|
+
authenticator_name?: string;
|
|
563
587
|
|
|
564
|
-
|
|
588
|
+
created_with_browser?: string;
|
|
565
589
|
|
|
566
|
-
|
|
590
|
+
created_with_device?: string;
|
|
567
591
|
|
|
568
|
-
|
|
592
|
+
created_with_os?: string;
|
|
569
593
|
|
|
570
|
-
|
|
594
|
+
public_key?: string;
|
|
595
|
+
}
|
|
571
596
|
|
|
572
|
-
|
|
573
|
-
|
|
597
|
+
/**
|
|
598
|
+
* A Telegram account linked to the user.
|
|
599
|
+
*/
|
|
600
|
+
export interface LinkedAccountTelegram {
|
|
601
|
+
first_verified_at: number | null;
|
|
574
602
|
|
|
575
|
-
|
|
576
|
-
email: string | null;
|
|
603
|
+
latest_verified_at: number | null;
|
|
577
604
|
|
|
578
|
-
|
|
605
|
+
telegram_user_id: string;
|
|
579
606
|
|
|
580
|
-
|
|
607
|
+
type: 'telegram';
|
|
581
608
|
|
|
582
|
-
|
|
609
|
+
verified_at: number;
|
|
583
610
|
|
|
584
|
-
|
|
611
|
+
first_name?: string | null;
|
|
585
612
|
|
|
586
|
-
|
|
613
|
+
last_name?: string | null;
|
|
587
614
|
|
|
588
|
-
|
|
589
|
-
}
|
|
615
|
+
photo_url?: string | null;
|
|
590
616
|
|
|
591
|
-
|
|
592
|
-
|
|
617
|
+
username?: string | null;
|
|
618
|
+
}
|
|
593
619
|
|
|
594
|
-
|
|
620
|
+
/**
|
|
621
|
+
* The method used to recover an embedded wallet account.
|
|
622
|
+
*/
|
|
623
|
+
export type EmbeddedWalletRecoveryMethod =
|
|
624
|
+
| 'privy'
|
|
625
|
+
| 'user-passcode'
|
|
626
|
+
| 'google-drive'
|
|
627
|
+
| 'icloud'
|
|
628
|
+
| 'recovery-encryption-key'
|
|
629
|
+
| 'privy-v2';
|
|
595
630
|
|
|
596
|
-
|
|
631
|
+
/**
|
|
632
|
+
* An Ethereum embedded wallet account linked to the user.
|
|
633
|
+
*/
|
|
634
|
+
export interface LinkedAccountEthereumEmbeddedWallet {
|
|
635
|
+
id: string | null;
|
|
597
636
|
|
|
598
|
-
|
|
637
|
+
address: string;
|
|
599
638
|
|
|
600
|
-
|
|
639
|
+
chain_id: string;
|
|
601
640
|
|
|
602
|
-
|
|
641
|
+
chain_type: 'ethereum';
|
|
603
642
|
|
|
604
|
-
|
|
605
|
-
}
|
|
643
|
+
connector_type: 'embedded';
|
|
606
644
|
|
|
607
|
-
|
|
608
|
-
email: string | null;
|
|
645
|
+
delegated: boolean;
|
|
609
646
|
|
|
610
|
-
|
|
647
|
+
first_verified_at: number | null;
|
|
611
648
|
|
|
612
|
-
|
|
649
|
+
imported: boolean;
|
|
613
650
|
|
|
614
|
-
|
|
651
|
+
latest_verified_at: number | null;
|
|
615
652
|
|
|
616
|
-
|
|
653
|
+
/**
|
|
654
|
+
* The method used to recover an embedded wallet account.
|
|
655
|
+
*/
|
|
656
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
617
657
|
|
|
618
|
-
|
|
658
|
+
type: 'wallet';
|
|
619
659
|
|
|
620
|
-
|
|
660
|
+
verified_at: number;
|
|
621
661
|
|
|
622
|
-
|
|
623
|
-
}
|
|
662
|
+
wallet_client: 'privy';
|
|
624
663
|
|
|
625
|
-
|
|
626
|
-
first_verified_at: number | null;
|
|
664
|
+
wallet_client_type: 'privy';
|
|
627
665
|
|
|
628
|
-
|
|
666
|
+
wallet_index: number;
|
|
667
|
+
}
|
|
629
668
|
|
|
630
|
-
|
|
669
|
+
/**
|
|
670
|
+
* A Solana embedded wallet account linked to the user.
|
|
671
|
+
*/
|
|
672
|
+
export interface LinkedAccountSolanaEmbeddedWallet {
|
|
673
|
+
id: string | null;
|
|
631
674
|
|
|
632
|
-
|
|
675
|
+
address: string;
|
|
633
676
|
|
|
634
|
-
|
|
677
|
+
chain_id: string;
|
|
635
678
|
|
|
636
|
-
|
|
637
|
-
}
|
|
679
|
+
chain_type: 'solana';
|
|
638
680
|
|
|
639
|
-
|
|
640
|
-
first_verified_at: number | null;
|
|
681
|
+
connector_type: 'embedded';
|
|
641
682
|
|
|
642
|
-
|
|
683
|
+
delegated: boolean;
|
|
643
684
|
|
|
644
|
-
|
|
685
|
+
first_verified_at: number | null;
|
|
645
686
|
|
|
646
|
-
|
|
687
|
+
imported: boolean;
|
|
647
688
|
|
|
648
|
-
|
|
689
|
+
latest_verified_at: number | null;
|
|
649
690
|
|
|
650
|
-
|
|
691
|
+
public_key: string;
|
|
651
692
|
|
|
652
|
-
|
|
693
|
+
/**
|
|
694
|
+
* The method used to recover an embedded wallet account.
|
|
695
|
+
*/
|
|
696
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
653
697
|
|
|
654
|
-
|
|
655
|
-
}
|
|
698
|
+
type: 'wallet';
|
|
656
699
|
|
|
657
|
-
|
|
658
|
-
credential_id: string;
|
|
700
|
+
verified_at: number;
|
|
659
701
|
|
|
660
|
-
|
|
702
|
+
wallet_client: 'privy';
|
|
661
703
|
|
|
662
|
-
|
|
704
|
+
wallet_client_type: 'privy';
|
|
663
705
|
|
|
664
|
-
|
|
706
|
+
wallet_index: number;
|
|
707
|
+
}
|
|
665
708
|
|
|
666
|
-
|
|
709
|
+
/**
|
|
710
|
+
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
711
|
+
*/
|
|
712
|
+
export interface LinkedAccountBitcoinSegwitEmbeddedWallet {
|
|
713
|
+
id: string | null;
|
|
667
714
|
|
|
668
|
-
|
|
715
|
+
address: string;
|
|
669
716
|
|
|
670
|
-
|
|
717
|
+
chain_id: string;
|
|
671
718
|
|
|
672
|
-
|
|
719
|
+
chain_type: 'bitcoin-segwit';
|
|
673
720
|
|
|
674
|
-
|
|
721
|
+
connector_type: 'embedded';
|
|
675
722
|
|
|
676
|
-
|
|
723
|
+
delegated: boolean;
|
|
677
724
|
|
|
678
|
-
|
|
679
|
-
}
|
|
725
|
+
first_verified_at: number | null;
|
|
680
726
|
|
|
681
|
-
|
|
682
|
-
fid: number;
|
|
727
|
+
imported: boolean;
|
|
683
728
|
|
|
684
|
-
|
|
729
|
+
latest_verified_at: number | null;
|
|
685
730
|
|
|
686
|
-
|
|
731
|
+
public_key: string;
|
|
687
732
|
|
|
688
|
-
|
|
733
|
+
/**
|
|
734
|
+
* The method used to recover an embedded wallet account.
|
|
735
|
+
*/
|
|
736
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
689
737
|
|
|
690
|
-
|
|
738
|
+
type: 'wallet';
|
|
691
739
|
|
|
692
|
-
|
|
740
|
+
verified_at: number;
|
|
693
741
|
|
|
694
|
-
|
|
742
|
+
wallet_client: 'privy';
|
|
695
743
|
|
|
696
|
-
|
|
744
|
+
wallet_client_type: 'privy';
|
|
697
745
|
|
|
698
|
-
|
|
746
|
+
wallet_index: number;
|
|
747
|
+
}
|
|
699
748
|
|
|
700
|
-
|
|
749
|
+
/**
|
|
750
|
+
* A Bitcoin Taproot embedded wallet account linked to the user.
|
|
751
|
+
*/
|
|
752
|
+
export interface LinkedAccountBitcoinTaprootEmbeddedWallet {
|
|
753
|
+
id: string | null;
|
|
701
754
|
|
|
702
|
-
|
|
755
|
+
address: string;
|
|
703
756
|
|
|
704
|
-
|
|
757
|
+
chain_id: string;
|
|
705
758
|
|
|
706
|
-
|
|
707
|
-
}
|
|
759
|
+
chain_type: 'bitcoin-taproot';
|
|
708
760
|
|
|
709
|
-
|
|
710
|
-
first_verified_at: number | null;
|
|
761
|
+
connector_type: 'embedded';
|
|
711
762
|
|
|
712
|
-
|
|
763
|
+
delegated: boolean;
|
|
713
764
|
|
|
714
|
-
|
|
765
|
+
first_verified_at: number | null;
|
|
715
766
|
|
|
716
|
-
|
|
767
|
+
imported: boolean;
|
|
717
768
|
|
|
718
|
-
|
|
769
|
+
latest_verified_at: number | null;
|
|
719
770
|
|
|
720
|
-
|
|
771
|
+
public_key: string;
|
|
721
772
|
|
|
722
|
-
|
|
773
|
+
/**
|
|
774
|
+
* The method used to recover an embedded wallet account.
|
|
775
|
+
*/
|
|
776
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
723
777
|
|
|
724
|
-
|
|
778
|
+
type: 'wallet';
|
|
725
779
|
|
|
726
|
-
|
|
780
|
+
verified_at: number;
|
|
727
781
|
|
|
728
|
-
|
|
782
|
+
wallet_client: 'privy';
|
|
729
783
|
|
|
730
|
-
|
|
731
|
-
}
|
|
784
|
+
wallet_client_type: 'privy';
|
|
732
785
|
|
|
733
|
-
|
|
734
|
-
|
|
786
|
+
wallet_index: number;
|
|
787
|
+
}
|
|
735
788
|
|
|
736
|
-
|
|
789
|
+
/**
|
|
790
|
+
* A curve signing embedded wallet account linked to the user.
|
|
791
|
+
*/
|
|
792
|
+
export interface LinkedAccountCurveSigningEmbeddedWallet {
|
|
793
|
+
id: string | null;
|
|
737
794
|
|
|
738
|
-
|
|
795
|
+
address: string;
|
|
739
796
|
|
|
740
|
-
|
|
797
|
+
chain_id: string;
|
|
741
798
|
|
|
742
|
-
|
|
799
|
+
/**
|
|
800
|
+
* The wallet chain types that support curve-based signing.
|
|
801
|
+
*/
|
|
802
|
+
chain_type: WalletsAPI.CurveSigningChainType;
|
|
743
803
|
|
|
744
|
-
|
|
804
|
+
connector_type: 'embedded';
|
|
745
805
|
|
|
746
|
-
|
|
806
|
+
delegated: boolean;
|
|
747
807
|
|
|
748
|
-
|
|
808
|
+
first_verified_at: number | null;
|
|
749
809
|
|
|
750
|
-
|
|
810
|
+
imported: boolean;
|
|
751
811
|
|
|
752
|
-
|
|
753
|
-
}
|
|
812
|
+
latest_verified_at: number | null;
|
|
754
813
|
|
|
755
|
-
|
|
756
|
-
address: string;
|
|
814
|
+
public_key: string;
|
|
757
815
|
|
|
758
|
-
|
|
816
|
+
/**
|
|
817
|
+
* The method used to recover an embedded wallet account.
|
|
818
|
+
*/
|
|
819
|
+
recovery_method: EmbeddedWalletRecoveryMethod;
|
|
759
820
|
|
|
760
|
-
|
|
821
|
+
type: 'wallet';
|
|
761
822
|
|
|
762
|
-
|
|
823
|
+
verified_at: number;
|
|
763
824
|
|
|
764
|
-
|
|
825
|
+
wallet_client: 'privy';
|
|
765
826
|
|
|
766
|
-
|
|
827
|
+
wallet_client_type: 'privy';
|
|
767
828
|
|
|
768
|
-
|
|
829
|
+
wallet_index: number;
|
|
830
|
+
}
|
|
769
831
|
|
|
770
|
-
|
|
832
|
+
export type LinkedAccountEmbeddedWallet =
|
|
833
|
+
| LinkedAccountEthereumEmbeddedWallet
|
|
834
|
+
| LinkedAccountSolanaEmbeddedWallet
|
|
835
|
+
| LinkedAccountBitcoinSegwitEmbeddedWallet
|
|
836
|
+
| LinkedAccountBitcoinTaprootEmbeddedWallet
|
|
837
|
+
| LinkedAccountCurveSigningEmbeddedWallet;
|
|
771
838
|
|
|
772
|
-
|
|
773
|
-
|
|
839
|
+
/**
|
|
840
|
+
* An embedded wallet account with an ID.
|
|
841
|
+
*/
|
|
842
|
+
export type LinkedAccountEmbeddedWalletWithID =
|
|
843
|
+
| LinkedAccountEmbeddedWalletWithID.LinkedAccountEthereumEmbeddedWallet
|
|
844
|
+
| LinkedAccountEmbeddedWalletWithID.LinkedAccountSolanaEmbeddedWallet
|
|
845
|
+
| LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinSegwitEmbeddedWallet
|
|
846
|
+
| LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinTaprootEmbeddedWallet
|
|
847
|
+
| LinkedAccountEmbeddedWalletWithID.LinkedAccountCurveSigningEmbeddedWallet;
|
|
774
848
|
|
|
775
|
-
|
|
776
|
-
|
|
849
|
+
export namespace LinkedAccountEmbeddedWalletWithID {
|
|
850
|
+
/**
|
|
851
|
+
* An Ethereum embedded wallet account linked to the user.
|
|
852
|
+
*/
|
|
853
|
+
export interface LinkedAccountEthereumEmbeddedWallet
|
|
854
|
+
extends Omit<UsersAPI.LinkedAccountEthereumEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
855
|
+
id: string;
|
|
777
856
|
|
|
778
|
-
|
|
857
|
+
recovery_method: 'privy-v2';
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* A Solana embedded wallet account linked to the user.
|
|
862
|
+
*/
|
|
863
|
+
export interface LinkedAccountSolanaEmbeddedWallet
|
|
864
|
+
extends Omit<UsersAPI.LinkedAccountSolanaEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
865
|
+
id: string;
|
|
779
866
|
|
|
780
|
-
|
|
867
|
+
recovery_method: 'privy-v2';
|
|
868
|
+
}
|
|
781
869
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
870
|
+
/**
|
|
871
|
+
* A Bitcoin SegWit embedded wallet account linked to the user.
|
|
872
|
+
*/
|
|
873
|
+
export interface LinkedAccountBitcoinSegwitEmbeddedWallet
|
|
874
|
+
extends Omit<UsersAPI.LinkedAccountBitcoinSegwitEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
875
|
+
id: string;
|
|
787
876
|
|
|
788
|
-
|
|
877
|
+
recovery_method: 'privy-v2';
|
|
878
|
+
}
|
|
789
879
|
|
|
790
|
-
|
|
880
|
+
/**
|
|
881
|
+
* A Bitcoin Taproot embedded wallet account linked to the user.
|
|
882
|
+
*/
|
|
883
|
+
export interface LinkedAccountBitcoinTaprootEmbeddedWallet
|
|
884
|
+
extends Omit<UsersAPI.LinkedAccountBitcoinTaprootEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
885
|
+
id: string;
|
|
791
886
|
|
|
792
|
-
|
|
887
|
+
recovery_method: 'privy-v2';
|
|
888
|
+
}
|
|
793
889
|
|
|
794
|
-
|
|
890
|
+
/**
|
|
891
|
+
* A curve signing embedded wallet account linked to the user.
|
|
892
|
+
*/
|
|
893
|
+
export interface LinkedAccountCurveSigningEmbeddedWallet
|
|
894
|
+
extends Omit<UsersAPI.LinkedAccountCurveSigningEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
895
|
+
id: string;
|
|
795
896
|
|
|
796
|
-
|
|
897
|
+
recovery_method: 'privy-v2';
|
|
797
898
|
}
|
|
798
899
|
}
|
|
799
900
|
|
|
800
|
-
|
|
801
|
-
|
|
901
|
+
/**
|
|
902
|
+
* A Google OAuth account linked to the user.
|
|
903
|
+
*/
|
|
904
|
+
export interface LinkedAccountGoogleOAuth {
|
|
905
|
+
email: string;
|
|
802
906
|
|
|
803
|
-
|
|
804
|
-
* Unix timestamp of when the user was created in milliseconds.
|
|
805
|
-
*/
|
|
806
|
-
created_at: number;
|
|
907
|
+
first_verified_at: number | null;
|
|
807
908
|
|
|
808
|
-
|
|
809
|
-
* Indicates if the user has accepted the terms of service.
|
|
810
|
-
*/
|
|
811
|
-
has_accepted_terms: boolean;
|
|
909
|
+
latest_verified_at: number | null;
|
|
812
910
|
|
|
813
|
-
|
|
814
|
-
* Indicates if the user is a guest account user.
|
|
815
|
-
*/
|
|
816
|
-
is_guest: boolean;
|
|
911
|
+
name: string | null;
|
|
817
912
|
|
|
818
|
-
|
|
913
|
+
subject: string;
|
|
819
914
|
|
|
820
|
-
|
|
915
|
+
type: 'google_oauth';
|
|
821
916
|
|
|
822
|
-
|
|
823
|
-
* Custom metadata associated with the user.
|
|
824
|
-
*/
|
|
825
|
-
custom_metadata?: { [key: string]: string | number | boolean };
|
|
917
|
+
verified_at: number;
|
|
826
918
|
}
|
|
827
919
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
920
|
+
/**
|
|
921
|
+
* A Twitter OAuth account linked to the user.
|
|
922
|
+
*/
|
|
923
|
+
export interface LinkedAccountTwitterOAuth {
|
|
924
|
+
first_verified_at: number | null;
|
|
831
925
|
|
|
832
|
-
|
|
833
|
-
}
|
|
926
|
+
latest_verified_at: number | null;
|
|
834
927
|
|
|
835
|
-
|
|
836
|
-
type: 'sms';
|
|
928
|
+
name: string | null;
|
|
837
929
|
|
|
838
|
-
|
|
839
|
-
}
|
|
930
|
+
profile_picture_url: string | null;
|
|
840
931
|
|
|
841
|
-
|
|
842
|
-
type: 'totp';
|
|
932
|
+
subject: string;
|
|
843
933
|
|
|
844
|
-
|
|
845
|
-
|
|
934
|
+
type: 'twitter_oauth';
|
|
935
|
+
|
|
936
|
+
username: string | null;
|
|
937
|
+
|
|
938
|
+
verified_at: number;
|
|
846
939
|
}
|
|
847
940
|
|
|
848
|
-
|
|
849
|
-
|
|
941
|
+
/**
|
|
942
|
+
* A Discord OAuth account linked to the user.
|
|
943
|
+
*/
|
|
944
|
+
export interface LinkedAccountDiscordOAuth {
|
|
945
|
+
email: string | null;
|
|
850
946
|
|
|
851
|
-
|
|
947
|
+
first_verified_at: number | null;
|
|
852
948
|
|
|
853
|
-
|
|
949
|
+
latest_verified_at: number | null;
|
|
854
950
|
|
|
855
|
-
|
|
951
|
+
subject: string;
|
|
856
952
|
|
|
857
|
-
|
|
953
|
+
type: 'discord_oauth';
|
|
858
954
|
|
|
859
|
-
|
|
955
|
+
username: string | null;
|
|
860
956
|
|
|
861
|
-
|
|
957
|
+
verified_at: number;
|
|
958
|
+
}
|
|
862
959
|
|
|
863
|
-
|
|
960
|
+
/**
|
|
961
|
+
* A GitHub OAuth account linked to the user.
|
|
962
|
+
*/
|
|
963
|
+
export interface LinkedAccountGitHubOAuth {
|
|
964
|
+
email: string | null;
|
|
965
|
+
|
|
966
|
+
first_verified_at: number | null;
|
|
864
967
|
|
|
865
968
|
latest_verified_at: number | null;
|
|
866
969
|
|
|
867
|
-
|
|
868
|
-
| 'privy'
|
|
869
|
-
| 'user-passcode'
|
|
870
|
-
| 'google-drive'
|
|
871
|
-
| 'icloud'
|
|
872
|
-
| 'recovery-encryption-key'
|
|
873
|
-
| 'privy-v2';
|
|
970
|
+
name: string | null;
|
|
874
971
|
|
|
875
|
-
|
|
972
|
+
subject: string;
|
|
973
|
+
|
|
974
|
+
type: 'github_oauth';
|
|
975
|
+
|
|
976
|
+
username: string | null;
|
|
876
977
|
|
|
877
978
|
verified_at: number;
|
|
979
|
+
}
|
|
878
980
|
|
|
879
|
-
|
|
981
|
+
/**
|
|
982
|
+
* A LinkedIn OAuth account linked to the user.
|
|
983
|
+
*/
|
|
984
|
+
export interface LinkedAccountLinkedInOAuth {
|
|
985
|
+
email: string | null;
|
|
880
986
|
|
|
881
|
-
|
|
987
|
+
first_verified_at: number | null;
|
|
882
988
|
|
|
883
|
-
|
|
989
|
+
latest_verified_at: number | null;
|
|
990
|
+
|
|
991
|
+
subject: string;
|
|
992
|
+
|
|
993
|
+
type: 'linkedin_oauth';
|
|
994
|
+
|
|
995
|
+
verified_at: number;
|
|
996
|
+
|
|
997
|
+
name?: string;
|
|
998
|
+
|
|
999
|
+
vanity_name?: string;
|
|
884
1000
|
}
|
|
885
1001
|
|
|
886
|
-
|
|
887
|
-
|
|
1002
|
+
/**
|
|
1003
|
+
* A Spotify OAuth account linked to the user.
|
|
1004
|
+
*/
|
|
1005
|
+
export interface LinkedAccountSpotifyOAuth {
|
|
1006
|
+
email: string | null;
|
|
888
1007
|
|
|
889
|
-
|
|
1008
|
+
first_verified_at: number | null;
|
|
890
1009
|
|
|
891
|
-
|
|
1010
|
+
latest_verified_at: number | null;
|
|
892
1011
|
|
|
893
|
-
|
|
1012
|
+
name: string | null;
|
|
894
1013
|
|
|
895
|
-
|
|
1014
|
+
subject: string;
|
|
896
1015
|
|
|
897
|
-
|
|
1016
|
+
type: 'spotify_oauth';
|
|
898
1017
|
|
|
1018
|
+
verified_at: number;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* An Instagram OAuth account linked to the user.
|
|
1023
|
+
*/
|
|
1024
|
+
export interface LinkedAccountInstagramOAuth {
|
|
899
1025
|
first_verified_at: number | null;
|
|
900
1026
|
|
|
901
|
-
|
|
1027
|
+
latest_verified_at: number | null;
|
|
1028
|
+
|
|
1029
|
+
subject: string;
|
|
1030
|
+
|
|
1031
|
+
type: 'instagram_oauth';
|
|
1032
|
+
|
|
1033
|
+
username: string | null;
|
|
1034
|
+
|
|
1035
|
+
verified_at: number;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* A TikTok OAuth account linked to the user.
|
|
1040
|
+
*/
|
|
1041
|
+
export interface LinkedAccountTiktokOAuth {
|
|
1042
|
+
first_verified_at: number | null;
|
|
902
1043
|
|
|
903
1044
|
latest_verified_at: number | null;
|
|
904
1045
|
|
|
905
|
-
|
|
1046
|
+
name: string | null;
|
|
906
1047
|
|
|
907
|
-
|
|
908
|
-
| 'privy'
|
|
909
|
-
| 'user-passcode'
|
|
910
|
-
| 'google-drive'
|
|
911
|
-
| 'icloud'
|
|
912
|
-
| 'recovery-encryption-key'
|
|
913
|
-
| 'privy-v2';
|
|
1048
|
+
subject: string;
|
|
914
1049
|
|
|
915
|
-
type: '
|
|
1050
|
+
type: 'tiktok_oauth';
|
|
1051
|
+
|
|
1052
|
+
username: string | null;
|
|
916
1053
|
|
|
917
1054
|
verified_at: number;
|
|
1055
|
+
}
|
|
918
1056
|
|
|
919
|
-
|
|
1057
|
+
/**
|
|
1058
|
+
* A LINE OAuth account linked to the user.
|
|
1059
|
+
*/
|
|
1060
|
+
export interface LinkedAccountLineOAuth {
|
|
1061
|
+
email: string | null;
|
|
920
1062
|
|
|
921
|
-
|
|
1063
|
+
first_verified_at: number | null;
|
|
922
1064
|
|
|
923
|
-
|
|
1065
|
+
latest_verified_at: number | null;
|
|
1066
|
+
|
|
1067
|
+
name: string | null;
|
|
1068
|
+
|
|
1069
|
+
profile_picture_url: string | null;
|
|
1070
|
+
|
|
1071
|
+
subject: string;
|
|
1072
|
+
|
|
1073
|
+
type: 'line_oauth';
|
|
1074
|
+
|
|
1075
|
+
verified_at: number;
|
|
924
1076
|
}
|
|
925
1077
|
|
|
926
|
-
|
|
927
|
-
|
|
1078
|
+
/**
|
|
1079
|
+
* A Twitch OAuth account linked to the user.
|
|
1080
|
+
*/
|
|
1081
|
+
export interface LinkedAccountTwitchOAuth {
|
|
1082
|
+
first_verified_at: number | null;
|
|
928
1083
|
|
|
929
|
-
|
|
1084
|
+
latest_verified_at: number | null;
|
|
930
1085
|
|
|
931
|
-
|
|
1086
|
+
subject: string;
|
|
932
1087
|
|
|
933
|
-
|
|
1088
|
+
type: 'twitch_oauth';
|
|
934
1089
|
|
|
935
|
-
|
|
1090
|
+
username: string | null;
|
|
936
1091
|
|
|
937
|
-
|
|
1092
|
+
verified_at: number;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* An Apple OAuth account linked to the user.
|
|
1097
|
+
*/
|
|
1098
|
+
export interface LinkedAccountAppleOAuth {
|
|
1099
|
+
email: string | null;
|
|
938
1100
|
|
|
939
1101
|
first_verified_at: number | null;
|
|
940
1102
|
|
|
941
|
-
|
|
1103
|
+
latest_verified_at: number | null;
|
|
1104
|
+
|
|
1105
|
+
subject: string;
|
|
1106
|
+
|
|
1107
|
+
type: 'apple_oauth';
|
|
1108
|
+
|
|
1109
|
+
verified_at: number;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* A custom OAuth account linked to the user.
|
|
1114
|
+
*/
|
|
1115
|
+
export interface LinkedAccountCustomOAuth {
|
|
1116
|
+
first_verified_at: number | null;
|
|
942
1117
|
|
|
943
1118
|
latest_verified_at: number | null;
|
|
944
1119
|
|
|
945
|
-
|
|
1120
|
+
subject: string;
|
|
1121
|
+
|
|
1122
|
+
verified_at: number;
|
|
946
1123
|
|
|
947
|
-
|
|
948
|
-
| 'privy'
|
|
949
|
-
| 'user-passcode'
|
|
950
|
-
| 'google-drive'
|
|
951
|
-
| 'icloud'
|
|
952
|
-
| 'recovery-encryption-key'
|
|
953
|
-
| 'privy-v2';
|
|
1124
|
+
email?: string;
|
|
954
1125
|
|
|
955
|
-
|
|
1126
|
+
name?: string;
|
|
1127
|
+
|
|
1128
|
+
profile_picture_url?: string;
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* The ID of a custom OAuth provider, set up for this app. Must start with
|
|
1132
|
+
* "custom:".
|
|
1133
|
+
*/
|
|
1134
|
+
type?: ClientAuthAPI.CustomOAuthProviderID;
|
|
1135
|
+
|
|
1136
|
+
username?: string;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* A custom JWT account linked to the user.
|
|
1141
|
+
*/
|
|
1142
|
+
export interface LinkedAccountCustomJwt {
|
|
1143
|
+
custom_user_id: string;
|
|
1144
|
+
|
|
1145
|
+
first_verified_at: number | null;
|
|
1146
|
+
|
|
1147
|
+
latest_verified_at: number | null;
|
|
1148
|
+
|
|
1149
|
+
type: 'custom_auth';
|
|
956
1150
|
|
|
957
1151
|
verified_at: number;
|
|
1152
|
+
}
|
|
958
1153
|
|
|
959
|
-
|
|
1154
|
+
/**
|
|
1155
|
+
* An embedded wallet associated with a cross-app account.
|
|
1156
|
+
*/
|
|
1157
|
+
export interface CrossAppEmbeddedWallet {
|
|
1158
|
+
address: string;
|
|
1159
|
+
}
|
|
960
1160
|
|
|
961
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* A smart wallet associated with a cross-app account.
|
|
1163
|
+
*/
|
|
1164
|
+
export interface CrossAppSmartWallet {
|
|
1165
|
+
address: string;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* A cross-app account linked to the user.
|
|
1170
|
+
*/
|
|
1171
|
+
export interface LinkedAccountCrossApp {
|
|
1172
|
+
embedded_wallets: Array<CrossAppEmbeddedWallet>;
|
|
962
1173
|
|
|
963
|
-
|
|
964
|
-
}
|
|
1174
|
+
first_verified_at: number | null;
|
|
965
1175
|
|
|
966
|
-
|
|
967
|
-
id: string | null;
|
|
1176
|
+
latest_verified_at: number | null;
|
|
968
1177
|
|
|
969
|
-
|
|
1178
|
+
provider_app_id: string;
|
|
970
1179
|
|
|
971
|
-
|
|
1180
|
+
smart_wallets: Array<CrossAppSmartWallet>;
|
|
972
1181
|
|
|
973
|
-
|
|
1182
|
+
subject: string;
|
|
974
1183
|
|
|
975
|
-
|
|
1184
|
+
type: 'cross_app';
|
|
976
1185
|
|
|
977
|
-
|
|
1186
|
+
verified_at: number;
|
|
1187
|
+
}
|
|
978
1188
|
|
|
1189
|
+
/**
|
|
1190
|
+
* An authorization key linked to the user.
|
|
1191
|
+
*/
|
|
1192
|
+
export interface LinkedAccountAuthorizationKey {
|
|
979
1193
|
first_verified_at: number | null;
|
|
980
1194
|
|
|
981
|
-
imported: boolean;
|
|
982
|
-
|
|
983
1195
|
latest_verified_at: number | null;
|
|
984
1196
|
|
|
985
1197
|
public_key: string;
|
|
986
1198
|
|
|
987
|
-
|
|
988
|
-
| 'privy'
|
|
989
|
-
| 'user-passcode'
|
|
990
|
-
| 'google-drive'
|
|
991
|
-
| 'icloud'
|
|
992
|
-
| 'recovery-encryption-key'
|
|
993
|
-
| 'privy-v2';
|
|
994
|
-
|
|
995
|
-
type: 'wallet';
|
|
1199
|
+
type: 'authorization_key';
|
|
996
1200
|
|
|
997
1201
|
verified_at: number;
|
|
998
|
-
|
|
999
|
-
wallet_client: 'privy';
|
|
1000
|
-
|
|
1001
|
-
wallet_client_type: 'privy';
|
|
1002
|
-
|
|
1003
|
-
wallet_index: number;
|
|
1004
1202
|
}
|
|
1005
1203
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1204
|
+
/**
|
|
1205
|
+
* The possible types of linked accounts.
|
|
1206
|
+
*/
|
|
1207
|
+
export type LinkedAccountType =
|
|
1208
|
+
| 'email'
|
|
1209
|
+
| 'phone'
|
|
1210
|
+
| 'wallet'
|
|
1211
|
+
| 'smart_wallet'
|
|
1212
|
+
| 'google_oauth'
|
|
1213
|
+
| 'twitter_oauth'
|
|
1214
|
+
| 'discord_oauth'
|
|
1215
|
+
| 'github_oauth'
|
|
1216
|
+
| 'spotify_oauth'
|
|
1217
|
+
| 'instagram_oauth'
|
|
1218
|
+
| 'tiktok_oauth'
|
|
1219
|
+
| 'line_oauth'
|
|
1220
|
+
| 'twitch_oauth'
|
|
1221
|
+
| 'linkedin_oauth'
|
|
1222
|
+
| 'apple_oauth'
|
|
1223
|
+
| 'custom_auth'
|
|
1224
|
+
| 'farcaster'
|
|
1225
|
+
| 'passkey'
|
|
1226
|
+
| 'telegram'
|
|
1227
|
+
| 'cross_app'
|
|
1228
|
+
| 'authorization_key'
|
|
1229
|
+
| ClientAuthAPI.CustomOAuthProviderID;
|
|
1010
1230
|
|
|
1011
|
-
|
|
1231
|
+
/**
|
|
1232
|
+
* Custom metadata associated with the user.
|
|
1233
|
+
*/
|
|
1234
|
+
export type CustomMetadata = { [key: string]: string | number | boolean };
|
|
1012
1235
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1236
|
+
/**
|
|
1237
|
+
* The payload for importing a wallet account.
|
|
1238
|
+
*/
|
|
1239
|
+
export interface LinkedAccountWalletInput {
|
|
1240
|
+
address: string;
|
|
1017
1241
|
|
|
1018
|
-
|
|
1242
|
+
chain_type: 'ethereum' | 'solana';
|
|
1019
1243
|
|
|
1020
|
-
|
|
1244
|
+
type: 'wallet';
|
|
1245
|
+
}
|
|
1021
1246
|
|
|
1022
|
-
|
|
1247
|
+
/**
|
|
1248
|
+
* The payload for importing an email account.
|
|
1249
|
+
*/
|
|
1250
|
+
export interface LinkedAccountEmailInput {
|
|
1251
|
+
address: string;
|
|
1023
1252
|
|
|
1024
|
-
|
|
1253
|
+
type: 'email';
|
|
1254
|
+
}
|
|
1025
1255
|
|
|
1026
|
-
|
|
1256
|
+
/**
|
|
1257
|
+
* The payload for importing a phone account.
|
|
1258
|
+
*/
|
|
1259
|
+
export interface LinkedAccountPhoneInput {
|
|
1260
|
+
number: string;
|
|
1027
1261
|
|
|
1028
|
-
|
|
1262
|
+
type: 'phone';
|
|
1263
|
+
}
|
|
1029
1264
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
| 'recovery-encryption-key'
|
|
1036
|
-
| 'privy-v2';
|
|
1265
|
+
/**
|
|
1266
|
+
* The payload for importing a Google account.
|
|
1267
|
+
*/
|
|
1268
|
+
export interface LinkedAccountGoogleInput {
|
|
1269
|
+
email: string;
|
|
1037
1270
|
|
|
1038
|
-
|
|
1271
|
+
name: string;
|
|
1039
1272
|
|
|
1040
|
-
|
|
1273
|
+
subject: string;
|
|
1041
1274
|
|
|
1042
|
-
|
|
1275
|
+
type: 'google_oauth';
|
|
1276
|
+
}
|
|
1043
1277
|
|
|
1044
|
-
|
|
1278
|
+
/**
|
|
1279
|
+
* The payload for importing a Twitter account.
|
|
1280
|
+
*/
|
|
1281
|
+
export interface LinkedAccountTwitterInput {
|
|
1282
|
+
name: string;
|
|
1045
1283
|
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1284
|
+
subject: string;
|
|
1048
1285
|
|
|
1049
|
-
|
|
1050
|
-
| LinkedAccountEthereumEmbeddedWallet
|
|
1051
|
-
| LinkedAccountSolanaEmbeddedWallet
|
|
1052
|
-
| LinkedAccountBitcoinSegwitEmbeddedWallet
|
|
1053
|
-
| LinkedAccountBitcoinTaprootEmbeddedWallet
|
|
1054
|
-
| LinkedAccountCurveSigningEmbeddedWallet;
|
|
1286
|
+
type: 'twitter_oauth';
|
|
1055
1287
|
|
|
1056
|
-
|
|
1057
|
-
| LinkedAccountEmbeddedWalletWithID.LinkedAccountEthereumEmbeddedWallet
|
|
1058
|
-
| LinkedAccountEmbeddedWalletWithID.LinkedAccountSolanaEmbeddedWallet
|
|
1059
|
-
| LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinSegwitEmbeddedWallet
|
|
1060
|
-
| LinkedAccountEmbeddedWalletWithID.LinkedAccountBitcoinTaprootEmbeddedWallet
|
|
1061
|
-
| LinkedAccountEmbeddedWalletWithID.LinkedAccountCurveSigningEmbeddedWallet;
|
|
1288
|
+
username: string;
|
|
1062
1289
|
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
extends Omit<UsersAPI.LinkedAccountEthereumEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
1066
|
-
id: string;
|
|
1290
|
+
profile_picture_url?: string;
|
|
1291
|
+
}
|
|
1067
1292
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1293
|
+
/**
|
|
1294
|
+
* The payload for importing a Discord account.
|
|
1295
|
+
*/
|
|
1296
|
+
export interface LinkedAccountDiscordInput {
|
|
1297
|
+
subject: string;
|
|
1070
1298
|
|
|
1071
|
-
|
|
1072
|
-
extends Omit<UsersAPI.LinkedAccountSolanaEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
1073
|
-
id: string;
|
|
1299
|
+
type: 'discord_oauth';
|
|
1074
1300
|
|
|
1075
|
-
|
|
1076
|
-
}
|
|
1301
|
+
username: string;
|
|
1077
1302
|
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
id: string;
|
|
1303
|
+
email?: string;
|
|
1304
|
+
}
|
|
1081
1305
|
|
|
1082
|
-
|
|
1083
|
-
|
|
1306
|
+
/**
|
|
1307
|
+
* The payload for importing a Github account.
|
|
1308
|
+
*/
|
|
1309
|
+
export interface LinkedAccountGitHubInput {
|
|
1310
|
+
subject: string;
|
|
1084
1311
|
|
|
1085
|
-
|
|
1086
|
-
extends Omit<UsersAPI.LinkedAccountBitcoinTaprootEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
1087
|
-
id: string;
|
|
1312
|
+
type: 'github_oauth';
|
|
1088
1313
|
|
|
1089
|
-
|
|
1090
|
-
}
|
|
1314
|
+
username: string;
|
|
1091
1315
|
|
|
1092
|
-
|
|
1093
|
-
extends Omit<UsersAPI.LinkedAccountCurveSigningEmbeddedWallet, 'id' | 'recovery_method'> {
|
|
1094
|
-
id: string;
|
|
1316
|
+
email?: string;
|
|
1095
1317
|
|
|
1096
|
-
|
|
1097
|
-
}
|
|
1318
|
+
name?: string;
|
|
1098
1319
|
}
|
|
1099
1320
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
| 'coinbase_smart_wallet'
|
|
1106
|
-
| 'thirdweb';
|
|
1107
|
-
|
|
1108
|
-
export interface LinkedAccountSmartWallet {
|
|
1109
|
-
address: string;
|
|
1321
|
+
/**
|
|
1322
|
+
* The payload for importing a Spotify account.
|
|
1323
|
+
*/
|
|
1324
|
+
export interface LinkedAccountSpotifyInput {
|
|
1325
|
+
subject: string;
|
|
1110
1326
|
|
|
1111
|
-
|
|
1327
|
+
type: 'spotify_oauth';
|
|
1112
1328
|
|
|
1113
|
-
|
|
1329
|
+
email?: string;
|
|
1114
1330
|
|
|
1115
|
-
|
|
1331
|
+
name?: string;
|
|
1332
|
+
}
|
|
1116
1333
|
|
|
1117
|
-
|
|
1334
|
+
/**
|
|
1335
|
+
* The payload for importing an Instagram account.
|
|
1336
|
+
*/
|
|
1337
|
+
export interface LinkedAccountInstagramInput {
|
|
1338
|
+
subject: string;
|
|
1118
1339
|
|
|
1119
|
-
|
|
1340
|
+
type: 'instagram_oauth';
|
|
1120
1341
|
|
|
1121
|
-
|
|
1342
|
+
username: string;
|
|
1122
1343
|
}
|
|
1123
1344
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
| UserCreateParams.LinkedAccountGoogleInput
|
|
1130
|
-
| UserCreateParams.LinkedAccountTwitterInput
|
|
1131
|
-
| UserCreateParams.LinkedAccountDiscordInput
|
|
1132
|
-
| UserCreateParams.LinkedAccountGitHubInput
|
|
1133
|
-
| UserCreateParams.LinkedAccountSpotifyInput
|
|
1134
|
-
| UserCreateParams.LinkedAccountInstagramInput
|
|
1135
|
-
| UserCreateParams.LinkedAccountTiktokInput
|
|
1136
|
-
| UserCreateParams.LinkedAccountLineInput
|
|
1137
|
-
| UserCreateParams.LinkedAccountTwitchInput
|
|
1138
|
-
| UserCreateParams.LinkedAccountAppleInput
|
|
1139
|
-
| UserCreateParams.LinkedAccountLinkedInInput
|
|
1140
|
-
| UserCreateParams.LinkedAccountFarcasterInput
|
|
1141
|
-
| UserCreateParams.LinkedAccountTelegramInput
|
|
1142
|
-
| UserCreateParams.LinkedAccountCustomJwtInput
|
|
1143
|
-
>;
|
|
1345
|
+
/**
|
|
1346
|
+
* The payload for importing a Tiktok account.
|
|
1347
|
+
*/
|
|
1348
|
+
export interface LinkedAccountTiktokInput {
|
|
1349
|
+
name: string | null;
|
|
1144
1350
|
|
|
1145
|
-
|
|
1146
|
-
* Custom metadata associated with the user.
|
|
1147
|
-
*/
|
|
1148
|
-
custom_metadata?: { [key: string]: string | number | boolean };
|
|
1351
|
+
subject: string;
|
|
1149
1352
|
|
|
1150
|
-
|
|
1151
|
-
* Wallets to create for the user.
|
|
1152
|
-
*/
|
|
1153
|
-
wallets?: Array<UserCreateParams.Wallet>;
|
|
1154
|
-
}
|
|
1353
|
+
type: 'tiktok_oauth';
|
|
1155
1354
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
address: string;
|
|
1355
|
+
username: string;
|
|
1356
|
+
}
|
|
1159
1357
|
|
|
1160
|
-
|
|
1358
|
+
/**
|
|
1359
|
+
* The payload for importing a LINE account.
|
|
1360
|
+
*/
|
|
1361
|
+
export interface LinkedAccountLineInput {
|
|
1362
|
+
subject: string;
|
|
1161
1363
|
|
|
1162
|
-
|
|
1163
|
-
}
|
|
1364
|
+
type: 'line_oauth';
|
|
1164
1365
|
|
|
1165
|
-
|
|
1166
|
-
address: string;
|
|
1366
|
+
email?: string;
|
|
1167
1367
|
|
|
1168
|
-
|
|
1169
|
-
}
|
|
1368
|
+
name?: string;
|
|
1170
1369
|
|
|
1171
|
-
|
|
1172
|
-
|
|
1370
|
+
profile_picture_url?: string;
|
|
1371
|
+
}
|
|
1173
1372
|
|
|
1174
|
-
|
|
1175
|
-
|
|
1373
|
+
/**
|
|
1374
|
+
* The payload for importing a Twitch account.
|
|
1375
|
+
*/
|
|
1376
|
+
export interface LinkedAccountTwitchInput {
|
|
1377
|
+
subject: string;
|
|
1176
1378
|
|
|
1177
|
-
|
|
1178
|
-
email: string;
|
|
1379
|
+
type: 'twitch_oauth';
|
|
1179
1380
|
|
|
1180
|
-
|
|
1381
|
+
username?: string;
|
|
1382
|
+
}
|
|
1181
1383
|
|
|
1182
|
-
|
|
1384
|
+
/**
|
|
1385
|
+
* The payload for importing an Apple account.
|
|
1386
|
+
*/
|
|
1387
|
+
export interface LinkedAccountAppleInput {
|
|
1388
|
+
subject: string;
|
|
1183
1389
|
|
|
1184
|
-
|
|
1185
|
-
}
|
|
1390
|
+
type: 'apple_oauth';
|
|
1186
1391
|
|
|
1187
|
-
|
|
1188
|
-
|
|
1392
|
+
email?: string;
|
|
1393
|
+
}
|
|
1189
1394
|
|
|
1190
|
-
|
|
1395
|
+
/**
|
|
1396
|
+
* The payload for importing a LinkedIn account.
|
|
1397
|
+
*/
|
|
1398
|
+
export interface LinkedAccountLinkedInInput {
|
|
1399
|
+
subject: string;
|
|
1191
1400
|
|
|
1192
|
-
|
|
1401
|
+
type: 'linkedin_oauth';
|
|
1193
1402
|
|
|
1194
|
-
|
|
1403
|
+
email?: string;
|
|
1195
1404
|
|
|
1196
|
-
|
|
1197
|
-
}
|
|
1405
|
+
name?: string;
|
|
1198
1406
|
|
|
1199
|
-
|
|
1200
|
-
|
|
1407
|
+
vanityName?: string;
|
|
1408
|
+
}
|
|
1201
1409
|
|
|
1202
|
-
|
|
1410
|
+
/**
|
|
1411
|
+
* The payload for importing a Farcaster account.
|
|
1412
|
+
*/
|
|
1413
|
+
export interface LinkedAccountFarcasterInput {
|
|
1414
|
+
fid: number;
|
|
1203
1415
|
|
|
1204
|
-
|
|
1416
|
+
owner_address: string;
|
|
1205
1417
|
|
|
1206
|
-
|
|
1207
|
-
}
|
|
1418
|
+
type: 'farcaster';
|
|
1208
1419
|
|
|
1209
|
-
|
|
1210
|
-
subject: string;
|
|
1420
|
+
bio?: string;
|
|
1211
1421
|
|
|
1212
|
-
|
|
1422
|
+
display_name?: string;
|
|
1213
1423
|
|
|
1214
|
-
|
|
1424
|
+
homepage_url?: string;
|
|
1215
1425
|
|
|
1216
|
-
|
|
1426
|
+
profile_picture_url?: string;
|
|
1217
1427
|
|
|
1218
|
-
|
|
1219
|
-
|
|
1428
|
+
username?: string;
|
|
1429
|
+
}
|
|
1220
1430
|
|
|
1221
|
-
|
|
1222
|
-
|
|
1431
|
+
/**
|
|
1432
|
+
* The payload for importing a Telegram account.
|
|
1433
|
+
*/
|
|
1434
|
+
export interface LinkedAccountTelegramInput {
|
|
1435
|
+
telegram_user_id: string;
|
|
1223
1436
|
|
|
1224
|
-
|
|
1437
|
+
type: 'telegram';
|
|
1225
1438
|
|
|
1226
|
-
|
|
1439
|
+
first_name?: string;
|
|
1227
1440
|
|
|
1228
|
-
|
|
1229
|
-
}
|
|
1441
|
+
last_name?: string;
|
|
1230
1442
|
|
|
1231
|
-
|
|
1232
|
-
subject: string;
|
|
1443
|
+
photo_url?: string;
|
|
1233
1444
|
|
|
1234
|
-
|
|
1445
|
+
username?: string;
|
|
1446
|
+
}
|
|
1235
1447
|
|
|
1236
|
-
|
|
1237
|
-
|
|
1448
|
+
/**
|
|
1449
|
+
* The payload for importing a Custom JWT account.
|
|
1450
|
+
*/
|
|
1451
|
+
export interface LinkedAccountCustomJwtInput {
|
|
1452
|
+
custom_user_id: string;
|
|
1238
1453
|
|
|
1239
|
-
|
|
1240
|
-
|
|
1454
|
+
type: 'custom_auth';
|
|
1455
|
+
}
|
|
1241
1456
|
|
|
1242
|
-
|
|
1457
|
+
/**
|
|
1458
|
+
* The input for adding a linked account to a user.
|
|
1459
|
+
*/
|
|
1460
|
+
export type LinkedAccountInput =
|
|
1461
|
+
| LinkedAccountWalletInput
|
|
1462
|
+
| LinkedAccountEmailInput
|
|
1463
|
+
| LinkedAccountPhoneInput
|
|
1464
|
+
| LinkedAccountGoogleInput
|
|
1465
|
+
| LinkedAccountTwitterInput
|
|
1466
|
+
| LinkedAccountDiscordInput
|
|
1467
|
+
| LinkedAccountGitHubInput
|
|
1468
|
+
| LinkedAccountSpotifyInput
|
|
1469
|
+
| LinkedAccountInstagramInput
|
|
1470
|
+
| LinkedAccountTiktokInput
|
|
1471
|
+
| LinkedAccountLineInput
|
|
1472
|
+
| LinkedAccountTwitchInput
|
|
1473
|
+
| LinkedAccountAppleInput
|
|
1474
|
+
| LinkedAccountLinkedInInput
|
|
1475
|
+
| LinkedAccountFarcasterInput
|
|
1476
|
+
| LinkedAccountTelegramInput
|
|
1477
|
+
| LinkedAccountCustomJwtInput;
|
|
1243
1478
|
|
|
1244
|
-
|
|
1479
|
+
/**
|
|
1480
|
+
* The payload for batch creating users.
|
|
1481
|
+
*/
|
|
1482
|
+
export interface UserBatchCreateInput {
|
|
1483
|
+
users: Array<UserBatchCreateInput.User>;
|
|
1484
|
+
}
|
|
1245
1485
|
|
|
1246
|
-
|
|
1247
|
-
|
|
1486
|
+
export namespace UserBatchCreateInput {
|
|
1487
|
+
export interface User {
|
|
1488
|
+
linked_accounts: Array<UsersAPI.LinkedAccountInput>;
|
|
1248
1489
|
|
|
1249
|
-
|
|
1250
|
-
subject: string;
|
|
1490
|
+
create_embedded_wallet?: boolean;
|
|
1251
1491
|
|
|
1252
|
-
|
|
1492
|
+
create_ethereum_smart_wallet?: boolean;
|
|
1253
1493
|
|
|
1254
|
-
|
|
1494
|
+
create_ethereum_wallet?: boolean;
|
|
1255
1495
|
|
|
1256
|
-
|
|
1496
|
+
create_n_embedded_wallets?: number;
|
|
1257
1497
|
|
|
1258
|
-
|
|
1259
|
-
}
|
|
1498
|
+
create_n_ethereum_wallets?: number;
|
|
1260
1499
|
|
|
1261
|
-
|
|
1262
|
-
subject: string;
|
|
1500
|
+
create_solana_wallet?: boolean;
|
|
1263
1501
|
|
|
1264
|
-
|
|
1502
|
+
/**
|
|
1503
|
+
* Custom metadata associated with the user.
|
|
1504
|
+
*/
|
|
1505
|
+
custom_metadata?: UsersAPI.CustomMetadata;
|
|
1265
1506
|
|
|
1266
|
-
|
|
1507
|
+
wallets?: Array<User.Wallet>;
|
|
1267
1508
|
}
|
|
1268
1509
|
|
|
1269
|
-
export
|
|
1270
|
-
|
|
1510
|
+
export namespace User {
|
|
1511
|
+
export interface Wallet {
|
|
1512
|
+
/**
|
|
1513
|
+
* The wallet chain types.
|
|
1514
|
+
*/
|
|
1515
|
+
chain_type: WalletsAPI.WalletChainType;
|
|
1271
1516
|
|
|
1272
|
-
|
|
1517
|
+
additional_signers?: Array<Wallet.AdditionalSigner>;
|
|
1273
1518
|
|
|
1274
|
-
|
|
1275
|
-
}
|
|
1519
|
+
create_smart_wallet?: boolean;
|
|
1276
1520
|
|
|
1277
|
-
|
|
1278
|
-
|
|
1521
|
+
policy_ids?: Array<string>;
|
|
1522
|
+
}
|
|
1279
1523
|
|
|
1280
|
-
|
|
1524
|
+
export namespace Wallet {
|
|
1525
|
+
export interface AdditionalSigner {
|
|
1526
|
+
signer_id: string;
|
|
1281
1527
|
|
|
1282
|
-
|
|
1528
|
+
override_policy_ids?: Array<string>;
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1283
1533
|
|
|
1284
|
-
|
|
1534
|
+
/**
|
|
1535
|
+
* A SMS MFA method.
|
|
1536
|
+
*/
|
|
1537
|
+
export interface SMSMfaMethod {
|
|
1538
|
+
type: 'sms';
|
|
1285
1539
|
|
|
1286
|
-
|
|
1287
|
-
|
|
1540
|
+
verified_at: number;
|
|
1541
|
+
}
|
|
1288
1542
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1543
|
+
/**
|
|
1544
|
+
* A TOTP MFA method.
|
|
1545
|
+
*/
|
|
1546
|
+
export interface TotpMfaMethod {
|
|
1547
|
+
type: 'totp';
|
|
1291
1548
|
|
|
1292
|
-
|
|
1549
|
+
verified_at: number;
|
|
1550
|
+
}
|
|
1293
1551
|
|
|
1294
|
-
|
|
1552
|
+
/**
|
|
1553
|
+
* A Passkey MFA method.
|
|
1554
|
+
*/
|
|
1555
|
+
export interface PasskeyMfaMethod {
|
|
1556
|
+
type: 'passkey';
|
|
1295
1557
|
|
|
1296
|
-
|
|
1558
|
+
verified_at: number;
|
|
1559
|
+
}
|
|
1297
1560
|
|
|
1298
|
-
|
|
1561
|
+
/**
|
|
1562
|
+
* A multi-factor authentication method linked to the user.
|
|
1563
|
+
*/
|
|
1564
|
+
export type LinkedMfaMethod = SMSMfaMethod | TotpMfaMethod | PasskeyMfaMethod;
|
|
1299
1565
|
|
|
1300
|
-
|
|
1566
|
+
/**
|
|
1567
|
+
* OAuth tokens associated with the user.
|
|
1568
|
+
*/
|
|
1569
|
+
export interface OAuthTokens {
|
|
1570
|
+
access_token: string;
|
|
1301
1571
|
|
|
1302
|
-
|
|
1572
|
+
provider: string;
|
|
1303
1573
|
|
|
1304
|
-
|
|
1305
|
-
}
|
|
1574
|
+
access_token_expires_in_seconds?: number;
|
|
1306
1575
|
|
|
1307
|
-
|
|
1308
|
-
telegram_user_id: string;
|
|
1576
|
+
refresh_token?: string;
|
|
1309
1577
|
|
|
1310
|
-
|
|
1578
|
+
refresh_token_expires_in_seconds?: number;
|
|
1311
1579
|
|
|
1312
|
-
|
|
1580
|
+
scopes?: Array<string>;
|
|
1581
|
+
}
|
|
1313
1582
|
|
|
1314
|
-
|
|
1583
|
+
/**
|
|
1584
|
+
* The user object along their identity token.
|
|
1585
|
+
*/
|
|
1586
|
+
export interface UserWithIdentityToken {
|
|
1587
|
+
identity_token: string | null;
|
|
1315
1588
|
|
|
1316
|
-
|
|
1589
|
+
/**
|
|
1590
|
+
* A Privy user object.
|
|
1591
|
+
*/
|
|
1592
|
+
user: User;
|
|
1593
|
+
}
|
|
1317
1594
|
|
|
1318
|
-
|
|
1319
|
-
|
|
1595
|
+
export interface UserCreateParams {
|
|
1596
|
+
linked_accounts: Array<LinkedAccountInput>;
|
|
1320
1597
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1598
|
+
/**
|
|
1599
|
+
* Custom metadata associated with the user.
|
|
1600
|
+
*/
|
|
1601
|
+
custom_metadata?: CustomMetadata;
|
|
1323
1602
|
|
|
1324
|
-
|
|
1325
|
-
|
|
1603
|
+
/**
|
|
1604
|
+
* Wallets to create for the user.
|
|
1605
|
+
*/
|
|
1606
|
+
wallets?: Array<UserCreateParams.Wallet>;
|
|
1607
|
+
}
|
|
1326
1608
|
|
|
1609
|
+
export namespace UserCreateParams {
|
|
1327
1610
|
export interface Wallet {
|
|
1328
1611
|
/**
|
|
1329
1612
|
* The wallet chain types.
|
|
@@ -1462,35 +1745,16 @@ export interface UserSetCustomMetadataParams {
|
|
|
1462
1745
|
/**
|
|
1463
1746
|
* Custom metadata associated with the user.
|
|
1464
1747
|
*/
|
|
1465
|
-
custom_metadata:
|
|
1748
|
+
custom_metadata: CustomMetadata;
|
|
1466
1749
|
}
|
|
1467
1750
|
|
|
1468
1751
|
export interface UserUnlinkLinkedAccountParams {
|
|
1469
1752
|
handle: string;
|
|
1470
1753
|
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
| 'farcaster'
|
|
1476
|
-
| 'passkey'
|
|
1477
|
-
| 'phone'
|
|
1478
|
-
| 'google_oauth'
|
|
1479
|
-
| 'discord_oauth'
|
|
1480
|
-
| 'twitter_oauth'
|
|
1481
|
-
| 'github_oauth'
|
|
1482
|
-
| 'linkedin_oauth'
|
|
1483
|
-
| 'apple_oauth'
|
|
1484
|
-
| 'spotify_oauth'
|
|
1485
|
-
| 'instagram_oauth'
|
|
1486
|
-
| 'tiktok_oauth'
|
|
1487
|
-
| 'line_oauth'
|
|
1488
|
-
| 'twitch_oauth'
|
|
1489
|
-
| 'custom_auth'
|
|
1490
|
-
| 'telegram'
|
|
1491
|
-
| 'cross_app'
|
|
1492
|
-
| 'guest'
|
|
1493
|
-
| (string & {});
|
|
1754
|
+
/**
|
|
1755
|
+
* The possible types of linked accounts.
|
|
1756
|
+
*/
|
|
1757
|
+
type: LinkedAccountType;
|
|
1494
1758
|
|
|
1495
1759
|
provider?: string;
|
|
1496
1760
|
}
|
|
@@ -1500,6 +1764,17 @@ export declare namespace Users {
|
|
|
1500
1764
|
type AuthenticatedUser as AuthenticatedUser,
|
|
1501
1765
|
type LinkedAccount as LinkedAccount,
|
|
1502
1766
|
type User as User,
|
|
1767
|
+
type LinkedAccountEmail as LinkedAccountEmail,
|
|
1768
|
+
type LinkedAccountPhone as LinkedAccountPhone,
|
|
1769
|
+
type LinkedAccountBaseWallet as LinkedAccountBaseWallet,
|
|
1770
|
+
type LinkedAccountEthereum as LinkedAccountEthereum,
|
|
1771
|
+
type SmartWalletType as SmartWalletType,
|
|
1772
|
+
type LinkedAccountSmartWallet as LinkedAccountSmartWallet,
|
|
1773
|
+
type LinkedAccountSolana as LinkedAccountSolana,
|
|
1774
|
+
type LinkedAccountFarcaster as LinkedAccountFarcaster,
|
|
1775
|
+
type LinkedAccountPasskey as LinkedAccountPasskey,
|
|
1776
|
+
type LinkedAccountTelegram as LinkedAccountTelegram,
|
|
1777
|
+
type EmbeddedWalletRecoveryMethod as EmbeddedWalletRecoveryMethod,
|
|
1503
1778
|
type LinkedAccountEthereumEmbeddedWallet as LinkedAccountEthereumEmbeddedWallet,
|
|
1504
1779
|
type LinkedAccountSolanaEmbeddedWallet as LinkedAccountSolanaEmbeddedWallet,
|
|
1505
1780
|
type LinkedAccountBitcoinSegwitEmbeddedWallet as LinkedAccountBitcoinSegwitEmbeddedWallet,
|
|
@@ -1507,8 +1782,50 @@ export declare namespace Users {
|
|
|
1507
1782
|
type LinkedAccountCurveSigningEmbeddedWallet as LinkedAccountCurveSigningEmbeddedWallet,
|
|
1508
1783
|
type LinkedAccountEmbeddedWallet as LinkedAccountEmbeddedWallet,
|
|
1509
1784
|
type LinkedAccountEmbeddedWalletWithID as LinkedAccountEmbeddedWalletWithID,
|
|
1510
|
-
type
|
|
1511
|
-
type
|
|
1785
|
+
type LinkedAccountGoogleOAuth as LinkedAccountGoogleOAuth,
|
|
1786
|
+
type LinkedAccountTwitterOAuth as LinkedAccountTwitterOAuth,
|
|
1787
|
+
type LinkedAccountDiscordOAuth as LinkedAccountDiscordOAuth,
|
|
1788
|
+
type LinkedAccountGitHubOAuth as LinkedAccountGitHubOAuth,
|
|
1789
|
+
type LinkedAccountLinkedInOAuth as LinkedAccountLinkedInOAuth,
|
|
1790
|
+
type LinkedAccountSpotifyOAuth as LinkedAccountSpotifyOAuth,
|
|
1791
|
+
type LinkedAccountInstagramOAuth as LinkedAccountInstagramOAuth,
|
|
1792
|
+
type LinkedAccountTiktokOAuth as LinkedAccountTiktokOAuth,
|
|
1793
|
+
type LinkedAccountLineOAuth as LinkedAccountLineOAuth,
|
|
1794
|
+
type LinkedAccountTwitchOAuth as LinkedAccountTwitchOAuth,
|
|
1795
|
+
type LinkedAccountAppleOAuth as LinkedAccountAppleOAuth,
|
|
1796
|
+
type LinkedAccountCustomOAuth as LinkedAccountCustomOAuth,
|
|
1797
|
+
type LinkedAccountCustomJwt as LinkedAccountCustomJwt,
|
|
1798
|
+
type CrossAppEmbeddedWallet as CrossAppEmbeddedWallet,
|
|
1799
|
+
type CrossAppSmartWallet as CrossAppSmartWallet,
|
|
1800
|
+
type LinkedAccountCrossApp as LinkedAccountCrossApp,
|
|
1801
|
+
type LinkedAccountAuthorizationKey as LinkedAccountAuthorizationKey,
|
|
1802
|
+
type LinkedAccountType as LinkedAccountType,
|
|
1803
|
+
type CustomMetadata as CustomMetadata,
|
|
1804
|
+
type LinkedAccountWalletInput as LinkedAccountWalletInput,
|
|
1805
|
+
type LinkedAccountEmailInput as LinkedAccountEmailInput,
|
|
1806
|
+
type LinkedAccountPhoneInput as LinkedAccountPhoneInput,
|
|
1807
|
+
type LinkedAccountGoogleInput as LinkedAccountGoogleInput,
|
|
1808
|
+
type LinkedAccountTwitterInput as LinkedAccountTwitterInput,
|
|
1809
|
+
type LinkedAccountDiscordInput as LinkedAccountDiscordInput,
|
|
1810
|
+
type LinkedAccountGitHubInput as LinkedAccountGitHubInput,
|
|
1811
|
+
type LinkedAccountSpotifyInput as LinkedAccountSpotifyInput,
|
|
1812
|
+
type LinkedAccountInstagramInput as LinkedAccountInstagramInput,
|
|
1813
|
+
type LinkedAccountTiktokInput as LinkedAccountTiktokInput,
|
|
1814
|
+
type LinkedAccountLineInput as LinkedAccountLineInput,
|
|
1815
|
+
type LinkedAccountTwitchInput as LinkedAccountTwitchInput,
|
|
1816
|
+
type LinkedAccountAppleInput as LinkedAccountAppleInput,
|
|
1817
|
+
type LinkedAccountLinkedInInput as LinkedAccountLinkedInInput,
|
|
1818
|
+
type LinkedAccountFarcasterInput as LinkedAccountFarcasterInput,
|
|
1819
|
+
type LinkedAccountTelegramInput as LinkedAccountTelegramInput,
|
|
1820
|
+
type LinkedAccountCustomJwtInput as LinkedAccountCustomJwtInput,
|
|
1821
|
+
type LinkedAccountInput as LinkedAccountInput,
|
|
1822
|
+
type UserBatchCreateInput as UserBatchCreateInput,
|
|
1823
|
+
type SMSMfaMethod as SMSMfaMethod,
|
|
1824
|
+
type TotpMfaMethod as TotpMfaMethod,
|
|
1825
|
+
type PasskeyMfaMethod as PasskeyMfaMethod,
|
|
1826
|
+
type LinkedMfaMethod as LinkedMfaMethod,
|
|
1827
|
+
type OAuthTokens as OAuthTokens,
|
|
1828
|
+
type UserWithIdentityToken as UserWithIdentityToken,
|
|
1512
1829
|
type UsersCursor as UsersCursor,
|
|
1513
1830
|
type UserCreateParams as UserCreateParams,
|
|
1514
1831
|
type UserListParams as UserListParams,
|