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