@useragent-kit/sdk 0.0.0 → 0.0.1

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 (352) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +61 -3
  3. package/dist/adapters.d.ts +94 -0
  4. package/dist/adapters.d.ts.map +1 -0
  5. package/dist/adapters.js +188 -0
  6. package/dist/adapters.js.map +1 -0
  7. package/dist/api-protocol.d.ts +9 -0
  8. package/dist/api-protocol.d.ts.map +1 -0
  9. package/dist/api-protocol.js +9 -0
  10. package/dist/api-protocol.js.map +1 -0
  11. package/dist/bridge/contract.d.ts +66 -0
  12. package/dist/bridge/contract.d.ts.map +1 -0
  13. package/dist/bridge/contract.js +160 -0
  14. package/dist/bridge/contract.js.map +1 -0
  15. package/dist/bridge/index.d.ts +53 -0
  16. package/dist/bridge/index.d.ts.map +1 -0
  17. package/dist/bridge/index.js +302 -0
  18. package/dist/bridge/index.js.map +1 -0
  19. package/dist/bridge/types.d.ts +93 -0
  20. package/dist/bridge/types.d.ts.map +1 -0
  21. package/dist/bridge/types.js +9 -0
  22. package/dist/bridge/types.js.map +1 -0
  23. package/dist/chain.d.ts +198 -0
  24. package/dist/chain.d.ts.map +1 -0
  25. package/dist/chain.js +424 -0
  26. package/dist/chain.js.map +1 -0
  27. package/dist/errors.d.ts +22 -0
  28. package/dist/errors.d.ts.map +1 -0
  29. package/dist/errors.js +41 -0
  30. package/dist/errors.js.map +1 -0
  31. package/dist/events.d.ts +252 -0
  32. package/dist/events.d.ts.map +1 -0
  33. package/dist/events.js +54 -0
  34. package/dist/events.js.map +1 -0
  35. package/dist/experimental/file-transfer.d.ts +97 -0
  36. package/dist/experimental/file-transfer.d.ts.map +1 -0
  37. package/dist/experimental/file-transfer.js +1377 -0
  38. package/dist/experimental/file-transfer.js.map +1 -0
  39. package/dist/experimental/index.d.ts +7 -0
  40. package/dist/experimental/index.d.ts.map +1 -0
  41. package/dist/experimental/index.js +4 -0
  42. package/dist/experimental/index.js.map +1 -0
  43. package/dist/experimental/logger.d.ts +5 -0
  44. package/dist/experimental/logger.d.ts.map +1 -0
  45. package/dist/experimental/logger.js +74 -0
  46. package/dist/experimental/logger.js.map +1 -0
  47. package/dist/experimental/transport.d.ts +34 -0
  48. package/dist/experimental/transport.d.ts.map +1 -0
  49. package/dist/experimental/transport.js +43 -0
  50. package/dist/experimental/transport.js.map +1 -0
  51. package/dist/guest/claw.d.ts +10 -0
  52. package/dist/guest/claw.d.ts.map +1 -0
  53. package/dist/guest/claw.js +21 -0
  54. package/dist/guest/claw.js.map +1 -0
  55. package/dist/guest/crdt.d.ts +19 -0
  56. package/dist/guest/crdt.d.ts.map +1 -0
  57. package/dist/guest/crdt.js +64 -0
  58. package/dist/guest/crdt.js.map +1 -0
  59. package/dist/guest/data.d.ts +27 -0
  60. package/dist/guest/data.d.ts.map +1 -0
  61. package/dist/guest/data.js +61 -0
  62. package/dist/guest/data.js.map +1 -0
  63. package/dist/guest/files.d.ts +15 -0
  64. package/dist/guest/files.d.ts.map +1 -0
  65. package/dist/guest/files.js +24 -0
  66. package/dist/guest/files.js.map +1 -0
  67. package/dist/guest/index.d.ts +43 -0
  68. package/dist/guest/index.d.ts.map +1 -0
  69. package/dist/guest/index.js +44 -0
  70. package/dist/guest/index.js.map +1 -0
  71. package/dist/guest/media.d.ts +44 -0
  72. package/dist/guest/media.d.ts.map +1 -0
  73. package/dist/guest/media.js +97 -0
  74. package/dist/guest/media.js.map +1 -0
  75. package/dist/guest/mesh.d.ts +79 -0
  76. package/dist/guest/mesh.d.ts.map +1 -0
  77. package/dist/guest/mesh.js +153 -0
  78. package/dist/guest/mesh.js.map +1 -0
  79. package/dist/guest/navigate.d.ts +17 -0
  80. package/dist/guest/navigate.d.ts.map +1 -0
  81. package/dist/guest/navigate.js +169 -0
  82. package/dist/guest/navigate.js.map +1 -0
  83. package/dist/guest/statements.d.ts +18 -0
  84. package/dist/guest/statements.d.ts.map +1 -0
  85. package/dist/guest/statements.js +26 -0
  86. package/dist/guest/statements.js.map +1 -0
  87. package/dist/guest/telemetry.d.ts +88 -0
  88. package/dist/guest/telemetry.d.ts.map +1 -0
  89. package/dist/guest/telemetry.js +184 -0
  90. package/dist/guest/telemetry.js.map +1 -0
  91. package/dist/guest/types.d.ts +255 -0
  92. package/dist/guest/types.d.ts.map +1 -0
  93. package/dist/guest/types.js +9 -0
  94. package/dist/guest/types.js.map +1 -0
  95. package/dist/host-runtime-contract.d.ts +19 -0
  96. package/dist/host-runtime-contract.d.ts.map +1 -0
  97. package/dist/host-runtime-contract.js +80 -0
  98. package/dist/host-runtime-contract.js.map +1 -0
  99. package/dist/host-runtime-frame.d.ts +128 -0
  100. package/dist/host-runtime-frame.d.ts.map +1 -0
  101. package/dist/host-runtime-frame.js +881 -0
  102. package/dist/host-runtime-frame.js.map +1 -0
  103. package/dist/host-runtime-registry.d.ts +16 -0
  104. package/dist/host-runtime-registry.d.ts.map +1 -0
  105. package/dist/host-runtime-registry.js +53 -0
  106. package/dist/host-runtime-registry.js.map +1 -0
  107. package/dist/host-runtime.d.ts +106 -0
  108. package/dist/host-runtime.d.ts.map +1 -0
  109. package/dist/host-runtime.js +290 -0
  110. package/dist/host-runtime.js.map +1 -0
  111. package/dist/identity-adapter.d.ts +42 -0
  112. package/dist/identity-adapter.d.ts.map +1 -0
  113. package/dist/identity-adapter.js +43 -0
  114. package/dist/identity-adapter.js.map +1 -0
  115. package/dist/identity.d.ts +86 -0
  116. package/dist/identity.d.ts.map +1 -0
  117. package/dist/identity.js +223 -0
  118. package/dist/identity.js.map +1 -0
  119. package/dist/index.d.ts +91 -0
  120. package/dist/index.d.ts.map +1 -0
  121. package/dist/index.js +356 -0
  122. package/dist/index.js.map +1 -0
  123. package/dist/internal/api-protocol/api/protocol.d.ts +1402 -0
  124. package/dist/internal/api-protocol/api/protocol.d.ts.map +1 -0
  125. package/dist/internal/api-protocol/api/protocol.js +311 -0
  126. package/dist/internal/api-protocol/api/protocol.js.map +1 -0
  127. package/dist/internal/api-protocol/api/types.d.ts +24 -0
  128. package/dist/internal/api-protocol/api/types.d.ts.map +1 -0
  129. package/dist/internal/api-protocol/api/types.js +9 -0
  130. package/dist/internal/api-protocol/api/types.js.map +1 -0
  131. package/dist/internal/api-protocol/host-facade/connectionManager.d.ts +44 -0
  132. package/dist/internal/api-protocol/host-facade/connectionManager.d.ts.map +1 -0
  133. package/dist/internal/api-protocol/host-facade/connectionManager.js +349 -0
  134. package/dist/internal/api-protocol/host-facade/connectionManager.js.map +1 -0
  135. package/dist/internal/api-protocol/host-facade/protocolHandler.d.ts +24 -0
  136. package/dist/internal/api-protocol/host-facade/protocolHandler.d.ts.map +1 -0
  137. package/dist/internal/api-protocol/host-facade/protocolHandler.js +505 -0
  138. package/dist/internal/api-protocol/host-facade/protocolHandler.js.map +1 -0
  139. package/dist/internal/api-protocol/host-facade/types.d.ts +82 -0
  140. package/dist/internal/api-protocol/host-facade/types.d.ts.map +1 -0
  141. package/dist/internal/api-protocol/host-facade/types.js +14 -0
  142. package/dist/internal/api-protocol/host-facade/types.js.map +1 -0
  143. package/dist/internal/api-protocol/index.d.ts +39 -0
  144. package/dist/internal/api-protocol/index.d.ts.map +1 -0
  145. package/dist/internal/api-protocol/index.js +41 -0
  146. package/dist/internal/api-protocol/index.js.map +1 -0
  147. package/dist/internal/api-protocol/product-facade/hostApi.d.ts +392 -0
  148. package/dist/internal/api-protocol/product-facade/hostApi.d.ts.map +1 -0
  149. package/dist/internal/api-protocol/product-facade/hostApi.js +241 -0
  150. package/dist/internal/api-protocol/product-facade/hostApi.js.map +1 -0
  151. package/dist/internal/api-protocol/shared/codec/adapter.d.ts +41 -0
  152. package/dist/internal/api-protocol/shared/codec/adapter.d.ts.map +1 -0
  153. package/dist/internal/api-protocol/shared/codec/adapter.js +10 -0
  154. package/dist/internal/api-protocol/shared/codec/adapter.js.map +1 -0
  155. package/dist/internal/api-protocol/shared/codec/negotiation.d.ts +80 -0
  156. package/dist/internal/api-protocol/shared/codec/negotiation.d.ts.map +1 -0
  157. package/dist/internal/api-protocol/shared/codec/negotiation.js +129 -0
  158. package/dist/internal/api-protocol/shared/codec/negotiation.js.map +1 -0
  159. package/dist/internal/api-protocol/shared/codec/scale/adapter.d.ts +18 -0
  160. package/dist/internal/api-protocol/shared/codec/scale/adapter.d.ts.map +1 -0
  161. package/dist/internal/api-protocol/shared/codec/scale/adapter.js +23 -0
  162. package/dist/internal/api-protocol/shared/codec/scale/adapter.js.map +1 -0
  163. package/dist/internal/api-protocol/shared/codec/scale/primitives.d.ts +35 -0
  164. package/dist/internal/api-protocol/shared/codec/scale/primitives.d.ts.map +1 -0
  165. package/dist/internal/api-protocol/shared/codec/scale/primitives.js +96 -0
  166. package/dist/internal/api-protocol/shared/codec/scale/primitives.js.map +1 -0
  167. package/dist/internal/api-protocol/shared/codec/scale/v1/accounts.d.ts +65 -0
  168. package/dist/internal/api-protocol/shared/codec/scale/v1/accounts.d.ts.map +1 -0
  169. package/dist/internal/api-protocol/shared/codec/scale/v1/accounts.js +43 -0
  170. package/dist/internal/api-protocol/shared/codec/scale/v1/accounts.js.map +1 -0
  171. package/dist/internal/api-protocol/shared/codec/scale/v1/chainInteraction.d.ts +162 -0
  172. package/dist/internal/api-protocol/shared/codec/scale/v1/chainInteraction.d.ts.map +1 -0
  173. package/dist/internal/api-protocol/shared/codec/scale/v1/chainInteraction.js +81 -0
  174. package/dist/internal/api-protocol/shared/codec/scale/v1/chainInteraction.js.map +1 -0
  175. package/dist/internal/api-protocol/shared/codec/scale/v1/chat.d.ts +307 -0
  176. package/dist/internal/api-protocol/shared/codec/scale/v1/chat.d.ts.map +1 -0
  177. package/dist/internal/api-protocol/shared/codec/scale/v1/chat.js +105 -0
  178. package/dist/internal/api-protocol/shared/codec/scale/v1/chat.js.map +1 -0
  179. package/dist/internal/api-protocol/shared/codec/scale/v1/commonCodecs.d.ts +5 -0
  180. package/dist/internal/api-protocol/shared/codec/scale/v1/commonCodecs.d.ts.map +1 -0
  181. package/dist/internal/api-protocol/shared/codec/scale/v1/commonCodecs.js +6 -0
  182. package/dist/internal/api-protocol/shared/codec/scale/v1/commonCodecs.js.map +1 -0
  183. package/dist/internal/api-protocol/shared/codec/scale/v1/createTransaction.d.ts +71 -0
  184. package/dist/internal/api-protocol/shared/codec/scale/v1/createTransaction.d.ts.map +1 -0
  185. package/dist/internal/api-protocol/shared/codec/scale/v1/createTransaction.js +34 -0
  186. package/dist/internal/api-protocol/shared/codec/scale/v1/createTransaction.js.map +1 -0
  187. package/dist/internal/api-protocol/shared/codec/scale/v1/customRenderer.d.ts +106 -0
  188. package/dist/internal/api-protocol/shared/codec/scale/v1/customRenderer.d.ts.map +1 -0
  189. package/dist/internal/api-protocol/shared/codec/scale/v1/customRenderer.js +84 -0
  190. package/dist/internal/api-protocol/shared/codec/scale/v1/customRenderer.js.map +1 -0
  191. package/dist/internal/api-protocol/shared/codec/scale/v1/devicePermission.d.ts +4 -0
  192. package/dist/internal/api-protocol/shared/codec/scale/v1/devicePermission.d.ts.map +1 -0
  193. package/dist/internal/api-protocol/shared/codec/scale/v1/devicePermission.js +4 -0
  194. package/dist/internal/api-protocol/shared/codec/scale/v1/devicePermission.js.map +1 -0
  195. package/dist/internal/api-protocol/shared/codec/scale/v1/feature.d.ts +7 -0
  196. package/dist/internal/api-protocol/shared/codec/scale/v1/feature.d.ts.map +1 -0
  197. package/dist/internal/api-protocol/shared/codec/scale/v1/feature.js +7 -0
  198. package/dist/internal/api-protocol/shared/codec/scale/v1/feature.js.map +1 -0
  199. package/dist/internal/api-protocol/shared/codec/scale/v1/handshake.d.ts +13 -0
  200. package/dist/internal/api-protocol/shared/codec/scale/v1/handshake.d.ts.map +1 -0
  201. package/dist/internal/api-protocol/shared/codec/scale/v1/handshake.js +10 -0
  202. package/dist/internal/api-protocol/shared/codec/scale/v1/handshake.js.map +1 -0
  203. package/dist/internal/api-protocol/shared/codec/scale/v1/localStorage.d.ts +15 -0
  204. package/dist/internal/api-protocol/shared/codec/scale/v1/localStorage.d.ts.map +1 -0
  205. package/dist/internal/api-protocol/shared/codec/scale/v1/localStorage.js +12 -0
  206. package/dist/internal/api-protocol/shared/codec/scale/v1/localStorage.js.map +1 -0
  207. package/dist/internal/api-protocol/shared/codec/scale/v1/navigation.d.ts +10 -0
  208. package/dist/internal/api-protocol/shared/codec/scale/v1/navigation.d.ts.map +1 -0
  209. package/dist/internal/api-protocol/shared/codec/scale/v1/navigation.js +10 -0
  210. package/dist/internal/api-protocol/shared/codec/scale/v1/navigation.js.map +1 -0
  211. package/dist/internal/api-protocol/shared/codec/scale/v1/notification.d.ts +7 -0
  212. package/dist/internal/api-protocol/shared/codec/scale/v1/notification.d.ts.map +1 -0
  213. package/dist/internal/api-protocol/shared/codec/scale/v1/notification.js +7 -0
  214. package/dist/internal/api-protocol/shared/codec/scale/v1/notification.js.map +1 -0
  215. package/dist/internal/api-protocol/shared/codec/scale/v1/payment.d.ts +74 -0
  216. package/dist/internal/api-protocol/shared/codec/scale/v1/payment.d.ts.map +1 -0
  217. package/dist/internal/api-protocol/shared/codec/scale/v1/payment.js +38 -0
  218. package/dist/internal/api-protocol/shared/codec/scale/v1/payment.js.map +1 -0
  219. package/dist/internal/api-protocol/shared/codec/scale/v1/preimage.d.ts +12 -0
  220. package/dist/internal/api-protocol/shared/codec/scale/v1/preimage.d.ts.map +1 -0
  221. package/dist/internal/api-protocol/shared/codec/scale/v1/preimage.js +11 -0
  222. package/dist/internal/api-protocol/shared/codec/scale/v1/preimage.js.map +1 -0
  223. package/dist/internal/api-protocol/shared/codec/scale/v1/remotePermission.d.ts +10 -0
  224. package/dist/internal/api-protocol/shared/codec/scale/v1/remotePermission.d.ts.map +1 -0
  225. package/dist/internal/api-protocol/shared/codec/scale/v1/remotePermission.js +8 -0
  226. package/dist/internal/api-protocol/shared/codec/scale/v1/remotePermission.js.map +1 -0
  227. package/dist/internal/api-protocol/shared/codec/scale/v1/sign.d.ts +61 -0
  228. package/dist/internal/api-protocol/shared/codec/scale/v1/sign.d.ts.map +1 -0
  229. package/dist/internal/api-protocol/shared/codec/scale/v1/sign.js +42 -0
  230. package/dist/internal/api-protocol/shared/codec/scale/v1/sign.js.map +1 -0
  231. package/dist/internal/api-protocol/shared/codec/scale/v1/statementStore.d.ts +137 -0
  232. package/dist/internal/api-protocol/shared/codec/scale/v1/statementStore.d.ts.map +1 -0
  233. package/dist/internal/api-protocol/shared/codec/scale/v1/statementStore.js +55 -0
  234. package/dist/internal/api-protocol/shared/codec/scale/v1/statementStore.js.map +1 -0
  235. package/dist/internal/api-protocol/shared/codec/structured/index.d.ts +10 -0
  236. package/dist/internal/api-protocol/shared/codec/structured/index.d.ts.map +1 -0
  237. package/dist/internal/api-protocol/shared/codec/structured/index.js +19 -0
  238. package/dist/internal/api-protocol/shared/codec/structured/index.js.map +1 -0
  239. package/dist/internal/api-protocol/shared/transport/messagePortProvider.d.ts +18 -0
  240. package/dist/internal/api-protocol/shared/transport/messagePortProvider.d.ts.map +1 -0
  241. package/dist/internal/api-protocol/shared/transport/messagePortProvider.js +98 -0
  242. package/dist/internal/api-protocol/shared/transport/messagePortProvider.js.map +1 -0
  243. package/dist/internal/api-protocol/shared/transport/provider.d.ts +42 -0
  244. package/dist/internal/api-protocol/shared/transport/provider.d.ts.map +1 -0
  245. package/dist/internal/api-protocol/shared/transport/provider.js +13 -0
  246. package/dist/internal/api-protocol/shared/transport/provider.js.map +1 -0
  247. package/dist/internal/api-protocol/shared/transport/transport.d.ts +72 -0
  248. package/dist/internal/api-protocol/shared/transport/transport.d.ts.map +1 -0
  249. package/dist/internal/api-protocol/shared/transport/transport.js +420 -0
  250. package/dist/internal/api-protocol/shared/transport/transport.js.map +1 -0
  251. package/dist/internal/api-protocol/shared/transport/windowProvider.d.ts +13 -0
  252. package/dist/internal/api-protocol/shared/transport/windowProvider.d.ts.map +1 -0
  253. package/dist/internal/api-protocol/shared/transport/windowProvider.js +85 -0
  254. package/dist/internal/api-protocol/shared/transport/windowProvider.js.map +1 -0
  255. package/dist/internal/api-protocol/shared/util/helpers.d.ts +27 -0
  256. package/dist/internal/api-protocol/shared/util/helpers.d.ts.map +1 -0
  257. package/dist/internal/api-protocol/shared/util/helpers.js +43 -0
  258. package/dist/internal/api-protocol/shared/util/helpers.js.map +1 -0
  259. package/dist/internal/api-protocol/shared/util/idFactory.d.ts +9 -0
  260. package/dist/internal/api-protocol/shared/util/idFactory.d.ts.map +1 -0
  261. package/dist/internal/api-protocol/shared/util/idFactory.js +12 -0
  262. package/dist/internal/api-protocol/shared/util/idFactory.js.map +1 -0
  263. package/dist/internal/api-protocol/shared/util/logger.d.ts +15 -0
  264. package/dist/internal/api-protocol/shared/util/logger.d.ts.map +1 -0
  265. package/dist/internal/api-protocol/shared/util/logger.js +20 -0
  266. package/dist/internal/api-protocol/shared/util/logger.js.map +1 -0
  267. package/dist/mesh-attachment.d.ts +19 -0
  268. package/dist/mesh-attachment.d.ts.map +1 -0
  269. package/dist/mesh-attachment.js +43 -0
  270. package/dist/mesh-attachment.js.map +1 -0
  271. package/dist/mesh-chat.d.ts +48 -0
  272. package/dist/mesh-chat.d.ts.map +1 -0
  273. package/dist/mesh-chat.js +84 -0
  274. package/dist/mesh-chat.js.map +1 -0
  275. package/dist/mesh-delivery-diagnostics.d.ts +12 -0
  276. package/dist/mesh-delivery-diagnostics.d.ts.map +1 -0
  277. package/dist/mesh-delivery-diagnostics.js +45 -0
  278. package/dist/mesh-delivery-diagnostics.js.map +1 -0
  279. package/dist/mesh-notification.d.ts +29 -0
  280. package/dist/mesh-notification.d.ts.map +1 -0
  281. package/dist/mesh-notification.js +52 -0
  282. package/dist/mesh-notification.js.map +1 -0
  283. package/dist/mesh-pairing.d.ts +40 -0
  284. package/dist/mesh-pairing.d.ts.map +1 -0
  285. package/dist/mesh-pairing.js +78 -0
  286. package/dist/mesh-pairing.js.map +1 -0
  287. package/dist/product-host-runtime.d.ts +59 -0
  288. package/dist/product-host-runtime.d.ts.map +1 -0
  289. package/dist/product-host-runtime.js +150 -0
  290. package/dist/product-host-runtime.js.map +1 -0
  291. package/dist/product-protocol.d.ts +49 -0
  292. package/dist/product-protocol.d.ts.map +1 -0
  293. package/dist/product-protocol.js +389 -0
  294. package/dist/product-protocol.js.map +1 -0
  295. package/dist/product-view-hosted.d.ts +63 -0
  296. package/dist/product-view-hosted.d.ts.map +1 -0
  297. package/dist/product-view-hosted.js +272 -0
  298. package/dist/product-view-hosted.js.map +1 -0
  299. package/dist/product-view-service-worker.d.ts +6 -0
  300. package/dist/product-view-service-worker.d.ts.map +1 -0
  301. package/dist/product-view-service-worker.js +57 -0
  302. package/dist/product-view-service-worker.js.map +1 -0
  303. package/dist/product-view.d.ts +459 -0
  304. package/dist/product-view.d.ts.map +1 -0
  305. package/dist/product-view.js +2671 -0
  306. package/dist/product-view.js.map +1 -0
  307. package/dist/protocol.d.ts +39 -0
  308. package/dist/protocol.d.ts.map +1 -0
  309. package/dist/protocol.js +25 -0
  310. package/dist/protocol.js.map +1 -0
  311. package/dist/remote-runtime-provider.d.ts +9 -0
  312. package/dist/remote-runtime-provider.d.ts.map +1 -0
  313. package/dist/remote-runtime-provider.js +1002 -0
  314. package/dist/remote-runtime-provider.js.map +1 -0
  315. package/dist/runtime-chain-service.d.ts +109 -0
  316. package/dist/runtime-chain-service.d.ts.map +1 -0
  317. package/dist/runtime-chain-service.js +846 -0
  318. package/dist/runtime-chain-service.js.map +1 -0
  319. package/dist/runtime-chain.d.ts +8 -0
  320. package/dist/runtime-chain.d.ts.map +1 -0
  321. package/dist/runtime-chain.js +4 -0
  322. package/dist/runtime-chain.js.map +1 -0
  323. package/dist/runtime-storage-access.d.ts +39 -0
  324. package/dist/runtime-storage-access.d.ts.map +1 -0
  325. package/dist/runtime-storage-access.js +209 -0
  326. package/dist/runtime-storage-access.js.map +1 -0
  327. package/dist/scoped-frame.d.ts +55 -0
  328. package/dist/scoped-frame.d.ts.map +1 -0
  329. package/dist/scoped-frame.js +234 -0
  330. package/dist/scoped-frame.js.map +1 -0
  331. package/dist/sdk-interfaces.d.ts +159 -0
  332. package/dist/sdk-interfaces.d.ts.map +1 -0
  333. package/dist/sdk-interfaces.js +2 -0
  334. package/dist/sdk-interfaces.js.map +1 -0
  335. package/dist/statement-store.d.ts +166 -0
  336. package/dist/statement-store.d.ts.map +1 -0
  337. package/dist/statement-store.js +627 -0
  338. package/dist/statement-store.js.map +1 -0
  339. package/dist/telemetry.d.ts +218 -0
  340. package/dist/telemetry.d.ts.map +1 -0
  341. package/dist/telemetry.js +162 -0
  342. package/dist/telemetry.js.map +1 -0
  343. package/dist/types.d.ts +255 -0
  344. package/dist/types.d.ts.map +1 -0
  345. package/dist/types.js +77 -0
  346. package/dist/types.js.map +1 -0
  347. package/dist/wallet-session.d.ts +89 -0
  348. package/dist/wallet-session.d.ts.map +1 -0
  349. package/dist/wallet-session.js +135 -0
  350. package/dist/wallet-session.js.map +1 -0
  351. package/package.json +86 -5
  352. package/index.js +0 -1
@@ -0,0 +1,459 @@
1
+ /**
2
+ * mountProductView — sandboxed iframe container for Polkadot product dApps.
3
+ *
4
+ * Works in web, Electron, and Tauri environments. The iframe is given
5
+ * `sandbox="allow-scripts"` — no same-origin access, no forms, no popups.
6
+ * Direct network access is blocked by default, with optional host-approved
7
+ * exact HTTPS origin exceptions. All communication happens through postMessage.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const handle = mountProductView({
12
+ * container: document.getElementById("app-frame")!,
13
+ * productId: "com.example.myapp",
14
+ * assets: assetsMap,
15
+ * sdk,
16
+ * delegate: {
17
+ * onMessage(data, productId) {
18
+ * const outcome = sdk.handleMessage(data, productId);
19
+ * // ... handle outcome
20
+ * },
21
+ * },
22
+ * });
23
+ * // Later:
24
+ * handle.sendResponse(responseBytes);
25
+ * handle.destroy();
26
+ * ```
27
+ */
28
+ import type { ProductViewSdk } from "./sdk-interfaces.js";
29
+ import type { TraceContext, AnalyticsEvent, AnalyticsRouter } from "./telemetry.js";
30
+ /** A sandbox violation event captured by the monitor or interactive script. */
31
+ export interface SandboxViolation {
32
+ /** The blocked API that was accessed (e.g. "WebSocket", "localStorage"). */
33
+ api: string;
34
+ /** Any available context (URL, storage key, etc). */
35
+ details: Record<string, unknown>;
36
+ /**
37
+ * Unix epoch milliseconds when the violation occurred (from inside the iframe).
38
+ *
39
+ * **Untrusted:** this value is supplied by product JavaScript and can be
40
+ * falsified. Use `hostTimestamp` for ordering and rate-limiting.
41
+ */
42
+ timestamp: number;
43
+ /**
44
+ * Unix epoch milliseconds when the host received this violation.
45
+ *
46
+ * Populated by the host on receipt — not influenced by product code.
47
+ * Prefer this field for audit logging, rate-limiting, and ordering.
48
+ */
49
+ hostTimestamp?: number;
50
+ /**
51
+ * Whether the host can grant runtime permission for this API.
52
+ *
53
+ * - `"promptable"`: the API can be granted at runtime (fetch/XHR to an HTTPS origin).
54
+ * The host should prompt the user and call `grantNetworkOrigin()` if approved.
55
+ * - `"always_blocked"`: the API is unconditionally blocked (storage, workers, etc.).
56
+ * - `undefined`: not set (monitor mode, backward compat).
57
+ */
58
+ disposition?: "promptable" | "always_blocked";
59
+ }
60
+ export interface ProductViewDelegate {
61
+ /** Raw binary message from the product. Call sdk.handleMessage() to process. */
62
+ onMessage(data: Uint8Array, productId: string): void;
63
+ /** Product requested navigation to a URL (may be a .dot address). */
64
+ onNavigate?(url: string, productId: string): void;
65
+ /** Load state changed. */
66
+ onLoadStateChanged?(state: ProductLoadState): void;
67
+ /** An error occurred in the product container. */
68
+ onError?(error: Error): void;
69
+ /**
70
+ * A sandbox violation was detected by the monitor script.
71
+ * Only called when `enableViolationMonitor` is true in mount options.
72
+ */
73
+ onSandboxViolation?(violation: SandboxViolation, productId: string): void;
74
+ /**
75
+ * A product-side analytics event was received.
76
+ *
77
+ * Only called when `traceContext` is provided in mount options with
78
+ * `sampled: true`. Use this to forward events to an {@link AnalyticsRouter}
79
+ * or handle them directly.
80
+ */
81
+ onProductAnalytics?(event: AnalyticsEvent, productId: string): void;
82
+ }
83
+ export type ProductLoadState = "idle" | "loading" | "ready" | "failed";
84
+ export interface ProductViewHandle {
85
+ /** Send a response back to the product (e.g. sign result, RPC response). */
86
+ sendResponse(data: Uint8Array): void;
87
+ /** The stable product instance identifier. */
88
+ readonly productId: string;
89
+ /** Remove the iframe and clean up. */
90
+ destroy(): void;
91
+ }
92
+ /**
93
+ * Extended handle returned when `enableInteractiveSandbox` is true.
94
+ * Adds the ability to grant network origins at runtime.
95
+ */
96
+ export interface InteractiveProductViewHandle extends ProductViewHandle {
97
+ /**
98
+ * Grant a product access to a specific HTTPS origin at runtime.
99
+ *
100
+ * The origin is validated and sent to the iframe's sandbox script via
101
+ * the private MessageChannel port. Future fetch/XHR requests to this
102
+ * origin will be allowed without throwing.
103
+ *
104
+ * Invalid origins (non-HTTPS, containing paths/wildcards) are silently
105
+ * dropped.
106
+ *
107
+ * **Recovery pattern:** after a `SANDBOX_VIOLATION` with
108
+ * `disposition: "promptable"`, the host prompts the user. If approved,
109
+ * call this method. The product must retry the failed request — the
110
+ * original call has already thrown `SecurityError`.
111
+ *
112
+ * **Lifecycle:** grants are session-scoped and cleared when `destroy()`
113
+ * is called. To persist across reloads, the host should merge runtime
114
+ * grants into `approvedNetworkOrigins` at the next `mountProductView()`.
115
+ */
116
+ grantNetworkOrigin(origin: string): void;
117
+ /** Grant a product access to a specific WSS origin at runtime. */
118
+ grantWebSocketOrigin(origin: string): void;
119
+ /** Grant a product access to a specific STUN/TURN server URL at runtime. */
120
+ grantWebRtcServerUrl(url: string): void;
121
+ }
122
+ /**
123
+ * Host-side adapter for the stable `window.host` bridge surface.
124
+ *
125
+ * When provided to `mountProductView`, bridge method calls from the product
126
+ * guest are routed to this adapter. Methods not implemented on the adapter
127
+ * reject with ERR_UNSUPPORTED_CAPABILITY.
128
+ */
129
+ export interface StableBridgeAdapter {
130
+ getAddress?(): Promise<string>;
131
+ storage?: {
132
+ get(key: string): Promise<string | null>;
133
+ set(key: string, value: string): Promise<void>;
134
+ remove(key: string): Promise<void>;
135
+ };
136
+ statements?: {
137
+ subscribe(channel: string): Promise<boolean>;
138
+ write(channel: string, data: string): Promise<boolean>;
139
+ status(): Promise<{
140
+ storeRunning: boolean;
141
+ storeHealth: string;
142
+ subscribers: number;
143
+ pendingEvents: number;
144
+ lastError: string;
145
+ msSinceHealthy: number;
146
+ }>;
147
+ };
148
+ identity?: {
149
+ resolveUsername(username: string): Promise<string | null>;
150
+ };
151
+ }
152
+ export interface MountProductViewOptions {
153
+ /** DOM element to mount the iframe into. */
154
+ container: HTMLElement;
155
+ /** Product identifier (used for bridge correlation and storage scoping). */
156
+ productId: string;
157
+ /** Pre-fetched product assets. Key is the file path (e.g. "index.html"). */
158
+ assets: Map<string, Uint8Array>;
159
+ /** Product-view bridge surface used to generate injection scripts. */
160
+ sdk: ProductViewSdk;
161
+ /** Delegate receiving messages from the product. */
162
+ delegate: ProductViewDelegate;
163
+ /**
164
+ * Exact HTTPS origins that this product instance may access directly.
165
+ *
166
+ * Invalid values are ignored and the sandbox remains fail-closed.
167
+ */
168
+ approvedNetworkOrigins?: string[];
169
+ /** Exact WSS origins that this product instance may access directly. */
170
+ approvedWebSocketOrigins?: string[];
171
+ /** Exact STUN/TURN server URLs that this product instance may use for WebRTC. */
172
+ approvedWebRtcServerUrls?: string[];
173
+ /**
174
+ * Use the violation monitor instead of the silent lockdown (development only).
175
+ *
176
+ * When enabled, every blocked API call emits a `SANDBOX_VIOLATION` postMessage
177
+ * before throwing. The parent window catches these events and forwards them to
178
+ * `delegate.onSandboxViolation`. Do NOT enable in production — the monitor
179
+ * script is more verbose and surfaces internal product error attempts to the
180
+ * parent frame, which could be a privacy concern.
181
+ *
182
+ * Mutually exclusive with `enableInteractiveSandbox`.
183
+ */
184
+ enableViolationMonitor?: boolean;
185
+ /**
186
+ * Enable interactive sandbox mode with runtime consent-based network access.
187
+ *
188
+ * When enabled:
189
+ * - Remote APIs (fetch/XHR, WebSocket, WebRTC ICE servers) are wrapped with
190
+ * mutable allowlists.
191
+ * - Unapproved requests throw `SecurityError` and emit a `SANDBOX_VIOLATION`
192
+ * with `disposition: "promptable"`. The host can then prompt the user.
193
+ * - The host grants access via the interactive handle grant methods.
194
+ * - Non-network APIs (storage, workers, wallet) remain hard-blocked with
195
+ * `disposition: "always_blocked"`.
196
+ * - CSP uses `connect-src https: wss:` — the JS proxy is the primary enforcement.
197
+ *
198
+ * Mutually exclusive with `enableViolationMonitor`.
199
+ *
200
+ * Returns an {@link InteractiveProductViewHandle} instead of the base handle.
201
+ */
202
+ enableInteractiveSandbox?: boolean;
203
+ /**
204
+ * Trace context to inject into the product iframe.
205
+ *
206
+ * When provided with `sampled: true`, the product can post analytics and
207
+ * timing events back to the host via `delegate.onProductAnalytics`.
208
+ * When absent or `sampled: false`, the guest-side telemetry functions
209
+ * are no-ops and no analytics postMessages are accepted.
210
+ */
211
+ traceContext?: TraceContext;
212
+ /**
213
+ * Analytics router for automatic event dispatch.
214
+ *
215
+ * When provided alongside `traceContext`, incoming analytics events from
216
+ * the product are automatically dispatched through this router instead of
217
+ * (or in addition to) calling `delegate.onProductAnalytics`.
218
+ */
219
+ analyticsRouter?: AnalyticsRouter;
220
+ /**
221
+ * Host-side adapter for the stable `window.host` bridge surface.
222
+ *
223
+ * When provided, bridge method calls from the guest (`getAddress()`,
224
+ * `storage.*`, `statements.*`, `identity.*`) are routed to the adapter
225
+ * methods. Unimplemented adapter methods reject with
226
+ * `ERR_UNSUPPORTED_CAPABILITY`. When absent, all stable bridge calls
227
+ * reject with `ERR_HOST_RUNTIME_UNAVAILABLE`.
228
+ *
229
+ * The capabilities advertised in `window.host.__bridge.capabilities` are
230
+ * derived from which adapter namespaces are present.
231
+ */
232
+ bridgeAdapter?: StableBridgeAdapter;
233
+ }
234
+ /**
235
+ * Prepare a product asset bundle for URL-backed iframe hosting.
236
+ *
237
+ * The returned map keeps the original bundle structure, but rewrites
238
+ * `index.html` so the host bridge and sandbox scripts are injected before
239
+ * any product code runs. Hosts can then serve the prepared assets from a
240
+ * real URL space (for example via a service worker or custom protocol).
241
+ */
242
+ export interface PrepareProductViewAssetsOptions {
243
+ /** Pre-fetched product assets. Key is the file path (e.g. "index.html"). */
244
+ assets: Map<string, Uint8Array>;
245
+ /** Product-view bridge surface used to generate injection scripts. */
246
+ sdk: ProductViewSdk;
247
+ /** Exact HTTPS origins that this product instance may access directly. */
248
+ approvedNetworkOrigins?: string[];
249
+ /** Exact WSS origins that this product instance may access directly. */
250
+ approvedWebSocketOrigins?: string[];
251
+ /** Exact STUN/TURN server URLs that this product instance may use for WebRTC. */
252
+ approvedWebRtcServerUrls?: string[];
253
+ /** Use the violation monitor instead of the silent lockdown. */
254
+ enableViolationMonitor?: boolean;
255
+ /** Enable interactive sandbox mode with runtime consent-based network access. */
256
+ enableInteractiveSandbox?: boolean;
257
+ /** Trace context to inject into the product iframe. */
258
+ traceContext?: TraceContext;
259
+ /**
260
+ * Absolute path prefix under which the prepared product will be served.
261
+ *
262
+ * Example: `/__hostsdk_product__/browse.dot/`
263
+ */
264
+ routeBasePath: string;
265
+ /**
266
+ * Host-side adapter for the stable `window.host` bridge surface.
267
+ *
268
+ * When provided, the capability flags baked into the prepared `index.html`
269
+ * (`window.host.__bridge.capabilities`) reflect which namespaces are
270
+ * implemented. Use the same adapter value when calling `mountProductViewUrl`
271
+ * so capabilities and runtime behaviour stay in sync.
272
+ */
273
+ bridgeAdapter?: StableBridgeAdapter;
274
+ }
275
+ /**
276
+ * Mount a sandboxed ProductView from a host-controlled URL.
277
+ *
278
+ * URL-backed ProductView uses a same-origin iframe so service-worker-backed
279
+ * archive assets and module scripts can load correctly under a real route.
280
+ * This is a distinct security profile from the stricter srcdoc path.
281
+ */
282
+ export interface MountProductViewUrlOptions {
283
+ /** DOM element to mount the iframe into. */
284
+ container: HTMLElement;
285
+ /** Product identifier (used for bridge correlation and storage scoping). */
286
+ productId: string;
287
+ /** URL for the prepared product document (typically `${routeBasePath}index.html`). */
288
+ frameUrl: string;
289
+ /** Delegate receiving messages from the product. */
290
+ delegate: ProductViewDelegate;
291
+ /** Whether the prepared product uses monitor mode. */
292
+ enableViolationMonitor?: boolean;
293
+ /** Whether the prepared product uses interactive sandbox mode. */
294
+ enableInteractiveSandbox?: boolean;
295
+ /** Trace context used by the host when routing analytics events. */
296
+ traceContext?: TraceContext;
297
+ /** Analytics router for automatic event dispatch. */
298
+ analyticsRouter?: AnalyticsRouter;
299
+ /**
300
+ * Host-side adapter for the stable `window.host` bridge surface.
301
+ *
302
+ * Must match the adapter used when calling `prepareProductViewAssets` so
303
+ * that the capability flags in the pre-baked HTML are consistent with the
304
+ * methods actually available at runtime.
305
+ */
306
+ bridgeAdapter?: StableBridgeAdapter;
307
+ }
308
+ /**
309
+ * Build the web iframe bridge script.
310
+ *
311
+ * Uses `WEB_BRIDGE_SCRIPT` which creates a shim `window.__HOST_API_PORT__`
312
+ * that communicates with the host via `parent.postMessage` directly (raw
313
+ * Uint8Array, no base64 encoding, no MessageChannel indirection).
314
+ *
315
+ * Security note: `'*'` is unavoidable in the iframe-to-host direction
316
+ * because the sandboxed iframe (no allow-same-origin) has an opaque `null`
317
+ * origin and cannot know its parent's origin. The host-side security
318
+ * boundary is the `event.source === iframe.contentWindow` check in
319
+ * mountProductView's `onMessage` handler.
320
+ *
321
+ * For host-to-iframe replies the host uses `'null'` as the targetOrigin
322
+ * (srcdoc) or the real frame origin (URL-backed). This restricts delivery
323
+ * to the correct iframe.
324
+ *
325
+ * @internal Exported for testing only -- not part of the public API.
326
+ */
327
+ export declare function buildIframeBridgeScript(interactive?: boolean): string;
328
+ /**
329
+ * Build a script that installs the stable `window.host` bridge surface in the
330
+ * sandboxed iframe. Each method routes through a JSON postMessage channel to
331
+ * the host frame.
332
+ *
333
+ * Must be injected AFTER `buildIframeBridgeScript()` (which creates
334
+ * `window.host`) and BEFORE `buildBridgeMetadataScript()` and the sandbox
335
+ * lockdown script.
336
+ *
337
+ * @internal Exported for testing only — not part of the public API.
338
+ */
339
+ export declare function buildStableBridgeScript(): string;
340
+ /**
341
+ * Build a bootstrap script that exposes immutable `window.host.__bridge`
342
+ * metadata before product code and extension scripts run.
343
+ *
344
+ * The current web `srcdoc` profile still uses the binary host-api port for its
345
+ * core transport, so only extension capabilities are advertised here.
346
+ *
347
+ * @internal Exported for testing only — not part of the public API.
348
+ */
349
+ export declare function buildBridgeMetadataScript(extensionInjectScript: string, profile?: "web-srcdoc" | "web-relay", coreCapabilities?: {
350
+ storage?: boolean;
351
+ statements?: boolean;
352
+ identity?: boolean;
353
+ }): string;
354
+ /**
355
+ * Build a script that injects `window.__HOST_TRACE_CONTEXT__` into the iframe.
356
+ *
357
+ * The object is frozen to prevent product code from tampering with it.
358
+ * Only injected when the host provides a `traceContext` in mount options.
359
+ *
360
+ * @internal Exported for testing only — not part of the public API.
361
+ */
362
+ export declare function buildTraceContextScript(ctx: TraceContext): string;
363
+ /** Sandbox attribute applied to the product iframe. */
364
+ export declare const IFRAME_SANDBOX_ATTR = "allow-scripts";
365
+ export declare const URL_BACKED_IFRAME_SANDBOX_ATTR = "allow-scripts allow-same-origin";
366
+ export declare function buildIframeCsp(approvedNetworkOrigins?: readonly string[], approvedWebSocketOrigins?: readonly string[]): string;
367
+ export declare const IFRAME_CSP: string;
368
+ export declare function buildUrlBackedIframeCsp(approvedNetworkOrigins?: readonly string[], approvedWebSocketOrigins?: readonly string[]): string;
369
+ /**
370
+ * Production lockdown script: neutralise browser APIs that could exfiltrate
371
+ * data or establish out-of-band connections. Silently blocks without reporting.
372
+ *
373
+ * Mirrors `SANDBOX_LOCKDOWN_SCRIPT` from `host-product-view/src/security.rs`.
374
+ */
375
+ export declare function buildLockdownScript(approvedNetworkOrigins?: readonly string[], approvedWebSocketOrigins?: readonly string[], approvedWebRtcServerUrls?: readonly string[]): string;
376
+ export declare const LOCKDOWN_SCRIPT: string;
377
+ /**
378
+ * Development monitor script: wraps every blocked API with an instrumented stub
379
+ * that sends a SANDBOX_VIOLATION postMessage before throwing SecurityError.
380
+ *
381
+ * Use this instead of LOCKDOWN_SCRIPT during development by passing
382
+ * `enableViolationMonitor: true` to `mountProductView`.
383
+ *
384
+ * Mirrors `SANDBOX_MONITOR_SCRIPT` from `host-product-view/src/security.rs`.
385
+ */
386
+ export declare function buildMonitorScript(approvedNetworkOrigins?: readonly string[], approvedWebSocketOrigins?: readonly string[], approvedWebRtcServerUrls?: readonly string[]): string;
387
+ export declare const MONITOR_SCRIPT: string;
388
+ /**
389
+ * Interactive sandbox script: wraps network APIs with a mutable allowlist.
390
+ *
391
+ * - fetch/XHR: checked against an origin allowlist. Unapproved requests
392
+ * throw SecurityError and emit SANDBOX_VIOLATION with `disposition: "promptable"`.
393
+ * - Grant delivery: the host sends `{ type: "sandbox-grant", origin, kind: "network" }`
394
+ * over a dedicated MessagePort created by the iframe bridge. The sandbox
395
+ * re-validates and adds the origin, then deletes the temporary window handle
396
+ * before product code runs.
397
+ * - Non-network APIs: blocked + reported with `disposition: "always_blocked"`.
398
+ * - fetch/XHR wrappers use `configurable: false, writable: false` to prevent bypass.
399
+ * - The allowlist Set is frozen after each mutation to prevent product manipulation.
400
+ *
401
+ * Mirrors `generate_interactive_sandbox_script()` from `host-product-view/src/security.rs`.
402
+ *
403
+ * @internal Exported for testing only.
404
+ */
405
+ export declare function buildInteractiveScript(approvedNetworkOrigins?: readonly string[], approvedWebSocketOrigins?: readonly string[], approvedWebRtcServerUrls?: readonly string[]): string;
406
+ export declare const INTERACTIVE_SCRIPT: string;
407
+ /** Content-Security-Policy for interactive sandbox mode (connect-src https: wss:). */
408
+ export declare const IFRAME_CSP_INTERACTIVE: string;
409
+ export declare const IFRAME_CSP_URL_BACKED_INTERACTIVE: string;
410
+ /**
411
+ * Build the full srcdoc string for the sandboxed iframe.
412
+ *
413
+ * Preserves the product's original `<head>` structure (meta tags, CSS links,
414
+ * module scripts, import maps) and injects bridge/lockdown scripts before
415
+ * any product content. Bundle-local CSS and JS assets referenced by the HTML
416
+ * are inlined since srcdoc iframes cannot reliably fetch relative paths.
417
+ *
418
+ * @internal Exported for testing only — not part of the public API.
419
+ */
420
+ export declare function buildSrcdoc(assets: Map<string, Uint8Array>, bridgeScript: string, sandboxScript: string, extensionInjectScript: string, approvedNetworkOrigins?: readonly string[], approvedWebSocketOrigins?: readonly string[], cspOverride?: string, coreCapabilities?: {
421
+ storage?: boolean;
422
+ statements?: boolean;
423
+ identity?: boolean;
424
+ }): string;
425
+ /**
426
+ * Build a URL-backed product document.
427
+ *
428
+ * Unlike `buildSrcdoc()`, this path preserves the bundle's file structure and
429
+ * expects the host to serve the returned assets from `routeBasePath`.
430
+ */
431
+ export declare function buildUrlBackedDocument(assets: Map<string, Uint8Array>, bridgeScript: string, sandboxScript: string, extensionInjectScript: string, routeBasePath: string, approvedNetworkOrigins?: readonly string[], approvedWebSocketOrigins?: readonly string[], cspOverride?: string, coreCapabilities?: {
432
+ storage?: boolean;
433
+ statements?: boolean;
434
+ identity?: boolean;
435
+ }): string;
436
+ export declare function prepareProductViewAssets(options: PrepareProductViewAssetsOptions): Map<string, Uint8Array>;
437
+ /**
438
+ * Mount a sandboxed iframe containing a Polkadot product dApp.
439
+ *
440
+ * The iframe is appended to `options.container`. All product code is inlined
441
+ * from the `assets` map — no external resources are loaded.
442
+ *
443
+ * @returns A {@link ProductViewHandle} to send responses and clean up.
444
+ */
445
+ /**
446
+ * Mount with `enableInteractiveSandbox: true` to get an `InteractiveProductViewHandle`.
447
+ */
448
+ export declare function mountProductView(options: MountProductViewOptions & {
449
+ enableInteractiveSandbox: true;
450
+ }): InteractiveProductViewHandle;
451
+ /**
452
+ * Mount with default or monitor mode to get a standard `ProductViewHandle`.
453
+ */
454
+ export declare function mountProductView(options: MountProductViewOptions): ProductViewHandle;
455
+ export declare function mountProductViewUrl(options: MountProductViewUrlOptions & {
456
+ enableInteractiveSandbox: true;
457
+ }): InteractiveProductViewHandle;
458
+ export declare function mountProductViewUrl(options: MountProductViewUrlOptions): ProductViewHandle;
459
+ //# sourceMappingURL=product-view.d.ts.map
@@ -0,0 +1 @@
1
+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