@privy-io/react-auth 1.65.0 → 1.66.0-beta-20240517150700

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/dist/index.d.ts CHANGED
@@ -429,6 +429,7 @@ declare enum PrivyErrorCode {
429
429
  EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS = "embedded_wallet_recovery_already_exists",
430
430
  TRANSACTION_FAILURE = "transaction_failure",
431
431
  UNSUPPORTED_CHAIN_ID = "unsupported_chain_id",
432
+ NOT_SUPPORTED = "not_supported",
432
433
  CAPTCHA_TIMEOUT = "captcha_timeout",
433
434
  INVALID_MESSAGE = "invalid_message",
434
435
  UNABLE_TO_SIGN = "unable_to_sign",
@@ -1027,6 +1028,7 @@ declare class PrivyClient {
1027
1028
  unlinkWallet(address: string): Promise<User>;
1028
1029
  unlinkOAuth(provider: OAuthProviderType, subject: string): Promise<User>;
1029
1030
  unlinkFarcaster(fid: number): Promise<User>;
1031
+ unlinkTelegram(telegramUserId: string): Promise<User>;
1030
1032
  unlinkPasskey(credentialId: string): Promise<User>;
1031
1033
  createAnalyticsEvent({ eventName, payload, timestamp, options, }: {
1032
1034
  eventName: string;
@@ -2320,6 +2322,11 @@ interface PrivyInterface {
2320
2322
  * This will open the Privy Modal which will guide the user through this action.
2321
2323
  */
2322
2324
  linkPasskey: () => void;
2325
+ /**
2326
+ * For users who are authenticated, prompts the user to link a Telegram account
2327
+ * This will directly initiate the auth flow for Telegram.
2328
+ */
2329
+ linkTelegram: () => void;
2323
2330
  /**
2324
2331
  * For users who are authenticated and have already linked an email address, prompts the user to update their email address.
2325
2332
  * This will open the Privy Modal which will guide the user through this action.
@@ -2482,6 +2489,13 @@ interface PrivyInterface {
2482
2489
  * @returns Promise for the {@link User} object after the provided Farcaster account has been unlinked
2483
2490
  */
2484
2491
  unlinkFarcaster: (fid: number) => Promise<User>;
2492
+ /**
2493
+ * Unlink a Telegram account from a user, by passing the Telegram subject ID. Note that you can only unlink a social account if the user has at least one other account.
2494
+ *
2495
+ * @param telegramUserId {string} Telegram user ID of the linked account
2496
+ * @returns Promise for the {@link User} object after the provided Telegram account has been unlinked
2497
+ */
2498
+ unlinkTelegram: (telegramUserId: string) => Promise<User>;
2485
2499
  /**
2486
2500
  * Unlink a Passkey account from a user, by passing the credential ID. Note that you can only unlink a passkey account if the user has at least one other account.
2487
2501
  *
@@ -3267,6 +3281,7 @@ declare function useLinkAccount(callbacks?: PrivyEvents['linkAccount']): {
3267
3281
  linkSpotify: () => void;
3268
3282
  linkInstagram: () => void;
3269
3283
  linkFarcaster: () => void;
3284
+ linkTelegram: () => void;
3270
3285
  };
3271
3286
 
3272
3287
  /**