gate-evm-tools 1.0.27 → 1.0.31

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 (641) hide show
  1. package/README.md +16 -1
  2. package/bin/cli.js +3 -0
  3. package/bin/delivery.cjs +51 -0
  4. package/bin/manifest-bootstrap.js +4 -15
  5. package/bin/workflow.cjs +1 -1
  6. package/dist/commands/plan/file-store.d.ts.map +1 -0
  7. package/dist/commands/plan/generate-deployment.d.ts +48 -0
  8. package/dist/commands/plan/generate-deployment.d.ts.map +1 -0
  9. package/dist/commands/plan/generate-deployment.js +211 -0
  10. package/dist/commands/plan/generate-deployment.js.map +1 -0
  11. package/dist/commands/plan/helpers.d.ts.map +1 -0
  12. package/dist/commands/plan/index.d.ts +3 -0
  13. package/dist/commands/plan/index.d.ts.map +1 -0
  14. package/dist/commands/plan/index.js +88 -0
  15. package/dist/commands/plan/index.js.map +1 -0
  16. package/dist/commands/sync.js +1 -1
  17. package/dist/commands/sync.js.map +1 -1
  18. package/dist/core/BytecodeChecker.d.ts.map +1 -1
  19. package/dist/core/BytecodeChecker.js +27 -8
  20. package/dist/core/BytecodeChecker.js.map +1 -1
  21. package/dist/core/preparation/artifacts.d.ts +2 -0
  22. package/dist/core/preparation/artifacts.d.ts.map +1 -1
  23. package/dist/core/preparation/artifacts.js +9 -3
  24. package/dist/core/preparation/artifacts.js.map +1 -1
  25. package/dist/core/preparation/evm.d.ts +38 -2
  26. package/dist/core/preparation/evm.d.ts.map +1 -1
  27. package/dist/core/preparation/evm.js +104 -32
  28. package/dist/core/preparation/evm.js.map +1 -1
  29. package/dist/core/preparation/evmManifestSync.d.ts +63 -0
  30. package/dist/core/preparation/evmManifestSync.d.ts.map +1 -0
  31. package/dist/core/preparation/evmManifestSync.js +146 -0
  32. package/dist/core/preparation/evmManifestSync.js.map +1 -0
  33. package/dist/core/preparation/index.d.ts +40 -2
  34. package/dist/core/preparation/index.d.ts.map +1 -1
  35. package/dist/core/preparation/index.js +3 -3
  36. package/dist/core/preparation/index.js.map +1 -1
  37. package/dist/core/preparation/manifest.d.ts +15 -3
  38. package/dist/core/preparation/manifest.d.ts.map +1 -1
  39. package/dist/core/preparation/manifest.js +21 -26
  40. package/dist/core/preparation/manifest.js.map +1 -1
  41. package/dist/core/preparation/normalize.d.ts.map +1 -1
  42. package/dist/core/preparation/normalize.js +14 -9
  43. package/dist/core/preparation/normalize.js.map +1 -1
  44. package/dist/core/preparation/types.d.ts +7 -2
  45. package/dist/core/preparation/types.d.ts.map +1 -1
  46. package/dist/custody/hardhat-runtime.d.ts.map +1 -1
  47. package/dist/custody/hardhat-runtime.js +2 -0
  48. package/dist/custody/hardhat-runtime.js.map +1 -1
  49. package/dist/custody/hardhat.d.ts +1 -0
  50. package/dist/custody/hardhat.d.ts.map +1 -1
  51. package/dist/custody/hardhat.js +1 -0
  52. package/dist/custody/hardhat.js.map +1 -1
  53. package/dist/custody/index.d.ts +1 -0
  54. package/dist/custody/index.d.ts.map +1 -1
  55. package/dist/custody/index.js +1 -0
  56. package/dist/custody/index.js.map +1 -1
  57. package/dist/custody/provider-wait.d.ts +13 -0
  58. package/dist/custody/provider-wait.d.ts.map +1 -0
  59. package/dist/custody/provider-wait.js +78 -0
  60. package/dist/custody/provider-wait.js.map +1 -0
  61. package/dist/delivery/policy.d.ts +6 -0
  62. package/dist/delivery/policy.d.ts.map +1 -0
  63. package/dist/delivery/policy.js +24 -0
  64. package/dist/delivery/policy.js.map +1 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +5 -0
  67. package/dist/index.js.map +1 -1
  68. package/dist/sync/index.d.ts +15 -0
  69. package/dist/sync/index.d.ts.map +1 -1
  70. package/dist/sync/index.js +8 -0
  71. package/dist/sync/index.js.map +1 -1
  72. package/dist/workflow/index.d.ts +6 -1
  73. package/dist/workflow/index.d.ts.map +1 -1
  74. package/dist/workflow/index.js +4 -0
  75. package/dist/workflow/index.js.map +1 -1
  76. package/dist-cjs/core/BytecodeChecker.js +526 -0
  77. package/dist-cjs/core/BytecodeChecker.js.map +1 -0
  78. package/dist-cjs/core/legacyProxyArtifact.js +42 -0
  79. package/dist-cjs/core/legacyProxyArtifact.js.map +1 -0
  80. package/dist-cjs/core/preparation/artifacts.js +11 -4
  81. package/dist-cjs/core/preparation/artifacts.js.map +1 -1
  82. package/dist-cjs/core/preparation/evm.js +105 -32
  83. package/dist-cjs/core/preparation/evm.js.map +1 -1
  84. package/dist-cjs/core/preparation/evmManifestSync.js +155 -0
  85. package/dist-cjs/core/preparation/evmManifestSync.js.map +1 -0
  86. package/dist-cjs/core/preparation/index.js +3 -3
  87. package/dist-cjs/core/preparation/index.js.map +1 -1
  88. package/dist-cjs/core/preparation/manifest.js +23 -28
  89. package/dist-cjs/core/preparation/manifest.js.map +1 -1
  90. package/dist-cjs/core/preparation/normalize.js +14 -9
  91. package/dist-cjs/core/preparation/normalize.js.map +1 -1
  92. package/dist-cjs/custody/hardhat-runtime.js +2 -0
  93. package/dist-cjs/custody/hardhat-runtime.js.map +1 -1
  94. package/dist-cjs/custody/hardhat.js +3 -1
  95. package/dist-cjs/custody/hardhat.js.map +1 -1
  96. package/dist-cjs/custody/index.js +3 -1
  97. package/dist-cjs/custody/index.js.map +1 -1
  98. package/dist-cjs/custody/provider-wait.js +81 -0
  99. package/dist-cjs/custody/provider-wait.js.map +1 -0
  100. package/dist-cjs/delivery/policy.js +29 -0
  101. package/dist-cjs/delivery/policy.js.map +1 -0
  102. package/dist-cjs/sync/index.js +8 -0
  103. package/dist-cjs/sync/index.js.map +1 -1
  104. package/dist-cjs/workflow/index.js +12 -1
  105. package/dist-cjs/workflow/index.js.map +1 -1
  106. package/dist-runtime/config/hardhatAdapters.d.ts +2 -0
  107. package/dist-runtime/config/hardhatAdapters.js +8 -0
  108. package/dist-runtime/config/hardhatAdapters.js.map +1 -1
  109. package/dist-runtime/config/networks.d.ts +25 -1
  110. package/dist-runtime/config/networks.js +8 -2
  111. package/dist-runtime/config/networks.js.map +1 -1
  112. package/dist-runtime/config/openzeppelin.d.ts +2 -1
  113. package/dist-runtime/config/openzeppelin.js +2 -19
  114. package/dist-runtime/config/openzeppelin.js.map +1 -1
  115. package/dist-runtime/delivery/abi.d.ts +14 -0
  116. package/dist-runtime/delivery/abi.js +161 -0
  117. package/dist-runtime/delivery/abi.js.map +1 -0
  118. package/dist-runtime/delivery/aggregate-bootstrap.d.ts +12 -0
  119. package/dist-runtime/delivery/aggregate-bootstrap.js +40 -0
  120. package/dist-runtime/delivery/aggregate-bootstrap.js.map +1 -0
  121. package/dist-runtime/delivery/aggregate-channel.d.ts +28 -0
  122. package/dist-runtime/delivery/aggregate-channel.js +155 -0
  123. package/dist-runtime/delivery/aggregate-channel.js.map +1 -0
  124. package/dist-runtime/delivery/aggregate-inputs.d.ts +168 -0
  125. package/dist-runtime/delivery/aggregate-inputs.js +57 -0
  126. package/dist-runtime/delivery/aggregate-inputs.js.map +1 -0
  127. package/dist-runtime/delivery/aggregate-source.d.ts +25 -0
  128. package/dist-runtime/delivery/aggregate-source.js +79 -0
  129. package/dist-runtime/delivery/aggregate-source.js.map +1 -0
  130. package/dist-runtime/delivery/aggregate-worker.d.ts +1 -0
  131. package/dist-runtime/delivery/aggregate-worker.js +191 -0
  132. package/dist-runtime/delivery/aggregate-worker.js.map +1 -0
  133. package/dist-runtime/delivery/aggregate.d.ts +51 -0
  134. package/dist-runtime/delivery/aggregate.js +190 -0
  135. package/dist-runtime/delivery/aggregate.js.map +1 -0
  136. package/dist-runtime/delivery/bindings.d.ts +21 -0
  137. package/dist-runtime/delivery/bindings.js +53 -0
  138. package/dist-runtime/delivery/bindings.js.map +1 -0
  139. package/dist-runtime/delivery/check-code.d.ts +19 -0
  140. package/dist-runtime/delivery/check-code.js +63 -0
  141. package/dist-runtime/delivery/check-code.js.map +1 -0
  142. package/dist-runtime/delivery/closure-format.d.ts +77 -0
  143. package/dist-runtime/delivery/closure-format.js +225 -0
  144. package/dist-runtime/delivery/closure-format.js.map +1 -0
  145. package/dist-runtime/delivery/codec-pin.d.ts +2 -0
  146. package/dist-runtime/delivery/codec-pin.js +7 -0
  147. package/dist-runtime/delivery/codec-pin.js.map +1 -0
  148. package/dist-runtime/delivery/codec.d.ts +19 -0
  149. package/dist-runtime/delivery/codec.js +73 -0
  150. package/dist-runtime/delivery/codec.js.map +1 -0
  151. package/dist-runtime/delivery/compiler-dependency-pins.d.ts +7 -0
  152. package/dist-runtime/delivery/compiler-dependency-pins.js +1689 -0
  153. package/dist-runtime/delivery/compiler-dependency-pins.js.map +1 -0
  154. package/dist-runtime/delivery/compiler-files.d.ts +40 -0
  155. package/dist-runtime/delivery/compiler-files.js +220 -0
  156. package/dist-runtime/delivery/compiler-files.js.map +1 -0
  157. package/dist-runtime/delivery/compiler-io.d.ts +2 -0
  158. package/dist-runtime/delivery/compiler-io.js +13 -0
  159. package/dist-runtime/delivery/compiler-io.js.map +1 -0
  160. package/dist-runtime/delivery/compiler-pins.d.ts +10 -0
  161. package/dist-runtime/delivery/compiler-pins.js +147 -0
  162. package/dist-runtime/delivery/compiler-pins.js.map +1 -0
  163. package/dist-runtime/delivery/compiler.d.ts +188 -0
  164. package/dist-runtime/delivery/compiler.js +850 -0
  165. package/dist-runtime/delivery/compiler.js.map +1 -0
  166. package/dist-runtime/delivery/config.d.ts +48 -0
  167. package/dist-runtime/delivery/config.js +99 -0
  168. package/dist-runtime/delivery/config.js.map +1 -0
  169. package/dist-runtime/delivery/configuration-definition.d.ts +22 -0
  170. package/dist-runtime/delivery/configuration-definition.js +316 -0
  171. package/dist-runtime/delivery/configuration-definition.js.map +1 -0
  172. package/dist-runtime/delivery/configuration-hre.d.ts +17 -0
  173. package/dist-runtime/delivery/configuration-hre.js +198 -0
  174. package/dist-runtime/delivery/configuration-hre.js.map +1 -0
  175. package/dist-runtime/delivery/configuration-runtime.d.ts +36 -0
  176. package/dist-runtime/delivery/configuration-runtime.js +248 -0
  177. package/dist-runtime/delivery/configuration-runtime.js.map +1 -0
  178. package/dist-runtime/delivery/configuration.d.ts +35 -0
  179. package/dist-runtime/delivery/configuration.js +83 -0
  180. package/dist-runtime/delivery/configuration.js.map +1 -0
  181. package/dist-runtime/delivery/create2.d.ts +3 -0
  182. package/dist-runtime/delivery/create2.js +48 -0
  183. package/dist-runtime/delivery/create2.js.map +1 -0
  184. package/dist-runtime/delivery/custom-closure.d.ts +27 -0
  185. package/dist-runtime/delivery/custom-closure.js +818 -0
  186. package/dist-runtime/delivery/custom-closure.js.map +1 -0
  187. package/dist-runtime/delivery/custom-format.d.ts +35 -0
  188. package/dist-runtime/delivery/custom-format.js +383 -0
  189. package/dist-runtime/delivery/custom-format.js.map +1 -0
  190. package/dist-runtime/delivery/custom.d.ts +32 -0
  191. package/dist-runtime/delivery/custom.js +158 -0
  192. package/dist-runtime/delivery/custom.js.map +1 -0
  193. package/dist-runtime/delivery/data.d.ts +7 -0
  194. package/dist-runtime/delivery/data.js +86 -0
  195. package/dist-runtime/delivery/data.js.map +1 -0
  196. package/dist-runtime/delivery/development.d.ts +91 -0
  197. package/dist-runtime/delivery/development.js +395 -0
  198. package/dist-runtime/delivery/development.js.map +1 -0
  199. package/dist-runtime/delivery/engine.d.ts +9 -0
  200. package/dist-runtime/delivery/engine.js +23 -0
  201. package/dist-runtime/delivery/engine.js.map +1 -0
  202. package/dist-runtime/delivery/eoa-observation.d.ts +43 -0
  203. package/dist-runtime/delivery/eoa-observation.js +145 -0
  204. package/dist-runtime/delivery/eoa-observation.js.map +1 -0
  205. package/dist-runtime/delivery/eoa-signed.d.ts +2 -0
  206. package/dist-runtime/delivery/eoa-signed.js +74 -0
  207. package/dist-runtime/delivery/eoa-signed.js.map +1 -0
  208. package/dist-runtime/delivery/eoa.d.ts +81 -0
  209. package/dist-runtime/delivery/eoa.js +274 -0
  210. package/dist-runtime/delivery/eoa.js.map +1 -0
  211. package/dist-runtime/delivery/execution-db.d.ts +20 -0
  212. package/dist-runtime/delivery/execution-db.js +153 -0
  213. package/dist-runtime/delivery/execution-db.js.map +1 -0
  214. package/dist-runtime/delivery/execution-files.d.ts +9 -0
  215. package/dist-runtime/delivery/execution-files.js +138 -0
  216. package/dist-runtime/delivery/execution-files.js.map +1 -0
  217. package/dist-runtime/delivery/execution-model.d.ts +56 -0
  218. package/dist-runtime/delivery/execution-model.js +66 -0
  219. package/dist-runtime/delivery/execution-model.js.map +1 -0
  220. package/dist-runtime/delivery/execution-store.d.ts +48 -0
  221. package/dist-runtime/delivery/execution-store.js +361 -0
  222. package/dist-runtime/delivery/execution-store.js.map +1 -0
  223. package/dist-runtime/delivery/existing-code.d.ts +37 -0
  224. package/dist-runtime/delivery/existing-code.js +75 -0
  225. package/dist-runtime/delivery/existing-code.js.map +1 -0
  226. package/dist-runtime/delivery/export.d.ts +51 -0
  227. package/dist-runtime/delivery/export.js +69 -0
  228. package/dist-runtime/delivery/export.js.map +1 -0
  229. package/dist-runtime/delivery/forkAudit.d.ts +119 -0
  230. package/dist-runtime/delivery/forkAudit.js +473 -0
  231. package/dist-runtime/delivery/forkAudit.js.map +1 -0
  232. package/dist-runtime/delivery/hardhat.d.ts +3 -0
  233. package/dist-runtime/delivery/hardhat.js +45 -0
  234. package/dist-runtime/delivery/hardhat.js.map +1 -0
  235. package/dist-runtime/delivery/history-registration.d.ts +2 -0
  236. package/dist-runtime/delivery/history-registration.js +17 -0
  237. package/dist-runtime/delivery/history-registration.js.map +1 -0
  238. package/dist-runtime/delivery/identities.d.ts +22 -0
  239. package/dist-runtime/delivery/identities.js +97 -0
  240. package/dist-runtime/delivery/identities.js.map +1 -0
  241. package/dist-runtime/delivery/input-files.d.ts +5 -0
  242. package/dist-runtime/delivery/input-files.js +70 -0
  243. package/dist-runtime/delivery/input-files.js.map +1 -0
  244. package/dist-runtime/delivery/inputs.d.ts +62 -0
  245. package/dist-runtime/delivery/inputs.js +187 -0
  246. package/dist-runtime/delivery/inputs.js.map +1 -0
  247. package/dist-runtime/delivery/journal.d.ts +35 -0
  248. package/dist-runtime/delivery/journal.js +270 -0
  249. package/dist-runtime/delivery/journal.js.map +1 -0
  250. package/dist-runtime/delivery/manifest.d.ts +14 -0
  251. package/dist-runtime/delivery/manifest.js +68 -0
  252. package/dist-runtime/delivery/manifest.js.map +1 -0
  253. package/dist-runtime/delivery/materialization.d.ts +20 -0
  254. package/dist-runtime/delivery/materialization.js +138 -0
  255. package/dist-runtime/delivery/materialization.js.map +1 -0
  256. package/dist-runtime/delivery/observations.d.ts +31 -0
  257. package/dist-runtime/delivery/observations.js +38 -0
  258. package/dist-runtime/delivery/observations.js.map +1 -0
  259. package/dist-runtime/delivery/parameters.d.ts +53 -0
  260. package/dist-runtime/delivery/parameters.js +257 -0
  261. package/dist-runtime/delivery/parameters.js.map +1 -0
  262. package/dist-runtime/delivery/pending.d.ts +70 -0
  263. package/dist-runtime/delivery/pending.js +99 -0
  264. package/dist-runtime/delivery/pending.js.map +1 -0
  265. package/dist-runtime/delivery/plan.d.ts +50 -0
  266. package/dist-runtime/delivery/plan.js +209 -0
  267. package/dist-runtime/delivery/plan.js.map +1 -0
  268. package/dist-runtime/delivery/planning.d.ts +81 -0
  269. package/dist-runtime/delivery/planning.js +302 -0
  270. package/dist-runtime/delivery/planning.js.map +1 -0
  271. package/dist-runtime/delivery/policy.d.ts +4 -0
  272. package/dist-runtime/delivery/policy.js +9 -0
  273. package/dist-runtime/delivery/policy.js.map +1 -0
  274. package/dist-runtime/delivery/preparation.d.ts +6 -0
  275. package/dist-runtime/delivery/preparation.js +158 -0
  276. package/dist-runtime/delivery/preparation.js.map +1 -0
  277. package/dist-runtime/delivery/production-environment.d.ts +2 -0
  278. package/dist-runtime/delivery/production-environment.js +12 -0
  279. package/dist-runtime/delivery/production-environment.js.map +1 -0
  280. package/dist-runtime/delivery/production-finalization.d.ts +86 -0
  281. package/dist-runtime/delivery/production-finalization.js +278 -0
  282. package/dist-runtime/delivery/production-finalization.js.map +1 -0
  283. package/dist-runtime/delivery/production.d.ts +461 -0
  284. package/dist-runtime/delivery/production.js +396 -0
  285. package/dist-runtime/delivery/production.js.map +1 -0
  286. package/dist-runtime/delivery/project-files.d.ts +8 -0
  287. package/dist-runtime/delivery/project-files.js +82 -0
  288. package/dist-runtime/delivery/project-files.js.map +1 -0
  289. package/dist-runtime/delivery/project.d.ts +15 -0
  290. package/dist-runtime/delivery/project.js +157 -0
  291. package/dist-runtime/delivery/project.js.map +1 -0
  292. package/dist-runtime/delivery/protocol.d.ts +49 -0
  293. package/dist-runtime/delivery/protocol.js +112 -0
  294. package/dist-runtime/delivery/protocol.js.map +1 -0
  295. package/dist-runtime/delivery/references.d.ts +19 -0
  296. package/dist-runtime/delivery/references.js +84 -0
  297. package/dist-runtime/delivery/references.js.map +1 -0
  298. package/dist-runtime/delivery/release-graph.d.ts +93 -0
  299. package/dist-runtime/delivery/release-graph.js +106 -0
  300. package/dist-runtime/delivery/release-graph.js.map +1 -0
  301. package/dist-runtime/delivery/release-history-capture.d.ts +7 -0
  302. package/dist-runtime/delivery/release-history-capture.js +76 -0
  303. package/dist-runtime/delivery/release-history-capture.js.map +1 -0
  304. package/dist-runtime/delivery/release-history.d.ts +43 -0
  305. package/dist-runtime/delivery/release-history.js +246 -0
  306. package/dist-runtime/delivery/release-history.js.map +1 -0
  307. package/dist-runtime/delivery/release.d.ts +172 -0
  308. package/dist-runtime/delivery/release.js +209 -0
  309. package/dist-runtime/delivery/release.js.map +1 -0
  310. package/dist-runtime/delivery/safe-manifest.d.ts +9 -0
  311. package/dist-runtime/delivery/safe-manifest.js +13 -0
  312. package/dist-runtime/delivery/safe-manifest.js.map +1 -0
  313. package/dist-runtime/delivery/safe-observation.d.ts +30 -0
  314. package/dist-runtime/delivery/safe-observation.js +487 -0
  315. package/dist-runtime/delivery/safe-observation.js.map +1 -0
  316. package/dist-runtime/delivery/safe-prepare.d.ts +13 -0
  317. package/dist-runtime/delivery/safe-prepare.js +81 -0
  318. package/dist-runtime/delivery/safe-prepare.js.map +1 -0
  319. package/dist-runtime/delivery/safe.d.ts +91 -0
  320. package/dist-runtime/delivery/safe.js +243 -0
  321. package/dist-runtime/delivery/safe.js.map +1 -0
  322. package/dist-runtime/delivery/same-fork-baseline.d.ts +8 -0
  323. package/dist-runtime/delivery/same-fork-baseline.js +20 -0
  324. package/dist-runtime/delivery/same-fork-baseline.js.map +1 -0
  325. package/dist-runtime/delivery/setup.d.ts +31 -0
  326. package/dist-runtime/delivery/setup.js +215 -0
  327. package/dist-runtime/delivery/setup.js.map +1 -0
  328. package/dist-runtime/delivery/source.d.ts +41 -0
  329. package/dist-runtime/delivery/source.js +137 -0
  330. package/dist-runtime/delivery/source.js.map +1 -0
  331. package/dist-runtime/delivery/target-fields.d.ts +2 -0
  332. package/dist-runtime/delivery/target-fields.js +11 -0
  333. package/dist-runtime/delivery/target-fields.js.map +1 -0
  334. package/dist-runtime/delivery/validation.d.ts +9 -0
  335. package/dist-runtime/delivery/validation.js +150 -0
  336. package/dist-runtime/delivery/validation.js.map +1 -0
  337. package/dist-runtime/delivery/verification.d.ts +16 -0
  338. package/dist-runtime/delivery/verification.js +65 -0
  339. package/dist-runtime/delivery/verification.js.map +1 -0
  340. package/dist-runtime/migrate.js +1 -0
  341. package/dist-runtime/migrate.js.map +1 -1
  342. package/dist-runtime/miner/binary.d.ts +2 -0
  343. package/dist-runtime/miner/binary.js +54 -0
  344. package/dist-runtime/miner/binary.js.map +1 -0
  345. package/dist-runtime/miner/cli.d.ts +1 -0
  346. package/dist-runtime/miner/cli.js +131 -0
  347. package/dist-runtime/miner/cli.js.map +1 -0
  348. package/dist-runtime/miner/index.d.ts +5 -0
  349. package/dist-runtime/miner/index.js +13 -0
  350. package/dist-runtime/miner/index.js.map +1 -0
  351. package/dist-runtime/miner/request.d.ts +7 -0
  352. package/dist-runtime/miner/request.js +73 -0
  353. package/dist-runtime/miner/request.js.map +1 -0
  354. package/dist-runtime/miner/runner.d.ts +2 -0
  355. package/dist-runtime/miner/runner.js +131 -0
  356. package/dist-runtime/miner/runner.js.map +1 -0
  357. package/dist-runtime/miner/types.d.ts +89 -0
  358. package/dist-runtime/miner/types.js +3 -0
  359. package/dist-runtime/miner/types.js.map +1 -0
  360. package/dist-runtime/miner/verify.d.ts +2 -0
  361. package/dist-runtime/miner/verify.js +75 -0
  362. package/dist-runtime/miner/verify.js.map +1 -0
  363. package/dist-runtime/runtime-identity.json +2 -2
  364. package/dist-runtime/vendor/plan-codec/index.cjs +820 -0
  365. package/dist-runtime/vendor/plan-codec/index.d.cts +32 -0
  366. package/dist-runtime/vendor/plan-codec/provenance.json +24 -0
  367. package/dist-runtime/workflow/engine.d.ts +14 -0
  368. package/dist-runtime/workflow/engine.js +160 -0
  369. package/dist-runtime/workflow/engine.js.map +1 -0
  370. package/dist-runtime/workflow/lib/authority.d.ts +6 -3
  371. package/dist-runtime/workflow/lib/authority.js.map +1 -1
  372. package/dist-runtime/workflow/lib/calls.d.ts +1 -1
  373. package/dist-runtime/workflow/lib/calls.js +43 -34
  374. package/dist-runtime/workflow/lib/calls.js.map +1 -1
  375. package/dist-runtime/workflow/lib/canonicalData.d.ts +8 -0
  376. package/dist-runtime/workflow/lib/canonicalData.js +68 -0
  377. package/dist-runtime/workflow/lib/canonicalData.js.map +1 -0
  378. package/dist-runtime/workflow/lib/config.d.ts +3 -1
  379. package/dist-runtime/workflow/lib/config.js.map +1 -1
  380. package/dist-runtime/workflow/lib/context.d.ts +76 -0
  381. package/dist-runtime/workflow/lib/context.js +3 -0
  382. package/dist-runtime/workflow/lib/context.js.map +1 -0
  383. package/dist-runtime/workflow/lib/controlledMulticallAbi.d.ts +2 -0
  384. package/dist-runtime/workflow/lib/controlledMulticallAbi.js +10 -0
  385. package/dist-runtime/workflow/lib/controlledMulticallAbi.js.map +1 -0
  386. package/dist-runtime/workflow/lib/create2.d.ts +1 -1
  387. package/dist-runtime/workflow/lib/create2.js +9 -12
  388. package/dist-runtime/workflow/lib/create2.js.map +1 -1
  389. package/dist-runtime/workflow/lib/deployments.d.ts +5 -5
  390. package/dist-runtime/workflow/lib/deployments.js +5 -13
  391. package/dist-runtime/workflow/lib/deployments.js.map +1 -1
  392. package/dist-runtime/workflow/lib/evidencePorts.d.ts +55 -0
  393. package/dist-runtime/workflow/lib/evidencePorts.js +3 -0
  394. package/dist-runtime/workflow/lib/evidencePorts.js.map +1 -0
  395. package/dist-runtime/workflow/lib/executionPlan.d.ts +4 -42
  396. package/dist-runtime/workflow/lib/executionPlan.js +15 -210
  397. package/dist-runtime/workflow/lib/executionPlan.js.map +1 -1
  398. package/dist-runtime/workflow/lib/gateTool.d.ts +6 -2
  399. package/dist-runtime/workflow/lib/gateTool.js +20 -10
  400. package/dist-runtime/workflow/lib/gateTool.js.map +1 -1
  401. package/dist-runtime/workflow/lib/gateToolSync.d.ts +1 -1
  402. package/dist-runtime/workflow/lib/gateToolSync.js +3 -2
  403. package/dist-runtime/workflow/lib/gateToolSync.js.map +1 -1
  404. package/dist-runtime/workflow/lib/operationNames.d.ts +3 -0
  405. package/dist-runtime/workflow/lib/operationNames.js +34 -0
  406. package/dist-runtime/workflow/lib/operationNames.js.map +1 -0
  407. package/dist-runtime/workflow/lib/parameters.d.ts +1 -1
  408. package/dist-runtime/workflow/lib/parameters.js +9 -24
  409. package/dist-runtime/workflow/lib/parameters.js.map +1 -1
  410. package/dist-runtime/workflow/lib/pendingDeploymentReuse.js +18 -52
  411. package/dist-runtime/workflow/lib/pendingDeploymentReuse.js.map +1 -1
  412. package/dist-runtime/workflow/lib/pendingUupsBinding.d.ts +42 -0
  413. package/dist-runtime/workflow/lib/pendingUupsBinding.js +39 -0
  414. package/dist-runtime/workflow/lib/pendingUupsBinding.js.map +1 -0
  415. package/dist-runtime/workflow/lib/plan.d.ts +55 -0
  416. package/dist-runtime/workflow/lib/plan.js +324 -0
  417. package/dist-runtime/workflow/lib/plan.js.map +1 -0
  418. package/dist-runtime/workflow/lib/planCli.d.ts +14 -0
  419. package/dist-runtime/workflow/lib/planCli.js +279 -0
  420. package/dist-runtime/workflow/lib/planCli.js.map +1 -0
  421. package/dist-runtime/workflow/lib/preparationEvidence.d.ts +4 -0
  422. package/dist-runtime/workflow/lib/preparationEvidence.js +19 -0
  423. package/dist-runtime/workflow/lib/preparationEvidence.js.map +1 -0
  424. package/dist-runtime/workflow/lib/proxy.d.ts +3 -2
  425. package/dist-runtime/workflow/lib/proxy.js +3 -4
  426. package/dist-runtime/workflow/lib/proxy.js.map +1 -1
  427. package/dist-runtime/workflow/lib/runtime.d.ts +6 -0
  428. package/dist-runtime/workflow/lib/runtime.js +48 -0
  429. package/dist-runtime/workflow/lib/runtime.js.map +1 -0
  430. package/dist-runtime/workflow/lib/signer.d.ts +3 -2
  431. package/dist-runtime/workflow/lib/signer.js +18 -18
  432. package/dist-runtime/workflow/lib/signer.js.map +1 -1
  433. package/dist-runtime/workflow/lib/simulation.d.ts +13 -6
  434. package/dist-runtime/workflow/lib/simulation.js +39 -31
  435. package/dist-runtime/workflow/lib/simulation.js.map +1 -1
  436. package/dist-runtime/workflow/lib/state.js +3 -3
  437. package/dist-runtime/workflow/lib/state.js.map +1 -1
  438. package/dist-runtime/workflow/lib/staticValidation.d.ts +28 -0
  439. package/dist-runtime/workflow/lib/staticValidation.js +54 -10
  440. package/dist-runtime/workflow/lib/staticValidation.js.map +1 -1
  441. package/dist-runtime/workflow/lib/transactionPlanner.d.ts +62 -0
  442. package/dist-runtime/workflow/lib/transactionPlanner.js +258 -0
  443. package/dist-runtime/workflow/lib/transactionPlanner.js.map +1 -0
  444. package/dist-runtime/workflow/lib/typedValue.d.ts +3 -0
  445. package/dist-runtime/workflow/lib/typedValue.js +76 -0
  446. package/dist-runtime/workflow/lib/typedValue.js.map +1 -0
  447. package/dist-runtime/workflow/lib/validation.d.ts +23 -0
  448. package/dist-runtime/workflow/lib/validation.js +15 -0
  449. package/dist-runtime/workflow/lib/validation.js.map +1 -0
  450. package/dist-runtime/workflow/planAdd.d.ts +1 -0
  451. package/dist-runtime/workflow/planAdd.js +11 -0
  452. package/dist-runtime/workflow/planAdd.js.map +1 -0
  453. package/dist-runtime/workflow/planRead.d.ts +1 -0
  454. package/dist-runtime/workflow/planRead.js +11 -0
  455. package/dist-runtime/workflow/planRead.js.map +1 -0
  456. package/dist-runtime/workflow/planStatus.d.ts +1 -0
  457. package/dist-runtime/workflow/planStatus.js +11 -0
  458. package/dist-runtime/workflow/planStatus.js.map +1 -0
  459. package/dist-runtime/workflow/planWrite.d.ts +1 -0
  460. package/dist-runtime/workflow/planWrite.js +11 -0
  461. package/dist-runtime/workflow/planWrite.js.map +1 -0
  462. package/dist-runtime/workflow/run.d.ts +1 -40
  463. package/dist-runtime/workflow/run.js +68 -136
  464. package/dist-runtime/workflow/run.js.map +1 -1
  465. package/dist-runtime/workflow/staticValidate.js +8 -3
  466. package/dist-runtime/workflow/staticValidate.js.map +1 -1
  467. package/dist-runtime/workflow/steps/call.d.ts +1 -1
  468. package/dist-runtime/workflow/steps/check.d.ts +1 -1
  469. package/dist-runtime/workflow/steps/custom.d.ts +1 -1
  470. package/dist-runtime/workflow/steps/deploy.d.ts +1 -1
  471. package/dist-runtime/workflow/steps/deploy.js +58 -55
  472. package/dist-runtime/workflow/steps/deploy.js.map +1 -1
  473. package/dist-runtime/workflow/steps/upgrade.d.ts +1 -1
  474. package/dist-runtime/workflow/steps/upgrade.js +63 -41
  475. package/dist-runtime/workflow/steps/upgrade.js.map +1 -1
  476. package/dist-runtime/workflow/steps/view.d.ts +1 -1
  477. package/docs/compiler-qualification.md +32 -0
  478. package/docs/configuration-runtime-observation.md +29 -0
  479. package/docs/create2-miner.md +100 -0
  480. package/docs/delivery-aggregate.md +27 -0
  481. package/docs/delivery-custom-input-closure.md +51 -0
  482. package/docs/delivery-development.md +32 -0
  483. package/docs/delivery-eoa.md +46 -0
  484. package/docs/delivery-evm-manifest.md +20 -0
  485. package/docs/delivery-execution-store.md +33 -0
  486. package/docs/delivery-inputs.md +46 -0
  487. package/docs/delivery-parameters.md +65 -0
  488. package/docs/delivery-planning.md +140 -0
  489. package/docs/delivery-release.md +65 -0
  490. package/docs/delivery-safe.md +72 -0
  491. package/docs/delivery-setup.md +146 -0
  492. package/docs/delivery-source.md +67 -0
  493. package/docs/direct-package-acceptance.md +20 -0
  494. package/docs/external-infrastructure-acceptance.md +33 -0
  495. package/docs/network-runtime-acceptance.md +18 -0
  496. package/docs/plans/2026-09-09-workflow-extraction.md +16 -0
  497. package/docs/superpowers/plans/2026-07-22-manifest-bootstrap-transaction.md +50 -0
  498. package/docs/superpowers/plans/2026-07-22-manifest-review-remediation.md +49 -0
  499. package/docs/superpowers/plans/2026-08-17-custody-hardhat-signers.md +227 -0
  500. package/docs/superpowers/plans/2026-09-09-remove-template-infrastructure-contracts.md +11 -0
  501. package/docs/superpowers/plans/2026-09-24-scheme-aware-static-validation.md +193 -0
  502. package/docs/superpowers/plans/2026-10-28-create2-miner.md +82 -0
  503. package/docs/workflow-reference.md +1181 -0
  504. package/docs/workflow-runtime-acceptance.md +17 -0
  505. package/docs/workflow-runtime.md +56 -0
  506. package/package.json +134 -9
  507. package/resources/create2/LICENSE +21 -0
  508. package/resources/create2/README.md +9 -0
  509. package/resources/create2/darwin-arm64/smartflow_miner +0 -0
  510. package/resources/create2/darwin-x64/smartflow_miner +0 -0
  511. package/resources/create2/manifest.json +27 -0
  512. package/runtime/config/hardhatAdapters.ts +8 -0
  513. package/runtime/config/networks.ts +20 -11
  514. package/runtime/config/openzeppelin.ts +3 -21
  515. package/runtime/delivery/abi.ts +225 -0
  516. package/runtime/delivery/aggregate-bootstrap.ts +29 -0
  517. package/runtime/delivery/aggregate-channel.ts +85 -0
  518. package/runtime/delivery/aggregate-inputs.ts +39 -0
  519. package/runtime/delivery/aggregate-source.ts +53 -0
  520. package/runtime/delivery/aggregate-worker.ts +133 -0
  521. package/runtime/delivery/aggregate.ts +139 -0
  522. package/runtime/delivery/bindings.ts +37 -0
  523. package/runtime/delivery/check-code.ts +38 -0
  524. package/runtime/delivery/closure-format.ts +350 -0
  525. package/runtime/delivery/codec-pin.ts +3 -0
  526. package/runtime/delivery/codec.ts +50 -0
  527. package/runtime/delivery/compiler-dependency-pins.ts +1685 -0
  528. package/runtime/delivery/compiler-files.ts +179 -0
  529. package/runtime/delivery/compiler-io.ts +10 -0
  530. package/runtime/delivery/compiler-pins.ts +143 -0
  531. package/runtime/delivery/compiler.ts +700 -0
  532. package/runtime/delivery/config.ts +93 -0
  533. package/runtime/delivery/configuration-definition.ts +133 -0
  534. package/runtime/delivery/configuration-hre.ts +130 -0
  535. package/runtime/delivery/configuration-runtime.ts +163 -0
  536. package/runtime/delivery/configuration.ts +64 -0
  537. package/runtime/delivery/create2.ts +57 -0
  538. package/runtime/delivery/custom-closure.ts +993 -0
  539. package/runtime/delivery/custom-format.ts +464 -0
  540. package/runtime/delivery/custom.ts +219 -0
  541. package/runtime/delivery/data.ts +94 -0
  542. package/runtime/delivery/development.ts +262 -0
  543. package/runtime/delivery/engine.ts +29 -0
  544. package/runtime/delivery/eoa-observation.ts +106 -0
  545. package/runtime/delivery/eoa-signed.ts +55 -0
  546. package/runtime/delivery/eoa.ts +288 -0
  547. package/runtime/delivery/execution-db.ts +131 -0
  548. package/runtime/delivery/execution-files.ts +135 -0
  549. package/runtime/delivery/execution-model.ts +102 -0
  550. package/runtime/delivery/execution-store.ts +411 -0
  551. package/runtime/delivery/existing-code.ts +44 -0
  552. package/runtime/delivery/export.ts +99 -0
  553. package/runtime/delivery/forkAudit.ts +620 -0
  554. package/runtime/delivery/hardhat.ts +38 -0
  555. package/runtime/delivery/history-registration.ts +10 -0
  556. package/runtime/delivery/identities.ts +132 -0
  557. package/runtime/delivery/input-files.ts +46 -0
  558. package/runtime/delivery/inputs.ts +197 -0
  559. package/runtime/delivery/journal.ts +201 -0
  560. package/runtime/delivery/manifest.ts +54 -0
  561. package/runtime/delivery/materialization.ts +53 -0
  562. package/runtime/delivery/observations.ts +60 -0
  563. package/runtime/delivery/parameters.ts +349 -0
  564. package/runtime/delivery/pending.ts +98 -0
  565. package/runtime/delivery/plan.ts +337 -0
  566. package/runtime/delivery/planning.ts +397 -0
  567. package/runtime/delivery/policy.ts +9 -0
  568. package/runtime/delivery/preparation.ts +224 -0
  569. package/runtime/delivery/production-environment.ts +6 -0
  570. package/runtime/delivery/production-finalization.ts +172 -0
  571. package/runtime/delivery/production.ts +375 -0
  572. package/runtime/delivery/project-files.ts +58 -0
  573. package/runtime/delivery/project.ts +117 -0
  574. package/runtime/delivery/protocol.ts +94 -0
  575. package/runtime/delivery/references.ts +106 -0
  576. package/runtime/delivery/release-graph.ts +49 -0
  577. package/runtime/delivery/release-history-capture.ts +32 -0
  578. package/runtime/delivery/release-history.ts +120 -0
  579. package/runtime/delivery/release.ts +128 -0
  580. package/runtime/delivery/safe-manifest.ts +11 -0
  581. package/runtime/delivery/safe-observation.ts +626 -0
  582. package/runtime/delivery/safe-prepare.ts +101 -0
  583. package/runtime/delivery/safe.ts +344 -0
  584. package/runtime/delivery/same-fork-baseline.ts +16 -0
  585. package/runtime/delivery/setup.ts +172 -0
  586. package/runtime/delivery/source.ts +130 -0
  587. package/runtime/delivery/target-fields.ts +7 -0
  588. package/runtime/delivery/validation.ts +247 -0
  589. package/runtime/delivery/verification.ts +47 -0
  590. package/runtime/migrate.ts +1 -0
  591. package/runtime/miner/binary.ts +41 -0
  592. package/runtime/miner/cli.ts +87 -0
  593. package/runtime/miner/index.ts +5 -0
  594. package/runtime/miner/request.ts +54 -0
  595. package/runtime/miner/runner.ts +90 -0
  596. package/runtime/miner/types.ts +71 -0
  597. package/runtime/miner/verify.ts +61 -0
  598. package/runtime/vendor/plan-codec/index.cjs +820 -0
  599. package/runtime/vendor/plan-codec/index.d.cts +32 -0
  600. package/runtime/vendor/plan-codec/provenance.json +24 -0
  601. package/runtime/workflow/engine.ts +174 -0
  602. package/runtime/workflow/lib/authority.ts +3 -3
  603. package/runtime/workflow/lib/calls.ts +46 -37
  604. package/runtime/workflow/lib/canonicalData.ts +45 -0
  605. package/runtime/workflow/lib/config.ts +1 -1
  606. package/runtime/workflow/lib/context.ts +76 -0
  607. package/runtime/workflow/lib/controlledMulticallAbi.ts +6 -0
  608. package/runtime/workflow/lib/create2.ts +10 -12
  609. package/runtime/workflow/lib/deployments.ts +6 -14
  610. package/runtime/workflow/lib/evidencePorts.ts +20 -0
  611. package/runtime/workflow/lib/executionPlan.ts +17 -268
  612. package/runtime/workflow/lib/gateTool.ts +20 -8
  613. package/runtime/workflow/lib/gateToolSync.ts +3 -3
  614. package/runtime/workflow/lib/operationNames.ts +32 -0
  615. package/runtime/workflow/lib/parameters.ts +7 -23
  616. package/runtime/workflow/lib/pendingDeploymentReuse.ts +4 -56
  617. package/runtime/workflow/lib/pendingUupsBinding.ts +43 -0
  618. package/runtime/workflow/lib/plan.ts +334 -0
  619. package/runtime/workflow/lib/planCli.ts +279 -0
  620. package/runtime/workflow/lib/preparationEvidence.ts +14 -0
  621. package/runtime/workflow/lib/proxy.ts +5 -3
  622. package/runtime/workflow/lib/runtime.ts +46 -0
  623. package/runtime/workflow/lib/signer.ts +8 -5
  624. package/runtime/workflow/lib/simulation.ts +41 -17
  625. package/runtime/workflow/lib/state.ts +3 -3
  626. package/runtime/workflow/lib/staticValidation.ts +92 -11
  627. package/runtime/workflow/lib/transactionPlanner.ts +314 -0
  628. package/runtime/workflow/lib/typedValue.ts +46 -0
  629. package/runtime/workflow/lib/validation.ts +50 -0
  630. package/runtime/workflow/planAdd.ts +8 -0
  631. package/runtime/workflow/planRead.ts +8 -0
  632. package/runtime/workflow/planStatus.ts +8 -0
  633. package/runtime/workflow/planWrite.ts +8 -0
  634. package/runtime/workflow/run.ts +41 -174
  635. package/runtime/workflow/staticValidate.ts +8 -3
  636. package/runtime/workflow/steps/call.ts +1 -1
  637. package/runtime/workflow/steps/check.ts +1 -1
  638. package/runtime/workflow/steps/custom.ts +1 -1
  639. package/runtime/workflow/steps/deploy.ts +59 -59
  640. package/runtime/workflow/steps/upgrade.ts +71 -47
  641. package/runtime/workflow/steps/view.ts +1 -1
@@ -0,0 +1,397 @@
1
+ import { yieldCompilerIo } from './compiler-io';
2
+ import {assertOwnedTargetWorker} from './aggregate-bootstrap';
3
+ import type { ReferenceObservation } from "./references";
4
+ import { createDeliveryValidation } from "./validation";
5
+ import { strictData } from "./data";
6
+ /** Internal simulation collection only. No release_ready, business acceptance or broadcast API. */
7
+ import {
8
+ DeliveryOperationIdentities,
9
+ bindDeliveryTransactions,
10
+ } from "./identities";
11
+ import {
12
+ CustomPlanningSession,
13
+ ownedCustomSession,
14
+ parseCustomEvidence,
15
+ type CustomEvidence,
16
+ type CustomPlanningInputSession,
17
+ } from "./custom";
18
+ import { LocalForkAudit, type ForkAuditEvidence } from "./forkAudit";
19
+ import type { WorkflowStep } from "../workflow/lib/parameters";
20
+ import type { CompletedExecutionTransaction } from "../workflow/lib/transactionPlanner";
21
+ import { TransactionPlanner } from "../workflow/lib/transactionPlanner";
22
+ import {
23
+ canonicalData,
24
+ canonicalJson,
25
+ deepFreeze,
26
+ semanticHash,
27
+ } from "../workflow/lib/canonicalData";
28
+ import { assertLocalForkRuntime } from "../workflow/lib/runtime";
29
+ import { runDeliverySteps, type DeliveryStepContext } from "./engine";
30
+ import {
31
+ parseDeliveryPlan,
32
+ parseDeliveryPlanHeader,
33
+ sealDeliveryPlan,
34
+ type DeliveryPlan,
35
+ type DeliveryPlanHeader,
36
+ type DeliveryPlanBody,
37
+ } from "./plan";
38
+ import { DeliveryExecutionBindings } from "./bindings";
39
+ import {
40
+ PreparationJournal,
41
+ parsePreparationJournal,
42
+ type PreparationEntry,
43
+ } from "./journal";
44
+ import {
45
+ VerificationJournal,
46
+ parseVerificationObservation,
47
+ } from "./verification";
48
+ import type { VerificationObservation } from "../workflow/lib/evidencePorts";
49
+ import type { PendingReuseBinding } from "../workflow/lib/pendingUupsBinding";
50
+ import { ownedDeliveryCompiler, hasCompilerSameForkInitial, type DeliveryCompilerCollector, type CompilerEvidence } from './compiler';
51
+ export interface PlanningIdentityPort {
52
+ /** Launcher supplies validated source/inputs/runtime identity; parser does not inspect project files. */
53
+ read(): Promise<DeliveryPlanHeader>;
54
+ /** Launcher-owned read-only source connection. It must read the requested pinned block. */
55
+ readSourceBlock(
56
+ blockNumber: number
57
+ ): Promise<{ chainId: string; blockNumber: number; blockHash: string }>;
58
+ }
59
+ export interface DeliveryRuntimeEvidence {
60
+ /** Validated during this collection only; never hashed or compared as canonical replay content. */
61
+ pendingUupsReuse: { stepId: string; binding: PendingReuseBinding }[];
62
+ forkAudit: ForkAuditEvidence;
63
+ references: {
64
+ sourceStepId: string;
65
+ observations: readonly ReferenceObservation[];
66
+ }[];
67
+ }
68
+ export interface DeliveryCollection {
69
+ plan: DeliveryPlan;
70
+ preparations: PreparationEntry[];
71
+ verification: VerificationObservation[];
72
+ runtimeEvidence: DeliveryRuntimeEvidence;
73
+ }
74
+ async function readCompilerEvidence(compiler: DeliveryCompilerCollector): Promise<CompilerEvidence> {
75
+ try {
76
+ return compiler.evidence();
77
+ } finally {
78
+ // Full payload rereads can outlast an idle HTTP connection. Yield before
79
+ // the first collection RPC as well as before returning to its caller.
80
+ await yieldCompilerIo();
81
+ }
82
+ }
83
+ /** Strict compiler-owned contribution path. Header identities are still launcher-owned until aggregate c.2. */
84
+ export async function collectCompilerQualifiedDeliveryPlan(
85
+ input: Parameters<typeof collectDeliveryPlan>[0] & { compiler: DeliveryCompilerCollector },
86
+ ): Promise<{ collection: DeliveryCollection; compilerEvidence: CompilerEvidence }> {
87
+ if (ownedDeliveryCompiler(input.context.runtime.hre) !== input.compiler) throw new Error('Compiler-qualified collection requires its actual owned HRE collector');
88
+ await readCompilerEvidence(input.compiler);
89
+ const collection = await collectDeliveryPlan(input);
90
+ return { collection, compilerEvidence: await readCompilerEvidence(input.compiler) };
91
+ }
92
+ export interface DeliveryPlanningOptions {
93
+ context: DeliveryStepContext;
94
+ header: DeliveryPlanHeader;
95
+ identities: PlanningIdentityPort;
96
+ steps: readonly WorkflowStep[];
97
+ derivationSeed: string;
98
+ expected?: Pick<DeliveryCollection, "plan" | "preparations" | "verification">;
99
+ completedTransactions?: CompletedExecutionTransaction[];
100
+ customSession?: CustomPlanningInputSession;
101
+ }
102
+ export interface StagedDeliveryCollection {
103
+ readonly payload: Omit<DeliveryPlanBody,'inputsHash'>;
104
+ readonly invariantHash:string;
105
+ readonly snapshot: {payload:Omit<DeliveryPlanBody,'inputsHash'>;preparations:PreparationEntry[];verification:VerificationObservation[];runtimeEvidence:Omit<DeliveryRuntimeEvidence,'forkAudit'>&{forkAudit:Omit<ForkAuditEvidence,'planHash'|'evidenceHash'>}};
106
+ assertUnchanged(): Promise<void>;
107
+ bind(inputsHash:string): DeliveryCollection;
108
+ close():void;
109
+ }
110
+ export async function collectDeliveryPlan(input:DeliveryPlanningOptions):Promise<DeliveryCollection> {
111
+ return collectOwned(input,false) as Promise<DeliveryCollection>;
112
+ }
113
+ /** Internal worker seam. JSON cannot manufacture this live interval/closure authority. */
114
+ export async function stageDeliveryPlan(input:Omit<DeliveryPlanningOptions,'header'|'identities'> & {
115
+ header:Omit<DeliveryPlanHeader,'inputsHash'>;
116
+ identities:Omit<PlanningIdentityPort,'read'> & {read():Promise<Omit<DeliveryPlanHeader,'inputsHash'>>};
117
+ }):Promise<StagedDeliveryCollection> {
118
+ assertOwnedTargetWorker();
119
+ if(input.expected)throw new Error('Staged replay requires independently closed current inputs; use known-final collection');
120
+ if(input.context.pendingUupsReuse)throw new Error('Unknown aggregate inputs cannot authorize pending reuse');
121
+ const hash='0'.repeat(64);
122
+ return collectOwned({...input,header:{...input.header,inputsHash:hash},identities:{...input.identities,read:async()=>({...await input.identities.read(),inputsHash:hash})}},true) as Promise<StagedDeliveryCollection>;
123
+ }
124
+ async function collectOwned(input:DeliveryPlanningOptions,staging:boolean):Promise<DeliveryCollection|StagedDeliveryCollection> {
125
+ const sourceSteps = strictData(input.steps);
126
+ const header = parseDeliveryPlanHeader(input.header),
127
+ context = input.context;
128
+ if (context.mode !== "simulate")
129
+ throw new Error("Delivery planning requires simulate mode");
130
+ if (context.target.create2?.scheme && context.target.create2.scheme !== "evm")
131
+ throw new Error("Delivery planning requires EVM");
132
+ if (new Set(sourceSteps.map((s) => s.id)).size !== input.steps.length)
133
+ throw new Error("Duplicate selected step IDs");
134
+ assertLocalForkRuntime(context.runtime);
135
+ if (
136
+ context.executionId !== header.executionId ||
137
+ context.taskId !== header.deploymentId ||
138
+ context.targetId !== header.target ||
139
+ context.signerAddress?.toLowerCase() !== header.operator ||
140
+ !context.signer ||
141
+ (await context.signer.getAddress()).toLowerCase() !== header.operator
142
+ )
143
+ throw new Error("Delivery context/header/operator identity mismatch");
144
+ const snapshot = context.simulation.snapshot;
145
+ if (
146
+ !snapshot ||
147
+ !Number.isSafeInteger(snapshot.blockNumber) ||
148
+ snapshot.blockNumber < 0 ||
149
+ !/^0x[\da-fA-F]{64}$/.test(snapshot.blockHash)
150
+ )
151
+ throw new Error("Delivery planning requires pinned fork identity");
152
+ const pinned = {
153
+ blockNumber: snapshot.blockNumber,
154
+ blockHash: snapshot.blockHash.toLowerCase(),
155
+ };
156
+ const verifyIdentities = async () => {
157
+ assertLocalForkRuntime(context.runtime);
158
+ const [identity, source, local, network] = await Promise.all([
159
+ input.identities.read(),
160
+ input.identities.readSourceBlock(pinned.blockNumber),
161
+ context.runtime.hre.network.provider.request({
162
+ method: "eth_getBlockByNumber",
163
+ params: [`0x${pinned.blockNumber.toString(16)}`, false],
164
+ }),
165
+ context.runtime.hre.ethers.provider.getNetwork(),
166
+ ]);
167
+ if (
168
+ canonicalJson(parseDeliveryPlanHeader(identity)) !== canonicalJson(header)
169
+ )
170
+ throw new Error("Planning source/input/runtime identity drift");
171
+ if (
172
+ network.chainId.toString() !== header.chainId ||
173
+ source.chainId !== header.chainId ||
174
+ source.blockNumber !== pinned.blockNumber ||
175
+ source.blockHash.toLowerCase() !== pinned.blockHash ||
176
+ !local ||
177
+ typeof local !== "object" ||
178
+ (local as { hash?: string }).hash?.toLowerCase() !== pinned.blockHash
179
+ )
180
+ throw new Error("Planning pinned fork/source identity mismatch");
181
+ };
182
+ await verifyIdentities();
183
+ await createDeliveryValidation(context).preflight(
184
+ sourceSteps.filter((step) => step.kind !== "custom")
185
+ );
186
+ const audit = await LocalForkAudit.start({
187
+ provider: context.runtime.hre.network.provider,
188
+ chainId: header.chainId,
189
+ sourceSnapshot: pinned,
190
+ });
191
+ let retained=false;
192
+ try {
193
+ const expected =
194
+ input.expected && parseDeliveryPlan(input.expected.plan, header);
195
+ const journalIdentity = {
196
+ target: header.target,
197
+ chainId: header.chainId,
198
+ expectedStepIds: expected?.deploymentBindings.map((b) => b.stepId) ?? [],
199
+ };
200
+ const prior =
201
+ expected &&
202
+ parsePreparationJournal(
203
+ input.expected!.preparations,
204
+ expected.transactions,
205
+ expected.derivedBindings,
206
+ journalIdentity
207
+ );
208
+ const bindings = new DeliveryExecutionBindings({
209
+ executionId: header.executionId,
210
+ derivationSeed: input.derivationSeed,
211
+ expected: expected?.derivedBindings,
212
+ });
213
+ const planner = new TransactionPlanner({
214
+ operator: header.operator,
215
+ expectedTransactions: expected?.transactions,
216
+ replayCompletedPrefix: true,
217
+ completedTransactions: input.completedTransactions,
218
+ });
219
+ const preparations = new PreparationJournal({
220
+ ...journalIdentity,
221
+ expectedStepIds: [],
222
+ expected: prior,
223
+ qualifiedSameFork: initial => hasCompilerSameForkInitial(context.runtime.hre,initial),
224
+ });
225
+ const verification = new VerificationJournal([]);
226
+ const pendingObservations: DeliveryRuntimeEvidence["pendingUupsReuse"] = [];
227
+ const operationIds = new DeliveryOperationIdentities();
228
+ const references: DeliveryRuntimeEvidence["references"] = [];
229
+ const customBindings: CustomEvidence[] = [],
230
+ executed: WorkflowStep[] = [];
231
+ const session = sourceSteps.some((step) => step.kind === "custom")
232
+ ? ownedCustomSession(
233
+ input.customSession ??
234
+ new CustomPlanningSession({
235
+ root: context.root,
236
+ businessRoot: context.taskDir,
237
+ params: context.targetParams,
238
+ target: context.target,
239
+ state: () => context.state.snapshot(),
240
+ }),
241
+ context.root,
242
+ context.taskDir
243
+ )
244
+ : undefined;
245
+ const pendingUupsReuse = context.pendingUupsReuse;
246
+ const stepContext: DeliveryStepContext = {
247
+ ...context,
248
+ deploymentRecorder: undefined,
249
+ bindings,
250
+ preparations,
251
+ verification,
252
+ executionPlanner: planner,
253
+ transactionIdentity: operationIds,
254
+ transactionObserver: audit,
255
+ runtime: {
256
+ ...context.runtime,
257
+ localFork: {
258
+ ...context.runtime.localFork!,
259
+ impersonate: (address) =>
260
+ audit.setup(address, () =>
261
+ context.runtime.localFork!.impersonate(address)
262
+ ),
263
+ },
264
+ },
265
+ pendingUupsReuse: pendingUupsReuse && {
266
+ resolve: async (query) => {
267
+ const resolution = await pendingUupsReuse.resolve(query);
268
+ if (resolution?.binding)
269
+ pendingObservations.push({
270
+ stepId: query.stepId,
271
+ binding: canonicalData(
272
+ resolution.binding
273
+ ) as unknown as PendingReuseBinding,
274
+ });
275
+ return resolution;
276
+ },
277
+ },
278
+ };
279
+ for (const sourceStep of sourceSteps) {
280
+ let operations: readonly WorkflowStep[];
281
+ if (sourceStep.kind === "custom") {
282
+ const evidence = parseCustomEvidence(
283
+ await session!.evaluate(sourceStep)
284
+ );
285
+ if (evidence.sourceStepId !== sourceStep.id)
286
+ throw new Error("Custom session source identity mismatch");
287
+ customBindings.push(evidence);
288
+ operations = evidence.operations;
289
+ } else operations = [sourceStep];
290
+ // Register and validate the complete emitted list before dispatching its first operation.
291
+ const steps: WorkflowStep[] = operations.map((operation) => ({
292
+ ...operation,
293
+ id: operationIds.register(
294
+ sourceStep.id,
295
+ sourceStep.kind === "custom" ? operation.id : null,
296
+ operation.kind
297
+ ),
298
+ }));
299
+ preparations.declare(
300
+ steps
301
+ .filter((s) => s.kind === "deploy" || s.kind === "upgrade")
302
+ .map((s) => s.id)
303
+ );
304
+ verification.declare(
305
+ steps
306
+ .filter((s) => s.kind === "check")
307
+ .flatMap((s) => {
308
+ if (!Array.isArray(s.calls) || !s.calls.length)
309
+ throw new Error(`Check ${s.id} requires calls`);
310
+ return s.calls.map((_, callIndex) => ({
311
+ stepId: s.id,
312
+ callIndex,
313
+ assertionId: `${s.id}:${callIndex}`,
314
+ }));
315
+ })
316
+ );
317
+ executed.push(...steps);
318
+ const result = await runDeliverySteps(stepContext, steps);
319
+ references.push({
320
+ sourceStepId: sourceStep.id,
321
+ observations: result.references,
322
+ });
323
+ }
324
+ await verifyIdentities();
325
+ const transactions = planner.complete(),
326
+ derivedBindings = bindings.seal();
327
+ const prepared = preparations.seal(transactions, derivedBindings),
328
+ observations = verification.seal();
329
+ const {inputsHash:knownHash,...base}=header;
330
+ const payload = deepFreeze({
331
+ ...base,
332
+ transactions,
333
+ derivedBindings,
334
+ operationBindings: operationIds.seal(),
335
+ transactionBindings: bindDeliveryTransactions(
336
+ transactions,
337
+ operationIds.seal()
338
+ ),
339
+ customBindings,
340
+ customInputClosure: session?.seal() ?? null,
341
+ deploymentBindings: prepared.map((p) => ({
342
+ stepId: p.stepId,
343
+ preparationHash: p.preparationHash,
344
+ transactionIds: p.mappings.map((m) => m.transactionId),
345
+ derivedKeys: p.derivedKeys,
346
+ })),
347
+ verificationBindings: executed
348
+ .filter((s) => s.kind === "check")
349
+ .map((s) => {
350
+ const checks = observations.filter((o) => o.stepId === s.id);
351
+ return {
352
+ stepId: s.id,
353
+ assertionIds: checks.map((o) => o.assertionId),
354
+ verificationHash: semanticHash(checks),
355
+ };
356
+ }),
357
+ });
358
+ if (input.expected && canonicalJson(input.expected.verification.map(parseVerificationObservation)) !== canonicalJson(observations))
359
+ throw new Error("Replayed verification evidence differs");
360
+ session?.closeReads();
361
+ const interval=await audit.capture({transactions,completedTransactions:input.completedTransactions??[]});
362
+ const stagedSnapshot=deepFreeze({payload,preparations:prepared,verification:observations,runtimeEvidence:{pendingUupsReuse:pendingObservations,forkAudit:interval.snapshot,references}});
363
+ const invariantHash=semanticHash(stagedSnapshot);
364
+ let state:'staged'|'bound'|'failed'|'closed'='staged';
365
+ const open=()=>{if(state!=='staged')throw new Error('Staged collection closed or already bound');};
366
+ const bind=(inputsHash:string):DeliveryCollection=>{
367
+ open(); state='failed';
368
+ const plan=sealDeliveryPlan({...payload,inputsHash});
369
+ if(expected&&plan.planHash!==expected.planHash)throw new Error('Replayed delivery plan differs from expected plan');
370
+ const forkAudit=interval.bind(plan.planHash);
371
+ const result=deepFreeze(canonicalData({plan,preparations:prepared,verification:observations,
372
+ runtimeEvidence:{pendingUupsReuse:pendingObservations,forkAudit,references}}) as unknown as DeliveryCollection);
373
+ if(collectionInvariantHash(result)!==invariantHash)throw new Error('Binding changed staged collection payload');
374
+ state='bound';return result;
375
+ };
376
+ const check=async()=>{
377
+ open();
378
+ try {
379
+ await verifyIdentities();await interval.assertUnchanged();
380
+ if(session&&canonicalJson(session.seal())!==canonicalJson(payload.customInputClosure))throw new Error('Custom input closure drift at collection completion');
381
+ }catch(error){state='failed';throw error;}
382
+ };
383
+ if(!staging){await check();return bind(knownHash);}
384
+ retained=true;
385
+ return Object.freeze({payload,invariantHash,snapshot:stagedSnapshot,assertUnchanged:check,bind,close(){state='closed';audit.close();}});
386
+
387
+ } finally {
388
+ if(!retained)audit.close();
389
+ }
390
+ }
391
+
392
+ /** Comparison only; this hash creates no collection/staging authority. */
393
+ export function collectionInvariantHash(collection:DeliveryCollection):string {
394
+ const {inputsHash:_,planHash:__,...payload}=collection.plan;
395
+ const {planHash:___,evidenceHash:____,...forkAudit}=collection.runtimeEvidence.forkAudit;
396
+ return semanticHash({payload,preparations:collection.preparations,verification:collection.verification,runtimeEvidence:{...collection.runtimeEvidence,forkAudit}});
397
+ }
@@ -0,0 +1,9 @@
1
+ // dist-runtime is a separate CommonJS package boundary. Resolve our built policy by
2
+ // location rather than package self-reference, which is unavailable in a checkout.
3
+ export const validateManifestPolicy: typeof import('gate-evm-tools/delivery-policy').validateManifestPolicy =
4
+ require('../../dist-cjs/delivery/policy.js').validateManifestPolicy;
5
+ export const validateNetworkAlias: typeof import('gate-evm-tools/delivery-policy').validateNetworkAlias =
6
+ require('../../dist-cjs/delivery/policy.js').validateNetworkAlias;
7
+ export const isSafeNetworkAlias: typeof import('gate-evm-tools/delivery-policy').isSafeNetworkAlias =
8
+ require('../../dist-cjs/delivery/policy.js').isSafeNetworkAlias;
9
+ export type { ManifestEnvironment } from 'gate-evm-tools/delivery-policy';
@@ -0,0 +1,224 @@
1
+ /** Pure current-artifact consistency, including reuse. This does not attest compiler or OZ layout closure. */
2
+ import { Interface, concat, getCreate2Address } from "ethers";
3
+ import {
4
+ artifactIdentity,
5
+ type GateToolArtifact,
6
+ type GateToolPreparationPlanV1,
7
+ type GateToolPreparationRequestV1,
8
+ type GateToolDeploymentPlan,
9
+ type GateToolAddressPolicy,
10
+ } from "gate-evm-tools/workflow";
11
+ import { canonicalJson } from "../workflow/lib/canonicalData";
12
+ import { canonicalCreate2Hashes } from "../workflow/lib/create2Hashes";
13
+ import { strictData } from "./data";
14
+ import { validateAbiArguments, validateTransactionValue } from "./abi";
15
+ export const ERC1967_PROXY =
16
+ "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol:ERC1967Proxy";
17
+ const factoryInterface = new Interface([
18
+ "function deploy(bytes32 salt,bytes initCode,bytes data,uint256 create2ForwardValue,uint256 callForwardValue) payable returns(address)",
19
+ ]);
20
+ const upgradeInterface = new Interface([
21
+ "function upgradeToAndCall(address newImplementation,bytes data) payable",
22
+ ]);
23
+ export type DeliveryArtifactReader = (
24
+ name: string,
25
+ ) => Promise<GateToolArtifact>;
26
+ export function deliveryArtifact(raw: GateToolArtifact): GateToolArtifact {
27
+ const artifact = strictData(raw, "delivery artifact");
28
+ if (
29
+ artifact._format !== "hh-sol-artifact-1" ||
30
+ typeof artifact.bytecode !== "string" ||
31
+ !/^0x(?:[0-9a-fA-F]{2})*$/.test(artifact.bytecode)
32
+ )
33
+ throw new Error("Delivery requires actual EVM artifact bytecode");
34
+ new Interface(artifact.abi);
35
+ return artifact;
36
+ }
37
+ export function deliveryPreparationData(raw: unknown): unknown {
38
+ const value = strictData(raw);
39
+ if (
40
+ value &&
41
+ typeof value === "object" &&
42
+ Object.hasOwn(value, "constructorArgs")
43
+ ) {
44
+ const request = value as Record<string, unknown>;
45
+ for (const key of ["create2ForwardValue", "callForwardValue"])
46
+ if (Object.hasOwn(request, key)) validateTransactionValue(request[key]);
47
+ }
48
+ return value;
49
+ }
50
+ export async function validatePreparationSemantics(
51
+ request: GateToolPreparationRequestV1,
52
+ plan: GateToolPreparationPlanV1,
53
+ read: DeliveryArtifactReader,
54
+ ): Promise<void> {
55
+ strictData(request);
56
+ strictData(plan);
57
+ if ((request.scheme ?? "evm") !== "evm" || plan.scheme !== "evm")
58
+ throw new Error("Delivery preparation requires EVM");
59
+ if (request.kind === "create2-deploy") {
60
+ validateTransactionValue(request.create2ForwardValue ?? "0");
61
+ validateTransactionValue(request.callForwardValue ?? "0");
62
+ validateTransactionValue(
63
+ (
64
+ BigInt(request.create2ForwardValue ?? "0") +
65
+ BigInt(request.callForwardValue ?? "0")
66
+ ).toString(),
67
+ );
68
+ }
69
+ const artifact = deliveryArtifact(await read(request.contract));
70
+ if (
71
+ canonicalJson(artifactIdentity(artifact, "evm")) !==
72
+ canonicalJson(plan.artifact)
73
+ )
74
+ throw new Error("Actual artifact identity differs from preparation");
75
+ const deployments: GateToolDeploymentPlan[] = [],
76
+ transactions: GateToolPreparationPlanV1["transactions"] = [];
77
+ const role = (
78
+ name: GateToolDeploymentPlan["role"],
79
+ a: GateToolArtifact,
80
+ args: unknown[],
81
+ salt: string,
82
+ policy?: GateToolAddressPolicy,
83
+ ): string => {
84
+ if (a.bytecode === '0x') throw new Error('Deployment requires non-empty EVM bytecode');
85
+ validateAbiArguments(a.abi, null, args);
86
+ const constructorInput = new Interface(a.abi)
87
+ .encodeDeploy(args)
88
+ .toLowerCase(),
89
+ initCode = concat([a.bytecode, constructorInput]);
90
+ const hash = canonicalCreate2Hashes({ scheme: "evm", artifact: a, args });
91
+ if (hash.scheme !== "evm") throw new Error("Invalid CREATE2 scheme");
92
+ const address = getCreate2Address(
93
+ request.factory,
94
+ salt,
95
+ hash.initCodeHash,
96
+ ).toLowerCase();
97
+ if (
98
+ policy?.expectedAddress &&
99
+ policy.expectedAddress.toLowerCase() !== address
100
+ )
101
+ throw new Error("Actual CREATE2 address differs from expectedAddress");
102
+ if (
103
+ policy?.leadingZeroBytes !== undefined &&
104
+ (!Number.isSafeInteger(policy.leadingZeroBytes) ||
105
+ policy.leadingZeroBytes < 0 ||
106
+ policy.leadingZeroBytes > 20 ||
107
+ !address.slice(2).startsWith("00".repeat(policy.leadingZeroBytes)))
108
+ )
109
+ throw new Error("Actual CREATE2 address violates leadingZeroBytes");
110
+ const matches = plan.deployments.filter((d) => d.role === name);
111
+ if (matches.length !== 1) throw new Error("Actual CREATE2 roles differ");
112
+ const expected = {
113
+ role: name,
114
+ address,
115
+ salt: salt.toLowerCase(),
116
+ status: matches[0].status,
117
+ constructorInput,
118
+ initCodeHash: hash.initCodeHash,
119
+ };
120
+ if (canonicalJson(expected) !== canonicalJson(matches[0]))
121
+ throw new Error("Actual CREATE2 deployment differs from preparation");
122
+ deployments.push(expected);
123
+ if (expected.status === "required") {
124
+ const forward =
125
+ request.kind === "create2-deploy"
126
+ ? (request.create2ForwardValue ?? "0")
127
+ : "0",
128
+ callForward =
129
+ request.kind === "create2-deploy"
130
+ ? (request.callForwardValue ?? "0")
131
+ : "0";
132
+ validateTransactionValue(forward);
133
+ validateTransactionValue(callForward);
134
+ validateTransactionValue(
135
+ (BigInt(forward) + BigInt(callForward)).toString(),
136
+ );
137
+ const purpose =
138
+ name === "contract"
139
+ ? "deploy-contract"
140
+ : name === "implementation"
141
+ ? "deploy-implementation"
142
+ : "deploy-proxy";
143
+ transactions.push({
144
+ id: purpose,
145
+ purpose,
146
+ to: request.factory.toLowerCase(),
147
+ operation: 0,
148
+ value: (BigInt(forward) + BigInt(callForward)).toString(),
149
+ data: factoryInterface
150
+ .encodeFunctionData("deploy", [
151
+ salt,
152
+ initCode,
153
+ "0x",
154
+ forward,
155
+ callForward,
156
+ ])
157
+ .toLowerCase(),
158
+ });
159
+ }
160
+ return address;
161
+ };
162
+ if (request.kind === "create2-deploy")
163
+ role(
164
+ "contract",
165
+ artifact,
166
+ request.constructorArgs,
167
+ request.salt,
168
+ request.addressPolicy,
169
+ );
170
+ else {
171
+ const implementation = role(
172
+ "implementation",
173
+ artifact,
174
+ request.constructorArgs,
175
+ request.implementationSalt,
176
+ request.kind === "uups-upgrade"
177
+ ? request.implementationAddressPolicy
178
+ : undefined,
179
+ );
180
+ const proxy =
181
+ request.kind === "uups-placeholder-deploy"
182
+ ? role(
183
+ "proxy",
184
+ deliveryArtifact(await read(ERC1967_PROXY)),
185
+ [request.placeholderImplementation, "0x"],
186
+ request.proxySalt,
187
+ request.proxyAddressPolicy,
188
+ )
189
+ : request.proxy.toLowerCase();
190
+ if (request.call)
191
+ validateAbiArguments(
192
+ artifact.abi,
193
+ request.call.method,
194
+ request.call.args,
195
+ );
196
+ const data = request.call
197
+ ? new Interface(artifact.abi).encodeFunctionData(
198
+ request.call.method,
199
+ request.call.args,
200
+ )
201
+ : "0x";
202
+ if (
203
+ request.kind === "uups-upgrade" ||
204
+ deployments.find((d) => d.role === "proxy")?.status === "required"
205
+ )
206
+ transactions.push({
207
+ id: "upgrade-proxy",
208
+ purpose: "upgrade-proxy",
209
+ to: proxy,
210
+ operation: 0,
211
+ value: "0",
212
+ data: upgradeInterface
213
+ .encodeFunctionData("upgradeToAndCall", [implementation, data])
214
+ .toLowerCase(),
215
+ });
216
+ else if (deployments.some((d) => d.status === "required"))
217
+ throw new Error("Invalid actual UUPS reuse roles");
218
+ }
219
+ if (
220
+ canonicalJson(deployments) !== canonicalJson(plan.deployments) ||
221
+ canonicalJson(transactions) !== canonicalJson(plan.transactions)
222
+ )
223
+ throw new Error("Actual CREATE2 calldata or roles differ from preparation");
224
+ }
@@ -0,0 +1,6 @@
1
+ /** Remove signing authority, retaining independent model/RPC API configuration. */
2
+ export function productionChildEnvironment(input:NodeJS.ProcessEnv):NodeJS.ProcessEnv {
3
+ const out={...input};
4
+ for(const key of Object.keys(out))if(/(^|_)(PRIVATE_KEY|MNEMONIC|SEED_PHRASE)$/.test(key)||/^GATEFLOW_(OPERATOR_TOKEN|PRODUCTION_|MAC_SECURE_SIGNER_)/.test(key)||/^GATE_(CUSTODY|SIGNER)_/.test(key))delete out[key];
5
+ return out;
6
+ }