@turnkey/react-wallet-kit 1.0.0-beta.4 → 1.0.0-beta.6
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 +49 -1
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +1 -1
- package/dist/components/auth/OTP.d.ts +1 -0
- package/dist/components/auth/OTP.d.ts.map +1 -1
- package/dist/components/auth/OTP.js +5 -1
- package/dist/components/auth/OTP.js.map +1 -1
- package/dist/components/auth/OTP.mjs +6 -3
- package/dist/components/auth/OTP.mjs.map +1 -1
- package/dist/components/auth/Wallet.d.ts +4 -4
- package/dist/components/auth/Wallet.d.ts.map +1 -1
- package/dist/components/auth/Wallet.js +70 -49
- package/dist/components/auth/Wallet.js.map +1 -1
- package/dist/components/auth/Wallet.mjs +74 -54
- package/dist/components/auth/Wallet.mjs.map +1 -1
- package/dist/components/auth/index.d.ts +5 -1
- package/dist/components/auth/index.d.ts.map +1 -1
- package/dist/components/auth/index.js +98 -12
- package/dist/components/auth/index.js.map +1 -1
- package/dist/components/auth/index.mjs +185 -82
- package/dist/components/auth/index.mjs.map +1 -1
- package/dist/components/export/Export.d.ts +2 -1
- package/dist/components/export/Export.d.ts.map +1 -1
- package/dist/components/export/Export.js +7 -6
- package/dist/components/export/Export.js.map +1 -1
- package/dist/components/export/Export.mjs +7 -6
- package/dist/components/export/Export.mjs.map +1 -1
- package/dist/components/export/ExportWarning.d.ts +2 -1
- package/dist/components/export/ExportWarning.d.ts.map +1 -1
- package/dist/components/export/ExportWarning.js +3 -2
- package/dist/components/export/ExportWarning.js.map +1 -1
- package/dist/components/export/ExportWarning.mjs +3 -2
- package/dist/components/export/ExportWarning.mjs.map +1 -1
- package/dist/components/import/Import.d.ts +7 -3
- package/dist/components/import/Import.d.ts.map +1 -1
- package/dist/components/import/Import.js +74 -37
- package/dist/components/import/Import.js.map +1 -1
- package/dist/components/import/Import.mjs +116 -54
- package/dist/components/import/Import.mjs.map +1 -1
- package/dist/components/user/ConnectWallet.d.ts +8 -0
- package/dist/components/user/ConnectWallet.d.ts.map +1 -0
- package/dist/components/user/{LinkWallet.js → ConnectWallet.js} +18 -18
- package/dist/components/user/ConnectWallet.js.map +1 -0
- package/dist/components/user/{LinkWallet.mjs → ConnectWallet.mjs} +25 -25
- package/dist/components/user/ConnectWallet.mjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/providers/TurnkeyProvider.d.ts +1 -0
- package/dist/providers/TurnkeyProvider.d.ts.map +1 -1
- package/dist/providers/TurnkeyProvider.js +1 -0
- package/dist/providers/TurnkeyProvider.js.map +1 -1
- package/dist/providers/TurnkeyProvider.mjs +1 -0
- package/dist/providers/TurnkeyProvider.mjs.map +1 -1
- package/dist/providers/client/Hook.d.ts +1 -0
- package/dist/providers/client/Hook.d.ts.map +1 -1
- package/dist/providers/client/Hook.js +1 -0
- package/dist/providers/client/Hook.js.map +1 -1
- package/dist/providers/client/Hook.mjs +1 -0
- package/dist/providers/client/Hook.mjs.map +1 -1
- package/dist/providers/client/Provider.d.ts +3 -3
- package/dist/providers/client/Provider.d.ts.map +1 -1
- package/dist/providers/client/Provider.js +1019 -388
- package/dist/providers/client/Provider.js.map +1 -1
- package/dist/providers/client/Provider.mjs +2901 -2162
- package/dist/providers/client/Provider.mjs.map +1 -1
- package/dist/providers/client/Types.d.ts +164 -50
- package/dist/providers/client/Types.d.ts.map +1 -1
- package/dist/providers/client/Types.js +1 -0
- package/dist/providers/client/Types.js.map +1 -1
- package/dist/providers/client/Types.mjs +1 -0
- package/dist/providers/client/Types.mjs.map +1 -1
- package/dist/providers/modal/Hook.d.ts +1 -0
- package/dist/providers/modal/Hook.d.ts.map +1 -1
- package/dist/providers/modal/Hook.js +1 -0
- package/dist/providers/modal/Hook.js.map +1 -1
- package/dist/providers/modal/Hook.mjs +1 -0
- package/dist/providers/modal/Hook.mjs.map +1 -1
- package/dist/providers/modal/Provider.js +1 -1
- package/dist/providers/modal/Provider.mjs +1 -1
- package/dist/providers/modal/Root.d.ts.map +1 -1
- package/dist/providers/modal/Root.js +18 -14
- package/dist/providers/modal/Root.js.map +1 -1
- package/dist/providers/modal/Root.mjs +19 -17
- package/dist/providers/modal/Root.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/base.d.ts +81 -2
- package/dist/types/base.d.ts.map +1 -1
- package/dist/types/base.js +35 -0
- package/dist/types/base.js.map +1 -1
- package/dist/types/base.mjs +31 -1
- package/dist/types/base.mjs.map +1 -1
- package/dist/utils/timers.d.ts +73 -0
- package/dist/utils/timers.d.ts.map +1 -0
- package/dist/utils/timers.js +133 -0
- package/dist/utils/timers.js.map +1 -0
- package/dist/utils/timers.mjs +142 -0
- package/dist/utils/timers.mjs.map +1 -0
- package/dist/{utils.d.ts → utils/utils.d.ts} +9 -3
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/{utils.js → utils/utils.js} +43 -5
- package/dist/utils/utils.js.map +1 -0
- package/dist/{utils.mjs → utils/utils.mjs} +48 -7
- package/dist/utils/utils.mjs.map +1 -0
- package/package.json +4 -4
- package/dist/components/user/LinkWallet.d.ts +0 -8
- package/dist/components/user/LinkWallet.d.ts.map +0 -1
- package/dist/components/user/LinkWallet.js.map +0 -1
- package/dist/components/user/LinkWallet.mjs.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
- package/dist/utils.mjs.map +0 -1
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { TurnkeySDKClientBase, TurnkeyClientMethods, Wallet, StamperType, WalletAccount } from "@turnkey/core";
|
|
3
|
-
import type { OAuthProviders, Session, v1AddressFormat, v1HashFunction, v1PayloadEncoding, v1SignRawPayloadResult, v1User, v1WalletAccountParams } from "@turnkey/sdk-types";
|
|
4
|
-
import type { TurnkeyProviderConfig, AuthState, ClientState } from "../../types/base";
|
|
3
|
+
import type { OAuthProviders, Session, v1AddressFormat, v1Curve, v1HashFunction, v1PayloadEncoding, v1SignRawPayloadResult, v1User, v1WalletAccountParams } from "@turnkey/sdk-types";
|
|
4
|
+
import type { TurnkeyProviderConfig, AuthState, ClientState, KeyFormat } from "../../types/base";
|
|
5
5
|
export interface ClientContextType extends TurnkeyClientMethods {
|
|
6
|
+
/** @internal */
|
|
6
7
|
httpClient: TurnkeySDKClientBase | undefined;
|
|
8
|
+
/** @internal */
|
|
7
9
|
session: Session | undefined;
|
|
10
|
+
/** @internal */
|
|
8
11
|
allSessions?: Record<string, Session> | undefined;
|
|
12
|
+
/** @internal */
|
|
9
13
|
clientState: ClientState | undefined;
|
|
14
|
+
/** @internal */
|
|
10
15
|
authState: AuthState;
|
|
16
|
+
/** @internal */
|
|
11
17
|
config?: TurnkeyProviderConfig | undefined;
|
|
18
|
+
/** @internal */
|
|
12
19
|
user: v1User | undefined;
|
|
20
|
+
/** @internal */
|
|
13
21
|
wallets: Wallet[];
|
|
14
22
|
/**
|
|
15
23
|
* Refreshes the user details.
|
|
@@ -25,9 +33,9 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
25
33
|
* @returns A promise that resolves when the user details are successfully refreshed and state is updated.
|
|
26
34
|
* @throws {TurnkeyError} If the client is not initialized or if there is an error refreshing the user details.
|
|
27
35
|
*/
|
|
28
|
-
refreshUser(params?: {
|
|
36
|
+
refreshUser: (params?: {
|
|
29
37
|
stampWith?: StamperType | undefined;
|
|
30
|
-
})
|
|
38
|
+
}) => Promise<void>;
|
|
31
39
|
/**
|
|
32
40
|
* Refreshes the wallets state for the current user session.
|
|
33
41
|
*
|
|
@@ -44,9 +52,9 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
44
52
|
* @returns A promise that resolves when the wallets are successfully refreshed and state is updated.
|
|
45
53
|
* @throws {TurnkeyError} If the client is not initialized or if there is an error refreshing the wallets.
|
|
46
54
|
*/
|
|
47
|
-
refreshWallets(params?: {
|
|
55
|
+
refreshWallets: (params?: {
|
|
48
56
|
stampWith?: StamperType | undefined;
|
|
49
|
-
})
|
|
57
|
+
}) => Promise<void>;
|
|
50
58
|
/**
|
|
51
59
|
* Handles the login or sign-up flow.
|
|
52
60
|
*
|
|
@@ -56,9 +64,85 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
56
64
|
* - After successful authentication, the provider state is updated and all relevant session, user, and wallet data are refreshed.
|
|
57
65
|
* - This function is typically used to trigger authentication from a UI button or navigation event.
|
|
58
66
|
*
|
|
67
|
+
* @param params.sessionKey - Optional session key to resume an existing session or pre-fill session details in the login modal.
|
|
68
|
+
*
|
|
59
69
|
* @returns A void promise.
|
|
60
70
|
*/
|
|
61
|
-
handleLogin
|
|
71
|
+
handleLogin: (params?: {
|
|
72
|
+
sessionKey?: string;
|
|
73
|
+
}) => Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Handles the Discord OAuth 2.0 flow.
|
|
76
|
+
*
|
|
77
|
+
* - This function initiates the OAuth 2.0 PKCE flow with Discord by redirecting the user to the Discord authorization page or opening it in a popup window.
|
|
78
|
+
* - It supports both "popup" and "redirect" flows, determined by the `openInPage` parameter.
|
|
79
|
+
* - Generates a new ephemeral API key pair and uses its public key as part of the state and a cryptographic nonce to bind the OAuth session.
|
|
80
|
+
* - Creates a PKCE verifier/challenge pair, storing the verifier in `sessionStorage` for later use in the token exchange.
|
|
81
|
+
* - Constructs the Discord OAuth URL with all required parameters, including client ID, redirect URI, response type, scope, PKCE code challenge, nonce, and state.
|
|
82
|
+
* - The `state` parameter encodes the provider name, flow type, ephemeral public key, and any additional key-value pairs provided in `additionalState`.
|
|
83
|
+
* - If `openInPage` is true, the current page is redirected to the OAuth URL and the function returns a promise that resolves on redirect or rejects after 5 minutes if no redirect occurs.
|
|
84
|
+
* - If `openInPage` is false, a popup window is opened for the OAuth flow, and the function returns a promise that resolves when the OAuth code is captured or rejects if the popup is closed or times out.
|
|
85
|
+
* - On receiving an authorization code, the function exchanges it for an OIDC token via the Turnkey proxy (`proxyOAuth2Authenticate`) using the PKCE verifier, redirect URI, and nonce.
|
|
86
|
+
* - On successful authentication, the function either calls the provided `onOauthSuccess` callback, triggers the `onOauthRedirect` callback from provider callbacks, or completes the OAuth flow internally by calling `completeOauth`.
|
|
87
|
+
* - Handles error cases such as missing configuration, popup failures, missing PKCE verifier, or Turnkey proxy failures, throwing a `TurnkeyError` with appropriate error codes.
|
|
88
|
+
*
|
|
89
|
+
* @param params.clientId - The Discord Client ID to use (defaults to the client ID from configuration).
|
|
90
|
+
* @param params.openInPage - Whether to open the OAuth flow in the current page (redirect) or a popup window (default: false).
|
|
91
|
+
* @param params.additionalState - Additional key-value pairs to include in the OAuth state parameter for tracking or custom logic.
|
|
92
|
+
* @param params.onOauthSuccess - Callback function to handle the successful OAuth response (receives `{ oidcToken, providerName }`).
|
|
93
|
+
*
|
|
94
|
+
* onOauthSuccess params:
|
|
95
|
+
* - oidcToken: The OIDC token issued by Turnkey after exchanging the auth code.
|
|
96
|
+
* - providerName: The name of the OAuth provider ("discord").
|
|
97
|
+
*
|
|
98
|
+
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
99
|
+
* @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
|
+
*/
|
|
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>;
|
|
110
|
+
/**
|
|
111
|
+
* Handles the Twitter (X) OAuth 2.0 flow.
|
|
112
|
+
*
|
|
113
|
+
* - This function initiates the OAuth 2.0 PKCE flow with Twitter (X) by redirecting the user to the X authorization page or opening it in a popup window.
|
|
114
|
+
* - It supports both "popup" and "redirect" flows, determined by the `openInPage` parameter.
|
|
115
|
+
* - Generates a new ephemeral API key pair and uses its public key as part of the state and a cryptographic nonce to bind the OAuth session.
|
|
116
|
+
* - Creates a PKCE verifier/challenge pair, storing the verifier in `sessionStorage` for later use in the token exchange.
|
|
117
|
+
* - Constructs the Twitter (X) OAuth URL with all required parameters, including client ID, redirect URI, response type, scope, PKCE code challenge, nonce, and state.
|
|
118
|
+
* - The `state` parameter encodes the provider name, flow type, ephemeral public key, and any additional key-value pairs provided in `additionalState`.
|
|
119
|
+
* - If `openInPage` is true, the current page is redirected to the OAuth URL and the function returns a promise that resolves on redirect or rejects after 5 minutes if no redirect occurs.
|
|
120
|
+
* - If `openInPage` is false, a popup window is opened for the OAuth flow, and the function returns a promise that resolves when the OAuth code is captured or rejects if the popup is closed or times out.
|
|
121
|
+
* - On receiving an authorization code, the function exchanges it for an OIDC token via the Turnkey proxy (`proxyOAuth2Authenticate`) using the PKCE verifier, redirect URI, and nonce.
|
|
122
|
+
* - On successful authentication, the function either calls the provided `onOauthSuccess` callback, triggers the `onOauthRedirect` callback from provider callbacks, or completes the OAuth flow internally by calling `completeOauth`.
|
|
123
|
+
* - Handles error cases such as missing configuration, popup failures, missing PKCE verifier, or Turnkey proxy failures, throwing a `TurnkeyError` with appropriate error codes.
|
|
124
|
+
*
|
|
125
|
+
* @param params.clientId - The Twitter (X) Client ID to use (defaults to the client ID from configuration).
|
|
126
|
+
* @param params.openInPage - Whether to open the OAuth flow in the current page (redirect) or a popup window (default: false).
|
|
127
|
+
* @param params.additionalState - Additional key-value pairs to include in the OAuth state parameter for tracking or custom logic.
|
|
128
|
+
* @param params.onOauthSuccess - Callback function to handle the successful OAuth response (receives `{ oidcToken, providerName }`).
|
|
129
|
+
*
|
|
130
|
+
* onOauthSuccess params:
|
|
131
|
+
* - oidcToken: The OIDC token issued by Turnkey after exchanging the auth code.
|
|
132
|
+
* - providerName: The name of the OAuth provider ("twitter").
|
|
133
|
+
*
|
|
134
|
+
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
135
|
+
* @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
|
+
*/
|
|
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>;
|
|
62
146
|
/**
|
|
63
147
|
* Handles the Google OAuth flow.
|
|
64
148
|
*
|
|
@@ -84,7 +168,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
84
168
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
85
169
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
86
170
|
*/
|
|
87
|
-
handleGoogleOauth(params?: {
|
|
171
|
+
handleGoogleOauth: (params?: {
|
|
88
172
|
clientId?: string;
|
|
89
173
|
additionalState?: Record<string, string>;
|
|
90
174
|
openInPage?: boolean;
|
|
@@ -92,7 +176,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
92
176
|
oidcToken: string;
|
|
93
177
|
providerName: string;
|
|
94
178
|
}) => any;
|
|
95
|
-
})
|
|
179
|
+
}) => Promise<void>;
|
|
96
180
|
/**
|
|
97
181
|
* Handles the Apple OAuth flow.
|
|
98
182
|
*
|
|
@@ -118,7 +202,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
118
202
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
119
203
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
120
204
|
*/
|
|
121
|
-
handleAppleOauth(params?: {
|
|
205
|
+
handleAppleOauth: (params?: {
|
|
122
206
|
clientId?: string;
|
|
123
207
|
additionalState?: Record<string, string>;
|
|
124
208
|
openInPage?: boolean;
|
|
@@ -126,7 +210,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
126
210
|
oidcToken: string;
|
|
127
211
|
providerName: string;
|
|
128
212
|
}) => any;
|
|
129
|
-
})
|
|
213
|
+
}) => Promise<void>;
|
|
130
214
|
/**
|
|
131
215
|
* Handles the Facebook OAuth flow.
|
|
132
216
|
*
|
|
@@ -153,7 +237,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
153
237
|
* @returns A promise that resolves when the OAuth flow is successfully initiated and completed, or rejects on error or timeout.
|
|
154
238
|
* @throws {TurnkeyError} If the configuration is not ready, required parameters are missing, or if there is an error initiating or completing the OAuth flow.
|
|
155
239
|
*/
|
|
156
|
-
handleFacebookOauth(params?: {
|
|
240
|
+
handleFacebookOauth: (params?: {
|
|
157
241
|
clientId?: string;
|
|
158
242
|
additionalState?: Record<string, string>;
|
|
159
243
|
openInPage?: boolean;
|
|
@@ -161,7 +245,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
161
245
|
oidcToken: string;
|
|
162
246
|
providerName: string;
|
|
163
247
|
}) => any;
|
|
164
|
-
})
|
|
248
|
+
}) => Promise<void>;
|
|
165
249
|
/**
|
|
166
250
|
* Handles the export wallet flow.
|
|
167
251
|
*
|
|
@@ -180,11 +264,11 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
180
264
|
*
|
|
181
265
|
* @returns A void promise.
|
|
182
266
|
*/
|
|
183
|
-
handleExportWallet(params: {
|
|
267
|
+
handleExportWallet: (params: {
|
|
184
268
|
walletId: string;
|
|
185
269
|
targetPublicKey?: string;
|
|
186
270
|
stampWith?: StamperType | undefined;
|
|
187
|
-
})
|
|
271
|
+
}) => Promise<void>;
|
|
188
272
|
/**
|
|
189
273
|
* handles the export private key flow.
|
|
190
274
|
*
|
|
@@ -194,19 +278,22 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
194
278
|
* - A request is made to the Turnkey API to export the private key, encrypted to the target public key.
|
|
195
279
|
* - The resulting export bundle is injected into the iframe, where it is decrypted and displayed to the user.
|
|
196
280
|
* - If a custom iframe URL is used, a target public key can be provided explicitly.
|
|
281
|
+
* - Hexadecimal and Solana address formats are supported for wallet account exports - defaulting to Hexadecimal if not specified.
|
|
197
282
|
* - Optionally allows specifying the stamper to use for the export (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
|
|
198
283
|
* - The modal-driven UI ensures the user is guided through the export process and can securely retrieve their exported material.
|
|
199
284
|
*
|
|
200
285
|
* @param params.privateKeyId - The ID of the private key to export.
|
|
201
286
|
* @param params.targetPublicKey - The target public key to encrypt the export bundle to (required for custom iframe flows).
|
|
287
|
+
* @param params.keyFormat - The format of the private key to export (KeyFormat.Hexadecimal or KeyFormat.Solana).
|
|
202
288
|
* @param params.stampWith - The stamper to use for the export (Passkey, ApiKey, or Wallet).
|
|
203
289
|
* @return A void promise.
|
|
204
290
|
*/
|
|
205
|
-
handleExportPrivateKey(params: {
|
|
291
|
+
handleExportPrivateKey: (params: {
|
|
206
292
|
privateKeyId: string;
|
|
207
293
|
targetPublicKey?: string;
|
|
294
|
+
keyFormat?: KeyFormat;
|
|
208
295
|
stampWith?: StamperType | undefined;
|
|
209
|
-
})
|
|
296
|
+
}) => Promise<void>;
|
|
210
297
|
/**
|
|
211
298
|
* Handles the export wallet account flow.
|
|
212
299
|
*
|
|
@@ -216,22 +303,25 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
216
303
|
* - A request is made to the Turnkey API to export the wallet account, encrypted to the target public key.
|
|
217
304
|
* - The resulting export bundle is injected into the iframe, where it is decrypted and displayed to the user.
|
|
218
305
|
* - If a custom iframe URL is used, a target public key can be provided explicitly.
|
|
306
|
+
* - Hexadecimal and Solana address formats are supported for wallet account exports - defaulting to Hexadecimal if not specified.
|
|
219
307
|
* - Optionally allows specifying the stamper to use for the export (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
|
|
220
308
|
* - The modal-driven UI ensures the user is guided through the export process and can securely retrieve their exported material.
|
|
221
309
|
*
|
|
222
310
|
* @param params.address - The address of the wallet account to export.
|
|
223
311
|
* @param params.targetPublicKey - The target public key to encrypt the export bundle to (required for custom iframe flows).
|
|
312
|
+
* @param params.keyFormat - The format of the address to export (KeyFormat.Hexadecimal or KeyFormat.Solana).
|
|
224
313
|
* @param params.stampWith - The stamper to use for the export (Passkey, ApiKey, or Wallet).
|
|
225
314
|
*
|
|
226
315
|
* @returns A void promise.
|
|
227
316
|
*/
|
|
228
|
-
handleExportWalletAccount(params: {
|
|
317
|
+
handleExportWalletAccount: (params: {
|
|
229
318
|
address: string;
|
|
230
319
|
targetPublicKey?: string;
|
|
320
|
+
keyFormat?: KeyFormat;
|
|
231
321
|
stampWith?: StamperType | undefined;
|
|
232
|
-
})
|
|
322
|
+
}) => Promise<void>;
|
|
233
323
|
/**
|
|
234
|
-
* Handles the import flow.
|
|
324
|
+
* Handles the import wallet flow.
|
|
235
325
|
*
|
|
236
326
|
* - This function opens a modal with the ImportComponent for importing a wallet.
|
|
237
327
|
* - Supports importing wallets using an encrypted bundle, with optional default accounts or custom account parameters.
|
|
@@ -246,11 +336,34 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
246
336
|
*
|
|
247
337
|
* @returns A promise that resolves to the new wallet's ID.
|
|
248
338
|
*/
|
|
249
|
-
handleImportWallet(params?: {
|
|
339
|
+
handleImportWallet: (params?: {
|
|
250
340
|
defaultWalletAccounts?: v1AddressFormat[] | v1WalletAccountParams[];
|
|
251
341
|
successPageDuration?: number | undefined;
|
|
252
342
|
stampWith?: StamperType | undefined;
|
|
253
|
-
})
|
|
343
|
+
}) => Promise<string>;
|
|
344
|
+
/**
|
|
345
|
+
* Handles the import private key flow.
|
|
346
|
+
*
|
|
347
|
+
* - This function opens a modal with the ImportComponent for importing a private key.
|
|
348
|
+
* - Supports importing private keys using an encrypted bundle.
|
|
349
|
+
* - Address formats (v1AddressFormat[]) and curve (v1Curve) must be specified based on the type of private key the user will import.
|
|
350
|
+
* - Supports customizing the duration of the success page shown after a successful import.
|
|
351
|
+
* - Allows specifying the stamper to use for the import (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
|
|
352
|
+
* - Ensures the imported private key is added to the user's wallet list and the provider state is refreshed.
|
|
353
|
+
*
|
|
354
|
+
* @param params.curve - curve type (v1Curve) for the private key (Eg: "CURVE_SECP256K1" for Ethereum, "CURVE_ED25519" for Solana).
|
|
355
|
+
* @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
|
+
* @param params.successPageDuration - duration (in ms) for the success page after import (default: 0, no success page).
|
|
357
|
+
* @param params.stampWith - parameter to specify the stamper to use for the import (Passkey, ApiKey, or Wallet).
|
|
358
|
+
*
|
|
359
|
+
* @returns A promise that resolves to the new private key's ID.
|
|
360
|
+
*/
|
|
361
|
+
handleImportPrivateKey: (params?: {
|
|
362
|
+
curve: v1Curve;
|
|
363
|
+
addressFormats: v1AddressFormat[];
|
|
364
|
+
successPageDuration?: number | undefined;
|
|
365
|
+
stampWith?: StamperType | undefined;
|
|
366
|
+
}) => Promise<string>;
|
|
254
367
|
/**
|
|
255
368
|
* Handles the update user name flow.
|
|
256
369
|
*
|
|
@@ -270,12 +383,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
270
383
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
271
384
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error updating the user name.
|
|
272
385
|
*/
|
|
273
|
-
handleUpdateUserEmail(params?: {
|
|
386
|
+
handleUpdateUserEmail: (params?: {
|
|
274
387
|
email?: string;
|
|
275
388
|
title?: string;
|
|
276
389
|
subTitle?: string;
|
|
277
390
|
successPageDuration?: number | undefined;
|
|
278
|
-
})
|
|
391
|
+
}) => Promise<string>;
|
|
279
392
|
/**
|
|
280
393
|
* Handles the update user phone number flow.
|
|
281
394
|
*
|
|
@@ -296,13 +409,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
296
409
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
297
410
|
* @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.
|
|
298
411
|
*/
|
|
299
|
-
handleUpdateUserPhoneNumber(params?: {
|
|
412
|
+
handleUpdateUserPhoneNumber: (params?: {
|
|
300
413
|
phoneNumber?: string;
|
|
301
414
|
formattedPhone?: string;
|
|
302
415
|
title?: string;
|
|
303
416
|
subTitle?: string;
|
|
304
417
|
successPageDuration?: number | undefined;
|
|
305
|
-
})
|
|
418
|
+
}) => Promise<string>;
|
|
306
419
|
/**
|
|
307
420
|
* Handles the update user email flow.
|
|
308
421
|
*
|
|
@@ -375,13 +488,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
375
488
|
* @returns A promise that resolves to the userId of the user that was changed.
|
|
376
489
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error adding the phone number.
|
|
377
490
|
*/
|
|
378
|
-
handleAddPhoneNumber(params?: {
|
|
491
|
+
handleAddPhoneNumber: (params?: {
|
|
379
492
|
phoneNumber?: string;
|
|
380
493
|
formattedPhone?: string;
|
|
381
494
|
title?: string;
|
|
382
495
|
subTitle?: string;
|
|
383
496
|
successPageDuration?: number | undefined;
|
|
384
|
-
})
|
|
497
|
+
}) => Promise<string>;
|
|
385
498
|
/**
|
|
386
499
|
* Handles the addition of an OAuth provider for the user.
|
|
387
500
|
*
|
|
@@ -399,10 +512,10 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
399
512
|
* @returns A void promise.
|
|
400
513
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error adding the provider.
|
|
401
514
|
*/
|
|
402
|
-
handleAddOauthProvider(params: {
|
|
515
|
+
handleAddOauthProvider: (params: {
|
|
403
516
|
providerName: OAuthProviders;
|
|
404
517
|
stampWith?: StamperType | undefined;
|
|
405
|
-
})
|
|
518
|
+
}) => Promise<void>;
|
|
406
519
|
/**
|
|
407
520
|
* Handles the removal of an OAuth provider.
|
|
408
521
|
*
|
|
@@ -423,13 +536,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
423
536
|
* @returns A promise that resolves to an array of provider IDs that were removed.
|
|
424
537
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error removing the provider.
|
|
425
538
|
*/
|
|
426
|
-
handleRemoveOauthProvider(params: {
|
|
539
|
+
handleRemoveOauthProvider: (params: {
|
|
427
540
|
providerId: string;
|
|
428
541
|
title?: string;
|
|
429
542
|
subTitle?: string;
|
|
430
543
|
successPageDuration?: number | undefined;
|
|
431
544
|
stampWith?: StamperType | undefined;
|
|
432
|
-
})
|
|
545
|
+
}) => Promise<string[]>;
|
|
433
546
|
/**
|
|
434
547
|
* Handles the addition of a passkey (authenticator) for the user.
|
|
435
548
|
*
|
|
@@ -450,13 +563,13 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
450
563
|
* @returns A promise that resolves to the user's updated passkeys.
|
|
451
564
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error adding the passkey.
|
|
452
565
|
*/
|
|
453
|
-
handleAddPasskey(params?: {
|
|
566
|
+
handleAddPasskey: (params?: {
|
|
454
567
|
name?: string;
|
|
455
568
|
displayName?: string;
|
|
456
569
|
userId?: string;
|
|
457
570
|
successPageDuration?: number | undefined;
|
|
458
571
|
stampWith?: StamperType | undefined;
|
|
459
|
-
})
|
|
572
|
+
}) => Promise<string[]>;
|
|
460
573
|
/**
|
|
461
574
|
* Handles the removal of a passkey (authenticator) for the user.
|
|
462
575
|
*
|
|
@@ -477,19 +590,19 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
477
590
|
* @returns A promise that resolves to an array of authenticator IDs that were removed.
|
|
478
591
|
* @throws {TurnkeyError} If the client is not initialized, no active session is found, or if there is an error removing the passkey.
|
|
479
592
|
*/
|
|
480
|
-
handleRemovePasskey(params: {
|
|
593
|
+
handleRemovePasskey: (params: {
|
|
481
594
|
authenticatorId: string;
|
|
482
595
|
userId?: string;
|
|
483
596
|
title?: string;
|
|
484
597
|
subTitle?: string;
|
|
485
598
|
successPageDuration?: number | undefined;
|
|
486
599
|
stampWith?: StamperType | undefined;
|
|
487
|
-
})
|
|
600
|
+
}) => Promise<string[]>;
|
|
488
601
|
/**
|
|
489
602
|
* Handles the signing of a message by displaying a modal for user interaction.
|
|
490
603
|
*
|
|
491
604
|
* - This function opens a modal with the SignMessageModal component, prompting the user to review and approve the message signing request.
|
|
492
|
-
* - Supports signing with any wallet account managed by Turnkey, including externally
|
|
605
|
+
* - Supports signing with any wallet account managed by Turnkey, including externally connected wallets.
|
|
493
606
|
* - Allows for optional overrides of the encoding and hash function used for the payload, enabling advanced use cases or compatibility with specific blockchains.
|
|
494
607
|
* - Optionally displays a subtext in the modal for additional context or instructions to the user.
|
|
495
608
|
* - Returns a promise that resolves to a `v1SignRawPayloadResult` object containing the signed message, signature, and metadata.
|
|
@@ -505,7 +618,7 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
505
618
|
* @returns A promise that resolves to a `v1SignRawPayloadResult` object containing the signed message.
|
|
506
619
|
* @throws {TurnkeyError} If the client is not initialized or if there is an error during the signing process.
|
|
507
620
|
*/
|
|
508
|
-
handleSignMessage(params: {
|
|
621
|
+
handleSignMessage: (params: {
|
|
509
622
|
message: string;
|
|
510
623
|
walletAccount: WalletAccount;
|
|
511
624
|
encoding?: v1PayloadEncoding;
|
|
@@ -514,25 +627,25 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
514
627
|
subText?: string;
|
|
515
628
|
successPageDuration?: number | undefined;
|
|
516
629
|
stampWith?: StamperType | undefined;
|
|
517
|
-
})
|
|
630
|
+
}) => Promise<v1SignRawPayloadResult>;
|
|
518
631
|
/**
|
|
519
|
-
* Handles the
|
|
632
|
+
* Handles the connecting of an external wallet account to the user's Turnkey account.
|
|
520
633
|
*
|
|
521
|
-
* - This function opens a modal with the
|
|
634
|
+
* - This function opens a modal with the ConnectWalletModal component, allowing the user to select and connect an external wallet provider (such as MetaMask, Phantom, etc.).
|
|
522
635
|
* - It fetches the list of available wallet providers (for all supported chains) and passes them to the modal for user selection.
|
|
523
|
-
* - After a successful wallet connection, the provider state is refreshed to include the newly
|
|
524
|
-
* - Optionally, a success page is shown for the specified duration after
|
|
636
|
+
* - After a successful wallet connection, the provider state is refreshed to include the newly connected wallet account.
|
|
637
|
+
* - Optionally, a success page is shown for the specified duration after connecting (default: 2000ms).
|
|
525
638
|
* - Supports both Ethereum and Solana wallet providers, and can be extended to additional chains as supported by Turnkey.
|
|
526
639
|
* - Handles all error cases and throws a TurnkeyError with appropriate error codes if the client is not initialized or no active session is found.
|
|
527
640
|
*
|
|
528
|
-
* @param params.successPageDuration - duration (in ms) for the success page after
|
|
641
|
+
* @param params.successPageDuration - duration (in ms) for the success page after connecting (default: 2000ms).
|
|
529
642
|
*
|
|
530
643
|
* @returns A void promise.
|
|
531
644
|
* @throws {TurnkeyError} If the client is not initialized or if no active session is found.
|
|
532
645
|
*/
|
|
533
|
-
|
|
646
|
+
handleConnectExternalWallet: (params?: {
|
|
534
647
|
successPageDuration?: number | undefined;
|
|
535
|
-
})
|
|
648
|
+
}) => Promise<void>;
|
|
536
649
|
/**
|
|
537
650
|
* Handles the removal of a user's email address from their Turnkey account.
|
|
538
651
|
*
|
|
@@ -542,11 +655,11 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
542
655
|
* @param params.successPageDuration - duration (in ms) for the success page after removal (default: 0, no success page).
|
|
543
656
|
* @param params.stampWith - parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
544
657
|
*/
|
|
545
|
-
handleRemoveUserEmail(params?: {
|
|
658
|
+
handleRemoveUserEmail: (params?: {
|
|
546
659
|
userId?: string;
|
|
547
660
|
successPageDuration?: number | undefined;
|
|
548
661
|
stampWith?: StamperType | undefined;
|
|
549
|
-
})
|
|
662
|
+
}) => Promise<string>;
|
|
550
663
|
/**
|
|
551
664
|
* Handles the removal of a user's phone number from their Turnkey account.
|
|
552
665
|
*
|
|
@@ -556,11 +669,12 @@ export interface ClientContextType extends TurnkeyClientMethods {
|
|
|
556
669
|
* @param params.successPageDuration - duration (in ms) for the success page after removal (default: 0, no success page).
|
|
557
670
|
* @param params.stampWith - parameter to specify the stamper to use for the removal (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).
|
|
558
671
|
*/
|
|
559
|
-
handleRemoveUserPhoneNumber(params?: {
|
|
672
|
+
handleRemoveUserPhoneNumber: (params?: {
|
|
560
673
|
userId?: string;
|
|
561
674
|
successPageDuration?: number | undefined;
|
|
562
675
|
stampWith?: StamperType | undefined;
|
|
563
|
-
})
|
|
676
|
+
}) => Promise<string>;
|
|
564
677
|
}
|
|
678
|
+
/** @internal */
|
|
565
679
|
export declare const ClientContext: import("react").Context<ClientContextType | undefined>;
|
|
566
680
|
//# 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,WAAW,EACX,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,EACN,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACT,WAAW,
|
|
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,WAAW,EACX,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,eAAe,EACf,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,EACN,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,SAAS,EACV,MAAM,kBAAkB,CAAC;AAgB1B,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,gBAAgB;IAChB,UAAU,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC7C,gBAAgB;IAChB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAClD,gBAAgB;IAChB,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,gBAAgB;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB;IAChB,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C,gBAAgB;IAChB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,gBAAgB;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;;;;;;;;;;;;OAaG;IACH,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE;QACrB,SAAS,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;KACrC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpB;;;;;;;;;;;;;;;OAeG;IACH,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE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B,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":";;;;;AAkuBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;MACaA,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,CAAGC,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACxCC,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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":";;;AAkuBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACaA,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,CAAGC,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACxCC,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hook.d.ts","sourceRoot":"","sources":["../../../src/providers/modal/Hook.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAgB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE5D,eAAO,MAAM,QAAQ,QAAO,gBAI3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"Hook.d.ts","sourceRoot":"","sources":["../../../src/providers/modal/Hook.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAgB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE5D,gBAAgB;AAChB,eAAO,MAAM,QAAQ,QAAO,gBAI3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hook.js","sources":["../../../src/providers/modal/Hook.tsx"],"sourcesContent":[null],"names":["useModal","context","useContext","ModalContext","Error"],"mappings":";;;;;;
|
|
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;AACaA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ,GAAGA,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA;AAC7C,CAAA,CAAA,MAAMC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAGC,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAACC,qBAAY,CAAC;CACxC,CAAA,CAAA,CAAA,CAAA,CAAI,CAACF,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,MAAM,CAAIG,CAAAA,CAAAA,CAAAA,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,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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":";;;;
|
|
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,CAAG,CAAXA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQA,CAA0B,CAAA,CAAA;AAC7C,CAAA,CAAA,IAAMC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAGC,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAACC,YAAY,CAAC;CACxC,CAAA,CAAA,CAAA,CAAA,CAAI,CAACF,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,MAAM,CAAIG,CAAAA,CAAAA,CAAAA,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,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAChB,CAAA;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { slicedToArray as _slicedToArray, toConsumableArray as _toConsumableArray } from '../../_virtual/_rollupPluginBabelHelpers.mjs';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { useScreenSize } from '../../utils.mjs';
|
|
4
|
+
import { useScreenSize } from '../../utils/utils.mjs';
|
|
5
5
|
import { createContext, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
var ModalContext = /*#__PURE__*/createContext(undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../src/providers/modal/Root.tsx"],"names":[],"mappings":"AASA,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAK3E,UAAU,cAAc;IACtB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../src/providers/modal/Root.tsx"],"names":[],"mappings":"AASA,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAK3E,UAAU,cAAc;IACtB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CA4O9C"}
|