@dynamic-labs-sdk/client 1.3.0 → 1.5.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 (225) hide show
  1. package/dist/{InvalidParamError-DQvZQdQ9.cjs → InvalidParamError-DKJhDrK8.cjs} +1056 -110
  2. package/dist/InvalidParamError-DKJhDrK8.cjs.map +1 -0
  3. package/dist/{InvalidParamError-Za4cvW7K.esm.js → InvalidParamError-DWjMfOZ5.esm.js} +852 -95
  4. package/dist/InvalidParamError-DWjMfOZ5.esm.js.map +1 -0
  5. package/dist/{InvalidParamError-9kQBK3sP.native.esm.js → InvalidParamError-DkAMYJOW.native.esm.js} +885 -95
  6. package/dist/InvalidParamError-DkAMYJOW.native.esm.js.map +1 -0
  7. package/dist/{NotWaasWalletAccountError-By3Y4taq.esm.js → NotWaasWalletAccountError-BVrvQzLz.native.esm.js} +7 -5
  8. package/dist/NotWaasWalletAccountError-BVrvQzLz.native.esm.js.map +1 -0
  9. package/dist/{NotWaasWalletAccountError-BTMvHTA8.native.esm.js → NotWaasWalletAccountError-C7NUlvvM.esm.js} +7 -5
  10. package/dist/NotWaasWalletAccountError-C7NUlvvM.esm.js.map +1 -0
  11. package/dist/{NotWaasWalletAccountError-Ciq7b-Y6.cjs → NotWaasWalletAccountError-CHzpa9kk.cjs} +7 -5
  12. package/dist/NotWaasWalletAccountError-CHzpa9kk.cjs.map +1 -0
  13. package/dist/core.cjs +46 -23
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.esm.js +29 -8
  16. package/dist/core.esm.js.map +1 -1
  17. package/dist/core.native.esm.js +27 -6
  18. package/dist/core.native.esm.js.map +1 -1
  19. package/dist/exports/core.d.ts +6 -0
  20. package/dist/exports/core.d.ts.map +1 -1
  21. package/dist/exports/index.d.ts +14 -1
  22. package/dist/exports/index.d.ts.map +1 -1
  23. package/dist/{getNetworkProviderFromNetworkId-BA0CHZzu.cjs → getNetworkProviderFromNetworkId-BJ27N-7S.cjs} +113 -348
  24. package/dist/getNetworkProviderFromNetworkId-BJ27N-7S.cjs.map +1 -0
  25. package/dist/{getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js → getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js} +106 -311
  26. package/dist/getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js.map +1 -0
  27. package/dist/{getNetworkProviderFromNetworkId-RWcIZDgC.esm.js → getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js} +110 -282
  28. package/dist/getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js.map +1 -0
  29. package/dist/{getSignedSessionId-la6RXITX.esm.js → getSignedSessionId-CDdKrnw6.esm.js} +3 -3
  30. package/dist/{getSignedSessionId-la6RXITX.esm.js.map → getSignedSessionId-CDdKrnw6.esm.js.map} +1 -1
  31. package/dist/{getSignedSessionId-BCU987hO.cjs → getSignedSessionId-CHDHr-hY.cjs} +3 -3
  32. package/dist/{getSignedSessionId-BCU987hO.cjs.map → getSignedSessionId-CHDHr-hY.cjs.map} +1 -1
  33. package/dist/{getSignedSessionId-DzNCj6g_.native.esm.js → getSignedSessionId-D3KQrN8W.native.esm.js} +3 -3
  34. package/dist/{getSignedSessionId-DzNCj6g_.native.esm.js.map → getSignedSessionId-D3KQrN8W.native.esm.js.map} +1 -1
  35. package/dist/getVerifiedCredentialForWalletAccount-BuUCX040.esm.js +269 -0
  36. package/dist/getVerifiedCredentialForWalletAccount-BuUCX040.esm.js.map +1 -0
  37. package/dist/getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js +269 -0
  38. package/dist/getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js.map +1 -0
  39. package/dist/getVerifiedCredentialForWalletAccount-gCx0smU8.cjs +346 -0
  40. package/dist/getVerifiedCredentialForWalletAccount-gCx0smU8.cjs.map +1 -0
  41. package/dist/index.cjs +754 -319
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.esm.js +687 -260
  44. package/dist/index.esm.js.map +1 -1
  45. package/dist/index.native.esm.js +684 -257
  46. package/dist/index.native.esm.js.map +1 -1
  47. package/dist/{isMfaRequiredForAction-C1u4Z__n.esm.js → isMfaRequiredForAction-B0xNvBpU.native.esm.js} +5 -3
  48. package/dist/isMfaRequiredForAction-B0xNvBpU.native.esm.js.map +1 -0
  49. package/dist/{isMfaRequiredForAction-CMClgbT0.cjs → isMfaRequiredForAction-CLMvTTwl.cjs} +5 -3
  50. package/dist/isMfaRequiredForAction-CLMvTTwl.cjs.map +1 -0
  51. package/dist/{isMfaRequiredForAction-DSX-TV2z.native.esm.js → isMfaRequiredForAction-C_QPI1LH.esm.js} +5 -3
  52. package/dist/isMfaRequiredForAction-C_QPI1LH.esm.js.map +1 -0
  53. package/dist/modules/apiClient/apiClient.types.d.ts +12 -0
  54. package/dist/modules/apiClient/apiClient.types.d.ts.map +1 -1
  55. package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
  56. package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts +27 -0
  57. package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts.map +1 -0
  58. package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts +1 -0
  59. package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts.map +1 -1
  60. package/dist/modules/auth/isSignedIn/isSignedIn.d.ts +11 -1
  61. package/dist/modules/auth/isSignedIn/isSignedIn.d.ts.map +1 -1
  62. package/dist/modules/auth/logoutReason.d.ts +1 -1
  63. package/dist/modules/auth/logoutReason.d.ts.map +1 -1
  64. package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -1
  65. package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts +2 -1
  66. package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts.map +1 -1
  67. package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +1 -0
  68. package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts.map +1 -1
  69. package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts +2 -1
  70. package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
  71. package/dist/modules/balances/getBalances/getBalances.d.ts +9 -45
  72. package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
  73. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +13 -20
  74. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts.map +1 -1
  75. package/dist/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.d.ts +26 -0
  76. package/dist/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.d.ts.map +1 -0
  77. package/dist/modules/balances/getMultichainTokenBalances/index.d.ts +2 -0
  78. package/dist/modules/balances/getMultichainTokenBalances/index.d.ts.map +1 -0
  79. package/dist/modules/balances/getTokenBalances/getTokenBalances.d.ts +56 -0
  80. package/dist/modules/balances/getTokenBalances/getTokenBalances.d.ts.map +1 -0
  81. package/dist/modules/balances/getTokenBalances/index.d.ts +3 -0
  82. package/dist/modules/balances/getTokenBalances/index.d.ts.map +1 -0
  83. package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts +2 -1
  84. package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts.map +1 -1
  85. package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts.map +1 -1
  86. package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts +1 -1
  87. package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts.map +1 -1
  88. package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts +1 -1
  89. package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts.map +1 -1
  90. package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
  91. package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts.map +1 -1
  92. package/dist/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.d.ts +22 -0
  93. package/dist/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.d.ts.map +1 -0
  94. package/dist/modules/checkout/utils/clearCheckoutSessionToken/index.d.ts +3 -0
  95. package/dist/modules/checkout/utils/clearCheckoutSessionToken/index.d.ts.map +1 -0
  96. package/dist/modules/checkout/utils/subscribeToCheckoutTransaction/subscribeToCheckoutTransaction.d.ts.map +1 -1
  97. package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/index.d.ts +3 -0
  98. package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/index.d.ts.map +1 -0
  99. package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.d.ts +16 -0
  100. package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.d.ts.map +1 -0
  101. package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
  102. package/dist/modules/funding/moonpay/errors/MoonPayCurrenciesFetchError.d.ts +5 -0
  103. package/dist/modules/funding/moonpay/errors/MoonPayCurrenciesFetchError.d.ts.map +1 -0
  104. package/dist/modules/funding/moonpay/errors/MoonPayInvalidUrlError.d.ts +5 -0
  105. package/dist/modules/funding/moonpay/errors/MoonPayInvalidUrlError.d.ts.map +1 -0
  106. package/dist/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.d.ts +5 -0
  107. package/dist/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.d.ts.map +1 -0
  108. package/dist/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.d.ts +14 -0
  109. package/dist/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.d.ts.map +1 -0
  110. package/dist/modules/funding/moonpay/getMoonPayCurrencies/index.d.ts +2 -0
  111. package/dist/modules/funding/moonpay/getMoonPayCurrencies/index.d.ts.map +1 -0
  112. package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts +15 -0
  113. package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts.map +1 -0
  114. package/dist/modules/funding/moonpay/getMoonPayUrl/index.d.ts +2 -0
  115. package/dist/modules/funding/moonpay/getMoonPayUrl/index.d.ts.map +1 -0
  116. package/dist/modules/funding/moonpay/moonpay.types.d.ts +26 -0
  117. package/dist/modules/funding/moonpay/moonpay.types.d.ts.map +1 -0
  118. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts +12 -0
  119. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts.map +1 -1
  120. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.d.ts +26 -0
  121. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.d.ts.map +1 -0
  122. package/dist/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.d.ts +18 -0
  123. package/dist/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.d.ts.map +1 -0
  124. package/dist/modules/legacyWalletBook/legacyWalletBook.types.d.ts +2 -2
  125. package/dist/modules/legacyWalletBook/legacyWalletBook.types.d.ts.map +1 -1
  126. package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts +2 -1
  127. package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts.map +1 -1
  128. package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts +2 -1
  129. package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts.map +1 -1
  130. package/dist/modules/otp/verifyOTP/verifyOTP.d.ts +2 -1
  131. package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
  132. package/dist/modules/swap/executeSwapTransaction/executeSwapTransaction.d.ts +13 -1
  133. package/dist/modules/swap/executeSwapTransaction/executeSwapTransaction.d.ts.map +1 -1
  134. package/dist/modules/user/refreshAuth/refreshAuth.d.ts +2 -1
  135. package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
  136. package/dist/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.d.ts +27 -0
  137. package/dist/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.d.ts.map +1 -0
  138. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +8 -5
  139. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -1
  140. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +11 -4
  141. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -1
  142. package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts.map +1 -1
  143. package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts.map +1 -1
  144. package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.d.ts +35 -0
  145. package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.d.ts.map +1 -0
  146. package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/index.d.ts +2 -0
  147. package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/index.d.ts.map +1 -0
  148. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +9 -14
  149. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -1
  150. package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +1 -1
  151. package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +1 -1
  152. package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +1 -1
  153. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +34 -35
  154. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
  155. package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts +1 -1
  156. package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts.map +1 -1
  157. package/dist/modules/wallets/constants.d.ts +7 -0
  158. package/dist/modules/wallets/constants.d.ts.map +1 -1
  159. package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts.map +1 -1
  160. package/dist/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.d.ts +26 -0
  161. package/dist/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.d.ts.map +1 -0
  162. package/dist/modules/wallets/hasWalletProviderConnectMethod/index.d.ts +2 -0
  163. package/dist/modules/wallets/hasWalletProviderConnectMethod/index.d.ts.map +1 -0
  164. package/dist/modules/wallets/isAnyWalletAccountConnected/index.d.ts +2 -0
  165. package/dist/modules/wallets/isAnyWalletAccountConnected/index.d.ts.map +1 -0
  166. package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts +14 -0
  167. package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts.map +1 -0
  168. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +6 -17
  169. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
  170. package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts +24 -0
  171. package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts.map +1 -0
  172. package/dist/modules/wallets/networks/getNativeBalance/index.d.ts +2 -0
  173. package/dist/modules/wallets/networks/getNativeBalance/index.d.ts.map +1 -0
  174. package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/index.d.ts +2 -0
  175. package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/index.d.ts.map +1 -0
  176. package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.d.ts +25 -0
  177. package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.d.ts.map +1 -0
  178. package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts +10 -0
  179. package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
  180. package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
  181. package/dist/services/instrumentation/constants.d.ts +22 -0
  182. package/dist/services/instrumentation/constants.d.ts.map +1 -1
  183. package/dist/services/instrumentation/scrubParameters/scrubParameters.d.ts.map +1 -1
  184. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  185. package/dist/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.d.ts +29 -0
  186. package/dist/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.d.ts.map +1 -0
  187. package/dist/utils/appendConnectionUriToDeeplink/index.d.ts +2 -0
  188. package/dist/utils/appendConnectionUriToDeeplink/index.d.ts.map +1 -0
  189. package/dist/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.d.ts +22 -0
  190. package/dist/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.d.ts.map +1 -0
  191. package/dist/utils/getChainFromWalletBookIdentifier/index.d.ts +2 -0
  192. package/dist/utils/getChainFromWalletBookIdentifier/index.d.ts.map +1 -0
  193. package/dist/utils/getNativeLinkScheme/getNativeLinkScheme.d.ts +18 -0
  194. package/dist/utils/getNativeLinkScheme/getNativeLinkScheme.d.ts.map +1 -0
  195. package/dist/utils/getNativeLinkScheme/index.d.ts +3 -0
  196. package/dist/utils/getNativeLinkScheme/index.d.ts.map +1 -0
  197. package/dist/utils/isMobile/isMobile.d.ts +8 -0
  198. package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
  199. package/dist/waas.cjs +8 -9
  200. package/dist/waas.cjs.map +1 -1
  201. package/dist/waas.esm.js +3 -3
  202. package/dist/waas.native.esm.js +3 -3
  203. package/dist/waasCore.cjs +3 -4
  204. package/dist/waasCore.cjs.map +1 -1
  205. package/dist/waasCore.esm.js +3 -3
  206. package/dist/waasCore.native.esm.js +3 -3
  207. package/package.json +4 -4
  208. package/dist/InvalidParamError-9kQBK3sP.native.esm.js.map +0 -1
  209. package/dist/InvalidParamError-DQvZQdQ9.cjs.map +0 -1
  210. package/dist/InvalidParamError-Za4cvW7K.esm.js.map +0 -1
  211. package/dist/NotWaasWalletAccountError-BTMvHTA8.native.esm.js.map +0 -1
  212. package/dist/NotWaasWalletAccountError-By3Y4taq.esm.js.map +0 -1
  213. package/dist/NotWaasWalletAccountError-Ciq7b-Y6.cjs.map +0 -1
  214. package/dist/getNetworkProviderFromNetworkId-BA0CHZzu.cjs.map +0 -1
  215. package/dist/getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js.map +0 -1
  216. package/dist/getNetworkProviderFromNetworkId-RWcIZDgC.esm.js.map +0 -1
  217. package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js +0 -701
  218. package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js.map +0 -1
  219. package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs +0 -887
  220. package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs.map +0 -1
  221. package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js +0 -701
  222. package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js.map +0 -1
  223. package/dist/isMfaRequiredForAction-C1u4Z__n.esm.js.map +0 -1
  224. package/dist/isMfaRequiredForAction-CMClgbT0.cjs.map +0 -1
  225. package/dist/isMfaRequiredForAction-DSX-TV2z.native.esm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-Za4cvW7K.esm.js";
1
+ import { $ as instrumentFunction, X as assertDefined, c as createApiClient, ct as getDefaultClient, ft as getCore } from "./InvalidParamError-DkAMYJOW.native.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -11,6 +11,7 @@ import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w
11
11
  * @returns The MFA token that was consumed.
12
12
  * @throws Error if no MFA token is found.
13
13
  * @instrumented
14
+ * @redact-params
14
15
  */
15
16
  const consumeMfaToken = (client = getDefaultClient()) => {
16
17
  const core = getCore(client);
@@ -29,7 +30,8 @@ const __consumeMfaToken_wrapped = instrumentFunction({
29
30
  } catch {
30
31
  return;
31
32
  }
32
- }
33
+ },
34
+ redactAll: true
33
35
  });
34
36
 
35
37
  //#endregion
@@ -74,4 +76,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
74
76
 
75
77
  //#endregion
76
78
  export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
77
- //# sourceMappingURL=isMfaRequiredForAction-C1u4Z__n.esm.js.map
79
+ //# sourceMappingURL=isMfaRequiredForAction-B0xNvBpU.native.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMfaRequiredForAction-B0xNvBpU.native.esm.js","names":[],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @not-instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
@@ -1,4 +1,4 @@
1
- const require_InvalidParamError = require('./InvalidParamError-DQvZQdQ9.cjs');
1
+ const require_InvalidParamError = require('./InvalidParamError-DKJhDrK8.cjs');
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -11,6 +11,7 @@ const require_InvalidParamError = require('./InvalidParamError-DQvZQdQ9.cjs');
11
11
  * @returns The MFA token that was consumed.
12
12
  * @throws Error if no MFA token is found.
13
13
  * @instrumented
14
+ * @redact-params
14
15
  */
15
16
  const consumeMfaToken = (client = require_InvalidParamError.getDefaultClient()) => {
16
17
  const core = require_InvalidParamError.getCore(client);
@@ -29,7 +30,8 @@ const __consumeMfaToken_wrapped = require_InvalidParamError.instrumentFunction({
29
30
  } catch {
30
31
  return;
31
32
  }
32
- }
33
+ },
34
+ redactAll: true
33
35
  });
34
36
 
35
37
  //#endregion
@@ -91,4 +93,4 @@ Object.defineProperty(exports, 'isMfaRequiredForAction', {
91
93
  return isMfaRequiredForAction;
92
94
  }
93
95
  });
94
- //# sourceMappingURL=isMfaRequiredForAction-CMClgbT0.cjs.map
96
+ //# sourceMappingURL=isMfaRequiredForAction-CLMvTTwl.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMfaRequiredForAction-CLMvTTwl.cjs","names":["getDefaultClient","getCore","createApiClient","getDefaultClient"],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @not-instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAE,mBAAsB,SAAU,4CAAU,KAAA;;;AAK1C,yCAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,MAAa,gBAAgB,OAAO,SAASA,4CAAkB,KAAK;CAClE,MAAM,OAAOC,kCAAQ,OAAO;AAQ5B,QALuB,MAFLC,0CAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAASC,4CAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
@@ -1,4 +1,4 @@
1
- import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w as assertDefined, z as getCore } from "./InvalidParamError-9kQBK3sP.native.esm.js";
1
+ import { Q as instrumentFunction, Y as assertDefined, c as createApiClient, dt as getCore, st as getDefaultClient } from "./InvalidParamError-DWjMfOZ5.esm.js";
2
2
 
3
3
  //#region src/modules/mfa/consumeMfaToken/consumeMfaToken.ts
4
4
  /**
@@ -11,6 +11,7 @@ import { D as instrumentFunction, F as getDefaultClient, u as createApiClient, w
11
11
  * @returns The MFA token that was consumed.
12
12
  * @throws Error if no MFA token is found.
13
13
  * @instrumented
14
+ * @redact-params
14
15
  */
15
16
  const consumeMfaToken = (client = getDefaultClient()) => {
16
17
  const core = getCore(client);
@@ -29,7 +30,8 @@ const __consumeMfaToken_wrapped = instrumentFunction({
29
30
  } catch {
30
31
  return;
31
32
  }
32
- }
33
+ },
34
+ redactAll: true
33
35
  });
34
36
 
35
37
  //#endregion
@@ -74,4 +76,4 @@ const isMfaRequiredForAction = async ({ mfaAction }, client = getDefaultClient()
74
76
 
75
77
  //#endregion
76
78
  export { getMfaMethods as n, __consumeMfaToken_wrapped as r, isMfaRequiredForAction as t };
77
- //# sourceMappingURL=isMfaRequiredForAction-DSX-TV2z.native.esm.js.map
79
+ //# sourceMappingURL=isMfaRequiredForAction-C_QPI1LH.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMfaRequiredForAction-C_QPI1LH.esm.js","names":[],"sources":["../src/modules/mfa/consumeMfaToken/consumeMfaToken.ts","../src/modules/mfa/getMfaMethods/getMfaMethods.ts","../src/modules/mfa/isMfaRequiredForAction/isMfaRequiredForAction.ts"],"sourcesContent":["import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Consumes and clears the current MFA token from the client state.\n *\n * This function retrieves the MFA token obtained from a successful MFA authentication,\n * and removes it from the client, to prevent it from being used again.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns The MFA token that was consumed.\n * @throws Error if no MFA token is found.\n * @instrumented\n * @redact-params\n */\nexport const consumeMfaToken = (client = getDefaultClient()) => {\n const core = getCore(client);\n\n const mfaToken = core.state.get().mfaToken;\n\n assertDefined(mfaToken, 'No MFA token found');\n\n core.state.set({\n mfaToken: null,\n });\n\n return mfaToken;\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { createApiClient } from '../../apiClient';\n\n/**\n * Retrieves the available MFA methods for the current user.\n *\n * This function fetches information about which multi-factor authentication\n * methods are available and configured for the user's account.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to the user's MFA methods configuration.\n * @not-instrumented\n */\nexport const getMfaMethods = async (client = getDefaultClient()) => {\n const core = getCore(client);\n const apiClient = createApiClient({}, client);\n\n const userMfaMethods = await apiClient.getUserMfaMethods({\n environmentId: core.environmentId,\n verifiedOnly: true,\n });\n\n return userMfaMethods;\n};\n","import type { MFAAction } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { getMfaMethods } from '../getMfaMethods';\n\ntype IsMfaRequiredForActionParams = {\n mfaAction: MFAAction;\n};\n\n/**\n * Checks if MFA is required for a specific action.\n *\n * This function determines whether multi-factor authentication is required\n * for the specified action based on project settings and user configuration.\n *\n * @param params.mfaAction - The action to check MFA requirements for.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise that resolves to true if MFA is required for the action, false otherwise.\n * @not-instrumented\n */\nexport const isMfaRequiredForAction = async (\n { mfaAction }: IsMfaRequiredForActionParams,\n client = getDefaultClient()\n) => {\n const projectSettings = client.projectSettings;\n\n const isRequiredForAction = projectSettings?.security?.mfa?.actions?.some(\n (action) => action.action === mfaAction && action.required\n );\n\n // if mfa is not required for the action, return false\n // no matter if general mfa is set to required or not\n if (!isRequiredForAction) {\n return false;\n }\n\n const isMfaMethodRequired = projectSettings?.security?.mfa?.required;\n\n // if mfa is required for the action and also set as required in general, return true\n if (isMfaMethodRequired) {\n return true;\n }\n\n const mfaMethods = await getMfaMethods(client);\n // if general mfa is optional, but user has registered methods,\n // then it should be required for the action\n return mfaMethods.userHasVerifiedMfaMethods;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAE,mBAAsB,SAAU,kBAAU,KAAA;;;AAK1C,eAAY,UAAI,qBAAA;kBAGhB,UAAO,MACR,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdD,MAAa,gBAAgB,OAAO,SAAS,kBAAkB,KAAK;CAClE,MAAM,OAAO,QAAQ,OAAO;AAQ5B,QALuB,MAFL,gBAAgB,EAAE,EAAE,OAAO,CAEN,kBAAkB;EACvD,eAAe,KAAK;EACpB,cAAc;EACf,CAAC;;;;;;;;;;;;;;;;ACDJ,MAAa,yBAAyB,OACpC,EAAE,aACF,SAAS,kBAAkB,KACxB;CACH,MAAM,kBAAkB,OAAO;AAQ/B,KAAI,CANwB,iBAAiB,UAAU,KAAK,SAAS,MAClE,WAAW,OAAO,WAAW,aAAa,OAAO,SACnD,CAKC,QAAO;AAMT,KAH4B,iBAAiB,UAAU,KAAK,SAI1D,QAAO;AAMT,SAHmB,MAAM,cAAc,OAAO,EAG5B"}
@@ -48,5 +48,17 @@ export type CreateApiClientOptions = {
48
48
  * @default false
49
49
  */
50
50
  includeMfaToken?: boolean;
51
+ /**
52
+ * When `true`, omits the session-expiry middleware so a 401 on this request
53
+ * does not trigger an automatic logout.
54
+ *
55
+ * Set this for endpoints that legitimately return 401 for non-session
56
+ * reasons (e.g. probing whether devices are registered), and for the
57
+ * session-revocation call made during logout itself, to avoid re-entering
58
+ * logout.
59
+ *
60
+ * @default false
61
+ */
62
+ skipSessionExpiryLogout?: boolean;
51
63
  };
52
64
  //# sourceMappingURL=apiClient.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apiClient.types.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/apiClient.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,GAAG,IAAI,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,UAAU,CAAC;IAEtC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"apiClient.types.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/apiClient.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,GAAG,IAAI,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,UAAU,CAAC;IAEtC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;;;;;;OAUG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAiChE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YACjB,sBAAsB,sBACvB,aAAa,WAqEtB,CAAC"}
1
+ {"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAkChE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YACjB,sBAAsB,sBACvB,aAAa,WA0EtB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { Middleware } from '@dynamic-labs/sdk-api-core';
2
+ import type { DynamicClient } from '../../../../client/types';
3
+ /**
4
+ * Creates middleware that ends the local session when an *authenticated*
5
+ * request is rejected with a 401.
6
+ *
7
+ * A 401 on a request that carried an authenticated session means the backend
8
+ * rejected our credentials, so the local session is stale and must be cleared.
9
+ * The check is purely local (`client.user`) — we deliberately do not
10
+ * re-validate over the network, because the 401 itself is the rejection signal
11
+ * and re-validating would route back through this same middleware.
12
+ *
13
+ * Requests made without an authenticated session (e.g. pre-auth probes) are
14
+ * ignored — there is no session to invalidate. Endpoints that legitimately
15
+ * return 401 for non-session reasons opt out of this behavior by omitting the
16
+ * middleware (see `skipSessionExpiryLogout` on `createApiClient`).
17
+ *
18
+ * This middleware runs before the error-conversion middleware so it observes
19
+ * every 401 regardless of response body. The logout is fired as a side effect
20
+ * and the response is returned unchanged, so the downstream error middleware
21
+ * still throws the typed error to the caller.
22
+ *
23
+ * @param client - The Dynamic client instance.
24
+ * @not-instrumented
25
+ */
26
+ export declare const createSessionExpiryLogoutMiddleware: (client: DynamicClient) => Middleware;
27
+ //# sourceMappingURL=createSessionExpiryLogoutMiddleware.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSessionExpiryLogoutMiddleware.d.ts","sourceRoot":"","sources":["../../../../../src/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,4BAA4B,CAAC;AAG9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAK9D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mCAAmC,WACtC,aAAa,KACpB,UAsBD,CAAC"}
@@ -15,6 +15,7 @@ type RequestExternalAuthElevatedTokenParams = {
15
15
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
16
16
  * @returns A promise that resolves to the assertion response containing the elevated access token.
17
17
  * @instrumented
18
+ * @redact-params
18
19
  */
19
20
  export declare const requestExternalAuthElevatedToken: ({ externalJwt }: RequestExternalAuthElevatedTokenParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").ExternalAuthAssertionResponse>;
20
21
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"requestExternalAuthElevatedToken.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts"],"names":[],"mappings":"AAMA,KAAK,sCAAsC,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,oBAC1B,sCAAsC,sIA2BxD,CAAC"}
1
+ {"version":3,"file":"requestExternalAuthElevatedToken.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.ts"],"names":[],"mappings":"AAMA,KAAK,sCAAsC,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gCAAgC,oBAC1B,sCAAsC,sIA2BxD,CAAC"}
@@ -4,9 +4,19 @@
4
4
  * The client is considered to be in a signed in state if a user has
5
5
  * authenticated or if the client has at least one wallet connected.
6
6
  *
7
+ * @deprecated What counts as "signed in" is your app's business logic, not the
8
+ * SDK's. This helper bakes in one opinion (a user OR any connected wallet),
9
+ * which rarely matches every app and forces a dependency on us for every
10
+ * variation. Compose your own check from the underlying primitives instead —
11
+ * e.g. `Boolean(client.user) || isAnyWalletAccountConnected(client)` — and
12
+ * layer in whatever your app requires (device registration, completed
13
+ * onboarding, satisfied MFA, a required embedded wallet, …). See the
14
+ * "Check if signed in" guide:
15
+ * https://www.dynamic.xyz/docs/javascript/user-session-management
16
+ *
7
17
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
8
18
  * @returns True if the user is signed in, false otherwise.
9
- * @not-instrumented
19
+ * @not-instrumented
10
20
  */
11
21
  export declare const isSignedIn: (client?: import("../../../exports").DynamicClient) => boolean;
12
22
  //# sourceMappingURL=isSignedIn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isSignedIn.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/isSignedIn/isSignedIn.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,gEACuC,CAAC"}
1
+ {"version":3,"file":"isSignedIn.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/isSignedIn/isSignedIn.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,gEACuC,CAAC"}
@@ -4,5 +4,5 @@
4
4
  * Surfaced in Datadog logout events so we can understand why users are being
5
5
  * signed out.
6
6
  */
7
- export type LogoutReason = 'user-intent' | 'token-expired' | 'keychain-migration-failed' | 'keychain-key-missing' | 'session-refresh-unauthorized' | 'user-refresh-failed' | 'user-deleted' | 'device-revoked' | 'all-devices-revoked';
7
+ export type LogoutReason = 'user-intent' | 'token-expired' | 'keychain-migration-failed' | 'keychain-key-missing' | 'session-refresh-unauthorized' | 'session-revoked' | 'user-refresh-failed' | 'user-deleted' | 'device-revoked' | 'all-devices-revoked';
8
8
  //# sourceMappingURL=logoutReason.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,eAAe,GACf,2BAA2B,GAC3B,sBAAsB,GACtB,8BAA8B,GAC9B,qBAAqB,GACrB,cAAc,GACd,gBAAgB,GAChB,qBAAqB,CAAC"}
1
+ {"version":3,"file":"logoutReason.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/logoutReason.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,eAAe,GACf,2BAA2B,GAC3B,sBAAsB,GACtB,8BAA8B,GAC9B,iBAAiB,GACjB,qBAAqB,GACrB,cAAc,GACd,gBAAgB,GAChB,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"logoutWithReason.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/logoutWithReason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,eACf;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,UAC5B,aAAa,kBAmDtB,CAAC"}
1
+ {"version":3,"file":"logoutWithReason.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logoutWithReason/logoutWithReason.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,eACf;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,UAC5B,aAAa,kBAqDtB,CAAC"}
@@ -13,7 +13,8 @@ type RegisterPasskeyParams = {
13
13
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
14
14
  * @returns A promise that resolves to the registration response.
15
15
  * @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
16
- * @instrumented
16
+ * @instrumented
17
+ * @redact-params
17
18
  */
18
19
  export declare const registerPasskey: ({ createMfaToken }?: RegisterPasskeyParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").VerifyResponse>;
19
20
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"registerPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/registerPasskey/registerPasskey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAUjE,KAAK,qBAAqB,GAAG;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,wBACN,qBAAqB,uHAuB1C,CAAC"}
1
+ {"version":3,"file":"registerPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/registerPasskey/registerPasskey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAUjE,KAAK,qBAAqB,GAAG;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,wBACN,qBAAqB,uHAuB1C,CAAC"}
@@ -12,6 +12,7 @@ export type SignInWithPasskeyParams = {
12
12
  * @returns A promise that resolves to the authentication response.
13
13
  * @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
14
14
  * @instrumented
15
+ * @redact-params
15
16
  */
16
17
  export declare const signInWithPasskey: ({ relatedOriginRpId }?: SignInWithPasskeyParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").VerifyResponse>;
17
18
  //# sourceMappingURL=signInWithPasskey.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signInWithPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,2BACL,uBAAuB,uHA0B/C,CAAC"}
1
+ {"version":3,"file":"signInWithPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,2BACL,uBAAuB,uHA0B/C,CAAC"}
@@ -8,7 +8,8 @@ type UnlinkSocialAccountParams = {
8
8
  * @param params.verifiedCredentialId - The verified credential ID of the social account to unlink.
9
9
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
10
10
  * @returns A promise that resolves to the verify response.
11
- * @instrumented
11
+ * @instrumented
12
+ * @redact-params
12
13
  */
13
14
  export declare const unlinkSocialAccount: ({ verifiedCredentialId }: UnlinkSocialAccountParams, client?: import("../../../../../exports").DynamicClient) => Promise<VerifyResponse>;
14
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"unlinkSocialAccount.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAQjE,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,6BACJ,yBAAyB,8DAElD,OAAO,CAAC,cAAc,CAuBxB,CAAC"}
1
+ {"version":3,"file":"unlinkSocialAccount.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAQjE,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,6BACJ,yBAAyB,8DAElD,OAAO,CAAC,cAAc,CAuBxB,CAAC"}
@@ -1,49 +1,13 @@
1
- import type { TokenBalance } from '@dynamic-labs/sdk-api-core';
2
- import type { WalletAccount } from '../../wallets/walletAccount';
3
- type GetBalancesBaseParams = {
4
- /**
5
- * Whether to filter out spam tokens.
6
- * Defaults to true.
7
- * @not-instrumented
8
- */
9
- filterSpamTokens?: boolean;
10
- /** Whether to force a refresh of the balances instead of using the api cached value. */
11
- forceRefresh?: boolean;
12
- /** Whether to include the native token balance. */
13
- includeNative?: boolean;
14
- /** Whether to include the prices of the tokens. */
15
- includePrices?: boolean;
16
- /** The wallet account to get the balances for. */
17
- walletAccount: WalletAccount;
18
- /** If provided, only return balances for the specified contracts. */
19
- whitelistedContracts?: Array<string>;
20
- };
21
- export type GetBalancesParams = GetBalancesBaseParams & ({
22
- /**
23
- * The network ID to get the balances for.
24
- * If neither `networkId` nor `networkIds` is provided, the active network ID will be used.
25
- * Mutually exclusive with `networkIds`.
26
- */
27
- networkId?: number;
28
- networkIds?: never;
29
- } | {
30
- networkId?: never;
31
- /**
32
- * The network IDs to get the balances for.
33
- * Mutually exclusive with `networkId`.
34
- */
35
- networkIds?: string[];
36
- });
37
1
  /**
38
- * Retrieves the token balances for a wallet account.
39
- *
40
- * This function fetches the balances of the tokens for the specified wallet account.
41
- *
42
- * @param params.walletAccount - The wallet account to get the balances for.
43
- * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
44
- * @returns A promise that resolves to an array of token balances.
2
+ * @deprecated Use {@link GetTokenBalancesParams} instead. Renamed for clarity.
3
+ */
4
+ export type { GetTokenBalancesParams as GetBalancesParams } from '../getTokenBalances/getTokenBalances';
5
+ /**
6
+ * @deprecated Use {@link getTokenBalances} instead. Renamed so its name
7
+ * states what it returns (a wallet account's token balances) and is no
8
+ * longer confusable with the native-only `getBalance` or the
9
+ * multi-chain `getMultichainTokenBalances`.
45
10
  * @not-instrumented
46
11
  */
47
- export declare const getBalances: ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh, }: GetBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<TokenBalance[]>;
48
- export {};
12
+ export { getTokenBalances as getBalances } from '../getTokenBalances/getTokenBalances';
49
13
  //# sourceMappingURL=getBalances.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getBalances/getBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,KAAK,qBAAqB,GAAG;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wFAAwF;IACxF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GACnD,CACI;IACE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CACJ,CAAC;AAEJ;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,kIAUnB,iBAAiB,wDAEnB,OAAO,CAAC,YAAY,EAAE,CA8BxB,CAAC"}
1
+ {"version":3,"file":"getBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getBalances/getBalances.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,sBAAsB,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAExG;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,IAAI,WAAW,EAAE,MAAM,sCAAsC,CAAC"}
@@ -1,23 +1,16 @@
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
- };
8
- export type GetMultichainBalancesParams = {
9
- balanceRequest: GetMultichainBalancesBalanceRequest;
10
- };
11
1
  /**
12
- * Retrieves token balances across multiple blockchain networks.
13
- *
14
- * This function fetches cryptocurrency and token balances for the user's
15
- * wallet addresses across different chains, networks and addresses specified in the request.
16
- *
17
- * @param params.balanceRequest - The balance request configuration specifying which chains, networks and addresses to query.
18
- * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
19
- * @returns A promise that resolves to the chain balances across multiple networks.
20
- * @not-instrumented
2
+ * @deprecated Use {@link GetMultichainTokenBalancesBalanceRequest} instead. Renamed for clarity.
21
3
  */
22
- export declare const getMultichainBalances: ({ balanceRequest }: GetMultichainBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<MultichainAccountBalanceResponse["chainBalances"]>;
4
+ export type { GetMultichainTokenBalancesBalanceRequest as GetMultichainBalancesBalanceRequest } from '../getMultichainTokenBalances/getMultichainTokenBalances';
5
+ /**
6
+ * @deprecated Use {@link GetMultichainTokenBalancesParams} instead. Renamed for clarity.
7
+ */
8
+ export type { GetMultichainTokenBalancesParams as GetMultichainBalancesParams } from '../getMultichainTokenBalances/getMultichainTokenBalances';
9
+ /**
10
+ * @deprecated Use {@link getMultichainTokenBalances} instead. Renamed so
11
+ * the name aligns with `getTokenBalances` and signals that this fetches
12
+ * token balances (not native-only) across multiple chains.
13
+ * @not-instrumented
14
+ */
15
+ export { getMultichainTokenBalances as getMultichainBalances } from '../getMultichainTokenBalances/getMultichainTokenBalances';
23
16
  //# sourceMappingURL=getMultichainBalances.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMultichainBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainBalances/getMultichainBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,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;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,uBACZ,2BAA2B,wDAE9C,OAAO,CAAC,gCAAgC,CAAC,eAAe,CAAC,CAW3D,CAAC"}
1
+ {"version":3,"file":"getMultichainBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainBalances/getMultichainBalances.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,wCAAwC,IAAI,mCAAmC,EAAE,MAAM,0DAA0D,CAAC;AAEhK;;GAEG;AACH,YAAY,EAAE,gCAAgC,IAAI,2BAA2B,EAAE,MAAM,0DAA0D,CAAC;AAEhJ;;;;;GAKG;AACH,OAAO,EAAE,0BAA0B,IAAI,qBAAqB,EAAE,MAAM,0DAA0D,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { MultichainAccountBalanceResponse, MultichainAccountBalancesRequest, MultichainAccountBalancesRequestBalanceRequests } from '@dynamic-labs/sdk-api-core';
2
+ import type { Chain } from '../../chain/chain.types';
3
+ export type GetMultichainTokenBalancesBalanceRequest = Omit<MultichainAccountBalancesRequest, 'balanceRequests'> & {
4
+ balanceRequests: Array<Omit<MultichainAccountBalancesRequestBalanceRequests, 'chain'> & {
5
+ chain: Chain;
6
+ }>;
7
+ };
8
+ export type GetMultichainTokenBalancesParams = {
9
+ balanceRequest: GetMultichainTokenBalancesBalanceRequest;
10
+ };
11
+ /**
12
+ * Retrieves token balances across multiple chains, networks, and addresses
13
+ * in a single batched API request.
14
+ *
15
+ * Use this for portfolio-style views that need to render a user's holdings
16
+ * across their entire multi-chain wallet set. For a single account on one
17
+ * chain, use {@link getTokenBalances}; for native-only balance, use
18
+ * {@link getNativeBalance}.
19
+ *
20
+ * @param params.balanceRequest - The balance request configuration specifying which chains, networks and addresses to query.
21
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
22
+ * @returns A promise that resolves to the chain balances across multiple networks.
23
+ * @not-instrumented
24
+ */
25
+ export declare const getMultichainTokenBalances: ({ balanceRequest }: GetMultichainTokenBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<MultichainAccountBalanceResponse["chainBalances"]>;
26
+ //# sourceMappingURL=getMultichainTokenBalances.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMultichainTokenBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.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,wCAAwC,GAClD,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,gCAAgC,GAAG;IAC7C,cAAc,EAAE,wCAAwC,CAAC;CAC1D,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,uBACjB,gCAAgC,wDAEnD,OAAO,CAAC,gCAAgC,CAAC,eAAe,CAAC,CAW3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getMultichainTokenBalances, type GetMultichainTokenBalancesParams, } from './getMultichainTokenBalances';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getMultichainTokenBalances/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,KAAK,gCAAgC,GACtC,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,56 @@
1
+ import type { TokenBalance } from '@dynamic-labs/sdk-api-core';
2
+ import type { WalletAccount } from '../../wallets/walletAccount';
3
+ type GetTokenBalancesBaseParams = {
4
+ /**
5
+ * Whether to filter out spam tokens.
6
+ * Defaults to true.
7
+ * @not-instrumented
8
+ */
9
+ filterSpamTokens?: boolean;
10
+ /** Whether to force a refresh of the balances instead of using the api cached value. */
11
+ forceRefresh?: boolean;
12
+ /** Whether to include the native token balance. */
13
+ includeNative?: boolean;
14
+ /** Whether to include the prices of the tokens. */
15
+ includePrices?: boolean;
16
+ /** The wallet account to get the balances for. */
17
+ walletAccount: WalletAccount;
18
+ /** If provided, only return balances for the specified contracts. */
19
+ whitelistedContracts?: Array<string>;
20
+ };
21
+ export type GetTokenBalancesParams = GetTokenBalancesBaseParams & ({
22
+ /**
23
+ * The network ID to get the balances for.
24
+ * If neither `networkId` nor `networkIds` is provided, the active network ID will be used.
25
+ * Mutually exclusive with `networkIds`.
26
+ */
27
+ networkId?: number;
28
+ networkIds?: never;
29
+ } | {
30
+ networkId?: never;
31
+ /**
32
+ * The network IDs to get the balances for.
33
+ * Mutually exclusive with `networkId`.
34
+ */
35
+ networkIds?: string[];
36
+ });
37
+ /**
38
+ * Retrieves the token balances for a wallet account on one chain. Fetched
39
+ * from the Dynamic API.
40
+ *
41
+ * Use this for ERC-20-style token balances scoped to a single wallet
42
+ * account. Supports optional spam filtering, price inclusion, native-token
43
+ * inclusion, and one-or-many networks within the wallet's chain.
44
+ *
45
+ * For native-only balance, use {@link getNativeBalance}. For a
46
+ * multi-chain portfolio across many addresses, use
47
+ * {@link getMultichainTokenBalances}.
48
+ *
49
+ * @param params.walletAccount - The wallet account to get the balances for.
50
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
51
+ * @returns A promise that resolves to an array of token balances.
52
+ * @not-instrumented
53
+ */
54
+ export declare const getTokenBalances: ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh, }: GetTokenBalancesParams, client?: import("../../../exports").DynamicClient) => Promise<TokenBalance[]>;
55
+ export {};
56
+ //# sourceMappingURL=getTokenBalances.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTokenBalances.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getTokenBalances/getTokenBalances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,KAAK,0BAA0B,GAAG;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wFAAwF;IACxF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,aAAa,EAAE,aAAa,CAAC;IAC7B,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,GAC7D,CACI;IACE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,GACD;IACE,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CACJ,CAAC;AAEJ;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,kIAUxB,sBAAsB,wDAExB,OAAO,CAAC,YAAY,EAAE,CA8BxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { getTokenBalances } from './getTokenBalances';
2
+ export type { GetTokenBalancesParams } from './getTokenBalances';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/balances/getTokenBalances/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -6,7 +6,8 @@ type SetCaptchaTokenProps = {
6
6
  *
7
7
  * @param params.captchaToken - The captcha token to set.
8
8
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9
- * @instrumented
9
+ * @instrumented
10
+ * @redact-params
10
11
  */
11
12
  export declare const setCaptchaToken: ({ captchaToken }: SetCaptchaTokenProps, client?: import("../../../exports").DynamicClient) => void;
12
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"setCaptchaToken.d.ts","sourceRoot":"","sources":["../../../../src/modules/captcha/setCaptchaToken/setCaptchaToken.ts"],"names":[],"mappings":"AAGA,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,qBACR,oBAAoB,4DAQvC,CAAC"}
1
+ {"version":3,"file":"setCaptchaToken.d.ts","sourceRoot":"","sources":["../../../../src/modules/captcha/setCaptchaToken/setCaptchaToken.ts"],"names":[],"mappings":"AAGA,KAAK,oBAAoB,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,qBACR,oBAAoB,4DAQvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"attachCheckoutTransactionSource.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EACV,iCAAiC,EACjC,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAG3B,KAAK,2CAA2C,GAAG;IACjD,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,aAAa,EAAE,KAAK,CAAC;IACrB,+BAA+B;IAC/B,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,6CAA6C,GAAG;IACnD;;;;OAIG;IACH,gBAAgB,EAAE,iCAAiC,CAAC;IACpD,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,qCAAqC,GAC7C,2CAA2C,GAC3C,6CAA6C,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,+BAA+B,WAClC,qCAAqC,wDAE5C,OAAO,CAAC,mBAAmB,CA0B7B,CAAC"}
1
+ {"version":3,"file":"attachCheckoutTransactionSource.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EACV,iCAAiC,EACjC,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAI3B,KAAK,2CAA2C,GAAG;IACjD,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,aAAa,EAAE,KAAK,CAAC;IACrB,+BAA+B;IAC/B,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,6CAA6C,GAAG;IACnD;;;;OAIG;IACH,gBAAgB,EAAE,iCAAiC,CAAC;IACpD,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,qCAAqC,GAC7C,2CAA2C,GAC3C,6CAA6C,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,+BAA+B,WAClC,qCAAqC,wDAE5C,OAAO,CAAC,mBAAmB,CAiC7B,CAAC"}
@@ -18,7 +18,7 @@ export type BroadcastCheckoutTransactionParams = {
18
18
  * @param params BroadcastCheckoutTransactionParams - The transaction ID and optional tx hash.
19
19
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
20
20
  * @returns The updated checkout transaction
21
- * @instrumented
21
+ * @instrumented
22
22
  */
23
23
  export declare const broadcastCheckoutTransaction: ({ transactionId, txHash }: BroadcastCheckoutTransactionParams, client?: DynamicClient) => Promise<CheckoutTransaction>;
24
24
  //# sourceMappingURL=broadcastCheckoutTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"broadcastCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,MAAM,kCAAkC,GAAG;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,8BACZ,kCAAkC,WACrD,aAAa,KACpB,OAAO,CAAC,mBAAmB,CAU7B,CAAC"}
1
+ {"version":3,"file":"broadcastCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,MAAM,MAAM,kCAAkC,GAAG;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,8BACZ,kCAAkC,WACrD,aAAa,KACpB,OAAO,CAAC,mBAAmB,CAiB7B,CAAC"}
@@ -8,7 +8,7 @@ export type CancelCheckoutTransactionParams = {
8
8
  * @param params CancelCheckoutTransactionParams - The transaction to cancel.
9
9
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
10
10
  * @returns The cancelled checkout transaction
11
- * @instrumented
11
+ * @instrumented
12
12
  */
13
13
  export declare const cancelCheckoutTransaction: ({ transactionId }: CancelCheckoutTransactionParams, client?: import("../../../exports").DynamicClient) => Promise<CheckoutTransaction>;
14
14
  //# sourceMappingURL=cancelCheckoutTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cancelCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,MAAM,+BAA+B,GAAG;IAC5C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,sBACjB,+BAA+B,wDAEjD,OAAO,CAAC,mBAAmB,CAgB7B,CAAC"}
1
+ {"version":3,"file":"cancelCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAK7D,MAAM,MAAM,+BAA+B,GAAG;IAC5C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,sBACjB,+BAA+B,wDAEjD,OAAO,CAAC,mBAAmB,CAoB7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getCheckoutTransactionQuote.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gEAMnC,iCAAiC,wDAEnC,OAAO,CAAC,mBAAmB,CAc7B,CAAC"}
1
+ {"version":3,"file":"getCheckoutTransactionQuote.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,gEAMnC,iCAAiC,wDAEnC,OAAO,CAAC,mBAAmB,CAqB7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prepareCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,gFAKlC,gCAAgC,wDAElC,OAAO,CAAC,mBAAmB,CAa7B,CAAC"}
1
+ {"version":3,"file":"prepareCheckoutTransaction.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,MAAM,gCAAgC,GAAG;IAC7C;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,gFAKlC,gCAAgC,wDAElC,OAAO,CAAC,mBAAmB,CAqB7B,CAAC"}