@privy-io/node 0.6.2 → 0.7.0

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