@turnkey/react-wallet-kit 1.0.0 → 1.1.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/dist/_virtual/_rollupPluginBabelHelpers.mjs +95 -256
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +1 -1
- package/dist/components/auth/Action.js.map +1 -1
- package/dist/components/auth/Action.mjs +18 -18
- package/dist/components/auth/Action.mjs.map +1 -1
- package/dist/components/auth/Email.js.map +1 -1
- package/dist/components/auth/Email.mjs +13 -14
- package/dist/components/auth/Email.mjs.map +1 -1
- package/dist/components/auth/OAuth.js.map +1 -1
- package/dist/components/auth/OAuth.mjs.map +1 -1
- package/dist/components/auth/OTP.d.ts +2 -2
- package/dist/components/auth/OTP.d.ts.map +1 -1
- package/dist/components/auth/OTP.js +1 -1
- package/dist/components/auth/OTP.js.map +1 -1
- package/dist/components/auth/OTP.mjs +46 -48
- package/dist/components/auth/OTP.mjs.map +1 -1
- package/dist/components/auth/OrSeparator.js.map +1 -1
- package/dist/components/auth/OrSeparator.mjs.map +1 -1
- package/dist/components/auth/Passkey.js.map +1 -1
- package/dist/components/auth/Passkey.mjs.map +1 -1
- package/dist/components/auth/Phone.js.map +1 -1
- package/dist/components/auth/Phone.mjs +13 -14
- package/dist/components/auth/Phone.mjs.map +1 -1
- package/dist/components/auth/Wallet.d.ts +2 -2
- package/dist/components/auth/Wallet.d.ts.map +1 -1
- package/dist/components/auth/Wallet.js +89 -49
- package/dist/components/auth/Wallet.js.map +1 -1
- package/dist/components/auth/Wallet.mjs +154 -116
- package/dist/components/auth/Wallet.mjs.map +1 -1
- package/dist/components/auth/index.d.ts +4 -1
- package/dist/components/auth/index.d.ts.map +1 -1
- package/dist/components/auth/index.js +44 -7
- package/dist/components/auth/index.js.map +1 -1
- package/dist/components/auth/index.mjs +160 -138
- package/dist/components/auth/index.mjs.map +1 -1
- package/dist/components/design/Buttons.js.map +1 -1
- package/dist/components/design/Buttons.mjs.map +1 -1
- package/dist/components/design/Failure.js.map +1 -1
- package/dist/components/design/Failure.mjs.map +1 -1
- package/dist/components/design/Inputs.js.map +1 -1
- package/dist/components/design/Inputs.mjs.map +1 -1
- package/dist/components/design/Lottie/Dynamic.mjs +8 -11
- package/dist/components/design/Lottie/Dynamic.mjs.map +1 -1
- package/dist/components/design/Lottie/Wrapper.js.map +1 -1
- package/dist/components/design/Lottie/Wrapper.mjs +9 -10
- package/dist/components/design/Lottie/Wrapper.mjs.map +1 -1
- package/dist/components/design/Spinners.js.map +1 -1
- package/dist/components/design/Spinners.mjs.map +1 -1
- package/dist/components/design/Success.js.map +1 -1
- package/dist/components/design/Success.mjs.map +1 -1
- package/dist/components/design/Svg.js.map +1 -1
- package/dist/components/design/Svg.mjs.map +1 -1
- package/dist/components/export/Export.d.ts +3 -0
- package/dist/components/export/Export.d.ts.map +1 -1
- package/dist/components/export/Export.js +12 -4
- package/dist/components/export/Export.js.map +1 -1
- package/dist/components/export/Export.mjs +35 -29
- package/dist/components/export/Export.mjs.map +1 -1
- package/dist/components/export/ExportWarning.d.ts +2 -0
- package/dist/components/export/ExportWarning.d.ts.map +1 -1
- package/dist/components/export/ExportWarning.js +17 -9
- package/dist/components/export/ExportWarning.js.map +1 -1
- package/dist/components/export/ExportWarning.mjs +64 -63
- package/dist/components/export/ExportWarning.mjs.map +1 -1
- package/dist/components/import/Import.d.ts +3 -0
- package/dist/components/import/Import.d.ts.map +1 -1
- package/dist/components/import/Import.js +28 -15
- package/dist/components/import/Import.js.map +1 -1
- package/dist/components/import/Import.mjs +122 -112
- package/dist/components/import/Import.mjs.map +1 -1
- package/dist/components/sign/Message.d.ts +1 -0
- package/dist/components/sign/Message.d.ts.map +1 -1
- package/dist/components/sign/Message.js +4 -0
- package/dist/components/sign/Message.js.map +1 -1
- package/dist/components/sign/Message.mjs +24 -22
- package/dist/components/sign/Message.mjs.map +1 -1
- package/dist/components/user/ConnectWallet.d.ts +2 -0
- package/dist/components/user/ConnectWallet.d.ts.map +1 -1
- package/dist/components/user/ConnectWallet.js +41 -29
- package/dist/components/user/ConnectWallet.js.map +1 -1
- package/dist/components/user/ConnectWallet.mjs +48 -32
- package/dist/components/user/ConnectWallet.mjs.map +1 -1
- package/dist/components/user/RemoveEmail.d.ts +1 -0
- package/dist/components/user/RemoveEmail.d.ts.map +1 -1
- package/dist/components/user/RemoveEmail.js +7 -3
- package/dist/components/user/RemoveEmail.js.map +1 -1
- package/dist/components/user/RemoveEmail.mjs +27 -25
- package/dist/components/user/RemoveEmail.mjs.map +1 -1
- package/dist/components/user/RemoveOAuthProvider.d.ts +1 -0
- package/dist/components/user/RemoveOAuthProvider.d.ts.map +1 -1
- package/dist/components/user/RemoveOAuthProvider.js +7 -3
- package/dist/components/user/RemoveOAuthProvider.js.map +1 -1
- package/dist/components/user/RemoveOAuthProvider.mjs +27 -25
- package/dist/components/user/RemoveOAuthProvider.mjs.map +1 -1
- package/dist/components/user/RemovePasskey.d.ts +1 -0
- package/dist/components/user/RemovePasskey.d.ts.map +1 -1
- package/dist/components/user/RemovePasskey.js +6 -2
- package/dist/components/user/RemovePasskey.js.map +1 -1
- package/dist/components/user/RemovePasskey.mjs +26 -24
- package/dist/components/user/RemovePasskey.mjs.map +1 -1
- package/dist/components/user/RemovePhoneNumber.d.ts +1 -0
- package/dist/components/user/RemovePhoneNumber.d.ts.map +1 -1
- package/dist/components/user/RemovePhoneNumber.js +7 -3
- package/dist/components/user/RemovePhoneNumber.js.map +1 -1
- package/dist/components/user/RemovePhoneNumber.mjs +27 -25
- package/dist/components/user/RemovePhoneNumber.mjs.map +1 -1
- package/dist/components/user/UpdateEmail.d.ts +4 -0
- package/dist/components/user/UpdateEmail.d.ts.map +1 -1
- package/dist/components/user/UpdateEmail.js +13 -3
- package/dist/components/user/UpdateEmail.js.map +1 -1
- package/dist/components/user/UpdateEmail.mjs +46 -39
- package/dist/components/user/UpdateEmail.mjs.map +1 -1
- package/dist/components/user/UpdatePhoneNumber.d.ts +4 -0
- package/dist/components/user/UpdatePhoneNumber.d.ts.map +1 -1
- package/dist/components/user/UpdatePhoneNumber.js +13 -3
- package/dist/components/user/UpdatePhoneNumber.js.map +1 -1
- package/dist/components/user/UpdatePhoneNumber.mjs +46 -39
- package/dist/components/user/UpdatePhoneNumber.mjs.map +1 -1
- package/dist/components/user/UpdateUserName.d.ts +2 -0
- package/dist/components/user/UpdateUserName.d.ts.map +1 -1
- package/dist/components/user/UpdateUserName.js +4 -3
- package/dist/components/user/UpdateUserName.js.map +1 -1
- package/dist/components/user/UpdateUserName.mjs +25 -25
- package/dist/components/user/UpdateUserName.mjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/providers/TurnkeyProvider.js.map +1 -1
- package/dist/providers/TurnkeyProvider.mjs.map +1 -1
- package/dist/providers/client/Hook.js.map +1 -1
- package/dist/providers/client/Hook.mjs.map +1 -1
- package/dist/providers/client/Provider.d.ts.map +1 -1
- package/dist/providers/client/Provider.js +630 -300
- package/dist/providers/client/Provider.js.map +1 -1
- package/dist/providers/client/Provider.mjs +2489 -2103
- package/dist/providers/client/Provider.mjs.map +1 -1
- package/dist/providers/client/Types.d.ts +100 -171
- package/dist/providers/client/Types.d.ts.map +1 -1
- package/dist/providers/client/Types.js.map +1 -1
- package/dist/providers/client/Types.mjs.map +1 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/modal/Hook.js.map +1 -1
- package/dist/providers/modal/Hook.mjs.map +1 -1
- package/dist/providers/modal/Provider.d.ts +3 -0
- package/dist/providers/modal/Provider.d.ts.map +1 -1
- package/dist/providers/modal/Provider.js +10 -1
- package/dist/providers/modal/Provider.js.map +1 -1
- package/dist/providers/modal/Provider.mjs +15 -1
- package/dist/providers/modal/Provider.mjs.map +1 -1
- package/dist/providers/modal/Root.d.ts.map +1 -1
- package/dist/providers/modal/Root.js +74 -2
- package/dist/providers/modal/Root.js.map +1 -1
- package/dist/providers/modal/Root.mjs +92 -15
- package/dist/providers/modal/Root.mjs.map +1 -1
- package/dist/providers/theme/Overrides.js.map +1 -1
- package/dist/providers/theme/Overrides.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/typedoc-entry/index.d.ts +4 -0
- package/dist/typedoc-entry/index.d.ts.map +1 -0
- package/dist/types/base.d.ts +8 -1
- package/dist/types/base.d.ts.map +1 -1
- package/dist/types/base.js.map +1 -1
- package/dist/types/base.mjs.map +1 -1
- package/dist/types/method-types.d.ts +210 -0
- package/dist/types/method-types.d.ts.map +1 -0
- package/dist/utils/timers.js.map +1 -1
- package/dist/utils/timers.mjs.map +1 -1
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +15 -5
- package/dist/utils/utils.js.map +1 -1
- package/dist/utils/utils.mjs +92 -86
- package/dist/utils/utils.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { TurnkeySDKClientBase, TurnkeyClientMethods, Wallet,
|
|
3
|
-
import type {
|
|
4
|
-
import type { TurnkeyProviderConfig, AuthState, ClientState
|
|
5
|
-
|
|
2
|
+
import type { TurnkeySDKClientBase, TurnkeyClientMethods, Wallet, WalletProvider, WalletAccount } from "@turnkey/core";
|
|
3
|
+
import type { Session, v1SignRawPayloadResult, v1User } from "@turnkey/sdk-types";
|
|
4
|
+
import type { TurnkeyProviderConfig, AuthState, ClientState } from "../../types/base";
|
|
5
|
+
import type { HandleAddEmailParams, HandleAddOauthProviderParams, HandleAddPasskeyParams, HandleAddPhoneNumberParams, HandleAppleOauthParams, HandleConnectExternalWalletParams, HandleDiscordOauthParams, HandleExportPrivateKeyParams, HandleExportWalletAccountParams, HandleExportWalletParams, HandleFacebookOauthParams, HandleGoogleOauthParams, HandleImportPrivateKeyParams, HandleImportWalletParams, HandleLoginParams, HandleRemoveOauthProviderParams, HandleRemovePasskeyParams, HandleRemoveUserEmailParams, HandleRemoveUserPhoneNumberParams, HandleSignMessageParams, HandleUpdateUserEmailParams, HandleUpdateUserNameParams, HandleUpdateUserPhoneNumberParams, HandleXOauthParams, RefreshUserParams, RefreshWalletsParams } from "../../types/method-types";
|
|
6
|
+
/** @internal */
|
|
7
|
+
type Override<T, U> = Omit<T, keyof U> & U;
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* ClientContextType
|
|
11
|
+
*
|
|
12
|
+
* This is where we define the shape of the context provided by the TurnkeyProvider. JS doc comments MUST be added here to show up in the generated docs as well as intellisense in IDEs.
|
|
13
|
+
* Make sure to add JS doc comments for any new methods you add in the provider so they get generated in our sdk reference docs.
|
|
14
|
+
* **IMPORTANT** - New core methods DO NOT need to be redeclared here, their shape and JS doc comments should come from the core package directly via TurnkeyClientMethods.
|
|
15
|
+
*/
|
|
16
|
+
/** @expand */
|
|
17
|
+
export type ClientContextType = Override<TurnkeyClientMethods, {
|
|
6
18
|
/** @internal */
|
|
7
19
|
httpClient: TurnkeySDKClientBase | undefined;
|
|
8
20
|
/** @internal */
|
|
@@ -19,6 +31,18 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
19
31
|
user: v1User | undefined;
|
|
20
32
|
/** @internal */
|
|
21
33
|
wallets: Wallet[];
|
|
34
|
+
/** @internal */
|
|
35
|
+
walletProviders: WalletProvider[];
|
|
36
|
+
/**
|
|
37
|
+
* Connects the specified wallet account.
|
|
38
|
+
*
|
|
39
|
+
* - Requires the wallet manager and its connector to be initialized.
|
|
40
|
+
*
|
|
41
|
+
* @param walletProvider - wallet provider to connect.
|
|
42
|
+
* @returns A promise that resolves once the wallet account is connected.
|
|
43
|
+
* @throws {TurnkeyError} If the wallet manager is uninitialized or the connection fails.
|
|
44
|
+
*/
|
|
45
|
+
connectWalletAccount: (provider: WalletProvider) => Promise<WalletAccount>;
|
|
22
46
|
/**
|
|
23
47
|
* Refreshes the user details.
|
|
24
48
|
*
|
|
@@ -30,12 +54,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
30
54
|
* - If no user is found, the state will not be updated.
|
|
31
55
|
*
|
|
32
56
|
* @param params.stampWith - parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
57
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
58
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
33
59
|
* @returns A promise that resolves when the user details are successfully refreshed and state is updated.
|
|
34
60
|
* @throws {TurnkeyError} If the client is not initialized or if there is an error refreshing the user details.
|
|
35
61
|
*/
|
|
36
|
-
refreshUser: (params?:
|
|
37
|
-
stampWith?: StamperType | undefined;
|
|
38
|
-
}) => Promise<void>;
|
|
62
|
+
refreshUser: (params?: RefreshUserParams) => Promise<void>;
|
|
39
63
|
/**
|
|
40
64
|
* Refreshes the wallets state for the current user session.
|
|
41
65
|
*
|
|
@@ -49,12 +73,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
49
73
|
* - If no wallets are found, the state will be set to an empty array.
|
|
50
74
|
*
|
|
51
75
|
* @param params.stampWith - parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
52
|
-
* @
|
|
76
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
77
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
78
|
+
* @returns A promise that resolves with the latest list of wallets.
|
|
53
79
|
* @throws {TurnkeyError} If the client is not initialized or if there is an error refreshing the wallets.
|
|
54
80
|
*/
|
|
55
|
-
refreshWallets: (params?:
|
|
56
|
-
stampWith?: StamperType | undefined;
|
|
57
|
-
}) => Promise<void>;
|
|
81
|
+
refreshWallets: (params?: RefreshWalletsParams) => Promise<Wallet[]>;
|
|
58
82
|
/**
|
|
59
83
|
* Handles the login or sign-up flow.
|
|
60
84
|
*
|
|
@@ -64,13 +88,15 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
64
88
|
* - After successful authentication, the provider state is updated and all relevant session, user, and wallet data are refreshed.
|
|
65
89
|
* - This function is typically used to trigger authentication from a UI button or navigation event.
|
|
66
90
|
*
|
|
67
|
-
* @param params.sessionKey -
|
|
91
|
+
* @param params.sessionKey - session key to resume an existing session or pre-fill session details in the login modal.
|
|
92
|
+
* @param params.logoLight - URL of a custom logo image to display at the top of the login modal in light mode (overrides config.ui.logoLight).
|
|
93
|
+
* @param params.logoDark - URL of a custom logo image to display at the top of the login modal in dark mode (overrides config.ui.logoDark).
|
|
94
|
+
* @param params.logoClassName - additional CSS class names to apply to the logo image for custom styling.
|
|
95
|
+
* @param params.title - title text to display at the top of the login modal (defaults to "Log in or sign up").
|
|
68
96
|
*
|
|
69
97
|
* @returns A void promise.
|
|
70
98
|
*/
|
|
71
|
-
handleLogin: (params?:
|
|
72
|
-
sessionKey?: string;
|
|
73
|
-
}) => Promise<void>;
|
|
99
|
+
handleLogin: (params?: HandleLoginParams) => Promise<void>;
|
|
74
100
|
/**
|
|
75
101
|
* Handles the Discord OAuth 2.0 flow.
|
|
76
102
|
*
|
|
@@ -98,15 +124,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
98
124
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
99
125
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
100
126
|
*/
|
|
101
|
-
handleDiscordOauth: (params?:
|
|
102
|
-
clientId?: string;
|
|
103
|
-
additionalState?: Record<string, string>;
|
|
104
|
-
openInPage?: boolean;
|
|
105
|
-
onOauthSuccess?: (params: {
|
|
106
|
-
oidcToken: string;
|
|
107
|
-
providerName: string;
|
|
108
|
-
}) => any;
|
|
109
|
-
}) => Promise<void>;
|
|
127
|
+
handleDiscordOauth: (params?: HandleDiscordOauthParams) => Promise<void>;
|
|
110
128
|
/**
|
|
111
129
|
* Handles the Twitter (X) OAuth 2.0 flow.
|
|
112
130
|
*
|
|
@@ -134,15 +152,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
134
152
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
135
153
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
136
154
|
*/
|
|
137
|
-
handleXOauth: (params?:
|
|
138
|
-
clientId?: string;
|
|
139
|
-
additionalState?: Record<string, string>;
|
|
140
|
-
openInPage?: boolean;
|
|
141
|
-
onOauthSuccess?: (params: {
|
|
142
|
-
oidcToken: string;
|
|
143
|
-
providerName: string;
|
|
144
|
-
}) => any;
|
|
145
|
-
}) => Promise<void>;
|
|
155
|
+
handleXOauth: (params?: HandleXOauthParams) => Promise<void>;
|
|
146
156
|
/**
|
|
147
157
|
* Handles the Google OAuth flow.
|
|
148
158
|
*
|
|
@@ -168,15 +178,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
168
178
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
169
179
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
170
180
|
*/
|
|
171
|
-
handleGoogleOauth: (params?:
|
|
172
|
-
clientId?: string;
|
|
173
|
-
additionalState?: Record<string, string>;
|
|
174
|
-
openInPage?: boolean;
|
|
175
|
-
onOauthSuccess?: (params: {
|
|
176
|
-
oidcToken: string;
|
|
177
|
-
providerName: string;
|
|
178
|
-
}) => any;
|
|
179
|
-
}) => Promise<void>;
|
|
181
|
+
handleGoogleOauth: (params?: HandleGoogleOauthParams) => Promise<void>;
|
|
180
182
|
/**
|
|
181
183
|
* Handles the Apple OAuth flow.
|
|
182
184
|
*
|
|
@@ -202,15 +204,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
202
204
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
203
205
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
204
206
|
*/
|
|
205
|
-
handleAppleOauth: (params?:
|
|
206
|
-
clientId?: string;
|
|
207
|
-
additionalState?: Record<string, string>;
|
|
208
|
-
openInPage?: boolean;
|
|
209
|
-
onOauthSuccess?: (params: {
|
|
210
|
-
oidcToken: string;
|
|
211
|
-
providerName: string;
|
|
212
|
-
}) => any;
|
|
213
|
-
}) => Promise<void>;
|
|
207
|
+
handleAppleOauth: (params?: HandleAppleOauthParams) => Promise<void>;
|
|
214
208
|
/**
|
|
215
209
|
* Handles the Facebook OAuth flow.
|
|
216
210
|
*
|
|
@@ -237,15 +231,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
237
231
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
238
232
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
239
233
|
*/
|
|
240
|
-
handleFacebookOauth: (params?:
|
|
241
|
-
clientId?: string;
|
|
242
|
-
additionalState?: Record<string, string>;
|
|
243
|
-
openInPage?: boolean;
|
|
244
|
-
onOauthSuccess?: (params: {
|
|
245
|
-
oidcToken: string;
|
|
246
|
-
providerName: string;
|
|
247
|
-
}) => any;
|
|
248
|
-
}) => Promise<void>;
|
|
234
|
+
handleFacebookOauth: (params?: HandleFacebookOauthParams) => Promise<void>;
|
|
249
235
|
/**
|
|
250
236
|
* Handles the export wallet flow.
|
|
251
237
|
*
|
|
@@ -261,14 +247,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
261
247
|
* @param params.walletId - The ID of the wallet to export.
|
|
262
248
|
* @param params.targetPublicKey - The target public key to encrypt the export bundle to (required for custom iframe flows).
|
|
263
249
|
* @param params.stampWith - The stamper to use for the export (Passkey, ApiKey, or Wallet).
|
|
250
|
+
* @param params.organizationId - The organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
251
|
+
* @param params.userId - The user ID to target (defaults to the session's user ID).
|
|
264
252
|
*
|
|
265
253
|
* @returns A void promise.
|
|
266
254
|
*/
|
|
267
|
-
handleExportWallet: (params:
|
|
268
|
-
walletId: string;
|
|
269
|
-
targetPublicKey?: string;
|
|
270
|
-
stampWith?: StamperType | undefined;
|
|
271
|
-
}) => Promise<void>;
|
|
255
|
+
handleExportWallet: (params: HandleExportWalletParams) => Promise<void>;
|
|
272
256
|
/**
|
|
273
257
|
* handles the export private key flow.
|
|
274
258
|
*
|
|
@@ -286,14 +270,11 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
286
270
|
* @param params.targetPublicKey - The target public key to encrypt the export bundle to (required for custom iframe flows).
|
|
287
271
|
* @param params.keyFormat - The format of the private key to export (KeyFormat.Hexadecimal or KeyFormat.Solana).
|
|
288
272
|
* @param params.stampWith - The stamper to use for the export (Passkey, ApiKey, or Wallet).
|
|
273
|
+
* @param params.organizationId - The organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
274
|
+
* @param params.userId - The user ID to target (defaults to the session's user ID).
|
|
289
275
|
* @return A void promise.
|
|
290
276
|
*/
|
|
291
|
-
handleExportPrivateKey: (params:
|
|
292
|
-
privateKeyId: string;
|
|
293
|
-
targetPublicKey?: string;
|
|
294
|
-
keyFormat?: KeyFormat;
|
|
295
|
-
stampWith?: StamperType | undefined;
|
|
296
|
-
}) => Promise<void>;
|
|
277
|
+
handleExportPrivateKey: (params: HandleExportPrivateKeyParams) => Promise<void>;
|
|
297
278
|
/**
|
|
298
279
|
* Handles the export wallet account flow.
|
|
299
280
|
*
|
|
@@ -311,15 +292,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
311
292
|
* @param params.targetPublicKey - The target public key to encrypt the export bundle to (required for custom iframe flows).
|
|
312
293
|
* @param params.keyFormat - The format of the address to export (KeyFormat.Hexadecimal or KeyFormat.Solana).
|
|
313
294
|
* @param params.stampWith - The stamper to use for the export (Passkey, ApiKey, or Wallet).
|
|
295
|
+
* @param params.organizationId - The organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
296
|
+
* @param params.userId - The user ID to target (defaults to the session's user ID).
|
|
314
297
|
*
|
|
315
298
|
* @returns A void promise.
|
|
316
299
|
*/
|
|
317
|
-
handleExportWalletAccount: (params:
|
|
318
|
-
address: string;
|
|
319
|
-
targetPublicKey?: string;
|
|
320
|
-
keyFormat?: KeyFormat;
|
|
321
|
-
stampWith?: StamperType | undefined;
|
|
322
|
-
}) => Promise<void>;
|
|
300
|
+
handleExportWalletAccount: (params: HandleExportWalletAccountParams) => Promise<void>;
|
|
323
301
|
/**
|
|
324
302
|
* Handles the import wallet flow.
|
|
325
303
|
*
|
|
@@ -333,14 +311,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
333
311
|
* @param params.defaultWalletAccounts - array of default wallet accounts (v1AddressFormat[] or v1WalletAccountParams[]) to pre-fill the import form.
|
|
334
312
|
* @param params.successPageDuration - duration (in ms) for the success page after import (default: 0, no success page).
|
|
335
313
|
* @param params.stampWith - parameter to specify the stamper to use for the import (Passkey, ApiKey, or Wallet).
|
|
314
|
+
* @param params.walletName - name for the imported wallet, if not provided, an input box will be shown for the name.
|
|
315
|
+
* @param params.organizationId - The organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
316
|
+
* @param params.userId - The user ID to target (defaults to the session's user ID).
|
|
336
317
|
*
|
|
337
318
|
* @returns A promise that resolves to the new wallet's ID.
|
|
338
319
|
*/
|
|
339
|
-
handleImportWallet: (params?:
|
|
340
|
-
defaultWalletAccounts?: v1AddressFormat[] | v1WalletAccountParams[];
|
|
341
|
-
successPageDuration?: number | undefined;
|
|
342
|
-
stampWith?: StamperType | undefined;
|
|
343
|
-
}) => Promise<string>;
|
|
320
|
+
handleImportWallet: (params?: HandleImportWalletParams) => Promise<string>;
|
|
344
321
|
/**
|
|
345
322
|
* Handles the import private key flow.
|
|
346
323
|
*
|
|
@@ -355,15 +332,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
355
332
|
* @param params.addressFormats - array of address formats (v1AddressFormat[]) that the private key supports (Eg: "ADDRESS_FORMAT_ETHEREUM" for Ethereum, "ADDRESS_FORMAT_SOLANA" for Solana).
|
|
356
333
|
* @param params.successPageDuration - duration (in ms) for the success page after import (default: 0, no success page).
|
|
357
334
|
* @param params.stampWith - parameter to specify the stamper to use for the import (Passkey, ApiKey, or Wallet).
|
|
335
|
+
* @param params.keyName - name for the imported private key, if not provided, an input box will be shown for the name.
|
|
336
|
+
* @param params.organizationId - The organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
337
|
+
* @param params.userId - The user ID to target (defaults to the session's user ID).
|
|
358
338
|
*
|
|
359
339
|
* @returns A promise that resolves to the new private key's ID.
|
|
360
340
|
*/
|
|
361
|
-
handleImportPrivateKey: (params?:
|
|
362
|
-
curve: v1Curve;
|
|
363
|
-
addressFormats: v1AddressFormat[];
|
|
364
|
-
successPageDuration?: number | undefined;
|
|
365
|
-
stampWith?: StamperType | undefined;
|
|
366
|
-
}) => Promise<string>;
|
|
341
|
+
handleImportPrivateKey: (params?: HandleImportPrivateKeyParams) => Promise<string>;
|
|
367
342
|
/**
|
|
368
343
|
* Handles the update user name flow.
|
|
369
344
|
*
|
|
@@ -379,16 +354,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
379
354
|
* @param params.subTitle - subtitle for the modal.
|
|
380
355
|
* @param params.successPageDuration - duration (in ms) for the success page after update (default: 0, no success page).
|
|
381
356
|
* @param params.stampWith - parameter to specify the stamper to use for the update (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
357
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
358
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
382
359
|
*
|
|
383
360
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
384
361
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error updating the user name.
|
|
385
362
|
*/
|
|
386
|
-
handleUpdateUserEmail: (params?:
|
|
387
|
-
email?: string;
|
|
388
|
-
title?: string;
|
|
389
|
-
subTitle?: string;
|
|
390
|
-
successPageDuration?: number | undefined;
|
|
391
|
-
}) => Promise<string>;
|
|
363
|
+
handleUpdateUserEmail: (params?: HandleUpdateUserEmailParams) => Promise<string>;
|
|
392
364
|
/**
|
|
393
365
|
* Handles the update user phone number flow.
|
|
394
366
|
*
|
|
@@ -405,17 +377,14 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
405
377
|
* @param params.title - title for the modal.
|
|
406
378
|
* @param params.subTitle - subtitle for the modal.
|
|
407
379
|
* @param params.successPageDuration - duration for the success page (default: 0, no success page).
|
|
380
|
+
* @param params.stampWith - parameter to specify the stamper to use for the update (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
381
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
382
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
408
383
|
*
|
|
409
384
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
410
385
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, SMS OTP is not enabled, or if there is an error updating the phone number.
|
|
411
386
|
*/
|
|
412
|
-
handleUpdateUserPhoneNumber: (params?:
|
|
413
|
-
phoneNumber?: string;
|
|
414
|
-
formattedPhone?: string;
|
|
415
|
-
title?: string;
|
|
416
|
-
subTitle?: string;
|
|
417
|
-
successPageDuration?: number | undefined;
|
|
418
|
-
}) => Promise<string>;
|
|
387
|
+
handleUpdateUserPhoneNumber: (params?: HandleUpdateUserPhoneNumberParams) => Promise<string>;
|
|
419
388
|
/**
|
|
420
389
|
* Handles the update user email flow.
|
|
421
390
|
*
|
|
@@ -432,17 +401,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
432
401
|
* @param params.subTitle - subtitle for the modal.
|
|
433
402
|
* @param params.successPageDuration - duration (in ms) for the success page after update (default: 0, no success page).
|
|
434
403
|
* @param params.stampWith - parameter to specify the stamper to use for the update (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
404
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
405
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
435
406
|
*
|
|
436
407
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
437
408
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error updating the email.
|
|
438
409
|
*/
|
|
439
|
-
handleUpdateUserName: (params?:
|
|
440
|
-
userName?: string;
|
|
441
|
-
title?: string;
|
|
442
|
-
subTitle?: string;
|
|
443
|
-
successPageDuration?: number | undefined;
|
|
444
|
-
stampWith?: StamperType | undefined;
|
|
445
|
-
}) => Promise<string>;
|
|
410
|
+
handleUpdateUserName: (params?: HandleUpdateUserNameParams) => Promise<string>;
|
|
446
411
|
/**
|
|
447
412
|
* Handles the add user email flow.
|
|
448
413
|
*
|
|
@@ -458,16 +423,14 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
458
423
|
* @param params.title - title for the modal (defaults to "Connect an email" if the user does not have an email).
|
|
459
424
|
* @param params.subTitle - subtitle for the modal.
|
|
460
425
|
* @param params.successPageDuration - duration (in ms) for the success page after update (default: 0, no success page).
|
|
426
|
+
* @param params.stampWith - parameter to specify the stamper to use for the update (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
427
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
428
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
461
429
|
*
|
|
462
430
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
463
431
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error adding the email.
|
|
464
432
|
*/
|
|
465
|
-
handleAddEmail: (params?:
|
|
466
|
-
email?: string;
|
|
467
|
-
title?: string;
|
|
468
|
-
subTitle?: string;
|
|
469
|
-
successPageDuration?: number | undefined;
|
|
470
|
-
}) => Promise<string>;
|
|
433
|
+
handleAddEmail: (params?: HandleAddEmailParams) => Promise<string>;
|
|
471
434
|
/**
|
|
472
435
|
* Handles the add phone number flow.
|
|
473
436
|
*
|
|
@@ -484,17 +447,14 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
484
447
|
* @param params.title - title for the modal.
|
|
485
448
|
* @param params.subTitle - subtitle for the modal.
|
|
486
449
|
* @param params.successPageDuration - duration (in ms) for the success page after update (default: 0, no success page).
|
|
450
|
+
* @param params.stampWith - parameter to specify the stamper to use for the update (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
451
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
452
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
487
453
|
*
|
|
488
454
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
489
455
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error adding the phone number.
|
|
490
456
|
*/
|
|
491
|
-
handleAddPhoneNumber: (params?:
|
|
492
|
-
phoneNumber?: string;
|
|
493
|
-
formattedPhone?: string;
|
|
494
|
-
title?: string;
|
|
495
|
-
subTitle?: string;
|
|
496
|
-
successPageDuration?: number | undefined;
|
|
497
|
-
}) => Promise<string>;
|
|
457
|
+
handleAddPhoneNumber: (params?: HandleAddPhoneNumberParams) => Promise<string>;
|
|
498
458
|
/**
|
|
499
459
|
* Handles the addition of an OAuth provider for the user.
|
|
500
460
|
*
|
|
@@ -508,14 +468,14 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
508
468
|
*
|
|
509
469
|
* @param params.providerName - The name of the OAuth provider to add (OAuthProviders.GOOGLE, OAuthProviders.APPLE, OAuthProviders.FACEBOOK).
|
|
510
470
|
* @param params.stampWith - parameter to specify the stamper to use for the addition (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
471
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
472
|
+
* @param params.successPageDuration - duration (in ms) for the success page after addition (default: 0, no success page).
|
|
473
|
+
* @param params.userId - user ID to target (defaults to the session's user ID).
|
|
511
474
|
*
|
|
512
475
|
* @returns A void promise.
|
|
513
476
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error adding the provider.
|
|
514
477
|
*/
|
|
515
|
-
handleAddOauthProvider: (params:
|
|
516
|
-
providerName: OAuthProviders;
|
|
517
|
-
stampWith?: StamperType | undefined;
|
|
518
|
-
}) => Promise<void>;
|
|
478
|
+
handleAddOauthProvider: (params: HandleAddOauthProviderParams) => Promise<void>;
|
|
519
479
|
/**
|
|
520
480
|
* Handles the removal of an OAuth provider.
|
|
521
481
|
*
|
|
@@ -532,17 +492,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
532
492
|
* @param params.subTitle - subtitle for the modal.
|
|
533
493
|
* @param params.successPageDuration - duration (in ms) for the success page after removal (default: 0, no success page).
|
|
534
494
|
* @param params.stampWith - parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
495
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
535
496
|
*
|
|
536
497
|
* @returns A promise that resolves to an array of provider IDs that were removed.
|
|
537
498
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error removing the provider.
|
|
538
499
|
*/
|
|
539
|
-
handleRemoveOauthProvider: (params:
|
|
540
|
-
providerId: string;
|
|
541
|
-
title?: string;
|
|
542
|
-
subTitle?: string;
|
|
543
|
-
successPageDuration?: number | undefined;
|
|
544
|
-
stampWith?: StamperType | undefined;
|
|
545
|
-
}) => Promise<string[]>;
|
|
500
|
+
handleRemoveOauthProvider: (params: HandleRemoveOauthProviderParams) => Promise<string[]>;
|
|
546
501
|
/**
|
|
547
502
|
* Handles the addition of a passkey (authenticator) for the user.
|
|
548
503
|
*
|
|
@@ -559,17 +514,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
559
514
|
* @param params.userId - user ID to add the passkey for a specific user (defaults to current session's userId).
|
|
560
515
|
* @param params.successPageDuration - duration (in ms) for the success page after addition (default: 0, no success page).
|
|
561
516
|
* @param params.stampWith - parameter to stamp the request with a specific stamper (`StamperType.Passkey`, `StamperType.ApiKey`, or `StamperType.Wallet`).
|
|
517
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
562
518
|
*
|
|
563
519
|
* @returns A promise that resolves to the user's updated passkeys.
|
|
564
520
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error adding the passkey.
|
|
565
521
|
*/
|
|
566
|
-
handleAddPasskey: (params?:
|
|
567
|
-
name?: string;
|
|
568
|
-
displayName?: string;
|
|
569
|
-
userId?: string;
|
|
570
|
-
successPageDuration?: number | undefined;
|
|
571
|
-
stampWith?: StamperType | undefined;
|
|
572
|
-
}) => Promise<string[]>;
|
|
522
|
+
handleAddPasskey: (params?: HandleAddPasskeyParams) => Promise<string[]>;
|
|
573
523
|
/**
|
|
574
524
|
* Handles the removal of a passkey (authenticator) for the user.
|
|
575
525
|
*
|
|
@@ -586,18 +536,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
586
536
|
* @param params.subTitle - subtitle for the modal.
|
|
587
537
|
* @param params.successPageDuration - duration (in ms) for the success page after removal (default: 0, no success page).
|
|
588
538
|
* @param params.stampWith - parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
539
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
589
540
|
*
|
|
590
541
|
* @returns A promise that resolves to an array of authenticator IDs that were removed.
|
|
591
542
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error removing the passkey.
|
|
592
543
|
*/
|
|
593
|
-
handleRemovePasskey: (params:
|
|
594
|
-
authenticatorId: string;
|
|
595
|
-
userId?: string;
|
|
596
|
-
title?: string;
|
|
597
|
-
subTitle?: string;
|
|
598
|
-
successPageDuration?: number | undefined;
|
|
599
|
-
stampWith?: StamperType | undefined;
|
|
600
|
-
}) => Promise<string[]>;
|
|
544
|
+
handleRemovePasskey: (params: HandleRemovePasskeyParams) => Promise<string[]>;
|
|
601
545
|
/**
|
|
602
546
|
* Handles the signing of a message by displaying a modal for user interaction.
|
|
603
547
|
*
|
|
@@ -615,19 +559,11 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
615
559
|
* @param params.subText - subtext to display in the modal.
|
|
616
560
|
* @param params.successPageDuration - duration in seconds to display the success page after signing.
|
|
617
561
|
* @param params.stampWith - parameter to stamp the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
562
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
618
563
|
* @returns A promise that resolves to a `v1SignRawPayloadResult` object containing the signed message.
|
|
619
564
|
* @throws {TurnkeyError} If the client is not initialized or if there is an error during the signing process.
|
|
620
565
|
*/
|
|
621
|
-
handleSignMessage: (params:
|
|
622
|
-
message: string;
|
|
623
|
-
walletAccount: WalletAccount;
|
|
624
|
-
encoding?: v1PayloadEncoding;
|
|
625
|
-
hashFunction?: v1HashFunction;
|
|
626
|
-
addEthereumPrefix?: boolean;
|
|
627
|
-
subText?: string;
|
|
628
|
-
successPageDuration?: number | undefined;
|
|
629
|
-
stampWith?: StamperType | undefined;
|
|
630
|
-
}) => Promise<v1SignRawPayloadResult>;
|
|
566
|
+
handleSignMessage: (params: HandleSignMessageParams) => Promise<v1SignRawPayloadResult>;
|
|
631
567
|
/**
|
|
632
568
|
* Handles the connecting of an external wallet account to the user's Turnkey account.
|
|
633
569
|
*
|
|
@@ -643,9 +579,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
643
579
|
* @returns A void promise.
|
|
644
580
|
* @throws {TurnkeyError} If the client is not initialized or if no active session is found.
|
|
645
581
|
*/
|
|
646
|
-
handleConnectExternalWallet: (params?:
|
|
647
|
-
successPageDuration?: number | undefined;
|
|
648
|
-
}) => Promise<void>;
|
|
582
|
+
handleConnectExternalWallet: (params?: HandleConnectExternalWalletParams) => Promise<void>;
|
|
649
583
|
/**
|
|
650
584
|
* Handles the removal of a user's email address from their Turnkey account.
|
|
651
585
|
*
|
|
@@ -654,12 +588,9 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
654
588
|
* @param params.userId - The user ID to remove the email for (defaults to current session's userId).
|
|
655
589
|
* @param params.successPageDuration - duration (in ms) for the success page after removal (default: 0, no success page).
|
|
656
590
|
* @param params.stampWith - parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
591
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
657
592
|
*/
|
|
658
|
-
handleRemoveUserEmail: (params?:
|
|
659
|
-
userId?: string;
|
|
660
|
-
successPageDuration?: number | undefined;
|
|
661
|
-
stampWith?: StamperType | undefined;
|
|
662
|
-
}) => Promise<string>;
|
|
593
|
+
handleRemoveUserEmail: (params?: HandleRemoveUserEmailParams) => Promise<string>;
|
|
663
594
|
/**
|
|
664
595
|
* Handles the removal of a user's phone number from their Turnkey account.
|
|
665
596
|
*
|
|
@@ -668,13 +599,11 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
668
599
|
* @param params.userId - The user ID to remove the phone number for (defaults to current session's userId).
|
|
669
600
|
* @param params.successPageDuration - duration (in ms) for the success page after removal (default: 0, no success page).
|
|
670
601
|
* @param params.stampWith - parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
602
|
+
* @param params.organizationId - organization ID to target (defaults to the session's organization ID or the parent organization ID).
|
|
671
603
|
*/
|
|
672
|
-
handleRemoveUserPhoneNumber: (params?:
|
|
673
|
-
|
|
674
|
-
successPageDuration?: number | undefined;
|
|
675
|
-
stampWith?: StamperType | undefined;
|
|
676
|
-
}) => Promise<string>;
|
|
677
|
-
}
|
|
604
|
+
handleRemoveUserPhoneNumber: (params?: HandleRemoveUserPhoneNumberParams) => Promise<string>;
|
|
605
|
+
}>;
|
|
678
606
|
/** @internal */
|
|
679
607
|
export declare const ClientContext: import("react").Context<ClientContextType | undefined>;
|
|
608
|
+
export {};
|
|
680
609
|
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../src/providers/client/Types.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../src/providers/client/Types.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,OAAO,EACP,sBAAsB,EACtB,MAAM,EACP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACT,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,iCAAiC,EACjC,wBAAwB,EACxB,4BAA4B,EAC5B,+BAA+B,EAC/B,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,wBAAwB,EACxB,iBAAiB,EACjB,+BAA+B,EAC/B,yBAAyB,EACzB,2BAA2B,EAC3B,iCAAiC,EACjC,uBAAuB,EACvB,2BAA2B,EAC3B,0BA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;;;;;;;;;;;;OAoBG;IACH,iBAAiB,EAAE,CACjB,MAAM,EAAE,uBAAuB,KAC5B,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAErC;;;;;;;;;;;;;;OAcG;IACH,2BAA2B,EAAE,CAC3B,MAAM,CAAC,EAAE,iCAAiC,KACvC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnB;;;;;;;;;OASG;IACH,qBAAqB,EAAE,CACrB,MAAM,CAAC,EAAE,2BAA2B,KACjC,OAAO,CAAC,MAAM,CAAC,CAAC;IAErB;;;;;;;;;OASG;IACH,2BAA2B,EAAE,CAC3B,MAAM,CAAC,EAAE,iCAAiC,KACvC,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB,CACF,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,aAAa,wDAEzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Types.js","sources":["../../../src/providers/client/Types.tsx"],"sourcesContent":[null],"names":["ClientContext","createContext","undefined"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Types.js","sources":["../../../src/providers/client/Types.tsx"],"sourcesContent":[null],"names":["ClientContext","createContext","undefined"],"mappings":";;;;;AAqsBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;MACaA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAGC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,CACxCC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAS,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Types.mjs","sources":["../../../src/providers/client/Types.tsx"],"sourcesContent":[null],"names":["ClientContext","createContext","undefined"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Types.mjs","sources":["../../../src/providers/client/Types.tsx"],"sourcesContent":[null],"names":["ClientContext","createContext","undefined"],"mappings":";;;AAqsBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACaA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAGC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,CACxCC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAS,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hook.js","sources":["../../../src/providers/modal/Hook.tsx"],"sourcesContent":[null],"names":["useModal","context","useContext","ModalContext","Error"],"mappings":";;;;;;AAKA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"Hook.js","sources":["../../../src/providers/modal/Hook.tsx"],"sourcesContent":[null],"names":["useModal","context","useContext","ModalContext","Error"],"mappings":";;;;;;AAKA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,GAAGA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAuB;AAC7C,CAAA,CAAA,MAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAGC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAU,CAACC,qBAAY,CAAC;EACxC,CAAA,CAAA,CAAA,CAAI,CAACF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAE,MAAM,CAAA,CAAA,CAAA,CAAIG,CAAAA,CAAAA,CAAAA,CAAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4C,CAAC;AAC3E,CAAA,CAAA,OAAOH,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO;AAChB,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hook.mjs","sources":["../../../src/providers/modal/Hook.tsx"],"sourcesContent":[null],"names":["useModal","context","useContext","ModalContext","Error"],"mappings":";;;;AAKA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACaA,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"Hook.mjs","sources":["../../../src/providers/modal/Hook.tsx"],"sourcesContent":[null],"names":["useModal","context","useContext","ModalContext","Error"],"mappings":";;;;AAKA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACaA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAXA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQA,CAAAA,CAAAA,CAA0B;AAC7C,CAAA,CAAA,IAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAA,CAAGC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAU,CAACC,YAAY,CAAC;EACxC,CAAA,CAAA,CAAA,CAAI,CAACF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAE,MAAM,CAAA,CAAA,CAAA,CAAIG,CAAAA,CAAAA,CAAAA,CAAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4C,CAAC;AAC3E,CAAA,CAAA,OAAOH,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO;AAChB,CAAA;;"}
|
|
@@ -7,10 +7,13 @@ export type ModalPage = {
|
|
|
7
7
|
};
|
|
8
8
|
export type ModalContextType = {
|
|
9
9
|
openModal: (page: ModalPage) => void;
|
|
10
|
+
openSheet: (page: ModalPage) => void;
|
|
10
11
|
pushPage: (page: ModalPage) => void;
|
|
11
12
|
popPage: () => void;
|
|
12
13
|
closeModal: () => void;
|
|
14
|
+
closeSheet: () => void;
|
|
13
15
|
modalStack: ModalPage[];
|
|
16
|
+
sheet: ModalPage | null;
|
|
14
17
|
isMobile: boolean;
|
|
15
18
|
screenWidth: number;
|
|
16
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/providers/modal/Provider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3D,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACpC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,I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