@dynamic-labs-sdk/client 0.9.0 → 0.12.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 (118) hide show
  1. package/dist/{InvalidParamError-DMz6QY8e.esm.js → InvalidParamError-DNXaHtXP.esm.js} +3 -3
  2. package/dist/{InvalidParamError-DMz6QY8e.esm.js.map → InvalidParamError-DNXaHtXP.esm.js.map} +1 -1
  3. package/dist/{InvalidParamError-D1yNl3r1.cjs.js → InvalidParamError-Dj1fpM2M.cjs.js} +4 -4
  4. package/dist/{InvalidParamError-D1yNl3r1.cjs.js.map → InvalidParamError-Dj1fpM2M.cjs.js.map} +1 -1
  5. package/dist/{NotWaasWalletAccountError-s2J7fQHr.cjs.js → NotWaasWalletAccountError-Cy_46Mkg.cjs.js} +3 -3
  6. package/dist/{NotWaasWalletAccountError-s2J7fQHr.cjs.js.map → NotWaasWalletAccountError-Cy_46Mkg.cjs.js.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-Cp3qfAxw.esm.js → NotWaasWalletAccountError-DVph5-w8.esm.js} +3 -3
  8. package/dist/{NotWaasWalletAccountError-Cp3qfAxw.esm.js.map → NotWaasWalletAccountError-DVph5-w8.esm.js.map} +1 -1
  9. package/dist/core.cjs.js +6 -5
  10. package/dist/core.cjs.js.map +1 -1
  11. package/dist/core.esm.js +8 -8
  12. package/dist/core.esm.js.map +1 -1
  13. package/dist/errors/FeeEstimationFailedError.d.ts +8 -0
  14. package/dist/errors/FeeEstimationFailedError.d.ts.map +1 -0
  15. package/dist/errors/SimulationFailedError.d.ts +8 -0
  16. package/dist/errors/SimulationFailedError.d.ts.map +1 -0
  17. package/dist/exports/core.d.ts +2 -0
  18. package/dist/exports/core.d.ts.map +1 -1
  19. package/dist/exports/index.d.ts +9 -0
  20. package/dist/exports/index.d.ts.map +1 -1
  21. package/dist/{getNetworkProviderFromNetworkId-CmLsKY7E.esm.js → getNetworkProviderFromNetworkId-27Zwy4je.esm.js} +10 -8
  22. package/dist/{getNetworkProviderFromNetworkId-CmLsKY7E.esm.js.map → getNetworkProviderFromNetworkId-27Zwy4je.esm.js.map} +1 -1
  23. package/dist/{getNetworkProviderFromNetworkId-BXGwNlcZ.cjs.js → getNetworkProviderFromNetworkId-Dvi65YCc.cjs.js} +7 -5
  24. package/dist/{getNetworkProviderFromNetworkId-BXGwNlcZ.cjs.js.map → getNetworkProviderFromNetworkId-Dvi65YCc.cjs.js.map} +1 -1
  25. package/dist/{getSignedSessionId-BO9omMlI.cjs.js → getSignedSessionId-1yP68jni.cjs.js} +24 -7
  26. package/dist/getSignedSessionId-1yP68jni.cjs.js.map +1 -0
  27. package/dist/{getSignedSessionId-BvQ4i928.esm.js → getSignedSessionId-BEjBh8ML.esm.js} +24 -7
  28. package/dist/getSignedSessionId-BEjBh8ML.esm.js.map +1 -0
  29. package/dist/{getVerifiedCredentialForWalletAccount-BW8iluei.cjs.js → getVerifiedCredentialForWalletAccount-CnHwYXVQ.cjs.js} +11 -8
  30. package/dist/getVerifiedCredentialForWalletAccount-CnHwYXVQ.cjs.js.map +1 -0
  31. package/dist/{getVerifiedCredentialForWalletAccount-54lCppnJ.esm.js → getVerifiedCredentialForWalletAccount-DsCAOgMb.esm.js} +10 -7
  32. package/dist/getVerifiedCredentialForWalletAccount-DsCAOgMb.esm.js.map +1 -0
  33. package/dist/index.cjs.js +162 -13
  34. package/dist/index.cjs.js.map +1 -1
  35. package/dist/index.esm.js +160 -17
  36. package/dist/index.esm.js.map +1 -1
  37. package/dist/{isMfaRequiredForAction-DIvUT6_k.esm.js → isMfaRequiredForAction-BG_7iYqV.esm.js} +2 -2
  38. package/dist/{isMfaRequiredForAction-DIvUT6_k.esm.js.map → isMfaRequiredForAction-BG_7iYqV.esm.js.map} +1 -1
  39. package/dist/{isMfaRequiredForAction-DmYvEIJH.cjs.js → isMfaRequiredForAction-zmF7uoM7.cjs.js} +2 -2
  40. package/dist/{isMfaRequiredForAction-DmYvEIJH.cjs.js.map → isMfaRequiredForAction-zmF7uoM7.cjs.js.map} +1 -1
  41. package/dist/modules/auth/decodeJwt/decodeJwt.d.ts +4 -4
  42. package/dist/modules/auth/decodeJwt/decodeJwt.d.ts.map +1 -1
  43. package/dist/modules/auth/logout/logout.d.ts.map +1 -1
  44. package/dist/modules/auth/state.d.ts +1 -1
  45. package/dist/modules/auth/state.d.ts.map +1 -1
  46. package/dist/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.d.ts.map +1 -1
  47. package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
  48. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +8 -2
  49. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts.map +1 -1
  50. package/dist/modules/crossTabEventSync/index.d.ts +2 -0
  51. package/dist/modules/crossTabEventSync/index.d.ts.map +1 -0
  52. package/dist/modules/crossTabEventSync/setupCrossTabEventSync/index.d.ts +2 -0
  53. package/dist/modules/crossTabEventSync/setupCrossTabEventSync/index.d.ts.map +1 -0
  54. package/dist/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.d.ts +19 -0
  55. package/dist/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.d.ts.map +1 -0
  56. package/dist/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.d.ts +7 -0
  57. package/dist/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.d.ts.map +1 -0
  58. package/dist/modules/deviceRegistration/completeDeviceRegistration/index.d.ts +2 -0
  59. package/dist/modules/deviceRegistration/completeDeviceRegistration/index.d.ts.map +1 -0
  60. package/dist/modules/deviceRegistration/events.d.ts +21 -0
  61. package/dist/modules/deviceRegistration/events.d.ts.map +1 -0
  62. package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
  63. package/dist/modules/otp/verifyOTP/verifyOTP.d.ts +3 -2
  64. package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
  65. package/dist/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.d.ts +1 -1
  66. package/dist/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.d.ts.map +1 -1
  67. package/dist/modules/sessionKeys/generateNonceSignature/generateNonceSignature.d.ts +9 -0
  68. package/dist/modules/sessionKeys/generateNonceSignature/generateNonceSignature.d.ts.map +1 -0
  69. package/dist/modules/sessionKeys/generateNonceSignature/index.d.ts +2 -0
  70. package/dist/modules/sessionKeys/generateNonceSignature/index.d.ts.map +1 -0
  71. package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts.map +1 -1
  72. package/dist/modules/simulation/simulation.types.d.ts +75 -0
  73. package/dist/modules/simulation/simulation.types.d.ts.map +1 -0
  74. package/dist/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.d.ts.map +1 -1
  75. package/dist/modules/storageSync/schema.d.ts +7 -0
  76. package/dist/modules/storageSync/schema.d.ts.map +1 -1
  77. package/dist/modules/storageSync/syncStateWithStorage/syncStateWithStorage.d.ts.map +1 -1
  78. package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts +4 -1
  79. package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts.map +1 -1
  80. package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts +4 -1
  81. package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts.map +1 -1
  82. package/dist/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/canConnectWithHardwareWallet.d.ts +16 -0
  83. package/dist/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/canConnectWithHardwareWallet.d.ts.map +1 -0
  84. package/dist/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/index.d.ts +2 -0
  85. package/dist/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/index.d.ts.map +1 -0
  86. package/dist/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/formatSignatureForHardwareWallet.d.ts +15 -0
  87. package/dist/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/formatSignatureForHardwareWallet.d.ts.map +1 -0
  88. package/dist/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/index.d.ts +2 -0
  89. package/dist/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/index.d.ts.map +1 -0
  90. package/dist/modules/wallets/hardwareWallet/hardwareWallet.types.d.ts +5 -0
  91. package/dist/modules/wallets/hardwareWallet/hardwareWallet.types.d.ts.map +1 -0
  92. package/dist/modules/wallets/hardwareWallet/isHardwareWalletAccount/index.d.ts +2 -0
  93. package/dist/modules/wallets/hardwareWallet/isHardwareWalletAccount/index.d.ts.map +1 -0
  94. package/dist/modules/wallets/hardwareWallet/isHardwareWalletAccount/isHardwareWalletAccount.d.ts +13 -0
  95. package/dist/modules/wallets/hardwareWallet/isHardwareWalletAccount/isHardwareWalletAccount.d.ts.map +1 -0
  96. package/dist/modules/wallets/unverifiedWalletAccounts/schema.d.ts +1 -0
  97. package/dist/modules/wallets/unverifiedWalletAccounts/schema.d.ts.map +1 -1
  98. package/dist/modules/wallets/utils/convertVerifiedCredentialToWalletAccount/convertVerifiedCredentialToWalletAccount.d.ts.map +1 -1
  99. package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts +3 -2
  100. package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts.map +1 -1
  101. package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts +3 -1
  102. package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts.map +1 -1
  103. package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts +3 -1
  104. package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts.map +1 -1
  105. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts +2 -0
  106. package/dist/modules/wallets/walletAccount/walletAccount.types.d.ts.map +1 -1
  107. package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts +5 -0
  108. package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
  109. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  110. package/dist/waas.cjs.js +4 -4
  111. package/dist/waas.esm.js +3 -3
  112. package/dist/waasCore.cjs.js +4 -4
  113. package/dist/waasCore.esm.js +3 -3
  114. package/package.json +3 -3
  115. package/dist/getSignedSessionId-BO9omMlI.cjs.js.map +0 -1
  116. package/dist/getSignedSessionId-BvQ4i928.esm.js.map +0 -1
  117. package/dist/getVerifiedCredentialForWalletAccount-54lCppnJ.esm.js.map +0 -1
  118. package/dist/getVerifiedCredentialForWalletAccount-BW8iluei.cjs.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { O as getCore, l as createApiClient, w as getDefaultClient, y as assertDefined } from "./InvalidParamError-DMz6QY8e.esm.js";
1
+ import { O as getCore, l as createApiClient, w as getDefaultClient, y as assertDefined } from "./InvalidParamError-DNXaHtXP.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-DIvUT6_k.esm.js.map
69
+ //# sourceMappingURL=isMfaRequiredForAction-BG_7iYqV.esm.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"isMfaRequiredForAction-BG_7iYqV.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_InvalidParamError = require('./InvalidParamError-D1yNl3r1.cjs.js');
1
+ const require_InvalidParamError = require('./InvalidParamError-Dj1fpM2M.cjs.js');
2
2
 
3
3
  //#region src/utils/bufferToHex/bufferToHex.ts
4
4
  /**
@@ -89,4 +89,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
89
89
  return isMfaRequiredForAction;
90
90
  }
91
91
  });
92
- //# sourceMappingURL=isMfaRequiredForAction-DmYvEIJH.cjs.js.map
92
+ //# sourceMappingURL=isMfaRequiredForAction-zmF7uoM7.cjs.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"isMfaRequiredForAction-zmF7uoM7.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"}
@@ -1,10 +1,10 @@
1
1
  export type JwtPayload = {
2
2
  [key: string]: unknown;
3
- exp?: number;
4
- iat?: number;
5
- scopes?: string[];
3
+ exp: number;
4
+ iat: number;
5
+ scope: string;
6
6
  singleUse?: boolean;
7
- sub?: string;
7
+ sub: string;
8
8
  };
9
9
  /**
10
10
  * Decodes a JWT token and returns the full payload.
@@ -1 +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"}
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,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,UA4BvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,eAAO,MAAM,MAAM,sEA+ClB,CAAC"}
1
+ {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,eAAO,MAAM,MAAM,sEAgDlB,CAAC"}
@@ -9,7 +9,7 @@ declare global {
9
9
  * Tokens are removed when consumed or expired.
10
10
  */
11
11
  elevatedAccessTokens: Array<{
12
- expiresAt: Date | null;
12
+ expiresAt: Date;
13
13
  scopes: string[];
14
14
  singleUse: boolean;
15
15
  token: string;
@@ -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;;;;;;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"}
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,CAAC;YAChB,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"parseElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,UAC5B,MAAM,QACR,IAAI,KACR,yBAAyB,GAAG,IA8B9B,CAAC"}
1
+ {"version":3,"file":"parseElevatedAccessToken.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,UAC5B,MAAM,QACR,IAAI,KACR,yBAAyB,GAAG,IAgC9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateAuthFromVerifyResponse.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,KAAK,kCAAkC,GAAG;IACxC,QAAQ,EAAE,cAAc,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,4BAA4B,iBACzB,kCAAkC,UACxC,aAAa,SA4DtB,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,SA+DtB,CAAC"}
@@ -1,6 +1,12 @@
1
- import type { MultichainAccountBalanceResponse, MultichainAccountBalancesRequest } from '@dynamic-labs/sdk-api-core';
1
+ import type { MultichainAccountBalanceResponse, MultichainAccountBalancesRequest, MultichainAccountBalancesRequestBalanceRequests } from '@dynamic-labs/sdk-api-core';
2
+ import type { Chain } from '../../chain/chain.types';
3
+ export type GetMultichainBalancesBalanceRequest = Omit<MultichainAccountBalancesRequest, 'balanceRequests'> & {
4
+ balanceRequests: Array<Omit<MultichainAccountBalancesRequestBalanceRequests, 'chain'> & {
5
+ chain: Chain;
6
+ }>;
7
+ };
2
8
  export type GetMultichainBalancesParams = {
3
- balanceRequest: MultichainAccountBalancesRequest;
9
+ balanceRequest: GetMultichainBalancesBalanceRequest;
4
10
  };
5
11
  /**
6
12
  * Retrieves token balances across multiple blockchain networks.
@@ -1 +1 @@
1
- {"version":3,"file":"getMultichainBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainBalances/getMultichainBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,gCAAgC,EACjC,MAAM,4BAA4B,CAAC;AAMpC,MAAM,MAAM,2BAA2B,GAAG;IACxC,cAAc,EAAE,gCAAgC,CAAC;CAClD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,uBACZ,2BAA2B,wDAE9C,OAAO,CAAC,gCAAgC,CAAC,eAAe,CAAC,CAU3D,CAAC"}
1
+ {"version":3,"file":"getMultichainBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainBalances/getMultichainBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,gCAAgC,EAChC,+CAA+C,EAChD,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,MAAM,mCAAmC,GAC7C,IAAI,CAAC,gCAAgC,EAAE,iBAAiB,CAAC,GAAG;IAC1D,eAAe,EAAE,KAAK,CACpB,IAAI,CAAC,+CAA+C,EAAE,OAAO,CAAC,GAAG;QAC/D,KAAK,EAAE,KAAK,CAAC;KACd,CACF,CAAC;CACH,CAAC;AAEJ,MAAM,MAAM,2BAA2B,GAAG;IACxC,cAAc,EAAE,mCAAmC,CAAC;CACrD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,uBACZ,2BAA2B,wDAE9C,OAAO,CAAC,gCAAgC,CAAC,eAAe,CAAC,CAW3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { setupCrossTabEventSync } from './setupCrossTabEventSync';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/crossTabEventSync/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { setupCrossTabEventSync } from './setupCrossTabEventSync';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/crossTabEventSync/setupCrossTabEventSync/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { DynamicClient } from '../../../client/types';
2
+ /**
3
+ * Sets up bidirectional event synchronization between the core event emitter
4
+ * and the CrossTabBroadcast service.
5
+ *
6
+ * This enables events fired in one tab to be received in other tabs.
7
+ *
8
+ * **Local → Cross-Tab (Forwarding)**
9
+ * - Listens to specific events on core.eventEmitter
10
+ * - Forwards them to other tabs via core.crossTabBroadcast.send()
11
+ *
12
+ * **Cross-Tab → Local (Receiving)**
13
+ * - Listens to cross-tab events via core.crossTabBroadcast.on()
14
+ * - Emits corresponding "*InAnotherTab" events on core.eventEmitter
15
+ *
16
+ * @param client - The Dynamic client instance
17
+ */
18
+ export declare const setupCrossTabEventSync: (client: DynamicClient) => void;
19
+ //# sourceMappingURL=setupCrossTabEventSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupCrossTabEventSync.d.ts","sourceRoot":"","sources":["../../../../src/modules/crossTabEventSync/setupCrossTabEventSync/setupCrossTabEventSync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,WAAY,aAAa,SAwB3D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';
2
+ type CompleteDeviceRegistrationParams = {
3
+ deviceToken: string;
4
+ };
5
+ export declare const completeDeviceRegistration: ({ deviceToken }: CompleteDeviceRegistrationParams, client?: import("../../../exports").DynamicClient) => Promise<VerifyResponse>;
6
+ export {};
7
+ //# sourceMappingURL=completeDeviceRegistration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completeDeviceRegistration.d.ts","sourceRoot":"","sources":["../../../../src/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAWjE,KAAK,gCAAgC,GAAG;IACtC,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,0BAA0B,oBACpB,gCAAgC,wDAEhD,OAAO,CAAC,cAAc,CAuBxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { completeDeviceRegistration } from './completeDeviceRegistration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/deviceRegistration/completeDeviceRegistration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,21 @@
1
+ declare global {
2
+ interface DynamicEvents {
3
+ /**
4
+ * Fired when device registration completes successfully in the current tab.
5
+ *
6
+ * This event is emitted after the completeDeviceRegistration function
7
+ * successfully registers the device and updates authentication state.
8
+ */
9
+ deviceRegistrationCompleted: () => void;
10
+ /**
11
+ * Fired when device registration completes successfully in another tab.
12
+ *
13
+ * This event is broadcast across tabs using the CrossTabBroadcast service,
14
+ * allowing all tabs to be notified when device registration completes
15
+ * in any tab.
16
+ */
17
+ deviceRegistrationCompletedInAnotherTab: () => void;
18
+ }
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/modules/deviceRegistration/events.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,aAAa;QACrB;;;;;WAKG;QACH,2BAA2B,EAAE,MAAM,IAAI,CAAC;QAExC;;;;;;WAMG;QACH,uCAAuC,EAAE,MAAM,IAAI,CAAC;KACrD;CACF;AAED,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializeClient.d.ts","sourceRoot":"","sources":["../../../src/modules/initializeClient/initializeClient.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,mEAwG5B,CAAC"}
1
+ {"version":3,"file":"initializeClient.d.ts","sourceRoot":"","sources":["../../../src/modules/initializeClient/initializeClient.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,mEA0G5B,CAAC"}
@@ -1,7 +1,8 @@
1
- import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';
1
+ import type { TokenScope, VerifyResponse } from '@dynamic-labs/sdk-api-core';
2
2
  import type { OTPVerification } from '../otp.types';
3
3
  export type VerifyOTPParams = {
4
4
  otpVerification: OTPVerification;
5
+ requestedScopes?: TokenScope[];
5
6
  verificationToken: string;
6
7
  };
7
8
  /**
@@ -15,5 +16,5 @@ export type VerifyOTPParams = {
15
16
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
16
17
  * @returns A promise that resolves to the verify response object upon successful verification.
17
18
  */
18
- export declare const verifyOTP: ({ otpVerification, verificationToken }: VerifyOTPParams, client?: import("../../../exports").DynamicClient) => Promise<VerifyResponse>;
19
+ export declare const verifyOTP: ({ otpVerification, verificationToken, requestedScopes }: VerifyOTPParams, client?: import("../../../exports").DynamicClient) => Promise<VerifyResponse>;
19
20
  //# sourceMappingURL=verifyOTP.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verifyOTP.d.ts","sourceRoot":"","sources":["../../../../src/modules/otp/verifyOTP/verifyOTP.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,2CACoB,eAAe,wDAEtD,OAAO,CAAC,cAAc,CAgBxB,CAAC"}
1
+ {"version":3,"file":"verifyOTP.d.ts","sourceRoot":"","sources":["../../../../src/modules/otp/verifyOTP/verifyOTP.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAI7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,4DACqC,eAAe,wDAEvE,OAAO,CAAC,cAAc,CAqBxB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { DynamicClient } from '../../../../client/types';
2
2
  import type { VerifyOTPParams } from '../verifyOTP';
3
- export declare const verifyOTPForUserUpdate: ({ otpVerification, verificationToken }: VerifyOTPParams, client: DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").UpdateSelfResponse>;
3
+ export declare const verifyOTPForUserUpdate: ({ otpVerification, verificationToken, requestedScopes }: VerifyOTPParams, client: DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").UpdateSelfResponse>;
4
4
  //# sourceMappingURL=verifyOTPForUserUpdate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verifyOTPForUserUpdate.d.ts","sourceRoot":"","sources":["../../../../../src/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,sBAAsB,2CACO,eAAe,UAC/C,aAAa,qEAqBtB,CAAC"}
1
+ {"version":3,"file":"verifyOTPForUserUpdate.d.ts","sourceRoot":"","sources":["../../../../../src/modules/otp/verifyOTP/verifyOTPForUserUpdate/verifyOTPForUserUpdate.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,sBAAsB,4DACwB,eAAe,UAChE,aAAa,qEAwBtB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { DynamicClient } from '../../../client/types';
2
+ type GenerateNonceSignatureParams = {
3
+ nonce: string;
4
+ };
5
+ export declare const generateNonceSignature: ({ nonce }: GenerateNonceSignatureParams, client: DynamicClient) => Promise<{
6
+ signature: string;
7
+ }>;
8
+ export {};
9
+ //# sourceMappingURL=generateNonceSignature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateNonceSignature.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/generateNonceSignature/generateNonceSignature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,sBAAsB,cACtB,4BAA4B,UAC/B,aAAa;;EAatB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { generateNonceSignature } from './generateNonceSignature';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/generateNonceSignature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSignedSessionId.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,eAAO,MAAM,kBAAkB,WAAkB,aAAa;;EAgB7D,CAAC"}
1
+ {"version":3,"file":"getSignedSessionId.d.ts","sourceRoot":"","sources":["../../../../src/modules/sessionKeys/getSignedSessionId/getSignedSessionId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,eAAO,MAAM,kBAAkB,WAAkB,aAAa;;EAkC7D,CAAC"}
@@ -0,0 +1,75 @@
1
+ import type { AssetDiff, PriceData } from '@dynamic-labs/sdk-api-core';
2
+ /**
3
+ * Base transaction fee data structure shared across all chains.
4
+ *
5
+ * Contains fee information in multiple formats for different use cases.
6
+ */
7
+ export type TransactionFeeData = {
8
+ /**
9
+ * Human-readable fee amount in native token units (e.g., "0.001234" ETH)
10
+ */
11
+ humanReadableAmount: string;
12
+ /**
13
+ * Fee amount in native token atomic units (wei for EVM, lamports for Solana, etc.)
14
+ */
15
+ nativeAmount: bigint;
16
+ /**
17
+ * USD equivalent of the fee, if native token price data is available
18
+ */
19
+ usdAmount?: string;
20
+ };
21
+ /**
22
+ * Blockaid security validation result.
23
+ */
24
+ export type BlockaidValidation = {
25
+ /**
26
+ * Detailed description of the validation result
27
+ */
28
+ description?: string;
29
+ /**
30
+ * Reason for the validation result
31
+ */
32
+ reason?: string;
33
+ /**
34
+ * Security validation result status
35
+ */
36
+ result: 'benign' | 'warning' | 'malicious';
37
+ };
38
+ /**
39
+ * Generic transaction simulation result structure shared across all chains.
40
+ *
41
+ * Contains information about asset transfers, security validation, and optional fee data.
42
+ *
43
+ * @template TFeeData - Chain-specific fee data type (e.g., EvmTransactionFeeData)
44
+ */
45
+ export type SimulationResult<TFeeData = unknown> = {
46
+ /**
47
+ * Addresses of other parties involved in the transaction
48
+ */
49
+ counterparties?: string[];
50
+ /**
51
+ * Fee data for the transaction. Only present if includeFees parameter was true.
52
+ */
53
+ feeData?: TFeeData;
54
+ /**
55
+ * Assets being transferred into the wallet
56
+ */
57
+ inAssets: AssetDiff[];
58
+ /**
59
+ * Assets being transferred out of the wallet
60
+ */
61
+ outAssets: AssetDiff[];
62
+ /**
63
+ * Price data for assets involved in the transaction
64
+ */
65
+ priceData: PriceData;
66
+ /**
67
+ * Whether fiat values should be displayed in the UI
68
+ */
69
+ showTotalFiat: boolean;
70
+ /**
71
+ * Security validation result from Blockaid API
72
+ */
73
+ validation?: BlockaidValidation;
74
+ };
75
+ //# sourceMappingURL=simulation.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation.types.d.ts","sourceRoot":"","sources":["../../../src/modules/simulation/simulation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,CAAC,QAAQ,GAAG,OAAO,IAAI;IACjD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hydrateStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,eAAO,MAAM,uBAAuB,WAC1B,aAAa,KACpB,OAAO,CAAC,IAAI,CAsDd,CAAC"}
1
+ {"version":3,"file":"hydrateStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/hydrateStateWithStorage/hydrateStateWithStorage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,eAAO,MAAM,uBAAuB,WAC1B,aAAa,KACpB,OAAO,CAAC,IAAI,CA4Dd,CAAC"}
@@ -13,12 +13,19 @@ export declare const stateStorageKeySchema: import("../../services/storage").Sto
13
13
  type: "ordinals" | "payment" | "cosmos" | "evm" | "ton";
14
14
  publicKey?: string | undefined;
15
15
  }[] | undefined;
16
+ hardwareWalletVendor?: "ledger" | undefined;
16
17
  }[];
17
18
  user: SdkUser | null;
18
19
  walletProviderKeyMap: Record<string, string>;
19
20
  }>;
20
21
  export declare const sessionStorageKeySchema: import("../../services/storage").StorageKeySchema<{
21
22
  captchaToken: string | null;
23
+ elevatedAccessTokens: {
24
+ expiresAt: number;
25
+ scopes: string[];
26
+ singleUse: boolean | null;
27
+ token: string;
28
+ }[];
22
29
  legacyToken: string | null;
23
30
  mfaToken: string | null;
24
31
  sessionExpiration: number;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/storageSync/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;EAShC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;EAmClC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/storageSync/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAO3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAShC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EA2DlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"syncStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/syncStateWithStorage/syncStateWithStorage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,eAAO,MAAM,oBAAoB,WAAY,aAAa,SAyBzD,CAAC"}
1
+ {"version":3,"file":"syncStateWithStorage.d.ts","sourceRoot":"","sources":["../../../../src/modules/storageSync/syncStateWithStorage/syncStateWithStorage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,eAAO,MAAM,oBAAoB,WAAY,aAAa,SAiCzD,CAAC"}
@@ -1,4 +1,6 @@
1
+ import type { HardwareWalletVendor } from '../hardwareWallet/hardwareWallet.types';
1
2
  type ConnectAndVerifyWithWalletProviderParams = {
3
+ hardwareWalletVendor?: HardwareWalletVendor;
2
4
  walletProviderKey: string;
3
5
  };
4
6
  /**
@@ -9,9 +11,10 @@ type ConnectAndVerifyWithWalletProviderParams = {
9
11
  * the wallet account is added to their profile.
10
12
  *
11
13
  * @param params.walletProviderKey - The unique key identifying the wallet provider to connect to.
14
+ * @param [params.hardwareWalletVendor] - The hardware wallet vendor, if connecting via a hardware wallet (e.g. 'ledger').
12
15
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
13
16
  * @returns A promise that resolves to the connected and verified wallet account.
14
17
  */
15
- export declare const connectAndVerifyWithWalletProvider: ({ walletProviderKey }: ConnectAndVerifyWithWalletProviderParams, client?: import("../../../exports").DynamicClient) => Promise<import("../walletAccount").BaseWalletAccount<import("../../chain").Chain>>;
18
+ export declare const connectAndVerifyWithWalletProvider: ({ walletProviderKey, hardwareWalletVendor }: ConnectAndVerifyWithWalletProviderParams, client?: import("../../../exports").DynamicClient) => Promise<import("../walletAccount").BaseWalletAccount<import("../../chain").Chain>>;
16
19
  export {};
17
20
  //# sourceMappingURL=connectAndVerifyWithWalletProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connectAndVerifyWithWalletProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.ts"],"names":[],"mappings":"AAOA,KAAK,wCAAwC,GAAG;IAC9C,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kCAAkC,0BACtB,wCAAwC,0IAiBhE,CAAC"}
1
+ {"version":3,"file":"connectAndVerifyWithWalletProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAGnF,KAAK,wCAAwC,GAAG;IAC9C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC,gDACA,wCAAwC,0IAiBtF,CAAC"}
@@ -1,6 +1,8 @@
1
+ import type { HardwareWalletVendor } from '../hardwareWallet/hardwareWallet.types';
1
2
  import type { WalletAccount } from '../walletAccount';
2
3
  type ConnectWithWalletProviderParams = {
3
4
  addToDynamicWalletAccounts?: boolean;
5
+ hardwareWalletVendor?: HardwareWalletVendor;
4
6
  walletProviderKey: string;
5
7
  };
6
8
  /**
@@ -13,10 +15,11 @@ type ConnectWithWalletProviderParams = {
13
15
  *
14
16
  * @param params.walletProviderKey - The unique key identifying the wallet provider to connect to (e.g. 'metamaskevm', 'phantomsol').
15
17
  * @param [params.addToDynamicWalletAccounts] - Whether to add the connected wallet account to the user's wallet accounts. Defaults to true.
18
+ * @param [params.hardwareWalletVendor] - The hardware wallet vendor, if connecting via a hardware wallet (e.g. 'ledger').
16
19
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
17
20
  * @returns A promise that resolves to the connected wallet account.
18
21
  * @throws NoAddressFoundError If the request to connect was successful but no address is connected to your app.
19
22
  */
20
- export declare const connectWithWalletProvider: ({ walletProviderKey, addToDynamicWalletAccounts, }: ConnectWithWalletProviderParams, client?: import("../../../exports").DynamicClient) => Promise<WalletAccount>;
23
+ export declare const connectWithWalletProvider: ({ walletProviderKey, addToDynamicWalletAccounts, hardwareWalletVendor, }: ConnectWithWalletProviderParams, client?: import("../../../exports").DynamicClient) => Promise<WalletAccount>;
21
24
  export {};
22
25
  //# sourceMappingURL=connectWithWalletProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connectWithWalletProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,KAAK,+BAA+B,GAAG;IACrC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,uDAIjC,+BAA+B,wDAEjC,OAAO,CAAC,aAAa,CA+DvB,CAAC"}
1
+ {"version":3,"file":"connectWithWalletProvider.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAKnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,KAAK,+BAA+B,GAAG;IACrC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,6EAKjC,+BAA+B,wDAEjC,OAAO,CAAC,aAAa,CAgEvB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { HardwareWalletVendor } from '../hardwareWallet.types';
2
+ type CanConnectWithHardwareWalletParams = {
3
+ hardwareWalletVendor: HardwareWalletVendor;
4
+ walletProviderKey: string;
5
+ };
6
+ /**
7
+ * Checks whether a wallet provider supports connecting with a specific hardware wallet vendor.
8
+ *
9
+ * @param params.walletProviderKey - The key of the wallet provider to check.
10
+ * @param params.hardwareWalletVendor - The hardware wallet vendor to check for.
11
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
12
+ * @returns Whether the wallet provider supports the specified hardware wallet vendor.
13
+ */
14
+ export declare const canConnectWithHardwareWallet: ({ walletProviderKey, hardwareWalletVendor, }: CanConnectWithHardwareWalletParams, client?: import("../../../../exports").DynamicClient) => boolean;
15
+ export {};
16
+ //# sourceMappingURL=canConnectWithHardwareWallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canConnectWithHardwareWallet.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/canConnectWithHardwareWallet.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,KAAK,kCAAkC,GAAG;IACxC,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,iDAIpC,kCAAkC,2DAEpC,OAWF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { canConnectWithHardwareWallet } from './canConnectWithHardwareWallet';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { HardwareWalletVendor } from '../hardwareWallet.types';
2
+ type FormatSignatureForHardwareWalletParams = {
3
+ hardwareWalletVendor: HardwareWalletVendor;
4
+ signature: string;
5
+ };
6
+ /**
7
+ * Wraps a raw signature in the JSON format expected by the backend for hardware wallet verification.
8
+ *
9
+ * @param params.hardwareWalletVendor - The hardware wallet vendor that produced the signature.
10
+ * @param params.signature - The raw signature string to wrap.
11
+ * @returns The signature wrapped in `{ signedTransaction: { data } }` JSON format.
12
+ */
13
+ export declare const formatSignatureForHardwareWallet: ({ signature, hardwareWalletVendor: _, }: FormatSignatureForHardwareWalletParams) => string;
14
+ export {};
15
+ //# sourceMappingURL=formatSignatureForHardwareWallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatSignatureForHardwareWallet.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/formatSignatureForHardwareWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,KAAK,sCAAsC,GAAG;IAC5C,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,4CAG1C,sCAAsC,KAAG,MAKxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { formatSignatureForHardwareWallet } from './formatSignatureForHardwareWallet';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/hardwareWallet/formatSignatureForHardwareWallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The vendor of a hardware wallet device.
3
+ */
4
+ export type HardwareWalletVendor = 'ledger';
5
+ //# sourceMappingURL=hardwareWallet.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hardwareWallet.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/wallets/hardwareWallet/hardwareWallet.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { isHardwareWalletAccount } from './isHardwareWalletAccount';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/hardwareWallet/isHardwareWalletAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { WalletAccount } from '../../walletAccount';
2
+ type IsHardwareWalletAccountParams = {
3
+ walletAccount: WalletAccount;
4
+ };
5
+ /**
6
+ * Checks whether a wallet account was connected via a hardware wallet.
7
+ *
8
+ * @param params.walletAccount - The wallet account to check.
9
+ * @returns Whether the wallet account has a hardware wallet vendor set.
10
+ */
11
+ export declare const isHardwareWalletAccount: ({ walletAccount, }: IsHardwareWalletAccountParams) => boolean;
12
+ export {};
13
+ //# sourceMappingURL=isHardwareWalletAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isHardwareWalletAccount.d.ts","sourceRoot":"","sources":["../../../../../src/modules/wallets/hardwareWallet/isHardwareWalletAccount/isHardwareWalletAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,KAAK,6BAA6B,GAAG;IACnC,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,uBAEjC,6BAA6B,KAAG,OACe,CAAC"}