@dynamic-labs-sdk/client 1.9.0 → 1.11.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 (164) hide show
  1. package/dist/{InvalidParamError-YG7yXCq5.native.esm.js → InvalidParamError-BUpLSb5x.native.esm.js} +4 -2
  2. package/dist/{InvalidParamError-YG7yXCq5.native.esm.js.map → InvalidParamError-BUpLSb5x.native.esm.js.map} +1 -1
  3. package/dist/{InvalidParamError-DIPFT3sS.esm.js → InvalidParamError-BazEwozw.esm.js} +5 -2
  4. package/dist/{InvalidParamError-DIPFT3sS.esm.js.map → InvalidParamError-BazEwozw.esm.js.map} +1 -1
  5. package/dist/{InvalidParamError-C7LLi2cZ.cjs → InvalidParamError-CMesesy6.cjs} +6 -3
  6. package/dist/{InvalidParamError-C7LLi2cZ.cjs.map → InvalidParamError-CMesesy6.cjs.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-BWrDQFe8.esm.js → NotWaasWalletAccountError-CIjFmQ_l.esm.js} +2 -2
  8. package/dist/{NotWaasWalletAccountError-BWrDQFe8.esm.js.map → NotWaasWalletAccountError-CIjFmQ_l.esm.js.map} +1 -1
  9. package/dist/{NotWaasWalletAccountError-C8ex1YA_.cjs → NotWaasWalletAccountError-D-yqOoH6.cjs} +2 -2
  10. package/dist/{NotWaasWalletAccountError-C8ex1YA_.cjs.map → NotWaasWalletAccountError-D-yqOoH6.cjs.map} +1 -1
  11. package/dist/{NotWaasWalletAccountError-Cd2o0wr0.native.esm.js → NotWaasWalletAccountError-DWXGDcpr.native.esm.js} +2 -2
  12. package/dist/{NotWaasWalletAccountError-Cd2o0wr0.native.esm.js.map → NotWaasWalletAccountError-DWXGDcpr.native.esm.js.map} +1 -1
  13. package/dist/client/types/DynamicClient.d.ts +3 -0
  14. package/dist/client/types/DynamicClient.d.ts.map +1 -1
  15. package/dist/core.cjs +10 -10
  16. package/dist/core.cjs.map +1 -1
  17. package/dist/core.esm.js +5 -5
  18. package/dist/core.native.esm.js +7 -7
  19. package/dist/core.native.esm.js.map +1 -1
  20. package/dist/errors/FlowSessionTokenMissingError.d.ts +7 -0
  21. package/dist/errors/FlowSessionTokenMissingError.d.ts.map +1 -0
  22. package/dist/exports/index.d.ts +34 -18
  23. package/dist/exports/index.d.ts.map +1 -1
  24. package/dist/{getNetworkProviderFromNetworkId-D-wj5mPl.esm.js → getNetworkProviderFromNetworkId-BfBE-dei.esm.js} +18 -18
  25. package/dist/{getNetworkProviderFromNetworkId-D-wj5mPl.esm.js.map → getNetworkProviderFromNetworkId-BfBE-dei.esm.js.map} +1 -1
  26. package/dist/{getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js → getNetworkProviderFromNetworkId-C-1rPWZm.native.esm.js} +9 -8
  27. package/dist/getNetworkProviderFromNetworkId-C-1rPWZm.native.esm.js.map +1 -0
  28. package/dist/{getNetworkProviderFromNetworkId-CBGWQS_K.cjs → getNetworkProviderFromNetworkId-D4xzWb7w.cjs} +20 -20
  29. package/dist/{getNetworkProviderFromNetworkId-CBGWQS_K.cjs.map → getNetworkProviderFromNetworkId-D4xzWb7w.cjs.map} +1 -1
  30. package/dist/{getSignedSessionId-Dy04984p.esm.js → getSignedSessionId-BWxWFaJW.esm.js} +3 -3
  31. package/dist/{getSignedSessionId-Dy04984p.esm.js.map → getSignedSessionId-BWxWFaJW.esm.js.map} +1 -1
  32. package/dist/{getSignedSessionId-CCHKjoeP.cjs → getSignedSessionId-BimmHQvA.cjs} +3 -3
  33. package/dist/{getSignedSessionId-CCHKjoeP.cjs.map → getSignedSessionId-BimmHQvA.cjs.map} +1 -1
  34. package/dist/{getSignedSessionId-DdKTM3Rh.native.esm.js → getSignedSessionId-fwHlhBvt.native.esm.js} +3 -3
  35. package/dist/{getSignedSessionId-DdKTM3Rh.native.esm.js.map → getSignedSessionId-fwHlhBvt.native.esm.js.map} +1 -1
  36. package/dist/{getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js → getWaasWalletProviderFromWalletAccount-CJdnAlDf.native.esm.js} +3 -3
  37. package/dist/{getWaasWalletProviderFromWalletAccount-EnCRdI3w.native.esm.js.map → getWaasWalletProviderFromWalletAccount-CJdnAlDf.native.esm.js.map} +1 -1
  38. package/dist/{getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js → getWaasWalletProviderFromWalletAccount-OM-BlEFR.esm.js} +3 -3
  39. package/dist/{getWaasWalletProviderFromWalletAccount-AhhyxkKQ.esm.js.map → getWaasWalletProviderFromWalletAccount-OM-BlEFR.esm.js.map} +1 -1
  40. package/dist/{getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs → getWaasWalletProviderFromWalletAccount-sEzYqoCf.cjs} +3 -3
  41. package/dist/{getWaasWalletProviderFromWalletAccount-5-EJK6a_.cjs.map → getWaasWalletProviderFromWalletAccount-sEzYqoCf.cjs.map} +1 -1
  42. package/dist/{getVerifiedCredentialForWalletAccount-BtIVDer3.cjs → getWalletProviderByKey-1zHjzqbz.cjs} +10 -10
  43. package/dist/getWalletProviderByKey-1zHjzqbz.cjs.map +1 -0
  44. package/dist/{getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js → getWalletProviderByKey-BXGcVzkf.esm.js} +10 -10
  45. package/dist/getWalletProviderByKey-BXGcVzkf.esm.js.map +1 -0
  46. package/dist/{getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js → getWalletProviderByKey-CAQkYCGi.native.esm.js} +11 -10
  47. package/dist/getWalletProviderByKey-CAQkYCGi.native.esm.js.map +1 -0
  48. package/dist/index.cjs +2572 -2204
  49. package/dist/index.cjs.map +1 -1
  50. package/dist/index.esm.js +2538 -2178
  51. package/dist/index.esm.js.map +1 -1
  52. package/dist/index.native.esm.js +2935 -2571
  53. package/dist/index.native.esm.js.map +1 -1
  54. package/dist/{isMfaRequiredForAction-DAfjBLvz.native.esm.js → isMfaRequiredForAction-CPadAr7k.native.esm.js} +2 -2
  55. package/dist/{isMfaRequiredForAction-DAfjBLvz.native.esm.js.map → isMfaRequiredForAction-CPadAr7k.native.esm.js.map} +1 -1
  56. package/dist/{isMfaRequiredForAction-aX0vdwv-.cjs → isMfaRequiredForAction-CxWuGsmB.cjs} +3 -2
  57. package/dist/isMfaRequiredForAction-CxWuGsmB.cjs.map +1 -0
  58. package/dist/{isMfaRequiredForAction-BrmFODJQ.esm.js → isMfaRequiredForAction-DZVNUtPY.esm.js} +3 -2
  59. package/dist/isMfaRequiredForAction-DZVNUtPY.esm.js.map +1 -0
  60. package/dist/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.d.ts +1 -0
  61. package/dist/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.d.ts.map +1 -1
  62. package/dist/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.d.ts +1 -0
  63. package/dist/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.d.ts.map +1 -1
  64. package/dist/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.d.ts +1 -0
  65. package/dist/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.d.ts.map +1 -1
  66. package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts +1 -1
  67. package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts.map +1 -1
  68. package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.types.d.ts +8 -0
  69. package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.types.d.ts.map +1 -1
  70. package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts +7 -1
  71. package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
  72. package/dist/modules/balances/getBalances/getBalances.d.ts +1 -0
  73. package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
  74. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +1 -0
  75. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts.map +1 -1
  76. package/dist/modules/clientEvents/clientEvents.d.ts +2 -0
  77. package/dist/modules/clientEvents/clientEvents.d.ts.map +1 -1
  78. package/dist/modules/flow/attachFlowSource/attachFlowSource.d.ts +45 -0
  79. package/dist/modules/flow/attachFlowSource/attachFlowSource.d.ts.map +1 -0
  80. package/dist/modules/flow/attachFlowSource/index.d.ts +3 -0
  81. package/dist/modules/flow/attachFlowSource/index.d.ts.map +1 -0
  82. package/dist/modules/flow/broadcastFlow/broadcastFlow.d.ts +24 -0
  83. package/dist/modules/flow/broadcastFlow/broadcastFlow.d.ts.map +1 -0
  84. package/dist/modules/flow/broadcastFlow/index.d.ts +3 -0
  85. package/dist/modules/flow/broadcastFlow/index.d.ts.map +1 -0
  86. package/dist/modules/flow/cancelFlow/cancelFlow.d.ts +14 -0
  87. package/dist/modules/flow/cancelFlow/cancelFlow.d.ts.map +1 -0
  88. package/dist/modules/flow/cancelFlow/index.d.ts +3 -0
  89. package/dist/modules/flow/cancelFlow/index.d.ts.map +1 -0
  90. package/dist/modules/flow/events.d.ts +27 -0
  91. package/dist/modules/flow/events.d.ts.map +1 -0
  92. package/dist/modules/flow/flow.types.d.ts +8 -0
  93. package/dist/modules/flow/flow.types.d.ts.map +1 -0
  94. package/dist/modules/flow/getFlow/getFlow.d.ts +15 -0
  95. package/dist/modules/flow/getFlow/getFlow.d.ts.map +1 -0
  96. package/dist/modules/flow/getFlow/index.d.ts +3 -0
  97. package/dist/modules/flow/getFlow/index.d.ts.map +1 -0
  98. package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts +28 -0
  99. package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts.map +1 -0
  100. package/dist/modules/flow/getFlowQuote/index.d.ts +3 -0
  101. package/dist/modules/flow/getFlowQuote/index.d.ts.map +1 -0
  102. package/dist/modules/flow/prepareFlowSigning/index.d.ts +3 -0
  103. package/dist/modules/flow/prepareFlowSigning/index.d.ts.map +1 -0
  104. package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.d.ts +28 -0
  105. package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.d.ts.map +1 -0
  106. package/dist/modules/flow/submitFlowTransaction/index.d.ts +3 -0
  107. package/dist/modules/flow/submitFlowTransaction/index.d.ts.map +1 -0
  108. package/dist/modules/flow/submitFlowTransaction/submitFlowTransaction.d.ts +24 -0
  109. package/dist/modules/flow/submitFlowTransaction/submitFlowTransaction.d.ts.map +1 -0
  110. package/dist/modules/flow/utils/clearFlowSessionToken/clearFlowSessionToken.d.ts +22 -0
  111. package/dist/modules/flow/utils/clearFlowSessionToken/clearFlowSessionToken.d.ts.map +1 -0
  112. package/dist/modules/flow/utils/clearFlowSessionToken/index.d.ts +3 -0
  113. package/dist/modules/flow/utils/clearFlowSessionToken/index.d.ts.map +1 -0
  114. package/dist/modules/flow/utils/createFlowApiClient/createFlowApiClient.d.ts +14 -0
  115. package/dist/modules/flow/utils/createFlowApiClient/createFlowApiClient.d.ts.map +1 -0
  116. package/dist/modules/flow/utils/createFlowApiClient/index.d.ts +2 -0
  117. package/dist/modules/flow/utils/createFlowApiClient/index.d.ts.map +1 -0
  118. package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts +3 -0
  119. package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/createFlowSessionTokenStorageKey.d.ts.map +1 -0
  120. package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/index.d.ts +2 -0
  121. package/dist/modules/flow/utils/createFlowSessionTokenStorageKey/index.d.ts.map +1 -0
  122. package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/index.d.ts +3 -0
  123. package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/index.d.ts.map +1 -0
  124. package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/withFlowSessionTokenCleanupOn401.d.ts +16 -0
  125. package/dist/modules/flow/utils/withFlowSessionTokenCleanupOn401/withFlowSessionTokenCleanupOn401.d.ts.map +1 -0
  126. package/dist/modules/funding/coinbase/addCoinbaseOnrampOrderEventListener/addCoinbaseOnrampOrderEventListener.d.ts +1 -0
  127. package/dist/modules/funding/coinbase/addCoinbaseOnrampOrderEventListener/addCoinbaseOnrampOrderEventListener.d.ts.map +1 -1
  128. package/dist/modules/initializeClient/initializeClient.d.ts +1 -0
  129. package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
  130. package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts +1 -0
  131. package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts.map +1 -1
  132. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +1 -0
  133. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts.map +1 -1
  134. package/dist/modules/user/refreshUser/refreshUser.d.ts +1 -0
  135. package/dist/modules/user/refreshUser/refreshUser.d.ts.map +1 -1
  136. package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts +1 -0
  137. package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts.map +1 -1
  138. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +1 -0
  139. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
  140. package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts +1 -0
  141. package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts.map +1 -1
  142. package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts +1 -0
  143. package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts.map +1 -1
  144. package/dist/{refreshAuth-BMtIp1do.cjs → refreshAuth-CKcNynMk.cjs} +4 -4
  145. package/dist/{refreshAuth-BMtIp1do.cjs.map → refreshAuth-CKcNynMk.cjs.map} +1 -1
  146. package/dist/{refreshAuth-B2kFf0pl.native.esm.js → refreshAuth-Cl3adySI.native.esm.js} +3 -3
  147. package/dist/{refreshAuth-B2kFf0pl.native.esm.js.map → refreshAuth-Cl3adySI.native.esm.js.map} +1 -1
  148. package/dist/{refreshAuth-B8xd2JUm.esm.js → refreshAuth-DlQw3Dky.esm.js} +3 -3
  149. package/dist/{refreshAuth-B8xd2JUm.esm.js.map → refreshAuth-DlQw3Dky.esm.js.map} +1 -1
  150. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  151. package/dist/waas.cjs +9 -9
  152. package/dist/waas.cjs.map +1 -1
  153. package/dist/waas.esm.js +4 -4
  154. package/dist/waas.native.esm.js +4 -4
  155. package/dist/waasCore.cjs +4 -4
  156. package/dist/waasCore.esm.js +4 -4
  157. package/dist/waasCore.native.esm.js +4 -4
  158. package/package.json +3 -3
  159. package/dist/getNetworkProviderFromNetworkId-C46TeXs8.native.esm.js.map +0 -1
  160. package/dist/getVerifiedCredentialForWalletAccount-BFCM2wnx.esm.js.map +0 -1
  161. package/dist/getVerifiedCredentialForWalletAccount-BtIVDer3.cjs.map +0 -1
  162. package/dist/getVerifiedCredentialForWalletAccount-Dsca691m.native.esm.js.map +0 -1
  163. package/dist/isMfaRequiredForAction-BrmFODJQ.esm.js.map +0 -1
  164. package/dist/isMfaRequiredForAction-aX0vdwv-.cjs.map +0 -1
@@ -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-YG7yXCq5.native.esm.js";
1
+ import { J as getDefaultClient, L as instrumentFunction, P as assertDefined, Q as getCore, Z as BaseError, b as createApiClient } from "./InvalidParamError-BUpLSb5x.native.esm.js";
2
2
 
3
3
  //#region src/errors/NativeModuleNotLinkedError.ts
4
4
  var NativeModuleNotLinkedError = class extends BaseError {
@@ -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-DAfjBLvz.native.esm.js.map
108
+ //# sourceMappingURL=isMfaRequiredForAction-CPadAr7k.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-DAfjBLvz.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-CPadAr7k.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"}
@@ -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-C7LLi2cZ.cjs');
28
+ const require_InvalidParamError = require('./InvalidParamError-CMesesy6.cjs');
29
29
  let zod_mini = require("zod/mini");
30
30
  zod_mini = __toESM(zod_mini);
31
31
 
@@ -120,6 +120,7 @@ const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
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
122
  * @not-instrumented
123
+ * @noHook Internal settings fetch that is not part of the public hook surface.
123
124
  */
124
125
  const fetchProjectSettings = async (client = require_InvalidParamError.getDefaultClient()) => {
125
126
  const core = require_InvalidParamError.getCore(client);
@@ -402,4 +403,4 @@ Object.defineProperty(exports, 'retryOnFail', {
402
403
  return retryOnFail;
403
404
  }
404
405
  });
405
- //# sourceMappingURL=isMfaRequiredForAction-aX0vdwv-.cjs.map
406
+ //# sourceMappingURL=isMfaRequiredForAction-CxWuGsmB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMfaRequiredForAction-CxWuGsmB.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/** @not-instrumented */\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 * @not-instrumented\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/** @not-instrumented */\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 * @not-instrumented\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/** @not-instrumented */\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/** @not-instrumented */\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 * @not-instrumented\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 * @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,8BAAb,cAAiDA,oCAAU;CA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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-DIPFT3sS.esm.js";
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-BazEwozw.esm.js";
2
2
  import * as z from "zod/mini";
3
3
 
4
4
  //#region src/utils/retryOnFail/InvalidRetryOnFailCallError.ts
@@ -92,6 +92,7 @@ const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
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
94
  * @not-instrumented
95
+ * @noHook Internal settings fetch that is not part of the public hook surface.
95
96
  */
96
97
  const fetchProjectSettings = async (client = getDefaultClient()) => {
97
98
  const core = getCore(client);
@@ -315,4 +316,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
315
316
 
316
317
  //#endregion
317
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 };
318
- //# sourceMappingURL=isMfaRequiredForAction-BrmFODJQ.esm.js.map
319
+ //# sourceMappingURL=isMfaRequiredForAction-DZVNUtPY.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMfaRequiredForAction-DZVNUtPY.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/** @not-instrumented */\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 * @not-instrumented\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/** @not-instrumented */\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 * @not-instrumented\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/** @not-instrumented */\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/** @not-instrumented */\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 * @not-instrumented\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 * @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,8BAAb,cAAiD,UAAU;CAEzD,YAAY,YAAoB;AAC9B,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mDAAmD;GAClE,CAAC;;;;;;;ACMN,MAAa,cAAc,OAAU,EACnC,QAAQ,GACR,IACA,iBAC0B;AAC1B,MAAK,IAAI,QAAQ,GAAG,SAAS,YAAY,QACvC,KAAI;AACF,SAAO,MAAM,IAAI;UACV,OAAO;AACd,MAAI,SAAS,WACX,OAAM;AAGR,MAAI,QAAQ,EACV,OAAM,IAAI,SAAS,YAAY,WAAW,SAAS,MAAM,CAAC;;;;;;AAShE,OAAM,IAAI,4BAA4B,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;ACrBnD,MAAa,cAAc,SAAS,kBAAkB,KACpD,QAAQ,OAAO,QAAQ,kBAAkB,OAAO,CAAC,SAAS,EAAE;;;;;ACnB9D,MAAa,0BAA6B,WAIf;AACzB,QAAO;;;;;;;;ACHT,MAAa,4CAA4C,uBACvD;CACE,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,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"}
@@ -5,6 +5,7 @@ import type { SocialAccount } from '../social.types';
5
5
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
6
6
  * @returns An array of `SocialAccount` objects associated with the user.
7
7
  * @not-instrumented
8
+ * @hook Exposed as a hook so consumers get the reactive list of social accounts, updated when the user changes.
8
9
  */
9
10
  export declare const getUserSocialAccounts: (client?: import("../../../../exports").DynamicClient) => SocialAccount[];
10
11
  //# sourceMappingURL=getUserSocialAccounts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserSocialAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,iBAAiB,CAAC;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,4DAE/B,aAAa,EAoBf,CAAC"}
1
+ {"version":3,"file":"getUserSocialAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAkB,MAAM,iBAAiB,CAAC;AAErE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,4DAE/B,aAAa,EAoBf,CAAC"}
@@ -9,6 +9,7 @@ type CompleteSocialAuthenticationParams = {
9
9
  * removed in a future major version.
10
10
  *
11
11
  * @instrumented
12
+ * @noHook Deprecated alias; the replacement is exposed via its own hook.
12
13
  */
13
14
  export declare const completeSocialAuthentication: (params: CompleteSocialAuthenticationParams, client?: import("../../../../../exports").DynamicClient) => Promise<User | null>;
14
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"completeSocialAuthentication.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAG7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGxD,KAAK,kCAAkC,GAAG;IACxC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,WAC/B,kCAAkC,8DAEzC,OAAO,CAAC,IAAI,GAAG,IAAI,CAA2C,CAAC"}
1
+ {"version":3,"file":"completeSocialAuthentication.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/completeSocialAuthentication/completeSocialAuthentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAG7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGxD,KAAK,kCAAkC,GAAG;IACxC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,WAC/B,kCAAkC,8DAEzC,OAAO,CAAC,IAAI,GAAG,IAAI,CAA2C,CAAC"}
@@ -6,6 +6,7 @@ type DetectOAuthRedirectParams = {
6
6
  * removed in a future major version.
7
7
  *
8
8
  * @not-instrumented
9
+ * @noHook Deprecated alias; the replacement is exposed via its own hook.
9
10
  */
10
11
  export declare const detectOAuthRedirect: (params: DetectOAuthRedirectParams, client?: import("../../../../../exports").DynamicClient) => Promise<boolean>;
11
12
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"detectOAuthRedirect.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.ts"],"names":[],"mappings":"AAGA,KAAK,yBAAyB,GAAG;IAC/B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,WACtB,yBAAyB,8DAEhC,OAAO,CAAC,OAAO,CAA4C,CAAC"}
1
+ {"version":3,"file":"detectOAuthRedirect.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.ts"],"names":[],"mappings":"AAGA,KAAK,yBAAyB,GAAG;IAC/B,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,WACtB,yBAAyB,8DAEhC,OAAO,CAAC,OAAO,CAA4C,CAAC"}
@@ -12,5 +12,5 @@ export type { SignInWithSocialPopUpParams } from './signInWithSocialPopUp.types'
12
12
  * @throws MethodNotImplementedError Always on web.
13
13
  * @instrumented
14
14
  */
15
- export declare const signInWithSocialPopUp: ({ provider }: SignInWithSocialPopUpParams, client?: import("../../../../../exports").DynamicClient) => Promise<User | null>;
15
+ export declare const signInWithSocialPopUp: ({ provider, requestedScopes }: SignInWithSocialPopUpParams, client?: import("../../../../../exports").DynamicClient) => Promise<User | null>;
16
16
  //# sourceMappingURL=signInWithSocialPopUp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signInWithSocialPopUp.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,iBAElB,2BAA2B,8DAGxC,OAAO,CAAC,IAAI,GAAG,IAAI,CAIrB,CAAC"}
1
+ {"version":3,"file":"signInWithSocialPopUp.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,kCAED,2BAA2B,8DAGzD,OAAO,CAAC,IAAI,GAAG,IAAI,CAIrB,CAAC"}
@@ -1,5 +1,13 @@
1
+ import type { TokenScope } from '@dynamic-labs/sdk-api-core';
1
2
  import type { SocialProvider } from '../../social.types';
2
3
  export type SignInWithSocialPopUpParams = {
3
4
  provider: SocialProvider;
5
+ /**
6
+ * Optional scopes to request an elevated access token when linking a social
7
+ * account to an already-authenticated user. Required when the link is
8
+ * step-up gated (e.g. `checkStepUpAuth({ scope: 'credential:link' })`
9
+ * returns `isRequired: true`). Ignored when signing in a new user.
10
+ */
11
+ requestedScopes?: TokenScope[];
4
12
  };
5
13
  //# sourceMappingURL=signInWithSocialPopUp.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signInWithSocialPopUp.types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"signInWithSocialPopUp.types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;IACzB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;CAChC,CAAC"}
@@ -1,10 +1,16 @@
1
- import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';
1
+ import { type VerifyResponse } from '@dynamic-labs/sdk-api-core';
2
2
  type UnlinkSocialAccountParams = {
3
3
  verifiedCredentialId: string;
4
4
  };
5
5
  /**
6
6
  * Unlinks a social account from the user's account.
7
7
  *
8
+ * When an elevated access token for `credential:unlink` is available, it is
9
+ * sent via the `x-dyn-elevated-access-token` header so the unlink succeeds
10
+ * under step-up gating. The token is attached automatically when present;
11
+ * callers bank it beforehand via the step-up flow (`checkStepUpAuth` + an
12
+ * MFA/passkey authentication that requests the `credential:unlink` scope).
13
+ *
8
14
  * @param params.verifiedCredentialId - The verified credential ID of the social account to unlink.
9
15
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
10
16
  * @returns A promise that resolves to the verify response.
@@ -1 +1 @@
1
- {"version":3,"file":"unlinkSocialAccount.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAQjE,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,6BACJ,yBAAyB,8DAElD,OAAO,CAAC,cAAc,CAuBxB,CAAC"}
1
+ {"version":3,"file":"unlinkSocialAccount.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,4BAA4B,CAAC;AASpC,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,6BACJ,yBAAyB,8DAElD,OAAO,CAAC,cAAc,CAoCxB,CAAC"}
@@ -11,6 +11,7 @@ export type GetBalancesParams = GetTokenBalancesParams;
11
11
  * multi-chain `getMultichainTokenBalances`.
12
12
  *
13
13
  * @not-instrumented
14
+ * @noHook Deprecated; the replacement is exposed via its own hook.
14
15
  */
15
16
  export declare const getBalances: (params: GetTokenBalancesParams, client?: import("../../../exports").DynamicClient) => ReturnType<typeof getTokenBalances>;
16
17
  //# sourceMappingURL=getBalances.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getBalances/getBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AAEvD;;;;;;;GAOG;AAGH,eAAO,MAAM,WAAW,WACd,sBAAsB,wDAE7B,UAAU,CAAC,OAAO,gBAAgB,CAAqC,CAAC"}
1
+ {"version":3,"file":"getBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getBalances/getBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AAEvD;;;;;;;;GAQG;AAGH,eAAO,MAAM,WAAW,WACd,sBAAsB,wDAE7B,UAAU,CAAC,OAAO,gBAAgB,CAAqC,CAAC"}
@@ -14,6 +14,7 @@ export type GetMultichainBalancesParams = GetMultichainTokenBalancesParams;
14
14
  * token balances (not native-only) across multiple chains.
15
15
  *
16
16
  * @not-instrumented
17
+ * @noHook Deprecated; the replacement is exposed via its own hook.
17
18
  */
18
19
  export declare const getMultichainBalances: (params: GetMultichainTokenBalancesParams, client?: import("../../../exports").DynamicClient) => ReturnType<typeof getMultichainTokenBalances>;
19
20
  //# sourceMappingURL=getMultichainBalances.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMultichainBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainBalances/getMultichainBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wCAAwC,EACxC,gCAAgC,EACjC,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAGtG;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAC7C,wCAAwC,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,gCAAgC,CAAC;AAE3E;;;;;;GAMG;AAGH,eAAO,MAAM,qBAAqB,WACxB,gCAAgC,wDAEvC,UAAU,CAAC,OAAO,0BAA0B,CACH,CAAC"}
1
+ {"version":3,"file":"getMultichainBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainBalances/getMultichainBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wCAAwC,EACxC,gCAAgC,EACjC,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAGtG;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAC7C,wCAAwC,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,gCAAgC,CAAC;AAE3E;;;;;;;GAOG;AAGH,eAAO,MAAM,qBAAqB,WACxB,gCAAgC,wDAEvC,UAAU,CAAC,OAAO,0BAA0B,CACH,CAAC"}
@@ -11,6 +11,7 @@ import type { DynamicEvents, EmitEventParams, OffEventParams, OnEventParams, Onc
11
11
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
12
12
  * @returns A function that can be called to remove the listener.
13
13
  * @not-instrumented
14
+ * @hook Event listeners are error-prone to wire up by hand with useEffect.
14
15
  */
15
16
  export declare const onEvent: <E extends keyof DynamicEvents>({ event, listener }: OnEventParams<E>, client?: DynamicClient) => () => void;
16
17
  /**
@@ -36,6 +37,7 @@ export declare const offEvent: <E extends keyof DynamicEvents>({ event, listener
36
37
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
37
38
  * @returns A function that can be called to remove the listener before it fires.
38
39
  * @not-instrumented
40
+ * @hook Event listeners are error-prone to wire up by hand with useEffect.
39
41
  */
40
42
  export declare const onceEvent: <E extends keyof DynamicEvents>({ event, listener }: OnceEventParams<E>, client?: DynamicClient) => () => void;
41
43
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"clientEvents.d.ts","sourceRoot":"","sources":["../../../src/modules/clientEvents/clientEvents.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACd,aAAa,EACb,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;GAW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KtB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { Chain } from '../../chain';
2
+ import type { FlowSourceResponse, FlowSupportedExchangeProvider } from '../flow.types';
3
+ type AttachFlowSourceWalletParams = {
4
+ flowId: string;
5
+ /** The address of the user's wallet. */
6
+ fromAddress: string;
7
+ /** The network id for the token that the user is paying with. */
8
+ fromChainId?: string;
9
+ /** The chain name of the user's wallet. */
10
+ fromChainName: Chain;
11
+ sourceType: 'wallet';
12
+ };
13
+ type AttachFlowSourceExchangeParams = {
14
+ /**
15
+ * The exchange provider key (e.g. `'coinbase'`).
16
+ * The backend uses this to look up the exchange configuration,
17
+ * generate a buy URL, and create the exchange source record.
18
+ */
19
+ exchangeProvider: FlowSupportedExchangeProvider;
20
+ flowId: string;
21
+ sourceType: 'exchange';
22
+ };
23
+ /**
24
+ * Parameters for {@link attachFlowSource}.
25
+ *
26
+ * This is a discriminated union on `sourceType`:
27
+ * - `'wallet'` (default) — requires `fromAddress`, `fromChainId`, `fromChainName`
28
+ * - `'exchange'` — requires `exchangeProvider`
29
+ */
30
+ export type AttachFlowSourceParams = AttachFlowSourceWalletParams | AttachFlowSourceExchangeParams;
31
+ /**
32
+ * Attaches a payment source to a flow.
33
+ *
34
+ * For exchange sources, the backend generates the buy URL and creates the
35
+ * exchange source record. The response includes `exchangeSource.metadata.url`
36
+ * which can be embedded in an iframe for the user to complete payment.
37
+ *
38
+ * @param params AttachFlowSourceParams - The source details to attach.
39
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
40
+ * @returns The updated flow and session token
41
+ * @instrumented
42
+ */
43
+ export declare const attachFlowSource: (params: AttachFlowSourceParams, client?: import("../../../exports").DynamicClient) => Promise<FlowSourceResponse>;
44
+ export {};
45
+ //# sourceMappingURL=attachFlowSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachFlowSource.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/attachFlowSource/attachFlowSource.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EACV,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AAIvB,KAAK,4BAA4B,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,aAAa,EAAE,KAAK,CAAC;IACrB,UAAU,EAAE,QAAQ,CAAC;CACtB,CAAC;AAEF,KAAK,8BAA8B,GAAG;IACpC;;;;OAIG;IACH,gBAAgB,EAAE,6BAA6B,CAAC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAC9B,4BAA4B,GAC5B,8BAA8B,CAAC;AAEnC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,WACnB,sBAAsB,wDAE7B,OAAO,CAAC,kBAAkB,CAqD5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { attachFlowSource } from './attachFlowSource';
2
+ export type { AttachFlowSourceParams } from './attachFlowSource';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/attachFlowSource/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { DynamicClient } from '../../../client/types';
2
+ import type { Flow } from '../flow.types';
3
+ export type BroadcastFlowParams = {
4
+ flowId: string;
5
+ /**
6
+ * The on-chain transaction hash. Required for wallet sources, optional
7
+ * for exchange sources (the user may not have it).
8
+ */
9
+ txHash?: string;
10
+ };
11
+ /**
12
+ * Records that a flow transaction has been broadcasted.
13
+ *
14
+ * For wallet sources, pass the `txHash` from the on-chain transaction.
15
+ * For exchange sources, `txHash` can be omitted — the user confirms
16
+ * they completed the payment and the flow moves to `broadcasted`.
17
+ *
18
+ * @param params BroadcastFlowParams - The flow ID and optional tx hash.
19
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
20
+ * @returns The updated flow
21
+ * @instrumented
22
+ */
23
+ export declare const broadcastFlow: ({ flowId, txHash }: BroadcastFlowParams, client?: DynamicClient) => Promise<Flow>;
24
+ //# sourceMappingURL=broadcastFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broadcastFlow.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/broadcastFlow/broadcastFlow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,uBACJ,mBAAmB,WAC/B,aAAa,KACpB,OAAO,CAAC,IAAI,CAmBd,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { broadcastFlow } from './broadcastFlow';
2
+ export type { BroadcastFlowParams } from './broadcastFlow';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/broadcastFlow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Flow } from '../flow.types';
2
+ export type CancelFlowParams = {
3
+ flowId: string;
4
+ };
5
+ /**
6
+ * Cancels a flow before it has been broadcasted
7
+ *
8
+ * @param params CancelFlowParams - The flow to cancel.
9
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
10
+ * @returns The cancelled flow
11
+ * @instrumented
12
+ */
13
+ export declare const cancelFlow: ({ flowId }: CancelFlowParams, client?: import("../../../exports").DynamicClient) => Promise<Flow>;
14
+ //# sourceMappingURL=cancelFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancelFlow.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/cancelFlow/cancelFlow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAK1C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,eACT,gBAAgB,wDAE3B,OAAO,CAAC,IAAI,CAsBd,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { cancelFlow } from './cancelFlow';
2
+ export type { CancelFlowParams } from './cancelFlow';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/cancelFlow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { FlowExecutionState, FlowSettlementState } from './flow.types';
2
+ type FlowSettlementStateChangedEvent = {
3
+ newState: FlowSettlementState;
4
+ previousState: FlowSettlementState;
5
+ timestamp: string;
6
+ transactionId: string;
7
+ };
8
+ type FlowExecutionStateChangedEvent = {
9
+ newState: FlowExecutionState;
10
+ previousState: FlowExecutionState;
11
+ timestamp: string;
12
+ transactionId: string;
13
+ };
14
+ declare global {
15
+ interface DynamicEvents {
16
+ /**
17
+ * Raised when a flow's execution state changes.
18
+ */
19
+ flowExecutionStateChanged: (args: FlowExecutionStateChangedEvent) => void;
20
+ /**
21
+ * Raised when a flow's settlement state changes.
22
+ */
23
+ flowSettlementStateChanged: (args: FlowSettlementStateChangedEvent) => void;
24
+ }
25
+ }
26
+ export type { FlowExecutionStateChangedEvent, FlowSettlementStateChangedEvent };
27
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/modules/flow/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE5E,KAAK,+BAA+B,GAAG;IACrC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,aAAa,EAAE,mBAAmB,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,8BAA8B,GAAG;IACpC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,aAAa,EAAE,kBAAkB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,aAAa;QACrB;;WAEG;QACH,yBAAyB,EAAE,CAAC,IAAI,EAAE,8BAA8B,KAAK,IAAI,CAAC;QAC1E;;WAEG;QACH,0BAA0B,EAAE,CAAC,IAAI,EAAE,+BAA+B,KAAK,IAAI,CAAC;KAC7E;CACF;AAED,YAAY,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { FlowExecutionStateEnum, FlowRiskStateEnum, FlowSettlementStateEnum, FlowSourceTypeEnum } from '@dynamic-labs/sdk-api-core';
2
+ export type { Flow, FlowFailure, FlowFeeBreakdown, FlowQuote, FlowSettlementData, FlowSourceResponse, } from '@dynamic-labs/sdk-api-core';
3
+ export type FlowExecutionState = `${FlowExecutionStateEnum}`;
4
+ export type FlowSettlementState = `${FlowSettlementStateEnum}`;
5
+ export type FlowRiskState = `${FlowRiskStateEnum}`;
6
+ export type FlowSourceType = `${FlowSourceTypeEnum}`;
7
+ export type FlowSupportedExchangeProvider = 'coinbase';
8
+ //# sourceMappingURL=flow.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow.types.d.ts","sourceRoot":"","sources":["../../../src/modules/flow/flow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAGpC,YAAY,EACV,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,MAAM,kBAAkB,GAAG,GAAG,sBAAsB,EAAE,CAAC;AAC7D,MAAM,MAAM,mBAAmB,GAAG,GAAG,uBAAuB,EAAE,CAAC;AAC/D,MAAM,MAAM,aAAa,GAAG,GAAG,iBAAiB,EAAE,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAErD,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { DynamicClient } from '../../../client/types';
2
+ import type { Flow } from '../flow.types';
3
+ export type GetFlowParams = {
4
+ flowId: string;
5
+ };
6
+ /**
7
+ * Fetches a flow by its ID
8
+ *
9
+ * @param params GetFlowParams - The parameters for fetching the flow.
10
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
11
+ * @returns The flow
12
+ * @not-instrumented
13
+ */
14
+ export declare const getFlow: ({ flowId }: GetFlowParams, client?: DynamicClient) => Promise<Flow>;
15
+ //# sourceMappingURL=getFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFlow.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/getFlow/getFlow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,eACN,aAAa,WACjB,aAAa,KACpB,OAAO,CAAC,IAAI,CAQd,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getFlow } from './getFlow';
2
+ export type { GetFlowParams } from './getFlow';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/getFlow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { Flow } from '../flow.types';
2
+ export type GetFlowQuoteParams = {
3
+ flowId: string;
4
+ /**
5
+ * Optional chain identifier the source funds will originate from for this
6
+ * quote. When provided, this overrides the fromChainId recorded at
7
+ * attachFlowSource time. The chain family (fromChainName) and source address
8
+ * (fromAddress) are locked at attachFlowSource time — to switch chain families
9
+ * or wallets, call attachFlowSource again.
10
+ */
11
+ fromChainId?: string;
12
+ /**
13
+ * When omitted, defaults to native token for the chain specified in
14
+ * fromChainName in the attach source step.
15
+ */
16
+ fromTokenAddress?: string;
17
+ slippage?: number;
18
+ };
19
+ /**
20
+ * Fetches a quote for a flow
21
+ *
22
+ * @param params GetFlowQuoteParams - The quote parameters.
23
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
24
+ * @returns The updated flow with quote data
25
+ * @not-instrumented
26
+ */
27
+ export declare const getFlowQuote: ({ flowId, fromChainId, fromTokenAddress, slippage }: GetFlowQuoteParams, client?: import("../../../exports").DynamicClient) => Promise<Flow>;
28
+ //# sourceMappingURL=getFlowQuote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFlowQuote.d.ts","sourceRoot":"","sources":["../../../../src/modules/flow/getFlowQuote/getFlowQuote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,wDAC8B,kBAAkB,wDAEtE,OAAO,CAAC,IAAI,CAuBd,CAAC"}