@dynamic-labs-sdk/client 0.8.0 → 0.9.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 (130) hide show
  1. package/dist/{constants-58bHSI3b.cjs.js → InvalidParamError-D1yNl3r1.cjs.js} +24 -4
  2. package/dist/InvalidParamError-D1yNl3r1.cjs.js.map +1 -0
  3. package/dist/{constants-B8WQGUki.esm.js → InvalidParamError-DMz6QY8e.esm.js} +18 -4
  4. package/dist/InvalidParamError-DMz6QY8e.esm.js.map +1 -0
  5. package/dist/{NotWaasWalletAccountError-DJmbtj65.esm.js → NotWaasWalletAccountError-Cp3qfAxw.esm.js} +3 -3
  6. package/dist/{NotWaasWalletAccountError-DJmbtj65.esm.js.map → NotWaasWalletAccountError-Cp3qfAxw.esm.js.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-Dq2ssnPs.cjs.js → NotWaasWalletAccountError-s2J7fQHr.cjs.js} +7 -7
  8. package/dist/{NotWaasWalletAccountError-Dq2ssnPs.cjs.js.map → NotWaasWalletAccountError-s2J7fQHr.cjs.js.map} +1 -1
  9. package/dist/client/core/createCore/createCore.d.ts.map +1 -1
  10. package/dist/client/core/createCore/getInitialState.d.ts.map +1 -1
  11. package/dist/client/core/types/DynamicCore.d.ts +15 -0
  12. package/dist/client/core/types/DynamicCore.d.ts.map +1 -1
  13. package/dist/client/core/types/DynamicCoreConfig.d.ts +1 -1
  14. package/dist/client/core/types/DynamicCoreConfig.d.ts.map +1 -1
  15. package/dist/client/types/DynamicClientConfig.d.ts +46 -0
  16. package/dist/client/types/DynamicClientConfig.d.ts.map +1 -1
  17. package/dist/core.cjs.js +34 -32
  18. package/dist/core.cjs.js.map +1 -1
  19. package/dist/core.esm.js +8 -8
  20. package/dist/core.esm.js.map +1 -1
  21. package/dist/exports/core.d.ts +6 -0
  22. package/dist/exports/core.d.ts.map +1 -1
  23. package/dist/exports/index.d.ts +4 -1
  24. package/dist/exports/index.d.ts.map +1 -1
  25. package/dist/exports/waas.d.ts +4 -1
  26. package/dist/exports/waas.d.ts.map +1 -1
  27. package/dist/{getNetworkProviderFromNetworkId-DCZQS4ot.cjs.js → getNetworkProviderFromNetworkId-BXGwNlcZ.cjs.js} +129 -45
  28. package/dist/getNetworkProviderFromNetworkId-BXGwNlcZ.cjs.js.map +1 -0
  29. package/dist/{getNetworkProviderFromNetworkId-HoSmTgsz.esm.js → getNetworkProviderFromNetworkId-CmLsKY7E.esm.js} +88 -24
  30. package/dist/getNetworkProviderFromNetworkId-CmLsKY7E.esm.js.map +1 -0
  31. package/dist/{getSignedSessionId-DZ5toWIx.cjs.js → getSignedSessionId-BO9omMlI.cjs.js} +8 -8
  32. package/dist/{getSignedSessionId-DZ5toWIx.cjs.js.map → getSignedSessionId-BO9omMlI.cjs.js.map} +1 -1
  33. package/dist/{getSignedSessionId-CWSJHTeG.esm.js → getSignedSessionId-BvQ4i928.esm.js} +3 -3
  34. package/dist/{getSignedSessionId-CWSJHTeG.esm.js.map → getSignedSessionId-BvQ4i928.esm.js.map} +1 -1
  35. package/dist/{getVerifiedCredentialForWalletAccount-bYTdp3TE.esm.js → getVerifiedCredentialForWalletAccount-54lCppnJ.esm.js} +113 -3
  36. package/dist/getVerifiedCredentialForWalletAccount-54lCppnJ.esm.js.map +1 -0
  37. package/dist/{getVerifiedCredentialForWalletAccount-86wjRIe0.cjs.js → getVerifiedCredentialForWalletAccount-BW8iluei.cjs.js} +140 -30
  38. package/dist/getVerifiedCredentialForWalletAccount-BW8iluei.cjs.js.map +1 -0
  39. package/dist/index.cjs.js +326 -267
  40. package/dist/index.cjs.js.map +1 -1
  41. package/dist/index.esm.js +85 -28
  42. package/dist/index.esm.js.map +1 -1
  43. package/dist/{isMfaRequiredForAction-lt9nPT2M.esm.js → isMfaRequiredForAction-DIvUT6_k.esm.js} +2 -2
  44. package/dist/{isMfaRequiredForAction-lt9nPT2M.esm.js.map → isMfaRequiredForAction-DIvUT6_k.esm.js.map} +1 -1
  45. package/dist/{isMfaRequiredForAction-BeZstT1P.cjs.js → isMfaRequiredForAction-DmYvEIJH.cjs.js} +9 -9
  46. package/dist/{isMfaRequiredForAction-BeZstT1P.cjs.js.map → isMfaRequiredForAction-DmYvEIJH.cjs.js.map} +1 -1
  47. package/dist/modules/auth/decodeJwt/decodeJwt.d.ts +26 -0
  48. package/dist/modules/auth/decodeJwt/decodeJwt.d.ts.map +1 -0
  49. package/dist/modules/auth/decodeJwt/index.d.ts +2 -0
  50. package/dist/modules/auth/decodeJwt/index.d.ts.map +1 -0
  51. package/dist/modules/auth/getElevatedAccessToken/getElevatedAccessToken.d.ts +30 -0
  52. package/dist/modules/auth/getElevatedAccessToken/getElevatedAccessToken.d.ts.map +1 -0
  53. package/dist/modules/auth/getElevatedAccessToken/index.d.ts +2 -0
  54. package/dist/modules/auth/getElevatedAccessToken/index.d.ts.map +1 -0
  55. package/dist/modules/auth/state.d.ts +13 -0
  56. package/dist/modules/auth/state.d.ts.map +1 -1
  57. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/elevatedAccessTokens.types.d.ts +10 -0
  58. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/elevatedAccessTokens.types.d.ts.map +1 -0
  59. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/index.d.ts +2 -0
  60. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/index.d.ts.map +1 -0
  61. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.d.ts +9 -0
  62. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.d.ts.map +1 -0
  63. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/index.d.ts +2 -0
  64. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/index.d.ts.map +1 -0
  65. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts +17 -0
  66. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts.map +1 -0
  67. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/index.d.ts +2 -0
  68. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/index.d.ts.map +1 -0
  69. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/upsertElevatedAccessToken.d.ts +17 -0
  70. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/upsertElevatedAccessToken.d.ts.map +1 -0
  71. package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
  72. package/dist/modules/deviceRegistration/detectDeviceRegistrationRedirect/detectDeviceRegistrationRedirect.d.ts +1 -1
  73. package/dist/modules/deviceRegistration/{getDeviceTokenFromUrl/getDeviceTokenFromUrl.d.ts → getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.d.ts} +3 -3
  74. package/dist/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.d.ts.map +1 -0
  75. package/dist/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/index.d.ts +2 -0
  76. package/dist/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/index.d.ts.map +1 -0
  77. package/dist/modules/user/isUserOnboardingComplete/index.d.ts +2 -0
  78. package/dist/modules/user/isUserOnboardingComplete/index.d.ts.map +1 -0
  79. package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts +12 -0
  80. package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts.map +1 -0
  81. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  82. package/dist/modules/waas/getWalletRecoveryState/getWalletRecoveryState.d.ts +16 -0
  83. package/dist/modules/waas/getWalletRecoveryState/getWalletRecoveryState.d.ts.map +1 -0
  84. package/dist/modules/waas/getWalletRecoveryState/index.d.ts +2 -0
  85. package/dist/modules/waas/getWalletRecoveryState/index.d.ts.map +1 -0
  86. package/dist/modules/waas/unlockWallet/index.d.ts +2 -0
  87. package/dist/modules/waas/unlockWallet/index.d.ts.map +1 -0
  88. package/dist/modules/waas/unlockWallet/unlockWallet.d.ts +17 -0
  89. package/dist/modules/waas/unlockWallet/unlockWallet.d.ts.map +1 -0
  90. package/dist/modules/waas/waas.types.d.ts +8 -1
  91. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  92. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts +4 -0
  93. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts.map +1 -1
  94. package/dist/services/crossTabBroadcast/createCrossTabBroadcast/createCrossTabBroadcast.d.ts +19 -0
  95. package/dist/services/crossTabBroadcast/createCrossTabBroadcast/createCrossTabBroadcast.d.ts.map +1 -0
  96. package/dist/services/crossTabBroadcast/createCrossTabBroadcast/index.d.ts +2 -0
  97. package/dist/services/crossTabBroadcast/createCrossTabBroadcast/index.d.ts.map +1 -0
  98. package/dist/services/crossTabBroadcast/crossTabBroadcast.schema.d.ts +8 -0
  99. package/dist/services/crossTabBroadcast/crossTabBroadcast.schema.d.ts.map +1 -0
  100. package/dist/services/crossTabBroadcast/crossTabBroadcast.types.d.ts +35 -0
  101. package/dist/services/crossTabBroadcast/crossTabBroadcast.types.d.ts.map +1 -0
  102. package/dist/services/crossTabBroadcast/index.d.ts +3 -0
  103. package/dist/services/crossTabBroadcast/index.d.ts.map +1 -0
  104. package/dist/services/deviceSigner/deviceSigner.types.d.ts +21 -0
  105. package/dist/services/deviceSigner/deviceSigner.types.d.ts.map +1 -0
  106. package/dist/services/deviceSigner/index.d.ts +2 -0
  107. package/dist/services/deviceSigner/index.d.ts.map +1 -0
  108. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  109. package/dist/waas.cjs.js +61 -29
  110. package/dist/waas.cjs.js.map +1 -1
  111. package/dist/waas.esm.js +34 -4
  112. package/dist/waas.esm.js.map +1 -1
  113. package/dist/waasCore.cjs.js +33 -15
  114. package/dist/waasCore.cjs.js.map +1 -1
  115. package/dist/waasCore.esm.js +22 -4
  116. package/dist/waasCore.esm.js.map +1 -1
  117. package/package.json +3 -3
  118. package/dist/InvalidParamError-C2c9HQ4V.esm.js +0 -18
  119. package/dist/InvalidParamError-C2c9HQ4V.esm.js.map +0 -1
  120. package/dist/InvalidParamError-D2oVXYDc.cjs.js +0 -23
  121. package/dist/InvalidParamError-D2oVXYDc.cjs.js.map +0 -1
  122. package/dist/constants-58bHSI3b.cjs.js.map +0 -1
  123. package/dist/constants-B8WQGUki.esm.js.map +0 -1
  124. package/dist/getNetworkProviderFromNetworkId-DCZQS4ot.cjs.js.map +0 -1
  125. package/dist/getNetworkProviderFromNetworkId-HoSmTgsz.esm.js.map +0 -1
  126. package/dist/getVerifiedCredentialForWalletAccount-86wjRIe0.cjs.js.map +0 -1
  127. package/dist/getVerifiedCredentialForWalletAccount-bYTdp3TE.esm.js.map +0 -1
  128. package/dist/modules/deviceRegistration/getDeviceTokenFromUrl/getDeviceTokenFromUrl.d.ts.map +0 -1
  129. package/dist/modules/deviceRegistration/getDeviceTokenFromUrl/index.d.ts +0 -2
  130. package/dist/modules/deviceRegistration/getDeviceTokenFromUrl/index.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { C as getDefaultClient, D as getCore, c as createApiClient, v as assertDefined } from "./constants-B8WQGUki.esm.js";
1
+ import { O as getCore, l as createApiClient, w as getDefaultClient, y as assertDefined } from "./InvalidParamError-DMz6QY8e.esm.js";
2
2
 
3
3
  //#region src/utils/bufferToHex/bufferToHex.ts
4
4
  /**
@@ -66,4 +66,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
66
66
 
67
67
  //#endregion
68
68
  export { bufferToHex as i, getMfaMethods as n, consumeMfaToken as r, isMfaRequiredForAction as t };
69
- //# sourceMappingURL=isMfaRequiredForAction-lt9nPT2M.esm.js.map
69
+ //# sourceMappingURL=isMfaRequiredForAction-DIvUT6_k.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-lt9nPT2M.esm.js","names":[],"sources":["../src/utils/bufferToHex/bufferToHex.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["/**\n * Converts an ArrayBuffer to a hex-encoded string\n */\nexport const bufferToHex = (buffer: ArrayBufferLike) =>\n [...new Uint8Array(buffer)]\n .map((x) => x.toString(16).padStart(2, '0'))\n .join('');\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 */\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 */\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 */\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":";;;;;;AAGA,MAAa,eAAe,WAC1B,CAAC,GAAG,IAAI,WAAW,OAAO,CAAC,CACxB,KAAK,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAC3C,KAAK,GAAG;;;;;;;;;;;;;;ACQb,MAAa,mBAAmB,SAAS,kBAAkB,KAAK;CAC9D,MAAM,OAAO,QAAQ,OAAO;CAE5B,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;AAElC,eAAc,UAAU,qBAAqB;AAE7C,MAAK,MAAM,IAAI,EACb,UAAU,MACX,CAAC;AAEF,QAAO;;;;;;;;;;;;;;ACZT,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-DIvUT6_k.esm.js","names":[],"sources":["../src/utils/bufferToHex/bufferToHex.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["/**\n * Converts an ArrayBuffer to a hex-encoded string\n */\nexport const bufferToHex = (buffer: ArrayBufferLike) =>\n [...new Uint8Array(buffer)]\n .map((x) => x.toString(16).padStart(2, '0'))\n .join('');\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 */\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 */\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 */\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":";;;;;;AAGA,MAAa,eAAe,WAC1B,CAAC,GAAG,IAAI,WAAW,OAAO,CAAC,CACxB,KAAK,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAC3C,KAAK,GAAG;;;;;;;;;;;;;;ACQb,MAAa,mBAAmB,SAAS,kBAAkB,KAAK;CAC9D,MAAM,OAAO,QAAQ,OAAO;CAE5B,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;AAElC,eAAc,UAAU,qBAAqB;AAE7C,MAAK,MAAM,IAAI,EACb,UAAU,MACX,CAAC;AAEF,QAAO;;;;;;;;;;;;;;ACZT,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_constants = require('./constants-58bHSI3b.cjs.js');
1
+ const require_InvalidParamError = require('./InvalidParamError-D1yNl3r1.cjs.js');
2
2
 
3
3
  //#region src/utils/bufferToHex/bufferToHex.ts
4
4
  /**
@@ -18,10 +18,10 @@ const bufferToHex = (buffer) => [...new Uint8Array(buffer)].map((x) => x.toStrin
18
18
  * @returns The MFA token that was consumed.
19
19
  * @throws Error if no MFA token is found.
20
20
  */
21
- const consumeMfaToken = (client = require_constants.getDefaultClient()) => {
22
- const core = require_constants.getCore(client);
21
+ const consumeMfaToken = (client = require_InvalidParamError.getDefaultClient()) => {
22
+ const core = require_InvalidParamError.getCore(client);
23
23
  const mfaToken = core.state.get().mfaToken;
24
- require_constants.assertDefined(mfaToken, "No MFA token found");
24
+ require_InvalidParamError.assertDefined(mfaToken, "No MFA token found");
25
25
  core.state.set({ mfaToken: null });
26
26
  return mfaToken;
27
27
  };
@@ -37,9 +37,9 @@ const consumeMfaToken = (client = require_constants.getDefaultClient()) => {
37
37
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
38
38
  * @returns A promise that resolves to the user's MFA methods configuration.
39
39
  */
40
- const getMfaMethods = async (client = require_constants.getDefaultClient()) => {
41
- const core = require_constants.getCore(client);
42
- return await require_constants.createApiClient({}, client).getUserMfaMethods({
40
+ const getMfaMethods = async (client = require_InvalidParamError.getDefaultClient()) => {
41
+ const core = require_InvalidParamError.getCore(client);
42
+ return await require_InvalidParamError.createApiClient({}, client).getUserMfaMethods({
43
43
  environmentId: core.environmentId,
44
44
  verifiedOnly: true
45
45
  });
@@ -57,7 +57,7 @@ const getMfaMethods = async (client = require_constants.getDefaultClient()) => {
57
57
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
58
58
  * @returns A promise that resolves to true if MFA is required for the action, false otherwise.
59
59
  */
60
- const isMfaRequiredForAction = async ({ mfaAction }, client = require_constants.getDefaultClient()) => {
60
+ const isMfaRequiredForAction = async ({ mfaAction }, client = require_InvalidParamError.getDefaultClient()) => {
61
61
  const projectSettings = client.projectSettings;
62
62
  if (!projectSettings?.security?.mfa?.actions?.some((action) => action.action === mfaAction && action.required)) return false;
63
63
  if (projectSettings?.security?.mfa?.required) return true;
@@ -89,4 +89,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
89
89
  return isMfaRequiredForAction;
90
90
  }
91
91
  });
92
- //# sourceMappingURL=isMfaRequiredForAction-BeZstT1P.cjs.js.map
92
+ //# sourceMappingURL=isMfaRequiredForAction-DmYvEIJH.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMfaRequiredForAction-BeZstT1P.cjs.js","names":["getDefaultClient","getCore","getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/utils/bufferToHex/bufferToHex.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["/**\n * Converts an ArrayBuffer to a hex-encoded string\n */\nexport const bufferToHex = (buffer: ArrayBufferLike) =>\n [...new Uint8Array(buffer)]\n .map((x) => x.toString(16).padStart(2, '0'))\n .join('');\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 */\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 */\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 */\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":";;;;;;AAGA,MAAa,eAAe,WAC1B,CAAC,GAAG,IAAI,WAAW,OAAO,CAAC,CACxB,KAAK,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAC3C,KAAK,GAAG;;;;;;;;;;;;;;ACQb,MAAa,mBAAmB,SAASA,oCAAkB,KAAK;CAC9D,MAAM,OAAOC,0BAAQ,OAAO;CAE5B,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;AAElC,iCAAc,UAAU,qBAAqB;AAE7C,MAAK,MAAM,IAAI,EACb,UAAU,MACX,CAAC;AAEF,QAAO;;;;;;;;;;;;;;ACZT,MAAa,gBAAgB,OAAO,SAASC,oCAAkB,KAAK;CAClE,MAAM,OAAOC,0BAAQ,OAAO;AAQ5B,QALuB,MAFLC,kCAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,oCAAkB,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-DmYvEIJH.cjs.js","names":["getDefaultClient","getCore","getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/utils/bufferToHex/bufferToHex.ts","../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["/**\n * Converts an ArrayBuffer to a hex-encoded string\n */\nexport const bufferToHex = (buffer: ArrayBufferLike) =>\n [...new Uint8Array(buffer)]\n .map((x) => x.toString(16).padStart(2, '0'))\n .join('');\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 */\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 */\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 */\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":";;;;;;AAGA,MAAa,eAAe,WAC1B,CAAC,GAAG,IAAI,WAAW,OAAO,CAAC,CACxB,KAAK,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAC3C,KAAK,GAAG;;;;;;;;;;;;;;ACQb,MAAa,mBAAmB,SAASA,4CAAkB,KAAK;CAC9D,MAAM,OAAOC,kCAAQ,OAAO;CAE5B,MAAM,WAAW,KAAK,MAAM,KAAK,CAAC;AAElC,yCAAc,UAAU,qBAAqB;AAE7C,MAAK,MAAM,IAAI,EACb,UAAU,MACX,CAAC;AAEF,QAAO;;;;;;;;;;;;;;ACZT,MAAa,gBAAgB,OAAO,SAASC,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"}
@@ -0,0 +1,26 @@
1
+ export type JwtPayload = {
2
+ [key: string]: unknown;
3
+ exp?: number;
4
+ iat?: number;
5
+ scopes?: string[];
6
+ singleUse?: boolean;
7
+ sub?: string;
8
+ };
9
+ /**
10
+ * Decodes a JWT token and returns the full payload.
11
+ *
12
+ * This function extracts and returns the complete JWT payload including scopes,
13
+ * expiration time, and other claims.
14
+ *
15
+ * @param jwt - The JWT token string.
16
+ * @returns The decoded JWT payload object.
17
+ * @throws InvalidParamError if the token is invalid or cannot be decoded.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const payload = decodeJwt(jwt);
22
+ * // Returns: { scopes: ['wallet:export'], exp: 1234567890, ... }
23
+ * ```
24
+ */
25
+ export declare const decodeJwt: (jwt: string) => JwtPayload;
26
+ //# sourceMappingURL=decodeJwt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeJwt.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/decodeJwt/decodeJwt.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,UA4BvC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { decodeJwt, type JwtPayload } from './decodeJwt';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/decodeJwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,30 @@
1
+ type GetElevatedAccessTokenParams = {
2
+ scope: string;
3
+ };
4
+ /**
5
+ * Gets an elevated access token by scope.
6
+ *
7
+ * This function retrieves an elevated access token that contains the specified scope.
8
+ * Expired tokens are automatically filtered out.
9
+ *
10
+ * If the token has `singleUse: true`, it will be automatically
11
+ * consumed (removed from state) after retrieval. Otherwise, it remains in state
12
+ * for future use.
13
+ *
14
+ * @param params - The parameters object.
15
+ * @param params.scope - The scope to match (e.g., 'wallet:export').
16
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
17
+ * @returns The elevated access token if found and not expired, or undefined if not found or expired.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const token = getElevatedAccessToken({ scope: 'wallet:export' });
22
+ * if (token) {
23
+ * // Use the token
24
+ * // Token is automatically consumed if singleUse: true
25
+ * }
26
+ * ```
27
+ */
28
+ export declare const getElevatedAccessToken: ({ scope }: GetElevatedAccessTokenParams, client?: import("../../../exports").DynamicClient) => string | undefined;
29
+ export {};
30
+ //# sourceMappingURL=getElevatedAccessToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/getElevatedAccessToken/getElevatedAccessToken.ts"],"names":[],"mappings":"AAGA,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,sBAAsB,cACtB,4BAA4B,wDAEtC,MAAM,GAAG,SAiCX,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getElevatedAccessToken } from './getElevatedAccessToken';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/getElevatedAccessToken/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,6 +1,19 @@
1
1
  import type { User } from '../user/user.types';
2
2
  declare global {
3
3
  interface DynamicCoreState {
4
+ /**
5
+ * Array of elevated access tokens with their associated scopes and expiration.
6
+ *
7
+ * When the user authenticates with elevated scopes (e.g., wallet:export),
8
+ * tokens are added to this array. Each token can have multiple scopes.
9
+ * Tokens are removed when consumed or expired.
10
+ */
11
+ elevatedAccessTokens: Array<{
12
+ expiresAt: Date | null;
13
+ scopes: string[];
14
+ singleUse: boolean;
15
+ token: string;
16
+ }>;
4
17
  /**
5
18
  * The legacy JWT of the current user.
6
19
  *
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,gBAAgB;QACxB;;;;;;;;;WASG;QACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC;QAE9B;;;;;WAKG;QACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;KACnB;CACF"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,gBAAgB;QACxB;;;;;;WAMG;QACH,oBAAoB,EAAE,KAAK,CAAC;YAC1B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;YACvB,MAAM,EAAE,MAAM,EAAE,CAAC;YACjB,SAAS,EAAE,OAAO,CAAC;YACnB,KAAK,EAAE,MAAM,CAAC;SACf,CAAC,CAAC;QAEH;;;;;;;;;WASG;QACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC;QAE9B;;;;;WAKG;QACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;KACnB;CACF"}
@@ -0,0 +1,10 @@
1
+ import type { DynamicCoreState } from '../../../../client/core/types';
2
+ export type ElevatedAccessToken = DynamicCoreState['elevatedAccessTokens'][number];
3
+ export type ParsedElevatedAccessToken = {
4
+ expiresAt: Date;
5
+ normalizedScopes: string[];
6
+ scopes: string[];
7
+ singleUse: boolean;
8
+ token: string;
9
+ };
10
+ //# sourceMappingURL=elevatedAccessTokens.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elevatedAccessTokens.types.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/elevatedAccessTokens.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAC7B,gBAAgB,CAAC,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,IAAI,CAAC;IAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { normalizeScopes } from './normalizeScopes';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Normalizes scopes by deduplicating and sorting them.
3
+ * This creates a canonical representation for comparison.
4
+ *
5
+ * @param scopes - Array of scope strings (may contain duplicates)
6
+ * @returns Normalized, sorted array of unique scopes
7
+ */
8
+ export declare const normalizeScopes: (scopes: string[]) => string[];
9
+ //# sourceMappingURL=normalizeScopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeScopes.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,WAAY,MAAM,EAAE,KAAG,MAAM,EAExD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { parseElevatedAccessToken } from './parseElevatedAccessToken';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { ParsedElevatedAccessToken } from '../elevatedAccessTokens.types';
2
+ /**
3
+ * Validates and parses an elevated access token from a JWT string.
4
+ * Extracts scopes, expiration, and validates the token structure.
5
+ *
6
+ * Policy decisions:
7
+ * - Tokens without scopes are rejected (returns null)
8
+ * - Tokens with empty scopes array are rejected (returns null)
9
+ * - Tokens without exp field are rejected (returns null)
10
+ * - Expired tokens are rejected (returns null)
11
+ *
12
+ * @param token - JWT string containing the elevated access token
13
+ * @param now - Current date for expiration validation (defaults to new Date())
14
+ * @returns Parsed token data or null if token is invalid/expired
15
+ */
16
+ export declare const parseElevatedAccessToken: (token: string, now?: Date) => ParsedElevatedAccessToken | null;
17
+ //# sourceMappingURL=parseElevatedAccessToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,UAC5B,MAAM,QACR,IAAI,KACR,yBAAyB,GAAG,IA8B9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { upsertElevatedAccessToken } from './upsertElevatedAccessToken';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { ElevatedAccessToken, ParsedElevatedAccessToken } from '../elevatedAccessTokens.types';
2
+ /**
3
+ * Upserts an elevated access token into the current tokens array.
4
+ *
5
+ * Policy: Only one token per normalized scope-set is allowed.
6
+ * If a token with the same normalized scopes exists, it is replaced.
7
+ * This ensures we don't accumulate multiple tokens for the same scope combination.
8
+ *
9
+ * @param currentTokens - Current array of elevated access tokens
10
+ * @param newToken - New token to upsert
11
+ * @returns Updated array of tokens with the new token upserted
12
+ */
13
+ export declare const upsertElevatedAccessToken: ({ currentTokens, newToken, }: {
14
+ currentTokens: ElevatedAccessToken[];
15
+ newToken: ParsedElevatedAccessToken;
16
+ }) => ElevatedAccessToken[];
17
+ //# sourceMappingURL=upsertElevatedAccessToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upsertElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/upsertElevatedAccessToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,iCAGnC;IACD,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,QAAQ,EAAE,yBAAyB,CAAC;CACrC,KAAG,mBAAmB,EAmBtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateAuthFromVerifyResponse.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAO3D,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,4BAA4B,iBACzB,kCAAkC,UACxC,aAAa,SA8CtB,CAAC"}
1
+ {"version":3,"file":"updateAuthFromVerifyResponse.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,4BAA4B,iBACzB,kCAAkC,UACxC,aAAa,SA4DtB,CAAC"}
@@ -4,7 +4,7 @@ type DetectDeviceRegistrationRedirectParams = {
4
4
  /**
5
5
  * Detects if the current URL is a device registration redirect.
6
6
  *
7
- * This function uses getDeviceTokenFromUrl to validate the URL and determine
7
+ * This function uses getDeviceRegistrationTokenFromUrl to validate the URL and determine
8
8
  * if it contains device registration redirect data from a device authentication flow.
9
9
  *
10
10
  * @returns True if the URL is a device registration redirect, false otherwise.
@@ -1,4 +1,4 @@
1
- type GetDeviceTokenFromUrlParams = {
1
+ type GetDeviceRegistrationTokenFromUrlParams = {
2
2
  url: string;
3
3
  };
4
4
  /**
@@ -10,6 +10,6 @@ type GetDeviceTokenFromUrlParams = {
10
10
  * @returns The device token as a string if valid.
11
11
  * @throws InvalidDeviceRegistrationRedirectError If the URL is not a valid device registration redirect.
12
12
  */
13
- export declare const getDeviceTokenFromUrl: ({ url, }: GetDeviceTokenFromUrlParams) => string;
13
+ export declare const getDeviceRegistrationTokenFromUrl: ({ url, }: GetDeviceRegistrationTokenFromUrlParams) => string;
14
14
  export {};
15
- //# sourceMappingURL=getDeviceTokenFromUrl.d.ts.map
15
+ //# sourceMappingURL=getDeviceRegistrationTokenFromUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDeviceRegistrationTokenFromUrl.d.ts","sourceRoot":"","sources":["../../../../src/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.ts"],"names":[],"mappings":"AAEA,KAAK,uCAAuC,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC,aAE3C,uCAAuC,KAAG,MAkB5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getDeviceRegistrationTokenFromUrl } from './getDeviceRegistrationTokenFromUrl';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { isUserOnboardingComplete } from './isUserOnboardingComplete';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/user/isUserOnboardingComplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Checks if the user has completed all onboarding requirements.
3
+ *
4
+ * This function verifies whether a user has fulfilled all necessary requirements
5
+ * including KYC fields (Know Your Customer information) and MFA setup
6
+ * (Multi-Factor Authentication including recovery codes acknowledgment).
7
+ *
8
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9
+ * @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.
10
+ */
11
+ export declare const isUserOnboardingComplete: (client?: import("../../../exports").DynamicClient) => boolean;
12
+ //# sourceMappingURL=isUserOnboardingComplete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUserOnboardingComplete.d.ts","sourceRoot":"","sources":["../../../../src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,gEAYpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createWaasProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasProvider/createWaasProvider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,0BAG5B,wBAAwB,KAAG,YAqT7B,CAAC"}
1
+ {"version":3,"file":"createWaasProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/createWaasProvider/createWaasProvider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,0BAG5B,wBAAwB,KAAG,YAsV7B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { WalletRecoveryState } from '@dynamic-labs-wallet/browser-wallet-client';
2
+ import type { DynamicClient } from '../../../client/types/DynamicClient';
3
+ import type { WalletAccount } from '../../wallets/walletAccount';
4
+ type GetWalletRecoveryStateParams = {
5
+ walletAccount: WalletAccount;
6
+ };
7
+ /**
8
+ * Retrieves the recovery state of a WaaS wallet account.
9
+ *
10
+ * @param params.walletAccount - The WaaS wallet account to get the recovery state for.
11
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
12
+ * @returns A promise that resolves with the wallet recovery state.
13
+ */
14
+ export declare const getWalletRecoveryState: ({ walletAccount }: GetWalletRecoveryStateParams, client?: DynamicClient) => Promise<WalletRecoveryState>;
15
+ export {};
16
+ //# sourceMappingURL=getWalletRecoveryState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getWalletRecoveryState.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/getWalletRecoveryState/getWalletRecoveryState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAGtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE,KAAK,4BAA4B,GAAG;IAClC,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,sBACd,4BAA4B,WACvC,aAAa,KACpB,OAAO,CAAC,mBAAmB,CAS7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getWalletRecoveryState } from './getWalletRecoveryState';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/getWalletRecoveryState/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { unlockWallet } from './unlockWallet';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/unlockWallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { GetWalletResponse } from '@dynamic-labs-wallet/browser-wallet-client';
2
+ import type { WalletAccount } from '../../wallets/walletAccount';
3
+ type UnlockWalletParams = {
4
+ password: string;
5
+ walletAccount: WalletAccount;
6
+ };
7
+ /**
8
+ * Unlocks a WaaS wallet account.
9
+ *
10
+ * @param params.walletAccount - The WaaS wallet account to unlock.
11
+ * @param params.password - The password to unlock the wallet.
12
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
13
+ * @returns A promise that resolves with the wallet information.
14
+ */
15
+ export declare const unlockWallet: ({ password, walletAccount }: UnlockWalletParams, client?: import("../../../exports").DynamicClient) => Promise<GetWalletResponse>;
16
+ export {};
17
+ //# sourceMappingURL=unlockWallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlockWallet.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/unlockWallet/unlockWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAGpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAGjE,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,gCACM,kBAAkB,wDAE9C,OAAO,CAAC,iBAAiB,CAU3B,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { DynamicWalletClient, ThresholdSignatureScheme } from '@dynamic-labs-wallet/browser-wallet-client';
1
+ import type { DynamicWalletClient, GetWalletResponse, ThresholdSignatureScheme, WalletRecoveryState } from '@dynamic-labs-wallet/browser-wallet-client';
2
2
  import type { Chain } from '../chain';
3
3
  import type { WalletAccount } from '../wallets/walletAccount';
4
4
  import type { WalletProvider } from '../wallets/walletProvider';
@@ -44,6 +44,9 @@ export type WaasProvider = {
44
44
  walletAccount: WalletAccount;
45
45
  }) => Promise<void>;
46
46
  getWaasClient: () => Promise<DynamicWalletClient>;
47
+ getWalletRecoveryState: (args: {
48
+ walletAccount: WalletAccount;
49
+ }) => Promise<WalletRecoveryState>;
47
50
  importPrivateKey(args: {
48
51
  privateKey: string;
49
52
  thresholdSignatureScheme?: ThresholdSignatureScheme;
@@ -79,6 +82,10 @@ export type WaasProvider = {
79
82
  signature: string;
80
83
  }>;
81
84
  terminate: () => Promise<void>;
85
+ unlockWallet: (args: {
86
+ password: string;
87
+ walletAccount: WalletAccount;
88
+ }) => Promise<GetWalletResponse>;
82
89
  updatePassword: (args: {
83
90
  currentPassword: string;
84
91
  newPassword: string;
@@ -1 +1 @@
1
- {"version":3,"file":"waas.types.d.ts","sourceRoot":"","sources":["../../../src/modules/waas/waas.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,YAAY,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAE3F;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,KAAK,EAAE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AAa,CAAC;KAC9B,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC,cAAc,EAAE,CAAC,IAAI,EAAE;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC,yBAAyB,EAAE,CAAC,IAAI,EAAE;QAChC,qBAAqB,EAAE,MAAM,CAAC;QAC9B,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,YAAY,EAAE,CAAC,IAAI,EAAE;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACjC,cAAc,EAAE,CAAC,IAAI,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,aAAa,CAAC;KAC9B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAC7C,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC"}
@@ -5,6 +5,10 @@ import type { NetworkData } from '../networkProvider/networkProvider.types';
5
5
  * This function returns detailed configuration data for all networks enabled
6
6
  * in your Dynamic project, including RPC URLs, native currencies, and metadata.
7
7
  *
8
+ * If a `transformers.networkData` callback was provided in the client configuration,
9
+ * it will be applied to each network before returning the data. This allows you to
10
+ * customize network properties (such as RPC URLs) in a centralized way.
11
+ *
8
12
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9
13
  * @returns An array of network configuration data for all enabled networks.
10
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"getNetworksData.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/getNetworksData/getNetworksData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,4DAAkC,WAAW,EAgDxE,CAAC"}
1
+ {"version":3,"file":"getNetworksData.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/networks/getNetworksData/getNetworksData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,4DAAkC,WAAW,EAwDxE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { CrossTabBroadcast } from '../crossTabBroadcast.types';
2
+ type CreateCrossTabBroadcastParams = {
3
+ channelName: string;
4
+ };
5
+ /**
6
+ * Creates a cross-tab broadcast service instance using the BroadcastChannel API.
7
+ *
8
+ * Enables communication between multiple tabs/windows of the same application.
9
+ * Messages are validated against the schema and invalid messages are silently ignored.
10
+ *
11
+ * In SSR or when BroadcastChannel is unavailable, returns a no-op implementation.
12
+ *
13
+ * @param params - Configuration parameters
14
+ * @param params.channelName - The name of the broadcast channel to use
15
+ * @returns A cross-tab broadcast service instance
16
+ */
17
+ export declare const createCrossTabBroadcast: ({ channelName, }: CreateCrossTabBroadcastParams) => CrossTabBroadcast;
18
+ export {};
19
+ //# sourceMappingURL=createCrossTabBroadcast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCrossTabBroadcast.d.ts","sourceRoot":"","sources":["../../../../src/services/crossTabBroadcast/createCrossTabBroadcast/createCrossTabBroadcast.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,KAAK,6BAA6B,GAAG;IACnC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,qBAEjC,6BAA6B,KAAG,iBAyClC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createCrossTabBroadcast } from './createCrossTabBroadcast';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/crossTabBroadcast/createCrossTabBroadcast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import * as z from 'zod/mini';
2
+ /**
3
+ * Schema for validating cross-tab broadcast messages.
4
+ */
5
+ export declare const CrossTabBroadcastMessageSchema: z.ZodMiniObject<{
6
+ event: z.ZodMiniString<string>;
7
+ }, z.core.$strip>;
8
+ //# sourceMappingURL=crossTabBroadcast.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crossTabBroadcast.schema.d.ts","sourceRoot":"","sources":["../../../src/services/crossTabBroadcast/crossTabBroadcast.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B;;GAEG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAC"}