@dynamic-labs-sdk/client 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/android/build.gradle +71 -0
  2. package/android/src/main/java/xyz/dynamic/client/DynamicClientPackage.kt +42 -0
  3. package/android/src/main/java/xyz/dynamic/client/keychain/KeyStoreKeyManager.kt +147 -0
  4. package/android/src/main/java/xyz/dynamic/client/keychain/KeychainModule.kt +85 -0
  5. package/android/src/main/java/xyz/dynamic/client/manifest/ReactNativeManifestModule.kt +25 -0
  6. package/dist/{InvalidParamError-B5NwKSKU.native.esm.js → InvalidParamError-BDHw6nr1.native.esm.js} +7 -6
  7. package/dist/InvalidParamError-BDHw6nr1.native.esm.js.map +1 -0
  8. package/dist/{InvalidParamError-D-d-UfBL.cjs.js → InvalidParamError-BqDEZ6er.cjs.js} +3 -3
  9. package/dist/InvalidParamError-BqDEZ6er.cjs.js.map +1 -0
  10. package/dist/{InvalidParamError-BiVmL7nM.esm.js → InvalidParamError-DcN56mC-.esm.js} +2 -2
  11. package/dist/InvalidParamError-DcN56mC-.esm.js.map +1 -0
  12. package/dist/{NotWaasWalletAccountError-BX5lUnKT.native.esm.js → NotWaasWalletAccountError-B_TYSgak.native.esm.js} +3 -3
  13. package/dist/{NotWaasWalletAccountError-BX5lUnKT.native.esm.js.map → NotWaasWalletAccountError-B_TYSgak.native.esm.js.map} +1 -1
  14. package/dist/{NotWaasWalletAccountError-Bo4VhW4n.esm.js → NotWaasWalletAccountError-CQ7CMol4.esm.js} +3 -3
  15. package/dist/{NotWaasWalletAccountError-Bo4VhW4n.esm.js.map → NotWaasWalletAccountError-CQ7CMol4.esm.js.map} +1 -1
  16. package/dist/{NotWaasWalletAccountError-BJaemI4V.cjs.js → NotWaasWalletAccountError-ftYfHk_N.cjs.js} +3 -3
  17. package/dist/{NotWaasWalletAccountError-BJaemI4V.cjs.js.map → NotWaasWalletAccountError-ftYfHk_N.cjs.js.map} +1 -1
  18. package/dist/core.cjs.js +36 -6
  19. package/dist/core.cjs.js.map +1 -1
  20. package/dist/core.esm.js +34 -6
  21. package/dist/core.esm.js.map +1 -1
  22. package/dist/core.native.esm.js +46 -6
  23. package/dist/core.native.esm.js.map +1 -1
  24. package/dist/errors/NativeModuleNotLinkedError.d.ts +9 -0
  25. package/dist/errors/NativeModuleNotLinkedError.d.ts.map +1 -0
  26. package/dist/errors/ReactNativeOnlyError.d.ts +9 -0
  27. package/dist/errors/ReactNativeOnlyError.d.ts.map +1 -0
  28. package/dist/exports/core.d.ts +8 -2
  29. package/dist/exports/core.d.ts.map +1 -1
  30. package/dist/{getNetworkProviderFromNetworkId-5dK99mQR.esm.js → getNetworkProviderFromNetworkId-BRWuk0I8.native.esm.js} +408 -153
  31. package/dist/getNetworkProviderFromNetworkId-BRWuk0I8.native.esm.js.map +1 -0
  32. package/dist/{getNetworkProviderFromNetworkId-DWOYr3uv.native.esm.js → getNetworkProviderFromNetworkId-COHxfpo-.esm.js} +273 -46
  33. package/dist/getNetworkProviderFromNetworkId-COHxfpo-.esm.js.map +1 -0
  34. package/dist/{getNetworkProviderFromNetworkId-Cl2XDWo9.cjs.js → getNetworkProviderFromNetworkId-ClfETwqS.cjs.js} +302 -51
  35. package/dist/getNetworkProviderFromNetworkId-ClfETwqS.cjs.js.map +1 -0
  36. package/dist/{getSignedSessionId-DakTrfSz.esm.js → getSignedSessionId-B6ry-rvs.esm.js} +3 -3
  37. package/dist/{getSignedSessionId-DakTrfSz.esm.js.map → getSignedSessionId-B6ry-rvs.esm.js.map} +1 -1
  38. package/dist/{getSignedSessionId-BbhZjeRt.cjs.js → getSignedSessionId-Bkw9TATj.cjs.js} +3 -3
  39. package/dist/{getSignedSessionId-BbhZjeRt.cjs.js.map → getSignedSessionId-Bkw9TATj.cjs.js.map} +1 -1
  40. package/dist/{getSignedSessionId-Dk3_TQLq.native.esm.js → getSignedSessionId-C58DvQAd.native.esm.js} +3 -3
  41. package/dist/{getSignedSessionId-Dk3_TQLq.native.esm.js.map → getSignedSessionId-C58DvQAd.native.esm.js.map} +1 -1
  42. package/dist/{getVerifiedCredentialForWalletAccount-BDvkZbtb.cjs.js → getVerifiedCredentialForWalletAccount-DEiU9FZG.cjs.js} +11 -10
  43. package/dist/getVerifiedCredentialForWalletAccount-DEiU9FZG.cjs.js.map +1 -0
  44. package/dist/{getVerifiedCredentialForWalletAccount-ByUSFAHs.esm.js → getVerifiedCredentialForWalletAccount-DP4VQBly.esm.js} +10 -9
  45. package/dist/getVerifiedCredentialForWalletAccount-DP4VQBly.esm.js.map +1 -0
  46. package/dist/{getVerifiedCredentialForWalletAccount-Dhqf6Tdl.native.esm.js → getVerifiedCredentialForWalletAccount-d_bHvLLE.native.esm.js} +10 -9
  47. package/dist/getVerifiedCredentialForWalletAccount-d_bHvLLE.native.esm.js.map +1 -0
  48. package/dist/index.cjs.js +75 -276
  49. package/dist/index.cjs.js.map +1 -1
  50. package/dist/index.esm.js +71 -272
  51. package/dist/index.esm.js.map +1 -1
  52. package/dist/index.native.esm.js +71 -272
  53. package/dist/index.native.esm.js.map +1 -1
  54. package/dist/{isMfaRequiredForAction-y15A_lhP.native.esm.js → isMfaRequiredForAction-Cjbuyen3.native.esm.js} +2 -2
  55. package/dist/{isMfaRequiredForAction-y15A_lhP.native.esm.js.map → isMfaRequiredForAction-Cjbuyen3.native.esm.js.map} +1 -1
  56. package/dist/{isMfaRequiredForAction-SFbQW5j5.esm.js → isMfaRequiredForAction-D8GPFYzv.esm.js} +2 -2
  57. package/dist/{isMfaRequiredForAction-SFbQW5j5.esm.js.map → isMfaRequiredForAction-D8GPFYzv.esm.js.map} +1 -1
  58. package/dist/{isMfaRequiredForAction-CYrluCK-.cjs.js → isMfaRequiredForAction-mZub0YwI.cjs.js} +2 -2
  59. package/dist/{isMfaRequiredForAction-CYrluCK-.cjs.js.map → isMfaRequiredForAction-mZub0YwI.cjs.js.map} +1 -1
  60. package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts.map +1 -1
  61. package/dist/modules/auth/initializeAuth/initializeAuth.d.ts +1 -1
  62. package/dist/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.d.ts +8 -2
  63. package/dist/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.d.ts.map +1 -1
  64. package/dist/modules/auth/logout/logout.d.ts +1 -1
  65. package/dist/modules/auth/logout/logout.d.ts.map +1 -1
  66. package/dist/modules/auth/logoutReason.d.ts +4 -7
  67. package/dist/modules/auth/logoutReason.d.ts.map +1 -1
  68. package/dist/modules/auth/logoutWithReason/index.d.ts +2 -0
  69. package/dist/modules/auth/logoutWithReason/index.d.ts.map +1 -0
  70. package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts +24 -0
  71. package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -0
  72. package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts +7 -4
  73. package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.d.ts.map +1 -1
  74. package/dist/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.d.ts.map +1 -1
  75. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts +6 -4
  76. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts.map +1 -1
  77. package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
  78. package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
  79. package/dist/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.d.ts +6 -2
  80. package/dist/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.d.ts.map +1 -1
  81. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts +9 -5
  82. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts.map +1 -1
  83. package/dist/modules/storageSync/schema.d.ts.map +1 -1
  84. package/dist/modules/user/deleteUser/deleteUser.d.ts +1 -1
  85. package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts +9 -1
  86. package/dist/modules/wallets/utils/isSameAddress/isSameAddress.d.ts.map +1 -1
  87. package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts +7 -1
  88. package/dist/modules/wallets/utils/normalizeAddress/normalizeAddress.d.ts.map +1 -1
  89. package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts.map +1 -1
  90. package/dist/services/keychain/createKeychainService/ImportKeyNotSupportedError.d.ts +5 -0
  91. package/dist/services/keychain/createKeychainService/ImportKeyNotSupportedError.d.ts.map +1 -0
  92. package/dist/services/keychain/createKeychainService/KeyNotFoundError.d.ts.map +1 -0
  93. package/dist/services/keychain/createKeychainService/createKeychainService.d.ts +4 -0
  94. package/dist/services/keychain/createKeychainService/createKeychainService.d.ts.map +1 -0
  95. package/dist/services/keychain/createKeychainService/createKeychainService.types.d.ts +11 -0
  96. package/dist/services/keychain/createKeychainService/createKeychainService.types.d.ts.map +1 -0
  97. package/dist/services/keychain/createKeychainService/index.d.ts +2 -0
  98. package/dist/services/keychain/createKeychainService/index.d.ts.map +1 -0
  99. package/dist/services/keychain/createKeychainService/utils/constants.d.ts.map +1 -0
  100. package/dist/services/keychain/createKeychainService/utils/deleteIndexedDBItem.d.ts +9 -0
  101. package/dist/services/keychain/createKeychainService/utils/deleteIndexedDBItem.d.ts.map +1 -0
  102. package/dist/services/keychain/createKeychainService/utils/getIndexedDBItem.d.ts +10 -0
  103. package/dist/services/keychain/createKeychainService/utils/getIndexedDBItem.d.ts.map +1 -0
  104. package/dist/services/keychain/createKeychainService/utils/openDatabase.d.ts.map +1 -0
  105. package/dist/services/keychain/createKeychainService/utils/setIndexedDBItem.d.ts +10 -0
  106. package/dist/services/keychain/createKeychainService/utils/setIndexedDBItem.d.ts.map +1 -0
  107. package/dist/services/keychain/createKeychainService/utils/withDatabase/index.d.ts.map +1 -0
  108. package/dist/services/keychain/createKeychainService/utils/withDatabase/withDatabase.d.ts.map +1 -0
  109. package/dist/services/keychain/index.d.ts +1 -1
  110. package/dist/services/keychain/index.d.ts.map +1 -1
  111. package/dist/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.d.ts +11 -0
  112. package/dist/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.d.ts.map +1 -0
  113. package/dist/services/nativeManifest/getReactNativeManifest/index.d.ts +2 -0
  114. package/dist/services/nativeManifest/getReactNativeManifest/index.d.ts.map +1 -0
  115. package/dist/services/nativeManifest/nativeManifest.types.d.ts +14 -0
  116. package/dist/services/nativeManifest/nativeManifest.types.d.ts.map +1 -0
  117. package/dist/services/storage/createLocalStorageAdapter/createLocalStorageAdapter.d.ts +2 -2
  118. package/dist/services/storage/createStorage/createStorage.d.ts +4 -2
  119. package/dist/services/storage/createStorage/createStorage.d.ts.map +1 -1
  120. package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts +2 -1
  121. package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts.map +1 -1
  122. package/dist/services/storage/index.d.ts +1 -1
  123. package/dist/services/storage/index.d.ts.map +1 -1
  124. package/dist/services/storage/storage.types.d.ts +27 -3
  125. package/dist/services/storage/storage.types.d.ts.map +1 -1
  126. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  127. package/dist/utils/base64urlFromBytes/base64urlFromBytes.d.ts +8 -0
  128. package/dist/utils/base64urlFromBytes/base64urlFromBytes.d.ts.map +1 -0
  129. package/dist/utils/base64urlFromBytes/index.d.ts +2 -0
  130. package/dist/utils/base64urlFromBytes/index.d.ts.map +1 -0
  131. package/dist/utils/bytesFromBase64url/bytesFromBase64url.d.ts +8 -0
  132. package/dist/utils/bytesFromBase64url/bytesFromBase64url.d.ts.map +1 -0
  133. package/dist/utils/bytesFromBase64url/index.d.ts +2 -0
  134. package/dist/utils/bytesFromBase64url/index.d.ts.map +1 -0
  135. package/dist/utils/derToP1363/InvalidDERSignatureError.d.ts +5 -0
  136. package/dist/utils/derToP1363/InvalidDERSignatureError.d.ts.map +1 -0
  137. package/dist/utils/derToP1363/derToP1363.d.ts +8 -0
  138. package/dist/utils/derToP1363/derToP1363.d.ts.map +1 -0
  139. package/dist/utils/derToP1363/index.d.ts +2 -0
  140. package/dist/utils/derToP1363/index.d.ts.map +1 -0
  141. package/dist/utils/randomString/randomString.d.ts +1 -1
  142. package/dist/utils/randomString/randomString.d.ts.map +1 -1
  143. package/dist/waas.cjs.js +4 -4
  144. package/dist/waas.esm.js +3 -3
  145. package/dist/waas.native.esm.js +3 -3
  146. package/dist/waasCore.cjs.js +4 -4
  147. package/dist/waasCore.cjs.js.map +1 -1
  148. package/dist/waasCore.esm.js +3 -3
  149. package/dist/waasCore.esm.js.map +1 -1
  150. package/dist/waasCore.native.esm.js +3 -3
  151. package/dist/waasCore.native.esm.js.map +1 -1
  152. package/dynamic-labs-sdk-client.podspec +27 -0
  153. package/ios/Keychain.h +4 -0
  154. package/ios/Keychain.mm +101 -0
  155. package/ios/ReactNativeManifest.h +4 -0
  156. package/ios/ReactNativeManifest.mm +45 -0
  157. package/ios/ReactNativeManifestImpl.swift +20 -0
  158. package/ios/SecureEnclaveKeyManager.swift +180 -0
  159. package/package.json +34 -4
  160. package/react-native.config.cjs +14 -0
  161. package/dist/InvalidParamError-B5NwKSKU.native.esm.js.map +0 -1
  162. package/dist/InvalidParamError-BiVmL7nM.esm.js.map +0 -1
  163. package/dist/InvalidParamError-D-d-UfBL.cjs.js.map +0 -1
  164. package/dist/getNetworkProviderFromNetworkId-5dK99mQR.esm.js.map +0 -1
  165. package/dist/getNetworkProviderFromNetworkId-Cl2XDWo9.cjs.js.map +0 -1
  166. package/dist/getNetworkProviderFromNetworkId-DWOYr3uv.native.esm.js.map +0 -1
  167. package/dist/getVerifiedCredentialForWalletAccount-BDvkZbtb.cjs.js.map +0 -1
  168. package/dist/getVerifiedCredentialForWalletAccount-ByUSFAHs.esm.js.map +0 -1
  169. package/dist/getVerifiedCredentialForWalletAccount-Dhqf6Tdl.native.esm.js.map +0 -1
  170. package/dist/modules/auth/handleSessionExpiration/handleSessionExpiration.d.ts +0 -11
  171. package/dist/modules/auth/handleSessionExpiration/handleSessionExpiration.d.ts.map +0 -1
  172. package/dist/modules/auth/handleSessionExpiration/index.d.ts +0 -2
  173. package/dist/modules/auth/handleSessionExpiration/index.d.ts.map +0 -1
  174. package/dist/modules/auth/performLogout/index.d.ts +0 -2
  175. package/dist/modules/auth/performLogout/index.d.ts.map +0 -1
  176. package/dist/modules/auth/performLogout/performLogout.d.ts +0 -12
  177. package/dist/modules/auth/performLogout/performLogout.d.ts.map +0 -1
  178. package/dist/services/keychain/createIndexedDBKeychainService/KeyNotFoundError.d.ts.map +0 -1
  179. package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.d.ts +0 -8
  180. package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.d.ts.map +0 -1
  181. package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.types.d.ts +0 -6
  182. package/dist/services/keychain/createIndexedDBKeychainService/createIndexedDBKeychainService.types.d.ts.map +0 -1
  183. package/dist/services/keychain/createIndexedDBKeychainService/index.d.ts +0 -2
  184. package/dist/services/keychain/createIndexedDBKeychainService/index.d.ts.map +0 -1
  185. package/dist/services/keychain/createIndexedDBKeychainService/utils/constants.d.ts.map +0 -1
  186. package/dist/services/keychain/createIndexedDBKeychainService/utils/deleteIndexedDBItem.d.ts +0 -3
  187. package/dist/services/keychain/createIndexedDBKeychainService/utils/deleteIndexedDBItem.d.ts.map +0 -1
  188. package/dist/services/keychain/createIndexedDBKeychainService/utils/getIndexedDBItem.d.ts +0 -4
  189. package/dist/services/keychain/createIndexedDBKeychainService/utils/getIndexedDBItem.d.ts.map +0 -1
  190. package/dist/services/keychain/createIndexedDBKeychainService/utils/openDatabase.d.ts.map +0 -1
  191. package/dist/services/keychain/createIndexedDBKeychainService/utils/setIndexedDBItem.d.ts +0 -4
  192. package/dist/services/keychain/createIndexedDBKeychainService/utils/setIndexedDBItem.d.ts.map +0 -1
  193. package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/index.d.ts.map +0 -1
  194. package/dist/services/keychain/createIndexedDBKeychainService/utils/withDatabase/withDatabase.d.ts.map +0 -1
  195. /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/KeyNotFoundError.d.ts +0 -0
  196. /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/constants.d.ts +0 -0
  197. /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/openDatabase.d.ts +0 -0
  198. /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/withDatabase/index.d.ts +0 -0
  199. /package/dist/services/keychain/{createIndexedDBKeychainService → createKeychainService}/utils/withDatabase/withDatabase.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { F as getDefaultClient, k as assertDefined, u as __createApiClient_wrapped, w as instrumentFunction, z as getCore } from "./InvalidParamError-B5NwKSKU.native.esm.js";
1
+ import { F as getDefaultClient, k as assertDefined, u as __createApiClient_wrapped, w as instrumentFunction, z as getCore } from "./InvalidParamError-BDHw6nr1.native.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -86,4 +86,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
86
86
 
87
87
  //#endregion
88
88
  export { __getMfaMethods_wrapped as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
89
- //# sourceMappingURL=isMfaRequiredForAction-y15A_lhP.native.esm.js.map
89
+ //# sourceMappingURL=isMfaRequiredForAction-Cjbuyen3.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-y15A_lhP.native.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 */\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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,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,MAAMA,wBAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-Cjbuyen3.native.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 */\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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,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,MAAMA,wBAAc,OAAO,EAG5B"}
@@ -1,4 +1,4 @@
1
- import { F as getDefaultClient, k as assertDefined, u as __createApiClient_wrapped, w as instrumentFunction, z as getCore } from "./InvalidParamError-BiVmL7nM.esm.js";
1
+ import { F as getDefaultClient, k as assertDefined, u as __createApiClient_wrapped, w as instrumentFunction, z as getCore } from "./InvalidParamError-DcN56mC-.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -86,4 +86,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
86
86
 
87
87
  //#endregion
88
88
  export { __getMfaMethods_wrapped as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
89
- //# sourceMappingURL=isMfaRequiredForAction-SFbQW5j5.esm.js.map
89
+ //# sourceMappingURL=isMfaRequiredForAction-D8GPFYzv.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-SFbQW5j5.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 */\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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,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,MAAMA,wBAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-D8GPFYzv.esm.js","names":["getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 */\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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,QAAe,OAAO;QAG1B,MAFe,0BAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,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,MAAMA,wBAAc,OAAO,EAG5B"}
@@ -1,4 +1,4 @@
1
- const require_InvalidParamError = require('./InvalidParamError-D-d-UfBL.cjs.js');
1
+ const require_InvalidParamError = require('./InvalidParamError-BqDEZ6er.cjs.js');
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -103,4 +103,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
103
103
  return isMfaRequiredForAction;
104
104
  }
105
105
  });
106
- //# sourceMappingURL=isMfaRequiredForAction-CYrluCK-.cjs.js.map
106
+ //# sourceMappingURL=isMfaRequiredForAction-mZub0YwI.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-CYrluCK-.cjs.js","names":["getDefaultClient","getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 */\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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,kCAAe,OAAO;QAG1B,MAFe,oDAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASA,4CAAkB,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,MAAMC,wBAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-mZub0YwI.cjs.js","names":["getDefaultClient","getMfaMethods"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["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 */\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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CCTC,MAAM,OAAA,kCAAe,OAAO;QAG1B,MAFe,oDAAK,EAAa,EAAA,OAAA,CAEjC,kBAAA;;EAEF,cAAO;EACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJD,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASA,4CAAkB,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,MAAMC,wBAAc,OAAO,EAG5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"requestExternalAuthElevatedToken.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts"],"names":[],"mappings":"AAMA,KAAK,sCAAsC,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,oBAC1B,sCAAsC,sIAyBxD,CAAC"}
1
+ {"version":3,"file":"requestExternalAuthElevatedToken.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts"],"names":[],"mappings":"AAMA,KAAK,sCAAsC,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,oBAC1B,sCAAsC,sIA2BxD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { DynamicClient } from '../../../client/types';
2
2
  /**
3
3
  * Sets up a timeout to log out the user when their token expires.
4
- * @not-instrumented
4
+ * @not-instrumented
5
5
  */
6
6
  export declare const initializeAuth: (client: DynamicClient) => void;
7
7
  //# sourceMappingURL=initializeAuth.d.ts.map
@@ -1,6 +1,12 @@
1
+ export type SetLongTimeoutOptions = {
2
+ /** The function to invoke after the delay elapses. */
3
+ callback: () => void;
4
+ /** The delay in milliseconds before invoking the callback. */
5
+ delay: number;
6
+ };
1
7
  /**
2
8
  * A replacement for setTimeout that supports delays longer than 2147483647ms (~24.8 days).
3
- * @not-instrumented
9
+ * @not-instrumented
4
10
  */
5
- export declare const setLongTimeout: (callback: () => void, delay: number) => VoidFunction;
11
+ export declare const setLongTimeout: ({ callback, delay, }: SetLongTimeoutOptions) => VoidFunction;
6
12
  //# sourceMappingURL=setLongTimeout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setLongTimeout.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,cAAc,aACf,MAAM,IAAI,SACb,MAAM,KACZ,YAyBF,CAAC"}
1
+ {"version":3,"file":"setLongTimeout.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,sDAAsD;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,yBAGxB,qBAAqB,KAAG,YAyB1B,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
5
5
  * @returns A promise that resolves when the logout process is complete.
6
- * @instrumented
6
+ * @not-instrumented
7
7
  */
8
8
  export declare const logout: (client?: import("../../../exports").DynamicClient) => Promise<void>;
9
9
  //# sourceMappingURL=logout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,sEAElB,CAAC"}
1
+ {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,sEAQlB,CAAC"}
@@ -1,11 +1,8 @@
1
1
  /**
2
- * Describes why a logout was triggered.
2
+ * The reason a logout was triggered.
3
3
  *
4
- * Passed through the logout chain so downstream providers (e.g. wallet providers)
5
- * can decide their own cleanup behavior based on context.
6
- *
7
- * - `'user-intent'` — The user explicitly requested logout.
8
- * - `'token-expired'` — The session token expired automatically.
4
+ * Surfaced in Datadog logout events so we can understand why users are being
5
+ * signed out.
9
6
  */
10
- export type LogoutReason = 'token-expired' | 'user-intent';
7
+ export type LogoutReason = 'user-intent' | 'token-expired' | 'keychain-migration-failed' | 'keychain-key-missing' | 'session-refresh-unauthorized' | 'user-refresh-failed' | 'user-deleted' | 'device-revoked' | 'all-devices-revoked';
11
8
  //# sourceMappingURL=logoutReason.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,eAAe,GACf,2BAA2B,GAC3B,sBAAsB,GACtB,8BAA8B,GAC9B,qBAAqB,GACrB,cAAc,GACd,gBAAgB,GAChB,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { logoutWithReason } from './logoutWithReason';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { DynamicClient } from '../../../client/types';
2
+ import type { LogoutReason } from '../logoutReason';
3
+ /**
4
+ * Logs the user out with an explicit reason.
5
+ *
6
+ * Revokes the session, clears auth state, terminates wallet providers, and
7
+ * emits the `logout` client event with the given reason. The reason is also
8
+ * captured as an argument on the function-instrumentation event, which is
9
+ * how Datadog distinguishes between different logout causes.
10
+ *
11
+ * Use this instead of the public `logout` when triggering a logout from
12
+ * internal or extension code — the caller owns the reason string, so the
13
+ * telemetry correctly attributes *why* the logout happened.
14
+ *
15
+ * @param params - The logout params.
16
+ * @param params.reason - Why the logout is being triggered. Extension authors
17
+ * needing a reason outside the SDK catalog can cast with `as LogoutReason`.
18
+ * @param client - The Dynamic client instance.
19
+ * @instrumented
20
+ */
21
+ export declare const logoutWithReason: ({ reason }: {
22
+ reason: LogoutReason;
23
+ }, client: DynamicClient) => Promise<void>;
24
+ //# sourceMappingURL=logoutWithReason.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logoutWithReason.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/logoutWithReason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,eACf;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,UAC5B,aAAa,kBAmDtB,CAAC"}
@@ -1,11 +1,14 @@
1
1
  import { type Provider } from '@dynamic-labs/sdk-api-core';
2
- type AddOAuthUrlParamsOptions = {
2
+ export type AddOAuthUrlParamsOptions = {
3
+ /** The base URL to add OAuth parameters to. */
4
+ baseUrl: URL;
3
5
  /** When true, adds prompt=consent to force Google to return a fresh refresh token. * @not-instrumented
4
- */
6
+ */
5
7
  isGoogleDriveBackupEnabled?: boolean;
8
+ /** The provider configuration to build the URL for. */
9
+ provider: Provider;
6
10
  };
7
11
  /** Helper function to add OAuth URL parameters to a given base URL. * @not-instrumented
8
12
  */
9
- export declare const addOAuthUrlParams: (provider: Provider, baseUrl: URL, options?: AddOAuthUrlParamsOptions) => URL;
10
- export {};
13
+ export declare const addOAuthUrlParams: ({ baseUrl, isGoogleDriveBackupEnabled, provider, }: AddOAuthUrlParamsOptions) => URL;
11
14
  //# sourceMappingURL=addOAuthUrlParams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"addOAuthUrlParams.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,4BAA4B,CAAC;AAOzE,KAAK,wBAAwB,GAAG;IAC9B;KACC;IACD,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF;GACG;AAEH,eAAO,MAAM,iBAAiB,aAClB,QAAQ,WACT,GAAG,YACH,wBAAwB,KAChC,GAmCF,CAAC"}
1
+ {"version":3,"file":"addOAuthUrlParams.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/addOAuthUrlParams/addOAuthUrlParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,4BAA4B,CAAC;AAOzE,MAAM,MAAM,wBAAwB,GAAG;IACrC,+CAA+C;IAC/C,OAAO,EAAE,GAAG,CAAC;IAEb;OACG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,uDAAuD;IACvD,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;GACG;AACH,eAAO,MAAM,iBAAiB,uDAI3B,wBAAwB,KAAG,GAmC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildOAuthUrl.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAUvE,KAAK,QAAQ,GAAG;IACd;KACC;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IAEd,4CAA4C;IAC5C,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;GACG;AAEH,eAAO,MAAM,aAAa,SAElB,WAAW,YAGP,YAAY,KACrB,OAAO,CAAC,QAAQ,CAgDlB,CAAC"}
1
+ {"version":3,"file":"buildOAuthUrl.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/buildOAuthUrl/buildOAuthUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAUvE,KAAK,QAAQ,GAAG;IACd;KACC;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IAEd,4CAA4C;IAC5C,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;GACG;AAEH,eAAO,MAAM,aAAa,SAElB,WAAW,YAGP,YAAY,KACrB,OAAO,CAAC,QAAQ,CAkDlB,CAAC"}
@@ -1,4 +1,8 @@
1
1
  import type { ParsedElevatedAccessToken } from '../elevatedAccessTokens.types';
2
+ export type ParseElevatedAccessTokenOptions = {
3
+ /** JWT string containing the elevated access token. */
4
+ token: string;
5
+ };
2
6
  /**
3
7
  * Validates and parses an elevated access token from a JWT string.
4
8
  * Extracts scopes, expiration, and validates the token structure.
@@ -9,10 +13,8 @@ import type { ParsedElevatedAccessToken } from '../elevatedAccessTokens.types';
9
13
  * - Tokens without exp field are rejected (returns null)
10
14
  * - Expired tokens are rejected (returns null)
11
15
  *
12
- * @param token - JWT string containing the elevated access token
13
- * @param now - Current date for expiration validation (defaults to new Date())
14
16
  * @returns Parsed token data or null if token is invalid/expired
15
- * @not-instrumented
17
+ * @not-instrumented
16
18
  */
17
- export declare const parseElevatedAccessToken: (token: string, now?: Date) => ParsedElevatedAccessToken | null;
19
+ export declare const parseElevatedAccessToken: ({ token, }: ParseElevatedAccessTokenOptions) => ParsedElevatedAccessToken | null;
18
20
  //# sourceMappingURL=parseElevatedAccessToken.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,wBAAwB,UAC5B,MAAM,QACR,IAAI,KACR,yBAAyB,GAAG,IAgC9B,CAAC"}
1
+ {"version":3,"file":"parseElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,eAElC,+BAA+B,KAAG,yBAAyB,GAAG,IAgChE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateAuthFromVerifyResponse.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,4BAA4B,iBACzB,kCAAkC,UACxC,aAAa,SA+DtB,CAAC"}
1
+ {"version":3,"file":"updateAuthFromVerifyResponse.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,4BAA4B,iBACzB,kCAAkC,UACxC,aAAa,SAiEtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializeClient.d.ts","sourceRoot":"","sources":["../../../src/modules/initializeClient/initializeClient.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,mEA6J5B,CAAC"}
1
+ {"version":3,"file":"initializeClient.d.ts","sourceRoot":"","sources":["../../../src/modules/initializeClient/initializeClient.ts"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,mEAkK5B,CAAC"}
@@ -1,11 +1,15 @@
1
1
  import type { DynamicClient } from '../../../client/types';
2
+ export type SetInstrumentationEnabledOptions = {
3
+ /** Whether event collection should be active. */
4
+ enabled: boolean;
5
+ };
2
6
  /**
3
7
  * Enables or disables event collection for the client's instrumentation service.
4
8
  *
5
9
  * When enabled, events are forwarded to the configured transport on every
6
10
  * instrumented function call. When disabled, instrumented functions run
7
11
  * normally but emit no telemetry.
8
- * @instrumented
12
+ * @instrumented
9
13
  */
10
- export declare const setInstrumentationEnabled: (enabled: boolean, client?: DynamicClient) => void;
14
+ export declare const setInstrumentationEnabled: ({ enabled }: SetInstrumentationEnabledOptions, client?: DynamicClient) => void;
11
15
  //# sourceMappingURL=setInstrumentationEnabled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setInstrumentationEnabled.d.ts","sourceRoot":"","sources":["../../../../src/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;;GAOG;AAEH,eAAO,MAAM,yBAAyB,YAC3B,OAAO,WACR,aAAa,SAGtB,CAAC"}
1
+ {"version":3,"file":"setInstrumentationEnabled.d.ts","sourceRoot":"","sources":["../../../../src/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,gCAAgC,GAAG;IAC7C,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,gBACvB,gCAAgC,WACrC,aAAa,SAGtB,CAAC"}
@@ -2,16 +2,20 @@ import type { WalletSchema } from '../../legacyWalletBook.types';
2
2
  /**
3
3
  * Embedded wallet keys that should be filtered out from the WalletConnect catalog.
4
4
  * These wallets are not meant to be displayed in wallet selection lists.
5
- * @not-instrumented
5
+ * @not-instrumented
6
6
  */
7
7
  export declare const EMBEDDED_WALLET_KEYS: string[];
8
+ export type ShouldFilterWalletOptions = {
9
+ /** The wallet schema to check. */
10
+ wallet: WalletSchema;
11
+ /** The wallet key identifier. */
12
+ walletKey: string;
13
+ };
8
14
  /**
9
15
  * Checks if a wallet should be filtered out from the WalletConnect catalog.
10
16
  *
11
- * @param walletKey - The wallet key identifier.
12
- * @param wallet - The wallet schema to check.
13
17
  * @returns True if the wallet should be filtered out, false otherwise.
14
- * @not-instrumented
18
+ * @not-instrumented
15
19
  */
16
- export declare const shouldFilterWallet: (walletKey: string, wallet: WalletSchema) => boolean;
20
+ export declare const shouldFilterWallet: ({ wallet, walletKey, }: ShouldFilterWalletOptions) => boolean;
17
21
  //# sourceMappingURL=shouldFilterWallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shouldFilterWallet.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,UAWhC,CAAC;AAEF;;;;;;;GAOG;AAEH,eAAO,MAAM,kBAAkB,cAClB,MAAM,UACT,YAAY,KACnB,OAkCF,CAAC"}
1
+ {"version":3,"file":"shouldFilterWallet.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,UAWhC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,kCAAkC;IAClC,MAAM,EAAE,YAAY,CAAC;IAErB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,2BAG5B,yBAAyB,KAAG,OAkC9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/storageSync/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;EAWhC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EA2DlC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/storageSync/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;EAWhC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EA4DlC,CAAC"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
8
8
  * @returns A promise that resolves when the user account is successfully deleted.
9
- * @instrumented
9
+ * @instrumented
10
10
  */
11
11
  export declare const deleteUser: (client?: import("../../../exports").DynamicClient) => Promise<void>;
12
12
  //# sourceMappingURL=deleteUser.d.ts.map
@@ -1,4 +1,12 @@
1
1
  import type { Chain } from '../../../chain';
2
+ export type IsSameAddressOptions = {
3
+ /** The chain used to normalize both addresses before comparison. */
4
+ chain: Chain;
5
+ /** The first address to compare. */
6
+ left: string;
7
+ /** The second address to compare. */
8
+ right: string;
9
+ };
2
10
  /** @not-instrumented */
3
- export declare const isSameAddress: (left: string, right: string, chain: Chain) => boolean;
11
+ export declare const isSameAddress: ({ chain, left, right }: IsSameAddressOptions) => boolean;
4
12
  //# sourceMappingURL=isSameAddress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isSameAddress.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/utils/isSameAddress/isSameAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG5C,wBAAwB;AAExB,eAAO,MAAM,aAAa,SAAU,MAAM,SAAS,MAAM,SAAS,KAAK,YACL,CAAC"}
1
+ {"version":3,"file":"isSameAddress.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/utils/isSameAddress/isSameAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG5C,MAAM,MAAM,oBAAoB,GAAG;IACjC,oEAAoE;IACpE,KAAK,EAAE,KAAK,CAAC;IAEb,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,aAAa,2BAA4B,oBAAoB,YAE7B,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import type { Chain } from '../../../chain';
2
+ export type NormalizeAddressOptions = {
3
+ /** The raw address to normalize. */
4
+ address: string;
5
+ /** The chain the address belongs to. */
6
+ chain: Chain;
7
+ };
2
8
  /** @not-instrumented */
3
- export declare const normalizeAddress: (address: string, chain: Chain) => string;
9
+ export declare const normalizeAddress: ({ address, chain }: NormalizeAddressOptions) => string;
4
10
  //# sourceMappingURL=normalizeAddress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeAddress.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/utils/normalizeAddress/normalizeAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,wBAAwB;AAExB,eAAO,MAAM,gBAAgB,YAAa,MAAM,SAAS,KAAK,WAmB7D,CAAC"}
1
+ {"version":3,"file":"normalizeAddress.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/utils/normalizeAddress/normalizeAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,MAAM,uBAAuB,GAAG;IACpC,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAEhB,wCAAwC;IACxC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,gBAAgB,uBAAwB,uBAAuB,WAmB3E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"verifyWalletAccountForSignInOrTransfer.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,KAAK,4CAA4C,GAAG;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,sCAAsC,oDAK9C,4CAA4C,UACvC,aAAa,KACpB,OAAO,CAAC,aAAa,CA2FvB,CAAC"}
1
+ {"version":3,"file":"verifyWalletAccountForSignInOrTransfer.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,KAAK,4CAA4C,GAAG;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,sCAAsC,oDAK9C,4CAA4C,UACvC,aAAa,KACpB,OAAO,CAAC,aAAa,CA+FvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BaseError } from '../../../errors/base';
2
+ export declare class ImportKeyNotSupportedError extends BaseError {
3
+ constructor();
4
+ }
5
+ //# sourceMappingURL=ImportKeyNotSupportedError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportKeyNotSupportedError.d.ts","sourceRoot":"","sources":["../../../../src/services/keychain/createKeychainService/ImportKeyNotSupportedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,qBAAa,0BAA2B,SAAQ,SAAS;;CAYxD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyNotFoundError.d.ts","sourceRoot":"","sources":["../../../../src/services/keychain/createKeychainService/KeyNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,qBAAa,gBAAiB,SAAQ,SAAS;gBAEjC,OAAO,EAAE,MAAM;CAS5B"}
@@ -0,0 +1,4 @@
1
+ import type { CreateKeychainService } from './createKeychainService.types';
2
+ /** @instrumented */
3
+ export declare const createKeychainService: CreateKeychainService;
4
+ //# sourceMappingURL=createKeychainService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createKeychainService.d.ts","sourceRoot":"","sources":["../../../../src/services/keychain/createKeychainService/createKeychainService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAS3E,oBAAoB;AACpB,eAAO,MAAM,qBAAqB,EAAE,qBAyInC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { KeychainService } from '../keychain.types';
2
+ export type StoredKey = {
3
+ keyName: string;
4
+ privateKey: CryptoKey;
5
+ publicKeyHex: string;
6
+ };
7
+ export type CreateKeychainServiceParams = {
8
+ dbName?: string;
9
+ };
10
+ export type CreateKeychainService = (params?: CreateKeychainServiceParams) => KeychainService;
11
+ //# sourceMappingURL=createKeychainService.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createKeychainService.types.d.ts","sourceRoot":"","sources":["../../../../src/services/keychain/createKeychainService/createKeychainService.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAClC,MAAM,CAAC,EAAE,2BAA2B,KACjC,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createKeychainService } from './createKeychainService';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/keychain/createKeychainService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/services/keychain/createKeychainService/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ export type DeleteIndexedDBItemOptions = {
2
+ /** The IndexedDB database handle. */
3
+ db: IDBDatabase;
4
+ /** The key name to delete. */
5
+ keyName: string;
6
+ };
7
+ /** @not-instrumented */
8
+ export declare const deleteIndexedDBItem: ({ db, keyName, }: DeleteIndexedDBItemOptions) => Promise<void>;
9
+ //# sourceMappingURL=deleteIndexedDBItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteIndexedDBItem.d.ts","sourceRoot":"","sources":["../../../../../src/services/keychain/createKeychainService/utils/deleteIndexedDBItem.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG;IACvC,qCAAqC;IACrC,EAAE,EAAE,WAAW,CAAC;IAEhB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,mBAAmB,qBAG7B,0BAA0B,KAAG,OAAO,CAAC,IAAI,CAQxC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { StoredKey } from '../createKeychainService.types';
2
+ export type GetIndexedDBItemOptions = {
3
+ /** The IndexedDB database handle. */
4
+ db: IDBDatabase;
5
+ /** The key name to look up. */
6
+ keyName: string;
7
+ };
8
+ /** @not-instrumented */
9
+ export declare const getIndexedDBItem: ({ db, keyName, }: GetIndexedDBItemOptions) => Promise<StoredKey | undefined>;
10
+ //# sourceMappingURL=getIndexedDBItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getIndexedDBItem.d.ts","sourceRoot":"","sources":["../../../../../src/services/keychain/createKeychainService/utils/getIndexedDBItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAGhE,MAAM,MAAM,uBAAuB,GAAG;IACpC,qCAAqC;IACrC,EAAE,EAAE,WAAW,CAAC;IAEhB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,gBAAgB,qBAG1B,uBAAuB,KAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAQtD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openDatabase.d.ts","sourceRoot":"","sources":["../../../../../src/services/keychain/createKeychainService/utils/openDatabase.ts"],"names":[],"mappings":"AAEA,wBAAwB;AACxB,eAAO,MAAM,YAAY,WAAY,MAAM,KAAG,OAAO,CAAC,WAAW,CAc7D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { StoredKey } from '../createKeychainService.types';
2
+ export type SetIndexedDBItemOptions = {
3
+ /** The IndexedDB database handle. */
4
+ db: IDBDatabase;
5
+ /** The stored key entry to write. */
6
+ entry: StoredKey;
7
+ };
8
+ /** @not-instrumented */
9
+ export declare const setIndexedDBItem: ({ db, entry, }: SetIndexedDBItemOptions) => Promise<void>;
10
+ //# sourceMappingURL=setIndexedDBItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setIndexedDBItem.d.ts","sourceRoot":"","sources":["../../../../../src/services/keychain/createKeychainService/utils/setIndexedDBItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAGhE,MAAM,MAAM,uBAAuB,GAAG;IACpC,qCAAqC;IACrC,EAAE,EAAE,WAAW,CAAC;IAEhB,qCAAqC;IACrC,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,wBAAwB;AACxB,eAAO,MAAM,gBAAgB,mBAG1B,uBAAuB,KAAG,OAAO,CAAC,IAAI,CAQrC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/keychain/createKeychainService/utils/withDatabase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withDatabase.d.ts","sourceRoot":"","sources":["../../../../../../src/services/keychain/createKeychainService/utils/withDatabase/withDatabase.ts"],"names":[],"mappings":"AAEA,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAU,CAAC,0BAGjC,kBAAkB,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CASnC,CAAC"}
@@ -1,3 +1,3 @@
1
- export { createIndexedDBKeychainService } from './createIndexedDBKeychainService';
1
+ export { createKeychainService } from './createKeychainService';
2
2
  export type { KeychainService } from './keychain.types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/keychain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/keychain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ReactNativeManifest } from '../nativeManifest.types';
2
+ /**
3
+ * Returns the React Native manifest containing native SDK metadata.
4
+ *
5
+ * This function is only available in React Native environments.
6
+ * On web, it throws a `ReactNativeOnlyError`.
7
+ *
8
+ * @not-instrumented
9
+ */
10
+ export declare const getReactNativeManifest: () => ReactNativeManifest;
11
+ //# sourceMappingURL=getReactNativeManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getReactNativeManifest.d.ts","sourceRoot":"","sources":["../../../../src/services/nativeManifest/getReactNativeManifest/getReactNativeManifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,QAAO,mBAEzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getReactNativeManifest } from './getReactNativeManifest';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/nativeManifest/getReactNativeManifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}