@dynamic-labs-sdk/client 1.2.1 → 1.3.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 (139) hide show
  1. package/dist/{InvalidParamError-BYnLW_9s.native.esm.js → InvalidParamError-9kQBK3sP.native.esm.js} +2 -2
  2. package/dist/{InvalidParamError-BYnLW_9s.native.esm.js.map → InvalidParamError-9kQBK3sP.native.esm.js.map} +1 -1
  3. package/dist/{InvalidParamError-CEykJlaG.cjs → InvalidParamError-DQvZQdQ9.cjs} +3 -3
  4. package/dist/{InvalidParamError-CEykJlaG.cjs.map → InvalidParamError-DQvZQdQ9.cjs.map} +1 -1
  5. package/dist/{InvalidParamError-uluG140m.esm.js → InvalidParamError-Za4cvW7K.esm.js} +2 -2
  6. package/dist/{InvalidParamError-uluG140m.esm.js.map → InvalidParamError-Za4cvW7K.esm.js.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-33QOxTKa.native.esm.js → NotWaasWalletAccountError-BTMvHTA8.native.esm.js} +3 -3
  8. package/dist/{NotWaasWalletAccountError-33QOxTKa.native.esm.js.map → NotWaasWalletAccountError-BTMvHTA8.native.esm.js.map} +1 -1
  9. package/dist/{NotWaasWalletAccountError-DmlwWvy0.esm.js → NotWaasWalletAccountError-By3Y4taq.esm.js} +3 -3
  10. package/dist/{NotWaasWalletAccountError-DmlwWvy0.esm.js.map → NotWaasWalletAccountError-By3Y4taq.esm.js.map} +1 -1
  11. package/dist/{NotWaasWalletAccountError-BNdbbGX7.cjs → NotWaasWalletAccountError-Ciq7b-Y6.cjs} +3 -3
  12. package/dist/{NotWaasWalletAccountError-BNdbbGX7.cjs.map → NotWaasWalletAccountError-Ciq7b-Y6.cjs.map} +1 -1
  13. package/dist/core.cjs +5 -5
  14. package/dist/core.esm.js +5 -5
  15. package/dist/core.native.esm.js +5 -5
  16. package/dist/exports/index.d.ts +3 -0
  17. package/dist/exports/index.d.ts.map +1 -1
  18. package/dist/{getNetworkProviderFromNetworkId-BOCwNNMm.cjs → getNetworkProviderFromNetworkId-BA0CHZzu.cjs} +3 -3
  19. package/dist/{getNetworkProviderFromNetworkId-BOCwNNMm.cjs.map → getNetworkProviderFromNetworkId-BA0CHZzu.cjs.map} +1 -1
  20. package/dist/{getNetworkProviderFromNetworkId-a0atbFHU.native.esm.js → getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js} +3 -3
  21. package/dist/{getNetworkProviderFromNetworkId-a0atbFHU.native.esm.js.map → getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js.map} +1 -1
  22. package/dist/{getNetworkProviderFromNetworkId-CS1GXEp6.esm.js → getNetworkProviderFromNetworkId-RWcIZDgC.esm.js} +3 -3
  23. package/dist/{getNetworkProviderFromNetworkId-CS1GXEp6.esm.js.map → getNetworkProviderFromNetworkId-RWcIZDgC.esm.js.map} +1 -1
  24. package/dist/{getSignedSessionId-B42gT4xk.cjs → getSignedSessionId-BCU987hO.cjs} +3 -3
  25. package/dist/{getSignedSessionId-B42gT4xk.cjs.map → getSignedSessionId-BCU987hO.cjs.map} +1 -1
  26. package/dist/{getSignedSessionId-zHtJOVpY.native.esm.js → getSignedSessionId-DzNCj6g_.native.esm.js} +3 -3
  27. package/dist/{getSignedSessionId-zHtJOVpY.native.esm.js.map → getSignedSessionId-DzNCj6g_.native.esm.js.map} +1 -1
  28. package/dist/{getSignedSessionId-D1Oh4604.esm.js → getSignedSessionId-la6RXITX.esm.js} +3 -3
  29. package/dist/{getSignedSessionId-D1Oh4604.esm.js.map → getSignedSessionId-la6RXITX.esm.js.map} +1 -1
  30. package/dist/{getVerifiedCredentialForWalletAccount-CEvtJ3xW.native.esm.js → getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js} +3 -2
  31. package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js.map +1 -0
  32. package/dist/{getVerifiedCredentialForWalletAccount-B-IhZJuM.cjs → getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs} +4 -3
  33. package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs.map +1 -0
  34. package/dist/{getVerifiedCredentialForWalletAccount-BkaECPL_.esm.js → getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js} +3 -2
  35. package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js.map +1 -0
  36. package/dist/index.cjs +854 -19
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.esm.js +854 -20
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/index.native.esm.js +854 -20
  41. package/dist/index.native.esm.js.map +1 -1
  42. package/dist/{isMfaRequiredForAction-G7SXCZ5L.esm.js → isMfaRequiredForAction-C1u4Z__n.esm.js} +2 -2
  43. package/dist/{isMfaRequiredForAction-G7SXCZ5L.esm.js.map → isMfaRequiredForAction-C1u4Z__n.esm.js.map} +1 -1
  44. package/dist/{isMfaRequiredForAction-CJvFP4oN.cjs → isMfaRequiredForAction-CMClgbT0.cjs} +2 -2
  45. package/dist/{isMfaRequiredForAction-CJvFP4oN.cjs.map → isMfaRequiredForAction-CMClgbT0.cjs.map} +1 -1
  46. package/dist/{isMfaRequiredForAction-BfabCDxI.native.esm.js → isMfaRequiredForAction-DSX-TV2z.native.esm.js} +2 -2
  47. package/dist/{isMfaRequiredForAction-BfabCDxI.native.esm.js.map → isMfaRequiredForAction-DSX-TV2z.native.esm.js.map} +1 -1
  48. package/dist/modules/balances/getBalances/getBalances.d.ts +22 -10
  49. package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
  50. package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +6 -2
  51. package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
  52. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/index.d.ts +2 -0
  53. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/{shouldFilterWallet → shouldFilterWalletForWalletConnect}/index.d.ts.map +1 -1
  54. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts +13 -0
  55. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts.map +1 -0
  56. package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts +10 -0
  57. package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts.map +1 -0
  58. package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts +3 -0
  59. package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts.map +1 -0
  60. package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts +34 -0
  61. package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts.map +1 -0
  62. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts +22 -0
  63. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts.map +1 -0
  64. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts +18 -0
  65. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts.map +1 -0
  66. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts +2 -0
  67. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts.map +1 -0
  68. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts +2 -0
  69. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts.map +1 -0
  70. package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts +21 -0
  71. package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts.map +1 -0
  72. package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts +27 -0
  73. package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts.map +1 -0
  74. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +23 -0
  75. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -0
  76. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +39 -0
  77. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -0
  78. package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts +54 -0
  79. package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts.map +1 -0
  80. package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts +31 -0
  81. package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts.map +1 -0
  82. package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts +18 -0
  83. package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts.map +1 -0
  84. package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts +15 -0
  85. package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts.map +1 -0
  86. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts +21 -0
  87. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts.map +1 -0
  88. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts +44 -0
  89. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts.map +1 -0
  90. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts +20 -0
  91. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts.map +1 -0
  92. package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts +15 -0
  93. package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts.map +1 -0
  94. package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts +16 -0
  95. package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts.map +1 -0
  96. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +24 -0
  97. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -0
  98. package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts +49 -0
  99. package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts.map +1 -0
  100. package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts +18 -0
  101. package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts.map +1 -0
  102. package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +18 -0
  103. package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map +1 -0
  104. package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts +23 -0
  105. package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts.map +1 -0
  106. package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +22 -0
  107. package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts.map +1 -0
  108. package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +20 -0
  109. package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts.map +1 -0
  110. package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +34 -0
  111. package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts.map +1 -0
  112. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +164 -0
  113. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -0
  114. package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts +20 -0
  115. package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts.map +1 -0
  116. package/dist/modules/wallets/walletProviderRegistry/createWalletProviderRegistry/createWalletProviderRegistry.d.ts.map +1 -1
  117. package/dist/modules/wallets/walletProviderRegistry/index.d.ts +1 -1
  118. package/dist/modules/wallets/walletProviderRegistry/index.d.ts.map +1 -1
  119. package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts +19 -0
  120. package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts.map +1 -1
  121. package/dist/modules/wallets/walletProviderUriConnection.types.d.ts +23 -0
  122. package/dist/modules/wallets/walletProviderUriConnection.types.d.ts.map +1 -0
  123. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  124. package/dist/waas.cjs +6 -5
  125. package/dist/waas.cjs.map +1 -1
  126. package/dist/waas.esm.js +5 -4
  127. package/dist/waas.esm.js.map +1 -1
  128. package/dist/waas.native.esm.js +5 -4
  129. package/dist/waas.native.esm.js.map +1 -1
  130. package/dist/waasCore.cjs +4 -4
  131. package/dist/waasCore.esm.js +3 -3
  132. package/dist/waasCore.native.esm.js +3 -3
  133. package/package.json +3 -3
  134. package/dist/getVerifiedCredentialForWalletAccount-B-IhZJuM.cjs.map +0 -1
  135. package/dist/getVerifiedCredentialForWalletAccount-BkaECPL_.esm.js.map +0 -1
  136. package/dist/getVerifiedCredentialForWalletAccount-CEvtJ3xW.native.esm.js.map +0 -1
  137. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/index.d.ts +0 -2
  138. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts +0 -21
  139. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-uluG140m.esm.js";
1
+ import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-Za4cvW7K.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -74,4 +74,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
74
74
 
75
75
  //#endregion
76
76
  export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
77
- //# sourceMappingURL=isMfaRequiredForAction-G7SXCZ5L.esm.js.map
77
+ //# sourceMappingURL=isMfaRequiredForAction-C1u4Z__n.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-G7SXCZ5L.esm.js","names":[],"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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,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-C1u4Z__n.esm.js","names":[],"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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,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,4 +1,4 @@
1
- const require_InvalidParamError = require('./InvalidParamError-CEykJlaG.cjs');
1
+ const require_InvalidParamError = require('./InvalidParamError-DQvZQdQ9.cjs');
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -91,4 +91,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
91
91
  return isMfaRequiredForAction;
92
92
  }
93
93
  });
94
- //# sourceMappingURL=isMfaRequiredForAction-CJvFP4oN.cjs.map
94
+ //# sourceMappingURL=isMfaRequiredForAction-CMClgbT0.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-CJvFP4oN.cjs","names":["getDefaultClient","getCore","createApiClient","getDefaultClient"],"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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAASA,4CAAkB,KAAK;CAClE,MAAM,OAAOC,kCAAQ,OAAO;AAQ5B,QALuB,MAFLC,0CAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,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,MAAM,cAAc,OAAO,EAG5B"}
1
+ {"version":3,"file":"isMfaRequiredForAction-CMClgbT0.cjs","names":["getDefaultClient","getCore","createApiClient","getDefaultClient"],"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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,MAAa,gBAAgB,OAAO,SAASA,4CAAkB,KAAK;CAClE,MAAM,OAAOC,kCAAQ,OAAO;AAQ5B,QALuB,MAFLC,0CAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,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,MAAM,cAAc,OAAO,EAG5B"}
@@ -1,4 +1,4 @@
1
- import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-BYnLW_9s.native.esm.js";
1
+ import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-9kQBK3sP.native.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -74,4 +74,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
74
74
 
75
75
  //#endregion
76
76
  export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
77
- //# sourceMappingURL=isMfaRequiredForAction-BfabCDxI.native.esm.js.map
77
+ //# sourceMappingURL=isMfaRequiredForAction-DSX-TV2z.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-BfabCDxI.native.esm.js","names":[],"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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,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-DSX-TV2z.native.esm.js","names":[],"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 * @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":";;;;;;;;;;;;;;AAkBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbD,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,11 +1,11 @@
1
1
  import type { TokenBalance } from '@dynamic-labs/sdk-api-core';
2
2
  import type { WalletAccount } from '../../wallets/walletAccount';
3
- export type GetBalancesParams = {
3
+ type GetBalancesBaseParams = {
4
4
  /**
5
5
  * Whether to filter out spam tokens.
6
6
  * Defaults to true.
7
- * @not-instrumented
8
- */
7
+ * @not-instrumented
8
+ */
9
9
  filterSpamTokens?: boolean;
10
10
  /** Whether to force a refresh of the balances instead of using the api cached value. */
11
11
  forceRefresh?: boolean;
@@ -13,16 +13,27 @@ export type GetBalancesParams = {
13
13
  includeNative?: boolean;
14
14
  /** Whether to include the prices of the tokens. */
15
15
  includePrices?: boolean;
16
- /**
17
- * The network ID to get the balances for.
18
- * If not provided, the active network ID will be used.
19
- */
20
- networkId?: number;
21
16
  /** The wallet account to get the balances for. */
22
17
  walletAccount: WalletAccount;
23
18
  /** If provided, only return balances for the specified contracts. */
24
19
  whitelistedContracts?: Array<string>;
25
20
  };
21
+ export type GetBalancesParams = GetBalancesBaseParams & ({
22
+ /**
23
+ * The network ID to get the balances for.
24
+ * If neither `networkId` nor `networkIds` is provided, the active network ID will be used.
25
+ * Mutually exclusive with `networkIds`.
26
+ */
27
+ networkId?: number;
28
+ networkIds?: never;
29
+ } | {
30
+ networkId?: never;
31
+ /**
32
+ * The network IDs to get the balances for.
33
+ * Mutually exclusive with `networkId`.
34
+ */
35
+ networkIds?: string[];
36
+ });
26
37
  /**
27
38
  * Retrieves the token balances for a wallet account.
28
39
  *
@@ -31,7 +42,8 @@ export type GetBalancesParams = {
31
42
  * @param params.walletAccount - The wallet account to get the balances for.
32
43
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
33
44
  * @returns A promise that resolves to an array of token balances.
34
- * @not-instrumented
45
+ * @not-instrumented
35
46
  */
36
- export declare const getBalances: ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh, }: GetBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<TokenBalance[]>;
47
+ export declare const getBalances: ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh, }: GetBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<TokenBalance[]>;
48
+ export {};
37
49
  //# 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,EAAa,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;KAIC;IACD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wFAAwF;IACxF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,sHASnB,iBAAiB,wDAEnB,OAAO,CAAC,YAAY,EAAE,CA6BxB,CAAC"}
1
+ {"version":3,"file":"getBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getBalances/getBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,KAAK,qBAAqB,GAAG;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wFAAwF;IACxF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GACnD,CACI;IACE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CACJ,CAAC;AAEJ;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,kIAUnB,iBAAiB,wDAEnB,OAAO,CAAC,YAAY,EAAE,CA8BxB,CAAC"}
@@ -8,7 +8,11 @@ export type GetCheckoutTransactionQuoteParams = {
8
8
  * or wallets, call attachSource again.
9
9
  */
10
10
  fromChainId?: string;
11
- fromTokenAddress: string;
11
+ /**
12
+ * When omitted, defaults to native token for the chain specified in
13
+ * fromChainName in the attach source step.
14
+ */
15
+ fromTokenAddress?: string;
12
16
  slippage?: number;
13
17
  transactionId: string;
14
18
  };
@@ -18,7 +22,7 @@ export type GetCheckoutTransactionQuoteParams = {
18
22
  * @param params GetCheckoutTransactionQuoteParams - The quote parameters.
19
23
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
20
24
  * @returns The updated checkout transaction with quote data
21
- * @not-instrumented
25
+ * @not-instrumented
22
26
  */
23
27
  export declare const getCheckoutTransactionQuote: ({ fromChainId, fromTokenAddress, slippage, transactionId, }: GetCheckoutTransactionQuoteParams, client?: import("../../../exports").DynamicClient) => Promise<CheckoutTransaction>;
24
28
  //# sourceMappingURL=getCheckoutTransactionQuote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCheckoutTransactionQuote.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gEAMnC,iCAAiC,wDAEnC,OAAO,CAAC,mBAAmB,CAc7B,CAAC"}
1
+ {"version":3,"file":"getCheckoutTransactionQuote.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gEAMnC,iCAAiC,wDAEnC,OAAO,CAAC,mBAAmB,CAc7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { shouldFilterWalletForWalletConnect } from './shouldFilterWalletForWalletConnect';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ShouldFilterWalletParams } from '../../shouldFilterWallet/shouldFilterWallet';
2
+ /**
3
+ * WalletConnect-specific filter. Applies the generic
4
+ * {@link shouldFilterWallet} eligibility rules and additionally drops
5
+ * wallets that do not advertise WalletConnect `sign_v2` support — the
6
+ * protocol version Dynamic pairs against.
7
+ *
8
+ * @returns True if the wallet should be excluded from the WalletConnect
9
+ * catalog, false otherwise.
10
+ * @not-instrumented
11
+ */
12
+ export declare const shouldFilterWalletForWalletConnect: ({ wallet, walletKey, }: ShouldFilterWalletParams) => boolean;
13
+ //# sourceMappingURL=shouldFilterWalletForWalletConnect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shouldFilterWalletForWalletConnect.d.ts","sourceRoot":"","sources":["../../../../../src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,2BAG5C,wBAAwB,KAAG,OAM7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Hand-curated list of wallet book group keys that should surface at the top
3
+ * of catalogue listings. Lower index = higher priority. Anything not in this
4
+ * list falls through to the secondary sort (alphabetical by name).
5
+ *
6
+ * Used by `sortWalletOptions` (relevance mode) and by the react-demo's
7
+ * WalletConnect picker. Keep both in sync when adding entries.
8
+ */
9
+ export declare const PRIORITY_WALLET_KEYS: readonly string[];
10
+ //# sourceMappingURL=priorityWalletKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"priorityWalletKeys.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAmBjD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { shouldFilterWallet } from './shouldFilterWallet';
2
+ export type { ShouldFilterWalletParams } from './shouldFilterWallet';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/shouldFilterWallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { WalletSchema } from '../legacyWalletBook.types';
2
+ /**
3
+ * Embedded wallet keys that should be filtered out from any external-wallet
4
+ * catalogue. These wallets are not products the user "connects" to from the
5
+ * wallet selection list — they are embedded sign-in methods that live behind
6
+ * different SDK entry points.
7
+ * @not-instrumented
8
+ */
9
+ export declare const EMBEDDED_WALLET_KEYS: string[];
10
+ export type ShouldFilterWalletParams = {
11
+ /** The wallet schema to check. */
12
+ wallet: WalletSchema;
13
+ /** The wallet key identifier. */
14
+ walletKey: string;
15
+ };
16
+ /**
17
+ * Generic "is this wallet eligible for an external-wallet catalogue" check.
18
+ * Filters out:
19
+ *
20
+ * 1. Embedded sign-in methods (see {@link EMBEDDED_WALLET_KEYS}).
21
+ * 2. Wallets that only ship a browser-extension injection (`injectedConfig`)
22
+ * with no mobile or desktop links — these have no surface a customer
23
+ * catalogue UI can drive to.
24
+ *
25
+ * Channel-specific eligibility (WalletConnect support, in-app browser URL,
26
+ * installation links, …) is the caller's responsibility — wrap this helper
27
+ * with an additional check, e.g.
28
+ * {@link shouldFilterWalletForWalletConnect}.
29
+ *
30
+ * @returns True if the wallet should be filtered out, false otherwise.
31
+ * @not-instrumented
32
+ */
33
+ export declare const shouldFilterWallet: ({ wallet, walletKey, }: ShouldFilterWalletParams) => boolean;
34
+ //# sourceMappingURL=shouldFilterWallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shouldFilterWallet.d.ts","sourceRoot":"","sources":["../../../../src/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,UAWhC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,kCAAkC;IAClC,MAAM,EAAE,YAAY,CAAC;IAErB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,2BAG5B,wBAAwB,KAAG,OAuB7B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
2
+ import type { ConnectionOptionForWalletOption } from '../groupOptionsByWalletOption/groupOptionsByWalletOption';
3
+ type BuildInAppBrowserOptionsParams = {
4
+ walletBook: WalletBookSchema;
5
+ };
6
+ /**
7
+ * Builds the `inAppBrowser` catalogue options from the wallet book. A wallet
8
+ * qualifies when it exposes a mobile in-app-browser URL — typically a
9
+ * `cb_url={{encodedDappURI}}`-style template the customer fills in with the
10
+ * current page URL before opening.
11
+ *
12
+ * Reuses the generic `shouldFilterWallet` rules — embedded sign-in methods
13
+ * and injected-only wallets are dropped — so the catalogue's notion of
14
+ * "external wallet" stays consistent across option types.
15
+ *
16
+ * @param params.walletBook - The fetched wallet book.
17
+ * @returns Tagged `inAppBrowser` options paired with their wallet option keys.
18
+ * @not-instrumented
19
+ */
20
+ export declare const buildInAppBrowserOptions: ({ walletBook, }: BuildInAppBrowserOptionsParams) => ConnectionOptionForWalletOption[];
21
+ export {};
22
+ //# sourceMappingURL=buildInAppBrowserOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildInAppBrowserOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAIhH,KAAK,8BAA8B,GAAG;IACpC,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,oBAElC,8BAA8B,KAAG,+BAA+B,EAyBlE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { WalletBookSchema } from '../../../legacyWalletBook/legacyWalletBook.types';
2
+ type GetInAppBrowserUrlParams = {
3
+ wallet: WalletBookSchema['wallets'][string];
4
+ };
5
+ /**
6
+ * Returns the wallet's in-app browser URL template, preferring the v2
7
+ * field. `inAppBrowser` is deprecated but some wallet book entries
8
+ * still carry only the v1 value, so it acts as a fallback. Trailing
9
+ * `?? undefined` collapses the schema's `string | null` typing down to
10
+ * the `string | undefined` return contract.
11
+ *
12
+ * @param params.wallet - The wallet book wallet entry.
13
+ * @returns The in-app browser URL, or `undefined` if neither field is set.
14
+ * @not-instrumented
15
+ */
16
+ export declare const getInAppBrowserUrl: ({ wallet, }: GetInAppBrowserUrlParams) => string | undefined;
17
+ export {};
18
+ //# sourceMappingURL=getInAppBrowserUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInAppBrowserUrl.d.ts","sourceRoot":"","sources":["../../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,gBAE5B,wBAAwB,KAAG,MAAM,GAAG,SACoC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getInAppBrowserUrl } from './getInAppBrowserUrl';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { buildInAppBrowserOptions } from './buildInAppBrowserOptions';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { WalletSchema } from '../../legacyWalletBook/legacyWalletBook.types';
2
+ import type { InstallationUrls } from '../walletOptionsCatalogue.types';
3
+ type BuildInstallationUrlsParams = {
4
+ wallet: WalletSchema;
5
+ };
6
+ /**
7
+ * Builds the install/download URL bag for a wallet book entry. Returns the
8
+ * concrete URLs assembled from each store's ID field — Play Store, App
9
+ * Store, Chrome Web Store, Firefox Add-ons, Edge Add-ons — plus the wallet's
10
+ * own `desktop.universal` / `desktop.native` URLs when set.
11
+ *
12
+ * Fields the wallet book does not carry are left undefined; callers should
13
+ * skip emitting an installation option for a wallet whose URL bag is empty.
14
+ *
15
+ * @param params.wallet - The wallet book entry.
16
+ * @returns The URL bag, omitting fields the wallet does not provide.
17
+ * @not-instrumented
18
+ */
19
+ export declare const buildInstallationUrls: ({ wallet, }: BuildInstallationUrlsParams) => InstallationUrls;
20
+ export {};
21
+ //# sourceMappingURL=buildInstallationUrls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildInstallationUrls.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAYxE,KAAK,2BAA2B,GAAG;IACjC,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,gBAE/B,2BAA2B,KAAG,gBAoBhC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
2
+ import type { InstallationUrls } from '../walletOptionsCatalogue.types';
3
+ type BuildInstallationUrlsByWalletOptionKeyParams = {
4
+ walletBook: WalletBookSchema;
5
+ };
6
+ /**
7
+ * Collects install / download URLs for every wallet book entry that has
8
+ * at least one installable surface, keyed by the wallet option key the
9
+ * wallet groups under. The catalogue assembly step merges this map into
10
+ * the per-key wallet option shell so `WalletOption.installationUrls` is
11
+ * populated alongside (or instead of) `connectionOptions`.
12
+ *
13
+ * First-seen URLs win when multiple wallet book entries resolve to the
14
+ * same wallet option key — wallet book authors put the most accurate
15
+ * install links on the canonical entry, so the first-seen one is the
16
+ * right pick.
17
+ *
18
+ * Reuses the generic `shouldFilterWallet` rules so embedded wallets do
19
+ * not appear here either — they're not user-installable products.
20
+ *
21
+ * @param params.walletBook - The fetched wallet book.
22
+ * @returns A map from wallet option key to its install URL bag.
23
+ * @not-instrumented
24
+ */
25
+ export declare const buildInstallationUrlsByWalletOptionKey: ({ walletBook, }: BuildInstallationUrlsByWalletOptionKeyParams) => Map<string, InstallationUrls>;
26
+ export {};
27
+ //# sourceMappingURL=buildInstallationUrlsByWalletOptionKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildInstallationUrlsByWalletOptionKey.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAItF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAcxE,KAAK,4CAA4C,GAAG;IAClD,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sCAAsC,oBAEhD,4CAA4C,KAAG,GAAG,CACnD,MAAM,EACN,gBAAgB,CA0BjB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
2
+ import type { ConnectionOptionForWalletOption } from '../groupOptionsByWalletOption/groupOptionsByWalletOption';
3
+ type BuildWalletConnectOptionsParams = {
4
+ walletBook: WalletBookSchema;
5
+ };
6
+ /**
7
+ * Builds the `walletConnect` catalogue options from a fetched wallet book.
8
+ * Applies the WalletConnect-specific eligibility filter
9
+ * (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
10
+ * without `sign_v2` support are excluded — same surface as
11
+ * `getWalletConnectCatalog`.
12
+ *
13
+ * Each emitted option carries the wallet's mobile deeplinks. Customers
14
+ * combine these with their chain's `connectWithWalletConnect<Chain>` URI via
15
+ * `appendWalletConnectUriToDeepLink` to open the wallet's app.
16
+ *
17
+ * @param params.walletBook - The fetched wallet book.
18
+ * @returns Tagged `walletConnect` options paired with their wallet option keys.
19
+ * @not-instrumented
20
+ */
21
+ export declare const buildWalletConnectOptions: ({ walletBook, }: BuildWalletConnectOptionsParams) => ConnectionOptionForWalletOption[];
22
+ export {};
23
+ //# sourceMappingURL=buildWalletConnectOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildWalletConnectOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAgBhH,KAAK,+BAA+B,GAAG;IACrC,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,oBAEnC,+BAA+B,KAAG,+BAA+B,EAgCnE,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
2
+ import type { WithWalletProviderDisplayOverride } from '../buildWithWalletProviderOptions/buildWithWalletProviderOptions';
3
+ import type { InstallationUrls, WalletConnectionOption, WalletOption } from '../walletOptionsCatalogue.types';
4
+ type BuildWalletOptionParams = {
5
+ connectionOptions: WalletConnectionOption[];
6
+ displayOverride?: WithWalletProviderDisplayOverride;
7
+ installationUrls?: InstallationUrls;
8
+ walletBook: WalletBookSchema;
9
+ walletOptionKey: string;
10
+ };
11
+ /**
12
+ * Assembles a `WalletOption` for a resolved wallet option key, populated
13
+ * with the connection options the transformers produced for it plus an
14
+ * optional install / download URL bag.
15
+ *
16
+ * Display merge rules (provider self-announced metadata wins where set):
17
+ *
18
+ * - `name`: `displayOverride.name` ?? wallet book group name ?? bare key.
19
+ * - `iconUrl`: `displayOverride.iconUrl` ?? wallet book group sprite URL ?? `''`.
20
+ * - `primaryColor`: wallet book group brand color only (providers do not
21
+ * ship a primary color in their announcement metadata).
22
+ * - `installationUrls`: copied through if present.
23
+ *
24
+ * Why provider precedence: a registered wallet provider knows its own
25
+ * brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
26
+ * wallet authoring its own identity). The wallet book fills in fields the
27
+ * announcement does not carry — currently only `primaryColor`.
28
+ *
29
+ * @param params.connectionOptions - The connections to attach to this wallet option.
30
+ * @param [params.displayOverride] - Provider-announced display info that overrides the wallet book's name and iconUrl.
31
+ * @param [params.installationUrls] - Install/download URL bag for this wallet.
32
+ * @param params.walletBook - The fetched wallet book.
33
+ * @param params.walletOptionKey - The wallet option key.
34
+ * @returns The constructed wallet option.
35
+ * @not-instrumented
36
+ */
37
+ export declare const buildWalletOption: ({ connectionOptions, displayOverride, installationUrls, walletBook, walletOptionKey, }: BuildWalletOptionParams) => WalletOption;
38
+ export {};
39
+ //# sourceMappingURL=buildWalletOption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildWalletOption.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kEAAkE,CAAC;AAC1H,OAAO,KAAK,EACV,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACb,MAAM,iCAAiC,CAAC;AAEzC,KAAK,uBAAuB,GAAG;IAC7B,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAC5C,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,2FAM3B,uBAAuB,KAAG,YAe5B,CAAC"}
@@ -0,0 +1,54 @@
1
+ import type { DynamicClient } from '../../../client/types/DynamicClient';
2
+ import type { WalletBookSchema } from '../../legacyWalletBook/legacyWalletBook.types';
3
+ import type { WalletProviderRegistryEntry } from '../../wallets/walletProviderRegistry';
4
+ import type { WithWalletProviderConnectionOption } from '../walletOptionsCatalogue.types';
5
+ /**
6
+ * Display override sourced from a registered wallet provider's announced
7
+ * metadata (EIP-6963 / Wallet Standard / vendor SDK). The outer
8
+ * transformer applies these on top of any wallet book group entry — the
9
+ * provider knows its own brand best, so `name` + `iconUrl` here win
10
+ * over the wallet book's values when both exist.
11
+ */
12
+ export type WithWalletProviderDisplayOverride = {
13
+ iconUrl: string;
14
+ name: string;
15
+ };
16
+ /**
17
+ * One `WithWalletProviderConnectionOption` paired with the wallet option
18
+ * key it should be bucketed under, plus the provider's self-announced
19
+ * display metadata. The outer transformer groups by `walletOptionKey` and
20
+ * uses `displayOverride` to build the wallet option shell, with provider
21
+ * precedence over the wallet book's display fields.
22
+ */
23
+ export type WithWalletProviderOptionForWalletOption = {
24
+ displayOverride: WithWalletProviderDisplayOverride;
25
+ option: WithWalletProviderConnectionOption;
26
+ walletOptionKey: string;
27
+ };
28
+ type BuildWithWalletProviderOptionsParams = {
29
+ entries: WalletProviderRegistryEntry[];
30
+ walletBook: WalletBookSchema;
31
+ };
32
+ /**
33
+ * Converts each registered wallet provider entry into a
34
+ * `WithWalletProviderConnectionOption` paired with its target wallet
35
+ * option key and the provider's display override. Every classifiable
36
+ * entry surfaces in the catalogue; the outer transformer uses the
37
+ * carried `displayOverride` to override any wallet book branding for
38
+ * that key (provider self-announcement wins over book).
39
+ *
40
+ * Entries whose registration priority is not recognised by
41
+ * `classifyWithWalletProviderSource` are dropped from the catalogue and
42
+ * an error is logged so Datadog surfaces the unknown registration path —
43
+ * in production this should never happen, every chain extension is
44
+ * expected to register with one of the documented priorities.
45
+ *
46
+ * @param params.entries - Snapshot of the registry's entries.
47
+ * @param params.walletBook - The fetched wallet book.
48
+ * @param client - The Dynamic client (used for logging unclassifiable entries).
49
+ * @returns An array of tagged options, in input order.
50
+ * @not-instrumented
51
+ */
52
+ export declare const buildWithWalletProviderOptions: ({ entries, walletBook }: BuildWithWalletProviderOptionsParams, client: DynamicClient) => WithWalletProviderOptionForWalletOption[];
53
+ export {};
54
+ //# sourceMappingURL=buildWithWalletProviderOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildWithWalletProviderOptions.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGxF,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,iCAAiC,CAAC;AAE1F;;;;;;GAMG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,uCAAuC,GAAG;IACpD,eAAe,EAAE,iCAAiC,CAAC;IACnD,MAAM,EAAE,kCAAkC,CAAC;IAC3C,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,oCAAoC,GAAG;IAC1C,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACvC,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,8BAA8B,4BAChB,oCAAoC,UACrD,aAAa,KACpB,uCAAuC,EA0CzC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { WalletProviderRegistryEntry } from '../../wallets/walletProviderRegistry';
2
+ import type { WithWalletProviderSource } from '../walletOptionsCatalogue.types';
3
+ type ClassifyWithWalletProviderSourceParams = {
4
+ entry: WalletProviderRegistryEntry;
5
+ };
6
+ /**
7
+ * Maps a registered wallet provider's registration priority to the
8
+ * `WithWalletProviderSource` value that should appear on its catalogue option.
9
+ *
10
+ * Priority mapping (set by each chain extension when it calls
11
+ * `registry.register`):
12
+ *
13
+ * - `WALLET_SDK` → `'sdk'` — branded SDKs wrapped by chain extensions
14
+ * (Base Account via `@base-org/account`, MetaMask Connect, …).
15
+ * - `WALLET_SELF_ANNOUNCEMENT_STANDARD` → `'selfAnnounced'` — in-page
16
+ * self-announcement standards (EIP-6963 on EVM, Wallet Standard on
17
+ * Solana / Sui / …).
18
+ * - `WINDOW_INJECT` → `'windowInjected'` — legacy `window.*` injection.
19
+ *
20
+ * Returns `undefined` for providers whose registration priority does not
21
+ * correspond to a connectable external-wallet source — callers filter these
22
+ * out before emitting catalogue options.
23
+ *
24
+ * @param params.entry - The registry entry to classify.
25
+ * @returns The matching source, or `undefined` if this entry should not
26
+ * surface a `withWalletProvider` option.
27
+ * @not-instrumented
28
+ */
29
+ export declare const classifyWithWalletProviderSource: ({ entry, }: ClassifyWithWalletProviderSourceParams) => WithWalletProviderSource | undefined;
30
+ export {};
31
+ //# sourceMappingURL=classifyWithWalletProviderSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifyWithWalletProviderSource.d.ts","sourceRoot":"","sources":["../../../../src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAEhF,KAAK,sCAAsC,GAAG;IAC5C,KAAK,EAAE,2BAA2B,CAAC;CACpC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,gCAAgC,eAE1C,sCAAsC,KACrC,wBAAwB,GACxB,SAgBH,CAAC"}