@privy-io/api-types 0.8.0 → 0.10.0

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