@dynamic-labs-sdk/client 0.26.9 → 0.27.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 (184) hide show
  1. package/dist/{InvalidParamError-Cu4kK02f.cjs → InvalidParamError-BHNFIR4K.cjs} +43 -127
  2. package/dist/InvalidParamError-BHNFIR4K.cjs.map +1 -0
  3. package/dist/{InvalidParamError-0lP4zZBe.esm.js → InvalidParamError-DJxqCxOB.esm.js} +17 -101
  4. package/dist/InvalidParamError-DJxqCxOB.esm.js.map +1 -0
  5. package/dist/{InvalidParamError-CY4JGkjq.native.esm.js → InvalidParamError-D_EzyxXy.native.esm.js} +17 -101
  6. package/dist/InvalidParamError-D_EzyxXy.native.esm.js.map +1 -0
  7. package/dist/{NotWaasWalletAccountError-BAD01hkG.esm.js → NotWaasWalletAccountError-BSon-4Ob.native.esm.js} +5 -5
  8. package/dist/{NotWaasWalletAccountError-DYuQuYeI.native.esm.js.map → NotWaasWalletAccountError-BSon-4Ob.native.esm.js.map} +1 -1
  9. package/dist/{NotWaasWalletAccountError-CWKsiVqV.cjs → NotWaasWalletAccountError-CIUs1vxk.cjs} +5 -5
  10. package/dist/{NotWaasWalletAccountError-CWKsiVqV.cjs.map → NotWaasWalletAccountError-CIUs1vxk.cjs.map} +1 -1
  11. package/dist/{NotWaasWalletAccountError-DYuQuYeI.native.esm.js → NotWaasWalletAccountError-DyqqJavQ.esm.js} +5 -5
  12. package/dist/{NotWaasWalletAccountError-BAD01hkG.esm.js.map → NotWaasWalletAccountError-DyqqJavQ.esm.js.map} +1 -1
  13. package/dist/core.cjs +53 -113
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.esm.js +18 -78
  16. package/dist/core.esm.js.map +1 -1
  17. package/dist/core.native.esm.js +18 -78
  18. package/dist/core.native.esm.js.map +1 -1
  19. package/dist/{getNetworkProviderFromNetworkId-VDuMPEtz.cjs → getNetworkProviderFromNetworkId-B5HGICoA.cjs} +110 -362
  20. package/dist/getNetworkProviderFromNetworkId-B5HGICoA.cjs.map +1 -0
  21. package/dist/{getNetworkProviderFromNetworkId-Cjj23n1Y.native.esm.js → getNetworkProviderFromNetworkId-BN3NLh8u.native.esm.js} +45 -297
  22. package/dist/getNetworkProviderFromNetworkId-BN3NLh8u.native.esm.js.map +1 -0
  23. package/dist/{getNetworkProviderFromNetworkId-D1mT7AfE.esm.js → getNetworkProviderFromNetworkId-EbAuEVM-.esm.js} +45 -297
  24. package/dist/getNetworkProviderFromNetworkId-EbAuEVM-.esm.js.map +1 -0
  25. package/dist/{getSignedSessionId-DQr-WJ3a.esm.js → getSignedSessionId-BW4I7fDk.esm.js} +7 -31
  26. package/dist/getSignedSessionId-BW4I7fDk.esm.js.map +1 -0
  27. package/dist/{getSignedSessionId-BGFoe3gh.native.esm.js → getSignedSessionId-B_a6CXGP.native.esm.js} +7 -31
  28. package/dist/getSignedSessionId-B_a6CXGP.native.esm.js.map +1 -0
  29. package/dist/{getSignedSessionId-qeRsJErq.cjs → getSignedSessionId-DMMejcaD.cjs} +10 -34
  30. package/dist/getSignedSessionId-DMMejcaD.cjs.map +1 -0
  31. package/dist/{getVerifiedCredentialForWalletAccount-CjPzTFHz.cjs → getVerifiedCredentialForWalletAccount-C7-3wtlJ.cjs} +67 -175
  32. package/dist/getVerifiedCredentialForWalletAccount-C7-3wtlJ.cjs.map +1 -0
  33. package/dist/{getVerifiedCredentialForWalletAccount-DEkVcH8j.esm.js → getVerifiedCredentialForWalletAccount-ChZvrEQJ.esm.js} +19 -127
  34. package/dist/getVerifiedCredentialForWalletAccount-ChZvrEQJ.esm.js.map +1 -0
  35. package/dist/{getVerifiedCredentialForWalletAccount-BCPvaJ1V.native.esm.js → getVerifiedCredentialForWalletAccount-DMoMmbjK.native.esm.js} +19 -127
  36. package/dist/getVerifiedCredentialForWalletAccount-DMoMmbjK.native.esm.js.map +1 -0
  37. package/dist/index.cjs +203 -635
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.esm.js +164 -596
  40. package/dist/index.esm.js.map +1 -1
  41. package/dist/index.native.esm.js +159 -591
  42. package/dist/index.native.esm.js.map +1 -1
  43. package/dist/{isMfaRequiredForAction-CTghrtq8.esm.js → isMfaRequiredForAction-BUfcq6P2.esm.js} +6 -18
  44. package/dist/isMfaRequiredForAction-BUfcq6P2.esm.js.map +1 -0
  45. package/dist/{isMfaRequiredForAction-qSv2yrfd.cjs → isMfaRequiredForAction-IhCAdScF.cjs} +7 -19
  46. package/dist/isMfaRequiredForAction-IhCAdScF.cjs.map +1 -0
  47. package/dist/{isMfaRequiredForAction-DaZoGOB-.native.esm.js → isMfaRequiredForAction-iVSdynw1.native.esm.js} +6 -18
  48. package/dist/isMfaRequiredForAction-iVSdynw1.native.esm.js.map +1 -0
  49. package/dist/modules/apiClient/createApiClient.d.ts +1 -1
  50. package/dist/modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware.d.ts +1 -1
  51. package/dist/modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware.d.ts.map +1 -1
  52. package/dist/modules/auth/createVisit/createVisit.d.ts +1 -1
  53. package/dist/modules/auth/createVisit/createVisit.d.ts.map +1 -1
  54. package/dist/modules/auth/passkeys/getPasskeys/getPasskeys.d.ts +1 -1
  55. package/dist/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.d.ts +1 -1
  56. package/dist/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.d.ts +1 -1
  57. package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts +1 -1
  58. package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts +1 -1
  59. package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
  60. package/dist/modules/balances/getBalances/getBalances.d.ts +1 -1
  61. package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +1 -1
  62. package/dist/modules/captcha/consumeCaptchaToken/consumeCaptchaToken.d.ts +1 -1
  63. package/dist/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.d.ts +1 -1
  64. package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +1 -1
  65. package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts +1 -1
  66. package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts +1 -1
  67. package/dist/modules/clientEvents/clientEvents.d.ts +3 -3
  68. package/dist/modules/deviceRegistration/detectDeviceRegistrationRedirect/detectDeviceRegistrationRedirect.d.ts +1 -1
  69. package/dist/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.d.ts +1 -1
  70. package/dist/modules/deviceRegistration/getDeviceSigner/getDeviceSigner.d.ts +1 -1
  71. package/dist/modules/deviceRegistration/getDeviceSigner/getDeviceSigner.d.ts.map +1 -1
  72. package/dist/modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners/getHeadersForNonceSignedByDeviceSigners.d.ts +1 -1
  73. package/dist/modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners/getHeadersForNonceSignedByDeviceSigners.d.ts.map +1 -1
  74. package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts +1 -1
  75. package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
  76. package/dist/modules/extension/registerExtension/registerExtension.d.ts +1 -1
  77. package/dist/modules/funding/coinbase/addCoinbaseOnrampOrderEventListener/addCoinbaseOnrampOrderEventListener.d.ts +1 -1
  78. package/dist/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.d.ts +1 -1
  79. package/dist/modules/funding/coinbase/getMissingVerificationForCoinbaseOnrampOrder/getMissingVerificationForCoinbaseOnrampOrder.d.ts +1 -1
  80. package/dist/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.d.ts +1 -1
  81. package/dist/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.d.ts +1 -1
  82. package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts +1 -1
  83. package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts +1 -1
  84. package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts.map +1 -1
  85. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getWalletConnectCatalog.d.ts +1 -1
  86. package/dist/modules/legacyWalletBook/getWalletConnectCatalogWalletByWalletProviderKey/getWalletConnectCatalogWalletByWalletProviderKey.d.ts +1 -1
  87. package/dist/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.d.ts +1 -1
  88. package/dist/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.d.ts.map +1 -1
  89. package/dist/modules/mfa/getMfaDevices/getMfaDevices.d.ts +1 -1
  90. package/dist/modules/mfa/getMfaMethods/getMfaMethods.d.ts +1 -1
  91. package/dist/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.d.ts +1 -1
  92. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +1 -1
  93. package/dist/modules/sessionKeys/generateSessionKeys/generateSessionKeys.d.ts +1 -1
  94. package/dist/modules/sessionKeys/generateSessionKeys/generateSessionKeys.d.ts.map +1 -1
  95. package/dist/modules/sessionKeys/getSessionKeys/getSessionKeys.d.ts +1 -1
  96. package/dist/modules/sessionKeys/getSessionKeys/getSessionKeys.d.ts.map +1 -1
  97. package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts +1 -1
  98. package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts.map +1 -1
  99. package/dist/modules/swap/getSwapQuote/getSwapQuote.d.ts +1 -1
  100. package/dist/modules/swap/getSwapStatus/getSwapStatus.d.ts +1 -1
  101. package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts +1 -1
  102. package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts +1 -1
  103. package/dist/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.d.ts +1 -1
  104. package/dist/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.d.ts.map +1 -1
  105. package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts +1 -1
  106. package/dist/modules/wallets/getWalletProviders/getWalletProviders.d.ts +1 -1
  107. package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts +1 -1
  108. package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts.map +1 -1
  109. package/dist/modules/wallets/networks/getActiveNetworkData/getActiveNetworkData.d.ts +1 -1
  110. package/dist/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.d.ts +1 -1
  111. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +1 -1
  112. package/dist/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.d.ts +1 -1
  113. package/dist/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.d.ts +1 -1
  114. package/dist/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.d.ts.map +1 -1
  115. package/dist/modules/wallets/networks/getNetworkProviderFromNetworkId/getNetworkProviderFromNetworkId.d.ts +1 -1
  116. package/dist/modules/wallets/networks/getNetworkProviderFromNetworkId/getNetworkProviderFromNetworkId.d.ts.map +1 -1
  117. package/dist/modules/wallets/networks/getNetworkProviders/getNetworkProviders.d.ts +1 -1
  118. package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts +1 -1
  119. package/dist/modules/wallets/networks/getTransactionHistory/getTransactionHistory.d.ts +1 -1
  120. package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts +1 -1
  121. package/dist/modules/wallets/unverifiedWalletAccounts/removeUnverifiedWalletAccount/removeUnverifiedWalletAccount.d.ts +1 -1
  122. package/dist/modules/wallets/unverifiedWalletAccounts/setUnverifiedWalletAccounts/setUnverifiedWalletAccounts.d.ts +1 -1
  123. package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts +1 -1
  124. package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts.map +1 -1
  125. package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts +1 -1
  126. package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts.map +1 -1
  127. package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts +1 -1
  128. package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts.map +1 -1
  129. package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts +1 -1
  130. package/dist/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.d.ts +1 -1
  131. package/dist/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.d.ts.map +1 -1
  132. package/dist/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.d.ts +1 -1
  133. package/dist/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.d.ts.map +1 -1
  134. package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.d.ts +1 -1
  135. package/dist/modules/wallets/walletProvider/events/offWalletProviderEvent/offWalletProviderEvent.d.ts +1 -1
  136. package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts +1 -1
  137. package/dist/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.d.ts +1 -1
  138. package/dist/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.d.ts.map +1 -1
  139. package/dist/services/crossTabBroadcast/createCrossTabBroadcast/createCrossTabBroadcast.d.ts +1 -1
  140. package/dist/services/keychain/createKeychainService/createKeychainService.d.ts +1 -1
  141. package/dist/services/keychain/createKeychainService/createKeychainService.d.ts.map +1 -1
  142. package/dist/services/logger/createLogger/createLogger.d.ts +1 -1
  143. package/dist/services/realtime/createRealtimeChannelSchema/createRealtimeChannelSchema.d.ts +1 -1
  144. package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts +1 -1
  145. package/dist/services/runtimeServices/createRuntimeServiceAccessKey/createRuntimeServiceAccessKey.d.ts +1 -1
  146. package/dist/services/storage/createLocalStorageAdapter/createLocalStorageAdapter.d.ts +1 -1
  147. package/dist/services/storage/createStorage/createStorage.d.ts +1 -1
  148. package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts +1 -1
  149. package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts.map +1 -1
  150. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  151. package/dist/utils/deferredPromise/createDeferredPromise.d.ts +1 -1
  152. package/dist/utils/deferredPromise/createDeferredPromise.d.ts.map +1 -1
  153. package/dist/utils/getChainFromVerifiedCredentialChain/getChainFromVerifiedCredentialChain.d.ts +1 -1
  154. package/dist/utils/getChainFromVerifiedCredentialChain/getChainFromVerifiedCredentialChain.d.ts.map +1 -1
  155. package/dist/utils/getNonce/getNonce.d.ts +1 -1
  156. package/dist/utils/observable/subscribeWithSelector/subscribeWithSelector.d.ts +1 -1
  157. package/dist/waas.cjs +7 -7
  158. package/dist/waas.cjs.map +1 -1
  159. package/dist/waas.esm.js +6 -6
  160. package/dist/waas.esm.js.map +1 -1
  161. package/dist/waas.native.esm.js +6 -6
  162. package/dist/waas.native.esm.js.map +1 -1
  163. package/dist/waasCore.cjs +26 -26
  164. package/dist/waasCore.cjs.map +1 -1
  165. package/dist/waasCore.esm.js +25 -25
  166. package/dist/waasCore.esm.js.map +1 -1
  167. package/dist/waasCore.native.esm.js +25 -25
  168. package/dist/waasCore.native.esm.js.map +1 -1
  169. package/package.json +3 -3
  170. package/dist/InvalidParamError-0lP4zZBe.esm.js.map +0 -1
  171. package/dist/InvalidParamError-CY4JGkjq.native.esm.js.map +0 -1
  172. package/dist/InvalidParamError-Cu4kK02f.cjs.map +0 -1
  173. package/dist/getNetworkProviderFromNetworkId-Cjj23n1Y.native.esm.js.map +0 -1
  174. package/dist/getNetworkProviderFromNetworkId-D1mT7AfE.esm.js.map +0 -1
  175. package/dist/getNetworkProviderFromNetworkId-VDuMPEtz.cjs.map +0 -1
  176. package/dist/getSignedSessionId-BGFoe3gh.native.esm.js.map +0 -1
  177. package/dist/getSignedSessionId-DQr-WJ3a.esm.js.map +0 -1
  178. package/dist/getSignedSessionId-qeRsJErq.cjs.map +0 -1
  179. package/dist/getVerifiedCredentialForWalletAccount-BCPvaJ1V.native.esm.js.map +0 -1
  180. package/dist/getVerifiedCredentialForWalletAccount-CjPzTFHz.cjs.map +0 -1
  181. package/dist/getVerifiedCredentialForWalletAccount-DEkVcH8j.esm.js.map +0 -1
  182. package/dist/isMfaRequiredForAction-CTghrtq8.esm.js.map +0 -1
  183. package/dist/isMfaRequiredForAction-DaZoGOB-.native.esm.js.map +0 -1
  184. package/dist/isMfaRequiredForAction-qSv2yrfd.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
- const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-VDuMPEtz.cjs');
2
- const require_InvalidParamError = require('./InvalidParamError-Cu4kK02f.cjs');
1
+ const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-B5HGICoA.cjs');
2
+ const require_InvalidParamError = require('./InvalidParamError-BHNFIR4K.cjs');
3
3
  let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
4
4
 
5
5
  //#region src/utils/setCookie/setCookie.ts
@@ -23,7 +23,7 @@ const setCookie = (cookie) => {
23
23
  * @param params.listener - The callback function to execute when the event is fired.
24
24
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
25
25
  * @returns A function that can be called to remove the listener.
26
- * @instrumented
26
+ * @not-instrumented
27
27
  */
28
28
  const onEvent = ({ event, listener }, client = require_InvalidParamError.getDefaultClient()) => {
29
29
  const { eventEmitter } = require_InvalidParamError.getCore(client);
@@ -41,7 +41,7 @@ const onEvent = ({ event, listener }, client = require_InvalidParamError.getDefa
41
41
  * @param params.event - The event name to remove the listener from.
42
42
  * @param params.listener - The callback function to remove.
43
43
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
44
- * @instrumented
44
+ * @not-instrumented
45
45
  */
46
46
  const offEvent = ({ event, listener }, client = require_InvalidParamError.getDefaultClient()) => {
47
47
  const { eventEmitter } = require_InvalidParamError.getCore(client);
@@ -57,7 +57,7 @@ const offEvent = ({ event, listener }, client = require_InvalidParamError.getDef
57
57
  * @param params.listener - The callback function to execute when the event is fired.
58
58
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
59
59
  * @returns A function that can be called to remove the listener before it fires.
60
- * @instrumented
60
+ * @not-instrumented
61
61
  */
62
62
  const onceEvent = ({ event, listener }, client = require_InvalidParamError.getDefaultClient()) => {
63
63
  const { eventEmitter } = require_InvalidParamError.getCore(client);
@@ -81,42 +81,6 @@ const emitEvent = ({ event, args }, client) => {
81
81
  const { eventEmitter } = require_InvalidParamError.getCore(client);
82
82
  eventEmitter.emit(event, args);
83
83
  };
84
- const __onEvent_impl = onEvent;
85
- const __onEvent_wrapped = require_InvalidParamError.instrumentFunction({
86
- fn: __onEvent_impl,
87
- functionName: "onEvent",
88
- getCore: () => {
89
- try {
90
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
91
- } catch {
92
- return;
93
- }
94
- }
95
- });
96
- const __offEvent_impl = offEvent;
97
- const __offEvent_wrapped = require_InvalidParamError.instrumentFunction({
98
- fn: __offEvent_impl,
99
- functionName: "offEvent",
100
- getCore: () => {
101
- try {
102
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
103
- } catch {
104
- return;
105
- }
106
- }
107
- });
108
- const __onceEvent_impl = onceEvent;
109
- const __onceEvent_wrapped = require_InvalidParamError.instrumentFunction({
110
- fn: __onceEvent_impl,
111
- functionName: "onceEvent",
112
- getCore: () => {
113
- try {
114
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
115
- } catch {
116
- return;
117
- }
118
- }
119
- });
120
84
 
121
85
  //#endregion
122
86
  //#region src/errors/InvalidWalletProviderKeyError.ts
@@ -237,7 +201,7 @@ const getWalletProviderKeyFromVerifiedCredential = ({ verifiedCredential }, clie
237
201
  require_InvalidParamError.assertDefined(verifiedCredential.walletProvider, `Failed to get wallet provider for verified credential with ID ${verifiedCredential.id}: missing walletProvider`);
238
202
  require_InvalidParamError.assertDefined(verifiedCredential.chain, `Failed to get wallet provider for verified credential with ID ${verifiedCredential.id}: missing chain`);
239
203
  return { walletProviderKey: formatWalletProviderKey({
240
- chain: require_InvalidParamError.__getChainFromVerifiedCredentialChain_wrapped(verifiedCredential.chain),
204
+ chain: require_InvalidParamError.getChainFromVerifiedCredentialChain(verifiedCredential.chain),
241
205
  displayName: verifiedCredential.walletName,
242
206
  walletProviderType: verifiedCredential.walletProvider
243
207
  }) };
@@ -249,7 +213,7 @@ const getWalletProviderKeyFromVerifiedCredential = ({ verifiedCredential }, clie
249
213
  const convertVerifiedCredentialToWalletAccount = ({ verifiedCredential }, client) => {
250
214
  require_InvalidParamError.assertDefined(verifiedCredential.address, "Missing address in verified credential");
251
215
  require_InvalidParamError.assertDefined(verifiedCredential.chain, "Missing chain in verified credential");
252
- const chain = require_InvalidParamError.__getChainFromVerifiedCredentialChain_wrapped(verifiedCredential.chain);
216
+ const chain = require_InvalidParamError.getChainFromVerifiedCredentialChain(verifiedCredential.chain);
253
217
  const { walletProviderKey } = getWalletProviderKeyFromVerifiedCredential({ verifiedCredential }, client);
254
218
  const walletAccountId = formatWalletAccountId({
255
219
  address: verifiedCredential.address,
@@ -300,7 +264,7 @@ const getWalletAccountsFromState = ({ unverifiedWalletAccounts, user }, client)
300
264
  *
301
265
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
302
266
  * @returns An array of wallet accounts associated with the session.
303
- * @instrumented
267
+ * @not-instrumented
304
268
  */
305
269
  const getWalletAccounts = (client = require_InvalidParamError.getDefaultClient()) => {
306
270
  const { unverifiedWalletAccounts, user } = require_InvalidParamError.getCore(client).state.get();
@@ -309,18 +273,6 @@ const getWalletAccounts = (client = require_InvalidParamError.getDefaultClient()
309
273
  user
310
274
  }, client);
311
275
  };
312
- const __getWalletAccounts_impl = getWalletAccounts;
313
- const __getWalletAccounts_wrapped = require_InvalidParamError.instrumentFunction({
314
- fn: __getWalletAccounts_impl,
315
- functionName: "getWalletAccounts",
316
- getCore: () => {
317
- try {
318
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
319
- } catch {
320
- return;
321
- }
322
- }
323
- });
324
276
 
325
277
  //#endregion
326
278
  //#region src/errors/NoWalletProviderFoundError.ts
@@ -346,7 +298,7 @@ var NoWalletProviderFoundError = class extends require_InvalidParamError.BaseErr
346
298
  * @template - The type of service to be created/accessed
347
299
  * @param key - Unique identifier for the service in the registry
348
300
  * @param builder - Function that creates the service instance when called with a DynamicClient
349
- * @instrumented
301
+ * @not-instrumented
350
302
  */
351
303
  const createRuntimeServiceAccessKey = (key, builder) => (client) => {
352
304
  const { runtimeServices } = require_InvalidParamError.getCore(client);
@@ -356,18 +308,6 @@ const createRuntimeServiceAccessKey = (key, builder) => (client) => {
356
308
  runtimeServices.register(key, service);
357
309
  return service;
358
310
  };
359
- const __createRuntimeServiceAccessKey_impl = createRuntimeServiceAccessKey;
360
- const __createRuntimeServiceAccessKey_wrapped = require_InvalidParamError.instrumentFunction({
361
- fn: __createRuntimeServiceAccessKey_impl,
362
- functionName: "createRuntimeServiceAccessKey",
363
- getCore: () => {
364
- try {
365
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
366
- } catch {
367
- return;
368
- }
369
- }
370
- });
371
311
 
372
312
  //#endregion
373
313
  //#region src/modules/wallets/walletProviderRegistry/createWalletProviderRegistry/createWalletProviderRegistry.ts
@@ -452,7 +392,7 @@ const createWalletProviderRegistry = (client) => {
452
392
  * const provider = registry.getByKey('metamaskevm');
453
393
  * ```
454
394
  */
455
- const getWalletProviderRegistry = __createRuntimeServiceAccessKey_wrapped("walletProviderRegistry", (client) => createWalletProviderRegistry(client));
395
+ const getWalletProviderRegistry = createRuntimeServiceAccessKey("walletProviderRegistry", (client) => createWalletProviderRegistry(client));
456
396
 
457
397
  //#endregion
458
398
  //#region src/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.ts
@@ -481,24 +421,12 @@ let WalletProviderPriority = /* @__PURE__ */ function(WalletProviderPriority$1)
481
421
 
482
422
  //#endregion
483
423
  //#region src/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.ts
484
- /** @instrumented */
424
+ /** @not-instrumented */
485
425
  const getWalletProviderFromWalletAccount = ({ walletAccount }, client) => {
486
426
  const walletProvider = getWalletProviderRegistry(client).getByKey(walletAccount.walletProviderKey);
487
427
  if (!walletProvider) throw new NoWalletProviderFoundError({ walletProviderKey: walletAccount.walletProviderKey });
488
428
  return walletProvider;
489
429
  };
490
- const __getWalletProviderFromWalletAccount_impl = getWalletProviderFromWalletAccount;
491
- const __getWalletProviderFromWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
492
- fn: __getWalletProviderFromWalletAccount_impl,
493
- functionName: "getWalletProviderFromWalletAccount",
494
- getCore: () => {
495
- try {
496
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
497
- } catch {
498
- return;
499
- }
500
- }
501
- });
502
430
 
503
431
  //#endregion
504
432
  //#region src/modules/auth/consts.ts
@@ -512,7 +440,7 @@ const DYNAMIC_AUTH_COOKIE_NAME = "DYNAMIC_JWT_TOKEN";
512
440
  */
513
441
  const emitWalletAccountsChangedEvent = (client) => {
514
442
  emitEvent({
515
- args: { walletAccounts: __getWalletAccounts_wrapped(client) },
443
+ args: { walletAccounts: getWalletAccounts(client) },
516
444
  event: "walletAccountsChanged"
517
445
  }, client);
518
446
  };
@@ -548,23 +476,11 @@ const isUserMissingMfaAuth = (client = require_InvalidParamError.getDefaultClien
548
476
  //#region src/modules/wallets/getWalletProviders/getWalletProviders.ts
549
477
  /**
550
478
  * Get all available wallet providers to interact with internally.
551
- * @instrumented
479
+ * @not-instrumented
552
480
  */
553
481
  const getWalletProviders = (client) => {
554
482
  return getWalletProviderRegistry(client).listProviders();
555
483
  };
556
- const __getWalletProviders_impl = getWalletProviders;
557
- const __getWalletProviders_wrapped = require_InvalidParamError.instrumentFunction({
558
- fn: __getWalletProviders_impl,
559
- functionName: "getWalletProviders",
560
- getCore: () => {
561
- try {
562
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
563
- } catch {
564
- return;
565
- }
566
- }
567
- });
568
484
 
569
485
  //#endregion
570
486
  //#region src/modules/waas/isWaasWalletProvider/isWaasWalletProvider.ts
@@ -577,7 +493,7 @@ const isWaasWalletProvider = (walletProvider) => {
577
493
  //#region src/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.ts
578
494
  /** @not-instrumented */
579
495
  const findWaasWalletProviderByChain = ({ chain }, client) => {
580
- const providers = __getWalletProviders_wrapped(client);
496
+ const providers = getWalletProviders(client);
581
497
  const waasProviderKey = formatWalletProviderKey({
582
498
  chain,
583
499
  displayName: require_InvalidParamError.DYNAMIC_WAAS_METADATA.displayName,
@@ -612,7 +528,7 @@ const restoreUserSharesForAllWalletAccounts = async (client) => {
612
528
  * when we know it will fails and just add noise to the logs.
613
529
  */
614
530
  if (isUserMissingMfaAuth(client)) return;
615
- const waasWalletAccounts = __getWalletAccounts_wrapped(client).filter((walletAccount) => isWaasWalletAccount({ walletAccount }));
531
+ const waasWalletAccounts = getWalletAccounts(client).filter((walletAccount) => isWaasWalletAccount({ walletAccount }));
616
532
  await Promise.all(waasWalletAccounts.map(async (walletAccount) => {
617
533
  const provider = findWaasWalletProviderByChain({ chain: walletAccount.chain }, client);
618
534
  /**
@@ -731,7 +647,7 @@ const upsertElevatedAccessToken = ({ currentTokens, newToken }) => {
731
647
 
732
648
  //#endregion
733
649
  //#region src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts
734
- /** @instrumented */
650
+ /** @not-instrumented */
735
651
  const updateAuthFromVerifyResponse = ({ response }, client) => {
736
652
  const core = require_InvalidParamError.getCore(client);
737
653
  const previousState = { ...core.state.get() };
@@ -763,46 +679,22 @@ const updateAuthFromVerifyResponse = ({ response }, client) => {
763
679
  checkAndRaiseWalletAccountsChangedEvent({ previousState }, client);
764
680
  if (!previousState.user && Boolean(newState.user)) restoreUserSharesForAllWalletAccounts(client);
765
681
  };
766
- const __updateAuthFromVerifyResponse_impl = updateAuthFromVerifyResponse;
767
- const __updateAuthFromVerifyResponse_wrapped = require_InvalidParamError.instrumentFunction({
768
- fn: __updateAuthFromVerifyResponse_impl,
769
- functionName: "updateAuthFromVerifyResponse",
770
- getCore: () => {
771
- try {
772
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
773
- } catch {
774
- return;
775
- }
776
- }
777
- });
778
682
 
779
683
  //#endregion
780
684
  //#region src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts
781
685
  /** @not-instrumented */
782
686
  const getWalletProviderByKey = ({ walletProviderKey }, client) => {
783
- const walletProvider = __getWalletProviders_wrapped(client).find((walletProvider$1) => walletProvider$1.key === walletProviderKey);
687
+ const walletProvider = getWalletProviders(client).find((walletProvider$1) => walletProvider$1.key === walletProviderKey);
784
688
  if (!walletProvider) throw new NoWalletProviderFoundError({ walletProviderKey });
785
689
  return walletProvider;
786
690
  };
787
691
 
788
692
  //#endregion
789
693
  //#region src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts
790
- /** @instrumented */
694
+ /** @not-instrumented */
791
695
  const getVerifiedCredentialForWalletAccount = ({ walletAccount }, client) => {
792
696
  return client.user?.verifiedCredentials.find((vc) => vc.id === walletAccount.verifiedCredentialId);
793
697
  };
794
- const __getVerifiedCredentialForWalletAccount_impl = getVerifiedCredentialForWalletAccount;
795
- const __getVerifiedCredentialForWalletAccount_wrapped = require_InvalidParamError.instrumentFunction({
796
- fn: __getVerifiedCredentialForWalletAccount_impl,
797
- functionName: "getVerifiedCredentialForWalletAccount",
798
- getCore: () => {
799
- try {
800
- return require_InvalidParamError.getCore(require_InvalidParamError.getDefaultClient());
801
- } catch {
802
- return;
803
- }
804
- }
805
- });
806
698
 
807
699
  //#endregion
808
700
  Object.defineProperty(exports, 'DYNAMIC_AUTH_COOKIE_NAME', {
@@ -829,136 +721,130 @@ Object.defineProperty(exports, 'WalletProviderPriority', {
829
721
  return WalletProviderPriority;
830
722
  }
831
723
  });
832
- Object.defineProperty(exports, '__createRuntimeServiceAccessKey_wrapped', {
833
- enumerable: true,
834
- get: function () {
835
- return __createRuntimeServiceAccessKey_wrapped;
836
- }
837
- });
838
- Object.defineProperty(exports, '__getVerifiedCredentialForWalletAccount_wrapped', {
724
+ Object.defineProperty(exports, 'checkAndRaiseWalletAccountsChangedEvent', {
839
725
  enumerable: true,
840
726
  get: function () {
841
- return __getVerifiedCredentialForWalletAccount_wrapped;
727
+ return checkAndRaiseWalletAccountsChangedEvent;
842
728
  }
843
729
  });
844
- Object.defineProperty(exports, '__getWalletAccounts_wrapped', {
730
+ Object.defineProperty(exports, 'createRuntimeServiceAccessKey', {
845
731
  enumerable: true,
846
732
  get: function () {
847
- return __getWalletAccounts_wrapped;
733
+ return createRuntimeServiceAccessKey;
848
734
  }
849
735
  });
850
- Object.defineProperty(exports, '__getWalletProviderFromWalletAccount_wrapped', {
736
+ Object.defineProperty(exports, 'emitEvent', {
851
737
  enumerable: true,
852
738
  get: function () {
853
- return __getWalletProviderFromWalletAccount_wrapped;
739
+ return emitEvent;
854
740
  }
855
741
  });
856
- Object.defineProperty(exports, '__getWalletProviders_wrapped', {
742
+ Object.defineProperty(exports, 'emitWalletAccountsChangedEvent', {
857
743
  enumerable: true,
858
744
  get: function () {
859
- return __getWalletProviders_wrapped;
745
+ return emitWalletAccountsChangedEvent;
860
746
  }
861
747
  });
862
- Object.defineProperty(exports, '__offEvent_wrapped', {
748
+ Object.defineProperty(exports, 'findWaasWalletProviderByChain', {
863
749
  enumerable: true,
864
750
  get: function () {
865
- return __offEvent_wrapped;
751
+ return findWaasWalletProviderByChain;
866
752
  }
867
753
  });
868
- Object.defineProperty(exports, '__onEvent_wrapped', {
754
+ Object.defineProperty(exports, 'formatWalletAccountId', {
869
755
  enumerable: true,
870
756
  get: function () {
871
- return __onEvent_wrapped;
757
+ return formatWalletAccountId;
872
758
  }
873
759
  });
874
- Object.defineProperty(exports, '__onceEvent_wrapped', {
760
+ Object.defineProperty(exports, 'formatWalletProviderKey', {
875
761
  enumerable: true,
876
762
  get: function () {
877
- return __onceEvent_wrapped;
763
+ return formatWalletProviderKey;
878
764
  }
879
765
  });
880
- Object.defineProperty(exports, '__updateAuthFromVerifyResponse_wrapped', {
766
+ Object.defineProperty(exports, 'getVerifiedCredentialForWalletAccount', {
881
767
  enumerable: true,
882
768
  get: function () {
883
- return __updateAuthFromVerifyResponse_wrapped;
769
+ return getVerifiedCredentialForWalletAccount;
884
770
  }
885
771
  });
886
- Object.defineProperty(exports, 'checkAndRaiseWalletAccountsChangedEvent', {
772
+ Object.defineProperty(exports, 'getWalletAccounts', {
887
773
  enumerable: true,
888
774
  get: function () {
889
- return checkAndRaiseWalletAccountsChangedEvent;
775
+ return getWalletAccounts;
890
776
  }
891
777
  });
892
- Object.defineProperty(exports, 'emitEvent', {
778
+ Object.defineProperty(exports, 'getWalletProviderByKey', {
893
779
  enumerable: true,
894
780
  get: function () {
895
- return emitEvent;
781
+ return getWalletProviderByKey;
896
782
  }
897
783
  });
898
- Object.defineProperty(exports, 'emitWalletAccountsChangedEvent', {
784
+ Object.defineProperty(exports, 'getWalletProviderFromWalletAccount', {
899
785
  enumerable: true,
900
786
  get: function () {
901
- return emitWalletAccountsChangedEvent;
787
+ return getWalletProviderFromWalletAccount;
902
788
  }
903
789
  });
904
- Object.defineProperty(exports, 'findWaasWalletProviderByChain', {
790
+ Object.defineProperty(exports, 'getWalletProviderRegistry', {
905
791
  enumerable: true,
906
792
  get: function () {
907
- return findWaasWalletProviderByChain;
793
+ return getWalletProviderRegistry;
908
794
  }
909
795
  });
910
- Object.defineProperty(exports, 'formatWalletAccountId', {
796
+ Object.defineProperty(exports, 'getWalletProviders', {
911
797
  enumerable: true,
912
798
  get: function () {
913
- return formatWalletAccountId;
799
+ return getWalletProviders;
914
800
  }
915
801
  });
916
- Object.defineProperty(exports, 'formatWalletProviderKey', {
802
+ Object.defineProperty(exports, 'isUserMissingMfaAuth', {
917
803
  enumerable: true,
918
804
  get: function () {
919
- return formatWalletProviderKey;
805
+ return isUserMissingMfaAuth;
920
806
  }
921
807
  });
922
- Object.defineProperty(exports, 'getWalletProviderByKey', {
808
+ Object.defineProperty(exports, 'isWaasWalletAccount', {
923
809
  enumerable: true,
924
810
  get: function () {
925
- return getWalletProviderByKey;
811
+ return isWaasWalletAccount;
926
812
  }
927
813
  });
928
- Object.defineProperty(exports, 'getWalletProviderRegistry', {
814
+ Object.defineProperty(exports, 'isWaasWalletProvider', {
929
815
  enumerable: true,
930
816
  get: function () {
931
- return getWalletProviderRegistry;
817
+ return isWaasWalletProvider;
932
818
  }
933
819
  });
934
- Object.defineProperty(exports, 'isUserMissingMfaAuth', {
820
+ Object.defineProperty(exports, 'normalizeAddress', {
935
821
  enumerable: true,
936
822
  get: function () {
937
- return isUserMissingMfaAuth;
823
+ return normalizeAddress;
938
824
  }
939
825
  });
940
- Object.defineProperty(exports, 'isWaasWalletAccount', {
826
+ Object.defineProperty(exports, 'normalizeWalletNameWithChain', {
941
827
  enumerable: true,
942
828
  get: function () {
943
- return isWaasWalletAccount;
829
+ return normalizeWalletNameWithChain;
944
830
  }
945
831
  });
946
- Object.defineProperty(exports, 'isWaasWalletProvider', {
832
+ Object.defineProperty(exports, 'offEvent', {
947
833
  enumerable: true,
948
834
  get: function () {
949
- return isWaasWalletProvider;
835
+ return offEvent;
950
836
  }
951
837
  });
952
- Object.defineProperty(exports, 'normalizeAddress', {
838
+ Object.defineProperty(exports, 'onEvent', {
953
839
  enumerable: true,
954
840
  get: function () {
955
- return normalizeAddress;
841
+ return onEvent;
956
842
  }
957
843
  });
958
- Object.defineProperty(exports, 'normalizeWalletNameWithChain', {
844
+ Object.defineProperty(exports, 'onceEvent', {
959
845
  enumerable: true,
960
846
  get: function () {
961
- return normalizeWalletNameWithChain;
847
+ return onceEvent;
962
848
  }
963
849
  });
964
850
  Object.defineProperty(exports, 'parseElevatedAccessToken', {
@@ -985,10 +871,16 @@ Object.defineProperty(exports, 'splitWalletProviderKey', {
985
871
  return splitWalletProviderKey;
986
872
  }
987
873
  });
874
+ Object.defineProperty(exports, 'updateAuthFromVerifyResponse', {
875
+ enumerable: true,
876
+ get: function () {
877
+ return updateAuthFromVerifyResponse;
878
+ }
879
+ });
988
880
  Object.defineProperty(exports, 'upsertElevatedAccessToken', {
989
881
  enumerable: true,
990
882
  get: function () {
991
883
  return upsertElevatedAccessToken;
992
884
  }
993
885
  });
994
- //# sourceMappingURL=getVerifiedCredentialForWalletAccount-CjPzTFHz.cjs.map
886
+ //# sourceMappingURL=getVerifiedCredentialForWalletAccount-C7-3wtlJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getVerifiedCredentialForWalletAccount-C7-3wtlJ.cjs","names":["getDefaultClient","getCore","BaseError","WalletProviderEnum","getCore","getChainFromVerifiedCredentialChain","getChainFromVerifiedCredentialChain","walletAccountsMap: Map<string, WalletAccount>","JwtVerifiedCredentialFormatEnum","getDefaultClient","getCore","BaseError","getCore","getCore","getDefaultClient","DYNAMIC_WAAS_METADATA","DYNAMIC_WAAS_METADATA","WalletProviderEnum","DYNAMIC_WAAS_METADATA","InvalidParamError","getCore","newState: Partial<DynamicCoreState>","isCookieEnabled","walletProvider"],"sources":["../src/utils/setCookie/setCookie.ts","../src/modules/clientEvents/clientEvents.ts","../src/errors/InvalidWalletProviderKeyError.ts","../src/modules/wallets/walletProvider/splitWalletProviderKey/splitWalletProviderKey.ts","../src/modules/wallets/utils/normalizeAddress/normalizeAddress.ts","../src/modules/wallets/utils/formatWalletAccountId/formatWalletAccountId.ts","../src/modules/wallets/utils/convertUnverifiedWalletAccountToWalletAccount/convertUnverifiedWalletAccountToWalletAccount.ts","../src/modules/wallets/utils/normalizeWalletNameWithChain/normalizeWalletNameWithChain.ts","../src/modules/wallets/utils/formatWalletProviderKey/formatWalletProviderKey.ts","../src/modules/wallets/walletProvider/walletProviderKeyMap/getWalletProviderKeyFromVerifiedCredential/getWalletProviderKeyFromVerifiedCredential.ts","../src/modules/wallets/utils/convertVerifiedCredentialToWalletAccount/convertVerifiedCredentialToWalletAccount.ts","../src/modules/wallets/getWalletAccounts/getWalletAccountsFromState/getWalletAccountsFromState.ts","../src/modules/wallets/getWalletAccounts/getWalletAccounts.ts","../src/errors/NoWalletProviderFoundError.ts","../src/services/runtimeServices/createRuntimeServiceAccessKey/createRuntimeServiceAccessKey.ts","../src/modules/wallets/walletProviderRegistry/createWalletProviderRegistry/createWalletProviderRegistry.ts","../src/modules/wallets/walletProviderRegistry/getWalletProviderRegistry/getWalletProviderRegistry.ts","../src/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.ts","../src/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.ts","../src/modules/auth/consts.ts","../src/modules/wallets/emitWalletAccountsChangedEvent/emitWalletAccountsChangedEvent.ts","../src/modules/auth/updateAuthFromVerifyResponse/checkAndRaiseWalletAccountsChangedEvent/checkAndRaiseWalletAccountsChangedEvent.ts","../src/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.ts","../src/modules/wallets/getWalletProviders/getWalletProviders.ts","../src/modules/waas/isWaasWalletProvider/isWaasWalletProvider.ts","../src/modules/waas/findWaasWalletProviderByChain/findWaasWalletProviderByChain.ts","../src/modules/waas/isWaasWalletAccount/isWaasWalletAccount.ts","../src/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.ts","../src/modules/auth/decodeJwt/decodeJwt.ts","../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/normalizeScopes/normalizeScopes.ts","../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/parseElevatedAccessToken/parseElevatedAccessToken.ts","../src/modules/auth/updateAuthFromVerifyResponse/elevatedAccessTokens/upsertElevatedAccessToken/upsertElevatedAccessToken.ts","../src/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.ts","../src/modules/wallets/getWalletProviderByKey/getWalletProviderByKey.ts","../src/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.ts"],"sourcesContent":["/**\n * Sefelly sets the cookie in the browser.\n * @not-instrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const setCookie = (cookie: string) => {\n // eslint-disable-next-line no-restricted-globals\n document.cookie = cookie;\n};\n","/* eslint-disable custom-rules/function-name-matches-filename */\nimport { getCore } from '../../client/core/getCore';\nimport { getDefaultClient } from '../../client/defaultClient';\nimport type { DynamicClient } from '../../client/types';\nimport type {\n DynamicEvents,\n EmitEventParams,\n OffEventParams,\n OnEventParams,\n OnceEventParams,\n} from './clientEvents.types';\n\n/**\n * Adds an event listener for Dynamic client events.\n *\n * This function allows you to listen for various events emitted by the Dynamic client,\n * such as authentication state changes, wallet connections, and more.\n *\n * @param params.event - The event name to listen for.\n * @param params.listener - The callback function to execute when the event is fired.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A function that can be called to remove the listener.\n * @not-instrumented\n */\nexport const onEvent = <E extends keyof DynamicEvents>(\n { event, listener }: OnEventParams<E>,\n client = getDefaultClient()\n) => {\n const { eventEmitter } = getCore(client);\n\n eventEmitter.on(event, listener);\n\n return () => {\n eventEmitter.off(event, listener);\n };\n};\n\n/**\n * Removes an event listener from Dynamic client events.\n *\n * This function unsubscribes a previously registered event listener\n * from the specified Dynamic client event.\n *\n * @param params.event - The event name to remove the listener from.\n * @param params.listener - The callback function to remove.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @not-instrumented\n */\n// eslint-disable-next-line custom-rules/one-function-per-file\nexport const offEvent = <E extends keyof DynamicEvents>(\n { event, listener }: OffEventParams<E>,\n client = getDefaultClient()\n) => {\n const { eventEmitter } = getCore(client);\n\n eventEmitter.off(event, listener);\n};\n\n/**\n * Adds a one-time event listener for Dynamic client events.\n *\n * This function listens for an event that will automatically remove itself\n * after being triggered once.\n *\n * @param params.event - The event name to listen for.\n * @param params.listener - The callback function to execute when the event is fired.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A function that can be called to remove the listener before it fires.\n * @not-instrumented\n */\n// eslint-disable-next-line custom-rules/one-function-per-file\nexport const onceEvent = <E extends keyof DynamicEvents>(\n { event, listener }: OnceEventParams<E>,\n client = getDefaultClient()\n) => {\n const { eventEmitter } = getCore(client);\n\n eventEmitter.once(event, listener);\n\n return () => {\n eventEmitter.off(event, listener);\n };\n};\n\n/**\n * Emits a Dynamic client event.\n *\n * This function triggers an event that will be received by all registered\n * listeners for the specified event type.\n *\n * @param params.event - The event name to emit.\n * @param params.args - The arguments to pass to event listeners.\n * @param client - The Dynamic client instance.\n * @not-instrumented\n */\n// eslint-disable-next-line custom-rules/one-function-per-file\nexport const emitEvent = <E extends keyof DynamicEvents>(\n { event, args }: EmitEventParams<E>,\n client: DynamicClient\n) => {\n const { eventEmitter } = getCore(client);\n\n eventEmitter.emit(event, args);\n};\n","import { BaseError } from './base';\n\nexport class InvalidWalletProviderKeyError extends BaseError {\n // eslint-disable-next-line custom-rules/require-single-object-param\n constructor(value: string) {\n super({\n cause: null,\n code: 'invalid_wallet_provider_key',\n docsUrl: null,\n name: 'InvalidWalletProviderKeyError',\n shortMessage: `Invalid wallet provider key: ${value}. Key must be in the format of <normalizedWalletNameWithChain>:<walletProviderType>[:<suffix>]`,\n });\n }\n}\n","import { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';\n\nimport { InvalidWalletProviderKeyError } from '../../../../errors/InvalidWalletProviderKeyError';\n\ntype SplitWalletProviderKeyResult = {\n normalizedWalletNameWithChain: string;\n suffix: string | undefined;\n walletProviderType: WalletProviderEnum;\n};\n\n/** @not-instrumented */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const splitWalletProviderKey = (\n walletProviderKey: string\n): SplitWalletProviderKeyResult => {\n const [normalizedWalletNameWithChain, walletProviderType, suffix, ...rest] =\n walletProviderKey.split(':');\n\n if (\n !normalizedWalletNameWithChain ||\n !Object.values(WalletProviderEnum).includes(\n walletProviderType as WalletProviderEnum\n ) ||\n rest.length > 0\n ) {\n throw new InvalidWalletProviderKeyError(walletProviderKey);\n }\n\n return {\n normalizedWalletNameWithChain,\n suffix,\n walletProviderType: walletProviderType as WalletProviderEnum,\n };\n};\n","import type { Chain } from '../../../chain';\n\nexport type NormalizeAddressOptions = {\n /** The raw address to normalize. */\n address: string;\n\n /** The chain the address belongs to. */\n chain: Chain;\n};\n\n/** @not-instrumented */\nexport const normalizeAddress = ({ address, chain }: NormalizeAddressOptions) => {\n let normalizedAddress = address;\n\n if (normalizedAddress?.startsWith('0x')) {\n normalizedAddress = normalizedAddress.slice(2);\n }\n\n /**\n * These are standard from CAIP-2: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md\n * see also: https://github.com/ChainAgnostic/namespaces\n * note: no standard namespace currently exists for flow\n */\n const chainsThatRequireLowercaseAddress: Chain[] = ['EVM', 'FLOW'];\n\n normalizedAddress = chainsThatRequireLowercaseAddress.includes(chain)\n ? normalizedAddress?.toLowerCase()\n : normalizedAddress;\n\n return normalizedAddress;\n};\n","import type { Chain } from '../../../chain';\nimport { splitWalletProviderKey } from '../../walletProvider/splitWalletProviderKey';\nimport { normalizeAddress } from '../normalizeAddress';\n\ntype CreateWalletAccountIdParams = {\n address: string;\n chain: Chain;\n walletProviderKey: string;\n};\n\n/** @not-instrumented */\nexport const formatWalletAccountId = ({\n address,\n chain,\n walletProviderKey,\n}: CreateWalletAccountIdParams): string => {\n const { normalizedWalletNameWithChain } =\n splitWalletProviderKey(walletProviderKey);\n\n const normalizedAddress = normalizeAddress({ address, chain });\n\n return `${normalizedWalletNameWithChain}:${normalizedAddress}`;\n};\n","import type { UnverifiedWalletAccount } from '../../unverifiedWalletAccounts';\nimport type { WalletAccount } from '../../walletAccount';\nimport { formatWalletAccountId } from '../formatWalletAccountId';\n\ntype ConvertUnverifiedWalletAccountToWalletAccountParams = {\n unverifiedWalletAccount: UnverifiedWalletAccount;\n};\n\n/** @not-instrumented */\nexport const convertUnverifiedWalletAccountToWalletAccount = ({\n unverifiedWalletAccount,\n}: ConvertUnverifiedWalletAccountToWalletAccountParams): WalletAccount => ({\n address: unverifiedWalletAccount.address,\n addressesWithTypes: unverifiedWalletAccount.addressesWithTypes,\n chain: unverifiedWalletAccount.chain,\n id: formatWalletAccountId({\n address: unverifiedWalletAccount.address,\n chain: unverifiedWalletAccount.chain,\n walletProviderKey: unverifiedWalletAccount.walletProviderKey,\n }),\n lastSelectedAt: unverifiedWalletAccount.lastSelectedAt,\n verifiedCredentialId: null,\n walletProviderKey: unverifiedWalletAccount.walletProviderKey,\n});\n","import type { Chain } from '../../../chain';\n\ntype NormalizeWalletNameWithChainParams = {\n chain: Chain;\n displayName: string;\n};\n\n/**\n * Format the raw wallet name and chain to get the value we can use for\n * verified credentials' `walletName` field.\n * @not-instrumented\n */\nexport const normalizeWalletNameWithChain = ({\n displayName,\n chain,\n}: NormalizeWalletNameWithChainParams): string => {\n const sanitizedWalletName = displayName\n .replace(/[^a-zA-Z0-9]/g, '')\n .toLowerCase();\n\n const chainLowered = chain.toLocaleLowerCase();\n\n if (sanitizedWalletName.endsWith(chainLowered)) {\n return sanitizedWalletName;\n }\n\n return `${sanitizedWalletName}${chainLowered}`;\n};\n","import type { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';\n\nimport type { Chain } from '../../../chain';\nimport { normalizeWalletNameWithChain } from '../normalizeWalletNameWithChain';\n\ntype FormatWalletProviderKeyParams = {\n chain: Chain;\n displayName: string;\n suffix?: string;\n walletProviderType: WalletProviderEnum;\n};\n\n/**\n * Assembles the wallet provider key from the wallet name, chain, and wallet provider type.\n *\n * The suffix is optional and can be used to add a uniquely identifying string to the key, which\n * might be necessary for some wallet providers (like Wallet Connect).\n *\n * IMPORTANT: Do NOT add a suffix unless absolutely necessary, as it will cause the wallet account\n * to not be able to find its wallet provider when connecting to a new device (it won't be possible\n * to determine the full key just from the Verified Credential data).\n * @not-instrumented\n */\nexport const formatWalletProviderKey = ({\n suffix,\n chain,\n displayName,\n walletProviderType,\n}: FormatWalletProviderKeyParams) => {\n const normalizedNameWithChain = normalizeWalletNameWithChain({\n chain,\n displayName,\n });\n\n return `${normalizedNameWithChain}:${walletProviderType}${\n suffix ? `:${suffix}` : ''\n }`;\n};\n","import type { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../../../client/core/getCore';\nimport type { DynamicClient } from '../../../../../client/types';\nimport { assertDefined } from '../../../../../utils/assertDefined';\nimport { getChainFromVerifiedCredentialChain } from '../../../../../utils/getChainFromVerifiedCredentialChain';\nimport { formatWalletProviderKey } from '../../../utils/formatWalletProviderKey';\n\ntype GetWalletProviderKeyFromVerifiedCredentialParams = {\n verifiedCredential: JwtVerifiedCredential;\n};\n\n/** @not-instrumented */\nexport const getWalletProviderKeyFromVerifiedCredential = (\n { verifiedCredential }: GetWalletProviderKeyFromVerifiedCredentialParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const { walletProviderKeyMap } = core.state.get();\n\n const storedWalletProviderKey = walletProviderKeyMap[verifiedCredential.id];\n\n if (storedWalletProviderKey) {\n return { walletProviderKey: storedWalletProviderKey };\n }\n\n /**\n * We fallback to comprising the wallet provider key from walletName and walletProvider.\n *\n * Some wallet provider types (like Wallet Connect) also use a special suffix for their wallet provider\n * keys, so this won't be enough for them.\n * Therefore, for those specific wallet providers, the wallet account will remain without a wallet provider\n * and will require reconnection.\n * Read walletProvider.types.ts for more info.\n */\n assertDefined(\n verifiedCredential.walletName,\n `Failed to get wallet provider for verified credential with ID ${verifiedCredential.id}: missing walletName`\n );\n\n assertDefined(\n verifiedCredential.walletProvider,\n `Failed to get wallet provider for verified credential with ID ${verifiedCredential.id}: missing walletProvider`\n );\n\n assertDefined(\n verifiedCredential.chain,\n `Failed to get wallet provider for verified credential with ID ${verifiedCredential.id}: missing chain`\n );\n\n /**\n * Historically, walletNames did not include the chain name as a suffix.\n * This piece of logic simply ensures we normalize any legacy walletNames to conform.\n */\n const chain = getChainFromVerifiedCredentialChain(verifiedCredential.chain);\n\n const walletProviderKey = formatWalletProviderKey({\n chain,\n displayName: verifiedCredential.walletName,\n walletProviderType: verifiedCredential.walletProvider,\n });\n\n return { walletProviderKey };\n};\n","import type { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';\n\nimport type { DynamicClient } from '../../../../client/types';\nimport { assertDefined } from '../../../../utils/assertDefined';\nimport { getChainFromVerifiedCredentialChain } from '../../../../utils/getChainFromVerifiedCredentialChain';\nimport type { HardwareWalletVendor } from '../../hardwareWallet/hardwareWallet.types';\nimport type { WalletAccount } from '../../walletAccount';\nimport { getWalletProviderKeyFromVerifiedCredential } from '../../walletProvider/walletProviderKeyMap/getWalletProviderKeyFromVerifiedCredential';\nimport { formatWalletAccountId } from '../formatWalletAccountId';\n\ntype ConvertVerifiedCredentialToWalletAccountParams = {\n verifiedCredential: JwtVerifiedCredential;\n};\n\n/** @not-instrumented */\nexport const convertVerifiedCredentialToWalletAccount = (\n { verifiedCredential }: ConvertVerifiedCredentialToWalletAccountParams,\n client: DynamicClient\n): WalletAccount => {\n assertDefined(\n verifiedCredential.address,\n 'Missing address in verified credential'\n );\n assertDefined(\n verifiedCredential.chain,\n 'Missing chain in verified credential'\n );\n\n const chain = getChainFromVerifiedCredentialChain(verifiedCredential.chain);\n\n const { walletProviderKey } = getWalletProviderKeyFromVerifiedCredential(\n {\n verifiedCredential,\n },\n client\n );\n\n const walletAccountId = formatWalletAccountId({\n address: verifiedCredential.address,\n chain,\n walletProviderKey,\n });\n\n return {\n address: verifiedCredential.address,\n addressesWithTypes: verifiedCredential.walletAdditionalAddresses,\n chain,\n hardwareWalletVendor: verifiedCredential.walletProperties?.hardwareWallet as\n | HardwareWalletVendor\n | undefined,\n id: walletAccountId,\n lastSelectedAt: verifiedCredential.lastSelectedAt ?? null,\n verifiedCredentialId: verifiedCredential.id,\n walletProviderKey,\n };\n};\n","import type { SdkUser } from '@dynamic-labs/sdk-api-core';\nimport { JwtVerifiedCredentialFormatEnum } from '@dynamic-labs/sdk-api-core';\n\nimport type { DynamicClient } from '../../../../client/types';\nimport type { UnverifiedWalletAccount } from '../../unverifiedWalletAccounts';\nimport { convertUnverifiedWalletAccountToWalletAccount } from '../../utils/convertUnverifiedWalletAccountToWalletAccount';\nimport { convertVerifiedCredentialToWalletAccount } from '../../utils/convertVerifiedCredentialToWalletAccount';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetWalletAccountsFromStateParams = {\n unverifiedWalletAccounts: UnverifiedWalletAccount[];\n user: SdkUser | null;\n};\n\n/** @not-instrumented */\nexport const getWalletAccountsFromState = (\n { unverifiedWalletAccounts, user }: GetWalletAccountsFromStateParams,\n client: DynamicClient\n): WalletAccount[] => {\n const walletAccountsMap: Map<string, WalletAccount> = new Map();\n\n /**\n * Handle the unverified wallet accounts before the user verified credentials\n * so the later verified wallet accounts can override the unverified wallet accounts\n */\n unverifiedWalletAccounts.forEach((unverifiedWalletAccount) => {\n const walletAccount = convertUnverifiedWalletAccountToWalletAccount({\n unverifiedWalletAccount,\n });\n\n walletAccountsMap.set(walletAccount.id, walletAccount);\n });\n\n /**\n * Handle user verified credentials\n */\n const verifiedCredentials = user?.verifiedCredentials ?? [];\n\n verifiedCredentials\n .filter(\n (verified) =>\n verified.format === JwtVerifiedCredentialFormatEnum.Blockchain\n )\n .forEach((verifiedWalletAccount) => {\n const walletAccount = convertVerifiedCredentialToWalletAccount(\n {\n verifiedCredential: verifiedWalletAccount,\n },\n client\n );\n\n walletAccountsMap.set(walletAccount.id, walletAccount);\n });\n\n return Array.from(walletAccountsMap.values());\n};\n","import { getCore } from '../../../client/core/getCore';\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport type { WalletAccount } from '../walletAccount';\nimport { getWalletAccountsFromState } from './getWalletAccountsFromState';\n\n/**\n * Retrieves all wallet accounts associated with the current session.\n *\n * This function returns both verified and unverified wallet accounts,\n * combining data from user credentials and local unverified accounts.\n * You can differentiate between verified and unverified wallet accounts by\n * checking the `verifiedCredentialId` property.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns An array of wallet accounts associated with the session.\n * @not-instrumented\n */\nexport const getWalletAccounts = (\n client = getDefaultClient()\n): WalletAccount[] => {\n const core = getCore(client);\n const { unverifiedWalletAccounts, user } = core.state.get();\n\n return getWalletAccountsFromState({ unverifiedWalletAccounts, user }, client);\n};\n","import { BaseError } from './base';\n\ntype NoWalletProviderFoundErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NoWalletProviderFoundError extends BaseError {\n constructor({ walletProviderKey }: NoWalletProviderFoundErrorParams) {\n super({\n cause: null,\n code: 'no_wallet_provider_found_error',\n docsUrl: null,\n name: 'NoWalletProviderFoundError',\n shortMessage: `No wallet provider found with key: ${walletProviderKey}`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { getCore } from '../../../client/core/getCore';\n\n/**\n * Creates a service accessor function that manages service instantiation and caching.\n * The returned function will either retrieve an existing service from the registry or\n * create a new one using the provided builder function.\n *\n * @template - The type of service to be created/accessed\n * @param key - Unique identifier for the service in the registry\n * @param builder - Function that creates the service instance when called with a DynamicClient\n * @not-instrumented\n */\nexport const createRuntimeServiceAccessKey =\n // eslint-disable-next-line custom-rules/require-single-object-param\n <T>(key: string, builder: (client: DynamicClient) => T) =>\n (client: DynamicClient): T => {\n const { runtimeServices } = getCore(client);\n\n const currentService = runtimeServices.getByKey<T>(key);\n\n if (currentService) {\n return currentService;\n }\n\n const service = builder(client);\n\n runtimeServices.register(key, service);\n\n return service;\n };\n","import type { DynamicClient } from '../../../../client/types';\nimport { emitEvent } from '../../../clientEvents';\nimport type { WalletProvider } from '../../walletProvider/walletProvider.types';\nimport type { WalletProviderRegistry } from '../walletProviderRegistry.types';\n\n/**\n * Creates a new wallet provider registry that manages wallet providers with priority-based registration.\n *\n * @returns The wallet provider registry instance\n *\n * @example\n * ```typescript\n * const registry = createWalletProviderRegistry();\n *\n * registry.register({\n * priority: WalletProviderPriority.WALLET_SDK,\n * walletProvider: myWalletProvider\n * });\n *\n * const provider = registry.getByKey('my-wallet-key');\n * const providers = registry.listProviders();\n * ```\n * @not-instrumented\n */\nexport const createWalletProviderRegistry = (\n client: DynamicClient\n): WalletProviderRegistry => {\n const registry = new Map<\n string,\n { priority: number; walletProvider: WalletProvider }\n >();\n\n return {\n getByKey: (key) => registry.get(key)?.walletProvider,\n listProviders: () =>\n Array.from(registry.values()).map((v) => v.walletProvider),\n register: (args) => {\n const existingEntry = registry.get(args.walletProvider.key);\n\n if (existingEntry) {\n if (existingEntry.priority < args.priority) {\n registry.set(args.walletProvider.key, args);\n\n emitEvent(\n {\n args: { walletProviderKey: args.walletProvider.key },\n event: 'walletProviderChanged',\n },\n client\n );\n }\n } else {\n registry.set(args.walletProvider.key, args);\n\n emitEvent(\n {\n args: { walletProvider: args.walletProvider },\n event: 'walletProviderRegistered',\n },\n client\n );\n\n emitEvent(\n {\n args: { walletProviderKey: args.walletProvider.key },\n event: 'walletProviderChanged',\n },\n client\n );\n }\n },\n unregister: (key) => {\n registry.delete(key);\n\n emitEvent(\n {\n args: { walletProviderKey: key },\n event: 'walletProviderUnregistered',\n },\n client\n );\n },\n };\n};\n","import { createRuntimeServiceAccessKey } from '../../../../services/runtimeServices';\nimport { createWalletProviderRegistry } from '../createWalletProviderRegistry';\n\n/**\n * This function provides access to a shared instance of the wallet provider registry.\n *\n * It ensures that the same registry instance is used throughout the client to maintaining\n * consistency of registered wallet providers across different parts of the codebase.\n *\n * @returns The wallet provider registry instance\n *\n * @example\n * ```typescript\n * // Get the registry instance\n * const registry = getWalletProviderRegistry();\n *\n * // Register a wallet provider\n * registry.register({\n * priority: WalletProviderPriority.WALLET_SDK,\n * walletProvider: myWalletProvider\n * });\n *\n * // Retrieve a specific provider\n * const provider = registry.getByKey('metamaskevm');\n * ```\n */\nexport const getWalletProviderRegistry = createRuntimeServiceAccessKey(\n 'walletProviderRegistry',\n (client) => createWalletProviderRegistry(client)\n);\n","import type { WalletProvider } from '../walletProvider/walletProvider.types';\n\n// eslint-disable-next-line custom-rules/no-enums\nexport enum WalletProviderPriority {\n /**\n * Highest priority should be used by wallet providers that implement\n * the most reliable wallet integration.\n * example: The SDK provided by the wallet provider.\n */\n WALLET_SDK = 100,\n /**\n * Medium priority should be used by wallet providers that implement\n * a wallet integration via some reliable standard.\n * example: A wallet provider that uses EIP6963 announcement.\n */\n WALLET_SELF_ANNOUNCEMENT_STANDARD = 50,\n /**\n * Low priority should be used by wallet providers that implement\n * a wallet integration on a less reliable standard.\n * example: A wallet provider that uses window.ethereum, where the\n * window key can be overridden by other extensions.\n */\n WINDOW_INJECT = 20,\n}\n\nexport type WalletProviderRegistry = {\n /**\n * Retrieves a wallet provider by its key.\n * @param key - The key of the wallet provider.\n * @returns The wallet provider.\n */\n getByKey: (key: string) => WalletProvider | undefined;\n /**\n * Retrieves all wallet providers.\n * @returns The wallet providers.\n */\n listProviders: () => WalletProvider[];\n /**\n * Registers a wallet provider.\n * @param args - The arguments for the wallet provider.\n */\n register: (args: {\n priority: WalletProviderPriority;\n walletProvider: WalletProvider;\n }) => void;\n /**\n * Unregisters a wallet provider.\n * @param key - The key of the wallet provider.\n */\n unregister: (key: string) => void;\n};\n","import type { DynamicClient } from '../../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../../errors/NoWalletProviderFoundError';\nimport type { WalletAccount } from '../../walletAccount';\nimport { getWalletProviderRegistry } from '../../walletProviderRegistry';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @not-instrumented */\nexport const getWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n) => {\n const walletProviderRegistry = getWalletProviderRegistry(client);\n\n const walletProvider = walletProviderRegistry.getByKey(\n walletAccount.walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: walletAccount.walletProviderKey,\n });\n }\n\n return walletProvider;\n};\n","export const DYNAMIC_AUTH_COOKIE_NAME = 'DYNAMIC_JWT_TOKEN';\n","import type { DynamicClient } from '../../../client/types';\nimport { emitEvent } from '../../clientEvents';\nimport { getWalletAccounts } from '../getWalletAccounts';\n\n/**\n * Emits the `walletAccountsChanged` event.\n * @not-instrumented\n */\nexport const emitWalletAccountsChangedEvent = (client: DynamicClient): void => {\n const walletAccounts = getWalletAccounts(client);\n\n emitEvent(\n {\n args: { walletAccounts },\n event: 'walletAccountsChanged',\n },\n client\n );\n};\n","import { getCore } from '../../../../client/core/getCore';\nimport type { DynamicClient } from '../../../../client/types';\nimport { emitWalletAccountsChangedEvent } from '../../../wallets/emitWalletAccountsChangedEvent';\nimport { getWalletAccountsFromState } from '../../../wallets/getWalletAccounts/getWalletAccountsFromState';\n\ntype CheckAndRaiseWalletAccountsChangedEventParams = {\n previousState: Readonly<DynamicCoreState>;\n};\n\n/** @not-instrumented */\nexport const checkAndRaiseWalletAccountsChangedEvent = (\n { previousState }: CheckAndRaiseWalletAccountsChangedEventParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const walletAccountsHashBefore = getWalletAccountsHash(previousState, client);\n\n const walletAccountsHashAfter = getWalletAccountsHash(\n core.state.get(),\n client\n );\n\n if (walletAccountsHashBefore !== walletAccountsHashAfter) {\n emitWalletAccountsChangedEvent(client);\n }\n};\n\n \n \nconst getWalletAccountsHash = (\n state: Readonly<DynamicCoreState>,\n client: DynamicClient\n) =>\n getWalletAccountsFromState(state, client)\n .map((walletAccount) => JSON.stringify(walletAccount))\n .sort()\n .join('-');\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if the user requires additional MFA authentication.\n *\n * This function determines if the current user session requires\n * additional multi-factor authentication to access certain features.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if the user needs additional MFA authentication, false otherwise.\n * @not-instrumented\n */\nexport const isUserMissingMfaAuth = (client = getDefaultClient()) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n return Boolean(user.scope?.includes('requiresAdditionalAuth'));\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { getWalletProviderRegistry } from '../walletProviderRegistry';\n\n/**\n * Get all available wallet providers to interact with internally.\n * @not-instrumented\n */\nexport const getWalletProviders = (client: DynamicClient) => {\n const walletProviderRegistry = getWalletProviderRegistry(client);\n\n return walletProviderRegistry.listProviders();\n};\n","import type { WalletProvider } from '../../wallets/walletProvider';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport type { WaasWalletProvider } from '../waas.types';\n\n/** @not-instrumented */\nexport const isWaasWalletProvider = (\n walletProvider: WalletProvider\n): walletProvider is WaasWalletProvider => {\n return walletProvider.key.includes(\n DYNAMIC_WAAS_METADATA.normalizedWalletName\n );\n};\n","import { WalletProviderEnum } from '@dynamic-labs/sdk-api-core';\n\nimport type { DynamicClient } from '../../../client/types/DynamicClient';\nimport type { Chain } from '../../chain';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { formatWalletProviderKey } from '../../wallets/utils/formatWalletProviderKey';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype FindWaasWalletProviderByChainParams = {\n chain: Chain;\n};\n\n/** @not-instrumented */\nexport const findWaasWalletProviderByChain = (\n { chain }: FindWaasWalletProviderByChainParams,\n client: DynamicClient\n): WaasWalletProvider | null => {\n const providers = getWalletProviders(client);\n\n const waasProviderKey = formatWalletProviderKey({\n chain,\n displayName: DYNAMIC_WAAS_METADATA.displayName,\n walletProviderType: WalletProviderEnum.EmbeddedWallet,\n });\n\n const waasProvider = providers.find(\n (provider) => provider.key === waasProviderKey && provider.chain === chain\n );\n\n if (!waasProvider || !isWaasWalletProvider(waasProvider)) {\n return null;\n }\n\n return waasProvider;\n};\n","import type { WalletAccount } from '../../wallets/walletAccount';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\n\ntype IsWaasWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/**\n * This function determines whether the provided wallet account is a Dynamic\n * WaaS wallet account.\n *\n * @param params.walletAccount - The wallet account to check.\n * @returns True if the wallet account is a WaaS wallet account, false otherwise.\n * @not-instrumented\n */\nexport const isWaasWalletAccount = ({\n walletAccount,\n}: IsWaasWalletAccountParams): boolean => {\n return walletAccount.walletProviderKey.includes(\n DYNAMIC_WAAS_METADATA.normalizedWalletName\n );\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { isUserMissingMfaAuth } from '../../mfa/isUserMissingMfaAuth';\nimport { getWalletAccounts } from '../../wallets/getWalletAccounts';\nimport { findWaasWalletProviderByChain } from '../findWaasWalletProviderByChain';\nimport { isWaasWalletAccount } from '../isWaasWalletAccount';\n\n/** @not-instrumented */\nexport const restoreUserSharesForAllWalletAccounts = async (\n client: DynamicClient\n) => {\n /**\n * Restoring the user shares will fails if the user is missing the MFA auth.\n * This early return prevents the attempt to restore the user shares to fail\n * when we know it will fails and just add noise to the logs.\n */\n if (isUserMissingMfaAuth(client)) {\n return;\n }\n\n const walletAccounts = getWalletAccounts(client);\n\n const waasWalletAccounts = walletAccounts.filter((walletAccount) =>\n isWaasWalletAccount({ walletAccount })\n );\n\n await Promise.all(\n waasWalletAccounts.map(async (walletAccount) => {\n const provider = findWaasWalletProviderByChain(\n { chain: walletAccount.chain },\n client\n );\n\n /**\n * The environment might not have the embedded wallet extensions installed.\n * In that case there is no provider for the chain and we can skip restoring the user share.\n */\n if (!provider) return;\n\n return provider.restoreUserShareForWalletAccount({ walletAccount });\n })\n );\n};\n","import { InvalidParamError } from '../../../errors/InvalidParamError';\n\nexport type JwtPayload = {\n [key: string]: unknown;\n exp: number;\n iat: number;\n scope: string;\n singleUse?: boolean;\n sub: string;\n};\n\n/**\n * Decodes a JWT token and returns the full payload.\n *\n * This function extracts and returns the complete JWT payload including scopes,\n * expiration time, and other claims.\n *\n * @param jwt - The JWT token string.\n * @returns The decoded JWT payload object.\n * @throws InvalidParamError if the token is invalid or cannot be decoded.\n *\n * @example\n * ```typescript\n * const payload = decodeJwt(jwt);\n * // Returns: { scopes: ['wallet:export'], exp: 1234567890, ... }\n * ```\n * @not-instrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const decodeJwt = (jwt: string): JwtPayload => {\n try {\n // JWT format: header.payload.signature\n const parts = jwt.split('.');\n if (parts.length !== 3) {\n throw new InvalidParamError('Invalid JWT format');\n }\n\n // Decode the payload (second part)\n // Base64URL decode: replace URL-safe characters and decode\n const base64Payload = parts[1].replaceAll('-', '+').replaceAll('_', '/');\n // Add padding if needed\n const paddedPayload =\n base64Payload + '='.repeat((4 - (base64Payload.length % 4)) % 4);\n const decodedPayload = atob(paddedPayload);\n const claims = JSON.parse(decodedPayload) as JwtPayload;\n\n return claims;\n } catch (error) {\n if (error instanceof InvalidParamError) {\n throw error;\n }\n throw new InvalidParamError(\n `Failed to decode JWT: ${\n error instanceof Error ? error.message : String(error)\n }`\n );\n }\n};\n","/**\n * Normalizes scopes by deduplicating and sorting them.\n * This creates a canonical representation for comparison.\n *\n * @param scopes - Array of scope strings (may contain duplicates)\n * @returns Normalized, sorted array of unique scopes\n * @not-instrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param\nexport const normalizeScopes = (scopes: string[]): string[] => {\n return [...new Set(scopes)].sort((a, b) => a.localeCompare(b));\n};\n","import { decodeJwt } from '../../../decodeJwt';\nimport type { ParsedElevatedAccessToken } from '../elevatedAccessTokens.types';\nimport { normalizeScopes } from '../normalizeScopes';\n\nexport type ParseElevatedAccessTokenOptions = {\n /** JWT string containing the elevated access token. */\n token: string;\n};\n\n/**\n * Validates and parses an elevated access token from a JWT string.\n * Extracts scopes, expiration, and validates the token structure.\n *\n * Policy decisions:\n * - Tokens without scopes are rejected (returns null)\n * - Tokens with empty scopes array are rejected (returns null)\n * - Tokens without exp field are rejected (returns null)\n * - Expired tokens are rejected (returns null)\n *\n * @returns Parsed token data or null if token is invalid/expired\n * @not-instrumented\n */\nexport const parseElevatedAccessToken = ({\n token,\n}: ParseElevatedAccessTokenOptions): ParsedElevatedAccessToken | null => {\n const payload = decodeJwt(token);\n const rawScopeClaim = payload?.scope;\n const processedScopes = rawScopeClaim?.split(' ') ?? [];\n const filteredScopes = processedScopes.filter((s) => s.length > 0);\n const singleUse = payload.singleUse ?? false;\n\n // Reject tokens without scopes or with empty scopes\n if (!filteredScopes || filteredScopes.length === 0) {\n return null;\n }\n\n // Reject tokens without exp field\n if (!payload.exp) {\n return null;\n }\n\n // Convert exp (seconds) to Date (milliseconds)\n const expiresAt = new Date(payload.exp * 1000);\n\n // Reject expired tokens\n if (expiresAt <= new Date()) {\n return null;\n }\n\n return {\n expiresAt,\n normalizedScopes: normalizeScopes(filteredScopes),\n scopes: filteredScopes,\n singleUse,\n token,\n };\n};\n","import type {\n ElevatedAccessToken,\n ParsedElevatedAccessToken,\n} from '../elevatedAccessTokens.types';\nimport { normalizeScopes } from '../normalizeScopes';\n\n/**\n * Upserts an elevated access token into the current tokens array.\n *\n * Policy: Only one token per normalized scope-set is allowed.\n * If a token with the same normalized scopes exists, it is replaced.\n * This ensures we don't accumulate multiple tokens for the same scope combination.\n *\n * @param currentTokens - Current array of elevated access tokens\n * @param newToken - New token to upsert\n * @returns Updated array of tokens with the new token upserted\n * @not-instrumented\n */\nexport const upsertElevatedAccessToken = ({\n currentTokens,\n newToken,\n}: {\n currentTokens: ElevatedAccessToken[];\n newToken: ParsedElevatedAccessToken;\n}): ElevatedAccessToken[] => {\n const newScopeKey = normalizeScopes(newToken.scopes).join(' ');\n\n // Remove any existing token with the same normalized scopes\n const filteredTokens = currentTokens.filter((existingToken) => {\n const existingScopeKey = normalizeScopes(existingToken.scopes).join(' ');\n return existingScopeKey !== newScopeKey;\n });\n\n // Add the new token\n return [\n ...filteredTokens,\n {\n expiresAt: newToken.expiresAt,\n scopes: newToken.scopes,\n singleUse: newToken.singleUse,\n token: newToken.token,\n },\n ];\n};\n","import type { VerifyResponse } from '@dynamic-labs/sdk-api-core';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicCoreState } from '../../../client/core/types';\nimport type { DynamicClient } from '../../../client/types';\nimport { setCookie } from '../../../utils/setCookie';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { restoreUserSharesForAllWalletAccounts } from '../../waas/restoreUserSharesForAllWalletAccounts';\nimport { DYNAMIC_AUTH_COOKIE_NAME } from '../consts';\nimport { checkAndRaiseWalletAccountsChangedEvent } from './checkAndRaiseWalletAccountsChangedEvent';\nimport { parseElevatedAccessToken } from './elevatedAccessTokens/parseElevatedAccessToken';\nimport { upsertElevatedAccessToken } from './elevatedAccessTokens/upsertElevatedAccessToken';\n\ntype UpdateAuthFromVerifyResponseParams = {\n response: VerifyResponse;\n};\n\n/** @not-instrumented */\nexport const updateAuthFromVerifyResponse = (\n { response }: UpdateAuthFromVerifyResponseParams,\n client: DynamicClient\n) => {\n const core = getCore(client);\n\n const previousState = { ...core.state.get() };\n\n const { user, minifiedJwt, jwt, expiresAt, mfaToken, elevatedAccessToken } =\n response;\n\n // Expires at is in seconds, so we need to convert it to milliseconds\n const sessionExpiresAt = new Date(expiresAt * 1000);\n\n const newState: Partial<DynamicCoreState> = {\n legacyToken: jwt ?? null,\n sessionExpiresAt: sessionExpiresAt,\n token: minifiedJwt ?? null,\n user,\n };\n\n // only override the mfaToken if a new one is provided in the response\n if (mfaToken) {\n newState.mfaToken = mfaToken;\n }\n\n // Add elevated access token to the array if a new one is provided in the response\n // Policy: Only one token per normalized scope-set is allowed (old tokens are replaced)\n // Always preserve existing tokens to ensure they're synced to storage\n const currentTokens = core.state.get().elevatedAccessTokens || [];\n newState.elevatedAccessTokens = currentTokens;\n \n if (elevatedAccessToken) {\n const parsedToken = parseElevatedAccessToken({\n token: elevatedAccessToken,\n });\n if (parsedToken) {\n newState.elevatedAccessTokens = upsertElevatedAccessToken({\n currentTokens,\n newToken: parsedToken,\n });\n }\n }\n\n core.state.set(newState);\n\n /**\n * For customers using a sandbox environment with cookies enabled, we need to set the cookie\n * programmatically because Redcoast won't set the cookie via headers. We set the cookie programmatically\n * so customers can access the cookie from document.cookie consistently between sandbox and live environments.\n */\n if (minifiedJwt && isCookieEnabled(client)) {\n const expireDate = sessionExpiresAt.toUTCString();\n\n setCookie(\n `${DYNAMIC_AUTH_COOKIE_NAME}=${minifiedJwt}; expires=${expireDate}; path=/; SameSite=Lax`\n );\n }\n\n checkAndRaiseWalletAccountsChangedEvent({ previousState }, client);\n\n // if the user is logging in, we should restore user shares\n // for all wallet accounts for performance reasons\n const isUserLoggingIn = !previousState.user && Boolean(newState.user);\n if (isUserLoggingIn) {\n void restoreUserSharesForAllWalletAccounts(client);\n }\n};\n","import type { DynamicClient } from '../../../client/types';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { getWalletProviders } from '../getWalletProviders';\n\ntype GetWalletProviderByKeyParams = {\n walletProviderKey: string;\n};\n\n/** @not-instrumented */\nexport const getWalletProviderByKey = (\n { walletProviderKey }: GetWalletProviderByKeyParams,\n client: DynamicClient\n) => {\n const walletProviders = getWalletProviders(client);\n\n const walletProvider = walletProviders.find(\n (walletProvider) => walletProvider.key === walletProviderKey\n );\n\n if (!walletProvider) {\n throw new NoWalletProviderFoundError({ walletProviderKey });\n }\n\n return walletProvider;\n};\n","import type { DynamicClient } from '../../../../client/types/DynamicClient';\nimport type { WalletAccount } from '../../walletAccount';\n\ntype GetVerifiedCredentialForWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @not-instrumented */\nexport const getVerifiedCredentialForWalletAccount = (\n { walletAccount }: GetVerifiedCredentialForWalletAccountParams,\n client: DynamicClient\n) => {\n return client.user?.verifiedCredentials.find(\n (vc) => vc.id === walletAccount.verifiedCredentialId\n );\n};\n"],"mappings":";;;;;;;;;AAKA,MAAa,aAAa,WAAmB;AAE3C,UAAS,SAAS;;;;;;;;;;;;;;;;;ACiBpB,MAAa,WACX,EAAE,OAAO,YACT,SAASA,4CAAkB,KACxB;CACH,MAAM,EAAE,iBAAiBC,kCAAQ,OAAO;AAExC,cAAa,GAAG,OAAO,SAAS;AAEhC,cAAa;AACX,eAAa,IAAI,OAAO,SAAS;;;;;;;;;;;;;;AAgBrC,MAAa,YACX,EAAE,OAAO,YACT,SAASD,4CAAkB,KACxB;CACH,MAAM,EAAE,iBAAiBC,kCAAQ,OAAO;AAExC,cAAa,IAAI,OAAO,SAAS;;;;;;;;;;;;;;AAgBnC,MAAa,aACX,EAAE,OAAO,YACT,SAASD,4CAAkB,KACxB;CACH,MAAM,EAAE,iBAAiBC,kCAAQ,O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