@dynamic-labs/legacy-client 0.0.0 → 5.0.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 (327) hide show
  1. package/CHANGELOG.md +6800 -0
  2. package/LICENSE +21 -0
  3. package/README.md +3 -0
  4. package/_virtual/_tslib.cjs +36 -0
  5. package/_virtual/_tslib.js +32 -0
  6. package/package.cjs +8 -0
  7. package/package.js +4 -0
  8. package/package.json +33 -1
  9. package/src/client/client.cjs +80 -0
  10. package/src/client/client.d.ts +108 -0
  11. package/src/client/client.js +75 -0
  12. package/src/client/core/core.cjs +84 -0
  13. package/src/client/core/core.d.ts +75 -0
  14. package/src/client/core/core.js +80 -0
  15. package/src/client/core/index.d.ts +1 -0
  16. package/src/client/core/modules/initializationModule/index.d.ts +1 -0
  17. package/src/client/core/modules/initializationModule/initializationModule.cjs +72 -0
  18. package/src/client/core/modules/initializationModule/initializationModule.d.ts +6 -0
  19. package/src/client/core/modules/initializationModule/initializationModule.js +68 -0
  20. package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.cjs +28 -0
  21. package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.d.ts +3 -0
  22. package/src/client/core/modules/manifestModule/createPartialManifest/createPartialManifest.js +24 -0
  23. package/src/client/core/modules/manifestModule/createPartialManifest/index.d.ts +1 -0
  24. package/src/client/core/modules/manifestModule/index.d.ts +1 -0
  25. package/src/client/core/modules/manifestModule/manifestModule.cjs +40 -0
  26. package/src/client/core/modules/manifestModule/manifestModule.d.ts +12 -0
  27. package/src/client/core/modules/manifestModule/manifestModule.js +36 -0
  28. package/src/client/core/modules/manifestModule/validateManifest/index.d.ts +1 -0
  29. package/src/client/core/modules/manifestModule/validateManifest/validateManifest.cjs +31 -0
  30. package/src/client/core/modules/manifestModule/validateManifest/validateManifest.d.ts +14 -0
  31. package/src/client/core/modules/manifestModule/validateManifest/validateManifest.js +26 -0
  32. package/src/client/core/modules/webViewLoadControllerRegistry/index.d.ts +1 -0
  33. package/src/client/core/modules/webViewLoadControllerRegistry/webViewLoadControllerRegistry.cjs +24 -0
  34. package/src/client/core/modules/webViewLoadControllerRegistry/webViewLoadControllerRegistry.d.ts +29 -0
  35. package/src/client/core/modules/webViewLoadControllerRegistry/webViewLoadControllerRegistry.js +20 -0
  36. package/src/client/index.d.ts +1 -0
  37. package/src/index.cjs +26 -0
  38. package/src/index.d.ts +14 -0
  39. package/src/index.js +14 -0
  40. package/src/modules/authModule/authModule.cjs +60 -0
  41. package/src/modules/authModule/authModule.d.ts +30 -0
  42. package/src/modules/authModule/authModule.js +56 -0
  43. package/src/modules/authModule/emailAuthModule/emailAuthModule.cjs +26 -0
  44. package/src/modules/authModule/emailAuthModule/emailAuthModule.d.ts +10 -0
  45. package/src/modules/authModule/emailAuthModule/emailAuthModule.js +22 -0
  46. package/src/modules/authModule/emailAuthModule/index.d.ts +1 -0
  47. package/src/modules/authModule/externalAuthModule/externalAuthModule.cjs +16 -0
  48. package/src/modules/authModule/externalAuthModule/externalAuthModule.d.ts +7 -0
  49. package/src/modules/authModule/externalAuthModule/externalAuthModule.js +12 -0
  50. package/src/modules/authModule/externalAuthModule/index.d.ts +1 -0
  51. package/src/modules/authModule/index.d.ts +1 -0
  52. package/src/modules/authModule/passkeyAuthModule/index.d.ts +1 -0
  53. package/src/modules/authModule/passkeyAuthModule/passkeyAuthModule.cjs +15 -0
  54. package/src/modules/authModule/passkeyAuthModule/passkeyAuthModule.d.ts +6 -0
  55. package/src/modules/authModule/passkeyAuthModule/passkeyAuthModule.js +11 -0
  56. package/src/modules/authModule/smsAuthModule/index.d.ts +1 -0
  57. package/src/modules/authModule/smsAuthModule/smsAuthModule.cjs +23 -0
  58. package/src/modules/authModule/smsAuthModule/smsAuthModule.d.ts +11 -0
  59. package/src/modules/authModule/smsAuthModule/smsAuthModule.js +19 -0
  60. package/src/modules/authModule/socialAuthModule/index.d.ts +1 -0
  61. package/src/modules/authModule/socialAuthModule/socialAuthModule.cjs +24 -0
  62. package/src/modules/authModule/socialAuthModule/socialAuthModule.d.ts +10 -0
  63. package/src/modules/authModule/socialAuthModule/socialAuthModule.js +20 -0
  64. package/src/modules/bitcoinModule/bitcoinModule.cjs +21 -0
  65. package/src/modules/bitcoinModule/bitcoinModule.d.ts +19 -0
  66. package/src/modules/bitcoinModule/bitcoinModule.js +17 -0
  67. package/src/modules/bitcoinModule/index.d.ts +1 -0
  68. package/src/modules/deviceRegistrationModule/deviceRegistrationModule.cjs +32 -0
  69. package/src/modules/deviceRegistrationModule/deviceRegistrationModule.d.ts +12 -0
  70. package/src/modules/deviceRegistrationModule/deviceRegistrationModule.js +28 -0
  71. package/src/modules/deviceRegistrationModule/index.d.ts +1 -0
  72. package/src/modules/instrumentationModule/index.d.ts +1 -0
  73. package/src/modules/instrumentationModule/instrumentationModule.cjs +40 -0
  74. package/src/modules/instrumentationModule/instrumentationModule.d.ts +6 -0
  75. package/src/modules/instrumentationModule/instrumentationModule.js +36 -0
  76. package/src/modules/localeModule/index.d.ts +1 -0
  77. package/src/modules/localeModule/localeModule.cjs +15 -0
  78. package/src/modules/localeModule/localeModule.d.ts +14 -0
  79. package/src/modules/localeModule/localeModule.js +11 -0
  80. package/src/modules/mfaModule/index.d.ts +1 -0
  81. package/src/modules/mfaModule/mfaModule.cjs +35 -0
  82. package/src/modules/mfaModule/mfaModule.d.ts +23 -0
  83. package/src/modules/mfaModule/mfaModule.js +31 -0
  84. package/src/modules/networksModule/index.d.ts +1 -0
  85. package/src/modules/networksModule/networksModule.cjs +18 -0
  86. package/src/modules/networksModule/networksModule.d.ts +3 -0
  87. package/src/modules/networksModule/networksModule.js +14 -0
  88. package/src/modules/passkeysModule/index.d.ts +1 -0
  89. package/src/modules/passkeysModule/passkeysModule.cjs +18 -0
  90. package/src/modules/passkeysModule/passkeysModule.d.ts +10 -0
  91. package/src/modules/passkeysModule/passkeysModule.js +14 -0
  92. package/src/modules/sdkModule/index.d.ts +1 -0
  93. package/src/modules/sdkModule/sdkModule.cjs +64 -0
  94. package/src/modules/sdkModule/sdkModule.d.ts +25 -0
  95. package/src/modules/sdkModule/sdkModule.js +60 -0
  96. package/src/modules/stepUpAuthModule/index.d.ts +1 -0
  97. package/src/modules/stepUpAuthModule/stepUpAuthModule.cjs +36 -0
  98. package/src/modules/stepUpAuthModule/stepUpAuthModule.d.ts +19 -0
  99. package/src/modules/stepUpAuthModule/stepUpAuthModule.js +32 -0
  100. package/src/modules/tonModule/index.d.ts +1 -0
  101. package/src/modules/tonModule/tonModule.cjs +19 -0
  102. package/src/modules/tonModule/tonModule.d.ts +15 -0
  103. package/src/modules/tonModule/tonModule.js +15 -0
  104. package/src/modules/userInterfaceModule/index.d.ts +1 -0
  105. package/src/modules/userInterfaceModule/userInterfaceModule.cjs +66 -0
  106. package/src/modules/userInterfaceModule/userInterfaceModule.d.ts +155 -0
  107. package/src/modules/userInterfaceModule/userInterfaceModule.js +62 -0
  108. package/src/modules/walletsModule/accountAbstractionModule/accountAbstractionModule.cjs +17 -0
  109. package/src/modules/walletsModule/accountAbstractionModule/accountAbstractionModule.d.ts +14 -0
  110. package/src/modules/walletsModule/accountAbstractionModule/accountAbstractionModule.js +13 -0
  111. package/src/modules/walletsModule/accountAbstractionModule/index.d.ts +1 -0
  112. package/src/modules/walletsModule/createWalletListenerMethods/createWalletListenerMethods.cjs +31 -0
  113. package/src/modules/walletsModule/createWalletListenerMethods/createWalletListenerMethods.d.ts +9 -0
  114. package/src/modules/walletsModule/createWalletListenerMethods/createWalletListenerMethods.js +27 -0
  115. package/src/modules/walletsModule/createWalletListenerMethods/index.d.ts +1 -0
  116. package/src/modules/walletsModule/delegationModule/delegationModule.cjs +32 -0
  117. package/src/modules/walletsModule/delegationModule/delegationModule.d.ts +14 -0
  118. package/src/modules/walletsModule/delegationModule/delegationModule.js +28 -0
  119. package/src/modules/walletsModule/delegationModule/index.d.ts +1 -0
  120. package/src/modules/walletsModule/embeddedWalletsModule/embeddedWalletsModule.cjs +32 -0
  121. package/src/modules/walletsModule/embeddedWalletsModule/embeddedWalletsModule.d.ts +11 -0
  122. package/src/modules/walletsModule/embeddedWalletsModule/embeddedWalletsModule.js +28 -0
  123. package/src/modules/walletsModule/embeddedWalletsModule/index.d.ts +1 -0
  124. package/src/modules/walletsModule/index.d.ts +1 -0
  125. package/src/modules/walletsModule/phantomModule/index.d.ts +1 -0
  126. package/src/modules/walletsModule/phantomModule/phantomModule.cjs +18 -0
  127. package/src/modules/walletsModule/phantomModule/phantomModule.d.ts +27 -0
  128. package/src/modules/walletsModule/phantomModule/phantomModule.js +14 -0
  129. package/src/modules/walletsModule/waasModule/index.d.ts +1 -0
  130. package/src/modules/walletsModule/waasModule/waasModule.cjs +25 -0
  131. package/src/modules/walletsModule/waasModule/waasModule.d.ts +16 -0
  132. package/src/modules/walletsModule/waasModule/waasModule.js +21 -0
  133. package/src/modules/walletsModule/walletsModule.cjs +69 -0
  134. package/src/modules/walletsModule/walletsModule.d.ts +40 -0
  135. package/src/modules/walletsModule/walletsModule.js +65 -0
  136. package/src/types.d.ts +2 -0
  137. package/src/utils/Extendable/Extendable.cjs +29 -0
  138. package/src/utils/Extendable/Extendable.d.ts +25 -0
  139. package/src/utils/Extendable/Extendable.js +25 -0
  140. package/src/utils/Extendable/deepMerge/deepMergeInto.cjs +26 -0
  141. package/src/utils/Extendable/deepMerge/deepMergeInto.d.ts +6 -0
  142. package/src/utils/Extendable/deepMerge/deepMergeInto.js +22 -0
  143. package/src/utils/Extendable/deepMerge/index.d.ts +1 -0
  144. package/src/utils/Extendable/hasExtension/hasExtension.cjs +14 -0
  145. package/src/utils/Extendable/hasExtension/hasExtension.d.ts +9 -0
  146. package/src/utils/Extendable/hasExtension/hasExtension.js +10 -0
  147. package/src/utils/Extendable/hasExtension/index.d.ts +1 -0
  148. package/src/utils/Extendable/index.d.ts +1 -0
  149. package/src/utils/addProperty/addProperty.cjs +21 -0
  150. package/src/utils/addProperty/addProperty.d.ts +13 -0
  151. package/src/utils/addProperty/addProperty.js +17 -0
  152. package/src/utils/addProperty/index.d.ts +1 -0
  153. package/src/utils/createWaitForAuthSuccess/createWaitForAuthSuccess.cjs +63 -0
  154. package/src/utils/createWaitForAuthSuccess/createWaitForAuthSuccess.d.ts +13 -0
  155. package/src/utils/createWaitForAuthSuccess/createWaitForAuthSuccess.js +59 -0
  156. package/src/utils/createWaitForAuthSuccess/index.d.ts +1 -0
  157. package/src/utils/diffMs/diffMs.cjs +12 -0
  158. package/src/utils/diffMs/diffMs.d.ts +5 -0
  159. package/src/utils/diffMs/diffMs.js +8 -0
  160. package/src/utils/diffMs/index.d.ts +1 -0
  161. package/src/utils/logger/index.d.ts +1 -0
  162. package/src/utils/logger/logger.cjs +10 -0
  163. package/src/utils/logger/logger.d.ts +2 -0
  164. package/src/utils/logger/logger.js +6 -0
  165. package/src/utils/pickListenerActions/index.d.ts +1 -0
  166. package/src/utils/pickListenerActions/pickListenerActions.cjs +23 -0
  167. package/src/utils/pickListenerActions/pickListenerActions.d.ts +7 -0
  168. package/src/utils/pickListenerActions/pickListenerActions.js +19 -0
  169. package/src/utils/randomString/index.d.ts +1 -0
  170. package/src/utils/randomString/randomString.cjs +16 -0
  171. package/src/utils/randomString/randomString.d.ts +7 -0
  172. package/src/utils/randomString/randomString.js +12 -0
  173. package/src/utils/setupFetchHandler/index.d.ts +1 -0
  174. package/src/utils/setupFetchHandler/setupFetchHandler.cjs +36 -0
  175. package/src/utils/setupFetchHandler/setupFetchHandler.d.ts +2 -0
  176. package/src/utils/setupFetchHandler/setupFetchHandler.js +32 -0
  177. package/src/utils/setupLogHandler/index.d.ts +1 -0
  178. package/src/utils/setupLogHandler/setupLogHandler.cjs +16 -0
  179. package/src/utils/setupLogHandler/setupLogHandler.d.ts +2 -0
  180. package/src/utils/setupLogHandler/setupLogHandler.js +12 -0
  181. package/src/webviewLoad/WebViewFailedToLoadError/WebViewFailedToLoadError.cjs +13 -0
  182. package/src/webviewLoad/WebViewFailedToLoadError/WebViewFailedToLoadError.d.ts +110 -0
  183. package/src/webviewLoad/WebViewFailedToLoadError/WebViewFailedToLoadError.js +9 -0
  184. package/src/webviewLoad/WebViewFailedToLoadError/index.d.ts +1 -0
  185. package/src/webviewLoad/assignEnvironmentIdToUrl/assignEnvironmentIdToUrl.cjs +14 -0
  186. package/src/webviewLoad/assignEnvironmentIdToUrl/assignEnvironmentIdToUrl.d.ts +1 -0
  187. package/src/webviewLoad/assignEnvironmentIdToUrl/assignEnvironmentIdToUrl.js +10 -0
  188. package/src/webviewLoad/assignEnvironmentIdToUrl/index.d.ts +1 -0
  189. package/src/webviewLoad/assignStartTimeToUrl/assignStartTimeToUrl.cjs +13 -0
  190. package/src/webviewLoad/assignStartTimeToUrl/assignStartTimeToUrl.d.ts +1 -0
  191. package/src/webviewLoad/assignStartTimeToUrl/assignStartTimeToUrl.js +9 -0
  192. package/src/webviewLoad/assignStartTimeToUrl/index.d.ts +1 -0
  193. package/src/webviewLoad/classifyWebViewLoadError/classifyWebViewLoadError.cjs +45 -0
  194. package/src/webviewLoad/classifyWebViewLoadError/classifyWebViewLoadError.d.ts +26 -0
  195. package/src/webviewLoad/classifyWebViewLoadError/classifyWebViewLoadError.js +41 -0
  196. package/src/webviewLoad/classifyWebViewLoadError/constants.cjs +24 -0
  197. package/src/webviewLoad/classifyWebViewLoadError/constants.d.ts +7 -0
  198. package/src/webviewLoad/classifyWebViewLoadError/constants.js +16 -0
  199. package/src/webviewLoad/classifyWebViewLoadError/index.d.ts +2 -0
  200. package/src/webviewLoad/computeRetryBackoffMs/computeRetryBackoffMs.cjs +24 -0
  201. package/src/webviewLoad/computeRetryBackoffMs/computeRetryBackoffMs.d.ts +9 -0
  202. package/src/webviewLoad/computeRetryBackoffMs/computeRetryBackoffMs.js +18 -0
  203. package/src/webviewLoad/computeRetryBackoffMs/index.d.ts +1 -0
  204. package/src/webviewLoad/constants.cjs +17 -0
  205. package/src/webviewLoad/constants.d.ts +4 -0
  206. package/src/webviewLoad/constants.js +10 -0
  207. package/src/webviewLoad/createWebViewLoadController/createEmptyAttemptTimings/createEmptyAttemptTimings.cjs +14 -0
  208. package/src/webviewLoad/createWebViewLoadController/createEmptyAttemptTimings/createEmptyAttemptTimings.d.ts +14 -0
  209. package/src/webviewLoad/createWebViewLoadController/createEmptyAttemptTimings/createEmptyAttemptTimings.js +10 -0
  210. package/src/webviewLoad/createWebViewLoadController/createEmptyAttemptTimings/index.d.ts +1 -0
  211. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadController.cjs +288 -0
  212. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadController.d.ts +50 -0
  213. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadController.js +282 -0
  214. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadTelemetry/constants.cjs +45 -0
  215. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadTelemetry/constants.d.ts +29 -0
  216. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadTelemetry/constants.js +37 -0
  217. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadTelemetry/createWebViewLoadTelemetry.cjs +94 -0
  218. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadTelemetry/createWebViewLoadTelemetry.d.ts +38 -0
  219. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadTelemetry/createWebViewLoadTelemetry.js +90 -0
  220. package/src/webviewLoad/createWebViewLoadController/createWebViewLoadTelemetry/index.d.ts +2 -0
  221. package/src/webviewLoad/createWebViewLoadController/getPhaseDurations/getPhaseDurations.cjs +20 -0
  222. package/src/webviewLoad/createWebViewLoadController/getPhaseDurations/getPhaseDurations.d.ts +13 -0
  223. package/src/webviewLoad/createWebViewLoadController/getPhaseDurations/getPhaseDurations.js +16 -0
  224. package/src/webviewLoad/createWebViewLoadController/getPhaseDurations/index.d.ts +1 -0
  225. package/src/webviewLoad/createWebViewLoadController/index.d.ts +3 -0
  226. package/src/webviewLoad/createWebViewLoadController/recordEventTiming/index.d.ts +1 -0
  227. package/src/webviewLoad/createWebViewLoadController/recordEventTiming/recordEventTiming.cjs +37 -0
  228. package/src/webviewLoad/createWebViewLoadController/recordEventTiming/recordEventTiming.d.ts +9 -0
  229. package/src/webviewLoad/createWebViewLoadController/recordEventTiming/recordEventTiming.js +33 -0
  230. package/src/webviewLoad/createWebViewLoadController/webViewLoadAdapter/index.d.ts +1 -0
  231. package/src/webviewLoad/createWebViewLoadController/webViewLoadAdapter/webViewLoadAdapter.d.ts +11 -0
  232. package/src/webviewLoad/incrementRetryInUrl/incrementRetryInUrl.cjs +17 -0
  233. package/src/webviewLoad/incrementRetryInUrl/incrementRetryInUrl.d.ts +1 -0
  234. package/src/webviewLoad/incrementRetryInUrl/incrementRetryInUrl.js +13 -0
  235. package/src/webviewLoad/incrementRetryInUrl/index.d.ts +1 -0
  236. package/src/webviewLoad/index.d.ts +14 -0
  237. package/src/webviewLoad/isRaiseTerminalErrorEffect/index.d.ts +1 -0
  238. package/src/webviewLoad/isRaiseTerminalErrorEffect/isRaiseTerminalErrorEffect.cjs +8 -0
  239. package/src/webviewLoad/isRaiseTerminalErrorEffect/isRaiseTerminalErrorEffect.d.ts +13 -0
  240. package/src/webviewLoad/isRaiseTerminalErrorEffect/isRaiseTerminalErrorEffect.js +4 -0
  241. package/src/webviewLoad/isSdkReadyMessage/index.d.ts +1 -0
  242. package/src/webviewLoad/isSdkReadyMessage/isSdkReadyMessage.cjs +27 -0
  243. package/src/webviewLoad/isSdkReadyMessage/isSdkReadyMessage.d.ts +14 -0
  244. package/src/webviewLoad/isSdkReadyMessage/isSdkReadyMessage.js +23 -0
  245. package/src/webviewLoad/probeOrigin/index.d.ts +1 -0
  246. package/src/webviewLoad/probeOrigin/probeOrigin.cjs +45 -0
  247. package/src/webviewLoad/probeOrigin/probeOrigin.d.ts +23 -0
  248. package/src/webviewLoad/probeOrigin/probeOrigin.js +40 -0
  249. package/src/webviewLoad/sanitizeWebViewLoadOptions/index.d.ts +1 -0
  250. package/src/webviewLoad/sanitizeWebViewLoadOptions/sanitizeWebViewLoadOptions.cjs +54 -0
  251. package/src/webviewLoad/sanitizeWebViewLoadOptions/sanitizeWebViewLoadOptions.d.ts +14 -0
  252. package/src/webviewLoad/sanitizeWebViewLoadOptions/sanitizeWebViewLoadOptions.js +47 -0
  253. package/src/webviewLoad/sdkWebViewLoadState/index.d.ts +1 -0
  254. package/src/webviewLoad/sdkWebViewLoadState/sdkWebViewLoadState.cjs +20 -0
  255. package/src/webviewLoad/sdkWebViewLoadState/sdkWebViewLoadState.d.ts +42 -0
  256. package/src/webviewLoad/sdkWebViewLoadState/sdkWebViewLoadState.js +16 -0
  257. package/src/webviewLoad/webViewLoadOptions/index.d.ts +1 -0
  258. package/src/webviewLoad/webViewLoadOptions/webViewLoadOptions.d.ts +45 -0
  259. package/src/webviewLoad/webViewLoadStateMachine/canAcceptFailureInput/canAcceptFailureInput.cjs +14 -0
  260. package/src/webviewLoad/webViewLoadStateMachine/canAcceptFailureInput/canAcceptFailureInput.d.ts +2 -0
  261. package/src/webviewLoad/webViewLoadStateMachine/canAcceptFailureInput/canAcceptFailureInput.js +10 -0
  262. package/src/webviewLoad/webViewLoadStateMachine/canAcceptFailureInput/index.d.ts +1 -0
  263. package/src/webviewLoad/webViewLoadStateMachine/constants.cjs +64 -0
  264. package/src/webviewLoad/webViewLoadStateMachine/constants.d.ts +24 -0
  265. package/src/webviewLoad/webViewLoadStateMachine/constants.js +37 -0
  266. package/src/webviewLoad/webViewLoadStateMachine/getHtmlLoadTimeoutMs/getHtmlLoadTimeoutMs.cjs +19 -0
  267. package/src/webviewLoad/webViewLoadStateMachine/getHtmlLoadTimeoutMs/getHtmlLoadTimeoutMs.d.ts +2 -0
  268. package/src/webviewLoad/webViewLoadStateMachine/getHtmlLoadTimeoutMs/getHtmlLoadTimeoutMs.js +15 -0
  269. package/src/webviewLoad/webViewLoadStateMachine/getHtmlLoadTimeoutMs/index.d.ts +1 -0
  270. package/src/webviewLoad/webViewLoadStateMachine/handleBackoffElapsed/handleBackoffElapsed.cjs +34 -0
  271. package/src/webviewLoad/webViewLoadStateMachine/handleBackoffElapsed/handleBackoffElapsed.d.ts +2 -0
  272. package/src/webviewLoad/webViewLoadStateMachine/handleBackoffElapsed/handleBackoffElapsed.js +30 -0
  273. package/src/webviewLoad/webViewLoadStateMachine/handleBackoffElapsed/index.d.ts +1 -0
  274. package/src/webviewLoad/webViewLoadStateMachine/handleFailureInput/handleFailureInput.cjs +70 -0
  275. package/src/webviewLoad/webViewLoadStateMachine/handleFailureInput/handleFailureInput.d.ts +15 -0
  276. package/src/webviewLoad/webViewLoadStateMachine/handleFailureInput/handleFailureInput.js +66 -0
  277. package/src/webviewLoad/webViewLoadStateMachine/handleFailureInput/index.d.ts +1 -0
  278. package/src/webviewLoad/webViewLoadStateMachine/handleLoadRequested/handleLoadRequested.cjs +26 -0
  279. package/src/webviewLoad/webViewLoadStateMachine/handleLoadRequested/handleLoadRequested.d.ts +2 -0
  280. package/src/webviewLoad/webViewLoadStateMachine/handleLoadRequested/handleLoadRequested.js +22 -0
  281. package/src/webviewLoad/webViewLoadStateMachine/handleLoadRequested/index.d.ts +1 -0
  282. package/src/webviewLoad/webViewLoadStateMachine/handleLoadStarted/handleLoadStarted.cjs +28 -0
  283. package/src/webviewLoad/webViewLoadStateMachine/handleLoadStarted/handleLoadStarted.d.ts +2 -0
  284. package/src/webviewLoad/webViewLoadStateMachine/handleLoadStarted/handleLoadStarted.js +24 -0
  285. package/src/webviewLoad/webViewLoadStateMachine/handleLoadStarted/index.d.ts +1 -0
  286. package/src/webviewLoad/webViewLoadStateMachine/handleManifestReceived/handleManifestReceived.cjs +33 -0
  287. package/src/webviewLoad/webViewLoadStateMachine/handleManifestReceived/handleManifestReceived.d.ts +2 -0
  288. package/src/webviewLoad/webViewLoadStateMachine/handleManifestReceived/handleManifestReceived.js +29 -0
  289. package/src/webviewLoad/webViewLoadStateMachine/handleManifestReceived/index.d.ts +1 -0
  290. package/src/webviewLoad/webViewLoadStateMachine/handleNativeError/handleNativeError.cjs +32 -0
  291. package/src/webviewLoad/webViewLoadStateMachine/handleNativeError/handleNativeError.d.ts +2 -0
  292. package/src/webviewLoad/webViewLoadStateMachine/handleNativeError/handleNativeError.js +28 -0
  293. package/src/webviewLoad/webViewLoadStateMachine/handleNativeError/index.d.ts +1 -0
  294. package/src/webviewLoad/webViewLoadStateMachine/handlePageFinished/handlePageFinished.cjs +25 -0
  295. package/src/webviewLoad/webViewLoadStateMachine/handlePageFinished/handlePageFinished.d.ts +2 -0
  296. package/src/webviewLoad/webViewLoadStateMachine/handlePageFinished/handlePageFinished.js +21 -0
  297. package/src/webviewLoad/webViewLoadStateMachine/handlePageFinished/index.d.ts +1 -0
  298. package/src/webviewLoad/webViewLoadStateMachine/handleRecoveryRequested/handleRecoveryRequested.cjs +25 -0
  299. package/src/webviewLoad/webViewLoadStateMachine/handleRecoveryRequested/handleRecoveryRequested.d.ts +2 -0
  300. package/src/webviewLoad/webViewLoadStateMachine/handleRecoveryRequested/handleRecoveryRequested.js +21 -0
  301. package/src/webviewLoad/webViewLoadStateMachine/handleRecoveryRequested/index.d.ts +1 -0
  302. package/src/webviewLoad/webViewLoadStateMachine/handleResponseCommitted/handleResponseCommitted.cjs +28 -0
  303. package/src/webviewLoad/webViewLoadStateMachine/handleResponseCommitted/handleResponseCommitted.d.ts +2 -0
  304. package/src/webviewLoad/webViewLoadStateMachine/handleResponseCommitted/handleResponseCommitted.js +24 -0
  305. package/src/webviewLoad/webViewLoadStateMachine/handleResponseCommitted/index.d.ts +1 -0
  306. package/src/webviewLoad/webViewLoadStateMachine/handleRetryRequested/handleRetryRequested.cjs +38 -0
  307. package/src/webviewLoad/webViewLoadStateMachine/handleRetryRequested/handleRetryRequested.d.ts +2 -0
  308. package/src/webviewLoad/webViewLoadStateMachine/handleRetryRequested/handleRetryRequested.js +34 -0
  309. package/src/webviewLoad/webViewLoadStateMachine/handleRetryRequested/index.d.ts +1 -0
  310. package/src/webviewLoad/webViewLoadStateMachine/handleSdkReady/handleSdkReady.cjs +39 -0
  311. package/src/webviewLoad/webViewLoadStateMachine/handleSdkReady/handleSdkReady.d.ts +2 -0
  312. package/src/webviewLoad/webViewLoadStateMachine/handleSdkReady/handleSdkReady.js +35 -0
  313. package/src/webviewLoad/webViewLoadStateMachine/handleSdkReady/index.d.ts +1 -0
  314. package/src/webviewLoad/webViewLoadStateMachine/handleTimerExpired/handleTimerExpired.cjs +23 -0
  315. package/src/webviewLoad/webViewLoadStateMachine/handleTimerExpired/handleTimerExpired.d.ts +3 -0
  316. package/src/webviewLoad/webViewLoadStateMachine/handleTimerExpired/handleTimerExpired.js +19 -0
  317. package/src/webviewLoad/webViewLoadStateMachine/handleTimerExpired/index.d.ts +1 -0
  318. package/src/webviewLoad/webViewLoadStateMachine/index.d.ts +2 -0
  319. package/src/webviewLoad/webViewLoadStateMachine/noTransition/index.d.ts +1 -0
  320. package/src/webviewLoad/webViewLoadStateMachine/noTransition/noTransition.cjs +13 -0
  321. package/src/webviewLoad/webViewLoadStateMachine/noTransition/noTransition.d.ts +2 -0
  322. package/src/webviewLoad/webViewLoadStateMachine/noTransition/noTransition.js +9 -0
  323. package/src/webviewLoad/webViewLoadStateMachine/webViewLoadStateMachine.cjs +66 -0
  324. package/src/webviewLoad/webViewLoadStateMachine/webViewLoadStateMachine.d.ts +9 -0
  325. package/src/webviewLoad/webViewLoadStateMachine/webViewLoadStateMachine.js +61 -0
  326. package/src/webviewLoad/webViewLoadTypes/index.d.ts +1 -0
  327. package/src/webviewLoad/webViewLoadTypes/webViewLoadTypes.d.ts +156 -0
@@ -0,0 +1,35 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+ var webviewMessages = require('@dynamic-labs/webview-messages');
8
+ var pickListenerActions = require('../../utils/pickListenerActions/pickListenerActions.cjs');
9
+
10
+ const createMfaModule = (core) => {
11
+ const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
12
+ const messageEvents = messageTransport.createEventEmitterForMessages({
13
+ eventNames: webviewMessages.mfaEventNames,
14
+ messageTransport: core.messageTransport,
15
+ });
16
+ const publicMethods = {
17
+ addDevice: (...args) => requestChannel.request('addDevice', ...args),
18
+ authDevice: (...args) => requestChannel.request('authDevice', ...args),
19
+ authRecoveryCode: (...args) => requestChannel.request('authRecoveryCode', ...args),
20
+ authenticateDevice: (...args) => requestChannel.request('authenticateDevice', ...args),
21
+ authenticateRecoveryCode: (...args) => requestChannel.request('authenticateRecoveryCode', ...args),
22
+ completeAcknowledgement: (...args) => requestChannel.request('completeAcknowledgement', ...args),
23
+ deleteUserDevice: (...args) => requestChannel.request('deleteUserDevice', ...args),
24
+ getNewRecoveryCodes: (...args) => requestChannel.request('getNewRecoveryCodes', ...args),
25
+ getRecoveryCodes: (...args) => requestChannel.request('getRecoveryCodes', ...args),
26
+ getUserDevices: (...args) => requestChannel.request('getUserDevices', ...args),
27
+ isPendingRecoveryCodesAcknowledgment: (...args) => requestChannel.request('isPendingRecoveryCodesAcknowledgment', ...args),
28
+ isRequiredForAction: (...args) => requestChannel.request('isMfaRequiredForAction', ...args),
29
+ updateUserDevice: (...args) => requestChannel.request('updateUserDevice', ...args),
30
+ verifyDevice: (...args) => requestChannel.request('verifyDevice', ...args),
31
+ };
32
+ return Object.assign(pickListenerActions.pickListenerActions(messageEvents), publicMethods);
33
+ };
34
+
35
+ exports.createMfaModule = createMfaModule;
@@ -0,0 +1,23 @@
1
+ import { PickedEventListeners } from '@dynamic-labs/message-transport';
2
+ import { MfaMessages, mfaEventNames } from '@dynamic-labs/webview-messages';
3
+ import { Core } from '../../client/core';
4
+ type PublicMfaMessages = Pick<MfaMessages, typeof mfaEventNames[number]>;
5
+ type MfaModulePublicMethods = {
6
+ addDevice: MfaMessages['addDevice'];
7
+ authDevice: MfaMessages['authDevice'];
8
+ authRecoveryCode: MfaMessages['authRecoveryCode'];
9
+ authenticateDevice: MfaMessages['authenticateDevice'];
10
+ authenticateRecoveryCode: MfaMessages['authenticateRecoveryCode'];
11
+ completeAcknowledgement: MfaMessages['completeAcknowledgement'];
12
+ deleteUserDevice: MfaMessages['deleteUserDevice'];
13
+ getNewRecoveryCodes: MfaMessages['getNewRecoveryCodes'];
14
+ getRecoveryCodes: MfaMessages['getRecoveryCodes'];
15
+ getUserDevices: MfaMessages['getUserDevices'];
16
+ isPendingRecoveryCodesAcknowledgment: MfaMessages['isPendingRecoveryCodesAcknowledgment'];
17
+ isRequiredForAction: MfaMessages['isMfaRequiredForAction'];
18
+ updateUserDevice: MfaMessages['updateUserDevice'];
19
+ verifyDevice: MfaMessages['verifyDevice'];
20
+ };
21
+ export type MfaModule = PickedEventListeners<PublicMfaMessages> & MfaModulePublicMethods;
22
+ export declare const createMfaModule: (core: Core) => MfaModule;
23
+ export {};
@@ -0,0 +1,31 @@
1
+ 'use client'
2
+ import { createRequestChannel, createEventEmitterForMessages } from '@dynamic-labs/message-transport';
3
+ import { mfaEventNames } from '@dynamic-labs/webview-messages';
4
+ import { pickListenerActions } from '../../utils/pickListenerActions/pickListenerActions.js';
5
+
6
+ const createMfaModule = (core) => {
7
+ const requestChannel = createRequestChannel(core.messageTransport);
8
+ const messageEvents = createEventEmitterForMessages({
9
+ eventNames: mfaEventNames,
10
+ messageTransport: core.messageTransport,
11
+ });
12
+ const publicMethods = {
13
+ addDevice: (...args) => requestChannel.request('addDevice', ...args),
14
+ authDevice: (...args) => requestChannel.request('authDevice', ...args),
15
+ authRecoveryCode: (...args) => requestChannel.request('authRecoveryCode', ...args),
16
+ authenticateDevice: (...args) => requestChannel.request('authenticateDevice', ...args),
17
+ authenticateRecoveryCode: (...args) => requestChannel.request('authenticateRecoveryCode', ...args),
18
+ completeAcknowledgement: (...args) => requestChannel.request('completeAcknowledgement', ...args),
19
+ deleteUserDevice: (...args) => requestChannel.request('deleteUserDevice', ...args),
20
+ getNewRecoveryCodes: (...args) => requestChannel.request('getNewRecoveryCodes', ...args),
21
+ getRecoveryCodes: (...args) => requestChannel.request('getRecoveryCodes', ...args),
22
+ getUserDevices: (...args) => requestChannel.request('getUserDevices', ...args),
23
+ isPendingRecoveryCodesAcknowledgment: (...args) => requestChannel.request('isPendingRecoveryCodesAcknowledgment', ...args),
24
+ isRequiredForAction: (...args) => requestChannel.request('isMfaRequiredForAction', ...args),
25
+ updateUserDevice: (...args) => requestChannel.request('updateUserDevice', ...args),
26
+ verifyDevice: (...args) => requestChannel.request('verifyDevice', ...args),
27
+ };
28
+ return Object.assign(pickListenerActions(messageEvents), publicMethods);
29
+ };
30
+
31
+ export { createMfaModule };
@@ -0,0 +1 @@
1
+ export { createNetworksModule } from './networksModule';
@@ -0,0 +1,18 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+ var pickListenerActions = require('../../utils/pickListenerActions/pickListenerActions.cjs');
8
+
9
+ const createNetworksModule = (core) => {
10
+ const store = messageTransport.createStore({
11
+ initialState: { bitcoin: [], evm: [], solana: [], sui: [], ton: [] },
12
+ key: 'networks',
13
+ messageTransport: core.messageTransport,
14
+ });
15
+ return Object.assign(store.getters, pickListenerActions.pickListenerActions(store.eventEmitter));
16
+ };
17
+
18
+ exports.createNetworksModule = createNetworksModule;
@@ -0,0 +1,3 @@
1
+ import { NetworksModuleState } from '@dynamic-labs/webview-messages';
2
+ import { Core } from '../../client/core';
3
+ export declare const createNetworksModule: (core: Core) => import("@dynamic-labs/message-transport").StoreStateGetters<NetworksModuleState> & import("@dynamic-labs/message-transport").PickedEventListeners<import("@dynamic-labs/message-transport").StoreStateEvents<NetworksModuleState>>;
@@ -0,0 +1,14 @@
1
+ 'use client'
2
+ import { createStore } from '@dynamic-labs/message-transport';
3
+ import { pickListenerActions } from '../../utils/pickListenerActions/pickListenerActions.js';
4
+
5
+ const createNetworksModule = (core) => {
6
+ const store = createStore({
7
+ initialState: { bitcoin: [], evm: [], solana: [], sui: [], ton: [] },
8
+ key: 'networks',
9
+ messageTransport: core.messageTransport,
10
+ });
11
+ return Object.assign(store.getters, pickListenerActions(store.eventEmitter));
12
+ };
13
+
14
+ export { createNetworksModule };
@@ -0,0 +1 @@
1
+ export { createPasskeysModule } from './passkeysModule';
@@ -0,0 +1,18 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+
8
+ const createPasskeysModule = (core) => {
9
+ const passkeyModule = messageTransport.createRequestChannel(core.messageTransport);
10
+ return {
11
+ authenticateMFA: (...args) => passkeyModule.request('authenticatePasskeyMFA', ...args),
12
+ delete: (props) => passkeyModule.request('deletePasskey', props),
13
+ get: () => passkeyModule.request('getPasskeys'),
14
+ register: () => passkeyModule.request('registerPasskey'),
15
+ };
16
+ };
17
+
18
+ exports.createPasskeysModule = createPasskeysModule;
@@ -0,0 +1,10 @@
1
+ import { type PasskeyMessages } from '@dynamic-labs/webview-messages';
2
+ import { Core } from '../../client/core';
3
+ type PasskeyModule = {
4
+ authenticateMFA: PasskeyMessages['authenticatePasskeyMFA'];
5
+ delete: PasskeyMessages['deletePasskey'];
6
+ get: PasskeyMessages['getPasskeys'];
7
+ register: PasskeyMessages['registerPasskey'];
8
+ };
9
+ export declare const createPasskeysModule: (core: Core) => PasskeyModule;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ 'use client'
2
+ import { createRequestChannel } from '@dynamic-labs/message-transport';
3
+
4
+ const createPasskeysModule = (core) => {
5
+ const passkeyModule = createRequestChannel(core.messageTransport);
6
+ return {
7
+ authenticateMFA: (...args) => passkeyModule.request('authenticatePasskeyMFA', ...args),
8
+ delete: (props) => passkeyModule.request('deletePasskey', props),
9
+ get: () => passkeyModule.request('getPasskeys'),
10
+ register: () => passkeyModule.request('registerPasskey'),
11
+ };
12
+ };
13
+
14
+ export { createPasskeysModule };
@@ -0,0 +1 @@
1
+ export * from './sdkModule';
@@ -0,0 +1,64 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var reactivity = require('@vue/reactivity');
7
+ var messageTransport = require('@dynamic-labs/message-transport');
8
+ var pickListenerActions = require('../../utils/pickListenerActions/pickListenerActions.cjs');
9
+ var addProperty = require('../../utils/addProperty/addProperty.cjs');
10
+ var sdkWebViewLoadState = require('../../webviewLoad/sdkWebViewLoadState/sdkWebViewLoadState.cjs');
11
+
12
+ const createSdkModule = (core) => {
13
+ const store = messageTransport.createStore({
14
+ initialState: {
15
+ loaded: false,
16
+ },
17
+ key: 'sdk',
18
+ messageTransport: core.messageTransport,
19
+ });
20
+ const eventEmitter = store.eventEmitter;
21
+ const baseModule = Object.assign(store.getters, pickListenerActions.pickListenerActions(eventEmitter));
22
+ reactivity.effect(() => core.initialization.error, {
23
+ scheduler: () => eventEmitter.emit('error', core.initialization.error),
24
+ });
25
+ // Bridge the registered controller's state changes into this module's
26
+ // event emitter, so listeners attached before the controller exists still
27
+ // receive `loadStateChanged` once it is registered. A re-registration
28
+ // swaps the bridge to the new controller.
29
+ let unbridgeLoadStateChanged = null;
30
+ const bridgeLoadStateChanged = (controller) => {
31
+ unbridgeLoadStateChanged === null || unbridgeLoadStateChanged === void 0 ? void 0 : unbridgeLoadStateChanged();
32
+ unbridgeLoadStateChanged = controller.onStateChanged((loadState) => eventEmitter.emit('loadStateChanged', loadState));
33
+ };
34
+ const registeredController = core.webViewLoadControllerRegistry.getController();
35
+ if (registeredController)
36
+ bridgeLoadStateChanged(registeredController);
37
+ core.webViewLoadControllerRegistry.onRegistered(bridgeLoadStateChanged);
38
+ const getLoadState = () => {
39
+ var _a, _b;
40
+ return (_b = (_a = core.webViewLoadControllerRegistry.getController()) === null || _a === void 0 ? void 0 : _a.getState()) !== null && _b !== void 0 ? _b : sdkWebViewLoadState.createIdleSdkWebViewLoadState(core.initialization.error);
41
+ };
42
+ const retry = () => {
43
+ var _a, _b;
44
+ return (_b = (_a = core.webViewLoadControllerRegistry.getController()) === null || _a === void 0 ? void 0 : _a.retry()) !== null && _b !== void 0 ? _b : Promise.resolve(sdkWebViewLoadState.createIdleSdkWebViewLoadState(core.initialization.error));
45
+ };
46
+ const waitForReady = () => new Promise((resolve) => {
47
+ if (store.getters.loaded) {
48
+ resolve();
49
+ return;
50
+ }
51
+ const listener = (loaded) => {
52
+ if (loaded) {
53
+ baseModule.off('loadedChanged', listener);
54
+ resolve();
55
+ }
56
+ };
57
+ baseModule.on('loadedChanged', listener);
58
+ });
59
+ return Object.assign(addProperty.addProperty(addProperty.addProperty(baseModule, 'error', {
60
+ get: () => core.initialization.error,
61
+ }), 'loadState', { get: getLoadState }), { retry, waitForReady });
62
+ };
63
+
64
+ exports.createSdkModule = createSdkModule;
@@ -0,0 +1,25 @@
1
+ import { PickedEventListeners, StoreEventListeners } from '@dynamic-labs/message-transport';
2
+ import { SdkModuleState } from '@dynamic-labs/webview-messages';
3
+ import { Core } from '../../client/core';
4
+ import { SdkWebViewLoadState } from '../../webviewLoad/sdkWebViewLoadState';
5
+ type SdkEvents = {
6
+ error: (error: Error | null) => void;
7
+ loadStateChanged: (loadState: SdkWebViewLoadState) => void;
8
+ };
9
+ export type SdkModule = SdkModuleState & StoreEventListeners<SdkModuleState> & PickedEventListeners<SdkEvents> & {
10
+ readonly error: Error | null;
11
+ /**
12
+ * Public projection of the webview load engine. Falls back to an idle
13
+ * default until the platform extension registers its load controller.
14
+ */
15
+ readonly loadState: SdkWebViewLoadState;
16
+ /**
17
+ * Customer-facing retry of a failed (or backoff-pending) webview load.
18
+ * Resolves with the load state of the next `ready`/`failed` transition,
19
+ * or immediately when there is nothing to retry.
20
+ */
21
+ retry: () => Promise<SdkWebViewLoadState>;
22
+ waitForReady: () => Promise<void>;
23
+ };
24
+ export declare const createSdkModule: (core: Core) => SdkModule;
25
+ export {};
@@ -0,0 +1,60 @@
1
+ 'use client'
2
+ import { effect } from '@vue/reactivity';
3
+ import { createStore } from '@dynamic-labs/message-transport';
4
+ import { pickListenerActions } from '../../utils/pickListenerActions/pickListenerActions.js';
5
+ import { addProperty } from '../../utils/addProperty/addProperty.js';
6
+ import { createIdleSdkWebViewLoadState } from '../../webviewLoad/sdkWebViewLoadState/sdkWebViewLoadState.js';
7
+
8
+ const createSdkModule = (core) => {
9
+ const store = createStore({
10
+ initialState: {
11
+ loaded: false,
12
+ },
13
+ key: 'sdk',
14
+ messageTransport: core.messageTransport,
15
+ });
16
+ const eventEmitter = store.eventEmitter;
17
+ const baseModule = Object.assign(store.getters, pickListenerActions(eventEmitter));
18
+ effect(() => core.initialization.error, {
19
+ scheduler: () => eventEmitter.emit('error', core.initialization.error),
20
+ });
21
+ // Bridge the registered controller's state changes into this module's
22
+ // event emitter, so listeners attached before the controller exists still
23
+ // receive `loadStateChanged` once it is registered. A re-registration
24
+ // swaps the bridge to the new controller.
25
+ let unbridgeLoadStateChanged = null;
26
+ const bridgeLoadStateChanged = (controller) => {
27
+ unbridgeLoadStateChanged === null || unbridgeLoadStateChanged === void 0 ? void 0 : unbridgeLoadStateChanged();
28
+ unbridgeLoadStateChanged = controller.onStateChanged((loadState) => eventEmitter.emit('loadStateChanged', loadState));
29
+ };
30
+ const registeredController = core.webViewLoadControllerRegistry.getController();
31
+ if (registeredController)
32
+ bridgeLoadStateChanged(registeredController);
33
+ core.webViewLoadControllerRegistry.onRegistered(bridgeLoadStateChanged);
34
+ const getLoadState = () => {
35
+ var _a, _b;
36
+ return (_b = (_a = core.webViewLoadControllerRegistry.getController()) === null || _a === void 0 ? void 0 : _a.getState()) !== null && _b !== void 0 ? _b : createIdleSdkWebViewLoadState(core.initialization.error);
37
+ };
38
+ const retry = () => {
39
+ var _a, _b;
40
+ return (_b = (_a = core.webViewLoadControllerRegistry.getController()) === null || _a === void 0 ? void 0 : _a.retry()) !== null && _b !== void 0 ? _b : Promise.resolve(createIdleSdkWebViewLoadState(core.initialization.error));
41
+ };
42
+ const waitForReady = () => new Promise((resolve) => {
43
+ if (store.getters.loaded) {
44
+ resolve();
45
+ return;
46
+ }
47
+ const listener = (loaded) => {
48
+ if (loaded) {
49
+ baseModule.off('loadedChanged', listener);
50
+ resolve();
51
+ }
52
+ };
53
+ baseModule.on('loadedChanged', listener);
54
+ });
55
+ return Object.assign(addProperty(addProperty(baseModule, 'error', {
56
+ get: () => core.initialization.error,
57
+ }), 'loadState', { get: getLoadState }), { retry, waitForReady });
58
+ };
59
+
60
+ export { createSdkModule };
@@ -0,0 +1 @@
1
+ export { createStepUpAuthModule, type StepUpAuthModule, } from './stepUpAuthModule';
@@ -0,0 +1,36 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+
8
+ const createStepUpAuthModule = (core) => {
9
+ const store = messageTransport.createStore({
10
+ initialState: {
11
+ error: null,
12
+ isLoading: false,
13
+ otpVerification: null,
14
+ },
15
+ key: 'stepUpAuth',
16
+ messageTransport: core.messageTransport,
17
+ });
18
+ const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
19
+ const publicMethods = {
20
+ isStepUpRequired: (...args) => requestChannel.request('stepUpAuth_isStepUpRequired', ...args),
21
+ promptMfa: (...args) => requestChannel.request('stepUpAuth_promptMfa', ...args),
22
+ promptReauthenticate: (...args) => requestChannel.request('stepUpAuth_promptReauthenticate', ...args),
23
+ promptStepUpAuth: (...args) => requestChannel.request('stepUpAuth_promptStepUpAuth', ...args),
24
+ resetState: (...args) => requestChannel.request('stepUpAuth_resetState', ...args),
25
+ sendOtp: (...args) => requestChannel.request('stepUpAuth_sendOtp', ...args),
26
+ verifyOtp: (...args) => requestChannel.request('stepUpAuth_verifyOtp', ...args),
27
+ verifyPasskeyMfa: (...args) => requestChannel.request('stepUpAuth_verifyPasskeyMfa', ...args),
28
+ verifyRecoveryCode: (...args) => requestChannel.request('stepUpAuth_verifyRecoveryCode', ...args),
29
+ verifySocial: (...args) => requestChannel.request('stepUpAuth_verifySocial', ...args),
30
+ verifyTotpMfa: (...args) => requestChannel.request('stepUpAuth_verifyTotpMfa', ...args),
31
+ verifyWallet: (...args) => requestChannel.request('stepUpAuth_verifyWallet', ...args),
32
+ };
33
+ return Object.assign(store.getters, publicMethods);
34
+ };
35
+
36
+ exports.createStepUpAuthModule = createStepUpAuthModule;
@@ -0,0 +1,19 @@
1
+ import { StepUpAuthMessages, StepUpAuthState } from '@dynamic-labs/webview-messages';
2
+ import { Core } from '../../client/core';
3
+ type StepUpAuthModulePublicMethods = {
4
+ isStepUpRequired: StepUpAuthMessages['stepUpAuth_isStepUpRequired'];
5
+ promptMfa: StepUpAuthMessages['stepUpAuth_promptMfa'];
6
+ promptReauthenticate: StepUpAuthMessages['stepUpAuth_promptReauthenticate'];
7
+ promptStepUpAuth: StepUpAuthMessages['stepUpAuth_promptStepUpAuth'];
8
+ resetState: StepUpAuthMessages['stepUpAuth_resetState'];
9
+ sendOtp: StepUpAuthMessages['stepUpAuth_sendOtp'];
10
+ verifyOtp: StepUpAuthMessages['stepUpAuth_verifyOtp'];
11
+ verifyPasskeyMfa: StepUpAuthMessages['stepUpAuth_verifyPasskeyMfa'];
12
+ verifyRecoveryCode: StepUpAuthMessages['stepUpAuth_verifyRecoveryCode'];
13
+ verifySocial: StepUpAuthMessages['stepUpAuth_verifySocial'];
14
+ verifyTotpMfa: StepUpAuthMessages['stepUpAuth_verifyTotpMfa'];
15
+ verifyWallet: StepUpAuthMessages['stepUpAuth_verifyWallet'];
16
+ };
17
+ export type StepUpAuthModule = StepUpAuthModulePublicMethods & StepUpAuthState;
18
+ export declare const createStepUpAuthModule: (core: Core) => StepUpAuthModule;
19
+ export {};
@@ -0,0 +1,32 @@
1
+ 'use client'
2
+ import { createStore, createRequestChannel } from '@dynamic-labs/message-transport';
3
+
4
+ const createStepUpAuthModule = (core) => {
5
+ const store = createStore({
6
+ initialState: {
7
+ error: null,
8
+ isLoading: false,
9
+ otpVerification: null,
10
+ },
11
+ key: 'stepUpAuth',
12
+ messageTransport: core.messageTransport,
13
+ });
14
+ const requestChannel = createRequestChannel(core.messageTransport);
15
+ const publicMethods = {
16
+ isStepUpRequired: (...args) => requestChannel.request('stepUpAuth_isStepUpRequired', ...args),
17
+ promptMfa: (...args) => requestChannel.request('stepUpAuth_promptMfa', ...args),
18
+ promptReauthenticate: (...args) => requestChannel.request('stepUpAuth_promptReauthenticate', ...args),
19
+ promptStepUpAuth: (...args) => requestChannel.request('stepUpAuth_promptStepUpAuth', ...args),
20
+ resetState: (...args) => requestChannel.request('stepUpAuth_resetState', ...args),
21
+ sendOtp: (...args) => requestChannel.request('stepUpAuth_sendOtp', ...args),
22
+ verifyOtp: (...args) => requestChannel.request('stepUpAuth_verifyOtp', ...args),
23
+ verifyPasskeyMfa: (...args) => requestChannel.request('stepUpAuth_verifyPasskeyMfa', ...args),
24
+ verifyRecoveryCode: (...args) => requestChannel.request('stepUpAuth_verifyRecoveryCode', ...args),
25
+ verifySocial: (...args) => requestChannel.request('stepUpAuth_verifySocial', ...args),
26
+ verifyTotpMfa: (...args) => requestChannel.request('stepUpAuth_verifyTotpMfa', ...args),
27
+ verifyWallet: (...args) => requestChannel.request('stepUpAuth_verifyWallet', ...args),
28
+ };
29
+ return Object.assign(store.getters, publicMethods);
30
+ };
31
+
32
+ export { createStepUpAuthModule };
@@ -0,0 +1 @@
1
+ export { createTonModule, type TonModule } from './tonModule';
@@ -0,0 +1,19 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+
8
+ const createTonModule = (core) => {
9
+ const requestChannel = messageTransport.createRequestChannel(core.messageTransport);
10
+ return {
11
+ getBalance: (args) => requestChannel.request('ton_getBalance', args),
12
+ getNetworkDetails: (args) => requestChannel.request('ton_getNetworkDetails', args),
13
+ sendJetton: (args) => requestChannel.request('ton_sendJetton', args),
14
+ sendTon: (args) => requestChannel.request('ton_sendTon', args),
15
+ signMessage: (args) => requestChannel.request('ton_signMessage', args),
16
+ };
17
+ };
18
+
19
+ exports.createTonModule = createTonModule;
@@ -0,0 +1,15 @@
1
+ import type { TonMessages } from '@dynamic-labs/webview-messages';
2
+ import { Core } from '../../client/core';
3
+ export type TonModule = {
4
+ /** Signs a message with the specified TON wallet. */
5
+ signMessage: TonMessages['ton_signMessage'];
6
+ /** Sends TON to a recipient address. */
7
+ sendTon: TonMessages['ton_sendTon'];
8
+ /** Sends a Jetton (TON-native token) to a recipient address. */
9
+ sendJetton: TonMessages['ton_sendJetton'];
10
+ /** Returns the balance of the specified TON wallet. */
11
+ getBalance: TonMessages['ton_getBalance'];
12
+ /** Returns the network details (chainId + name) for the specified TON wallet. */
13
+ getNetworkDetails: TonMessages['ton_getNetworkDetails'];
14
+ };
15
+ export declare const createTonModule: (core: Core) => TonModule;
@@ -0,0 +1,15 @@
1
+ 'use client'
2
+ import { createRequestChannel } from '@dynamic-labs/message-transport';
3
+
4
+ const createTonModule = (core) => {
5
+ const requestChannel = createRequestChannel(core.messageTransport);
6
+ return {
7
+ getBalance: (args) => requestChannel.request('ton_getBalance', args),
8
+ getNetworkDetails: (args) => requestChannel.request('ton_getNetworkDetails', args),
9
+ sendJetton: (args) => requestChannel.request('ton_sendJetton', args),
10
+ sendTon: (args) => requestChannel.request('ton_sendTon', args),
11
+ signMessage: (args) => requestChannel.request('ton_signMessage', args),
12
+ };
13
+ };
14
+
15
+ export { createTonModule };
@@ -0,0 +1 @@
1
+ export { createUserInterfaceModule } from './userInterfaceModule';
@@ -0,0 +1,66 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var messageTransport = require('@dynamic-labs/message-transport');
7
+ var webviewMessages = require('@dynamic-labs/webview-messages');
8
+ var pickListenerActions = require('../../utils/pickListenerActions/pickListenerActions.cjs');
9
+
10
+ const createUserInterfaceModule = (core) => {
11
+ const userInterfaceRequestChannel = messageTransport.createRequestChannel(core.messageTransport);
12
+ const messageEvents = messageTransport.createEventEmitterForMessages({
13
+ eventNames: webviewMessages.userInterfaceEventNames,
14
+ messageTransport: core.messageTransport,
15
+ });
16
+ return Object.assign(pickListenerActions.pickListenerActions(messageEvents), {
17
+ auth: {
18
+ hide: () => userInterfaceRequestChannel.emit('hideAuthFlow'),
19
+ show: () => userInterfaceRequestChannel.emit('openAuthFlow'),
20
+ },
21
+ fundingOptions: {
22
+ hide: () => userInterfaceRequestChannel.emit('hideFundingOptions'),
23
+ show: () => userInterfaceRequestChannel.emit('openFundingOptions'),
24
+ },
25
+ mfa: {
26
+ chooseType: {
27
+ hide: () => userInterfaceRequestChannel.emit('hideMfaChooseType'),
28
+ show: () => userInterfaceRequestChannel.emit('openMfaChooseType'),
29
+ },
30
+ enterBackupCodes: {
31
+ hide: () => userInterfaceRequestChannel.emit('hideMfaEnterBackupCodes'),
32
+ show: () => userInterfaceRequestChannel.emit('openMfaEnterBackupCodes'),
33
+ },
34
+ manage: {
35
+ hide: () => userInterfaceRequestChannel.emit('hideMfaManage'),
36
+ show: () => userInterfaceRequestChannel.emit('openMfaManage'),
37
+ },
38
+ otpVerification: {
39
+ hide: () => userInterfaceRequestChannel.emit('hideMfaOTPVerification'),
40
+ show: () => userInterfaceRequestChannel.emit('openMfaOTPVerification'),
41
+ },
42
+ qrCode: {
43
+ hide: () => userInterfaceRequestChannel.emit('hideMfaQRCode'),
44
+ show: () => userInterfaceRequestChannel.emit('openMfaQRCode'),
45
+ },
46
+ show: (params) => userInterfaceRequestChannel.request('promptMfaAuth', params),
47
+ viewBackupCodes: {
48
+ hide: () => userInterfaceRequestChannel.emit('hideMfaViewBackupCodes'),
49
+ show: () => userInterfaceRequestChannel.emit('openMfaViewBackupCodes'),
50
+ },
51
+ },
52
+ updateUser: {
53
+ show: (params) => userInterfaceRequestChannel.request('updateUserWithModal', params),
54
+ },
55
+ userProfile: {
56
+ hide: () => userInterfaceRequestChannel.emit('hideUserProfile'),
57
+ show: () => userInterfaceRequestChannel.emit('openUserProfile'),
58
+ },
59
+ wallets: {
60
+ promptUpgradeToDynamicWaasFlow: () => userInterfaceRequestChannel.emit('promptUpgradeToDynamicWaasFlow'),
61
+ revealEmbeddedWalletKey: (params) => userInterfaceRequestChannel.emit('revealEmbeddedWalletKey', params),
62
+ },
63
+ });
64
+ };
65
+
66
+ exports.createUserInterfaceModule = createUserInterfaceModule;