@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.
- package/dist/auth/index.d.ts +10 -18
- package/dist/auth/providers/email-auth-provider.d.ts +6 -13
- package/dist/index.js +50 -515
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +51 -516
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +50 -515
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +51 -516
- package/dist/index.native.mjs.map +1 -1
- package/package.json +2 -2
package/dist/auth/index.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
47
|
-
*
|
|
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
|
-
*
|
|
58
|
-
*
|
|
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
|
-
*
|
|
67
|
-
*
|
|
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
|
-
*
|
|
72
|
-
*
|
|
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
|
-
*
|
|
77
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
25
|
-
*
|
|
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;
|