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