@xyo-network/os-runtime 7.2.0 → 7.3.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 (303) hide show
  1. package/dist/neutral/Caller.d.ts +18 -20
  2. package/dist/neutral/Caller.d.ts.map +1 -1
  3. package/dist/neutral/DappCallerBase.d.ts +2 -2
  4. package/dist/neutral/DappCallerBase.d.ts.map +1 -1
  5. package/dist/neutral/OsCallerBase.d.ts +2 -2
  6. package/dist/neutral/PubSubBridgeCaller.d.ts +1 -1
  7. package/dist/neutral/PubSubBridgeCaller.d.ts.map +1 -1
  8. package/dist/neutral/RunningDappCache.d.ts.map +1 -1
  9. package/dist/neutral/XyOs.d.ts +5 -6
  10. package/dist/neutral/XyOs.d.ts.map +1 -1
  11. package/dist/neutral/XyOsBase.d.ts +124 -7
  12. package/dist/neutral/XyOsBase.d.ts.map +1 -1
  13. package/dist/neutral/XyOsDapp.d.ts +3 -3
  14. package/dist/neutral/XyOsDapp.d.ts.map +1 -1
  15. package/dist/neutral/access/Caller.d.ts +2 -2
  16. package/dist/neutral/access/Caller.d.ts.map +1 -1
  17. package/dist/neutral/access/RunningAccessDappCache.d.ts.map +1 -1
  18. package/dist/neutral/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.d.ts +1 -1
  19. package/dist/neutral/adapter/Base.d.ts +2 -2
  20. package/dist/neutral/adapter/Base.d.ts.map +1 -1
  21. package/dist/neutral/classes/lib/DappCreatorParams.d.ts +3 -3
  22. package/dist/neutral/classes/lib/DappCreatorParams.d.ts.map +1 -1
  23. package/dist/neutral/classes/lib/Insertable.d.ts +1 -3
  24. package/dist/neutral/classes/lib/Insertable.d.ts.map +1 -1
  25. package/dist/neutral/classes/menu/Caller.d.ts +1 -2
  26. package/dist/neutral/classes/menu/Caller.d.ts.map +1 -1
  27. package/dist/neutral/classes/settings/Caller.d.ts +2 -2
  28. package/dist/neutral/classes/settings/CallerBase.d.ts +1 -1
  29. package/dist/neutral/classes/settings/SettingsQueries.d.ts.map +1 -1
  30. package/dist/neutral/classes/settings/badge/Caller.d.ts +2 -2
  31. package/dist/neutral/classes/settings/badge/Resource.d.ts +1 -1
  32. package/dist/neutral/classes/settings/badge/Resource.d.ts.map +1 -1
  33. package/dist/neutral/dapp/context/creator/Creator.d.ts +1 -1
  34. package/dist/neutral/dapp/context/creator/Creator.d.ts.map +1 -1
  35. package/dist/neutral/dapp/context/creator/createDappContext.d.ts.map +1 -1
  36. package/dist/neutral/event/bus/Connection.d.ts +3 -4
  37. package/dist/neutral/event/bus/Connection.d.ts.map +1 -1
  38. package/dist/neutral/event/bus/EventBus.d.ts +1 -1
  39. package/dist/neutral/event/bus/EventBus.d.ts.map +1 -1
  40. package/dist/neutral/event/bus/PubSubConnection.d.ts +1 -1
  41. package/dist/neutral/helpers/monitor/XyOsMonitor.d.ts +2 -2
  42. package/dist/neutral/helpers/monitor/XyOsMonitor.d.ts.map +1 -1
  43. package/dist/neutral/helpers/monitor/types.d.ts +3 -3
  44. package/dist/neutral/helpers/monitor/types.d.ts.map +1 -1
  45. package/dist/neutral/index.mjs +1042 -694
  46. package/dist/neutral/index.mjs.map +1 -1
  47. package/dist/neutral/intent/Caller.d.ts +5 -5
  48. package/dist/neutral/lib/Listener.d.ts +1 -1
  49. package/dist/neutral/lib/Listener.d.ts.map +1 -1
  50. package/dist/neutral/lib/PayloadStore.d.ts +1 -2
  51. package/dist/neutral/lib/PayloadStore.d.ts.map +1 -1
  52. package/dist/neutral/lib/isPayload.d.ts +1 -1
  53. package/dist/neutral/loadOsNode.d.ts.map +1 -1
  54. package/dist/neutral/profileModuleEvents.d.ts +2 -4
  55. package/dist/neutral/profileModuleEvents.d.ts.map +1 -1
  56. package/dist/neutral/registration/DappRegistrationService.d.ts +3 -3
  57. package/dist/neutral/registration/DappRegistrationService.d.ts.map +1 -1
  58. package/dist/neutral/registration/DappRegistry.d.ts +4 -6
  59. package/dist/neutral/registration/DappRegistry.d.ts.map +1 -1
  60. package/dist/neutral/registration/ValidateDappAccessDiviner/Config.d.ts +7 -3
  61. package/dist/neutral/registration/ValidateDappAccessDiviner/Config.d.ts.map +1 -1
  62. package/dist/neutral/registration/ValidateDappAccessDiviner/Diviner.d.ts +3 -1
  63. package/dist/neutral/registration/ValidateDappAccessDiviner/Diviner.d.ts.map +1 -1
  64. package/dist/neutral/scripts/xyos/lib/headless.d.ts.map +1 -1
  65. package/dist/neutral/signer/Signers.d.ts.map +1 -1
  66. package/dist/neutral/stack/Base.d.ts +2 -2
  67. package/dist/neutral/stack/Base.d.ts.map +1 -1
  68. package/dist/neutral/stack/Manager.d.ts +2 -6
  69. package/dist/neutral/stack/Manager.d.ts.map +1 -1
  70. package/dist/neutral/system/ManageSystemDapps.d.ts +3 -3
  71. package/dist/neutral/system/ManageSystemDapps.d.ts.map +1 -1
  72. package/dist/neutral/utils/buildWalletSeedPhrasePayload.d.ts +1 -1
  73. package/dist/neutral/utils/buildWalletSeedPhrasePayload.d.ts.map +1 -1
  74. package/dist/neutral/wallet/SeedPhraseRepository.d.ts +3 -4
  75. package/dist/neutral/wallet/SeedPhraseRepository.d.ts.map +1 -1
  76. package/dist/node/Caller.d.ts +18 -20
  77. package/dist/node/Caller.d.ts.map +1 -1
  78. package/dist/node/DappCallerBase.d.ts +2 -2
  79. package/dist/node/DappCallerBase.d.ts.map +1 -1
  80. package/dist/node/OsCallerBase.d.ts +2 -2
  81. package/dist/node/PubSubBridgeCaller.d.ts +1 -1
  82. package/dist/node/PubSubBridgeCaller.d.ts.map +1 -1
  83. package/dist/node/RunningDappCache.d.ts.map +1 -1
  84. package/dist/node/XyOs.d.ts +5 -6
  85. package/dist/node/XyOs.d.ts.map +1 -1
  86. package/dist/node/XyOsBase.d.ts +124 -7
  87. package/dist/node/XyOsBase.d.ts.map +1 -1
  88. package/dist/node/XyOsDapp.d.ts +3 -3
  89. package/dist/node/XyOsDapp.d.ts.map +1 -1
  90. package/dist/node/access/Caller.d.ts +2 -2
  91. package/dist/node/access/Caller.d.ts.map +1 -1
  92. package/dist/node/access/RunningAccessDappCache.d.ts.map +1 -1
  93. package/dist/node/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.d.ts +1 -1
  94. package/dist/node/adapter/Base.d.ts +2 -2
  95. package/dist/node/adapter/Base.d.ts.map +1 -1
  96. package/dist/node/classes/lib/DappCreatorParams.d.ts +3 -3
  97. package/dist/node/classes/lib/DappCreatorParams.d.ts.map +1 -1
  98. package/dist/node/classes/lib/Insertable.d.ts +1 -3
  99. package/dist/node/classes/lib/Insertable.d.ts.map +1 -1
  100. package/dist/node/classes/menu/Caller.d.ts +1 -2
  101. package/dist/node/classes/menu/Caller.d.ts.map +1 -1
  102. package/dist/node/classes/settings/Caller.d.ts +2 -2
  103. package/dist/node/classes/settings/CallerBase.d.ts +1 -1
  104. package/dist/node/classes/settings/SettingsQueries.d.ts.map +1 -1
  105. package/dist/node/classes/settings/badge/Caller.d.ts +2 -2
  106. package/dist/node/classes/settings/badge/Resource.d.ts +1 -1
  107. package/dist/node/classes/settings/badge/Resource.d.ts.map +1 -1
  108. package/dist/node/dapp/context/creator/Creator.d.ts +1 -1
  109. package/dist/node/dapp/context/creator/Creator.d.ts.map +1 -1
  110. package/dist/node/dapp/context/creator/createDappContext.d.ts.map +1 -1
  111. package/dist/node/event/bus/Connection.d.ts +3 -4
  112. package/dist/node/event/bus/Connection.d.ts.map +1 -1
  113. package/dist/node/event/bus/EventBus.d.ts +1 -1
  114. package/dist/node/event/bus/EventBus.d.ts.map +1 -1
  115. package/dist/node/event/bus/PubSubConnection.d.ts +1 -1
  116. package/dist/node/helpers/monitor/XyOsMonitor.d.ts +2 -2
  117. package/dist/node/helpers/monitor/XyOsMonitor.d.ts.map +1 -1
  118. package/dist/node/helpers/monitor/types.d.ts +3 -3
  119. package/dist/node/helpers/monitor/types.d.ts.map +1 -1
  120. package/dist/node/index.mjs +1042 -694
  121. package/dist/node/index.mjs.map +1 -1
  122. package/dist/node/intent/Caller.d.ts +5 -5
  123. package/dist/node/lib/Listener.d.ts +1 -1
  124. package/dist/node/lib/Listener.d.ts.map +1 -1
  125. package/dist/node/lib/PayloadStore.d.ts +1 -2
  126. package/dist/node/lib/PayloadStore.d.ts.map +1 -1
  127. package/dist/node/lib/isPayload.d.ts +1 -1
  128. package/dist/node/loadOsNode.d.ts.map +1 -1
  129. package/dist/node/profileModuleEvents.d.ts +2 -4
  130. package/dist/node/profileModuleEvents.d.ts.map +1 -1
  131. package/dist/node/registration/DappRegistrationService.d.ts +3 -3
  132. package/dist/node/registration/DappRegistrationService.d.ts.map +1 -1
  133. package/dist/node/registration/DappRegistry.d.ts +4 -6
  134. package/dist/node/registration/DappRegistry.d.ts.map +1 -1
  135. package/dist/node/registration/ValidateDappAccessDiviner/Config.d.ts +7 -3
  136. package/dist/node/registration/ValidateDappAccessDiviner/Config.d.ts.map +1 -1
  137. package/dist/node/registration/ValidateDappAccessDiviner/Diviner.d.ts +3 -1
  138. package/dist/node/registration/ValidateDappAccessDiviner/Diviner.d.ts.map +1 -1
  139. package/dist/node/scripts/xyos/index.mjs +520 -384
  140. package/dist/node/scripts/xyos/index.mjs.map +1 -1
  141. package/dist/node/scripts/xyos/lib/headless.d.ts.map +1 -1
  142. package/dist/node/signer/Signers.d.ts.map +1 -1
  143. package/dist/node/stack/Base.d.ts +2 -2
  144. package/dist/node/stack/Base.d.ts.map +1 -1
  145. package/dist/node/stack/Manager.d.ts +2 -6
  146. package/dist/node/stack/Manager.d.ts.map +1 -1
  147. package/dist/node/system/ManageSystemDapps.d.ts +3 -3
  148. package/dist/node/system/ManageSystemDapps.d.ts.map +1 -1
  149. package/dist/node/utils/buildWalletSeedPhrasePayload.d.ts +1 -1
  150. package/dist/node/utils/buildWalletSeedPhrasePayload.d.ts.map +1 -1
  151. package/dist/node/wallet/SeedPhraseRepository.d.ts +3 -4
  152. package/dist/node/wallet/SeedPhraseRepository.d.ts.map +1 -1
  153. package/package.json +165 -55
  154. package/dist/neutral/signer/Signer.spec.d.ts +0 -2
  155. package/dist/neutral/signer/Signer.spec.d.ts.map +0 -1
  156. package/dist/neutral/spec/boot.spec.d.ts +0 -2
  157. package/dist/neutral/spec/boot.spec.d.ts.map +0 -1
  158. package/dist/node/signer/Signer.spec.d.ts +0 -2
  159. package/dist/node/signer/Signer.spec.d.ts.map +0 -1
  160. package/dist/node/spec/boot.spec.d.ts +0 -2
  161. package/dist/node/spec/boot.spec.d.ts.map +0 -1
  162. package/src/Caller.ts +0 -202
  163. package/src/DappCallerBase.ts +0 -56
  164. package/src/DefaultsQueries.ts +0 -27
  165. package/src/OsCallerBase.ts +0 -59
  166. package/src/PubSubBridgeCaller.ts +0 -33
  167. package/src/RunningDappCache.ts +0 -58
  168. package/src/XyOs.ts +0 -166
  169. package/src/XyOsBase.ts +0 -136
  170. package/src/XyOsDapp.ts +0 -103
  171. package/src/access/Caller.ts +0 -85
  172. package/src/access/Queries.ts +0 -38
  173. package/src/access/Resource.ts +0 -65
  174. package/src/access/RunningAccessDappCache.ts +0 -21
  175. package/src/access/index.ts +0 -4
  176. package/src/access/interfaces/index.ts +0 -1
  177. package/src/access/interfaces/registered-names/helpers/AccessNodeQueries.ts +0 -68
  178. package/src/access/interfaces/registered-names/helpers/index.ts +0 -2
  179. package/src/access/interfaces/registered-names/helpers/resource/AbstractXnsCaller.ts +0 -42
  180. package/src/access/interfaces/registered-names/helpers/resource/RegistrationsResource.ts +0 -52
  181. package/src/access/interfaces/registered-names/helpers/resource/RegistrationsResourceQueries.ts +0 -23
  182. package/src/access/interfaces/registered-names/helpers/resource/index.ts +0 -3
  183. package/src/access/interfaces/registered-names/index.ts +0 -1
  184. package/src/adapter/Base.ts +0 -104
  185. package/src/adapter/Network.ts +0 -31
  186. package/src/adapter/Settings.ts +0 -30
  187. package/src/adapter/index.ts +0 -2
  188. package/src/adapters/OsPubSubBridgeNetwork.ts +0 -10
  189. package/src/adapters/OsSettings.ts +0 -7
  190. package/src/adapters/OsXyoPublicNetwork.ts +0 -9
  191. package/src/adapters/index.ts +0 -3
  192. package/src/classes/dapp/DefaultsResource.ts +0 -67
  193. package/src/classes/dapp/index.ts +0 -1
  194. package/src/classes/index.ts +0 -4
  195. package/src/classes/lib/DappCreatorParams.ts +0 -18
  196. package/src/classes/lib/Insertable.ts +0 -10
  197. package/src/classes/lib/index.ts +0 -2
  198. package/src/classes/menu/Caller.ts +0 -77
  199. package/src/classes/menu/Queries.ts +0 -60
  200. package/src/classes/menu/Resource.ts +0 -105
  201. package/src/classes/menu/index.ts +0 -2
  202. package/src/classes/settings/Caller.ts +0 -78
  203. package/src/classes/settings/CallerBase.ts +0 -27
  204. package/src/classes/settings/Resource.ts +0 -81
  205. package/src/classes/settings/SettingsQueries.ts +0 -56
  206. package/src/classes/settings/badge/Caller.ts +0 -30
  207. package/src/classes/settings/badge/Queries.ts +0 -19
  208. package/src/classes/settings/badge/Resource.ts +0 -50
  209. package/src/classes/settings/badge/index.ts +0 -2
  210. package/src/classes/settings/index.ts +0 -5
  211. package/src/dapp/context/creator/Creator.ts +0 -122
  212. package/src/dapp/context/creator/DefaultPayloads/DappAccessPayloads.ts +0 -20
  213. package/src/dapp/context/creator/DefaultPayloads/DefaultPayloads.ts +0 -40
  214. package/src/dapp/context/creator/DefaultPayloads/NodeInfoPayload.ts +0 -33
  215. package/src/dapp/context/creator/DefaultPayloads/index.ts +0 -1
  216. package/src/dapp/context/creator/ExternalModulePermissions/ExternalModulePermissions.ts +0 -59
  217. package/src/dapp/context/creator/ExternalModulePermissions/index.ts +0 -1
  218. package/src/dapp/context/creator/createDappContext.ts +0 -61
  219. package/src/dapp/context/creator/index.ts +0 -3
  220. package/src/dapp/context/index.ts +0 -1
  221. package/src/dapp/index.ts +0 -1
  222. package/src/event/bus/Connection.ts +0 -33
  223. package/src/event/bus/EventBus.ts +0 -159
  224. package/src/event/bus/PubSubConnection.ts +0 -28
  225. package/src/event/bus/index.ts +0 -3
  226. package/src/event/connections/DappAccessRequest.ts +0 -11
  227. package/src/event/connections/DappsReady.ts +0 -9
  228. package/src/event/connections/ExposeDappRequest.ts +0 -11
  229. package/src/event/connections/OsPubSubNetworkReady.ts +0 -12
  230. package/src/event/connections/OsSettingsReady.ts +0 -12
  231. package/src/event/connections/OsXyoPublicReady.ts +0 -12
  232. package/src/event/connections/index.ts +0 -6
  233. package/src/event/index.ts +0 -2
  234. package/src/helpers/index.ts +0 -1
  235. package/src/helpers/monitor/XyOsMonitor.ts +0 -52
  236. package/src/helpers/monitor/index.ts +0 -2
  237. package/src/helpers/monitor/types.ts +0 -8
  238. package/src/index.ts +0 -29
  239. package/src/initializer/DappInitializer.ts +0 -57
  240. package/src/initializer/index.ts +0 -1
  241. package/src/intent/Caller.ts +0 -74
  242. package/src/intent/Resource.ts +0 -66
  243. package/src/intent/index.ts +0 -2
  244. package/src/lib/ExternalStore.ts +0 -7
  245. package/src/lib/Listener.ts +0 -1
  246. package/src/lib/ModuleAccountPaths.ts +0 -23
  247. package/src/lib/ModuleNames.ts +0 -3
  248. package/src/lib/NameTransforms.ts +0 -34
  249. package/src/lib/PayloadStore.ts +0 -106
  250. package/src/lib/ResourceStores.ts +0 -7
  251. package/src/lib/index.ts +0 -11
  252. package/src/lib/initializeXns.ts +0 -16
  253. package/src/lib/isEqual.ts +0 -42
  254. package/src/lib/isPayload.ts +0 -24
  255. package/src/lib/tokenPlacesSplit.ts +0 -17
  256. package/src/loadOsNode.ts +0 -44
  257. package/src/manifest/index.ts +0 -2
  258. package/src/manifest/manifestReplacementTokens.ts +0 -6
  259. package/src/manifest/os-node.manifest.json +0 -132
  260. package/src/manifests/dapp-window.manifest.json +0 -36
  261. package/src/manifests/index.ts +0 -1
  262. package/src/models/access/ValidDappAccessInterfaces.ts +0 -6
  263. package/src/models/access/index.ts +0 -1
  264. package/src/models/index.ts +0 -1
  265. package/src/profileModuleEvents.ts +0 -43
  266. package/src/registration/DappRegistrationService.ts +0 -179
  267. package/src/registration/DappRegistry.ts +0 -131
  268. package/src/registration/ValidateDappAccessDiviner/Config.ts +0 -24
  269. package/src/registration/ValidateDappAccessDiviner/Diviner.ts +0 -133
  270. package/src/registration/ValidateDappAccessDiviner/index.ts +0 -2
  271. package/src/registration/index.ts +0 -2
  272. package/src/scripts/xyos/command/config.ts +0 -19
  273. package/src/scripts/xyos/command/create.ts +0 -22
  274. package/src/scripts/xyos/command/index.ts +0 -7
  275. package/src/scripts/xyos/command/manifest.ts +0 -19
  276. package/src/scripts/xyos/command/start.ts +0 -35
  277. package/src/scripts/xyos/index.ts +0 -32
  278. package/src/scripts/xyos/lib/createFromTemplate.ts +0 -11
  279. package/src/scripts/xyos/lib/headless.ts +0 -68
  280. package/src/scripts/xyos/lib/index.ts +0 -2
  281. package/src/signer/Signer.spec.ts +0 -65
  282. package/src/signer/Signers.ts +0 -74
  283. package/src/signer/index.ts +0 -1
  284. package/src/spec/boot.spec.ts +0 -89
  285. package/src/stack/Base.ts +0 -166
  286. package/src/stack/Manager.ts +0 -51
  287. package/src/stack/Map.ts +0 -22
  288. package/src/stack/OsPubSubNetworkStack.ts +0 -70
  289. package/src/stack/OsSettingsStack.ts +0 -24
  290. package/src/stack/XyoPublicNetworkStack.ts +0 -32
  291. package/src/stack/index.ts +0 -6
  292. package/src/system/ManageSystemDapps.ts +0 -148
  293. package/src/system/Queries.ts +0 -69
  294. package/src/system/index.ts +0 -1
  295. package/src/types/global.d.ts +0 -9
  296. package/src/types/images.d.ts +0 -5
  297. package/src/utils/buildWalletSeedPhrasePayload.ts +0 -51
  298. package/src/utils/getApiDomain.ts +0 -14
  299. package/src/utils/index.ts +0 -3
  300. package/src/utils/renameObjKey.ts +0 -22
  301. package/src/wallet/DappSeedPhraseRepository.ts +0 -99
  302. package/src/wallet/SeedPhraseRepository.ts +0 -32
  303. package/src/wallet/index.ts +0 -2
@@ -1,50 +0,0 @@
1
- import { assertEx } from '@xylabs/assert'
2
- import type { OsBadge, XyOsContext } from '@xyo-network/os-model'
3
- import { isBadgeWithMeta } from '@xyo-network/os-model'
4
-
5
- import type { ResourceStore } from '../../../lib/index.ts'
6
- import { PayloadStore } from '../../../lib/index.ts'
7
- import { OsSettingsCallerBase } from '../CallerBase.ts'
8
- import { OsBadgeQueries } from './Queries.ts'
9
-
10
- export type OsBadgeResourceViews = 'savedSeedPhrase'
11
-
12
- export class OsBadgeResource extends OsSettingsCallerBase implements ResourceStore<OsBadgeResourceViews> {
13
- static readonly views: OsBadgeResourceViews[] = ['savedSeedPhrase']
14
-
15
- private _savedSeedPhrase: PayloadStore<OsBadge> | undefined
16
-
17
- constructor(xyOsContext: XyOsContext) {
18
- super(xyOsContext)
19
- }
20
-
21
- get savedSeedPhrase() {
22
- return assertEx(this._savedSeedPhrase, () => 'Saved seed phrase listener not set')
23
- }
24
-
25
- get subscriptions() {
26
- return { savedSeedPhrase: (cb: () => void) => this.savedSeedPhrase.subscribe(cb) }
27
- }
28
-
29
- get views() {
30
- return { savedSeedPhrase: () => this.savedSeedPhrase.latest }
31
- }
32
-
33
- cleanupListeners() {
34
- this.savedSeedPhrase.cleanupListeners()
35
- }
36
-
37
- /**
38
- * start listeners
39
- **/
40
- async start() {
41
- const diviner = await this.getOsSettingsPayloadDiviner()
42
- const archivist = await this.getOsSettingsArchivist()
43
-
44
- this._savedSeedPhrase = await PayloadStore.create<OsBadge>({
45
- archivist,
46
- getLatest: async () => await OsBadgeQueries.getBadge('savedSeedPhrase', diviner),
47
- idFunction: isBadgeWithMeta,
48
- })
49
- }
50
- }
@@ -1,2 +0,0 @@
1
- export * from './Caller.ts'
2
- export * from './Resource.ts'
@@ -1,5 +0,0 @@
1
- export * from './badge/index.ts'
2
- export * from './Caller.ts'
3
- export * from './CallerBase.ts'
4
- export * from './Resource.ts'
5
- export * from './SettingsQueries.ts'
@@ -1,122 +0,0 @@
1
- import { assertEx } from '@xylabs/assert'
2
- import { asArchivistInstance } from '@xyo-network/archivist-model'
3
- import { replaceManifestTokens } from '@xyo-network/kernel'
4
- import { DappPackageManifestPayloadSchema } from '@xyo-network/manifest'
5
- import type { ManifestWrapper } from '@xyo-network/manifest-wrapper'
6
- import { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'
7
- import type { ModuleFactoryLocatorInstance } from '@xyo-network/module-model'
8
- import type { NodeInstance } from '@xyo-network/node-model'
9
- import type {
10
- DappId, DappPackageManifestPayload, ExternalModule, XyOsContext,
11
- } from '@xyo-network/os-model'
12
- import type { WalletInstance } from '@xyo-network/wallet-model'
13
-
14
- import type { DappNodesCreatorParams } from '../../../classes/lib/index.ts'
15
- import { DappCallerBase } from '../../../DappCallerBase.ts'
16
- import { manifestReplacementTokens } from '../../../manifest/index.ts'
17
- import { DefaultPayloads } from './DefaultPayloads/index.ts'
18
- import { ExternalModulePermissions } from './ExternalModulePermissions/index.ts'
19
-
20
- export type TargetDappManifestParams = ConstructorParameters<typeof ManifestWrapper<DappPackageManifestPayload>>
21
-
22
- export class DappContextCreator {
23
- // Designated offset path for the wallet used by windowed dapps. In the future, other offsets could be used for other dapp modes
24
- private static DAPP_WINDOW_WALLET_PATH = '1'
25
-
26
- private context: XyOsContext
27
- private dappId: DappId
28
- private externalPermissions?: ExternalModule[]
29
- private rootWallet: WalletInstance
30
- private sharedLocator?: ModuleFactoryLocatorInstance
31
- private targetDappManifestParams: TargetDappManifestParams
32
-
33
- constructor(
34
- targetDappManifestParams: TargetDappManifestParams,
35
- dappId: DappId,
36
- context: XyOsContext,
37
- rootWallet: WalletInstance,
38
- externalPermissions?: ExternalModule[],
39
- sharedLocator?: ModuleFactoryLocatorInstance,
40
- ) {
41
- this.targetDappManifestParams = targetDappManifestParams
42
- this.dappId = dappId
43
- this.context = context
44
- this.rootWallet = rootWallet
45
- this.externalPermissions = externalPermissions
46
- this.sharedLocator = sharedLocator
47
- }
48
-
49
- static async create(params: DappNodesCreatorParams, xnsNodeUrl: string | undefined, xnsNetwork: string | undefined) {
50
- const {
51
- config, locator, context, wallet,
52
- } = params
53
- const {
54
- payload, dappName, publicChildren, privateChildren,
55
- } = config
56
-
57
- const { external, manifestPayload } = this.parseDappPackageManifestPayload(payload, xnsNodeUrl, xnsNetwork)
58
- console.debug('[DEBUG] dApp manifest', manifestPayload)
59
-
60
- // derive a wallet for the dapp to use from the root wallet
61
- const dappWallet = await wallet.derivePath(DappContextCreator.DAPP_WINDOW_WALLET_PATH)
62
- const targetDappManifestParams: TargetDappManifestParams = [manifestPayload,
63
- dappWallet,
64
- locator ?? new ModuleFactoryLocator(),
65
- publicChildren,
66
- privateChildren]
67
-
68
- const instance = new this(targetDappManifestParams, dappName, context, wallet, external?.modules, locator)
69
- return instance
70
- }
71
-
72
- // Add default payloads to the archivist shared between the os and the dapp
73
- static async primeDappArchivist(dappContext: XyOsContext, osContext: XyOsContext, dappName: DappId) {
74
- const dappCaller = new DappCallerBase(dappContext)
75
- const dappArchivist = await dappCaller.getDappArchivist()
76
- const defaultPayloads = new DefaultPayloads(dappArchivist, osContext, dappName)
77
-
78
- await defaultPayloads.insert()
79
- }
80
-
81
- // Reset the dapp archivist to remove all payloads
82
- static async resetDappArchivist(context: XyOsContext) {
83
- const dappModule = await context.root.resolve('DappArchivist')
84
- const dappArchivist = assertEx(asArchivistInstance(dappModule), () => 'resetDappArchivist: DappArchivist not found')
85
-
86
- await dappArchivist.clear()
87
- }
88
-
89
- private static parseDappPackageManifestPayload(payload: DappPackageManifestPayload, xnsNodeUrl: string | undefined, xnsNetwork: string | undefined) {
90
- // extract external permissions from package manifest payload
91
- const { external, ...manifestWithoutExternals } = payload
92
- const manifestPayloadRaw: DappPackageManifestPayload = {
93
- ...manifestWithoutExternals,
94
- schema: DappPackageManifestPayloadSchema,
95
- }
96
- console.log('DappContextCreator:parseDappPackageManifestPayload', xnsNodeUrl, xnsNetwork)
97
- const manifestPayload = replaceManifestTokens(manifestPayloadRaw, manifestReplacementTokens(xnsNodeUrl, xnsNetwork))
98
- return { external, manifestPayload }
99
- }
100
-
101
- async loadDappContext(context: XyOsContext): Promise<XyOsContext> {
102
- console.log('DappNodesCreator:loadDappContext', this.dappId)
103
- // build nodes and attach to dappNodes to dappWindowNode
104
- const dapp
105
- = (await context.dappByName(this.dappId))
106
- ?? (await (async () => {
107
- const dapp = await context.buildDapp(this.targetDappManifestParams[0], this.dappId)
108
- await dapp.boot(this.rootWallet, this.sharedLocator)
109
- return dapp
110
- })())
111
- await this.handleExternalModulePermissions(dapp.root)
112
- await DappContextCreator.primeDappArchivist(dapp, this.context, this.dappId)
113
-
114
- return dapp
115
- }
116
-
117
- // try to satisfy the external permissions requested by a dapp
118
- private async handleExternalModulePermissions(dappWindowNode: NodeInstance) {
119
- const externalModulePermissions = new ExternalModulePermissions(this.context, dappWindowNode, this.dappId, this.externalPermissions)
120
- await externalModulePermissions.permit()
121
- }
122
- }
@@ -1,20 +0,0 @@
1
- import type { DappName, XyOsContext } from '@xyo-network/os-model'
2
-
3
- import type { DefaultPayloadsInsertable } from '../../../../classes/lib/index.ts'
4
- import { OsCallerBase } from '../../../../OsCallerBase.ts'
5
-
6
- export class DappAccessPayloads implements DefaultPayloadsInsertable {
7
- private context: XyOsContext
8
- constructor(
9
- context: XyOsContext,
10
- _dappName: DappName,
11
- ) {
12
- this.context = context
13
- }
14
-
15
- async payloads() {
16
- const osCaller = new OsCallerBase(this.context)
17
- const archivist = await osCaller.getRegisteredDappInterfacesArchivist()
18
- return await archivist.all()
19
- }
20
- }
@@ -1,40 +0,0 @@
1
- import type { ArchivistInstance } from '@xyo-network/archivist-model'
2
- import type { DappName, XyOsContext } from '@xyo-network/os-model'
3
- import { PayloadBuilder } from '@xyo-network/payload-builder'
4
- import type { Payload } from '@xyo-network/payload-model'
5
-
6
- import type { InsertableConstructor } from '../../../../classes/lib/index.ts'
7
- import { createInsertable } from '../../../../classes/lib/index.ts'
8
- import { DappAccessPayloads } from './DappAccessPayloads.ts'
9
- import { NodeInfoPayload } from './NodeInfoPayload.ts'
10
-
11
- export class DefaultPayloads {
12
- private dappArchivist: ArchivistInstance
13
- private dappName: DappName
14
- private xyOs: XyOsContext
15
-
16
- constructor(
17
- dappArchivist: ArchivistInstance,
18
- xyOs: XyOsContext,
19
- dappName: DappName,
20
- ) {
21
- this.dappArchivist = dappArchivist
22
- this.xyOs = xyOs
23
- this.dappName = dappName
24
- }
25
-
26
- async insert() {
27
- const insertables: InsertableConstructor[] = [NodeInfoPayload, DappAccessPayloads]
28
- const insertPayloads: Payload[] = []
29
- for (const insertable of insertables) {
30
- const classInstance = createInsertable(insertable, this.xyOs, this.dappName)
31
- const payloads = await classInstance.payloads()
32
- insertPayloads.push(...payloads)
33
- }
34
- for (const payload of insertPayloads) {
35
- const [existing] = await this.dappArchivist.get([await PayloadBuilder.dataHash(payload)])
36
- if (existing) continue
37
- await this.dappArchivist.insert([payload])
38
- }
39
- }
40
- }
@@ -1,33 +0,0 @@
1
- import type { Address } from '@xylabs/hex'
2
- import type {
3
- DappName, NodeOsInfo, XyOsContext,
4
- } from '@xyo-network/os-model'
5
- import { NodeOsInfoSchema } from '@xyo-network/os-model'
6
-
7
- import type { DefaultPayloadsInsertable } from '../../../../classes/lib/index.ts'
8
-
9
- export class NodeInfoPayload implements DefaultPayloadsInsertable {
10
- private _context: XyOsContext
11
- constructor(
12
- context: XyOsContext,
13
- _dappName: DappName,
14
- ) {
15
- this._context = context
16
- }
17
-
18
- async payloads() {
19
- const exposedNode = this._context.exposedNode
20
- if (exposedNode) {
21
- console.debug('[DEBUG]', 'Found Exposed Node Address', exposedNode?.address)
22
- } else {
23
- console.error('exposedNode not found')
24
- }
25
-
26
- await Promise.resolve()
27
- const nodeOsInfo: NodeOsInfo = {
28
- publicAddress: exposedNode?.address ?? '' as Address,
29
- schema: NodeOsInfoSchema,
30
- }
31
- return [nodeOsInfo]
32
- }
33
- }
@@ -1 +0,0 @@
1
- export * from './DefaultPayloads.ts'
@@ -1,59 +0,0 @@
1
- import type { AttachableModuleInstance, ModuleIdentifier } from '@xyo-network/module-model'
2
- import type { NodeInstance } from '@xyo-network/node-model'
3
- import type {
4
- DappName, ExternalModule, XyOsContext,
5
- } from '@xyo-network/os-model'
6
-
7
- // Dapps can only request specific modules from the parent node
8
- const ALLOWED_MODULES_FROM_PARENT = ['IntentArchivist', 'OsSettingsNode', 'OsPubSubNetworkStackNode', 'OsXyoPublicNetworkStackNode'] as const
9
-
10
- export class ExternalModulePermissions {
11
- private context: XyOsContext
12
- private dappName: DappName
13
- private dappWindowNode: NodeInstance
14
- private externalPermissions?: ExternalModule[]
15
-
16
- constructor(
17
- context: XyOsContext,
18
- dappWindowNode: NodeInstance,
19
- dappName: DappName,
20
- externalPermissions?: ExternalModule[],
21
- ) {
22
- this.context = context
23
- this.dappWindowNode = dappWindowNode
24
- this.dappName = dappName
25
- this.externalPermissions = externalPermissions
26
- }
27
-
28
- async permit() {
29
- for (const permission of this.externalPermissions ?? []) {
30
- await this.permitExternalModule(permission)
31
- }
32
- }
33
-
34
- private getExternalModuleName(permission: ExternalModule) {
35
- return permission.name as (typeof ALLOWED_MODULES_FROM_PARENT)[number]
36
- }
37
-
38
- private async permitExternalModule(externalPermission: ExternalModule) {
39
- const externalModuleName = this.getExternalModuleName(externalPermission)
40
-
41
- if (ALLOWED_MODULES_FROM_PARENT.includes(externalModuleName)) {
42
- const mod = await this.resolveExternalModule(externalModuleName)
43
- await this.registerAndAttachModule(mod)
44
- } else {
45
- console.warn(`${this.dappName} requested ${externalModuleName} but it was not fulfilled`)
46
- }
47
- }
48
-
49
- private async registerAndAttachModule(mod?: AttachableModuleInstance) {
50
- if (mod) {
51
- await this.dappWindowNode.register?.(mod)
52
- await this.dappWindowNode.attach(mod.address, true)
53
- }
54
- }
55
-
56
- private async resolveExternalModule(id: ModuleIdentifier): Promise<AttachableModuleInstance | undefined> {
57
- return await this.context.root.resolve(id)
58
- }
59
- }
@@ -1 +0,0 @@
1
- export * from './ExternalModulePermissions.ts'
@@ -1,61 +0,0 @@
1
- import { GenericPayloadDiviner } from '@xyo-network/diviner-payload-generic'
2
- import { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'
3
- import type { ModuleFactoryLocatorInstance } from '@xyo-network/module-model'
4
- import type {
5
- RegisteredDapp, WindowDappNodeSet, XyOsContext,
6
- } from '@xyo-network/os-model'
7
- import { HDWallet } from '@xyo-network/wallet'
8
-
9
- import type { DappNodesCreatorParams } from '../../../classes/lib/index.ts'
10
- import { DappSeedPhraseRepository } from '../../../wallet/index.ts'
11
- import { DappContextCreator } from './Creator.ts'
12
-
13
- const GenericPayloadDivinerTags = { 'network.xyo.generic.payload.diviner': 'GenericPayloadDiviner' }
14
-
15
- const resolveLocator = (existingLocator?: ModuleFactoryLocatorInstance): ModuleFactoryLocatorInstance => {
16
- const locator = existingLocator ?? new ModuleFactoryLocator()
17
- locator.register(GenericPayloadDiviner.factory(), GenericPayloadDivinerTags)
18
- return locator
19
- }
20
-
21
- export const createDappContext = async (
22
- dapp: RegisteredDapp,
23
- context: XyOsContext,
24
- allowedNames: string[],
25
- xnsNodeUrl: string | undefined,
26
- xnsNetwork: string | undefined,
27
- ): Promise<WindowDappNodeSet> => {
28
- console.log('createNodes')
29
- try {
30
- const dappSeedPhraseRepository = new DappSeedPhraseRepository(context, allowedNames)
31
- const seedPhrase = await dappSeedPhraseRepository.request(dapp.config.walletId)
32
- if (!seedPhrase) {
33
- throw new Error(`unable to find seed phrase for walletId: ${JSON.stringify(dapp.config, null, 2)}`)
34
- }
35
- const wallet = await HDWallet.fromPhrase(seedPhrase)
36
- const dappName = dapp.config.name
37
- const { config: dappConfig, params: dappParams } = dapp
38
-
39
- const locator = resolveLocator((dappParams.locator ?? new ModuleFactoryLocator()).merge(context.platformLocator))
40
-
41
- const params: DappNodesCreatorParams = {
42
- config: { dappName, payload: dappConfig.manifest },
43
- context,
44
- locator,
45
- wallet,
46
- }
47
- const dappContextCreator = await DappContextCreator.create(params, xnsNodeUrl, xnsNetwork)
48
-
49
- const dappContext = await dappContextCreator.loadDappContext(context)
50
-
51
- return {
52
- context: dappContext,
53
- dappWallet: wallet,
54
- }
55
- } catch (e) {
56
- const error = e as Error
57
- console.error(`Error creating dappWindow node: ${error.message}`)
58
- console.error(`Error creating dappWindow node: ${error.stack}`)
59
- throw new Error(`Error creating dappWindow node: ${error.message}`)
60
- }
61
- }
@@ -1,3 +0,0 @@
1
- export * from './createDappContext.ts'
2
- export * from './Creator.ts'
3
- export * from './ExternalModulePermissions/index.ts'
@@ -1 +0,0 @@
1
- export * from './creator/index.ts'
package/src/dapp/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './context/index.ts'
@@ -1,33 +0,0 @@
1
- import { assertEx } from '@xylabs/assert'
2
- import type { BaseParams } from '@xylabs/base'
3
- import type { EventData } from '@xylabs/events'
4
- import { BaseEmitter } from '@xylabs/events'
5
- import type {
6
- EventBusConnectionInterface, EventBusConnectionRequest, EventBusConnectionType,
7
- } from '@xyo-network/os-model'
8
-
9
- /**
10
- * A Generic Connection to add to an EventBus
11
- * @param {EventBusConnectionRequest} request
12
- */
13
- export class EventBusConnection<TEventData extends EventData = EventData>
14
- extends BaseEmitter<BaseParams, TEventData>
15
- implements EventBusConnectionInterface<TEventData> {
16
- _id?: string
17
- description?: string
18
- type: EventBusConnectionType
19
-
20
- constructor(request: EventBusConnectionRequest) {
21
- super({})
22
- this.description = request.description
23
- this.type = request.type
24
- }
25
-
26
- get id() {
27
- return assertEx(this._id, () => 'Connection ID not set. Did you forget to call buildConnection()?')
28
- }
29
-
30
- buildConnection(id: string) {
31
- this._id = id
32
- }
33
- }
@@ -1,159 +0,0 @@
1
- import { findAs } from '@xylabs/array'
2
- import { assertEx } from '@xylabs/assert'
3
- import { forget } from '@xylabs/forget'
4
- import type { ArchivistModuleEventData } from '@xyo-network/archivist'
5
- import { asArchivistInstance } from '@xyo-network/archivist'
6
- import { MemoryArchivist, MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'
7
- import type {
8
- EventBusConnectionInterface,
9
- EventBusEvent,
10
- EventBusInterface,
11
- EventBusPubSubConnectionInterface,
12
- PublisherEventListener,
13
- } from '@xyo-network/os-model'
14
- import {
15
- asOptionalEventBusEvent,
16
- isPubSubConnections,
17
- } from '@xyo-network/os-model'
18
- import { PayloadBuilder } from '@xyo-network/payload-builder'
19
- import { Mutex } from 'async-mutex'
20
- import { v4 as uuid } from 'uuid'
21
-
22
- /**
23
- * Event Bus implementation inspired by the DBus protocol used in Linux desktop systems for inter-process communication.
24
- *
25
- * General flow:
26
- * 1. Connection Added
27
- * 2. Publisher and Subscriber Callbacks added
28
- * 3. Events occurs and stored internally
29
- * 4. Subscriber Callbacks called based off stored events
30
- */
31
- export class EventBus implements EventBusInterface {
32
- // Internal Archivist to store event data
33
- private _archivist: MemoryArchivist | undefined
34
-
35
- // Store all connections
36
- private connections: Record<string, EventBusConnectionInterface> = {}
37
-
38
- // Store all publisher callbacks for later removal
39
- private publisherCallbacks: Record<string, PublisherEventListener> = {}
40
-
41
- private startMutex = new Mutex()
42
-
43
- get archivist() {
44
- return asArchivistInstance(
45
- assertEx(this._archivist, () => 'Archivist not found. Did you forget to call start()?'),
46
- 'not a valid archivist instance',
47
- { required: true },
48
- )
49
- }
50
-
51
- addConnection(connection: EventBusConnectionInterface) {
52
- // unique connection id
53
- const id = uuid()
54
-
55
- // store in local cache
56
- this.connections[id] = connection
57
-
58
- // update the connection id with the generated id
59
- connection.buildConnection(id)
60
-
61
- // let existing connections know about newly published events
62
- if (isPubSubConnections(connection)) {
63
- this.handlePublisherAdd(connection)
64
- } else {
65
- throw new Error('Unsupported connection type. Must be PubSub')
66
- }
67
- return connection
68
- }
69
-
70
- removeConnection(connectionId: string) {
71
- // find the existing connection
72
- const connection = this.connections[connectionId]
73
- if (!connection) {
74
- throw new Error('Connection not found ' + connectionId)
75
- }
76
-
77
- if (connection && isPubSubConnections(connection)) {
78
- this.handlePublisherRemove(connection)
79
- }
80
-
81
- delete this.connections[connectionId]
82
- }
83
-
84
- async start(storeName = 'EventBusArchivist') {
85
- return await this.startMutex.runExclusive(async () => {
86
- if (this._archivist) {
87
- console.warn('EventBus already started')
88
- return this
89
- }
90
- // Later versions could include a node that has a payload diviner to query past events
91
- this._archivist = await MemoryArchivist.create({ config: { name: storeName, schema: MemoryArchivistConfigSchema } })
92
-
93
- // start listening to inserted events from publishers
94
- // NOTE: This is a very basic implementation and could be optimized by indexing on connection, eventName, and callback
95
- // for faster lookups by event name
96
- this.archivist.on('inserted', ({ payloads }: ArchivistModuleEventData['inserted']) => {
97
- // confirm an eventBusPayload was inserted
98
- const eventBusEvent = findAs(payloads, asOptionalEventBusEvent)
99
- // if not an eventBusPayload, return
100
- if (!eventBusEvent) return
101
- // Loop through all connections
102
- for (const connectionId in this.connections) {
103
- const connection = this.connections[connectionId]
104
- // Target PubSub connections
105
- if (isPubSubConnections(connection) && connection.subscribableEvents) {
106
- // Loop through all subscribable events
107
- for (const [eventName, callback] of connection.subscribableEvents.entries()) {
108
- // check if the event name matches the payload name
109
- if (eventName !== eventBusEvent.name) continue
110
- // pass the event payloads to the callback
111
- if (callback) {
112
- const forgettable = async () => await callback({ payloads })
113
- forget(forgettable())
114
- }
115
- }
116
- }
117
- }
118
- })
119
- return this
120
- })
121
- }
122
-
123
- private handlePublisherAdd(connection: EventBusPubSubConnectionInterface) {
124
- // Loop through all publishable events
125
- for (const eventName of connection.publishableEvents ?? []) {
126
- // Create publisher callback
127
- const connectionPublisherCallback: PublisherEventListener = async ({ payloads }) => {
128
- // build the event payload
129
- const event: EventBusEvent = { name: eventName, schema: 'network.xyo.event.bus.event' }
130
- const eventPayloads = payloads ?? []
131
- event.sources = await PayloadBuilder.dataHashes(eventPayloads)
132
- // Sync events to archivist
133
- try {
134
- await this.archivist.insert([event, ...(payloads ?? [])])
135
- } catch (e) {
136
- console.error('Error inserting event into archivist', e)
137
- }
138
- }
139
- // Subscribe the publisher callback to the connection
140
- connection.on(eventName, connectionPublisherCallback)
141
-
142
- // store the publisher callback for later removal
143
- const callbackId = connection.id + eventName
144
- this.publisherCallbacks[callbackId] = connectionPublisherCallback
145
- }
146
- }
147
-
148
- private handlePublisherRemove(connection: EventBusPubSubConnectionInterface) {
149
- // Loop through all publishable events
150
- for (const [, event] of connection.publishableEvents?.entries() ?? []) {
151
- // find the publisher callback
152
- const id = connection.id + event
153
- const callback = this.publisherCallbacks[id]
154
-
155
- // unsubscribe the publisher callback from the connection
156
- if (callback) connection.off(event, callback)
157
- }
158
- }
159
- }
@@ -1,28 +0,0 @@
1
- import type {
2
- EventBusPubSubConnectionInterface,
3
- EventBusPubSubConnectionRequest,
4
- PublisherEventListenerEventData,
5
- SubscribableEventListeners,
6
- } from '@xyo-network/os-model'
7
-
8
- import { EventBusConnection } from './Connection.ts'
9
-
10
- /**
11
- * A PubSub Connection to add to an EventBus
12
- * @param {EventBusPubSubConnectionRequest} request
13
- */
14
- export class EventBusPubSubConnection<TPublisherEventData extends PublisherEventListenerEventData = PublisherEventListenerEventData>
15
- extends EventBusConnection<TPublisherEventData>
16
- implements EventBusPubSubConnectionInterface {
17
- publishableEvents?: string[]
18
- subscribableEvents?: SubscribableEventListeners
19
-
20
- constructor(request: EventBusPubSubConnectionRequest) {
21
- super(request)
22
- if (request.type !== 'PubSub') {
23
- throw new Error('Invalid connection type. Must be PubSub')
24
- }
25
- this.publishableEvents = request.publishableEvents
26
- this.subscribableEvents = request.subscribableEvents
27
- }
28
- }
@@ -1,3 +0,0 @@
1
- export * from './Connection.ts'
2
- export * from './EventBus.ts'
3
- export * from './PubSubConnection.ts'
@@ -1,11 +0,0 @@
1
- import type { EventBusPubSubConnectionRequest } from '@xyo-network/os-model'
2
-
3
- import { EventBusPubSubConnection } from '../bus/index.ts'
4
-
5
- export const DappAccessRequestEvent = 'dappAccessRequest'
6
-
7
- const dappAccessRequestConnectionRequest: EventBusPubSubConnectionRequest = {
8
- publishableEvents: [DappAccessRequestEvent],
9
- type: 'PubSub',
10
- }
11
- export const dappAccessRequestConnection = () => new EventBusPubSubConnection(dappAccessRequestConnectionRequest)
@@ -1,9 +0,0 @@
1
- import type { EventBusPubSubConnectionRequest } from '@xyo-network/os-model'
2
-
3
- import { EventBusPubSubConnection } from '../bus/index.ts'
4
-
5
- const dappsReadyConnectionRequest: EventBusPubSubConnectionRequest = {
6
- publishableEvents: ['dappsReady'],
7
- type: 'PubSub',
8
- }
9
- export const dappsReadyConnection = () => new EventBusPubSubConnection(dappsReadyConnectionRequest)