@dynamic-labs-sdk/client 1.12.1 → 1.13.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.
Files changed (538) hide show
  1. package/dist/{InvalidParamError-I6NfUdQL.esm.js → InvalidParamError-BeCPhfVz.esm.js} +79 -49
  2. package/dist/InvalidParamError-BeCPhfVz.esm.js.map +1 -0
  3. package/dist/{InvalidParamError-d0WFn5Ai.cjs → InvalidParamError-C7c-OLz1.cjs} +85 -49
  4. package/dist/InvalidParamError-C7c-OLz1.cjs.map +1 -0
  5. package/dist/{InvalidParamError-CKUis748.native.esm.js → InvalidParamError-CGiSxym5.native.esm.js} +54 -36
  6. package/dist/InvalidParamError-CGiSxym5.native.esm.js.map +1 -0
  7. package/dist/client/core/createCore/createCore.d.ts +1 -1
  8. package/dist/client/core/createCore/getInitialState.d.ts +1 -1
  9. package/dist/client/core/getCore/getCore.d.ts +1 -1
  10. package/dist/client/core/getCore/getCore.d.ts.map +1 -1
  11. package/dist/client/defaultClient/defaultClient.d.ts +2 -2
  12. package/dist/client/defaultClient/defaultClient.d.ts.map +1 -1
  13. package/dist/core.cjs +23 -23
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.esm.js +23 -23
  16. package/dist/core.esm.js.map +1 -1
  17. package/dist/core.native.esm.js +25 -25
  18. package/dist/core.native.esm.js.map +1 -1
  19. package/dist/errors/WaasOnboardingIncompleteError.d.ts +18 -0
  20. package/dist/errors/WaasOnboardingIncompleteError.d.ts.map +1 -0
  21. package/dist/exports/index.d.ts +1 -0
  22. package/dist/exports/index.d.ts.map +1 -1
  23. package/dist/{getNetworkProviderFromNetworkId-DpiVLfs_.native.esm.js → getNetworkProviderFromNetworkId-Be_UK4_7.native.esm.js} +54 -54
  24. package/dist/getNetworkProviderFromNetworkId-Be_UK4_7.native.esm.js.map +1 -0
  25. package/dist/{getNetworkProviderFromNetworkId-D6ABmeNQ.esm.js → getNetworkProviderFromNetworkId-CP9gl1B1.esm.js} +44 -44
  26. package/dist/getNetworkProviderFromNetworkId-CP9gl1B1.esm.js.map +1 -0
  27. package/dist/{getNetworkProviderFromNetworkId-CfW0tOnr.cjs → getNetworkProviderFromNetworkId-D8cpx0xz.cjs} +45 -45
  28. package/dist/getNetworkProviderFromNetworkId-D8cpx0xz.cjs.map +1 -0
  29. package/dist/{getSignedSessionId-Bc-sYE2A.cjs → getSignedSessionId-BeK0vWep.cjs} +7 -7
  30. package/dist/getSignedSessionId-BeK0vWep.cjs.map +1 -0
  31. package/dist/{getSignedSessionId-IEoo2Kv9.esm.js → getSignedSessionId-Bq7xBsA3.esm.js} +7 -7
  32. package/dist/getSignedSessionId-Bq7xBsA3.esm.js.map +1 -0
  33. package/dist/{getSignedSessionId-C6LJdiSK.native.esm.js → getSignedSessionId-D9w3Wbhk.native.esm.js} +7 -7
  34. package/dist/getSignedSessionId-D9w3Wbhk.native.esm.js.map +1 -0
  35. package/dist/{getWaasWalletProviderFromWalletAccount-D1wxsNEI.native.esm.js → getWaasWalletProviderFromWalletAccount-BKHO68FO.esm.js} +4 -4
  36. package/dist/getWaasWalletProviderFromWalletAccount-BKHO68FO.esm.js.map +1 -0
  37. package/dist/{getWaasWalletProviderFromWalletAccount-DojjjSIP.esm.js → getWaasWalletProviderFromWalletAccount-BzpLoZTm.native.esm.js} +4 -4
  38. package/dist/getWaasWalletProviderFromWalletAccount-BzpLoZTm.native.esm.js.map +1 -0
  39. package/dist/{getWaasWalletProviderFromWalletAccount-CSmVAhr2.cjs → getWaasWalletProviderFromWalletAccount-CfqTF_82.cjs} +4 -4
  40. package/dist/getWaasWalletProviderFromWalletAccount-CfqTF_82.cjs.map +1 -0
  41. package/dist/{getWalletProviderByKey-DsTEubkT.esm.js → getWalletProviderByKey-BMzoL_69.esm.js} +16 -34
  42. package/dist/getWalletProviderByKey-BMzoL_69.esm.js.map +1 -0
  43. package/dist/{getWalletProviderByKey-B821GpaI.cjs → getWalletProviderByKey-DCKYAida.cjs} +17 -41
  44. package/dist/getWalletProviderByKey-DCKYAida.cjs.map +1 -0
  45. package/dist/{getWalletProviderByKey-RTW-S68o.native.esm.js → getWalletProviderByKey-DDDxBsdv.native.esm.js} +41 -47
  46. package/dist/getWalletProviderByKey-DDDxBsdv.native.esm.js.map +1 -0
  47. package/dist/index.cjs +195 -248
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.esm.js +187 -241
  50. package/dist/index.esm.js.map +1 -1
  51. package/dist/index.native.esm.js +188 -242
  52. package/dist/index.native.esm.js.map +1 -1
  53. package/dist/{isDynamicWaasEnabled-vRyWP-1l.esm.js → isDynamicWaasEnabled-BMQq5uNX.esm.js} +3 -3
  54. package/dist/{isDynamicWaasEnabled-vRyWP-1l.esm.js.map → isDynamicWaasEnabled-BMQq5uNX.esm.js.map} +1 -1
  55. package/dist/{isDynamicWaasEnabled-CBOG0ITH.cjs → isDynamicWaasEnabled-BtbzDbdz.cjs} +4 -4
  56. package/dist/{isDynamicWaasEnabled-CBOG0ITH.cjs.map → isDynamicWaasEnabled-BtbzDbdz.cjs.map} +1 -1
  57. package/dist/{isDynamicWaasEnabled-CBLpFRnd.native.esm.js → isDynamicWaasEnabled-ChdeBFbN.native.esm.js} +3 -3
  58. package/dist/{isDynamicWaasEnabled-CBLpFRnd.native.esm.js.map → isDynamicWaasEnabled-ChdeBFbN.native.esm.js.map} +1 -1
  59. package/dist/{isMfaRequiredForAction-DL013-fR.cjs → isMfaRequiredForAction-CgWBU6kM.cjs} +11 -11
  60. package/dist/isMfaRequiredForAction-CgWBU6kM.cjs.map +1 -0
  61. package/dist/{isMfaRequiredForAction-C1-1spV9.esm.js → isMfaRequiredForAction-Diwsf9GB.esm.js} +11 -11
  62. package/dist/isMfaRequiredForAction-Diwsf9GB.esm.js.map +1 -0
  63. package/dist/{isMfaRequiredForAction-D1AYL99a.native.esm.js → isMfaRequiredForAction-dAtK8Pl6.native.esm.js} +4 -4
  64. package/dist/{isMfaRequiredForAction-D1AYL99a.native.esm.js.map → isMfaRequiredForAction-dAtK8Pl6.native.esm.js.map} +1 -1
  65. package/dist/isUserOnboardingComplete-D4Y3sdr3.esm.js +121 -0
  66. package/dist/isUserOnboardingComplete-D4Y3sdr3.esm.js.map +1 -0
  67. package/dist/isUserOnboardingComplete-DO2_gSAp.native.esm.js +121 -0
  68. package/dist/isUserOnboardingComplete-DO2_gSAp.native.esm.js.map +1 -0
  69. package/dist/isUserOnboardingComplete-OP4uyUlE.cjs +151 -0
  70. package/dist/isUserOnboardingComplete-OP4uyUlE.cjs.map +1 -0
  71. package/dist/modules/apiClient/createApiClient.d.ts +1 -1
  72. package/dist/modules/apiClient/utils/clientErrorMapper/clientErrorMapper.d.ts +1 -1
  73. package/dist/modules/apiClient/utils/convertToApiErrorMiddleware/convertToApiErrorMiddleware.d.ts +1 -1
  74. package/dist/modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware.d.ts +1 -1
  75. package/dist/modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware.d.ts.map +1 -1
  76. package/dist/modules/apiClient/utils/unauthorizedMiddleware/createUnauthorizedMiddleware.d.ts +1 -1
  77. package/dist/modules/apiClient/utils/unauthorizedMiddleware/createUnauthorizedMiddleware.d.ts.map +1 -1
  78. package/dist/modules/auth/createVisit/createVisit.d.ts +1 -1
  79. package/dist/modules/auth/createVisit/createVisit.d.ts.map +1 -1
  80. package/dist/modules/auth/decodeJwt/decodeJwt.d.ts +1 -1
  81. package/dist/modules/auth/extractSessionId/extractSessionId.d.ts +1 -1
  82. package/dist/modules/auth/getElevatedAccessToken/getElevatedAccessToken.d.ts +1 -1
  83. package/dist/modules/auth/initializeAuth/initializeAuth.d.ts +1 -1
  84. package/dist/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.d.ts +1 -1
  85. package/dist/modules/auth/isSignedIn/isSignedIn.d.ts +1 -1
  86. package/dist/modules/auth/logout/logout.d.ts +1 -1
  87. package/dist/modules/auth/passkeys/getPasskeyAuthenticationOptions/getPasskeyAuthenticationOptions.d.ts +1 -1
  88. package/dist/modules/auth/passkeys/getPasskeyAuthenticationOptions/getPasskeyAuthenticationOptions.d.ts.map +1 -1
  89. package/dist/modules/auth/passkeys/getPasskeyAuthenticationSignInOptions/getPasskeyAuthenticationSignInOptions.d.ts +1 -1
  90. package/dist/modules/auth/passkeys/getPasskeyAuthenticationSignInOptions/getPasskeyAuthenticationSignInOptions.d.ts.map +1 -1
  91. package/dist/modules/auth/passkeys/getPasskeyRegistrationOptions/getPasskeyRegistrationOptions.d.ts +1 -1
  92. package/dist/modules/auth/passkeys/getPasskeyRegistrationOptions/getPasskeyRegistrationOptions.d.ts.map +1 -1
  93. package/dist/modules/auth/passkeys/getPasskeys/getPasskeys.d.ts +1 -1
  94. package/dist/modules/auth/passkeys/serverAuthenticatePasskey/serverAuthenticatePasskey.d.ts +1 -1
  95. package/dist/modules/auth/passkeys/serverAuthenticatePasskey/serverAuthenticatePasskey.d.ts.map +1 -1
  96. package/dist/modules/auth/passkeys/serverRegisterPasskey/serverRegisterPasskey.d.ts +1 -1
  97. package/dist/modules/auth/passkeys/serverRegisterPasskey/serverRegisterPasskey.d.ts.map +1 -1
  98. package/dist/modules/auth/passkeys/serverSigninPasskey/serverSigninPasskey.d.ts +1 -1
  99. package/dist/modules/auth/passkeys/serverSigninPasskey/serverSigninPasskey.d.ts.map +1 -1
  100. package/dist/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.d.ts +1 -1
  101. package/dist/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.d.ts +1 -1
  102. package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts +1 -1
  103. package/dist/modules/auth/social/oauth/processSocialCallback/processSocialCallback.d.ts +1 -1
  104. package/dist/modules/auth/social/oauth/processSocialCallback/processSocialCallback.d.ts.map +1 -1
  105. package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts +2 -2
  106. package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/buildOAuthUrl.d.ts +2 -2
  107. package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.d.ts +1 -1
  108. package/dist/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.d.ts +1 -1
  109. package/dist/modules/auth/social/removeDynamicOauthParamsFromUrl/removeDynamicOauthParamsFromUrl.d.ts.map +1 -1
  110. package/dist/modules/auth/updateAuthFromVerifyResponse/checkAndRaiseWalletAccountsChangedEvent/checkAndRaiseWalletAccountsChangedEvent.d.ts +1 -1
  111. package/dist/modules/auth/updateAuthFromVerifyResponse/checkAndRaiseWalletAccountsChangedEvent/checkAndRaiseWalletAccountsChangedEvent.d.ts.map +1 -1
  112. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.d.ts +1 -1
  113. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts +1 -1
  114. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/upsertElevatedAccessToken.d.ts +1 -1
  115. package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts +1 -1
  116. package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
  117. package/dist/modules/balances/getBalances/getBalances.d.ts +1 -1
  118. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +1 -1
  119. package/dist/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.d.ts +1 -1
  120. package/dist/modules/balances/getTokenBalances/getTokenBalances.d.ts +2 -2
  121. package/dist/modules/captcha/consumeCaptchaToken/consumeCaptchaToken.d.ts +1 -1
  122. package/dist/modules/captcha/isCaptchaRequired/isCaptchaRequired.d.ts +1 -1
  123. package/dist/modules/captcha/isCaptchaRequired/isCaptchaRequired.d.ts.map +1 -1
  124. package/dist/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.d.ts +1 -1
  125. package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +1 -1
  126. package/dist/modules/checkout/getCheckouts/getCheckouts.d.ts +1 -1
  127. package/dist/modules/checkout/getCheckouts/getCheckouts.d.ts.map +1 -1
  128. package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts +1 -1
  129. package/dist/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.d.ts +1 -1
  130. package/dist/modules/checkout/utils/createCheckoutApiClient/createCheckoutApiClient.d.ts +1 -1
  131. package/dist/modules/checkout/utils/createCheckoutApiClient/createCheckoutApiClient.d.ts.map +1 -1
  132. package/dist/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.d.ts +1 -1
  133. package/dist/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.d.ts.map +1 -1
  134. package/dist/modules/checkout/utils/createCheckoutTransactionChannelSchema/createCheckoutTransactionChannelSchema.d.ts +1 -1
  135. package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts +1 -1
  136. package/dist/modules/checkout/utils/subscribeToCheckoutTransaction/subscribeToCheckoutTransaction.d.ts +1 -1
  137. package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.d.ts +1 -1
  138. package/dist/modules/clientEvents/clientEvents.d.ts +4 -4
  139. package/dist/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.d.ts +1 -1
  140. package/dist/modules/deviceRegistration/detectDeviceRegistrationRedirect/detectDeviceRegistrationRedirect.d.ts +1 -1
  141. package/dist/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.d.ts +1 -1
  142. package/dist/modules/deviceRegistration/getDeviceSigner/getDeviceSigner.d.ts +1 -1
  143. package/dist/modules/deviceRegistration/getDeviceSigner/getDeviceSigner.d.ts.map +1 -1
  144. package/dist/modules/deviceRegistration/getDeviceSigner/getOrCreateEnvironmentDeviceSigningKeys/getOrCreateEnvironmentDeviceSigningKeys.d.ts +1 -1
  145. package/dist/modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners/getHeadersForNonceSignedByDeviceSigners.d.ts +1 -1
  146. package/dist/modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners/getHeadersForNonceSignedByDeviceSigners.d.ts.map +1 -1
  147. package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts +1 -1
  148. package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
  149. package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts +1 -1
  150. package/dist/modules/extension/hasExtension/hasExtension.d.ts +1 -1
  151. package/dist/modules/extension/registerExtension/registerExtension.d.ts +1 -1
  152. package/dist/modules/flow/getFlow/getFlow.d.ts +1 -1
  153. package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts +1 -1
  154. package/dist/modules/flow/utils/clearFlowSessionToken/clearFlowSessionToken.d.ts +1 -1
  155. package/dist/modules/flow/utils/createFlowApiClient/createFlowApiClient.d.ts +1 -1
  156. package/dist/modules/flow/utils/createFlowApiClient/createFlowApiClient.d.ts.map +1 -1
  157. package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts +1 -1
  158. package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts.map +1 -1
  159. package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/withFlowSessionTokenCleanupOn401.d.ts +1 -1
  160. package/dist/modules/funding/coinbase/addCoinbaseOnrampOrderEventListener/addCoinbaseOnrampOrderEventListener.d.ts +1 -1
  161. package/dist/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.d.ts +1 -1
  162. package/dist/modules/funding/coinbase/getMissingVerificationForCoinbaseOnrampOrder/getMissingVerificationForCoinbaseOnrampOrder.d.ts +1 -1
  163. package/dist/modules/funding/coinbase/utils/validateUserCredentialsForCoinbaseOnrampOrder/validateUserCredentialsForCoinbaseOnrampOrder.d.ts +1 -1
  164. package/dist/modules/funding/coinbase/utils/validateUserCredentialsForCoinbaseOnrampOrder/validateUserCredentialsForCoinbaseOnrampOrder.d.ts.map +1 -1
  165. package/dist/modules/funding/kraken/createKrakenExchangeTransfer/createKrakenExchangeTransfer.d.ts +1 -1
  166. package/dist/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.d.ts +2 -2
  167. package/dist/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.d.ts +1 -1
  168. package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts +1 -1
  169. package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts +1 -1
  170. package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts.map +1 -1
  171. package/dist/modules/keychainMigration/migrateSessionKeyToKeychain/migrateSessionKeyToKeychain.d.ts +1 -1
  172. package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/collectInstalledGroupIds/collectInstalledGroupIds.d.ts +1 -1
  173. package/dist/modules/legacyWalletBook/excludeInstalledFromCatalog/excludeInstalledFromCatalog.d.ts +1 -1
  174. package/dist/modules/legacyWalletBook/fetchLegacyWalletBook/fetchLegacyWalletBook.d.ts +1 -1
  175. package/dist/modules/legacyWalletBook/fetchLegacyWalletBook/fetchWithTimeout/fetchWithTimeout.d.ts +1 -1
  176. package/dist/modules/legacyWalletBook/getSpriteUrl/getSpriteUrl.d.ts +1 -1
  177. package/dist/modules/legacyWalletBook/getWalletBookCdnUrl/getWalletBookCdnUrl.d.ts +1 -1
  178. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts +2 -2
  179. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.d.ts +1 -1
  180. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getWalletConnectCatalog.d.ts +1 -1
  181. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts +1 -1
  182. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformGroup/transformGroup.d.ts +1 -1
  183. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWallet/transformWallet.d.ts +1 -1
  184. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/transformWalletBook/transformWalletBook.d.ts +1 -1
  185. package/dist/modules/legacyWalletBook/getWalletConnectCatalogWalletByWalletProviderKey/getWalletConnectCatalogWalletByWalletProviderKey.d.ts +1 -1
  186. package/dist/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.d.ts +1 -1
  187. package/dist/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/matchWalletProvidersToCatalogGroup.d.ts +1 -1
  188. package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts +2 -2
  189. package/dist/modules/mfa/authenticateMfaRecoveryCode/authenticateMfaRecoveryCode.d.ts +1 -1
  190. package/dist/modules/mfa/authenticatePasskeyMFA/authenticatePasskeyMFA.d.ts +1 -1
  191. package/dist/modules/mfa/authenticateTotpMfaDevice/authenticateTotpMfaDevice.d.ts +1 -1
  192. package/dist/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.d.ts +1 -1
  193. package/dist/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.d.ts.map +1 -1
  194. package/dist/modules/mfa/getMfaDevices/getMfaDevices.d.ts +1 -1
  195. package/dist/modules/mfa/getMfaMethods/getMfaMethods.d.ts +1 -1
  196. package/dist/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.d.ts +1 -1
  197. package/dist/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.d.ts +1 -1
  198. package/dist/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.d.ts +1 -1
  199. package/dist/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.d.ts +1 -1
  200. package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts +1 -1
  201. package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts.map +1 -1
  202. package/dist/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.d.ts +1 -1
  203. package/dist/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.d.ts.map +1 -1
  204. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +1 -1
  205. package/dist/modules/projectSettings/isCookieEnabled/isCookieEnabled.d.ts +1 -1
  206. package/dist/modules/screenshotProtection/setScreenshotProtection/setScreenshotProtection.d.ts +1 -1
  207. package/dist/modules/sessionKeys/generateNonceSignature/generateNonceSignature.d.ts +1 -1
  208. package/dist/modules/sessionKeys/generateNonceSignature/generateNonceSignature.d.ts.map +1 -1
  209. package/dist/modules/sessionKeys/generateSessionKeys/generateSessionKeys.d.ts +1 -1
  210. package/dist/modules/sessionKeys/generateSessionKeys/generateSessionKeys.d.ts.map +1 -1
  211. package/dist/modules/sessionKeys/generateSessionSignature/generateSessionSignature.d.ts +1 -1
  212. package/dist/modules/sessionKeys/generateSessionSignature/generateSessionSignature.d.ts.map +1 -1
  213. package/dist/modules/sessionKeys/getSessionKeys/getSessionKeys.d.ts +1 -1
  214. package/dist/modules/sessionKeys/getSessionKeys/getSessionKeys.d.ts.map +1 -1
  215. package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts +1 -1
  216. package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts.map +1 -1
  217. package/dist/modules/state/raiseStateEvents/raiseStateEvents.d.ts +1 -1
  218. package/dist/modules/state/raiseStateEvents/raiseStateEvents.d.ts.map +1 -1
  219. package/dist/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.d.ts +1 -1
  220. package/dist/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.d.ts.map +1 -1
  221. package/dist/modules/storageSync/initializeStorageSync.d.ts +1 -1
  222. package/dist/modules/storageSync/initializeStorageSync.d.ts.map +1 -1
  223. package/dist/modules/storageSync/syncStateWithStorage/syncStateWithStorage.d.ts +1 -1
  224. package/dist/modules/storageSync/syncStateWithStorage/syncStateWithStorage.d.ts.map +1 -1
  225. package/dist/modules/swap/getSwapQuote/getSwapQuote.d.ts +1 -1
  226. package/dist/modules/swap/getSwapStatus/getSwapStatus.d.ts +1 -1
  227. package/dist/modules/swap/utils/ensureCorrectActiveNetwork/ensureCorrectActiveNetwork.d.ts +1 -1
  228. package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts +10 -3
  229. package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts.map +1 -1
  230. package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts +1 -1
  231. package/dist/modules/waas/createWaasClient/createNativeWaasSDKContainer.d.ts +1 -1
  232. package/dist/modules/waas/createWaasClient/createWaasClient.d.ts +1 -1
  233. package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
  234. package/dist/modules/waas/createWaasClient/createWaasSDKContainer.d.ts +1 -1
  235. package/dist/modules/waas/createWaasClient/translateNativeOpenError.d.ts +1 -1
  236. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts +1 -1
  237. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  238. package/dist/modules/waas/createWaasWalletAccounts/createWaasWalletAccounts.d.ts +2 -2
  239. package/dist/modules/waas/delegateWaasKeyShares/delegateWaasKeyShares.d.ts +1 -1
  240. package/dist/modules/waas/exportWaasClientKeyshares/exportWaasClientKeyshares.d.ts +1 -1
  241. package/dist/modules/waas/exportWaasPrivateKey/exportWaasPrivateKey.d.ts +1 -1
  242. package/dist/modules/waas/exportWaasPrivateKeyToContainer/exportWaasPrivateKeyToContainer.d.ts +1 -1
  243. package/dist/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.d.ts +1 -1
  244. package/dist/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.d.ts.map +1 -1
  245. package/dist/modules/waas/getAllUserWaasAddressesForChain/getAllUserWaasAddressesForChain.d.ts +1 -1
  246. package/dist/modules/waas/getAllUserWaasAddressesForChain/getAllUserWaasAddressesForChain.d.ts.map +1 -1
  247. package/dist/modules/waas/getChainsMissingWaasWalletAccounts/getChainsMissingWaasWalletAccounts.d.ts +1 -1
  248. package/dist/modules/waas/getWaasChainNameFromChain/getWaasChainNameFromChain.d.ts +1 -1
  249. package/dist/modules/waas/getWaasChainNameFromChain/getWaasChainNameFromChain.d.ts.map +1 -1
  250. package/dist/modules/waas/getWaasWalletProviderByChain/getWaasWalletProviderByChain.d.ts +1 -1
  251. package/dist/modules/waas/getWaasWalletProviderByChain/getWaasWalletProviderByChain.d.ts.map +1 -1
  252. package/dist/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.d.ts +1 -1
  253. package/dist/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.d.ts.map +1 -1
  254. package/dist/modules/waas/getWalletRecoveryState/getWalletRecoveryState.d.ts +1 -1
  255. package/dist/modules/waas/hasDelegatedAccess/hasDelegatedAccess.d.ts +1 -1
  256. package/dist/modules/waas/importWaasPrivateKey/importWaasPrivateKey.d.ts +1 -1
  257. package/dist/modules/waas/initializeWaasClientsForEagerRecovery/initializeWaasClientsForEagerRecovery.d.ts +1 -1
  258. package/dist/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.d.ts +1 -1
  259. package/dist/modules/waas/isPasswordRequiredForWaasWallets/isPasswordRequiredForWaasWallets.d.ts +1 -1
  260. package/dist/modules/waas/isWaasWalletAccount/isWaasWalletAccount.d.ts +1 -1
  261. package/dist/modules/waas/isWaasWalletProvider/isWaasWalletProvider.d.ts +1 -1
  262. package/dist/modules/waas/isWaasWalletProvider/isWaasWalletProvider.d.ts.map +1 -1
  263. package/dist/modules/waas/isWalletCreationRequirement/isWalletCreationRequirement.d.ts +1 -1
  264. package/dist/modules/waas/normalizeWalletRequirements/normalizeWalletRequirements.d.ts +1 -1
  265. package/dist/modules/waas/preconnectWaasIframe/preconnectWaasIframe.d.ts +1 -1
  266. package/dist/modules/waas/refreshWaasWalletAccountShares/refreshWaasWalletAccountShares.d.ts +1 -1
  267. package/dist/modules/waas/revokeWaasDelegation/revokeWaasDelegation.d.ts +1 -1
  268. package/dist/modules/waas/setWaasWalletAccountPassword/setWaasWalletAccountPassword.d.ts +1 -1
  269. package/dist/modules/waas/shouldAutoCreateWalletForChain/shouldAutoCreateWalletForChain.d.ts +1 -1
  270. package/dist/modules/waas/unlockWallet/unlockWallet.d.ts +1 -1
  271. package/dist/modules/waas/updateWaasPassword/updateWaasPassword.d.ts +1 -1
  272. package/dist/modules/walletBackup/googleDrive/findMissingGoogleDriveBackupScopes/findMissingGoogleDriveBackupScopes.d.ts +1 -1
  273. package/dist/modules/walletBackup/googleDrive/hasAllGoogleDriveBackupScopes/hasAllGoogleDriveBackupScopes.d.ts +1 -1
  274. package/dist/modules/walletBackup/googleDrive/isInsufficientGoogleDriveScopesError/isInsufficientGoogleDriveScopesError.d.ts +1 -1
  275. package/dist/modules/walletBackup/googleDrive/utils/fetchGoogleDriveOauthAccess/fetchGoogleDriveOauthAccess.d.ts +1 -1
  276. package/dist/modules/walletBackup/googleDrive/utils/findGoogleOauthAccountId/findGoogleOauthAccountId.d.ts +1 -1
  277. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts +1 -1
  278. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts +1 -1
  279. package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts +1 -1
  280. package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts +1 -1
  281. package/dist/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.d.ts +1 -1
  282. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +1 -1
  283. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +1 -1
  284. package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts +1 -1
  285. package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts +1 -1
  286. package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts +1 -1
  287. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts +1 -1
  288. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts +1 -1
  289. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts +1 -1
  290. package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts +1 -1
  291. package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.d.ts +1 -1
  292. package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts +1 -1
  293. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +1 -1
  294. package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts +1 -1
  295. package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts +1 -1
  296. package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +1 -1
  297. package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts +1 -1
  298. package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +1 -1
  299. package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +1 -1
  300. package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +1 -1
  301. package/dist/modules/wallets/assertWalletAccountSigningAvailability/assertWalletAccountSigningAvailability.d.ts +1 -1
  302. package/dist/modules/wallets/destroyWalletProviders/destroyWalletProviders.d.ts +1 -1
  303. package/dist/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.d.ts +1 -1
  304. package/dist/modules/wallets/emitWalletAccountsChangedEvent/emitWalletAccountsChangedEvent.d.ts +1 -1
  305. package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts +1 -1
  306. package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts +1 -1
  307. package/dist/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.d.ts +1 -1
  308. package/dist/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.d.ts.map +1 -1
  309. package/dist/modules/wallets/getWalletAccountAddressByType/getWalletAccountAddressByType.d.ts +1 -1
  310. package/dist/modules/wallets/getWalletAccountAddressByType/getWalletAccountAddressByType.d.ts.map +1 -1
  311. package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts +1 -1
  312. package/dist/modules/wallets/getWalletAccounts/getWalletAccountsFromState/getWalletAccountsFromState.d.ts +1 -1
  313. package/dist/modules/wallets/getWalletAccounts/getWalletAccountsFromState/getWalletAccountsFromState.d.ts.map +1 -1
  314. package/dist/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.d.ts +1 -1
  315. package/dist/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.d.ts.map +1 -1
  316. package/dist/modules/wallets/getWalletProviderDataByKey/getWalletProviderDataByKey.d.ts +1 -1
  317. package/dist/modules/wallets/getWalletProviders/getWalletProviders.d.ts +1 -1
  318. package/dist/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/canConnectWithHardwareWallet.d.ts +1 -1
  319. package/dist/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/formatSignatureForHardwareWallet.d.ts +1 -1
  320. package/dist/modules/wallets/hardwareWallet/isHardwareWalletAccount/isHardwareWalletAccount.d.ts +1 -1
  321. package/dist/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.d.ts +1 -1
  322. package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts +1 -1
  323. package/dist/modules/wallets/isWalletAccountVerified/isWalletAccountVerified.d.ts +1 -1
  324. package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts +1 -1
  325. package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts.map +1 -1
  326. package/dist/modules/wallets/networks/getActiveNetworkData/getActiveNetworkData.d.ts +1 -1
  327. package/dist/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.d.ts +1 -1
  328. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +1 -1
  329. package/dist/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.d.ts +1 -1
  330. package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts +1 -1
  331. package/dist/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.d.ts +1 -1
  332. package/dist/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.d.ts.map +1 -1
  333. package/dist/modules/wallets/networks/getNetworkProviderFromNetworkId/getNetworkProviderFromNetworkId.d.ts +1 -1
  334. package/dist/modules/wallets/networks/getNetworkProviderFromNetworkId/getNetworkProviderFromNetworkId.d.ts.map +1 -1
  335. package/dist/modules/wallets/networks/getNetworkProviders/getNetworkProviders.d.ts +1 -1
  336. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts +1 -1
  337. package/dist/modules/wallets/networks/getSdkChainFromApiChainName/getSdkChainFromApiChainName.d.ts +1 -1
  338. package/dist/modules/wallets/networks/getTransactionHistory/getTransactionHistory.d.ts +1 -1
  339. package/dist/modules/wallets/networks/isProgrammaticNetworkSwitchAvailable/isProgrammaticNetworkSwitchAvailable.d.ts +1 -1
  340. package/dist/modules/wallets/networks/lastKnownNetworkRegistry/createLastKnownNetworkRegistry/createLastKnownNetworkRegistry.d.ts +1 -1
  341. package/dist/modules/wallets/networks/networkProviderBuilderRegistry/createNetworkProviderBuilderRegistry/createNetworkProviderBuilderRegistry.d.ts +1 -1
  342. package/dist/modules/wallets/networks/networkProviderBuilderRegistry/createNetworkProviderBuilderRegistry/createNetworkProviderBuilderRegistry.d.ts.map +1 -1
  343. package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts +1 -1
  344. package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.d.ts +1 -1
  345. package/dist/modules/wallets/unverifiedWalletAccounts/removeUnverifiedWalletAccount/removeUnverifiedWalletAccount.d.ts +1 -1
  346. package/dist/modules/wallets/unverifiedWalletAccounts/setUnverifiedWalletAccounts/setUnverifiedWalletAccounts.d.ts +1 -1
  347. package/dist/modules/wallets/userHasEmbeddedWalletForChain/userHasEmbeddedWalletForChain.d.ts +1 -1
  348. package/dist/modules/wallets/userHasEmbeddedWalletForChain/userHasEmbeddedWalletForChain.d.ts.map +1 -1
  349. package/dist/modules/wallets/userHasExternalWallet/userHasExternalWallet.d.ts +1 -1
  350. package/dist/modules/wallets/userHasExternalWallet/userHasExternalWallet.d.ts.map +1 -1
  351. package/dist/modules/wallets/utils/convertUnverifiedWalletAccountToWalletAccount/convertUnverifiedWalletAccountToWalletAccount.d.ts +1 -1
  352. package/dist/modules/wallets/utils/convertUnverifiedWalletAccountToWalletAccount/convertUnverifiedWalletAccountToWalletAccount.d.ts.map +1 -1
  353. package/dist/modules/wallets/utils/convertVerifiedCredentialToWalletAccount/convertVerifiedCredentialToWalletAccount.d.ts +1 -1
  354. package/dist/modules/wallets/utils/convertVerifiedCredentialToWalletAccount/convertVerifiedCredentialToWalletAccount.d.ts.map +1 -1
  355. package/dist/modules/wallets/utils/formatSignInMessage/formatSignInMessage.d.ts +1 -1
  356. package/dist/modules/wallets/utils/formatWalletAccountId/formatWalletAccountId.d.ts +1 -1
  357. package/dist/modules/wallets/utils/formatWalletAccountId/formatWalletAccountId.d.ts.map +1 -1
  358. package/dist/modules/wallets/utils/formatWalletProviderGroupKey/formatWalletProviderGroupKey.d.ts +1 -1
  359. package/dist/modules/wallets/utils/formatWalletProviderGroupKey/formatWalletProviderGroupKey.d.ts.map +1 -1
  360. package/dist/modules/wallets/utils/formatWalletProviderKey/formatWalletProviderKey.d.ts +1 -1
  361. package/dist/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.d.ts +1 -1
  362. package/dist/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.d.ts.map +1 -1
  363. package/dist/modules/wallets/utils/getAllProvidersFromWindow/getAllProvidersFromWindow.d.ts +1 -1
  364. package/dist/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.d.ts +1 -1
  365. package/dist/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.d.ts.map +1 -1
  366. package/dist/modules/wallets/utils/getChainIdForAccountVerification/getChainIdForAccountVerification.d.ts +1 -1
  367. package/dist/modules/wallets/utils/getChainIdForAccountVerification/getChainIdForAccountVerification.d.ts.map +1 -1
  368. package/dist/modules/wallets/utils/getInjectedProviderFromWindow/getInjectedProviderFromWindow.d.ts +1 -1
  369. package/dist/modules/wallets/utils/getInjectedProviderFromWindow/getInjectedProviderFromWindow.d.ts.map +1 -1
  370. package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts +1 -1
  371. package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts.map +1 -1
  372. package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts +1 -1
  373. package/dist/modules/wallets/utils/getSignInMessage/getSignInMessage.d.ts.map +1 -1
  374. package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts +1 -1
  375. package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts.map +1 -1
  376. package/dist/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.d.ts +1 -1
  377. package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts +1 -1
  378. package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts.map +1 -1
  379. package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts +1 -1
  380. package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts.map +1 -1
  381. package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts +1 -1
  382. package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts.map +1 -1
  383. package/dist/modules/wallets/utils/normalizeWalletNameWithChain/normalizeWalletNameWithChain.d.ts +1 -1
  384. package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts +1 -1
  385. package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts +1 -1
  386. package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts +1 -1
  387. package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts.map +1 -1
  388. package/dist/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.d.ts +1 -1
  389. package/dist/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.d.ts.map +1 -1
  390. package/dist/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.d.ts +1 -1
  391. package/dist/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.d.ts.map +1 -1
  392. package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.d.ts +2 -2
  393. package/dist/modules/wallets/walletProvider/events/offWalletProviderEvent/offWalletProviderEvent.d.ts +1 -1
  394. package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts +1 -1
  395. package/dist/modules/wallets/walletProvider/extractChainFromNormalizedName/extractChainFromNormalizedName.d.ts +1 -1
  396. package/dist/modules/wallets/walletProvider/isDeeplinkWalletProvider/isDeeplinkWalletProvider.d.ts +1 -1
  397. package/dist/modules/wallets/walletProvider/splitWalletProviderKey/splitWalletProviderKey.d.ts +1 -1
  398. package/dist/modules/wallets/walletProvider/splitWalletProviderKey/splitWalletProviderKey.d.ts.map +1 -1
  399. package/dist/modules/wallets/walletProvider/walletProviderKeyMap/getWalletProviderKeyFromVerifiedCredential/getWalletProviderKeyFromVerifiedCredential.d.ts +1 -1
  400. package/dist/modules/wallets/walletProvider/walletProviderKeyMap/getWalletProviderKeyFromVerifiedCredential/getWalletProviderKeyFromVerifiedCredential.d.ts.map +1 -1
  401. package/dist/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.d.ts +1 -1
  402. package/dist/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.d.ts.map +1 -1
  403. package/dist/modules/wallets/walletProviderRegistry/createWalletProviderRegistry/createWalletProviderRegistry.d.ts +1 -1
  404. package/dist/{refreshAuth-BWQWl4uA.esm.js → refreshAuth-BTPctQtq.esm.js} +3 -3
  405. package/dist/{refreshAuth-BWQWl4uA.esm.js.map → refreshAuth-BTPctQtq.esm.js.map} +1 -1
  406. package/dist/{refreshAuth-tjEnkc58.cjs → refreshAuth-ByIVzawo.cjs} +3 -3
  407. package/dist/{refreshAuth-tjEnkc58.cjs.map → refreshAuth-ByIVzawo.cjs.map} +1 -1
  408. package/dist/{refreshAuth-D8UjWFLB.native.esm.js → refreshAuth-C3issn5b.native.esm.js} +3 -3
  409. package/dist/{refreshAuth-D8UjWFLB.native.esm.js.map → refreshAuth-C3issn5b.native.esm.js.map} +1 -1
  410. package/dist/services/asyncTrack/createAsyncTrack.d.ts +1 -1
  411. package/dist/services/crossTabBroadcast/createCrossTabBroadcast/createCrossTabBroadcast.d.ts +1 -1
  412. package/dist/services/eventEmitter/createEventEmitter.d.ts +1 -1
  413. package/dist/services/eventEmitter/createEventEmitter.d.ts.map +1 -1
  414. package/dist/services/fetch/createWebFetch.d.ts +1 -1
  415. package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts +1 -1
  416. package/dist/services/instrumentation/createInstrumentation/createInstrumentation.d.ts +1 -1
  417. package/dist/services/instrumentation/instrumentFunction/extractParams/extractParams.d.ts +1 -1
  418. package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +1 -1
  419. package/dist/services/instrumentation/instrumentFunction/scrubResolvedValue/scrubResolvedValue.d.ts +1 -1
  420. package/dist/services/instrumentation/scrubParameters/scrubParameters.d.ts +1 -1
  421. package/dist/services/instrumentation/scrubParameters/scrubParameters.d.ts.map +1 -1
  422. package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts +1 -1
  423. package/dist/services/keychain/createKeychainService/createKeychainService.d.ts +1 -1
  424. package/dist/services/keychain/createKeychainService/createKeychainService.d.ts.map +1 -1
  425. package/dist/services/keychain/createKeychainService/utils/deleteIndexedDBItem.d.ts +1 -1
  426. package/dist/services/keychain/createKeychainService/utils/deleteIndexedDBItem.d.ts.map +1 -1
  427. package/dist/services/keychain/createKeychainService/utils/getIndexedDBItem.d.ts +1 -1
  428. package/dist/services/keychain/createKeychainService/utils/getIndexedDBItem.d.ts.map +1 -1
  429. package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts +1 -1
  430. package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts.map +1 -1
  431. package/dist/services/keychain/createKeychainService/utils/setIndexedDBItem.d.ts +1 -1
  432. package/dist/services/keychain/createKeychainService/utils/setIndexedDBItem.d.ts.map +1 -1
  433. package/dist/services/keychain/createKeychainService/utils/withDatabase/withDatabase.d.ts +1 -1
  434. package/dist/services/logger/createLogger/createLogger.d.ts +2 -2
  435. package/dist/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.d.ts +1 -1
  436. package/dist/services/navigate/createNavigationHandler/createNavigationHandler.d.ts +1 -1
  437. package/dist/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.d.ts +1 -1
  438. package/dist/services/passkey/createPasskeyService/createPasskeyService.d.ts +1 -1
  439. package/dist/services/realtime/createRealtimeChannelSchema/createRealtimeChannelSchema.d.ts +1 -1
  440. package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts +1 -1
  441. package/dist/services/runtimeServices/createRuntimeServiceAccessKey/createRuntimeServiceAccessKey.d.ts +1 -1
  442. package/dist/services/runtimeServices/createRuntimeServices/createRuntimeServices.d.ts +1 -1
  443. package/dist/services/storage/createLocalStorageAdapter/createLocalStorageAdapter.d.ts +1 -1
  444. package/dist/services/storage/createStorage/createStorage.d.ts +1 -1
  445. package/dist/services/storage/createStorage/formatForStorage/isValidDateISOString/isValidDateISOString.d.ts +1 -1
  446. package/dist/services/storage/createStorage/formatForStorage/storageFormat.d.ts +2 -2
  447. package/dist/services/storage/createStorage/formatForStorage/storageFormat.d.ts.map +1 -1
  448. package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts +1 -1
  449. package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts.map +1 -1
  450. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  451. package/dist/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.d.ts +1 -1
  452. package/dist/utils/base64UrlDecode/base64UrlDecode.d.ts +1 -1
  453. package/dist/utils/base64urlFromBytes/base64urlFromBytes.d.ts +1 -1
  454. package/dist/utils/bufferToBase64/bufferToBase64.d.ts +1 -1
  455. package/dist/utils/bufferToBase64/bufferToBase64.d.ts.map +1 -1
  456. package/dist/utils/bufferToHex/bufferToHex.d.ts +1 -1
  457. package/dist/utils/bytesFromBase64url/bytesFromBase64url.d.ts +1 -1
  458. package/dist/utils/compressRawPublicKey/compressRawPublicKey.d.ts +1 -1
  459. package/dist/utils/debouncedMutex/createDebouncedMutex/createDebouncedMutex.d.ts +1 -1
  460. package/dist/utils/debouncedMutex/createDebouncedMutex/createDebouncedMutex.d.ts.map +1 -1
  461. package/dist/utils/deferredPromise/createDeferredPromise.d.ts +1 -1
  462. package/dist/utils/deferredPromise/createDeferredPromise.d.ts.map +1 -1
  463. package/dist/utils/derToP1363/derToP1363.d.ts +1 -1
  464. package/dist/utils/digestSHA256/digestSHA256.d.ts +1 -1
  465. package/dist/utils/digestSHA256/digestSHA256.d.ts.map +1 -1
  466. package/dist/utils/encodeBase64Url/encodeBase64Url.d.ts +1 -1
  467. package/dist/utils/filterDuplicates/filterDuplicates.d.ts +1 -1
  468. package/dist/utils/getAppMetadata/getAppMetadata.d.ts +1 -1
  469. package/dist/utils/getBuffer/getBuffer.d.ts +1 -1
  470. package/dist/utils/getBuffer/getBuffer.d.ts.map +1 -1
  471. package/dist/utils/getChainFromVerifiedCredentialChain/getChainFromVerifiedCredentialChain.d.ts +1 -1
  472. package/dist/utils/getChainFromVerifiedCredentialChain/getChainFromVerifiedCredentialChain.d.ts.map +1 -1
  473. package/dist/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.d.ts +1 -1
  474. package/dist/utils/getKeychainIndexedDBName/getKeychainIndexedDBName.d.ts +1 -1
  475. package/dist/utils/getNativeLinkScheme/getNativeLinkScheme.d.ts +1 -1
  476. package/dist/utils/getNonce/fetchAndStoreNonces/fetchAndStoreNonces.d.ts +1 -1
  477. package/dist/utils/getNonce/getNonce.d.ts +1 -1
  478. package/dist/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.d.ts +1 -1
  479. package/dist/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.d.ts.map +1 -1
  480. package/dist/utils/getOperatingSystem/getOperatingSystem.d.ts +1 -1
  481. package/dist/utils/getPlatform/getPlatform.d.ts +1 -1
  482. package/dist/utils/getUserAgent/getUserAgent.d.ts +1 -1
  483. package/dist/utils/isEqualShallow/isEqualShallow.d.ts +1 -1
  484. package/dist/utils/isError/isError.d.ts +1 -1
  485. package/dist/utils/isErrorWithCode/isErrorWithCode.d.ts +1 -1
  486. package/dist/utils/isMobile/isMobile.d.ts +16 -16
  487. package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
  488. package/dist/utils/isServerSideRendering/isServerSideRendering.d.ts +1 -1
  489. package/dist/utils/observable/createObservableState/createObservableState.d.ts +1 -1
  490. package/dist/utils/observable/subscribeWithSelector/subscribeWithSelector.d.ts +1 -1
  491. package/dist/utils/p256Keygen/p256Keygen.d.ts +1 -1
  492. package/dist/utils/p256Keygen/p256Keygen.d.ts.map +1 -1
  493. package/dist/utils/p256Sign/p256Sign.d.ts +1 -1
  494. package/dist/utils/p256Sign/p256Sign.d.ts.map +1 -1
  495. package/dist/utils/parseAmountToSmallestUnit/parseAmountToSmallestUnit.d.ts +1 -1
  496. package/dist/utils/parseUserAgent/parseUserAgent.d.ts +1 -1
  497. package/dist/utils/parseUserAgent/parseUserAgent.d.ts.map +1 -1
  498. package/dist/utils/randomString/randomString.d.ts +1 -1
  499. package/dist/utils/randomString/randomString.d.ts.map +1 -1
  500. package/dist/utils/retryOnFail/retryOnFail.d.ts +1 -1
  501. package/dist/utils/retryOnFail/retryOnFail.d.ts.map +1 -1
  502. package/dist/utils/setCookie/setCookie.d.ts +1 -1
  503. package/dist/waas.cjs +27 -27
  504. package/dist/waas.cjs.map +1 -1
  505. package/dist/waas.esm.js +26 -26
  506. package/dist/waas.esm.js.map +1 -1
  507. package/dist/waas.native.esm.js +26 -26
  508. package/dist/waas.native.esm.js.map +1 -1
  509. package/dist/waasCore.cjs +17 -12
  510. package/dist/waasCore.cjs.map +1 -1
  511. package/dist/waasCore.esm.js +16 -11
  512. package/dist/waasCore.esm.js.map +1 -1
  513. package/dist/waasCore.native.esm.js +19 -14
  514. package/dist/waasCore.native.esm.js.map +1 -1
  515. package/package.json +2 -2
  516. package/dist/InvalidParamError-CKUis748.native.esm.js.map +0 -1
  517. package/dist/InvalidParamError-I6NfUdQL.esm.js.map +0 -1
  518. package/dist/InvalidParamError-d0WFn5Ai.cjs.map +0 -1
  519. package/dist/getNetworkProviderFromNetworkId-CfW0tOnr.cjs.map +0 -1
  520. package/dist/getNetworkProviderFromNetworkId-D6ABmeNQ.esm.js.map +0 -1
  521. package/dist/getNetworkProviderFromNetworkId-DpiVLfs_.native.esm.js.map +0 -1
  522. package/dist/getSignedSessionId-Bc-sYE2A.cjs.map +0 -1
  523. package/dist/getSignedSessionId-C6LJdiSK.native.esm.js.map +0 -1
  524. package/dist/getSignedSessionId-IEoo2Kv9.esm.js.map +0 -1
  525. package/dist/getWaasWalletProviderFromWalletAccount-CSmVAhr2.cjs.map +0 -1
  526. package/dist/getWaasWalletProviderFromWalletAccount-D1wxsNEI.native.esm.js.map +0 -1
  527. package/dist/getWaasWalletProviderFromWalletAccount-DojjjSIP.esm.js.map +0 -1
  528. package/dist/getWalletProviderByKey-B821GpaI.cjs.map +0 -1
  529. package/dist/getWalletProviderByKey-DsTEubkT.esm.js.map +0 -1
  530. package/dist/getWalletProviderByKey-RTW-S68o.native.esm.js.map +0 -1
  531. package/dist/isMfaRequiredForAction-C1-1spV9.esm.js.map +0 -1
  532. package/dist/isMfaRequiredForAction-DL013-fR.cjs.map +0 -1
  533. package/dist/preconnectWaasIframe-BnyTG4Wy.native.esm.js +0 -31
  534. package/dist/preconnectWaasIframe-BnyTG4Wy.native.esm.js.map +0 -1
  535. package/dist/preconnectWaasIframe-DWYWeLor.cjs +0 -37
  536. package/dist/preconnectWaasIframe-DWYWeLor.cjs.map +0 -1
  537. package/dist/preconnectWaasIframe-Dn3RrrHd.esm.js +0 -31
  538. package/dist/preconnectWaasIframe-Dn3RrrHd.esm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { W as assertDefined, it as getDefaultClient, st as BaseError } from "./InvalidParamError-I6NfUdQL.esm.js";
1
+ import { G as assertDefined, at as getDefaultClient, ct as BaseError } from "./InvalidParamError-BeCPhfVz.esm.js";
2
2
  import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
3
3
 
4
4
  //#region src/errors/NotWaasWalletAccountError.ts
@@ -24,7 +24,7 @@ var NotWaasWalletAccountError = class extends BaseError {
24
24
  *
25
25
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
26
26
  * @returns True if Dynamic WaaS is enabled, false otherwise.
27
- * @not-instrumented
27
+ * @notInstrumented
28
28
  */
29
29
  const isDynamicWaasEnabled = (client = getDefaultClient()) => {
30
30
  const projectSettings = client.projectSettings;
@@ -34,4 +34,4 @@ const isDynamicWaasEnabled = (client = getDefaultClient()) => {
34
34
 
35
35
  //#endregion
36
36
  export { NotWaasWalletAccountError as n, isDynamicWaasEnabled as t };
37
- //# sourceMappingURL=isDynamicWaasEnabled-vRyWP-1l.esm.js.map
37
+ //# sourceMappingURL=isDynamicWaasEnabled-BMQq5uNX.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDynamicWaasEnabled-vRyWP-1l.esm.js","names":[],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @not-instrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;AAMA,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
1
+ {"version":3,"file":"isDynamicWaasEnabled-BMQq5uNX.esm.js","names":[],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;AAMA,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
@@ -1,5 +1,5 @@
1
- const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-DL013-fR.cjs');
2
- const require_InvalidParamError = require('./InvalidParamError-d0WFn5Ai.cjs');
1
+ const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-CgWBU6kM.cjs');
2
+ const require_InvalidParamError = require('./InvalidParamError-C7c-OLz1.cjs');
3
3
  let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
4
4
 
5
5
  //#region src/errors/NotWaasWalletAccountError.ts
@@ -25,7 +25,7 @@ var NotWaasWalletAccountError = class extends require_InvalidParamError.BaseErro
25
25
  *
26
26
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
27
27
  * @returns True if Dynamic WaaS is enabled, false otherwise.
28
- * @not-instrumented
28
+ * @notInstrumented
29
29
  */
30
30
  const isDynamicWaasEnabled = (client = require_InvalidParamError.getDefaultClient()) => {
31
31
  const projectSettings = client.projectSettings;
@@ -46,4 +46,4 @@ Object.defineProperty(exports, 'isDynamicWaasEnabled', {
46
46
  return isDynamicWaasEnabled;
47
47
  }
48
48
  });
49
- //# sourceMappingURL=isDynamicWaasEnabled-CBOG0ITH.cjs.map
49
+ //# sourceMappingURL=isDynamicWaasEnabled-BtbzDbdz.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDynamicWaasEnabled-CBOG0ITH.cjs","names":["BaseError","getDefaultClient","EmbeddedWalletVersionEnum"],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @not-instrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;AAMA,IAAa,4BAAb,cAA+CA,oCAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAASC,4CAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,yCAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxBC,qDAA0B"}
1
+ {"version":3,"file":"isDynamicWaasEnabled-BtbzDbdz.cjs","names":["BaseError","getDefaultClient","EmbeddedWalletVersionEnum"],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;;AAMA,IAAa,4BAAb,cAA+CA,oCAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAASC,4CAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,yCAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxBC,qDAA0B"}
@@ -1,4 +1,4 @@
1
- import { J as getDefaultClient, P as assertDefined, Z as BaseError } from "./InvalidParamError-CKUis748.native.esm.js";
1
+ import { F as assertDefined, Q as BaseError, Y as getDefaultClient } from "./InvalidParamError-CGiSxym5.native.esm.js";
2
2
  import { EmbeddedWalletVersionEnum } from "@dynamic-labs/sdk-api-core";
3
3
 
4
4
  //#region src/errors/NotWaasWalletAccountError.ts
@@ -24,7 +24,7 @@ var NotWaasWalletAccountError = class extends BaseError {
24
24
  *
25
25
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
26
26
  * @returns True if Dynamic WaaS is enabled, false otherwise.
27
- * @not-instrumented
27
+ * @notInstrumented
28
28
  */
29
29
  const isDynamicWaasEnabled = (client = getDefaultClient()) => {
30
30
  const projectSettings = client.projectSettings;
@@ -34,4 +34,4 @@ const isDynamicWaasEnabled = (client = getDefaultClient()) => {
34
34
 
35
35
  //#endregion
36
36
  export { NotWaasWalletAccountError as n, isDynamicWaasEnabled as t };
37
- //# sourceMappingURL=isDynamicWaasEnabled-CBLpFRnd.native.esm.js.map
37
+ //# sourceMappingURL=isDynamicWaasEnabled-ChdeBFbN.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isDynamicWaasEnabled-CBLpFRnd.native.esm.js","names":[],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @not-instrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;AAMA,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
1
+ {"version":3,"file":"isDynamicWaasEnabled-ChdeBFbN.native.esm.js","names":[],"sources":["../src/errors/NotWaasWalletAccountError.ts","../src/modules/waas/isDynamicWaasEnabled/isDynamicWaasEnabled.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletAccountErrorParams = {\n walletAddress: string;\n};\n\nexport class NotWaasWalletAccountError extends BaseError {\n constructor({ walletAddress }: NotWaasWalletAccountErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_account_error',\n docsUrl: null,\n name: 'NotWaasWalletAccountError',\n shortMessage: `Wallet account ${walletAddress} is not a Dynamic WaaS wallet account`,\n });\n }\n}\n","import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if Dynamic WaaS (Wallet as a Service) is enabled for the current project.\n *\n * This function examines the project settings to determine if Dynamic WaaS is\n * enabled in the Dynamic Dashboard or not.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if Dynamic WaaS is enabled, false otherwise.\n * @notInstrumented\n */\nexport const isDynamicWaasEnabled = (client = getDefaultClient()) => {\n const projectSettings = client.projectSettings;\n\n assertDefined(projectSettings, 'Project settings are not available');\n\n const embeddedWalletSettings = projectSettings.sdk.embeddedWallets;\n\n const dynamicWaasIsEnabled =\n embeddedWalletSettings?.defaultWalletVersion ===\n EmbeddedWalletVersionEnum.V3;\n\n return dynamicWaasIsEnabled;\n};\n"],"mappings":";;;;AAMA,IAAa,4BAAb,cAA+C,UAAU;CACvD,YAAY,EAAE,iBAAkD;AAC9D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,kBAAkB,cAAc;GAC/C,CAAC;;;;;;;;;;;;;;;;ACCN,MAAa,wBAAwB,SAAS,kBAAkB,KAAK;CACnE,MAAM,kBAAkB,OAAO;AAE/B,eAAc,iBAAiB,qCAAqC;AAQpE,QAN+B,gBAAgB,IAAI,iBAGzB,yBACxB,0BAA0B"}
@@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  }) : target, mod));
26
26
 
27
27
  //#endregion
28
- const require_InvalidParamError = require('./InvalidParamError-d0WFn5Ai.cjs');
28
+ const require_InvalidParamError = require('./InvalidParamError-C7c-OLz1.cjs');
29
29
  let zod_mini = require("zod/mini");
30
30
  zod_mini = __toESM(zod_mini);
31
31
 
@@ -48,7 +48,7 @@ var InvalidRetryOnFailCallError = class extends require_InvalidParamError.BaseEr
48
48
 
49
49
  //#endregion
50
50
  //#region src/utils/retryOnFail/retryOnFail.ts
51
- /** @not-instrumented */
51
+ /** @notInstrumented */
52
52
  const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
53
53
  for (let retry = 0; retry <= maxRetries; retry++) try {
54
54
  return await fn();
@@ -83,13 +83,13 @@ const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
83
83
  *
84
84
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
85
85
  * @returns True if the user is signed in, false otherwise.
86
- * @not-instrumented
86
+ * @notInstrumented
87
87
  */
88
88
  const isSignedIn = (client = require_InvalidParamError.getDefaultClient()) => Boolean(client.user || require_InvalidParamError.getWalletAccounts(client).length > 0);
89
89
 
90
90
  //#endregion
91
91
  //#region src/services/storage/createStorageKeySchema/createStorageKeySchema.ts
92
- /** @not-instrumented */
92
+ /** @notInstrumented */
93
93
  const createStorageKeySchema = (params) => {
94
94
  return params;
95
95
  };
@@ -119,7 +119,7 @@ const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
119
119
  *
120
120
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
121
121
  * @returns A promise that resolves to the updated project settings.
122
- * @not-instrumented
122
+ * @notInstrumented
123
123
  * @noHook Internal settings fetch that is not part of the public hook surface.
124
124
  */
125
125
  const fetchProjectSettings = async (client = require_InvalidParamError.getDefaultClient()) => {
@@ -143,7 +143,7 @@ const fetchProjectSettings = async (client = require_InvalidParamError.getDefaul
143
143
 
144
144
  //#endregion
145
145
  //#region src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts
146
- /** @not-instrumented */
146
+ /** @notInstrumented */
147
147
  const generateSessionKeys = async (client) => {
148
148
  const core = require_InvalidParamError.getCore(client);
149
149
  await core.keychain.removeKey("session");
@@ -155,7 +155,7 @@ const generateSessionKeys = async (client) => {
155
155
 
156
156
  //#endregion
157
157
  //#region src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts
158
- /** @not-instrumented */
158
+ /** @notInstrumented */
159
159
  const getAvailableWalletProvidersFromWalletAccounts = (client) => {
160
160
  const core = require_InvalidParamError.getCore(client);
161
161
  const walletProvidersMap = /* @__PURE__ */ new Map();
@@ -183,7 +183,7 @@ const getAvailableWalletProvidersFromWalletAccounts = (client) => {
183
183
  * cleanup. We swallow errors so a failing destroy on one provider does not
184
184
  * block teardown of the others (e.g. during logout).
185
185
  *
186
- * @not-instrumented
186
+ * @notInstrumented
187
187
  */
188
188
  const destroyWalletProviders = async ({ reason }, client) => {
189
189
  const core = require_InvalidParamError.getCore(client);
@@ -312,7 +312,7 @@ const __consumeMfaToken_wrapped = require_InvalidParamError.instrumentFunction({
312
312
  *
313
313
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
314
314
  * @returns A promise that resolves to the user's MFA methods configuration.
315
- * @not-instrumented
315
+ * @notInstrumented
316
316
  */
317
317
  const getMfaMethods = async (client = require_InvalidParamError.getDefaultClient()) => {
318
318
  const core = require_InvalidParamError.getCore(client);
@@ -333,7 +333,7 @@ const getMfaMethods = async (client = require_InvalidParamError.getDefaultClient
333
333
  * @param params.mfaAction - The action to check MFA requirements for.
334
334
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
335
335
  * @returns A promise that resolves to true if MFA is required for the action, false otherwise.
336
- * @not-instrumented
336
+ * @notInstrumented
337
337
  */
338
338
  const isMfaRequiredForAction = async ({ mfaAction }, client = require_InvalidParamError.getDefaultClient()) => {
339
339
  const projectSettings = client.projectSettings;
@@ -403,4 +403,4 @@ Object.defineProperty(exports, 'retryOnFail', {
403
403
  return retryOnFail;
404
404
  }
405
405
  });
406
- //# sourceMappingURL=isMfaRequiredForAction-DL013-fR.cjs.map
406
+ //# sourceMappingURL=isMfaRequiredForAction-CgWBU6kM.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMfaRequiredForAction-CgWBU6kM.cjs","names":["BaseError","getDefaultClient","getWalletAccounts","z","getDefaultClient","getCore","createApiClient","CLIENT_SDK_NAME","getCore","getCore","walletProvidersMap: Map<string, WalletProvider>","getWalletAccounts","getWalletProviderFromWalletAccount","getCore","getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/utils/retryOnFail/InvalidRetryOnFailCallError.ts","../src/utils/retryOnFail/retryOnFail.ts","../src/modules/auth/isSignedIn/isSignedIn.ts","../src/services/storage/createStorageKeySchema/createStorageKeySchema.ts","../src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts","../src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts","../src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts","../src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts","../src/modules/wallets/destroyWalletProviders/destroyWalletProviders.ts","../src/modules/auth/logoutWithReason/logoutWithReason.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { BaseError } from '../../errors/base';\n\n/**\n * This error is thrown when the `retryOnFail` function is called with an invalid\n * number of retries (i.e. less than 0).\n */\nexport class InvalidRetryOnFailCallError extends BaseError {\n // eslint-disable-next-line custom-rules/require-single-object-param\n constructor(maxRetries: number) {\n super({\n cause: null,\n code: 'invalid_retry_on_fail_call_error',\n docsUrl: null,\n name: 'InvalidRetryOnFailCallError',\n shortMessage: `Invalid retries parameter for retryOnFail call: ${maxRetries}`,\n });\n }\n}\n","import { InvalidRetryOnFailCallError } from './InvalidRetryOnFailCallError';\n\nexport type RetryOnFailParams<T> = {\n /**\n * The delay between retries in milliseconds.\n */\n delay?: number;\n /**\n * The function to call.\n */\n fn: () => Promise<T>;\n /**\n * The maximum number of retries.\n *\n * When set to 0, the function will be called only once and is\n * therefore equivalent to calling the function directly.\n */\n maxRetries: number;\n};\n\n/** @notInstrumented */\nexport const retryOnFail = async <T>({\n delay = 0,\n fn,\n maxRetries,\n}: RetryOnFailParams<T>) => {\n for (let retry = 0; retry <= maxRetries; retry++) {\n try {\n return await fn();\n } catch (error) {\n if (retry >= maxRetries) {\n throw error;\n }\n\n if (delay > 0) {\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n }\n\n /**\n * Reaching this point should never happen and this\n * error is thrown to help us debug the issue.\n */\n throw new InvalidRetryOnFailCallError(maxRetries);\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { getWalletAccounts } from '../../wallets/getWalletAccounts';\n\n/**\n * Checks if the user is currently signed in to the Dynamic client.\n *\n * The client is considered to be in a signed in state if a user has\n * authenticated or if the client has at least one wallet connected.\n *\n * @deprecated What counts as \"signed in\" is your app's business logic, not the\n * SDK's. This helper bakes in one opinion (a user OR any connected wallet),\n * which rarely matches every app and forces a dependency on us for every\n * variation. Compose your own check from the underlying primitives instead —\n * e.g. `Boolean(client.user) || isAnyWalletAccountConnected(client)` — and\n * layer in whatever your app requires (device registration, completed\n * onboarding, satisfied MFA, a required embedded wallet, …). See the\n * \"Check if signed in\" guide:\n * https://www.dynamic.xyz/docs/javascript/user-session-management\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if the user is signed in, false otherwise.\n * @notInstrumented\n */\nexport const isSignedIn = (client = getDefaultClient()) =>\n Boolean(client.user || getWalletAccounts(client).length > 0);\n","import type * as z from 'zod/mini';\n\nimport type { StorageKeySchema, StorageKeySchemaConfig } from '../storage.types';\n\n/** @notInstrumented */\nexport const createStorageKeySchema = <T>(params: {\n config?: StorageKeySchemaConfig;\n key: string;\n schema: z.ZodMiniType<T>;\n}): StorageKeySchema<T> => {\n return params;\n};\n","import * as z from 'zod/mini';\n\nimport { createStorageKeySchema } from '../../../services/storage';\n\n/**\n * The schema to track the expiration time of the project settings.\n */\nexport const projectSettingsExpirationStorageKeySchema = createStorageKeySchema(\n {\n key: 'projectSettingsExpiration',\n schema: z.number(),\n }\n);\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { retryOnFail } from '../../../utils/retryOnFail';\nimport { createApiClient } from '../../apiClient';\nimport { CLIENT_SDK_NAME } from '../../apiClient/constants';\nimport { isSignedIn } from '../../auth/isSignedIn';\nimport { projectSettingsExpirationStorageKeySchema } from './projectSettingsExpirationScheme';\n\n/**\n * Expiration time of the project settings in milliseconds.\n */\nexport const PROJECT_SETTINGS_EXPIRATION_TIME = 1000 * 60 * 5; // 5 minutes\n\n/**\n * Fetches and updates the project settings from the API.\n *\n * This function retrieves the latest project configuration settings\n * from Dynamic's servers, including authentication options, enabled chains,\n * and security configurations. The settings are cached for performance.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the updated project settings.\n * @notInstrumented\n * @noHook Internal settings fetch that is not part of the public hook surface.\n */\nexport const fetchProjectSettings = async (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const currentExpiration = await core.storage.getItem(\n projectSettingsExpirationStorageKeySchema\n );\n\n const hasProjectSettings = Boolean(client.projectSettings);\n const isExpired = currentExpiration && currentExpiration < Date.now();\n\n // We want to cache the project settings if its valid and user is connected.\n // This avoids unnecessary API calls and speeds up the initial load.\n if (hasProjectSettings && !isExpired && isSignedIn(client)) {\n return client.projectSettings;\n }\n\n const apiClient = createApiClient({}, client);\n\n core.logger.debug('[fetchProjectSettings] Fetching project settings...');\n\n const doFetch = async () =>\n apiClient.getEnvironmentSettings(\n {\n environmentId: core.environmentId,\n sdkVersion: `${CLIENT_SDK_NAME}/${core.version}`,\n },\n {\n credentials: 'omit',\n }\n );\n\n const projectSettings = await retryOnFail({\n fn: doFetch,\n maxRetries: 2,\n });\n\n core.state.set({ projectSettings: projectSettings ?? null });\n\n await core.storage.setItem(\n projectSettingsExpirationStorageKeySchema,\n Date.now() + PROJECT_SETTINGS_EXPIRATION_TIME\n );\n\n return projectSettings;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport type { SessionKeys } from '../sessionKeys.types';\n\n/** @notInstrumented */\nexport const generateSessionKeys = async (\n client: DynamicClient\n): Promise<SessionKeys> => {\n const core = getCore(client);\n\n await core.keychain.removeKey('session');\n\n const publicKey = await core.keychain.generateKey('session');\n\n assertDefined(publicKey, 'Public key not found');\n\n core.state.set({\n sessionKeys: publicKey,\n });\n\n return { publicKey };\n};\n","import { getCore } from '../../../../client/core/getCore';\nimport type { DynamicClient } from '../../../../client/types';\nimport { getWalletAccounts } from '../../getWalletAccounts';\nimport type { WalletProvider } from '../../walletProvider';\nimport { getWalletProviderFromWalletAccount } from '../getWalletProviderFromWalletAccount';\n\n/** @notInstrumented */\nexport const getAvailableWalletProvidersFromWalletAccounts = (\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const walletProvidersMap: Map<string, WalletProvider> = new Map();\n\n const walletAccounts = getWalletAccounts(client);\n\n walletAccounts.forEach((walletAccount) => {\n if (walletProvidersMap.has(walletAccount.walletProviderKey)) {\n return;\n }\n\n try {\n const walletProvider = getWalletProviderFromWalletAccount(\n {\n walletAccount,\n },\n client\n );\n\n walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);\n } catch (error) {\n core.logger.debug('Wallet provider not found for wallet account', {\n error,\n walletAccount: walletAccount.address,\n });\n }\n });\n\n return Array.from(walletProvidersMap.values());\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { LogoutReason } from '../../auth/logoutReason';\nimport { getAvailableWalletProvidersFromWalletAccounts } from '../utils/getAvailableWalletProvidersFromWalletAccounts';\n\n/**\n * Tear down every wallet provider on the client.\n *\n * Each provider's `destroy` is responsible for its own local + remote\n * cleanup. We swallow errors so a failing destroy on one provider does not\n * block teardown of the others (e.g. during logout).\n *\n * @notInstrumented\n */\nexport const destroyWalletProviders = async (\n { reason }: { reason?: LogoutReason },\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const walletProviders = getAvailableWalletProvidersFromWalletAccounts(client);\n\n await Promise.all(\n walletProviders.map(async (walletProvider) => {\n if (!walletProvider.destroy) return;\n try {\n await walletProvider.destroy({ reason });\n } catch (err) {\n core.logger.error(\n `Error destroying wallet provider ${walletProvider.key}`,\n err\n );\n }\n })\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { getCore } from '../../../client/core/getCore';\nimport { setCookie } from '../../../utils/setCookie';\nimport { createApiClient } from '../../apiClient';\nimport { emitEvent } from '../../clientEvents';\nimport { fetchProjectSettings } from '../../projectSettings/fetchProjectSettings';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { generateSessionKeys } from '../../sessionKeys/generateSessionKeys';\nimport { destroyWalletProviders } from '../../wallets/destroyWalletProviders';\nimport { DYNAMIC_AUTH_COOKIE_NAME } from '../consts';\nimport type { LogoutReason } from '../logoutReason';\n\n/**\n * Logs the user out with an explicit reason.\n *\n * Revokes the session, clears auth state, terminates wallet providers, and\n * emits the `logout` client event with the given reason. The reason is also\n * captured as an argument on the function-instrumentation event, which is\n * how Datadog distinguishes between different logout causes.\n *\n * Use this instead of the public `logout` when triggering a logout from\n * internal or extension code — the caller owns the reason string, so the\n * telemetry correctly attributes *why* the logout happened.\n *\n * @param params - The logout params.\n * @param params.reason - Why the logout is being triggered. Extension authors\n * needing a reason outside the SDK catalog can cast with `as LogoutReason`.\n * @param client - The Dynamic client instance.\n * @instrumented\n */\nexport const logoutWithReason = async (\n { reason }: { reason: LogoutReason },\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n core.logger.debug('[logoutWithReason] Logging out...', { reason });\n\n await destroyWalletProviders({ reason }, client);\n\n if (client.user !== null) {\n const apiClient = createApiClient({}, client);\n\n try {\n await apiClient.revokeSession({\n environmentId: core.environmentId,\n });\n } catch (error) {\n core.logger.error('Failed to revoke session', error);\n }\n\n /**\n * This deletes the auth cookie if it exists.\n * If the cookie doesn't exist, this sets a new cookie that expires immediately.\n */\n if (isCookieEnabled(client)) {\n setCookie(\n `${DYNAMIC_AUTH_COOKIE_NAME}=; Max-Age=-99999999; path=/; SameSite=Lax`\n );\n }\n }\n\n await core.keychain.removeKey('session');\n\n core.state.set({\n captchaToken: null,\n elevatedAccessTokens: [],\n legacyToken: null,\n mfaToken: null,\n sessionExpiresAt: null,\n sessionKeys: null,\n token: null,\n unverifiedWalletAccounts: [],\n user: null,\n });\n\n emitEvent({ args: { reason }, event: 'logout' }, client);\n\n // Refetch project settings\n void fetchProjectSettings(client);\n\n // Regenerate session keys\n void generateSessionKeys(client);\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import { A as createApiClient, O as setCookie, U as isCookieEnabled, W as assertDefined, c as DYNAMIC_AUTH_COOKIE_NAME, ct as getCore, it as getDefaultClient, l as getWalletProviderFromWalletAccount, m as getWalletAccounts, q as instrumentFunction, st as BaseError, tt as CLIENT_SDK_NAME, w as emitEvent } from "./InvalidParamError-I6NfUdQL.esm.js";
1
+ import { G as assertDefined, J as instrumentFunction, T as emitEvent, W as isCookieEnabled, at as getDefaultClient, ct as BaseError, h as getWalletAccounts, j as createApiClient, k as setCookie, l as DYNAMIC_AUTH_COOKIE_NAME, lt as getCore, nt as CLIENT_SDK_NAME, u as getWalletProviderFromWalletAccount } from "./InvalidParamError-BeCPhfVz.esm.js";
2
2
  import * as z from "zod/mini";
3
3
 
4
4
  //#region src/utils/retryOnFail/InvalidRetryOnFailCallError.ts
@@ -20,7 +20,7 @@ var InvalidRetryOnFailCallError = class extends BaseError {
20
20
 
21
21
  //#endregion
22
22
  //#region src/utils/retryOnFail/retryOnFail.ts
23
- /** @not-instrumented */
23
+ /** @notInstrumented */
24
24
  const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
25
25
  for (let retry = 0; retry <= maxRetries; retry++) try {
26
26
  return await fn();
@@ -55,13 +55,13 @@ const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
55
55
  *
56
56
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
57
57
  * @returns True if the user is signed in, false otherwise.
58
- * @not-instrumented
58
+ * @notInstrumented
59
59
  */
60
60
  const isSignedIn = (client = getDefaultClient()) => Boolean(client.user || getWalletAccounts(client).length > 0);
61
61
 
62
62
  //#endregion
63
63
  //#region src/services/storage/createStorageKeySchema/createStorageKeySchema.ts
64
- /** @not-instrumented */
64
+ /** @notInstrumented */
65
65
  const createStorageKeySchema = (params) => {
66
66
  return params;
67
67
  };
@@ -91,7 +91,7 @@ const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
91
91
  *
92
92
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
93
93
  * @returns A promise that resolves to the updated project settings.
94
- * @not-instrumented
94
+ * @notInstrumented
95
95
  * @noHook Internal settings fetch that is not part of the public hook surface.
96
96
  */
97
97
  const fetchProjectSettings = async (client = getDefaultClient()) => {
@@ -115,7 +115,7 @@ const fetchProjectSettings = async (client = getDefaultClient()) => {
115
115
 
116
116
  //#endregion
117
117
  //#region src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts
118
- /** @not-instrumented */
118
+ /** @notInstrumented */
119
119
  const generateSessionKeys = async (client) => {
120
120
  const core = getCore(client);
121
121
  await core.keychain.removeKey("session");
@@ -127,7 +127,7 @@ const generateSessionKeys = async (client) => {
127
127
 
128
128
  //#endregion
129
129
  //#region src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts
130
- /** @not-instrumented */
130
+ /** @notInstrumented */
131
131
  const getAvailableWalletProvidersFromWalletAccounts = (client) => {
132
132
  const core = getCore(client);
133
133
  const walletProvidersMap = /* @__PURE__ */ new Map();
@@ -155,7 +155,7 @@ const getAvailableWalletProvidersFromWalletAccounts = (client) => {
155
155
  * cleanup. We swallow errors so a failing destroy on one provider does not
156
156
  * block teardown of the others (e.g. during logout).
157
157
  *
158
- * @not-instrumented
158
+ * @notInstrumented
159
159
  */
160
160
  const destroyWalletProviders = async ({ reason }, client) => {
161
161
  const core = getCore(client);
@@ -284,7 +284,7 @@ const __consumeMfaToken_wrapped = instrumentFunction({
284
284
  *
285
285
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
286
286
  * @returns A promise that resolves to the user's MFA methods configuration.
287
- * @not-instrumented
287
+ * @notInstrumented
288
288
  */
289
289
  const getMfaMethods = async (client = getDefaultClient()) => {
290
290
  const core = getCore(client);
@@ -305,7 +305,7 @@ const getMfaMethods = async (client = getDefaultClient()) => {
305
305
  * @param params.mfaAction - The action to check MFA requirements for.
306
306
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
307
307
  * @returns A promise that resolves to true if MFA is required for the action, false otherwise.
308
- * @not-instrumented
308
+ * @notInstrumented
309
309
  */
310
310
  const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()) => {
311
311
  const projectSettings = client.projectSettings;
@@ -316,4 +316,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
316
316
 
317
317
  //#endregion
318
318
  export { generateSessionKeys as a, isSignedIn as c, __logoutWithReason_wrapped as i, retryOnFail as l, getMfaMethods as n, fetchProjectSettings as o, __consumeMfaToken_wrapped as r, createStorageKeySchema as s, isMfaRequiredForAction as t };
319
- //# sourceMappingURL=isMfaRequiredForAction-C1-1spV9.esm.js.map
319
+ //# sourceMappingURL=isMfaRequiredForAction-Diwsf9GB.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMfaRequiredForAction-Diwsf9GB.esm.js","names":["walletProvidersMap: Map<string, WalletProvider>"],"sources":["../src/utils/retryOnFail/InvalidRetryOnFailCallError.ts","../src/utils/retryOnFail/retryOnFail.ts","../src/modules/auth/isSignedIn/isSignedIn.ts","../src/services/storage/createStorageKeySchema/createStorageKeySchema.ts","../src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts","../src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts","../src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts","../src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts","../src/modules/wallets/destroyWalletProviders/destroyWalletProviders.ts","../src/modules/auth/logoutWithReason/logoutWithReason.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { BaseError } from '../../errors/base';\n\n/**\n * This error is thrown when the `retryOnFail` function is called with an invalid\n * number of retries (i.e. less than 0).\n */\nexport class InvalidRetryOnFailCallError extends BaseError {\n // eslint-disable-next-line custom-rules/require-single-object-param\n constructor(maxRetries: number) {\n super({\n cause: null,\n code: 'invalid_retry_on_fail_call_error',\n docsUrl: null,\n name: 'InvalidRetryOnFailCallError',\n shortMessage: `Invalid retries parameter for retryOnFail call: ${maxRetries}`,\n });\n }\n}\n","import { InvalidRetryOnFailCallError } from './InvalidRetryOnFailCallError';\n\nexport type RetryOnFailParams<T> = {\n /**\n * The delay between retries in milliseconds.\n */\n delay?: number;\n /**\n * The function to call.\n */\n fn: () => Promise<T>;\n /**\n * The maximum number of retries.\n *\n * When set to 0, the function will be called only once and is\n * therefore equivalent to calling the function directly.\n */\n maxRetries: number;\n};\n\n/** @notInstrumented */\nexport const retryOnFail = async <T>({\n delay = 0,\n fn,\n maxRetries,\n}: RetryOnFailParams<T>) => {\n for (let retry = 0; retry <= maxRetries; retry++) {\n try {\n return await fn();\n } catch (error) {\n if (retry >= maxRetries) {\n throw error;\n }\n\n if (delay > 0) {\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n }\n\n /**\n * Reaching this point should never happen and this\n * error is thrown to help us debug the issue.\n */\n throw new InvalidRetryOnFailCallError(maxRetries);\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { getWalletAccounts } from '../../wallets/getWalletAccounts';\n\n/**\n * Checks if the user is currently signed in to the Dynamic client.\n *\n * The client is considered to be in a signed in state if a user has\n * authenticated or if the client has at least one wallet connected.\n *\n * @deprecated What counts as \"signed in\" is your app's business logic, not the\n * SDK's. This helper bakes in one opinion (a user OR any connected wallet),\n * which rarely matches every app and forces a dependency on us for every\n * variation. Compose your own check from the underlying primitives instead —\n * e.g. `Boolean(client.user) || isAnyWalletAccountConnected(client)` — and\n * layer in whatever your app requires (device registration, completed\n * onboarding, satisfied MFA, a required embedded wallet, …). See the\n * \"Check if signed in\" guide:\n * https://www.dynamic.xyz/docs/javascript/user-session-management\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if the user is signed in, false otherwise.\n * @notInstrumented\n */\nexport const isSignedIn = (client = getDefaultClient()) =>\n Boolean(client.user || getWalletAccounts(client).length > 0);\n","import type * as z from 'zod/mini';\n\nimport type { StorageKeySchema, StorageKeySchemaConfig } from '../storage.types';\n\n/** @notInstrumented */\nexport const createStorageKeySchema = <T>(params: {\n config?: StorageKeySchemaConfig;\n key: string;\n schema: z.ZodMiniType<T>;\n}): StorageKeySchema<T> => {\n return params;\n};\n","import * as z from 'zod/mini';\n\nimport { createStorageKeySchema } from '../../../services/storage';\n\n/**\n * The schema to track the expiration time of the project settings.\n */\nexport const projectSettingsExpirationStorageKeySchema = createStorageKeySchema(\n {\n key: 'projectSettingsExpiration',\n schema: z.number(),\n }\n);\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { retryOnFail } from '../../../utils/retryOnFail';\nimport { createApiClient } from '../../apiClient';\nimport { CLIENT_SDK_NAME } from '../../apiClient/constants';\nimport { isSignedIn } from '../../auth/isSignedIn';\nimport { projectSettingsExpirationStorageKeySchema } from './projectSettingsExpirationScheme';\n\n/**\n * Expiration time of the project settings in milliseconds.\n */\nexport const PROJECT_SETTINGS_EXPIRATION_TIME = 1000 * 60 * 5; // 5 minutes\n\n/**\n * Fetches and updates the project settings from the API.\n *\n * This function retrieves the latest project configuration settings\n * from Dynamic's servers, including authentication options, enabled chains,\n * and security configurations. The settings are cached for performance.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the updated project settings.\n * @notInstrumented\n * @noHook Internal settings fetch that is not part of the public hook surface.\n */\nexport const fetchProjectSettings = async (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const currentExpiration = await core.storage.getItem(\n projectSettingsExpirationStorageKeySchema\n );\n\n const hasProjectSettings = Boolean(client.projectSettings);\n const isExpired = currentExpiration && currentExpiration < Date.now();\n\n // We want to cache the project settings if its valid and user is connected.\n // This avoids unnecessary API calls and speeds up the initial load.\n if (hasProjectSettings && !isExpired && isSignedIn(client)) {\n return client.projectSettings;\n }\n\n const apiClient = createApiClient({}, client);\n\n core.logger.debug('[fetchProjectSettings] Fetching project settings...');\n\n const doFetch = async () =>\n apiClient.getEnvironmentSettings(\n {\n environmentId: core.environmentId,\n sdkVersion: `${CLIENT_SDK_NAME}/${core.version}`,\n },\n {\n credentials: 'omit',\n }\n );\n\n const projectSettings = await retryOnFail({\n fn: doFetch,\n maxRetries: 2,\n });\n\n core.state.set({ projectSettings: projectSettings ?? null });\n\n await core.storage.setItem(\n projectSettingsExpirationStorageKeySchema,\n Date.now() + PROJECT_SETTINGS_EXPIRATION_TIME\n );\n\n return projectSettings;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport type { SessionKeys } from '../sessionKeys.types';\n\n/** @notInstrumented */\nexport const generateSessionKeys = async (\n client: DynamicClient\n): Promise<SessionKeys> => {\n const core = getCore(client);\n\n await core.keychain.removeKey('session');\n\n const publicKey = await core.keychain.generateKey('session');\n\n assertDefined(publicKey, 'Public key not found');\n\n core.state.set({\n sessionKeys: publicKey,\n });\n\n return { publicKey };\n};\n","import { getCore } from '../../../../client/core/getCore';\nimport type { DynamicClient } from '../../../../client/types';\nimport { getWalletAccounts } from '../../getWalletAccounts';\nimport type { WalletProvider } from '../../walletProvider';\nimport { getWalletProviderFromWalletAccount } from '../getWalletProviderFromWalletAccount';\n\n/** @notInstrumented */\nexport const getAvailableWalletProvidersFromWalletAccounts = (\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const walletProvidersMap: Map<string, WalletProvider> = new Map();\n\n const walletAccounts = getWalletAccounts(client);\n\n walletAccounts.forEach((walletAccount) => {\n if (walletProvidersMap.has(walletAccount.walletProviderKey)) {\n return;\n }\n\n try {\n const walletProvider = getWalletProviderFromWalletAccount(\n {\n walletAccount,\n },\n client\n );\n\n walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);\n } catch (error) {\n core.logger.debug('Wallet provider not found for wallet account', {\n error,\n walletAccount: walletAccount.address,\n });\n }\n });\n\n return Array.from(walletProvidersMap.values());\n};\n","import { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { LogoutReason } from '../../auth/logoutReason';\nimport { getAvailableWalletProvidersFromWalletAccounts } from '../utils/getAvailableWalletProvidersFromWalletAccounts';\n\n/**\n * Tear down every wallet provider on the client.\n *\n * Each provider's `destroy` is responsible for its own local + remote\n * cleanup. We swallow errors so a failing destroy on one provider does not\n * block teardown of the others (e.g. during logout).\n *\n * @notInstrumented\n */\nexport const destroyWalletProviders = async (\n { reason }: { reason?: LogoutReason },\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const walletProviders = getAvailableWalletProvidersFromWalletAccounts(client);\n\n await Promise.all(\n walletProviders.map(async (walletProvider) => {\n if (!walletProvider.destroy) return;\n try {\n await walletProvider.destroy({ reason });\n } catch (err) {\n core.logger.error(\n `Error destroying wallet provider ${walletProvider.key}`,\n err\n );\n }\n })\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { getCore } from '../../../client/core/getCore';\nimport { setCookie } from '../../../utils/setCookie';\nimport { createApiClient } from '../../apiClient';\nimport { emitEvent } from '../../clientEvents';\nimport { fetchProjectSettings } from '../../projectSettings/fetchProjectSettings';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { generateSessionKeys } from '../../sessionKeys/generateSessionKeys';\nimport { destroyWalletProviders } from '../../wallets/destroyWalletProviders';\nimport { DYNAMIC_AUTH_COOKIE_NAME } from '../consts';\nimport type { LogoutReason } from '../logoutReason';\n\n/**\n * Logs the user out with an explicit reason.\n *\n * Revokes the session, clears auth state, terminates wallet providers, and\n * emits the `logout` client event with the given reason. The reason is also\n * captured as an argument on the function-instrumentation event, which is\n * how Datadog distinguishes between different logout causes.\n *\n * Use this instead of the public `logout` when triggering a logout from\n * internal or extension code — the caller owns the reason string, so the\n * telemetry correctly attributes *why* the logout happened.\n *\n * @param params - The logout params.\n * @param params.reason - Why the logout is being triggered. Extension authors\n * needing a reason outside the SDK catalog can cast with `as LogoutReason`.\n * @param client - The Dynamic client instance.\n * @instrumented\n */\nexport const logoutWithReason = async (\n { reason }: { reason: LogoutReason },\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n core.logger.debug('[logoutWithReason] Logging out...', { reason });\n\n await destroyWalletProviders({ reason }, client);\n\n if (client.user !== null) {\n const apiClient = createApiClient({}, client);\n\n try {\n await apiClient.revokeSession({\n environmentId: core.environmentId,\n });\n } catch (error) {\n core.logger.error('Failed to revoke session', error);\n }\n\n /**\n * This deletes the auth cookie if it exists.\n * If the cookie doesn't exist, this sets a new cookie that expires immediately.\n */\n if (isCookieEnabled(client)) {\n setCookie(\n `${DYNAMIC_AUTH_COOKIE_NAME}=; Max-Age=-99999999; path=/; SameSite=Lax`\n );\n }\n }\n\n await core.keychain.removeKey('session');\n\n core.state.set({\n captchaToken: null,\n elevatedAccessTokens: [],\n legacyToken: null,\n mfaToken: null,\n sessionExpiresAt: null,\n sessionKeys: null,\n token: null,\n unverifiedWalletAccounts: [],\n user: null,\n });\n\n emitEvent({ args: { reason }, event: 'logout' }, client);\n\n // Refetch project settings\n void fetchProjectSettings(client);\n\n // Regenerate session keys\n void generateSessionKeys(client);\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import { J as getDefaultClient, L as instrumentFunction, P as assertDefined, Q as getCore, Z as BaseError, b as createApiClient } from "./InvalidParamError-CKUis748.native.esm.js";
1
+ import { $ as getCore, F as assertDefined, Q as BaseError, R as instrumentFunction, Y as getDefaultClient, x as createApiClient } from "./InvalidParamError-CGiSxym5.native.esm.js";
2
2
 
3
3
  //#region src/errors/NativeModuleNotLinkedError.ts
4
4
  var NativeModuleNotLinkedError = class extends BaseError {
@@ -73,7 +73,7 @@ const __consumeMfaToken_wrapped = instrumentFunction({
73
73
  *
74
74
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
75
75
  * @returns A promise that resolves to the user's MFA methods configuration.
76
- * @not-instrumented
76
+ * @notInstrumented
77
77
  */
78
78
  const getMfaMethods = async (client = getDefaultClient()) => {
79
79
  const core = getCore(client);
@@ -94,7 +94,7 @@ const getMfaMethods = async (client = getDefaultClient()) => {
94
94
  * @param params.mfaAction - The action to check MFA requirements for.
95
95
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
96
96
  * @returns A promise that resolves to true if MFA is required for the action, false otherwise.
97
- * @not-instrumented
97
+ * @notInstrumented
98
98
  */
99
99
  const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()) => {
100
100
  const projectSettings = client.projectSettings;
@@ -105,4 +105,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
105
105
 
106
106
  //#endregion
107
107
  export { NativeModuleNotLinkedError as i, getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
108
- //# sourceMappingURL=isMfaRequiredForAction-D1AYL99a.native.esm.js.map
108
+ //# sourceMappingURL=isMfaRequiredForAction-dAtK8Pl6.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-D1AYL99a.native.esm.js","names":[],"sources":["../src/errors/NativeModuleNotLinkedError.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NativeModuleNotLinkedErrorParams = {\n moduleName: string;\n};\n\nexport class NativeModuleNotLinkedError extends BaseError {\n constructor({ moduleName }: NativeModuleNotLinkedErrorParams) {\n super({\n cause: null,\n code: 'native_module_not_linked_error',\n details: [\n `The \"${moduleName}\" TurboModule is not registered with React Native.`,\n 'This usually means the native module was not autolinked into the host app,',\n 'or the app binary was not rebuilt after installing the SDK.',\n '',\n 'To resolve:',\n ' 1. Ensure \"@dynamic-labs-sdk/client\" is a direct dependency of the app',\n ' and reinstall (e.g. `pnpm install`).',\n ' 2. Rebuild the native app:',\n ' iOS: `cd ios && pod install && cd .. && npx react-native run-ios`',\n ' Android: `npx react-native run-android`',\n ' Expo: `npx expo prebuild --clean` then run the app.',\n ' 3. Confirm autolinking sees the package:',\n ' `npx expo-modules-autolinking react-native-config --json`',\n ].join('\\n'),\n docsUrl: null,\n name: 'NativeModuleNotLinkedError',\n shortMessage: `Native TurboModule \"${moduleName}\" is not linked.`,\n });\n }\n}\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @not-instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,cAAgD;AAC5D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;IACP,QAAQ,WAAW;IACnB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,KAAK,KAAK;GACZ,SAAS;GACT,MAAM;GACN,cAAc,uBAAuB,WAAW;GACjD,CAAC;;;;;;;;;;;;;;;;;;ACVN,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-dAtK8Pl6.native.esm.js","names":[],"sources":["../src/errors/NativeModuleNotLinkedError.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NativeModuleNotLinkedErrorParams = {\n moduleName: string;\n};\n\nexport class NativeModuleNotLinkedError extends BaseError {\n constructor({ moduleName }: NativeModuleNotLinkedErrorParams) {\n super({\n cause: null,\n code: 'native_module_not_linked_error',\n details: [\n `The \"${moduleName}\" TurboModule is not registered with React Native.`,\n 'This usually means the native module was not autolinked into the host app,',\n 'or the app binary was not rebuilt after installing the SDK.',\n '',\n 'To resolve:',\n ' 1. Ensure \"@dynamic-labs-sdk/client\" is a direct dependency of the app',\n ' and reinstall (e.g. `pnpm install`).',\n ' 2. Rebuild the native app:',\n ' iOS: `cd ios && pod install && cd .. && npx react-native run-ios`',\n ' Android: `npx react-native run-android`',\n ' Expo: `npx expo prebuild --clean` then run the app.',\n ' 3. Confirm autolinking sees the package:',\n ' `npx expo-modules-autolinking react-native-config --json`',\n ].join('\\n'),\n docsUrl: null,\n name: 'NativeModuleNotLinkedError',\n shortMessage: `Native TurboModule \"${moduleName}\" is not linked.`,\n });\n }\n}\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @notInstrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @notInstrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,cAAgD;AAC5D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;IACP,QAAQ,WAAW;IACnB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAAC,KAAK,KAAK;GACZ,SAAS;GACT,MAAM;GACN,cAAc,uBAAuB,WAAW;GACjD,CAAC;;;;;;;;;;;;;;;;;;ACVN,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
@@ -0,0 +1,121 @@
1
+ import { G as assertDefined, W as isCookieEnabled, at as getDefaultClient, ct as BaseError, lt as getCore, o as isUserMissingMfaAuth, r as DEFAULT_WAAS_BASE_API_URL } from "./InvalidParamError-BeCPhfVz.esm.js";
2
+ import { t as isDynamicWaasEnabled } from "./isDynamicWaasEnabled-BMQq5uNX.esm.js";
3
+ import { MfaBackupCodeAcknowledgement } from "@dynamic-labs/sdk-api-core";
4
+ import { preconnectWaasIframe } from "@dynamic-labs-wallet/browser-wallet-client";
5
+
6
+ //#region src/errors/WaasOnboardingIncompleteError.ts
7
+ /**
8
+ * Thrown when the embedded (WaaS) wallet client is requested before the user
9
+ * has completed onboarding — i.e. the JWT has not upgraded to `user:basic`
10
+ * because MFA, KYC, recovery-codes acknowledgment, or device registration is
11
+ * still pending.
12
+ *
13
+ * The WaaS iframe's init-time room-cache pre-warm fires `createRooms` using the
14
+ * token captured at client construction (before any per-operation token
15
+ * resync). Building the client during this window lets that pre-warm fire with
16
+ * a pre-`user:basic` token, get a 401, and the iframe's unauthorized handler
17
+ * force-logs-out the user. Throwing here surfaces a clear, recoverable reason
18
+ * instead — wait for onboarding to complete and retry.
19
+ */
20
+ var WaasOnboardingIncompleteError = class extends BaseError {
21
+ constructor() {
22
+ super({
23
+ cause: null,
24
+ code: "waas_onboarding_incomplete",
25
+ docsUrl: null,
26
+ name: "WaasOnboardingIncompleteError",
27
+ shortMessage: "Cannot create or access the embedded wallet until onboarding is complete (pending MFA, KYC, recovery-codes acknowledgment, or device registration)."
28
+ });
29
+ }
30
+ };
31
+
32
+ //#endregion
33
+ //#region src/modules/waas/preconnectWaasIframe/preconnectWaasIframe.ts
34
+ /**
35
+ * Warms the browser's connection (DNS + TCP + TLS) to the embedded-wallet
36
+ * iframe origin so the iframe mounted after authentication completes loads on
37
+ * a hot connection. Called when an auth flow starts (OTP send/verify, social
38
+ * callback). Safe to call repeatedly; no-op on React Native / SSR and when
39
+ * Dynamic WaaS is not enabled.
40
+ *
41
+ * @param client - The Dynamic client instance.
42
+ * @notInstrumented
43
+ */
44
+ const preconnectWaasIframe$1 = (client) => {
45
+ const core = getCore(client);
46
+ try {
47
+ if (!isDynamicWaasEnabled(client)) return;
48
+ preconnectWaasIframe({
49
+ authMode: isCookieEnabled(client) ? "cookie" : "header",
50
+ baseApiUrl: (core.apiBaseUrl || DEFAULT_WAAS_BASE_API_URL).replace("/api/v0", "")
51
+ });
52
+ } catch (error) {
53
+ core.logger.warn("[preconnectWaasIframe] skipped", error);
54
+ }
55
+ };
56
+
57
+ //#endregion
58
+ //#region src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts
59
+ /**
60
+ * Checks if device registration is required for the given user.
61
+ *
62
+ * This function determines if the user has the deviceRegistration
63
+ * scope, indicating that device registration is required.
64
+ *
65
+ * @param user - The user to check.
66
+ * @returns True if device registration is required, false otherwise.
67
+ * @notInstrumented
68
+ */
69
+ const isDeviceRegistrationRequired = (user) => Boolean(user.scope?.includes("device:register"));
70
+
71
+ //#endregion
72
+ //#region src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts
73
+ /**
74
+ * Checks if the user is still pending acknowledgment of their MFA recovery codes.
75
+ *
76
+ * This function determines whether the user has been presented with recovery
77
+ * codes that they have not yet acknowledged as saved or backed up.
78
+ *
79
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
80
+ * @returns True if recovery codes are pending acknowledgment, false otherwise.
81
+ * @notInstrumented
82
+ */
83
+ const isPendingRecoveryCodesAcknowledgment = (client = getDefaultClient()) => {
84
+ const user = client.user;
85
+ assertDefined(user, "User not logged in");
86
+ return user.mfaBackupCodeAcknowledgement === MfaBackupCodeAcknowledgement.Pending;
87
+ };
88
+
89
+ //#endregion
90
+ //#region src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts
91
+ /**
92
+ * Checks if the user has completed all onboarding requirements.
93
+ *
94
+ * This function verifies whether a user has fulfilled all necessary requirements
95
+ * including KYC fields (Know Your Customer information), MFA setup
96
+ * (Multi-Factor Authentication including recovery codes acknowledgment), and
97
+ * device registration.
98
+ *
99
+ * A `false` result means the user still has an outstanding onboarding step, so
100
+ * any feature that requires a fully onboarded (`user:basic`) user should hold
101
+ * off until it returns `true`. Creating or accessing an embedded (WaaS) wallet
102
+ * is one such feature — its backend calls reject a pre-`user:basic` token — but
103
+ * this predicate is general and not specific to embedded wallets.
104
+ *
105
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
106
+ * @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.
107
+ * @notInstrumented
108
+ */
109
+ const isUserOnboardingComplete = (client = getDefaultClient()) => {
110
+ const user = client.user;
111
+ assertDefined(user, "User not logged in");
112
+ const hasMissingKycFields = Boolean(user.missingFields?.length);
113
+ const hasPendingMfaAuth = isUserMissingMfaAuth(client);
114
+ const hasPendingRecoveryCodes = isPendingRecoveryCodesAcknowledgment(client);
115
+ const hasPendingDeviceRegistration = isDeviceRegistrationRequired(user);
116
+ return !hasMissingKycFields && !hasPendingMfaAuth && !hasPendingRecoveryCodes && !hasPendingDeviceRegistration;
117
+ };
118
+
119
+ //#endregion
120
+ export { WaasOnboardingIncompleteError as a, preconnectWaasIframe$1 as i, isPendingRecoveryCodesAcknowledgment as n, isDeviceRegistrationRequired as r, isUserOnboardingComplete as t };
121
+ //# sourceMappingURL=isUserOnboardingComplete-D4Y3sdr3.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUserOnboardingComplete-D4Y3sdr3.esm.js","names":["preconnectWaasIframe"],"sources":["../src/errors/WaasOnboardingIncompleteError.ts","../src/modules/waas/preconnectWaasIframe/preconnectWaasIframe.ts","../src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts","../src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts","../src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts"],"sourcesContent":["import { BaseError } from './base';\n\n/**\n * Thrown when the embedded (WaaS) wallet client is requested before the user\n * has completed onboarding — i.e. the JWT has not upgraded to `user:basic`\n * because MFA, KYC, recovery-codes acknowledgment, or device registration is\n * still pending.\n *\n * The WaaS iframe's init-time room-cache pre-warm fires `createRooms` using the\n * token captured at client construction (before any per-operation token\n * resync). Building the client during this window lets that pre-warm fire with\n * a pre-`user:basic` token, get a 401, and the iframe's unauthorized handler\n * force-logs-out the user. Throwing here surfaces a clear, recoverable reason\n * instead — wait for onboarding to complete and retry.\n */\nexport class WaasOnboardingIncompleteError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'waas_onboarding_incomplete',\n docsUrl: null,\n name: 'WaasOnboardingIncompleteError',\n shortMessage:\n 'Cannot create or access the embedded wallet until onboarding is complete (pending MFA, KYC, recovery-codes acknowledgment, or device registration).',\n });\n }\n}\n","import type { AuthMode } from '@dynamic-labs-wallet/browser-wallet-client';\nimport { preconnectWaasIframe as preconnectWaasIframeOrigin } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { DEFAULT_WAAS_BASE_API_URL } from '../constants';\nimport { isDynamicWaasEnabled } from '../isDynamicWaasEnabled';\n\n/**\n * Warms the browser's connection (DNS + TCP + TLS) to the embedded-wallet\n * iframe origin so the iframe mounted after authentication completes loads on\n * a hot connection. Called when an auth flow starts (OTP send/verify, social\n * callback). Safe to call repeatedly; no-op on React Native / SSR and when\n * Dynamic WaaS is not enabled.\n *\n * @param client - The Dynamic client instance.\n * @notInstrumented\n */\nexport const preconnectWaasIframe = (client: DynamicClient): void => {\n const core = getCore(client);\n try {\n if (!isDynamicWaasEnabled(client)) return;\n\n preconnectWaasIframeOrigin({\n authMode: (isCookieEnabled(client) ? 'cookie' : 'header') as AuthMode,\n baseApiUrl: (core.apiBaseUrl || DEFAULT_WAAS_BASE_API_URL).replace(\n '/api/v0',\n ''\n ),\n });\n } catch (error) {\n // Best-effort: never break the auth flow (also swallows the assertion\n // from isDynamicWaasEnabled when project settings are not loaded yet).\n core.logger.warn('[preconnectWaasIframe] skipped', error);\n }\n};\n","import type { User } from '../../user/user.types';\n\n/**\n * Checks if device registration is required for the given user.\n *\n * This function determines if the user has the deviceRegistration\n * scope, indicating that device registration is required.\n *\n * @param user - The user to check.\n * @returns True if device registration is required, false otherwise.\n * @notInstrumented\n */\nexport const isDeviceRegistrationRequired = (user: User) =>\n Boolean(user.scope?.includes('device:register'));\n","import { MfaBackupCodeAcknowledgement } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if the user is still pending acknowledgment of their MFA recovery codes.\n *\n * This function determines whether the user has been presented with recovery\n * codes that they have not yet acknowledged as saved or backed up.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if recovery codes are pending acknowledgment, false otherwise.\n * @notInstrumented\n */\nexport const isPendingRecoveryCodesAcknowledgment = (\n client = getDefaultClient()\n) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n return (\n user.mfaBackupCodeAcknowledgement === MfaBackupCodeAcknowledgement.Pending\n );\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { isDeviceRegistrationRequired } from '../../deviceRegistration/isDeviceRegistrationRequired';\nimport { isPendingRecoveryCodesAcknowledgment } from '../../mfa/isPendingRecoveryCodesAcknowledgment';\nimport { isUserMissingMfaAuth } from '../../mfa/isUserMissingMfaAuth';\n\n/**\n * Checks if the user has completed all onboarding requirements.\n *\n * This function verifies whether a user has fulfilled all necessary requirements\n * including KYC fields (Know Your Customer information), MFA setup\n * (Multi-Factor Authentication including recovery codes acknowledgment), and\n * device registration.\n *\n * A `false` result means the user still has an outstanding onboarding step, so\n * any feature that requires a fully onboarded (`user:basic`) user should hold\n * off until it returns `true`. Creating or accessing an embedded (WaaS) wallet\n * is one such feature — its backend calls reject a pre-`user:basic` token — but\n * this predicate is general and not specific to embedded wallets.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.\n * @notInstrumented\n */\nexport const isUserOnboardingComplete = (client = getDefaultClient()) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n const hasMissingKycFields = Boolean(user.missingFields?.length);\n const hasPendingMfaAuth = isUserMissingMfaAuth(client);\n const hasPendingRecoveryCodes = isPendingRecoveryCodesAcknowledgment(client);\n const hasPendingDeviceRegistration = isDeviceRegistrationRequired(user);\n\n const userOnboardingComplete =\n !hasMissingKycFields &&\n !hasPendingMfaAuth &&\n !hasPendingRecoveryCodes &&\n !hasPendingDeviceRegistration;\n\n return userOnboardingComplete;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,IAAa,gCAAb,cAAmD,UAAU;CAC3D,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;;;;;;;;;;;;;;;;ACLN,MAAaA,0BAAwB,WAAgC;CACnE,MAAM,OAAO,QAAQ,OAAO;AAC5B,KAAI;AACF,MAAI,CAAC,qBAAqB,OAAO,CAAE;AAEnC,uBAA2B;GACzB,UAAW,gBAAgB,OAAO,GAAG,WAAW;GAChD,aAAa,KAAK,cAAc,2BAA2B,QACzD,WACA,GACD;GACF,CAAC;UACK,OAAO;AAGd,OAAK,OAAO,KAAK,kCAAkC,MAAM;;;;;;;;;;;;;;;;ACtB7D,MAAa,gCAAgC,SAC3C,QAAQ,KAAK,OAAO,SAAS,kBAAkB,CAAC;;;;;;;;;;;;;;ACElD,MAAa,wCACX,SAAS,kBAAkB,KACxB;CACH,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;AAEzC,QACE,KAAK,iCAAiC,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;ACCvE,MAAa,4BAA4B,SAAS,kBAAkB,KAAK;CACvE,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;CAEzC,MAAM,sBAAsB,QAAQ,KAAK,eAAe,OAAO;CAC/D,MAAM,oBAAoB,qBAAqB,OAAO;CACtD,MAAM,0BAA0B,qCAAqC,OAAO;CAC5E,MAAM,+BAA+B,6BAA6B,KAAK;AAQvE,QALE,CAAC,uBACD,CAAC,qBACD,CAAC,2BACD,CAAC"}