@bounded-sh/client 0.0.32 → 0.0.33

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.
@@ -43,42 +43,34 @@ export declare function signInAnonymously(): Promise<User | null>;
43
43
  */
44
44
  export declare function loginWithPrivy(options?: LoginOptions): Promise<User | null>;
45
45
  /**
46
- * Send a 6-digit login code to `email` (Bounded Better Auth). Step 1 of the
47
- * inline email flow — build your own email/code UI for full control over the
48
- * look, or just call `login()` for the built-in modal. Works on web AND React
49
- * Native (no DOM needed). Prefer `loginWithRedirect()`/`loginWithPopup()` if you
50
- * want the credential entered on Bounded's hosted page instead.
46
+ * Retired. Use `loginWithRedirect({ redirectUri, methods: ['email'] })` or
47
+ * `loginWithPopup(...)`; app-origin OTP helpers fail closed.
51
48
  */
52
49
  export declare function sendEmailOtp(email: string): Promise<{
53
50
  ok: true;
54
51
  expiresInSeconds?: number;
55
52
  }>;
56
53
  /**
57
- * Send a 6-digit login code by text message. Requires the configured Bounded
58
- * auth issuer to have text OTP explicitly enabled and SMS delivery configured.
59
- * Works on web AND React Native.
54
+ * Retired. Use hosted login with `methods: ['text']` or `provider: 'text'`
55
+ * when text OTP is enabled for the app.
60
56
  */
61
57
  export declare function sendTextOtp(phoneNumber: string): Promise<{
62
58
  ok: true;
63
59
  expiresInSeconds?: number;
64
60
  }>;
65
61
  /**
66
- * Verify the `code` for `email`, establish the session, and return the user.
67
- * Step 2 of the inline email flow. Coexists with signInAnonymously()/wallets.
62
+ * Retired. Complete hosted login on the callback page with
63
+ * `completeLoginFromRedirect()`.
68
64
  */
69
65
  export declare function verifyEmailOtp(email: string, code: string): Promise<User | null>;
70
66
  /**
71
- * Verify the text-message `code`, establish the session, and return the user.
72
- * Phone-only users have no `user.email`; use `user.id` for app identity.
67
+ * Retired. Complete hosted login on the callback page with
68
+ * `completeLoginFromRedirect()`.
73
69
  */
74
70
  export declare function verifyTextOtp(phoneNumber: string, code: string): Promise<User | null>;
75
71
  /**
76
- * UPGRADE the current anonymous (guest) session by linking an email — Firebase
77
- * `linkWithCredential` parity. Send the code first with `sendEmailOtp(email)`,
78
- * then call `linkEmail(email, code)`. If the email is brand-new the guest's
79
- * `@user.id` (and its data) is preserved; if the email already exists the user
80
- * just signs into it (no merge). Requires an active guest session, and the issuer
81
- * refuses if the wallet is already linked. Browser/React-Native only.
72
+ * Retired. Guest upgrade is no longer an inline id-preserving auth operation;
73
+ * send the user through hosted login and transfer data explicitly in app state.
82
74
  */
83
75
  export declare function linkEmail(email: string, code: string): Promise<User | null>;
84
76
  export declare function login(options?: LoginOptions): Promise<User | null>;
@@ -1,33 +1,26 @@
1
1
  import type { AuthProvider, User, TransactionResult, SolTransaction, EVMTransaction, SetOptions } from '@bounded-sh/core';
2
2
  import { Transaction, VersionedTransaction } from '@solana/web3.js';
3
- /** Send a login code to `email`. Step 1 of the inline email-OTP flow. */
3
+ /** @internal Legacy issuer-owned helper. App code must use hosted login instead. */
4
4
  export declare function sendEmailOtp(email: string): Promise<{
5
5
  ok: true;
6
6
  expiresInSeconds?: number;
7
7
  }>;
8
- /** Send a login code by text message. Requires the Bounded issuer to have text OTP explicitly enabled and SMS configured. */
8
+ /** @internal Legacy issuer-owned helper. App code must use hosted login instead. */
9
9
  export declare function sendTextOtp(phoneNumber: string): Promise<{
10
10
  ok: true;
11
11
  expiresInSeconds?: number;
12
12
  }>;
13
13
  /**
14
- * Verify the code for `email` and establish the session. Step 2 of the flow.
15
- * Stores the Bounded id token (the realtime bearer) and sets the current user.
14
+ * @internal Legacy issuer-owned helper. App code must use hosted login instead.
16
15
  */
17
16
  export declare function verifyEmailOtp(email: string, otp: string): Promise<User>;
18
17
  /**
19
- * Verify the text-message code for `phoneNumber` and establish the session.
20
- * Phone-only users have `user.email === null`; use `user.id` for ownership.
18
+ * @internal Legacy issuer-owned helper. App code must use hosted login instead.
21
19
  */
22
20
  export declare function verifyTextOtp(phoneNumber: string, otp: string): Promise<User>;
23
21
  /**
24
- * UPGRADE an anonymous (guest) session by LINKING an email credential — Firebase
25
- * `linkWithCredential` parity. The guest's `guestToken` is sent to the auth issuer
26
- * which, IF the email is brand-new, makes the new account ADOPT the guest's id so
27
- * `@user.id` is preserved and the guest's data carries over. If the email already
28
- * exists, the user just signs into it (stays separate; `linked:false`). On success
29
- * the upgraded session replaces the guest session and the user is no longer
30
- * anonymous. `guestToken` is captured by the caller BEFORE switching auth methods.
22
+ * @internal Legacy issuer-owned helper. Guest-to-real-account continuity should
23
+ * be modeled as explicit app-data transfer after hosted login.
31
24
  */
32
25
  export declare function linkEmailWithGuest(email: string, otp: string, guestToken: string): Promise<{
33
26
  user: User;