moonwall 1.0.0-dev.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 (301) hide show
  1. package/LICENSE +681 -0
  2. package/README.md +54 -0
  3. package/config_schema.json +811 -0
  4. package/dist/api/constants/accounts.d.ts +36 -0
  5. package/dist/api/constants/accounts.d.ts.map +1 -0
  6. package/dist/api/constants/accounts.js +67 -0
  7. package/dist/api/constants/chain.d.ts +134 -0
  8. package/dist/api/constants/chain.d.ts.map +1 -0
  9. package/dist/api/constants/chain.js +149 -0
  10. package/dist/api/constants/index.d.ts +4 -0
  11. package/dist/api/constants/index.d.ts.map +1 -0
  12. package/dist/api/constants/index.js +3 -0
  13. package/dist/api/constants/smartContract.d.ts +29 -0
  14. package/dist/api/constants/smartContract.d.ts.map +1 -0
  15. package/dist/api/constants/smartContract.js +118 -0
  16. package/dist/api/testing/blocks.d.ts +59 -0
  17. package/dist/api/testing/blocks.d.ts.map +1 -0
  18. package/dist/api/testing/blocks.js +147 -0
  19. package/dist/api/testing/contracts.d.ts +5 -0
  20. package/dist/api/testing/contracts.d.ts.map +1 -0
  21. package/dist/api/testing/contracts.js +32 -0
  22. package/dist/api/testing/ethers.d.ts +3 -0
  23. package/dist/api/testing/ethers.d.ts.map +1 -0
  24. package/dist/api/testing/ethers.js +38 -0
  25. package/dist/api/testing/events.d.ts +12 -0
  26. package/dist/api/testing/events.d.ts.map +1 -0
  27. package/dist/api/testing/events.js +23 -0
  28. package/dist/api/testing/extrinsics.d.ts +5 -0
  29. package/dist/api/testing/extrinsics.d.ts.map +1 -0
  30. package/dist/api/testing/extrinsics.js +10 -0
  31. package/dist/api/testing/index.d.ts +9 -0
  32. package/dist/api/testing/index.d.ts.map +1 -0
  33. package/dist/api/testing/index.js +8 -0
  34. package/dist/api/testing/jumping.d.ts +8 -0
  35. package/dist/api/testing/jumping.d.ts.map +1 -0
  36. package/dist/api/testing/jumping.js +78 -0
  37. package/dist/api/testing/providers.d.ts +18 -0
  38. package/dist/api/testing/providers.d.ts.map +1 -0
  39. package/dist/api/testing/providers.js +34 -0
  40. package/dist/api/testing/viem.d.ts +139 -0
  41. package/dist/api/testing/viem.d.ts.map +1 -0
  42. package/dist/api/testing/viem.js +247 -0
  43. package/dist/api/types/config.d.ts +609 -0
  44. package/dist/api/types/config.d.ts.map +1 -0
  45. package/dist/api/types/config.js +1 -0
  46. package/dist/api/types/context.d.ts +125 -0
  47. package/dist/api/types/context.d.ts.map +1 -0
  48. package/dist/api/types/context.js +1 -0
  49. package/dist/api/types/contracts.d.ts +66 -0
  50. package/dist/api/types/contracts.d.ts.map +1 -0
  51. package/dist/api/types/contracts.js +1 -0
  52. package/dist/api/types/eth.d.ts +3 -0
  53. package/dist/api/types/eth.d.ts.map +1 -0
  54. package/dist/api/types/eth.js +1 -0
  55. package/dist/api/types/foundations.d.ts +11 -0
  56. package/dist/api/types/foundations.d.ts.map +1 -0
  57. package/dist/api/types/foundations.js +1 -0
  58. package/dist/api/types/helpers.d.ts +7 -0
  59. package/dist/api/types/helpers.d.ts.map +1 -0
  60. package/dist/api/types/helpers.js +1 -0
  61. package/dist/api/types/index.d.ts +8 -0
  62. package/dist/api/types/index.d.ts.map +1 -0
  63. package/dist/api/types/index.js +7 -0
  64. package/dist/api/types/runner.d.ts +490 -0
  65. package/dist/api/types/runner.d.ts.map +1 -0
  66. package/dist/api/types/runner.js +1 -0
  67. package/dist/cli/cmds/components/LogViewer.d.ts +17 -0
  68. package/dist/cli/cmds/components/LogViewer.d.ts.map +1 -0
  69. package/dist/cli/cmds/components/LogViewer.js +171 -0
  70. package/dist/cli/cmds/entrypoint.d.ts +6 -0
  71. package/dist/cli/cmds/entrypoint.d.ts.map +1 -0
  72. package/dist/cli/cmds/entrypoint.js +192 -0
  73. package/dist/cli/cmds/interactiveCmds/chopsticksIntCmds.d.ts +2 -0
  74. package/dist/cli/cmds/interactiveCmds/chopsticksIntCmds.d.ts.map +1 -0
  75. package/dist/cli/cmds/interactiveCmds/chopsticksIntCmds.js +117 -0
  76. package/dist/cli/cmds/interactiveCmds/devIntCmds.d.ts +2 -0
  77. package/dist/cli/cmds/interactiveCmds/devIntCmds.d.ts.map +1 -0
  78. package/dist/cli/cmds/interactiveCmds/devIntCmds.js +103 -0
  79. package/dist/cli/cmds/interactiveCmds/index.d.ts +4 -0
  80. package/dist/cli/cmds/interactiveCmds/index.d.ts.map +1 -0
  81. package/dist/cli/cmds/interactiveCmds/index.js +3 -0
  82. package/dist/cli/cmds/interactiveCmds/zombieIntCmds.d.ts +2 -0
  83. package/dist/cli/cmds/interactiveCmds/zombieIntCmds.d.ts.map +1 -0
  84. package/dist/cli/cmds/interactiveCmds/zombieIntCmds.js +32 -0
  85. package/dist/cli/cmds/main.d.ts +2 -0
  86. package/dist/cli/cmds/main.d.ts.map +1 -0
  87. package/dist/cli/cmds/main.js +336 -0
  88. package/dist/cli/cmds/runNetwork.d.ts +3 -0
  89. package/dist/cli/cmds/runNetwork.d.ts.map +1 -0
  90. package/dist/cli/cmds/runNetwork.js +292 -0
  91. package/dist/cli/cmds/runTests.d.ts +12 -0
  92. package/dist/cli/cmds/runTests.d.ts.map +1 -0
  93. package/dist/cli/cmds/runTests.js +257 -0
  94. package/dist/cli/internal/cmdFunctions/downloader.d.ts +4 -0
  95. package/dist/cli/internal/cmdFunctions/downloader.d.ts.map +1 -0
  96. package/dist/cli/internal/cmdFunctions/downloader.js +49 -0
  97. package/dist/cli/internal/cmdFunctions/fetchArtifact.d.ts +10 -0
  98. package/dist/cli/internal/cmdFunctions/fetchArtifact.d.ts.map +1 -0
  99. package/dist/cli/internal/cmdFunctions/fetchArtifact.js +145 -0
  100. package/dist/cli/internal/cmdFunctions/index.d.ts +5 -0
  101. package/dist/cli/internal/cmdFunctions/index.d.ts.map +1 -0
  102. package/dist/cli/internal/cmdFunctions/index.js +4 -0
  103. package/dist/cli/internal/cmdFunctions/initialisation.d.ts +20 -0
  104. package/dist/cli/internal/cmdFunctions/initialisation.d.ts.map +1 -0
  105. package/dist/cli/internal/cmdFunctions/initialisation.js +150 -0
  106. package/dist/cli/internal/cmdFunctions/tempLogs.d.ts +3 -0
  107. package/dist/cli/internal/cmdFunctions/tempLogs.d.ts.map +1 -0
  108. package/dist/cli/internal/cmdFunctions/tempLogs.js +37 -0
  109. package/dist/cli/internal/commandParsers.d.ts +59 -0
  110. package/dist/cli/internal/commandParsers.d.ts.map +1 -0
  111. package/dist/cli/internal/commandParsers.js +305 -0
  112. package/dist/cli/internal/deriveTestIds.d.ts +8 -0
  113. package/dist/cli/internal/deriveTestIds.d.ts.map +1 -0
  114. package/dist/cli/internal/deriveTestIds.js +123 -0
  115. package/dist/cli/internal/effect/index.d.ts +6 -0
  116. package/dist/cli/internal/effect/index.d.ts.map +1 -0
  117. package/dist/cli/internal/effect/index.js +5 -0
  118. package/dist/cli/internal/fileCheckers.d.ts +11 -0
  119. package/dist/cli/internal/fileCheckers.d.ts.map +1 -0
  120. package/dist/cli/internal/fileCheckers.js +165 -0
  121. package/dist/cli/internal/foundations/index.d.ts +4 -0
  122. package/dist/cli/internal/foundations/index.d.ts.map +1 -0
  123. package/dist/cli/internal/foundations/index.js +4 -0
  124. package/dist/cli/internal/index.d.ts +12 -0
  125. package/dist/cli/internal/index.d.ts.map +1 -0
  126. package/dist/cli/internal/index.js +11 -0
  127. package/dist/cli/internal/launcherCommon.d.ts +4 -0
  128. package/dist/cli/internal/launcherCommon.d.ts.map +1 -0
  129. package/dist/cli/internal/launcherCommon.js +130 -0
  130. package/dist/cli/internal/localNode.d.ts +16 -0
  131. package/dist/cli/internal/localNode.d.ts.map +1 -0
  132. package/dist/cli/internal/localNode.js +362 -0
  133. package/dist/cli/internal/logging.d.ts +2 -0
  134. package/dist/cli/internal/logging.d.ts.map +1 -0
  135. package/dist/cli/internal/logging.js +26 -0
  136. package/dist/cli/internal/node.d.ts +33 -0
  137. package/dist/cli/internal/node.d.ts.map +1 -0
  138. package/dist/cli/internal/node.js +228 -0
  139. package/dist/cli/internal/processHelpers.d.ts +17 -0
  140. package/dist/cli/internal/processHelpers.d.ts.map +1 -0
  141. package/dist/cli/internal/processHelpers.js +56 -0
  142. package/dist/cli/internal/providerFactories.d.ts +48 -0
  143. package/dist/cli/internal/providerFactories.d.ts.map +1 -0
  144. package/dist/cli/internal/providerFactories.js +442 -0
  145. package/dist/cli/internal/testIdParser.d.ts +34 -0
  146. package/dist/cli/internal/testIdParser.d.ts.map +1 -0
  147. package/dist/cli/internal/testIdParser.js +167 -0
  148. package/dist/cli/lib/binariesHelpers.d.ts +15 -0
  149. package/dist/cli/lib/binariesHelpers.d.ts.map +1 -0
  150. package/dist/cli/lib/binariesHelpers.js +99 -0
  151. package/dist/cli/lib/configReader.d.ts +8 -0
  152. package/dist/cli/lib/configReader.d.ts.map +1 -0
  153. package/dist/cli/lib/configReader.js +115 -0
  154. package/dist/cli/lib/contractFunctions.d.ts +2 -0
  155. package/dist/cli/lib/contractFunctions.d.ts.map +1 -0
  156. package/dist/cli/lib/contractFunctions.js +2 -0
  157. package/dist/cli/lib/globalContext.d.ts +46 -0
  158. package/dist/cli/lib/globalContext.d.ts.map +1 -0
  159. package/dist/cli/lib/globalContext.js +710 -0
  160. package/dist/cli/lib/governanceProcedures.d.ts +27 -0
  161. package/dist/cli/lib/governanceProcedures.d.ts.map +1 -0
  162. package/dist/cli/lib/governanceProcedures.js +458 -0
  163. package/dist/cli/lib/handlers/index.d.ts +5 -0
  164. package/dist/cli/lib/handlers/index.d.ts.map +1 -0
  165. package/dist/cli/lib/handlers/index.js +5 -0
  166. package/dist/cli/lib/repoDefinitions/index.d.ts +6 -0
  167. package/dist/cli/lib/repoDefinitions/index.d.ts.map +1 -0
  168. package/dist/cli/lib/repoDefinitions/index.js +21 -0
  169. package/dist/cli/lib/repoDefinitions/moonbeam.d.ts +4 -0
  170. package/dist/cli/lib/repoDefinitions/moonbeam.d.ts.map +1 -0
  171. package/dist/cli/lib/repoDefinitions/moonbeam.js +30 -0
  172. package/dist/cli/lib/repoDefinitions/polkadot.d.ts +4 -0
  173. package/dist/cli/lib/repoDefinitions/polkadot.d.ts.map +1 -0
  174. package/dist/cli/lib/repoDefinitions/polkadot.js +11 -0
  175. package/dist/cli/lib/repoDefinitions/tanssi.d.ts +4 -0
  176. package/dist/cli/lib/repoDefinitions/tanssi.d.ts.map +1 -0
  177. package/dist/cli/lib/repoDefinitions/tanssi.js +14 -0
  178. package/dist/cli/lib/rpcFunctions.d.ts +2 -0
  179. package/dist/cli/lib/rpcFunctions.d.ts.map +1 -0
  180. package/dist/cli/lib/rpcFunctions.js +26 -0
  181. package/dist/cli/lib/runnerContext.d.ts +32 -0
  182. package/dist/cli/lib/runnerContext.d.ts.map +1 -0
  183. package/dist/cli/lib/runnerContext.js +156 -0
  184. package/dist/cli/lib/shardManager.d.ts +40 -0
  185. package/dist/cli/lib/shardManager.d.ts.map +1 -0
  186. package/dist/cli/lib/shardManager.js +80 -0
  187. package/dist/cli/lib/upgradeProcedures.d.ts +5 -0
  188. package/dist/cli/lib/upgradeProcedures.d.ts.map +1 -0
  189. package/dist/cli/lib/upgradeProcedures.js +221 -0
  190. package/dist/cli.d.ts +4 -0
  191. package/dist/cli.d.ts.map +1 -0
  192. package/dist/cli.js +3 -0
  193. package/dist/contracts/contractInteraction.d.ts +17 -0
  194. package/dist/contracts/contractInteraction.d.ts.map +1 -0
  195. package/dist/contracts/contractInteraction.js +170 -0
  196. package/dist/contracts/index.d.ts +2 -0
  197. package/dist/contracts/index.d.ts.map +1 -0
  198. package/dist/contracts/index.js +1 -0
  199. package/dist/foundations/chopsticks/handler.d.ts +3 -0
  200. package/dist/foundations/chopsticks/handler.d.ts.map +1 -0
  201. package/dist/foundations/chopsticks/handler.js +93 -0
  202. package/dist/foundations/chopsticks/helpers.d.ts +27 -0
  203. package/dist/foundations/chopsticks/helpers.d.ts.map +1 -0
  204. package/dist/foundations/chopsticks/helpers.js +133 -0
  205. package/dist/foundations/dev/handler.d.ts +3 -0
  206. package/dist/foundations/dev/handler.d.ts.map +1 -0
  207. package/dist/foundations/dev/handler.js +136 -0
  208. package/dist/foundations/dev/helpers.d.ts +27 -0
  209. package/dist/foundations/dev/helpers.d.ts.map +1 -0
  210. package/dist/foundations/dev/helpers.js +161 -0
  211. package/dist/foundations/read-only/handler.d.ts +3 -0
  212. package/dist/foundations/read-only/handler.d.ts.map +1 -0
  213. package/dist/foundations/read-only/handler.js +32 -0
  214. package/dist/foundations/zombie/handler.d.ts +3 -0
  215. package/dist/foundations/zombie/handler.d.ts.map +1 -0
  216. package/dist/foundations/zombie/handler.js +92 -0
  217. package/dist/foundations/zombie/helpers.d.ts +16 -0
  218. package/dist/foundations/zombie/helpers.d.ts.map +1 -0
  219. package/dist/foundations/zombie/helpers.js +97 -0
  220. package/dist/index.d.ts +17 -0
  221. package/dist/index.d.ts.map +1 -0
  222. package/dist/index.js +47 -0
  223. package/dist/internal/common.d.ts +3 -0
  224. package/dist/internal/common.d.ts.map +1 -0
  225. package/dist/internal/common.js +41 -0
  226. package/dist/internal/index.d.ts +4 -0
  227. package/dist/internal/index.d.ts.map +1 -0
  228. package/dist/internal/index.js +3 -0
  229. package/dist/internal/logger.d.ts +24 -0
  230. package/dist/internal/logger.d.ts.map +1 -0
  231. package/dist/internal/logger.js +66 -0
  232. package/dist/internal/logging.d.ts +7 -0
  233. package/dist/internal/logging.d.ts.map +1 -0
  234. package/dist/internal/logging.js +36 -0
  235. package/dist/moondebug.d.ts +3 -0
  236. package/dist/moondebug.d.ts.map +1 -0
  237. package/dist/moondebug.js +2 -0
  238. package/dist/services/cache/FileLock.d.ts +11 -0
  239. package/dist/services/cache/FileLock.d.ts.map +1 -0
  240. package/dist/services/cache/FileLock.js +68 -0
  241. package/dist/services/cache/StartupCacheService.d.ts +23 -0
  242. package/dist/services/cache/StartupCacheService.d.ts.map +1 -0
  243. package/dist/services/cache/StartupCacheService.js +159 -0
  244. package/dist/services/cache/index.d.ts +3 -0
  245. package/dist/services/cache/index.d.ts.map +1 -0
  246. package/dist/services/cache/index.js +2 -0
  247. package/dist/services/chopsticks/ChopsticksMultiChain.d.ts +158 -0
  248. package/dist/services/chopsticks/ChopsticksMultiChain.d.ts.map +1 -0
  249. package/dist/services/chopsticks/ChopsticksMultiChain.js +282 -0
  250. package/dist/services/chopsticks/ChopsticksService.d.ts +313 -0
  251. package/dist/services/chopsticks/ChopsticksService.d.ts.map +1 -0
  252. package/dist/services/chopsticks/ChopsticksService.js +77 -0
  253. package/dist/services/chopsticks/chopsticksConfigParser.d.ts +40 -0
  254. package/dist/services/chopsticks/chopsticksConfigParser.d.ts.map +1 -0
  255. package/dist/services/chopsticks/chopsticksConfigParser.js +201 -0
  256. package/dist/services/chopsticks/index.d.ts +5 -0
  257. package/dist/services/chopsticks/index.d.ts.map +1 -0
  258. package/dist/services/chopsticks/index.js +4 -0
  259. package/dist/services/chopsticks/launchChopsticksEffect.d.ts +225 -0
  260. package/dist/services/chopsticks/launchChopsticksEffect.d.ts.map +1 -0
  261. package/dist/services/chopsticks/launchChopsticksEffect.js +623 -0
  262. package/dist/services/config/configAccessors.d.ts +41 -0
  263. package/dist/services/config/configAccessors.d.ts.map +1 -0
  264. package/dist/services/config/configAccessors.js +149 -0
  265. package/dist/services/config/index.d.ts +2 -0
  266. package/dist/services/config/index.d.ts.map +1 -0
  267. package/dist/services/config/index.js +1 -0
  268. package/dist/services/errors.d.ts +72 -0
  269. package/dist/services/errors.d.ts.map +1 -0
  270. package/dist/services/errors.js +31 -0
  271. package/dist/services/index.d.ts +7 -0
  272. package/dist/services/index.d.ts.map +1 -0
  273. package/dist/services/index.js +6 -0
  274. package/dist/services/network/NodeReadinessService.d.ts +35 -0
  275. package/dist/services/network/NodeReadinessService.d.ts.map +1 -0
  276. package/dist/services/network/NodeReadinessService.js +120 -0
  277. package/dist/services/network/PortDiscoveryService.d.ts +22 -0
  278. package/dist/services/network/PortDiscoveryService.d.ts.map +1 -0
  279. package/dist/services/network/PortDiscoveryService.js +77 -0
  280. package/dist/services/network/RpcPortDiscoveryService.d.ts +25 -0
  281. package/dist/services/network/RpcPortDiscoveryService.d.ts.map +1 -0
  282. package/dist/services/network/RpcPortDiscoveryService.js +136 -0
  283. package/dist/services/network/index.d.ts +4 -0
  284. package/dist/services/network/index.d.ts.map +1 -0
  285. package/dist/services/network/index.js +3 -0
  286. package/dist/services/process/ProcessManagerService.d.ts +49 -0
  287. package/dist/services/process/ProcessManagerService.d.ts.map +1 -0
  288. package/dist/services/process/ProcessManagerService.js +162 -0
  289. package/dist/services/process/index.d.ts +3 -0
  290. package/dist/services/process/index.d.ts.map +1 -0
  291. package/dist/services/process/index.js +2 -0
  292. package/dist/services/process/launchNodeEffect.d.ts +40 -0
  293. package/dist/services/process/launchNodeEffect.d.ts.map +1 -0
  294. package/dist/services/process/launchNodeEffect.js +86 -0
  295. package/dist/util/functions/index.d.ts +3 -0
  296. package/dist/util/functions/index.d.ts.map +1 -0
  297. package/dist/util/functions/index.js +4 -0
  298. package/dist/util/index.d.ts +4 -0
  299. package/dist/util/index.d.ts.map +1 -0
  300. package/dist/util/index.js +2 -0
  301. package/package.json +157 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Chopsticks Config Parser
3
+ *
4
+ * Parses chopsticks YAML config files and resolves environment variables,
5
+ * providing early validation before attempting to launch.
6
+ *
7
+ * This module uses the ChopsticksConfig type directly from @acala-network/chopsticks
8
+ * to ensure we stay in sync with upstream changes and support all config options.
9
+ */
10
+ import { Effect } from "effect";
11
+ import { ChopsticksSetupError, type ChopsticksConfig } from "./ChopsticksService.js";
12
+ /**
13
+ * Overrides that can be applied to the parsed config.
14
+ * These use Moonwall's naming conventions from ChopsticksLaunchSpec.
15
+ */
16
+ export interface ChopsticksConfigOverrides {
17
+ port?: number;
18
+ host?: string;
19
+ buildBlockMode?: "batch" | "manual" | "instant";
20
+ wasmOverride?: string;
21
+ allowUnresolvedImports?: boolean;
22
+ }
23
+ /**
24
+ * Parse a chopsticks YAML config file and return a validated ChopsticksConfig.
25
+ *
26
+ * This function:
27
+ * 1. Reads and parses the YAML file
28
+ * 2. Resolves environment variables (${env.VAR_NAME} syntax)
29
+ * 3. Validates required fields
30
+ * 4. Applies any overrides
31
+ * 5. Returns the config in chopsticks' native format (kebab-case keys)
32
+ *
33
+ * The returned config is compatible with chopsticks' setupWithServer function.
34
+ */
35
+ export declare const parseChopsticksConfigFile: (configPath: string, overrides?: ChopsticksConfigOverrides) => Effect.Effect<ChopsticksConfig, ChopsticksSetupError>;
36
+ /**
37
+ * Validate a ChopsticksConfig object
38
+ */
39
+ export declare const validateChopsticksConfig: (config: ChopsticksConfig) => Effect.Effect<ChopsticksConfig, ChopsticksSetupError>;
40
+ //# sourceMappingURL=chopsticksConfigParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chopsticksConfigParser.d.ts","sourceRoot":"","sources":["../../../src/services/chopsticks/chopsticksConfigParser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,oBAAoB,EAAE,KAAK,gBAAgB,EAAE,+BAA+B;AAkGrF;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,GACpC,YAAY,MAAM,EAClB,YAAY,yBAAyB,KACpC,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,oBAAoB,CA4FnD,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,QAAQ,gBAAgB,KACvB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,oBAAoB,CA+BnD,CAAC"}
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Chopsticks Config Parser
3
+ *
4
+ * Parses chopsticks YAML config files and resolves environment variables,
5
+ * providing early validation before attempting to launch.
6
+ *
7
+ * This module uses the ChopsticksConfig type directly from @acala-network/chopsticks
8
+ * to ensure we stay in sync with upstream changes and support all config options.
9
+ */
10
+ import { Effect } from "effect";
11
+ import * as fs from "node:fs";
12
+ import * as yaml from "yaml";
13
+ import { ChopsticksSetupError } from "./ChopsticksService.js";
14
+ import { createLogger } from "../../util/index.js";
15
+ // Local values to avoid value import from chopsticks (which initializes loggers)
16
+ const BuildBlockModeValues = {
17
+ Batch: "Batch",
18
+ Manual: "Manual",
19
+ Instant: "Instant",
20
+ };
21
+ const logger = createLogger({ name: "chopsticksConfigParser" });
22
+ /**
23
+ * Resolve environment variable references in a string
24
+ * Supports ${env.VAR_NAME} syntax
25
+ */
26
+ const resolveEnvVars = (value) => {
27
+ return value.replace(/\$\{env\.([^}]+)\}/g, (_, varName) => {
28
+ const envValue = process.env[varName];
29
+ if (envValue === undefined) {
30
+ logger.warn(`Environment variable ${varName} is not set`);
31
+ return "";
32
+ }
33
+ return envValue;
34
+ });
35
+ };
36
+ /**
37
+ * Recursively resolve environment variable references in any value.
38
+ * - Strings: resolves ${env.VAR_NAME} patterns
39
+ * - Arrays: recursively processes each element
40
+ * - Objects: recursively processes each value
41
+ * - Other types (numbers, booleans, null, undefined): returned as-is
42
+ */
43
+ const resolveEnvVarsDeep = (value) => {
44
+ if (typeof value === "string") {
45
+ return resolveEnvVars(value);
46
+ }
47
+ if (Array.isArray(value)) {
48
+ return value.map(resolveEnvVarsDeep);
49
+ }
50
+ if (value !== null && typeof value === "object") {
51
+ const result = {};
52
+ for (const [key, val] of Object.entries(value)) {
53
+ result[key] = resolveEnvVarsDeep(val);
54
+ }
55
+ return result;
56
+ }
57
+ return value;
58
+ };
59
+ /**
60
+ * Parse build block mode string to enum
61
+ */
62
+ const parseBuildBlockMode = (mode) => {
63
+ switch (mode?.toLowerCase()) {
64
+ case "batch":
65
+ return BuildBlockModeValues.Batch;
66
+ case "instant":
67
+ return BuildBlockModeValues.Instant;
68
+ case "manual":
69
+ default:
70
+ return BuildBlockModeValues.Manual;
71
+ }
72
+ };
73
+ /**
74
+ * Parse the block field which can be a number, block hash string, or env var.
75
+ * Returns undefined if the value is empty or unset.
76
+ */
77
+ const parseBlockField = (block) => {
78
+ if (block === undefined || block === null) {
79
+ return block;
80
+ }
81
+ // Already a number, return as-is
82
+ if (typeof block === "number") {
83
+ return block;
84
+ }
85
+ // Empty string means env var wasn't set
86
+ if (block === "") {
87
+ return undefined;
88
+ }
89
+ // Try to convert to number (block number)
90
+ const blockNum = Number(block);
91
+ if (!Number.isNaN(blockNum)) {
92
+ return blockNum;
93
+ }
94
+ // It's a block hash (string like "0x...")
95
+ return block;
96
+ };
97
+ /**
98
+ * Parse a chopsticks YAML config file and return a validated ChopsticksConfig.
99
+ *
100
+ * This function:
101
+ * 1. Reads and parses the YAML file
102
+ * 2. Resolves environment variables (${env.VAR_NAME} syntax)
103
+ * 3. Validates required fields
104
+ * 4. Applies any overrides
105
+ * 5. Returns the config in chopsticks' native format (kebab-case keys)
106
+ *
107
+ * The returned config is compatible with chopsticks' setupWithServer function.
108
+ */
109
+ export const parseChopsticksConfigFile = (configPath, overrides) => Effect.gen(function* () {
110
+ // Read the config file
111
+ const fileContent = yield* Effect.tryPromise({
112
+ try: async () => {
113
+ const content = await fs.promises.readFile(configPath, "utf-8");
114
+ return content;
115
+ },
116
+ catch: (cause) => new ChopsticksSetupError({
117
+ cause,
118
+ endpoint: `file://${configPath}`,
119
+ }),
120
+ });
121
+ // Parse YAML (raw, unprocessed)
122
+ const rawConfigUnresolved = yield* Effect.try({
123
+ try: () => yaml.parse(fileContent),
124
+ catch: (cause) => new ChopsticksSetupError({
125
+ cause: new Error(`Failed to parse YAML config: ${cause}`),
126
+ endpoint: `file://${configPath}`,
127
+ }),
128
+ });
129
+ // Resolve all environment variables throughout the config
130
+ const rawConfig = resolveEnvVarsDeep(rawConfigUnresolved);
131
+ // Extract endpoint for validation (may be string or array)
132
+ const rawEndpoint = rawConfig.endpoint;
133
+ const endpoint = typeof rawEndpoint === "string"
134
+ ? rawEndpoint
135
+ : Array.isArray(rawEndpoint)
136
+ ? rawEndpoint[0]
137
+ : "";
138
+ if (!endpoint) {
139
+ return yield* Effect.fail(new ChopsticksSetupError({
140
+ cause: new Error(`Endpoint is required but not configured. ` +
141
+ `Check that the environment variable in your chopsticks config is set. ` +
142
+ `Raw value: "${rawConfigUnresolved.endpoint ?? ""}"`),
143
+ endpoint: String(rawConfigUnresolved.endpoint) || "undefined",
144
+ }));
145
+ }
146
+ if (!endpoint.startsWith("ws://") && !endpoint.startsWith("wss://")) {
147
+ return yield* Effect.fail(new ChopsticksSetupError({
148
+ cause: new Error(`Invalid endpoint format: "${endpoint}" - must start with ws:// or wss://`),
149
+ endpoint,
150
+ }));
151
+ }
152
+ // Parse block field
153
+ const block = parseBlockField(rawConfig.block);
154
+ // Determine build-block-mode
155
+ const rawBuildBlockMode = rawConfig["build-block-mode"];
156
+ const buildBlockMode = overrides?.buildBlockMode !== undefined
157
+ ? parseBuildBlockMode(overrides.buildBlockMode)
158
+ : rawBuildBlockMode !== undefined
159
+ ? parseBuildBlockMode(rawBuildBlockMode)
160
+ : BuildBlockModeValues.Manual;
161
+ const finalPort = overrides?.port ?? rawConfig.port ?? 8000;
162
+ logger.debug(`Parsed chopsticks config from ${configPath}`);
163
+ logger.debug(` endpoint: ${endpoint}`);
164
+ logger.debug(` port: ${finalPort}`);
165
+ const config = {
166
+ ...rawConfig,
167
+ block,
168
+ "build-block-mode": buildBlockMode,
169
+ port: finalPort,
170
+ ...(overrides?.host !== undefined && { host: overrides.host }),
171
+ ...(overrides?.wasmOverride !== undefined && { "wasm-override": overrides.wasmOverride }),
172
+ ...(overrides?.allowUnresolvedImports !== undefined && {
173
+ "allow-unresolved-imports": overrides.allowUnresolvedImports,
174
+ }),
175
+ };
176
+ return config;
177
+ });
178
+ /**
179
+ * Validate a ChopsticksConfig object
180
+ */
181
+ export const validateChopsticksConfig = (config) => Effect.gen(function* () {
182
+ // Extract endpoint (may be string or array)
183
+ const endpoint = typeof config.endpoint === "string"
184
+ ? config.endpoint
185
+ : Array.isArray(config.endpoint)
186
+ ? config.endpoint[0]
187
+ : undefined;
188
+ if (!endpoint) {
189
+ return yield* Effect.fail(new ChopsticksSetupError({
190
+ cause: new Error("Endpoint is required - check your environment variables"),
191
+ endpoint: "undefined",
192
+ }));
193
+ }
194
+ if (!endpoint.startsWith("ws://") && !endpoint.startsWith("wss://")) {
195
+ return yield* Effect.fail(new ChopsticksSetupError({
196
+ cause: new Error(`Invalid endpoint format: "${endpoint}" - must start with ws:// or wss://`),
197
+ endpoint,
198
+ }));
199
+ }
200
+ return config;
201
+ });
@@ -0,0 +1,5 @@
1
+ export * from "./ChopsticksService.js";
2
+ export * from "./ChopsticksMultiChain.js";
3
+ export * from "./chopsticksConfigParser.js";
4
+ export * from "./launchChopsticksEffect.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/chopsticks/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,0CAA0C;AAC1C,4CAA4C;AAC5C,4CAA4C"}
@@ -0,0 +1,4 @@
1
+ export * from "./ChopsticksService.js";
2
+ export * from "./ChopsticksMultiChain.js";
3
+ export * from "./chopsticksConfigParser.js";
4
+ export * from "./launchChopsticksEffect.js";
@@ -0,0 +1,225 @@
1
+ /**
2
+ * Effect-based Chopsticks launcher with manual cleanup support
3
+ *
4
+ * This module provides a programmatic way to launch chopsticks instances
5
+ * using the Effect pattern, replacing the previous CLI subprocess approach.
6
+ *
7
+ * Like launchNodeEffect, it returns a cleanup function rather than using
8
+ * Effect scopes, because the chopsticks instance needs to persist across
9
+ * test suites (not just a single Effect scope).
10
+ */
11
+ import { Effect, Layer } from "effect";
12
+ import type { HexString } from "@polkadot/util/types";
13
+ import type { ChopsticksLaunchSpec } from "../../api/types/index.js";
14
+ import * as fs from "node:fs";
15
+ import type { Blockchain, BuildBlockMode } from "@acala-network/chopsticks";
16
+ export declare const BuildBlockModeValues: {
17
+ readonly Batch: "Batch";
18
+ readonly Manual: "Manual";
19
+ readonly Instant: "Instant";
20
+ };
21
+ export type { BuildBlockMode };
22
+ import { type ChopsticksConfig, type BlockCreationParams, type BlockCreationResult, type DryRunResult, ChopsticksService, ChopsticksConfigTag, ChopsticksSetupError, ChopsticksBlockError, ChopsticksStorageError, ChopsticksExtrinsicError, ChopsticksXcmError } from "./ChopsticksService.js";
23
+ /**
24
+ * Set the log stream for chopsticks to write to
25
+ */
26
+ export declare function setChopsticksLogStream(stream: fs.WriteStream | null): void;
27
+ /**
28
+ * Configure the chopsticks internal logger (synchronous version)
29
+ * Only works if chopsticks has already been imported.
30
+ */
31
+ export declare function configureChopsticksLogger(level?: string): void;
32
+ /**
33
+ * Result from launching a chopsticks instance
34
+ */
35
+ export interface ChopsticksLaunchResult {
36
+ /** Direct access to the blockchain instance */
37
+ readonly chain: Blockchain;
38
+ /** WebSocket address (e.g., "127.0.0.1:8000") */
39
+ readonly addr: string;
40
+ /** Port number */
41
+ readonly port: number;
42
+ }
43
+ /**
44
+ * Service implementation returned by launchChopsticksEffect
45
+ */
46
+ export interface ChopsticksServiceImpl {
47
+ readonly chain: Blockchain;
48
+ readonly addr: string;
49
+ readonly port: number;
50
+ readonly createBlock: (params?: BlockCreationParams) => Effect.Effect<BlockCreationResult, ChopsticksBlockError>;
51
+ readonly setStorage: (params: {
52
+ module: string;
53
+ method: string;
54
+ params: unknown[];
55
+ }) => Effect.Effect<void, ChopsticksStorageError>;
56
+ readonly submitExtrinsic: (extrinsic: HexString) => Effect.Effect<HexString, ChopsticksExtrinsicError>;
57
+ readonly dryRunExtrinsic: (extrinsic: HexString | {
58
+ call: HexString;
59
+ address: string;
60
+ }, at?: HexString) => Effect.Effect<DryRunResult, ChopsticksExtrinsicError>;
61
+ readonly getBlock: (hashOrNumber?: HexString | number) => Effect.Effect<{
62
+ hash: HexString;
63
+ number: number;
64
+ } | undefined, ChopsticksBlockError>;
65
+ readonly setHead: (hashOrNumber: HexString | number) => Effect.Effect<void, ChopsticksBlockError>;
66
+ readonly submitUpwardMessages: (paraId: number, messages: HexString[]) => Effect.Effect<void, ChopsticksXcmError>;
67
+ readonly submitDownwardMessages: (messages: Array<{
68
+ sentAt: number;
69
+ msg: HexString;
70
+ }>) => Effect.Effect<void, ChopsticksXcmError>;
71
+ readonly submitHorizontalMessages: (paraId: number, messages: Array<{
72
+ sentAt: number;
73
+ data: HexString;
74
+ }>) => Effect.Effect<void, ChopsticksXcmError>;
75
+ }
76
+ /**
77
+ * Launch a chopsticks instance with manual cleanup support
78
+ *
79
+ * This function uses the programmatic setupWithServer API from @acala-network/chopsticks
80
+ * instead of spawning a CLI subprocess. It returns the chopsticks instance along with
81
+ * a cleanup function that should be called when the instance is no longer needed.
82
+ *
83
+ * @param config - Chopsticks configuration
84
+ * @returns Promise with the launch result and cleanup function
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * const { result, cleanup } = await launchChopsticksEffect({
89
+ * endpoint: "wss://rpc.polkadot.io",
90
+ * port: 8000,
91
+ * buildBlockMode: BuildBlockMode.Manual,
92
+ * });
93
+ *
94
+ * // Use the chopsticks instance
95
+ * const block = await Effect.runPromise(result.createBlock());
96
+ *
97
+ * // When done, cleanup
98
+ * await cleanup();
99
+ * ```
100
+ */
101
+ export declare function launchChopsticksEffect(config: ChopsticksConfig): Promise<{
102
+ result: ChopsticksServiceImpl;
103
+ cleanup: () => Promise<void>;
104
+ }>;
105
+ /**
106
+ * Launch chopsticks as an Effect (for use within Effect pipelines)
107
+ *
108
+ * Unlike launchChopsticksEffect, this version returns the result as an Effect
109
+ * rather than a Promise. Use this when you want to compose the launch with
110
+ * other Effects.
111
+ *
112
+ * @param config - Chopsticks configuration
113
+ * @returns Effect with launch result and cleanup
114
+ */
115
+ export declare const launchChopsticksEffectProgram: (config: ChopsticksConfig) => Effect.Effect<{
116
+ result: ChopsticksServiceImpl;
117
+ cleanup: Effect.Effect<void, never>;
118
+ }, ChopsticksSetupError>;
119
+ /**
120
+ * Create a ChopsticksService Layer that automatically manages the chopsticks lifecycle
121
+ *
122
+ * This Layer uses Effect.acquireRelease under the hood, ensuring that the chopsticks
123
+ * instance is properly cleaned up when the Layer scope ends (e.g., when the test
124
+ * suite finishes or when Effect.runPromise completes).
125
+ *
126
+ * @param config - Chopsticks configuration
127
+ * @returns A scoped Layer providing ChopsticksService
128
+ *
129
+ * @example
130
+ * ```typescript
131
+ * const program = Effect.gen(function* () {
132
+ * const chopsticks = yield* ChopsticksService;
133
+ * const block = yield* chopsticks.createBlock();
134
+ * return block;
135
+ * });
136
+ *
137
+ * // The chopsticks instance will be automatically cleaned up when runPromise completes
138
+ * const result = await Effect.runPromise(
139
+ * program.pipe(
140
+ * Effect.provide(ChopsticksServiceLayer({
141
+ * endpoint: "wss://rpc.polkadot.io",
142
+ * port: 8000,
143
+ * }))
144
+ * )
145
+ * );
146
+ * ```
147
+ */
148
+ export declare const ChopsticksServiceLayer: (config: ChopsticksConfig) => Layer.Layer<ChopsticksService, ChopsticksSetupError>;
149
+ /**
150
+ * Create a ChopsticksService Layer from a ChopsticksConfigTag dependency
151
+ *
152
+ * This Layer reads the configuration from the ChopsticksConfigTag context,
153
+ * allowing for dependency injection of the configuration.
154
+ *
155
+ * @example
156
+ * ```typescript
157
+ * const configLayer = Layer.succeed(ChopsticksConfigTag, {
158
+ * endpoint: "wss://rpc.polkadot.io",
159
+ * port: 8000,
160
+ * });
161
+ *
162
+ * const program = Effect.gen(function* () {
163
+ * const chopsticks = yield* ChopsticksService;
164
+ * return chopsticks.addr;
165
+ * });
166
+ *
167
+ * const result = await Effect.runPromise(
168
+ * program.pipe(
169
+ * Effect.provide(ChopsticksServiceLive),
170
+ * Effect.provide(configLayer)
171
+ * )
172
+ * );
173
+ * ```
174
+ */
175
+ export declare const ChopsticksServiceLive: Layer.Layer<ChopsticksService, ChopsticksSetupError, ChopsticksConfigTag>;
176
+ /**
177
+ * Result from launching chopsticks via spec
178
+ * Compatible with the existing node launch result structure
179
+ */
180
+ export interface ChopsticksFromSpecResult {
181
+ /** The chopsticks service implementation */
182
+ readonly service: ChopsticksServiceImpl;
183
+ /** Cleanup function to call when done */
184
+ readonly cleanup: () => Promise<void>;
185
+ /** WebSocket port the instance is listening on */
186
+ readonly port: number;
187
+ /** WebSocket address (host:port) */
188
+ readonly addr: string;
189
+ }
190
+ /**
191
+ * Launch chopsticks from a ChopsticksLaunchSpec by parsing the YAML config file
192
+ * and using the programmatic API.
193
+ *
194
+ * This function bridges the existing Moonwall config format to the new
195
+ * programmatic chopsticks launcher, providing:
196
+ * - Early validation of the config file (including env var resolution)
197
+ * - Clear error messages for missing/invalid config
198
+ * - Proper Effect-based error handling
199
+ *
200
+ * @param spec - The ChopsticksLaunchSpec from moonwall config
201
+ * @param options - Additional options
202
+ * @returns Promise with the launch result and cleanup function
203
+ *
204
+ * @example
205
+ * ```typescript
206
+ * const result = await launchChopsticksFromSpec({
207
+ * configPath: "./chopsticks-config.yml",
208
+ * wsPort: 8000,
209
+ * buildBlockMode: "manual",
210
+ * });
211
+ *
212
+ * // Use the service
213
+ * await Effect.runPromise(result.service.createBlock());
214
+ *
215
+ * // Cleanup when done
216
+ * await result.cleanup();
217
+ * ```
218
+ */
219
+ export declare function launchChopsticksFromSpec(spec: ChopsticksLaunchSpec, options?: {
220
+ /** Timeout in milliseconds for setup (default: 60000) */
221
+ timeout?: number;
222
+ /** Log level for chopsticks internal logger ('silent' to suppress, default: matches LOG_LEVEL env) */
223
+ chopsticksLogLevel?: string;
224
+ }): Promise<ChopsticksFromSpecResult>;
225
+ //# sourceMappingURL=launchChopsticksEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launchChopsticksEffect.d.ts","sourceRoot":"","sources":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