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