@moon-x/react-native-sdk 0.25.0 → 0.28.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/ethereum.mjs CHANGED
@@ -21,22 +21,22 @@ import {
21
21
  createContext,
22
22
  useCallback,
23
23
  useContext,
24
- useEffect as useEffect2,
24
+ useEffect as useEffect3,
25
25
  useLayoutEffect,
26
26
  useMemo,
27
27
  useReducer,
28
28
  useRef as useRef2,
29
- useState as useState2,
29
+ useState as useState3,
30
30
  useSyncExternalStore
31
31
  } from "react";
32
32
  import {
33
- Animated,
33
+ Animated as Animated2,
34
34
  AppState,
35
- Platform,
35
+ Platform as Platform2,
36
36
  Pressable as Pressable2,
37
37
  StyleSheet as StyleSheet2,
38
38
  Text as Text2,
39
- useWindowDimensions,
39
+ useWindowDimensions as useWindowDimensions2,
40
40
  View as View2
41
41
  } from "react-native";
42
42
  import { WebView } from "react-native-webview";
@@ -173,79 +173,264 @@ import {
173
173
  import { PostMessageMethod as PostMessageMethod4, PostMessageType as PostMessageType4 } from "@moon-x/core/utils";
174
174
 
175
175
  // src/components/presence-otp-prompt.tsx
176
- import { useEffect, useRef, useState } from "react";
176
+ import React, { useEffect as useEffect2, useRef, useState as useState2 } from "react";
177
177
  import {
178
+ AccessibilityInfo as AccessibilityInfo2,
179
+ ActivityIndicator,
180
+ Animated,
181
+ Easing,
182
+ KeyboardAvoidingView,
178
183
  Modal,
184
+ Platform,
179
185
  Pressable,
186
+ ScrollView,
180
187
  StyleSheet,
181
188
  Text,
182
189
  TextInput,
183
- View
190
+ View,
191
+ useColorScheme,
192
+ useWindowDimensions
184
193
  } from "react-native";
185
194
  import { registerPresenceOtpCodeProvider } from "@moon-x/core/sdk";
195
+
196
+ // src/components/use-reduce-motion.ts
197
+ import { useEffect, useState } from "react";
198
+ import { AccessibilityInfo } from "react-native";
199
+
200
+ // src/components/presence-otp-strings.ts
201
+ import { resolveLanguage } from "@moon-x/core/utils";
202
+
203
+ // src/components/presence-otp-prompt.tsx
186
204
  import { jsx, jsxs } from "react/jsx-runtime";
187
205
  var styles = StyleSheet.create({
188
206
  backdrop: {
189
- flex: 1,
207
+ flex: 1
208
+ },
209
+ backdropSheet: {
210
+ justifyContent: "flex-end"
211
+ },
212
+ backdropCentered: {
190
213
  alignItems: "center",
191
214
  justifyContent: "center",
192
- padding: 16,
193
- backgroundColor: "rgba(0, 0, 0, 0.45)"
215
+ padding: 16
194
216
  },
195
217
  card: {
196
218
  width: "100%",
197
- maxWidth: 384,
198
- padding: 24,
199
- borderRadius: 14
219
+ maxHeight: "100%",
220
+ overflow: "hidden"
221
+ },
222
+ sheet: {
223
+ borderTopLeftRadius: 24,
224
+ borderTopRightRadius: 24,
225
+ borderTopWidth: 1
226
+ },
227
+ centered: {
228
+ maxWidth: 400,
229
+ borderRadius: 24,
230
+ borderWidth: 1
231
+ },
232
+ header: {
233
+ flexDirection: "row",
234
+ justifyContent: "flex-end",
235
+ alignItems: "center",
236
+ height: 56,
237
+ paddingHorizontal: 16
238
+ },
239
+ iconButton: {
240
+ width: 32,
241
+ height: 32,
242
+ borderRadius: 8,
243
+ alignItems: "center",
244
+ justifyContent: "center"
245
+ },
246
+ content: {
247
+ paddingHorizontal: 24,
248
+ // Clear of the home indicator when the keyboard is down.
249
+ paddingBottom: 32
250
+ },
251
+ body: {
252
+ gap: 16
253
+ },
254
+ hero: {
255
+ alignItems: "center",
256
+ gap: 16,
257
+ paddingTop: 8
258
+ },
259
+ iconDisc: {
260
+ width: 64,
261
+ height: 64,
262
+ borderRadius: 32,
263
+ alignItems: "center",
264
+ justifyContent: "center"
265
+ },
266
+ heroText: {
267
+ width: "100%",
268
+ gap: 4
200
269
  },
201
270
  title: {
202
271
  fontSize: 20,
203
- fontWeight: "600"
272
+ lineHeight: 24,
273
+ fontWeight: "500",
274
+ letterSpacing: -0.4,
275
+ textAlign: "center"
204
276
  },
205
- body: {
277
+ description: {
206
278
  fontSize: 14,
207
- marginTop: 8
279
+ lineHeight: 20,
280
+ textAlign: "center"
208
281
  },
209
- input: {
210
- marginTop: 16,
211
- paddingVertical: 12,
212
- paddingHorizontal: 16,
282
+ cells: {
283
+ flexDirection: "row",
284
+ alignItems: "center",
285
+ justifyContent: "center",
286
+ gap: 8
287
+ },
288
+ cellsCompact: {
289
+ gap: 6
290
+ },
291
+ cellsBusy: {
292
+ opacity: 0.6
293
+ },
294
+ cell: {
295
+ width: 44,
296
+ height: 52,
297
+ borderWidth: 1,
213
298
  borderRadius: 12,
214
- borderWidth: StyleSheet.hairlineWidth,
215
- fontSize: 24,
216
- letterSpacing: 8,
217
- textAlign: "center"
299
+ alignItems: "center",
300
+ justifyContent: "center"
301
+ },
302
+ cellCompact: {
303
+ width: 38,
304
+ height: 48
305
+ },
306
+ cellText: {
307
+ fontSize: 18,
308
+ fontWeight: "500",
309
+ fontVariant: ["tabular-nums"]
310
+ },
311
+ caret: {
312
+ width: 1.5,
313
+ height: 20,
314
+ borderRadius: 1
315
+ },
316
+ separator: {
317
+ width: 4,
318
+ height: 4,
319
+ borderRadius: 2,
320
+ marginHorizontal: 4,
321
+ opacity: 0.6
322
+ },
323
+ codeInput: {
324
+ position: "absolute",
325
+ top: 0,
326
+ right: 0,
327
+ bottom: 0,
328
+ left: 0,
329
+ // Not 0: iOS stops delivering touches to a view that is fully transparent.
330
+ opacity: 0.015,
331
+ color: "transparent",
332
+ backgroundColor: "transparent",
333
+ borderWidth: 0
218
334
  },
219
335
  error: {
220
- fontSize: 13,
221
- marginTop: 8
336
+ flexDirection: "row",
337
+ alignItems: "center",
338
+ justifyContent: "center",
339
+ gap: 4
222
340
  },
223
- primaryButton: {
224
- marginTop: 16,
225
- paddingVertical: 12,
226
- borderRadius: 12,
227
- alignItems: "center"
341
+ errorText: {
342
+ flexShrink: 1,
343
+ fontSize: 12,
344
+ fontWeight: "500",
345
+ textAlign: "center"
228
346
  },
229
- primaryButtonDisabled: {
230
- opacity: 0.5
347
+ actions: {
348
+ gap: 8,
349
+ paddingTop: 24
231
350
  },
232
- primaryButtonText: {
351
+ button: {
352
+ flexDirection: "row",
353
+ alignItems: "center",
354
+ justifyContent: "center",
355
+ gap: 8,
356
+ height: 48,
357
+ paddingHorizontal: 20,
358
+ borderRadius: 999
359
+ },
360
+ buttonText: {
233
361
  fontSize: 16,
234
- fontWeight: "600"
362
+ fontWeight: "500"
235
363
  },
236
- ghostButton: {
237
- marginTop: 8,
238
- paddingVertical: 12,
239
- alignItems: "center"
364
+ pressed: {
365
+ opacity: 0.88,
366
+ transform: [{ scale: 0.985 }]
240
367
  },
241
- ghostButtonText: {
242
- fontSize: 15,
243
- fontWeight: "500"
368
+ disabled: {
369
+ opacity: 0.5
244
370
  },
245
371
  hint: {
246
372
  fontSize: 12,
247
- marginTop: 4,
373
+ lineHeight: 16,
248
374
  textAlign: "center"
375
+ },
376
+ closeIcon: {
377
+ width: 16,
378
+ height: 16,
379
+ alignItems: "center",
380
+ justifyContent: "center"
381
+ },
382
+ closeBar: {
383
+ position: "absolute",
384
+ width: 12,
385
+ height: 1.5,
386
+ borderRadius: 1
387
+ },
388
+ mailIcon: {
389
+ width: 28,
390
+ height: 28
391
+ },
392
+ mailBody: {
393
+ position: "absolute",
394
+ top: 5,
395
+ left: 2,
396
+ width: 24,
397
+ height: 18,
398
+ borderWidth: 2,
399
+ borderRadius: 3
400
+ },
401
+ mailFlap: {
402
+ position: "absolute",
403
+ top: 10.6,
404
+ width: 13,
405
+ height: 2,
406
+ borderRadius: 1
407
+ },
408
+ mailFlapLeft: {
409
+ left: 2,
410
+ transform: [{ rotate: "29.8deg" }]
411
+ },
412
+ mailFlapRight: {
413
+ left: 13,
414
+ transform: [{ rotate: "-29.8deg" }]
415
+ },
416
+ alertIcon: {
417
+ width: 14,
418
+ height: 14,
419
+ borderRadius: 7,
420
+ borderWidth: 1.25,
421
+ alignItems: "center",
422
+ justifyContent: "center",
423
+ gap: 1
424
+ },
425
+ alertStem: {
426
+ width: 1.5,
427
+ height: 4,
428
+ borderRadius: 1
429
+ },
430
+ alertDot: {
431
+ width: 1.5,
432
+ height: 1.5,
433
+ borderRadius: 1
249
434
  }
250
435
  });
251
436
 
package/dist/index.d.mts CHANGED
@@ -1,29 +1,36 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { LoginWithMoonPayCustomerTokenResult, BulkImportKeySpec, BulkImportFailure, RegisterCreateWalletSpec, PresenceOtpCodeProvider, RegisterCreatedWallet, RelyingPartyOriginInput } from '@moon-x/core/sdk';
3
3
  export { LoginWithMoonPayCustomerTokenResult, MOONPAY_CONSUMER_SESSION_ERROR_CODES, MoonPayConsumerSessionError, MoonPayConsumerSessionErrorCode, PresenceOtpCodeProvider, PresenceOtpCodeRequest, RegisterCreateWalletSpec, RegisterCreatedWallet, registerPresenceOtpCodeProvider } from '@moon-x/core/sdk';
4
- import { PostMessageType, PostMessageMethod } from '@moon-x/core/utils';
5
- export { PostMessageMethod, PostMessageType } from '@moon-x/core/utils';
6
4
  import * as _moon_x_core_types from '@moon-x/core/types';
7
- import { GetSessionTokensOptions, PublicWallet, WalletImportSource, CustodyStateResult, PrepareSigningParams, PrepareSigningResult, PrepareFundingParams, FundingSession, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSendTransactionParams, EthereumSendTransactionResult, EthereumSendTransactionsParams, EthereumSendTransactionsResult, EthereumSendBatchAtomicParams, EthereumSendBatchAtomicResult, EthereumGetBalanceParams, EthereumGetBalanceResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronSendTransactionParams, TronSendTransactionResult, TronGetBalanceParams, TronGetBalanceResult, BitcoinSignMessageParams, BitcoinSignMessageResult, BitcoinSignTransactionParams, BitcoinSignTransactionResult, BitcoinSendTransactionParams, BitcoinSendTransactionResult, BitcoinGetBalanceParams, BitcoinGetBalanceResult, BitcoinGetUtxosParams, BitcoinGetUtxosResult, AppConfigResponse } from '@moon-x/core/types';
5
+ import { DisplayMode, GetSessionTokensOptions, PublicWallet, WalletImportSource, CustodyStateResult, PrepareSigningParams, PrepareSigningResult, PrepareFundingParams, FundingSession, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSendTransactionParams, EthereumSendTransactionResult, EthereumSendTransactionsParams, EthereumSendTransactionsResult, EthereumSendBatchAtomicParams, EthereumSendBatchAtomicResult, EthereumGetBalanceParams, EthereumGetBalanceResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronSendTransactionParams, TronSendTransactionResult, TronGetBalanceParams, TronGetBalanceResult, BitcoinSignMessageParams, BitcoinSignMessageResult, BitcoinSignTransactionParams, BitcoinSignTransactionResult, BitcoinSendTransactionParams, BitcoinSendTransactionResult, BitcoinGetBalanceParams, BitcoinGetBalanceResult, BitcoinGetUtxosParams, BitcoinGetUtxosResult, AppConfigResponse } from '@moon-x/core/types';
8
6
  export { BitcoinGetBalanceParams, BitcoinGetBalanceResult, BitcoinGetUtxosParams, BitcoinGetUtxosResult, BitcoinSendTransactionParams, BitcoinSendTransactionResult, BitcoinSignMessageParams, BitcoinSignMessageResult, BitcoinSignTransactionParams, BitcoinSignTransactionResult, BitcoinTransactionPreview, BitcoinUtxo, Chain, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumSendTransactionParams, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, FundingSession, ListEphemeralSignersResult, Network, PrepareFundingParams, PrepareSigningParams, PrepareSigningResult, PrepareSigningWalletResult, PrepareSigningWalletStatus, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicWallet, RevokeEphemeralSignerParams, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TronGetBalanceParams, TronGetBalanceResult, TronSendTransactionParams, TronSendTransactionResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronTransactionJson, WalletConnectConfig } from '@moon-x/core/types';
7
+ import { PostMessageType, PostMessageMethod } from '@moon-x/core/utils';
8
+ export { PostMessageMethod, PostMessageType } from '@moon-x/core/utils';
9
9
  import * as _moon_x_core_react from '@moon-x/core/react';
10
10
  import { UseLoginWithEmailCallbacks } from '@moon-x/core/react';
11
- export { LinkEmailResult, LinkEmailState, LoginWithEmailState, UseEphemeralSignerResult, UseLinkEmailCallbacks, UseLoginWithEmailCallbacks, useAddPasskey, useBulkImport, useCreateWallet, useEphemeralSigner, useImportKey, useLinkEmail, useLogout, usePasskeyStatus, useRegisterPasskey, useRemovePasskey, useUser, useWallets } from '@moon-x/core/react';
11
+ export { ChangeEmailResult, ChangeEmailState, ChangeEmailStep, LinkEmailResult, LinkEmailState, LoginWithEmailState, UseChangeEmailCallbacks, UseEphemeralSignerResult, UseLinkEmailCallbacks, UseLoginWithEmailCallbacks, useAddPasskey, useBulkImport, useChangeEmail, useCreateWallet, useEphemeralSigner, useImportKey, useLinkEmail, useLogout, usePasskeyStatus, useRegisterPasskey, useRemovePasskey, useUser, useWallets } from '@moon-x/core/react';
12
12
  export { E as ExportKeyResult, u as useExportKey } from './use-export-key-BIz_tV0k.mjs';
13
13
  import { WalletConnectClientLike, WalletConnectSessionLike } from '@moon-x/core/lib';
14
14
 
15
15
  interface PresenceOtpPromptCopy {
16
16
  title?: string;
17
17
  description?: string;
18
+ /** Shown under the buttons. None by default. */
18
19
  hint?: string;
19
20
  verify?: string;
20
21
  verifying?: string;
21
22
  cancel?: string;
23
+ /** Accessible name of the close button. */
24
+ close?: string;
22
25
  invalidCode?: string;
23
26
  incompleteCode?: string;
27
+ /** Accessible name of the code field. */
28
+ codeLabel?: string;
24
29
  }
25
30
  interface PresenceOtpPromptColors {
31
+ /** The sheet, and the code cells. */
26
32
  background?: string;
33
+ /** The icon disc, the close button, and Cancel while pressed. */
27
34
  surface?: string;
28
35
  border?: string;
29
36
  text?: string;
@@ -31,10 +38,21 @@ interface PresenceOtpPromptColors {
31
38
  accent?: string;
32
39
  accentText?: string;
33
40
  error?: string;
41
+ /** Code cells behind a wrong code. */
42
+ errorSurface?: string;
43
+ backdrop?: string;
34
44
  }
45
+
35
46
  interface PresenceOtpPromptOptions {
36
47
  copy?: PresenceOtpPromptCopy;
37
48
  colors?: PresenceOtpPromptColors;
49
+ /** `light`, `dark`, or `auto` (the default) to follow the device. */
50
+ displayMode?: DisplayMode;
51
+ /**
52
+ * BCP-47 tag for the default copy: `en`, `de`, `es`, `fr`, `it` or `pt`.
53
+ * Omit it to follow the device; anything else falls back to English.
54
+ */
55
+ language?: string;
38
56
  }
39
57
 
40
58
  type ResponseErrorListener = (error: Error, context: {
@@ -99,12 +117,33 @@ interface RNAuthSDK {
99
117
  email: string;
100
118
  code: string;
101
119
  }) => Promise<_moon_x_core_types.LinkEmailVerifyResponse>;
120
+ sendEmailChangeCode: (params: {
121
+ email: string;
122
+ }) => Promise<_moon_x_core_types.ChangeEmailStepResponse>;
123
+ confirmEmailChangeCurrentCode: (params: {
124
+ code: string;
125
+ }) => Promise<_moon_x_core_types.ChangeEmailStepResponse>;
126
+ confirmEmailChangeNewCode: (params: {
127
+ code: string;
128
+ }) => Promise<_moon_x_core_types.ChangeEmailVerifyResponse>;
102
129
  verifyOAuth: (params: {
103
130
  provider: "google" | "apple";
104
131
  code?: string;
105
132
  token?: string;
106
133
  state?: string;
107
134
  }) => Promise<any>;
135
+ beginOAuthLink: (provider: "google" | "apple", loginRedirectUrl: string) => Promise<{
136
+ redirect_url: string;
137
+ }>;
138
+ verifyOAuthLink: (params: {
139
+ provider: "google" | "apple";
140
+ code?: string;
141
+ token?: string;
142
+ state?: string;
143
+ }) => Promise<void>;
144
+ detachOAuth: (idpUserId: string) => Promise<{
145
+ provider: string;
146
+ }>;
108
147
  /** The latest session check. Errors preserve the last confirmed authentication state. */
109
148
  sessionStatus: SessionStatus;
110
149
  sessionError: Error | null;
package/dist/index.d.ts CHANGED
@@ -1,29 +1,36 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { LoginWithMoonPayCustomerTokenResult, BulkImportKeySpec, BulkImportFailure, RegisterCreateWalletSpec, PresenceOtpCodeProvider, RegisterCreatedWallet, RelyingPartyOriginInput } from '@moon-x/core/sdk';
3
3
  export { LoginWithMoonPayCustomerTokenResult, MOONPAY_CONSUMER_SESSION_ERROR_CODES, MoonPayConsumerSessionError, MoonPayConsumerSessionErrorCode, PresenceOtpCodeProvider, PresenceOtpCodeRequest, RegisterCreateWalletSpec, RegisterCreatedWallet, registerPresenceOtpCodeProvider } from '@moon-x/core/sdk';
4
- import { PostMessageType, PostMessageMethod } from '@moon-x/core/utils';
5
- export { PostMessageMethod, PostMessageType } from '@moon-x/core/utils';
6
4
  import * as _moon_x_core_types from '@moon-x/core/types';
7
- import { GetSessionTokensOptions, PublicWallet, WalletImportSource, CustodyStateResult, PrepareSigningParams, PrepareSigningResult, PrepareFundingParams, FundingSession, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSendTransactionParams, EthereumSendTransactionResult, EthereumSendTransactionsParams, EthereumSendTransactionsResult, EthereumSendBatchAtomicParams, EthereumSendBatchAtomicResult, EthereumGetBalanceParams, EthereumGetBalanceResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronSendTransactionParams, TronSendTransactionResult, TronGetBalanceParams, TronGetBalanceResult, BitcoinSignMessageParams, BitcoinSignMessageResult, BitcoinSignTransactionParams, BitcoinSignTransactionResult, BitcoinSendTransactionParams, BitcoinSendTransactionResult, BitcoinGetBalanceParams, BitcoinGetBalanceResult, BitcoinGetUtxosParams, BitcoinGetUtxosResult, AppConfigResponse } from '@moon-x/core/types';
5
+ import { DisplayMode, GetSessionTokensOptions, PublicWallet, WalletImportSource, CustodyStateResult, PrepareSigningParams, PrepareSigningResult, PrepareFundingParams, FundingSession, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSendTransactionParams, EthereumSendTransactionResult, EthereumSendTransactionsParams, EthereumSendTransactionsResult, EthereumSendBatchAtomicParams, EthereumSendBatchAtomicResult, EthereumGetBalanceParams, EthereumGetBalanceResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronSendTransactionParams, TronSendTransactionResult, TronGetBalanceParams, TronGetBalanceResult, BitcoinSignMessageParams, BitcoinSignMessageResult, BitcoinSignTransactionParams, BitcoinSignTransactionResult, BitcoinSendTransactionParams, BitcoinSendTransactionResult, BitcoinGetBalanceParams, BitcoinGetBalanceResult, BitcoinGetUtxosParams, BitcoinGetUtxosResult, AppConfigResponse } from '@moon-x/core/types';
8
6
  export { BitcoinGetBalanceParams, BitcoinGetBalanceResult, BitcoinGetUtxosParams, BitcoinGetUtxosResult, BitcoinSendTransactionParams, BitcoinSendTransactionResult, BitcoinSignMessageParams, BitcoinSignMessageResult, BitcoinSignTransactionParams, BitcoinSignTransactionResult, BitcoinTransactionPreview, BitcoinUtxo, Chain, EphemeralSigner, EphemeralSignerChain, EphemeralSignerScheme, EphemeralSignerWallet, EthereumGetBalanceParams, EthereumGetBalanceResult, EthereumSendTransactionParams, EthereumSendTransactionResult, EthereumSign7702AuthorizationParams, EthereumSign7702AuthorizationResult, EthereumSignHashParams, EthereumSignHashResult, EthereumSignMessageParams, EthereumSignMessageResult, EthereumSignTransactionParams, EthereumSignTransactionResult, EthereumSignTypedDataParams, EthereumSignTypedDataResult, FundingSession, ListEphemeralSignersResult, Network, PrepareFundingParams, PrepareSigningParams, PrepareSigningResult, PrepareSigningWalletResult, PrepareSigningWalletStatus, ProvisionEphemeralSignerParams, ProvisionEphemeralSignerResult, PublicWallet, RevokeEphemeralSignerParams, SolanaGetBalanceParams, SolanaGetBalanceResult, SolanaGetTokenAccountsByOwnerParams, SolanaGetTokenAccountsByOwnerResult, SolanaSendTransactionParams, SolanaSendTransactionResult, SolanaSignMessageParams, SolanaSignMessageResult, SolanaSignTransactionParams, SolanaSignTransactionResult, TronGetBalanceParams, TronGetBalanceResult, TronSendTransactionParams, TronSendTransactionResult, TronSignMessageParams, TronSignMessageResult, TronSignTransactionParams, TronSignTransactionResult, TronTransactionJson, WalletConnectConfig } from '@moon-x/core/types';
7
+ import { PostMessageType, PostMessageMethod } from '@moon-x/core/utils';
8
+ export { PostMessageMethod, PostMessageType } from '@moon-x/core/utils';
9
9
  import * as _moon_x_core_react from '@moon-x/core/react';
10
10
  import { UseLoginWithEmailCallbacks } from '@moon-x/core/react';
11
- export { LinkEmailResult, LinkEmailState, LoginWithEmailState, UseEphemeralSignerResult, UseLinkEmailCallbacks, UseLoginWithEmailCallbacks, useAddPasskey, useBulkImport, useCreateWallet, useEphemeralSigner, useImportKey, useLinkEmail, useLogout, usePasskeyStatus, useRegisterPasskey, useRemovePasskey, useUser, useWallets } from '@moon-x/core/react';
11
+ export { ChangeEmailResult, ChangeEmailState, ChangeEmailStep, LinkEmailResult, LinkEmailState, LoginWithEmailState, UseChangeEmailCallbacks, UseEphemeralSignerResult, UseLinkEmailCallbacks, UseLoginWithEmailCallbacks, useAddPasskey, useBulkImport, useChangeEmail, useCreateWallet, useEphemeralSigner, useImportKey, useLinkEmail, useLogout, usePasskeyStatus, useRegisterPasskey, useRemovePasskey, useUser, useWallets } from '@moon-x/core/react';
12
12
  export { E as ExportKeyResult, u as useExportKey } from './use-export-key-BIz_tV0k.js';
13
13
  import { WalletConnectClientLike, WalletConnectSessionLike } from '@moon-x/core/lib';
14
14
 
15
15
  interface PresenceOtpPromptCopy {
16
16
  title?: string;
17
17
  description?: string;
18
+ /** Shown under the buttons. None by default. */
18
19
  hint?: string;
19
20
  verify?: string;
20
21
  verifying?: string;
21
22
  cancel?: string;
23
+ /** Accessible name of the close button. */
24
+ close?: string;
22
25
  invalidCode?: string;
23
26
  incompleteCode?: string;
27
+ /** Accessible name of the code field. */
28
+ codeLabel?: string;
24
29
  }
25
30
  interface PresenceOtpPromptColors {
31
+ /** The sheet, and the code cells. */
26
32
  background?: string;
33
+ /** The icon disc, the close button, and Cancel while pressed. */
27
34
  surface?: string;
28
35
  border?: string;
29
36
  text?: string;
@@ -31,10 +38,21 @@ interface PresenceOtpPromptColors {
31
38
  accent?: string;
32
39
  accentText?: string;
33
40
  error?: string;
41
+ /** Code cells behind a wrong code. */
42
+ errorSurface?: string;
43
+ backdrop?: string;
34
44
  }
45
+
35
46
  interface PresenceOtpPromptOptions {
36
47
  copy?: PresenceOtpPromptCopy;
37
48
  colors?: PresenceOtpPromptColors;
49
+ /** `light`, `dark`, or `auto` (the default) to follow the device. */
50
+ displayMode?: DisplayMode;
51
+ /**
52
+ * BCP-47 tag for the default copy: `en`, `de`, `es`, `fr`, `it` or `pt`.
53
+ * Omit it to follow the device; anything else falls back to English.
54
+ */
55
+ language?: string;
38
56
  }
39
57
 
40
58
  type ResponseErrorListener = (error: Error, context: {
@@ -99,12 +117,33 @@ interface RNAuthSDK {
99
117
  email: string;
100
118
  code: string;
101
119
  }) => Promise<_moon_x_core_types.LinkEmailVerifyResponse>;
120
+ sendEmailChangeCode: (params: {
121
+ email: string;
122
+ }) => Promise<_moon_x_core_types.ChangeEmailStepResponse>;
123
+ confirmEmailChangeCurrentCode: (params: {
124
+ code: string;
125
+ }) => Promise<_moon_x_core_types.ChangeEmailStepResponse>;
126
+ confirmEmailChangeNewCode: (params: {
127
+ code: string;
128
+ }) => Promise<_moon_x_core_types.ChangeEmailVerifyResponse>;
102
129
  verifyOAuth: (params: {
103
130
  provider: "google" | "apple";
104
131
  code?: string;
105
132
  token?: string;
106
133
  state?: string;
107
134
  }) => Promise<any>;
135
+ beginOAuthLink: (provider: "google" | "apple", loginRedirectUrl: string) => Promise<{
136
+ redirect_url: string;
137
+ }>;
138
+ verifyOAuthLink: (params: {
139
+ provider: "google" | "apple";
140
+ code?: string;
141
+ token?: string;
142
+ state?: string;
143
+ }) => Promise<void>;
144
+ detachOAuth: (idpUserId: string) => Promise<{
145
+ provider: string;
146
+ }>;
108
147
  /** The latest session check. Errors preserve the last confirmed authentication state. */
109
148
  sessionStatus: SessionStatus;
110
149
  sessionError: Error | null;