@vtechcom/hexcore 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/LICENSE +201 -0
  3. package/README.md +283 -0
  4. package/dist/app.module.js +55 -0
  5. package/dist/app.module.js.map +1 -0
  6. package/dist/auth.js +151 -0
  7. package/dist/auth.js.map +1 -0
  8. package/dist/chain/cost-models.js +81 -0
  9. package/dist/chain/cost-models.js.map +1 -0
  10. package/dist/chain/provider.js +269 -0
  11. package/dist/chain/provider.js.map +1 -0
  12. package/dist/chain/socket.js +48 -0
  13. package/dist/chain/socket.js.map +1 -0
  14. package/dist/cli/doctor.js +43 -0
  15. package/dist/cli/doctor.js.map +1 -0
  16. package/dist/cli/hexcore.js +435 -0
  17. package/dist/cli/hexcore.js.map +1 -0
  18. package/dist/common/auth.guard.js +66 -0
  19. package/dist/common/auth.guard.js.map +1 -0
  20. package/dist/common/http.js +171 -0
  21. package/dist/common/http.js.map +1 -0
  22. package/dist/common/zod-validation.pipe.js +47 -0
  23. package/dist/common/zod-validation.pipe.js.map +1 -0
  24. package/dist/config.js +354 -0
  25. package/dist/config.js.map +1 -0
  26. package/dist/config.module.js +35 -0
  27. package/dist/config.module.js.map +1 -0
  28. package/dist/controllers/cardano.controller.js +173 -0
  29. package/dist/controllers/cardano.controller.js.map +1 -0
  30. package/dist/controllers/heads.controller.js +225 -0
  31. package/dist/controllers/heads.controller.js.map +1 -0
  32. package/dist/controllers/setup.controller.js +127 -0
  33. package/dist/controllers/setup.controller.js.map +1 -0
  34. package/dist/controllers/system.controller.js +153 -0
  35. package/dist/controllers/system.controller.js.map +1 -0
  36. package/dist/db/database.module.js +73 -0
  37. package/dist/db/database.module.js.map +1 -0
  38. package/dist/db/index.js +135 -0
  39. package/dist/db/index.js.map +1 -0
  40. package/dist/db/repositories.js +220 -0
  41. package/dist/db/repositories.js.map +1 -0
  42. package/dist/docker/container-stats.js +134 -0
  43. package/dist/docker/container-stats.js.map +1 -0
  44. package/dist/docker/docker.service.js +335 -0
  45. package/dist/docker/docker.service.js.map +1 -0
  46. package/dist/hydra/argv.js +172 -0
  47. package/dist/hydra/argv.js.map +1 -0
  48. package/dist/hydra/blockfrost-keys.js +15 -0
  49. package/dist/hydra/blockfrost-keys.js.map +1 -0
  50. package/dist/hydra/boot-progress.js +165 -0
  51. package/dist/hydra/boot-progress.js.map +1 -0
  52. package/dist/hydra/capabilities.js +131 -0
  53. package/dist/hydra/capabilities.js.map +1 -0
  54. package/dist/hydra/head.service.js +1072 -0
  55. package/dist/hydra/head.service.js.map +1 -0
  56. package/dist/hydra/keys.js +301 -0
  57. package/dist/hydra/keys.js.map +1 -0
  58. package/dist/hydra/node-monitor.service.js +265 -0
  59. package/dist/hydra/node-monitor.service.js.map +1 -0
  60. package/dist/hydra/ws-client.js +177 -0
  61. package/dist/hydra/ws-client.js.map +1 -0
  62. package/dist/main.js +106 -0
  63. package/dist/main.js.map +1 -0
  64. package/dist/preflight.js +215 -0
  65. package/dist/preflight.js.map +1 -0
  66. package/dist/settings.js +243 -0
  67. package/dist/settings.js.map +1 -0
  68. package/dist/setup.service.js +257 -0
  69. package/dist/setup.service.js.map +1 -0
  70. package/dist/version.js +46 -0
  71. package/dist/version.js.map +1 -0
  72. package/node_modules/@hexcore/shared/dist/cjs/api.d.ts +730 -0
  73. package/node_modules/@hexcore/shared/dist/cjs/api.d.ts.map +1 -0
  74. package/node_modules/@hexcore/shared/dist/cjs/api.js +358 -0
  75. package/node_modules/@hexcore/shared/dist/cjs/api.js.map +1 -0
  76. package/node_modules/@hexcore/shared/dist/cjs/domain.d.ts +298 -0
  77. package/node_modules/@hexcore/shared/dist/cjs/domain.d.ts.map +1 -0
  78. package/node_modules/@hexcore/shared/dist/cjs/domain.js +49 -0
  79. package/node_modules/@hexcore/shared/dist/cjs/domain.js.map +1 -0
  80. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts +279 -0
  81. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts.map +1 -0
  82. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js +453 -0
  83. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js.map +1 -0
  84. package/node_modules/@hexcore/shared/dist/cjs/index.d.ts +7 -0
  85. package/node_modules/@hexcore/shared/dist/cjs/index.d.ts.map +1 -0
  86. package/node_modules/@hexcore/shared/dist/cjs/index.js +23 -0
  87. package/node_modules/@hexcore/shared/dist/cjs/index.js.map +1 -0
  88. package/node_modules/@hexcore/shared/dist/cjs/naming.d.ts +118 -0
  89. package/node_modules/@hexcore/shared/dist/cjs/naming.d.ts.map +1 -0
  90. package/node_modules/@hexcore/shared/dist/cjs/naming.js +103 -0
  91. package/node_modules/@hexcore/shared/dist/cjs/naming.js.map +1 -0
  92. package/node_modules/@hexcore/shared/dist/cjs/offline.d.ts +73 -0
  93. package/node_modules/@hexcore/shared/dist/cjs/offline.d.ts.map +1 -0
  94. package/node_modules/@hexcore/shared/dist/cjs/offline.js +80 -0
  95. package/node_modules/@hexcore/shared/dist/cjs/offline.js.map +1 -0
  96. package/node_modules/@hexcore/shared/dist/cjs/protocol-params.d.ts +79 -0
  97. package/node_modules/@hexcore/shared/dist/cjs/protocol-params.d.ts.map +1 -0
  98. package/node_modules/@hexcore/shared/dist/cjs/protocol-params.js +223 -0
  99. package/node_modules/@hexcore/shared/dist/cjs/protocol-params.js.map +1 -0
  100. package/node_modules/@hexcore/shared/dist/esm/api.js +355 -0
  101. package/node_modules/@hexcore/shared/dist/esm/api.js.map +1 -0
  102. package/node_modules/@hexcore/shared/dist/esm/domain.js +46 -0
  103. package/node_modules/@hexcore/shared/dist/esm/domain.js.map +1 -0
  104. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js +441 -0
  105. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js.map +1 -0
  106. package/node_modules/@hexcore/shared/dist/esm/index.js +7 -0
  107. package/node_modules/@hexcore/shared/dist/esm/index.js.map +1 -0
  108. package/node_modules/@hexcore/shared/dist/esm/naming.js +95 -0
  109. package/node_modules/@hexcore/shared/dist/esm/naming.js.map +1 -0
  110. package/node_modules/@hexcore/shared/dist/esm/offline.js +75 -0
  111. package/node_modules/@hexcore/shared/dist/esm/offline.js.map +1 -0
  112. package/node_modules/@hexcore/shared/dist/esm/package.json +3 -0
  113. package/node_modules/@hexcore/shared/dist/esm/protocol-params.js +217 -0
  114. package/node_modules/@hexcore/shared/dist/esm/protocol-params.js.map +1 -0
  115. package/node_modules/@hexcore/shared/package.json +15 -0
  116. package/package.json +67 -0
  117. package/web/200.html +23 -0
  118. package/web/404.html +23 -0
  119. package/web/_nuxt/2MxohCD-.js +1 -0
  120. package/web/_nuxt/4pFXjB_u.js +1 -0
  121. package/web/_nuxt/B-v0dEQX.js +1 -0
  122. package/web/_nuxt/B4yE3U25.js +1 -0
  123. package/web/_nuxt/BFh8Ai0L.js +1 -0
  124. package/web/_nuxt/BgPn4NJH.js +1 -0
  125. package/web/_nuxt/Bj1xviSh.js +1 -0
  126. package/web/_nuxt/BnotlrL7.js +1 -0
  127. package/web/_nuxt/C1YRg2ic.js +1 -0
  128. package/web/_nuxt/CGD7MYQH.js +1 -0
  129. package/web/_nuxt/CQcG7Bu4.js +1 -0
  130. package/web/_nuxt/CS3KqpH_.js +1 -0
  131. package/web/_nuxt/CT-yt694.js +1 -0
  132. package/web/_nuxt/CZK6xUH-.js +1 -0
  133. package/web/_nuxt/CcdyYRYz.js +1 -0
  134. package/web/_nuxt/CePNTU1S.js +1 -0
  135. package/web/_nuxt/CgPLsCeU.js +5 -0
  136. package/web/_nuxt/CkCrahXt.js +1 -0
  137. package/web/_nuxt/CnOqDT9k.js +3 -0
  138. package/web/_nuxt/CqsSss-D.js +1 -0
  139. package/web/_nuxt/Cr8dL64Q.js +1 -0
  140. package/web/_nuxt/D3CwzwU0.js +1 -0
  141. package/web/_nuxt/DDANn6-H.js +1 -0
  142. package/web/_nuxt/DDl9uKIA.js +1 -0
  143. package/web/_nuxt/DL9i0ayn.js +1 -0
  144. package/web/_nuxt/DLNoK9BC.js +1 -0
  145. package/web/_nuxt/DLztFeOQ.js +1 -0
  146. package/web/_nuxt/DPihKXdt.js +1 -0
  147. package/web/_nuxt/DXyr6Naa.js +1 -0
  148. package/web/_nuxt/DeDg5p0D.js +1 -0
  149. package/web/_nuxt/DgDlQiDU.js +1 -0
  150. package/web/_nuxt/DyPI7qJE.js +30 -0
  151. package/web/_nuxt/LGfPBi70.js +1 -0
  152. package/web/_nuxt/Onf26W-r.js +1 -0
  153. package/web/_nuxt/QZNQe_OX.js +1 -0
  154. package/web/_nuxt/Y8IJM-iz.js +1 -0
  155. package/web/_nuxt/YUGC0nt0.js +1 -0
  156. package/web/_nuxt/builds/latest.json +1 -0
  157. package/web/_nuxt/builds/meta/7e461629-93e2-4694-b237-6d5c6a85c97c.json +1 -0
  158. package/web/_nuxt/builds/meta/dev.json +1 -0
  159. package/web/_nuxt/entry.BxsAxZxf.css +1 -0
  160. package/web/_nuxt/error-404.XbtAw-qw.css +1 -0
  161. package/web/_nuxt/error-500.CNHVltWM.css +1 -0
  162. package/web/_nuxt/rS90pPZ_.js +1 -0
  163. package/web/_nuxt/rhEiP908.js +1 -0
  164. package/web/_nuxt/vSj9Ec0g.js +1 -0
  165. package/web/_nuxt/woNjBJMN.js +1 -0
  166. package/web/favicon.svg +28 -0
  167. package/web/heads/index.html +23 -0
  168. package/web/heads/new/index.html +23 -0
  169. package/web/index.html +23 -0
  170. package/web/login/index.html +23 -0
  171. package/web/logo.svg +56 -0
  172. package/web/settings/index.html +23 -0
  173. package/web/setup/index.html +23 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,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EAAE,aAAa,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,8CAA4C,CAAC;AAC1E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;IAEpB,qEAAqE;;;;;;;;EAEvE,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAErD,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,yDAAyD;AACzD,MAAM,WAAW,KAAK,CAAC,CAAC;IACpB,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,CAAC,CAAC;CACX;AACD,MAAM,WAAW,MAAM;IACnB,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;CACL;AACD,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC"}
@@ -0,0 +1,358 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cleanSchema = exports.cleanScopeSchema = exports.completeSetupSchema = exports.settingsSchema = exports.loginSchema = exports.resetHeadSchema = exports.listHeadsQuerySchema = exports.protocolParametersQuerySchema = exports.verifyCardanoKeySchema = exports.updateHeadSchema = exports.createHeadSchema = exports.headLoggingSchema = exports.offlineConfigSchema = exports.blockfrostProjectIdSchema = void 0;
4
+ /**
5
+ * Request/response contracts. Imported by the control-plane (validation) AND the
6
+ * web UI (typed fetch) so the two can never drift.
7
+ */
8
+ const zod_1 = require("zod");
9
+ const domain_1 = require("./domain");
10
+ const offline_1 = require("./offline");
11
+ /**
12
+ * Creating a head in v2 only needs a name and a node count — the control-plane
13
+ * generates every Hydra/Cardano key itself. In v1 the caller had to supply
14
+ * pre-generated key material for every node, which was the single biggest
15
+ * source of setup friction.
16
+ */
17
+ /**
18
+ * A Blockfrost project id carries the network in its prefix. Checking the shape
19
+ * here turns a typo into a field error on the create form instead of a head
20
+ * that boots and then never observes its own init transaction.
21
+ */
22
+ exports.blockfrostProjectIdSchema = zod_1.z
23
+ .string()
24
+ .trim()
25
+ .regex(/^(preprod|preview|mainnet)[A-Za-z0-9]+$/, 'A Blockfrost project id starts with the network name, e.g. preprodXXXXXXXX');
26
+ /**
27
+ * Offline-mode settings. Only read when `chainBackend` is `offline`; the flags
28
+ * they produce are mutually exclusive with every online one (see offline.ts).
29
+ */
30
+ exports.offlineConfigSchema = zod_1.z.object({
31
+ /**
32
+ * `--offline-head-seed`. Left out, it is derived from the head id, which is
33
+ * both unique per head and stable across restarts — two heads sharing a
34
+ * seed would derive the same head id.
35
+ */
36
+ headSeed: zod_1.z
37
+ .string()
38
+ .trim()
39
+ .regex(offline_1.offlineHeadSeedPattern, 'The head seed is 64 hex characters (32 bytes)')
40
+ .optional(),
41
+ /**
42
+ * The L2 ledger's entire starting state, verbatim, as hydra-node's
43
+ * `--initial-utxo` file. Left out, each node's own address is seeded with
44
+ * `seedLovelace` — so the operator holds the keys to everything in the head
45
+ * without having to write this by hand.
46
+ */
47
+ initialUtxo: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
48
+ /**
49
+ * Bounded well below Number.MAX_SAFE_INTEGER: the value ends up in a JSON
50
+ * file read as JSON, and a seed large enough to round is a typo, not a
51
+ * requirement.
52
+ */
53
+ seedLovelace: zod_1.z.number().int().min(0).max(1_000_000_000_000_000).default(offline_1.DEFAULT_OFFLINE_SEED_LOVELACE),
54
+ /**
55
+ * Shelley genesis for `--ledger-genesis`, which gives the simulated L1 its
56
+ * slot/time arithmetic. Genuinely optional — hydra-node's own default is
57
+ * "no genesis file" — so it is omitted rather than invented when absent: a
58
+ * hand-built partial genesis fails to decode and kills the node at startup.
59
+ */
60
+ ledgerGenesis: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
61
+ });
62
+ /** Per-head logging. See HeadLoggingView for why hydra-node and Docker knobs sit together. */
63
+ exports.headLoggingSchema = zod_1.z.object({
64
+ /** hydra-node `--quiet`. */
65
+ quiet: zod_1.z.boolean().default(false),
66
+ /** Docker json-file max-size per file, in MB. */
67
+ maxSizeMb: zod_1.z.number().int().min(1).max(1024).default(10),
68
+ /** Docker json-file max-file. */
69
+ maxFiles: zod_1.z.number().int().min(1).max(50).default(3),
70
+ });
71
+ /**
72
+ * Kept as a plain object so `updateHeadSchema` can still `.partial()` it —
73
+ * the cross-field rules live in `createHeadSchema` below, and a ZodEffects
74
+ * cannot be partialled.
75
+ */
76
+ const createHeadObject = zod_1.z.object({
77
+ name: zod_1.z
78
+ .string()
79
+ .min(1, 'name is required')
80
+ .max(48)
81
+ .regex(/^[a-zA-Z0-9][a-zA-Z0-9 _-]*$/, 'name may only contain letters, digits, space, dash and underscore'),
82
+ description: zod_1.z.string().max(280).optional(),
83
+ /** 1 = solo head (useful for smoke tests), up to 10 peers. */
84
+ nodeCount: zod_1.z.number().int().min(1).max(10).default(1),
85
+ network: domain_1.networkSchema.optional(),
86
+ chainBackend: domain_1.chainBackendSchema.optional(),
87
+ contestationPeriod: zod_1.z.number().int().min(1).max(86400).default(120),
88
+ depositPeriod: zod_1.z.number().int().min(1).max(86400).default(720),
89
+ persistenceRotateAfter: zod_1.z.number().int().min(100).default(15000),
90
+ /**
91
+ * Overrides merged on top of whatever protocol parameters are fetched at
92
+ * start. TOP-LEVEL keys only: the merge is a shallow spread, so a partial
93
+ * nested object replaces its whole key and drops the siblings. The create
94
+ * form builds these with `diffProtocolParameters`, which is what keeps them
95
+ * whole — see protocol-params.ts.
96
+ */
97
+ protocolParameters: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
98
+ /** Only read when chainBackend is `offline`. */
99
+ offline: exports.offlineConfigSchema.optional(),
100
+ logging: exports.headLoggingSchema.optional(),
101
+ /**
102
+ * Blockfrost key for every node of this head, unless a node overrides it
103
+ * below. Optional: left out, nodes fall back to the server-wide key, and
104
+ * the control-plane refuses the head if there isn't one.
105
+ */
106
+ blockfrostProjectId: exports.blockfrostProjectIdSchema.optional(),
107
+ /**
108
+ * Per-node keys, one per node in index order.
109
+ *
110
+ * Blockfrost meters per project id, so a head whose nodes all share one key
111
+ * spends a single rate limit budget N ways — fine for a smoke test, not for
112
+ * N independent participants. Sharing stays the default (this is left out,
113
+ * or filled with the same value); giving each node its own is a matter of
114
+ * filling the array.
115
+ */
116
+ nodeBlockfrostProjectIds: zod_1.z.array(exports.blockfrostProjectIdSchema).min(1).max(10).optional(),
117
+ /**
118
+ * Cardano payment keys to reuse instead of generating, one entry per node
119
+ * in index order; null for a node that should get a fresh pair.
120
+ *
121
+ * The point is funds: a generated node starts at a brand-new address that
122
+ * has to be filled from the faucet before the head can commit anything.
123
+ * Supplying a key that already holds test ADA skips that entirely.
124
+ *
125
+ * Hydra keys are never imported — they only sign Head protocol messages,
126
+ * so there is no state attached to carrying one over.
127
+ */
128
+ nodeCardanoKeys: zod_1.z
129
+ .array(zod_1.z
130
+ .object({
131
+ /** A .skey file, its cborHex, 64 hex chars, or ed25519_sk1… */
132
+ signingKey: zod_1.z.string().trim().min(1),
133
+ /** Optional .vkey, checked against the signing key. */
134
+ verificationKey: zod_1.z.string().trim().min(1).optional(),
135
+ })
136
+ .nullable())
137
+ .min(1)
138
+ .max(10)
139
+ .optional(),
140
+ /**
141
+ * Optional per-head hydra-node image; falls back to HYDRA_NODE_IMAGE.
142
+ *
143
+ * Any reference is accepted, not just the ones in HYDRA_VERSION_PROFILES —
144
+ * a tag with no profile is probed instead of refused, so a fork or a release
145
+ * newer than this build still boots. What the tag cannot be is empty or
146
+ * whitespace-bearing, which would reach Docker as an unparseable ref.
147
+ */
148
+ hydraNodeImage: zod_1.z
149
+ .string()
150
+ .trim()
151
+ .min(1)
152
+ .max(200)
153
+ .regex(/^\S+$/, 'hydraNodeImage must be a Docker image reference')
154
+ .optional(),
155
+ });
156
+ exports.createHeadSchema = createHeadObject.superRefine((v, ctx) => {
157
+ /**
158
+ * Offline heads are multi-party, but capped lower than online ones: every
159
+ * node runs on this one machine, each with an embedded etcd, and there is
160
+ * no L1 to spread the load over. See MAX_OFFLINE_NODES.
161
+ */
162
+ if (v.chainBackend === 'offline' && v.nodeCount > offline_1.MAX_OFFLINE_NODES) {
163
+ ctx.addIssue({
164
+ code: zod_1.z.ZodIssueCode.custom,
165
+ path: ['nodeCount'],
166
+ message: `An offline head runs at most ${offline_1.MAX_OFFLINE_NODES} nodes — they all share this machine, with no layer 1 to spread the load over.`,
167
+ });
168
+ }
169
+ /**
170
+ * Keys the head would store and never read. An offline node makes no HTTP
171
+ * calls at all, so accepting a project id here would leave a credential on
172
+ * disk for nothing.
173
+ */
174
+ if (v.chainBackend === 'offline' && (v.blockfrostProjectId || v.nodeBlockfrostProjectIds)) {
175
+ ctx.addIssue({
176
+ code: zod_1.z.ZodIssueCode.custom,
177
+ path: ['blockfrostProjectId'],
178
+ message: 'An offline head never contacts Blockfrost — remove the project id.',
179
+ });
180
+ }
181
+ // Settings that would be stored and silently ignored. Saying so is better
182
+ // than letting someone tune a seed UTxO that no node will ever read.
183
+ if (v.offline && v.chainBackend && v.chainBackend !== 'offline') {
184
+ ctx.addIssue({
185
+ code: zod_1.z.ZodIssueCode.custom,
186
+ path: ['offline'],
187
+ message: `Offline settings only apply to an offline head, not a ${v.chainBackend} one.`,
188
+ });
189
+ }
190
+ // One key per node, in index order — a short array would silently leave the
191
+ // tail of the head on a different key than the operator intended.
192
+ if (v.nodeBlockfrostProjectIds && v.nodeBlockfrostProjectIds.length !== v.nodeCount) {
193
+ ctx.addIssue({
194
+ code: zod_1.z.ZodIssueCode.custom,
195
+ path: ['nodeBlockfrostProjectIds'],
196
+ message: `Expected one Blockfrost key per node (${v.nodeCount}), got ${v.nodeBlockfrostProjectIds.length}`,
197
+ });
198
+ }
199
+ if (v.nodeCardanoKeys && v.nodeCardanoKeys.length !== v.nodeCount) {
200
+ ctx.addIssue({
201
+ code: zod_1.z.ZodIssueCode.custom,
202
+ path: ['nodeCardanoKeys'],
203
+ message: `Expected one entry per node (${v.nodeCount}), got ${v.nodeCardanoKeys.length}. Use null for nodes that should get a generated key.`,
204
+ });
205
+ }
206
+ /**
207
+ * A key's prefix is its network. Mismatches are worth catching here because
208
+ * hydra-node does not fail on them — it starts, watches the wrong chain,
209
+ * and simply never sees the head's own init transaction.
210
+ */
211
+ if (!v.network)
212
+ return;
213
+ const wrong = (id) => !id.startsWith(v.network);
214
+ if (v.blockfrostProjectId && wrong(v.blockfrostProjectId)) {
215
+ ctx.addIssue({
216
+ code: zod_1.z.ZodIssueCode.custom,
217
+ path: ['blockfrostProjectId'],
218
+ message: `This key is not for ${v.network} — a ${v.network} project id starts with "${v.network}"`,
219
+ });
220
+ }
221
+ v.nodeBlockfrostProjectIds?.forEach((id, i) => {
222
+ if (wrong(id)) {
223
+ ctx.addIssue({
224
+ code: zod_1.z.ZodIssueCode.custom,
225
+ path: ['nodeBlockfrostProjectIds', i],
226
+ message: `This key is not for ${v.network} — a ${v.network} project id starts with "${v.network}"`,
227
+ });
228
+ }
229
+ });
230
+ });
231
+ exports.updateHeadSchema = createHeadObject
232
+ .partial()
233
+ .omit({ nodeCount: true })
234
+ .extend({ name: createHeadObject.shape.name.optional() });
235
+ /**
236
+ * Check a Cardano key before it is committed to a head.
237
+ *
238
+ * Pasting a key is the one step of head creation with no feedback: the address
239
+ * it produces is not visible until the head exists, and by then a wrong key
240
+ * means deleting and starting over. This answers "what address is this, and
241
+ * does it hold anything" while the form is still open.
242
+ */
243
+ exports.verifyCardanoKeySchema = zod_1.z.object({
244
+ signingKey: zod_1.z.string().trim().min(1),
245
+ /** Optional, and only ever cross-checked against the signing key. */
246
+ verificationKey: zod_1.z.string().trim().min(1).optional(),
247
+ /** Defaults to the server's network — the address differs per network. */
248
+ network: domain_1.networkSchema.optional(),
249
+ /**
250
+ * Key to look the balance up with, for a head that will carry its own.
251
+ * Falls back to the server-wide one; without either, the address still
252
+ * comes back and the balance does not.
253
+ */
254
+ blockfrostProjectId: exports.blockfrostProjectIdSchema.optional(),
255
+ });
256
+ /**
257
+ * The protocol parameters a head created right now would boot with.
258
+ *
259
+ * The create form needs the effective baseline before it can offer to edit it:
260
+ * overrides merge at the top level, so a field can only be changed safely by
261
+ * starting from the whole current value and diffing. Asking the server also
262
+ * keeps the browser out of the business of holding a Blockfrost key.
263
+ */
264
+ exports.protocolParametersQuerySchema = zod_1.z.object({
265
+ network: domain_1.networkSchema.optional(),
266
+ /** For a head that will carry its own key, before it exists. */
267
+ blockfrostProjectId: exports.blockfrostProjectIdSchema.optional(),
268
+ /** Set false to see real L1 fees instead of the zeroed L2 ones. */
269
+ zeroFees: zod_1.z.boolean().optional(),
270
+ });
271
+ exports.listHeadsQuerySchema = zod_1.z.object({
272
+ status: zod_1.z.string().optional(),
273
+ });
274
+ /** Wipe persistence dirs so the head can restart from a clean slate. */
275
+ exports.resetHeadSchema = zod_1.z.object({
276
+ /** Also delete generated key material (forces brand-new addresses). */
277
+ includeKeys: zod_1.z.boolean().default(false),
278
+ });
279
+ exports.loginSchema = zod_1.z.object({
280
+ username: zod_1.z.string().min(1),
281
+ password: zod_1.z.string().min(1),
282
+ });
283
+ // ---------------------------------------------------------------------- setup
284
+ /**
285
+ * First-run setup.
286
+ *
287
+ * Until this exists, standing up Hexcore meant editing a 123-line `.env` by
288
+ * hand — which assumes the reader already knows what a Blockfrost project id is
289
+ * and which of thirty keys matter. docs/PRODUCT.md names non-technical
290
+ * operators as a first-class audience, and that file is where they stopped.
291
+ *
292
+ * The settings a wizard may write are deliberately a SMALL subset of the env
293
+ * schema. Two rules decide what is in:
294
+ *
295
+ * 1. It must be answerable by someone who has not read the code. `PORT_BASE`
296
+ * and `HYDRA_UNSYNCED_PERIOD` are not; they stay env-only, where whoever
297
+ * needs them will find them.
298
+ * 2. It must be applicable without a restart. `PORT` and `STATE_DIR` are read
299
+ * once while the process boots — offering them in a web form would produce
300
+ * a saved setting that silently does not take effect.
301
+ */
302
+ exports.settingsSchema = zod_1.z.object({
303
+ network: domain_1.networkSchema,
304
+ chainBackend: domain_1.chainBackendSchema,
305
+ /**
306
+ * Blank clears it. The wizard sends what the operator typed, and an empty
307
+ * box has to mean "no key" rather than "keep the old one" — the opposite
308
+ * rule is what makes a settings form unable to remove a value.
309
+ */
310
+ blockfrostProjectId: zod_1.z.string().trim().optional(),
311
+ cardanoNodeSocket: zod_1.z.string().trim().optional(),
312
+ /** Default image for heads that name none; a head can still pin its own. */
313
+ hydraNodeImage: zod_1.z.string().trim().min(1).optional(),
314
+ adminUsername: zod_1.z.string().trim().min(1).optional(),
315
+ });
316
+ /**
317
+ * The setup request.
318
+ *
319
+ * Carries the admin password, which is the one value that must never reach the
320
+ * settings file: it is handed to the auth service, hashed into `secrets.json`,
321
+ * and dropped. Left blank, one is generated and printed once — the same
322
+ * behaviour a fresh boot has always had.
323
+ */
324
+ exports.completeSetupSchema = exports.settingsSchema.extend({
325
+ /**
326
+ * Proves the caller can read the terminal Hexcore was started from.
327
+ *
328
+ * Setup is necessarily reachable without a token — it is where the password
329
+ * is set — so on any interface but loopback the first request wins, and on
330
+ * a shared network that is a takeover. The CLI prints the URL with this in
331
+ * it, so for the person who just ran `hexcore` it costs a click.
332
+ */
333
+ setupToken: zod_1.z.string().min(1),
334
+ adminPassword: zod_1.z.string().min(8, 'Use at least 8 characters').optional(),
335
+ });
336
+ /**
337
+ * How far a wipe goes.
338
+ *
339
+ * Split into three because the middle one is the one people actually want and
340
+ * the last one destroys money. A head's Cardano keys control addresses that may
341
+ * hold test ADA — or, on mainnet, ADA — and Hexcore is the only place they
342
+ * exist. `everything` is therefore CLI-only; see the note on cleanSchema.
343
+ */
344
+ exports.cleanScopeSchema = zod_1.z.enum(['config', 'heads', 'everything']);
345
+ /**
346
+ * `everything` is deliberately absent from the API surface.
347
+ *
348
+ * Two reasons, and the second is not negotiable: it deletes the key material
349
+ * behind funded addresses, and it deletes the SQLite database the request is
350
+ * being served from. A server cannot honestly delete its own state mid-request
351
+ * and then answer. `hexcore clean --all` does it with the process stopped.
352
+ */
353
+ exports.cleanSchema = zod_1.z.object({
354
+ scope: zod_1.z.enum(['config', 'heads']),
355
+ /** Must equal the machine's own name; the UI shows which to type. */
356
+ confirm: zod_1.z.string().min(1),
357
+ });
358
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,6BAAwB;AACxB,qCAAkF;AAClF,uCAAqG;AAErG;;;;;GAKG;AACH;;;;GAIG;AACU,QAAA,yBAAyB,GAAG,OAAC;KACrC,MAAM,EAAE;KACR,IAAI,EAAE;KACN,KAAK,CACF,yCAAyC,EACzC,4EAA4E,CAC/E,CAAC;AAEN;;;GAGG;AACU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC;;;;OAIG;IACH,QAAQ,EAAE,OAAC;SACN,MAAM,EAAE;SACR,IAAI,EAAE;SACN,KAAK,CAAC,gCAAsB,EAAE,+CAA+C,CAAC;SAC9E,QAAQ,EAAE;IACf;;;;;OAKG;IACH,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzD;;;;OAIG;IACH,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,uCAA6B,CA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