@dynamic-labs-sdk/client 1.24.0 → 1.24.1

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.
Files changed (76) hide show
  1. package/dist/{NativeModuleNotLinkedError-CJy_4-6r.native.esm.js → NativeModuleNotLinkedError-dFDBC524.native.esm.js} +3 -3
  2. package/dist/{NativeModuleNotLinkedError-CJy_4-6r.native.esm.js.map → NativeModuleNotLinkedError-dFDBC524.native.esm.js.map} +1 -1
  3. package/dist/{consumeMfaTokenIfRequiredForAction-DXTH4qki.esm.js → consumeMfaTokenIfRequiredForAction-DdGzQwQQ.esm.js} +2 -2
  4. package/dist/{consumeMfaTokenIfRequiredForAction-DXTH4qki.esm.js.map → consumeMfaTokenIfRequiredForAction-DdGzQwQQ.esm.js.map} +1 -1
  5. package/dist/{consumeMfaTokenIfRequiredForAction-B6nFE5IO.cjs → consumeMfaTokenIfRequiredForAction-IsOFRL68.cjs} +2 -2
  6. package/dist/{consumeMfaTokenIfRequiredForAction-B6nFE5IO.cjs.map → consumeMfaTokenIfRequiredForAction-IsOFRL68.cjs.map} +1 -1
  7. package/dist/core.cjs +6 -6
  8. package/dist/core.esm.js +6 -6
  9. package/dist/core.native.esm.js +5 -5
  10. package/dist/{getNetworkProviderFromNetworkId-CZjFA5G8.cjs → getNetworkProviderFromNetworkId-CIcatN8-.cjs} +2 -2
  11. package/dist/{getNetworkProviderFromNetworkId-CZjFA5G8.cjs.map → getNetworkProviderFromNetworkId-CIcatN8-.cjs.map} +1 -1
  12. package/dist/{getNetworkProviderFromNetworkId-CjdC5HjA.esm.js → getNetworkProviderFromNetworkId-CYONf9-8.esm.js} +2 -2
  13. package/dist/{getNetworkProviderFromNetworkId-CjdC5HjA.esm.js.map → getNetworkProviderFromNetworkId-CYONf9-8.esm.js.map} +1 -1
  14. package/dist/{getNetworkProviderFromNetworkId-R8IKGc6s.native.esm.js → getNetworkProviderFromNetworkId-nLBIQ_5p.native.esm.js} +2 -2
  15. package/dist/{getNetworkProviderFromNetworkId-R8IKGc6s.native.esm.js.map → getNetworkProviderFromNetworkId-nLBIQ_5p.native.esm.js.map} +1 -1
  16. package/dist/{getSignedSessionId-BYR70F5w.esm.js → getSignedSessionId-B2kslh_k.esm.js} +2 -2
  17. package/dist/{getSignedSessionId-BYR70F5w.esm.js.map → getSignedSessionId-B2kslh_k.esm.js.map} +1 -1
  18. package/dist/{getSignedSessionId-B6Eqmue0.native.esm.js → getSignedSessionId-DV0hK3Tu.native.esm.js} +3 -3
  19. package/dist/{getSignedSessionId-B6Eqmue0.native.esm.js.map → getSignedSessionId-DV0hK3Tu.native.esm.js.map} +1 -1
  20. package/dist/{getSignedSessionId-BpUNqL9z.cjs → getSignedSessionId-NZ8ndqG1.cjs} +2 -2
  21. package/dist/{getSignedSessionId-BpUNqL9z.cjs.map → getSignedSessionId-NZ8ndqG1.cjs.map} +1 -1
  22. package/dist/{getWalletProviderByKey-CqdhcE7y.native.esm.js → getWalletProviderByKey-DPZP397j.native.esm.js} +2 -2
  23. package/dist/{getWalletProviderByKey-CqdhcE7y.native.esm.js.map → getWalletProviderByKey-DPZP397j.native.esm.js.map} +1 -1
  24. package/dist/{getWalletProviderByKey-BVVFLnfy.esm.js → getWalletProviderByKey-Dh3JbMi6.esm.js} +2 -2
  25. package/dist/{getWalletProviderByKey-BVVFLnfy.esm.js.map → getWalletProviderByKey-Dh3JbMi6.esm.js.map} +1 -1
  26. package/dist/{getWalletProviderByKey-D2ElEmJR.cjs → getWalletProviderByKey-DzKZXm5S.cjs} +2 -2
  27. package/dist/{getWalletProviderByKey-D2ElEmJR.cjs.map → getWalletProviderByKey-DzKZXm5S.cjs.map} +1 -1
  28. package/dist/index.cjs +14 -10
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.esm.js +14 -10
  31. package/dist/index.esm.js.map +1 -1
  32. package/dist/index.native.esm.js +18 -21
  33. package/dist/index.native.esm.js.map +1 -1
  34. package/dist/{isDynamicWaasEnabled-Ck0VFh7Z.esm.js → isDynamicWaasEnabled-BbhbghRE.esm.js} +2 -2
  35. package/dist/{isDynamicWaasEnabled-Ck0VFh7Z.esm.js.map → isDynamicWaasEnabled-BbhbghRE.esm.js.map} +1 -1
  36. package/dist/{isDynamicWaasEnabled-yo_LqzH5.native.esm.js → isDynamicWaasEnabled-BmB0lQJf.native.esm.js} +2 -2
  37. package/dist/{isDynamicWaasEnabled-yo_LqzH5.native.esm.js.map → isDynamicWaasEnabled-BmB0lQJf.native.esm.js.map} +1 -1
  38. package/dist/{isDynamicWaasEnabled-B7_FiTkx.cjs → isDynamicWaasEnabled-D2U3MRnA.cjs} +2 -2
  39. package/dist/{isDynamicWaasEnabled-B7_FiTkx.cjs.map → isDynamicWaasEnabled-D2U3MRnA.cjs.map} +1 -1
  40. package/dist/{isMfaRequiredForAction-CnO4g-V0.esm.js → isMfaRequiredForAction-DBlmv1ew.esm.js} +2 -2
  41. package/dist/{isMfaRequiredForAction-CnO4g-V0.esm.js.map → isMfaRequiredForAction-DBlmv1ew.esm.js.map} +1 -1
  42. package/dist/{isMfaRequiredForAction-B3FO4Zbn.cjs → isMfaRequiredForAction-DCyorelQ.cjs} +2 -2
  43. package/dist/{isMfaRequiredForAction-B3FO4Zbn.cjs.map → isMfaRequiredForAction-DCyorelQ.cjs.map} +1 -1
  44. package/dist/{isMfaRequiredForAction-Zi7_K00W.native.esm.js → isMfaRequiredForAction-DP0kk0tY.native.esm.js} +2 -2
  45. package/dist/{isMfaRequiredForAction-Zi7_K00W.native.esm.js.map → isMfaRequiredForAction-DP0kk0tY.native.esm.js.map} +1 -1
  46. package/dist/{isUserOnboardingComplete-Dnx30meW.cjs → isUserOnboardingComplete-DygWGu6p.cjs} +3 -3
  47. package/dist/{isUserOnboardingComplete-Dnx30meW.cjs.map → isUserOnboardingComplete-DygWGu6p.cjs.map} +1 -1
  48. package/dist/{isUserOnboardingComplete-DcRl6Q1f.native.esm.js → isUserOnboardingComplete-Ebw4x90F.native.esm.js} +3 -3
  49. package/dist/{isUserOnboardingComplete-DcRl6Q1f.native.esm.js.map → isUserOnboardingComplete-Ebw4x90F.native.esm.js.map} +1 -1
  50. package/dist/{isUserOnboardingComplete-DZk1nVHO.esm.js → isUserOnboardingComplete-WzXFgdor.esm.js} +3 -3
  51. package/dist/{isUserOnboardingComplete-DZk1nVHO.esm.js.map → isUserOnboardingComplete-WzXFgdor.esm.js.map} +1 -1
  52. package/dist/{migrateFromFireblocks-nkmSeZrn.esm.js → migrateFromFireblocks-BkcGdF_B.esm.js} +4 -4
  53. package/dist/{migrateFromFireblocks-nkmSeZrn.esm.js.map → migrateFromFireblocks-BkcGdF_B.esm.js.map} +1 -1
  54. package/dist/{migrateFromFireblocks-COEK_Acn.native.esm.js → migrateFromFireblocks-C1yQ4dm7.native.esm.js} +3 -3
  55. package/dist/{migrateFromFireblocks-COEK_Acn.native.esm.js.map → migrateFromFireblocks-C1yQ4dm7.native.esm.js.map} +1 -1
  56. package/dist/{migrateFromFireblocks-CdSxWZav.cjs → migrateFromFireblocks-CzPWPaDr.cjs} +4 -4
  57. package/dist/{migrateFromFireblocks-CdSxWZav.cjs.map → migrateFromFireblocks-CzPWPaDr.cjs.map} +1 -1
  58. package/dist/services/openDeeplink/{createWebDeeplinkOpener/createWebDeeplinkOpener.d.ts → createDeeplinkOpener/createDeeplinkOpener.d.ts} +6 -2
  59. package/dist/services/openDeeplink/createDeeplinkOpener/createDeeplinkOpener.d.ts.map +1 -0
  60. package/dist/services/openDeeplink/createDeeplinkOpener/index.d.ts +2 -0
  61. package/dist/services/openDeeplink/createDeeplinkOpener/index.d.ts.map +1 -0
  62. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  63. package/dist/{updateAuthFromVerifyResponse-BSORoVT0.cjs → updateAuthFromVerifyResponse-B8tDJdXY.cjs} +3 -3
  64. package/dist/{updateAuthFromVerifyResponse-BSORoVT0.cjs.map → updateAuthFromVerifyResponse-B8tDJdXY.cjs.map} +1 -1
  65. package/dist/{updateAuthFromVerifyResponse-D0Tt9-Z-.esm.js → updateAuthFromVerifyResponse-C_yGmd99.esm.js} +3 -3
  66. package/dist/{updateAuthFromVerifyResponse-D0Tt9-Z-.esm.js.map → updateAuthFromVerifyResponse-C_yGmd99.esm.js.map} +1 -1
  67. package/dist/waas.cjs +5 -5
  68. package/dist/waas.esm.js +5 -5
  69. package/dist/waas.native.esm.js +4 -4
  70. package/dist/waasCore.cjs +7 -7
  71. package/dist/waasCore.esm.js +7 -7
  72. package/dist/waasCore.native.esm.js +6 -6
  73. package/package.json +3 -3
  74. package/dist/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.d.ts.map +0 -1
  75. package/dist/services/openDeeplink/createWebDeeplinkOpener/index.d.ts +0 -2
  76. package/dist/services/openDeeplink/createWebDeeplinkOpener/index.d.ts.map +0 -1
@@ -1,12 +1,13 @@
1
- import { $ as UnauthorizedError, B as onEvent, Ct as name, E as getWalletProviderRegistry, F as normalizeAddress, H as createApiClient, I as splitWalletProviderKey, K as getNonce, M as getChainFromVerifiedCredentialChain, N as CHAINS_INFO_MAP, O as NoWalletProviderFoundError, P as formatWalletAccountId, Q as createLocalStorageAdapter, R as emitEvent, S as extractSessionId, St as getCore, T as WalletProviderPriority, V as onceEvent, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _ as instrumentFunction, _t as NONCE_POOL_SIZE, a as InvalidParamError, at as APIError, b as getUserAgent, ct as DYNAMIC_ICONIC_SPRITE_URL, dt as isCookieEnabled, et as SandboxMaximumThresholdReachedError, ft as assertDefined, gt as getPlatform, h as checkAndRaiseWalletAccountsChangedEvent, ht as randomString, i as parseElevatedAccessToken, it as InvalidExternalAuthError, k as getWalletAccounts, lt as SDK_API_CORE_VERSION, m as isUserMissingMfaAuth, mt as getElevatedAccessToken, n as updateAuthFromVerifyResponse, nt as MfaInvalidOtpError, o as initializeWaasClientsForEagerRecovery, p as getWalletProviders, pt as ValueMustBeDefinedError, r as upsertElevatedAccessToken, rt as LinkCredentialError, tt as MfaRateLimitedError, v as scrubParameters, vt as getDefaultClient, w as getWalletProviderFromWalletAccount, wt as version, x as getOperatingSystem, xt as BaseError, y as DEFAULT_PII_FIELDS, yt as setDefaultClient, z as offEvent } from "./NativeModuleNotLinkedError-CJy_4-6r.native.esm.js";
2
- import { A as createCrossTabBroadcast, B as getBuffer, C as getKeychainIndexedDBName, D as assertSafeNavigationUrl, E as createKeychainService, F as GENERATE_SESSION_KEYS_TRACKER_KEY, H as isEqualShallow, I as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, L as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, M as CannotTrackError, N as createDeferredPromise, P as FETCH_PROJECT_SETTINGS_TRACKER_KEY, R as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, S as MergeAccountsConfirmationError, T as assertSafeDeeplinkUrl, U as createStorage, V as subscribeWithSelector, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, k as createLogger, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as isServerSideRendering } from "./getNetworkProviderFromNetworkId-R8IKGc6s.native.esm.js";
3
- import { a as fetchProjectSettings, i as generateSessionKeys, n as getVerifiedCredentialForWalletAccount, o as isSignedIn, r as __logoutWithReason_wrapped, s as retryOnFail, t as getWalletProviderByKey } from "./getWalletProviderByKey-CqdhcE7y.native.esm.js";
4
- import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-yo_LqzH5.native.esm.js";
5
- import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-DcRl6Q1f.native.esm.js";
6
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-Zi7_K00W.native.esm.js";
1
+ import { $ as UnauthorizedError, B as onEvent, Ct as name, E as getWalletProviderRegistry, F as normalizeAddress, H as createApiClient, I as splitWalletProviderKey, K as getNonce, M as getChainFromVerifiedCredentialChain, N as CHAINS_INFO_MAP, O as NoWalletProviderFoundError, P as formatWalletAccountId, Q as createLocalStorageAdapter, R as emitEvent, S as extractSessionId, St as getCore, T as WalletProviderPriority, V as onceEvent, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _ as instrumentFunction, _t as NONCE_POOL_SIZE, a as InvalidParamError, at as APIError, b as getUserAgent, ct as DYNAMIC_ICONIC_SPRITE_URL, dt as isCookieEnabled, et as SandboxMaximumThresholdReachedError, ft as assertDefined, gt as getPlatform, h as checkAndRaiseWalletAccountsChangedEvent, ht as randomString, i as parseElevatedAccessToken, it as InvalidExternalAuthError, k as getWalletAccounts, lt as SDK_API_CORE_VERSION, m as isUserMissingMfaAuth, mt as getElevatedAccessToken, n as updateAuthFromVerifyResponse, nt as MfaInvalidOtpError, o as initializeWaasClientsForEagerRecovery, p as getWalletProviders, pt as ValueMustBeDefinedError, r as upsertElevatedAccessToken, rt as LinkCredentialError, tt as MfaRateLimitedError, v as scrubParameters, vt as getDefaultClient, w as getWalletProviderFromWalletAccount, wt as version, x as getOperatingSystem, xt as BaseError, y as DEFAULT_PII_FIELDS, yt as setDefaultClient, z as offEvent } from "./NativeModuleNotLinkedError-dFDBC524.native.esm.js";
2
+ import { A as createCrossTabBroadcast, B as getBuffer, C as getKeychainIndexedDBName, D as assertSafeNavigationUrl, E as createKeychainService, F as GENERATE_SESSION_KEYS_TRACKER_KEY, H as isEqualShallow, I as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, L as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, M as CannotTrackError, N as createDeferredPromise, P as FETCH_PROJECT_SETTINGS_TRACKER_KEY, R as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, S as MergeAccountsConfirmationError, T as assertSafeDeeplinkUrl, U as createStorage, V as subscribeWithSelector, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, k as createLogger, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as isServerSideRendering } from "./getNetworkProviderFromNetworkId-nLBIQ_5p.native.esm.js";
3
+ import { a as fetchProjectSettings, i as generateSessionKeys, n as getVerifiedCredentialForWalletAccount, o as isSignedIn, r as __logoutWithReason_wrapped, s as retryOnFail, t as getWalletProviderByKey } from "./getWalletProviderByKey-DPZP397j.native.esm.js";
4
+ import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-BmB0lQJf.native.esm.js";
5
+ import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-Ebw4x90F.native.esm.js";
6
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DP0kk0tY.native.esm.js";
7
7
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
8
8
  import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, ProviderEnum as ProviderEnum$1, TokenScope, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
9
9
  import * as z from "zod/mini";
10
+ import { Linking } from "react-native";
10
11
  import EventEmitter, { EventEmitter as EventEmitter$1 } from "eventemitter3";
11
12
  import { Passkey } from "react-native-passkey";
12
13
 
@@ -777,26 +778,22 @@ const createNavigationHandler = () => {
777
778
  };
778
779
 
779
780
  //#endregion
780
- //#region src/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.ts
781
+ //#region src/services/openDeeplink/createDeeplinkOpener/createDeeplinkOpener.native.ts
781
782
  /**
782
- * Creates a deeplink opener that navigates the current tab to the deeplink URL.
783
+ * React Native variant of the deeplink opener.
783
784
  *
784
- * Uses `window.location.assign` instead of `window.open` deliberately.
785
- * This matters for Phantom redirect specifically, which is the only deep link
786
- * provider that redirects back to the app in a new tab. With `window.open`,
787
- * the browser first opens an `about:blank` tab before the native wallet app
788
- * handles the deep link. When Phantom redirects back, it opens yet another
789
- * tab. The user ends up with three tabs (original, about:blank, redirect) and
790
- * the browser focuses the lingering about:blank after the redirect tab closes.
791
- * `window.location.assign` reuses the current tab, avoiding the extra tab
792
- * entirely.
785
+ * Metro resolves `.native.ts` over the plain `.ts` counterpart, so this file
786
+ * is used exclusively in RN builds. React Native has no browser navigation, so
787
+ * the web implementation (`window.location.assign`) is unusable and RN's
788
+ * read-only `location` throws on href assignment. `Linking.openURL` is the
789
+ * platform primitive for handing a `metamask:`/`phantom:` pairing deeplink off
790
+ * to the wallet app.
793
791
  * @notInstrumented
794
792
  */
795
- const createWebDeeplinkOpener = () => {
796
- if (isServerSideRendering()) return () => Promise.reject(new UnavailableInServerSideError("createWebDeeplinkOpener"));
793
+ const createDeeplinkOpener = () => {
797
794
  return async (url) => {
798
795
  assertSafeDeeplinkUrl(url);
799
- window.location.assign(url);
796
+ await Linking.openURL(url);
800
797
  };
801
798
  };
802
799
 
@@ -1059,7 +1056,7 @@ const createCore = (config) => {
1059
1056
  storageAdapter: config.coreConfig?.storageAdapter ?? createLocalStorageAdapter()
1060
1057
  });
1061
1058
  const fetch = config.coreConfig?.fetch ?? createWebFetch();
1062
- const openDeeplink = config.coreConfig?.openDeeplink ?? createWebDeeplinkOpener();
1059
+ const openDeeplink = config.coreConfig?.openDeeplink ?? createDeeplinkOpener();
1063
1060
  const openAuthSession = config.coreConfig?.openAuthSession;
1064
1061
  const navigate = config.coreConfig?.navigate ?? createNavigationHandler();
1065
1062
  const state = createObservableState(getInitialState);