@parity/product-deploy 0.7.28-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +233 -0
  3. package/assets/environments.json +313 -0
  4. package/bin/bulletin-bootstrap +84 -0
  5. package/bin/bulletin-deploy +429 -0
  6. package/dist/bug-report.d.ts +29 -0
  7. package/dist/bug-report.js +27 -0
  8. package/dist/chunk-2VAUMZB2.js +284 -0
  9. package/dist/chunk-43HLT335.js +232 -0
  10. package/dist/chunk-5VZQ2KSU.js +231 -0
  11. package/dist/chunk-ADNBLFDP.js +225 -0
  12. package/dist/chunk-BMAEWZYV.js +24 -0
  13. package/dist/chunk-C2TS5MER.js +64 -0
  14. package/dist/chunk-DNXH4QTI.js +2336 -0
  15. package/dist/chunk-FZWJV5AD.js +231 -0
  16. package/dist/chunk-GZD2UFLR.js +8 -0
  17. package/dist/chunk-HOTQDYHD.js +219 -0
  18. package/dist/chunk-IDYGYIMH.js +207 -0
  19. package/dist/chunk-KHVTYIIX.js +146 -0
  20. package/dist/chunk-KJH2T5TQ.js +172 -0
  21. package/dist/chunk-KOSF5FDO.js +49 -0
  22. package/dist/chunk-LZJMVPYW.js +156 -0
  23. package/dist/chunk-MFTODIIT.js +725 -0
  24. package/dist/chunk-MMAZFJDG.js +91 -0
  25. package/dist/chunk-NF2FL4ZO.js +164 -0
  26. package/dist/chunk-OITUIM2E.js +524 -0
  27. package/dist/chunk-P6CHOMN3.js +2368 -0
  28. package/dist/chunk-QMYW3D6E.js +316 -0
  29. package/dist/chunk-QTZNULSH.js +185 -0
  30. package/dist/chunk-RI3ZLNPN.js +71 -0
  31. package/dist/chunk-S7EM5VMW.js +108 -0
  32. package/dist/chunk-T7EEVWNU.js +32 -0
  33. package/dist/chunk-UPWEOGLQ.js +37 -0
  34. package/dist/chunk-ZOC4GITL.js +13 -0
  35. package/dist/chunk-ZYVGHDMU.js +117 -0
  36. package/dist/chunk-probe.d.ts +37 -0
  37. package/dist/chunk-probe.js +18 -0
  38. package/dist/chunker.d.ts +8 -0
  39. package/dist/chunker.js +10 -0
  40. package/dist/deploy.d.ts +299 -0
  41. package/dist/deploy.js +96 -0
  42. package/dist/dotns.d.ts +506 -0
  43. package/dist/dotns.js +101 -0
  44. package/dist/environments.d.ts +104 -0
  45. package/dist/environments.js +23 -0
  46. package/dist/errors.d.ts +6 -0
  47. package/dist/errors.js +8 -0
  48. package/dist/gh-pages-mirror.d.ts +76 -0
  49. package/dist/gh-pages-mirror.js +30 -0
  50. package/dist/incremental-stats.d.ts +69 -0
  51. package/dist/incremental-stats.js +10 -0
  52. package/dist/index.d.ts +23 -0
  53. package/dist/index.js +146 -0
  54. package/dist/manifest/byte-budget.d.ts +46 -0
  55. package/dist/manifest/byte-budget.js +14 -0
  56. package/dist/manifest/config-load.d.ts +36 -0
  57. package/dist/manifest/config-load.js +10 -0
  58. package/dist/manifest/publish.d.ts +54 -0
  59. package/dist/manifest/publish.js +23 -0
  60. package/dist/manifest/schema.d.ts +29 -0
  61. package/dist/manifest/schema.js +10 -0
  62. package/dist/manifest/types.d.ts +90 -0
  63. package/dist/manifest/types.js +6 -0
  64. package/dist/manifest-embed.d.ts +18 -0
  65. package/dist/manifest-embed.js +9 -0
  66. package/dist/manifest-fetch.d.ts +32 -0
  67. package/dist/manifest-fetch.js +21 -0
  68. package/dist/manifest-roundtrip.d.ts +15 -0
  69. package/dist/manifest-roundtrip.js +55 -0
  70. package/dist/manifest.d.ts +44 -0
  71. package/dist/manifest.js +20 -0
  72. package/dist/memory-report.d.ts +95 -0
  73. package/dist/memory-report.js +17 -0
  74. package/dist/merkle.d.ts +50 -0
  75. package/dist/merkle.js +33 -0
  76. package/dist/personhood/bind-paid-alias.d.ts +43 -0
  77. package/dist/personhood/bind-paid-alias.js +10 -0
  78. package/dist/personhood/bind-personal-id.d.ts +55 -0
  79. package/dist/personhood/bind-personal-id.js +12 -0
  80. package/dist/personhood/bootstrap.d.ts +85 -0
  81. package/dist/personhood/bootstrap.js +245 -0
  82. package/dist/personhood/claim-pgas.d.ts +61 -0
  83. package/dist/personhood/claim-pgas.js +12 -0
  84. package/dist/personhood/constants.d.ts +23 -0
  85. package/dist/personhood/constants.js +22 -0
  86. package/dist/personhood/encoding.d.ts +49 -0
  87. package/dist/personhood/encoding.js +24 -0
  88. package/dist/personhood/hashing.d.ts +4 -0
  89. package/dist/personhood/hashing.js +8 -0
  90. package/dist/personhood/member-key.d.ts +12 -0
  91. package/dist/personhood/member-key.js +10 -0
  92. package/dist/personhood/people-client.d.ts +14 -0
  93. package/dist/personhood/people-client.js +48 -0
  94. package/dist/personhood/reprove.d.ts +43 -0
  95. package/dist/personhood/reprove.js +225 -0
  96. package/dist/pool.d.ts +51 -0
  97. package/dist/pool.js +30 -0
  98. package/dist/run-state.d.ts +22 -0
  99. package/dist/run-state.js +20 -0
  100. package/dist/telemetry.d.ts +56 -0
  101. package/dist/telemetry.js +71 -0
  102. package/dist/version-check.d.ts +38 -0
  103. package/dist/version-check.js +30 -0
  104. package/docs/bootstrap.md +49 -0
  105. package/docs/e2e-bootstrap.md +154 -0
  106. package/docs/telemetry.md +62 -0
  107. package/docs/testing.md +44 -0
  108. package/package.json +82 -0
  109. package/tools/release-retry-wrapper.mjs +74 -0
@@ -0,0 +1,313 @@
1
+ {
2
+ "environments": [
3
+ {
4
+ "id": "preview",
5
+ "name": "Preview",
6
+ "network": "testnet",
7
+ "description": "Product Preview net, used by Product Teams",
8
+ "backend": "https://polkadot-app-stg.parity.io/",
9
+ "ipfs": "https://previewnet.substrate.dev",
10
+ "autoAccountMapping": true,
11
+ "bulletinAuthorizeV2": true,
12
+ "registerStorageDeposit": 2000000000000,
13
+ "contracts": {
14
+ "DOTNS_PROTOCOL_REGISTRY": "0xc07A2F24387DA27283CD87b9F24573b74C9e0c9b",
15
+ "DOTNS_REGISTRAR": "0x6c40817cdb96Ab57A4d9E9fa21D0eEa8307BDDE8",
16
+ "DOTNS_REGISTRAR_CONTROLLER": "0x732C38082CFAebed505A46e4e2D6414154694580",
17
+ "DOTNS_REGISTRY": "0xE6c0fB6D5492666144A8a4a015E25a98ACa604cA",
18
+ "DOTNS_POP_CONTROLLER": "0xfE1e25E8d521CaaA8055301CA61Ec3557263Ca76",
19
+ "DOTNS_RESOLVER": "0x5E174c960F5276Bd0387F200cE42f98fe927E220",
20
+ "DOTNS_CONTENT_RESOLVER": "0x108376A5B6DDc6BE3201C94Fd169BE444f220076",
21
+ "DOTNS_REVERSE_RESOLVER": "0xd5C3dcC7CE44593fEB1D72017A3539c4dB14e54a",
22
+ "DOTNS_POP_RESOLVER": "0x29Ace5d2C57109c82A30Db175e645880572c6369",
23
+ "DOTNS_NAME_ESCROW": "0x034b072eB8AF5cEfd820390bfe239bD911174ad2",
24
+ "POP_RULES": "0x5f2Dd23Ee3ceD39B293701ccE8355DdDd83Cd324",
25
+ "STORE_FACTORY": "0x9C38DFec452391696a8f0D3daFE71F7Eb29e08f8",
26
+ "LABEL_STORE_BEACON": "0x6B609A89Fec9898B441E17f1618670bdD08c437e",
27
+ "USER_STORE_BEACON": "0xbeb79e8BB2bC610822e8748e5439B9D890d88FF5"
28
+ }
29
+ },
30
+ {
31
+ "id": "paseo-next",
32
+ "name": "Paseo Next",
33
+ "network": "testnet",
34
+ "badge": "Testflight",
35
+ "description": "Production testnet for Polkadot App Testflight",
36
+ "backend": "https://identity-backend.parity-testnet.parity.io",
37
+ "ipfs": "https://paseo-ipfs.polkadot.io",
38
+ "uptimeUrl": "https://stats.uptimerobot.com/LISM1LRA8m"
39
+ },
40
+ {
41
+ "id": "paseo-review",
42
+ "name": "Paseo Review",
43
+ "network": "testnet",
44
+ "description": "Used for App Store review builds",
45
+ "backend": "https://identity-backend-review.parity-testnet.parity.io",
46
+ "ipfs": "https://paseo-bulletin-review-ipfs.polkadot.io",
47
+ "uptimeUrl": "https://stats.uptimerobot.com/bckl1cu0AO"
48
+ },
49
+ {
50
+ "id": "paseo-next-v2",
51
+ "name": "Paseo Next v2",
52
+ "network": "testnet",
53
+ "description": "Next iteration of the Paseo Next testnet",
54
+ "backend": "https://identity-backend-next.parity-testnet.parity.io",
55
+ "ipfs": "https://paseo-bulletin-next-ipfs.polkadot.io",
56
+ "docsUrl": "https://sre.teleport.parity.io/environments/paseo-next/",
57
+ "autoAccountMapping": true,
58
+ "bulletinAuthorizeV2": true,
59
+ "nativeToEthRatio": 100000000,
60
+ "registerStorageDeposit": 2000000000000,
61
+ "popSelfServe": {
62
+ "sudoEnvLabel": "Next V2",
63
+ "faucetUrl": "https://faucet.polkadot.io/?parachain=1500",
64
+ "personhoodFaucetUrl": "https://sudo.personhood.dev/personhood-faucet",
65
+ "dotnsBootstrapUrl": "https://sudo.personhood.dev/dotns-bootstrap",
66
+ "stateAwareGuidance": true
67
+ },
68
+ "contracts": {
69
+ "DOTNS_PROTOCOL_REGISTRY": "0x5Caef84563fc980178e28417414aa65bA32f6B4e",
70
+ "DOTNS_REGISTRAR": "0x885b8085bA92A31c4ef52076f77379E647ECC399",
71
+ "DOTNS_REGISTRAR_CONTROLLER": "0x320b72c6e70D5a631d835FfD95915B288b26E6Be",
72
+ "DOTNS_REGISTRY": "0x8877344A885682523B4613779C95688ed7037BfD",
73
+ "DOTNS_POP_CONTROLLER": "0xaC8A28b60832E6E22bC19bD9Ee273C008576Bde4",
74
+ "ROOT_GATEWAY_DISPATCHER": "0xF470Dd693ED557b33f8775476776532D99Fb60d9",
75
+ "DOTNS_RESOLVER": "0x0cCdfea1a5E62DE116BF6cA79D397798d49e351E",
76
+ "DOTNS_CONTENT_RESOLVER": "0x2c9FF5D9136DBE5814C7B4FDbeDC15273a776663",
77
+ "DOTNS_REVERSE_RESOLVER": "0x025D5c4b10bD9723DeA2F4518aeD5B761DE08CDc",
78
+ "DOTNS_POP_RESOLVER": "0xB992e74cBeaf1Fd71310f85D1944d3A0c15C4c73",
79
+ "DOTNS_NAME_ESCROW": "0x6F7068c04487a90BFB42b128B84231c252b3017a",
80
+ "POP_RULES": "0x2002C1c15b88632Ad01c7770f6EbE1Ca05c8472E",
81
+ "STORE_FACTORY": "0x0DE5De70d61cc6b44B45d6595afDe8dB9b55bc31",
82
+ "LABEL_STORE_BEACON": "0xD033F7Ada687E8BC776928AB239505F9f0479Ce7",
83
+ "USER_STORE_BEACON": "0x7eD9b7D137Fa535965048F93b3B0248fEd2fcd32",
84
+ "PUBLISHER": "0x1307fc02d308f879a16b1ae3a49b4927aed53649"
85
+ }
86
+ },
87
+ {
88
+ "id": "polkadot",
89
+ "name": "Polkadot",
90
+ "network": "mainnet",
91
+ "description": "Polkadot mainnet",
92
+ "autoAccountMapping": true
93
+ },
94
+ {
95
+ "id": "kusama",
96
+ "name": "Kusama",
97
+ "network": "mainnet",
98
+ "description": "Kusama canary network",
99
+ "autoAccountMapping": true
100
+ }
101
+ ],
102
+ "chains": [
103
+ {
104
+ "id": "relay",
105
+ "name": "Relay",
106
+ "endpoints": {
107
+ "preview": {
108
+ "wss": "wss://previewnet.substrate.dev/relay/alice"
109
+ },
110
+ "paseo-next": {
111
+ "wss": "wss://paseo-rpc.n.dwellir.com",
112
+ "uptimeUrl": "https://stats.uptimerobot.com/UrEXbl6Xyt"
113
+ },
114
+ "paseo-review": {
115
+ "wss": "wss://paseo-rpc.n.dwellir.com",
116
+ "uptimeUrl": "https://stats.uptimerobot.com/UrEXbl6Xyt"
117
+ },
118
+ "paseo-next-v2": {
119
+ "wss": "wss://paseo-rpc.n.dwellir.com",
120
+ "uptimeUrl": "https://stats.uptimerobot.com/UrEXbl6Xyt"
121
+ },
122
+ "polkadot": {
123
+ "wss": [
124
+ "wss://polkadot-rpc.n.dwellir.com",
125
+ "wss://polkadot.ibp.network",
126
+ "wss://polkadot.dotters.network",
127
+ "wss://rpc.polkadot.io"
128
+ ]
129
+ },
130
+ "kusama": {
131
+ "wss": [
132
+ "wss://kusama-rpc.n.dwellir.com",
133
+ "wss://kusama.ibp.network",
134
+ "wss://kusama.dotters.network",
135
+ "wss://kusama-rpc.polkadot.io"
136
+ ]
137
+ }
138
+ }
139
+ },
140
+ {
141
+ "id": "asset-hub",
142
+ "name": "Asset Hub",
143
+ "endpoints": {
144
+ "preview": {
145
+ "wss": "wss://previewnet.substrate.dev/asset-hub",
146
+ "parachainId": 1000
147
+ },
148
+ "paseo-next": {
149
+ "wss": "wss://asset-hub-paseo-rpc.n.dwellir.com",
150
+ "parachainId": 1000,
151
+ "uptimeUrl": "https://stats.uptimerobot.com/UrEXbl6Xyt"
152
+ },
153
+ "paseo-review": {
154
+ "wss": "wss://asset-hub-paseo-rpc.n.dwellir.com",
155
+ "parachainId": 1000,
156
+ "uptimeUrl": "https://stats.uptimerobot.com/UrEXbl6Xyt"
157
+ },
158
+ "paseo-next-v2": {
159
+ "wss": "wss://paseo-asset-hub-next-rpc.polkadot.io",
160
+ "parachainId": 1500
161
+ },
162
+ "polkadot": {
163
+ "wss": [
164
+ "wss://asset-hub-polkadot-rpc.n.dwellir.com",
165
+ "wss://asset-hub-polkadot.ibp.network",
166
+ "wss://asset-hub-polkadot.dotters.network",
167
+ "wss://polkadot-asset-hub-rpc.polkadot.io"
168
+ ],
169
+ "parachainId": 1000
170
+ },
171
+ "kusama": {
172
+ "wss": [
173
+ "wss://asset-hub-kusama-rpc.n.dwellir.com",
174
+ "wss://asset-hub-kusama.ibp.network",
175
+ "wss://asset-hub-kusama.dotters.network",
176
+ "wss://kusama-asset-hub-rpc.polkadot.io"
177
+ ],
178
+ "parachainId": 1000
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "id": "bridge-hub",
184
+ "name": "Bridge Hub",
185
+ "endpoints": {
186
+ "polkadot": {
187
+ "wss": [
188
+ "wss://bridge-hub-polkadot-rpc.n.dwellir.com",
189
+ "wss://bridge-hub-polkadot.ibp.network",
190
+ "wss://bridge-hub-polkadot.dotters.network",
191
+ "wss://polkadot-bridge-hub-rpc.polkadot.io"
192
+ ],
193
+ "parachainId": 1002
194
+ },
195
+ "kusama": {
196
+ "wss": [
197
+ "wss://bridge-hub-kusama-rpc.n.dwellir.com",
198
+ "wss://bridge-hub-kusama.ibp.network",
199
+ "wss://bridge-hub-kusama.dotters.network",
200
+ "wss://kusama-bridge-hub-rpc.polkadot.io"
201
+ ],
202
+ "parachainId": 1002
203
+ }
204
+ }
205
+ },
206
+ {
207
+ "id": "collectives",
208
+ "name": "Collectives",
209
+ "endpoints": {
210
+ "polkadot": {
211
+ "wss": [
212
+ "wss://collectives-polkadot-rpc.n.dwellir.com",
213
+ "wss://collectives-polkadot.ibp.network",
214
+ "wss://collectives-polkadot.dotters.network",
215
+ "wss://polkadot-collectives-rpc.polkadot.io"
216
+ ],
217
+ "parachainId": 1001
218
+ }
219
+ }
220
+ },
221
+ {
222
+ "id": "coretime",
223
+ "name": "Coretime",
224
+ "endpoints": {
225
+ "polkadot": {
226
+ "wss": [
227
+ "wss://coretime-polkadot-rpc.n.dwellir.com",
228
+ "wss://coretime-polkadot.ibp.network",
229
+ "wss://coretime-polkadot.dotters.network",
230
+ "wss://polkadot-coretime-rpc.polkadot.io"
231
+ ],
232
+ "parachainId": 1005
233
+ },
234
+ "kusama": {
235
+ "wss": [
236
+ "wss://coretime-kusama-rpc.n.dwellir.com",
237
+ "wss://coretime-kusama.ibp.network",
238
+ "wss://coretime-kusama.dotters.network",
239
+ "wss://kusama-coretime-rpc.polkadot.io"
240
+ ],
241
+ "parachainId": 1005
242
+ }
243
+ }
244
+ },
245
+ {
246
+ "id": "people",
247
+ "name": "People",
248
+ "endpoints": {
249
+ "preview": {
250
+ "wss": "wss://previewnet.substrate.dev/people",
251
+ "parachainId": 1004
252
+ },
253
+ "paseo-next": {
254
+ "wss": "wss://paseo-people-next-rpc.polkadot.io",
255
+ "parachainId": 5140,
256
+ "uptimeUrl": "https://stats.uptimerobot.com/LISM1LRA8m"
257
+ },
258
+ "paseo-review": {
259
+ "wss": "wss://paseo-people-review-rpc.polkadot.io",
260
+ "parachainId": 5167,
261
+ "uptimeUrl": "https://stats.uptimerobot.com/bckl1cu0AO"
262
+ },
263
+ "paseo-next-v2": {
264
+ "wss": "wss://paseo-people-next-system-rpc.polkadot.io",
265
+ "parachainId": 1502
266
+ },
267
+ "polkadot": {
268
+ "wss": [
269
+ "wss://people-polkadot-rpc.n.dwellir.com",
270
+ "wss://people-polkadot.ibp.network",
271
+ "wss://people-polkadot.dotters.network",
272
+ "wss://polkadot-people-rpc.polkadot.io"
273
+ ],
274
+ "parachainId": 1004
275
+ },
276
+ "kusama": {
277
+ "wss": [
278
+ "wss://people-kusama-rpc.n.dwellir.com",
279
+ "wss://people-kusama.ibp.network",
280
+ "wss://people-kusama.dotters.network",
281
+ "wss://kusama-people-rpc.polkadot.io"
282
+ ],
283
+ "parachainId": 1004
284
+ }
285
+ }
286
+ },
287
+ {
288
+ "id": "bulletin",
289
+ "name": "Bulletin",
290
+ "endpoints": {
291
+ "preview": {
292
+ "wss": "wss://previewnet.substrate.dev/bulletin",
293
+ "parachainId": 2487
294
+ },
295
+ "paseo-next": {
296
+ "wss": "wss://paseo-bulletin-rpc.polkadot.io",
297
+ "parachainId": 5118,
298
+ "uptimeUrl": "https://stats.uptimerobot.com/LISM1LRA8m"
299
+ },
300
+ "paseo-review": {
301
+ "wss": "wss://paseo-bulletin-review-rpc.polkadot.io",
302
+ "parachainId": 5168,
303
+ "uptimeUrl": "https://stats.uptimerobot.com/bckl1cu0AO"
304
+ },
305
+ "paseo-next-v2": {
306
+ "wss": "wss://paseo-bulletin-next-rpc.polkadot.io",
307
+ "parachainId": 1501
308
+ }
309
+ }
310
+ }
311
+ ],
312
+ "source": "https://docs.google.com/document/d/1xQoAmWDpbjhuXKT79DTNKFzv7ZkFr5npjo0BvrxXDIw"
313
+ }
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+
3
+ import * as fs from "node:fs/promises";
4
+ import * as path from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE } from "../dist/deploy.js";
7
+ import { bootstrapPool } from "../dist/pool.js";
8
+ import { VERSION } from "../dist/telemetry.js";
9
+
10
+ const args = process.argv.slice(2);
11
+
12
+ const flags = {};
13
+ for (let i = 0; i < args.length; i++) {
14
+ if (args[i] === "--pool-size") { flags.poolSize = parseInt(args[++i], 10); }
15
+ else if (args[i] === "--mnemonic") { flags.mnemonic = args[++i]; }
16
+ else if (args[i] === "--rpc") { flags.rpc = args[++i]; }
17
+ else if (args[i] === "--env") { flags.env = args[++i]; }
18
+ else if (args[i] === "--version" || args[i] === "-V") { flags.version = true; }
19
+ else if (args[i] === "--help" || args[i] === "-h") { flags.help = true; }
20
+ else {
21
+ console.error(`Error: unknown argument ${args[i]}`);
22
+ process.exit(1);
23
+ }
24
+ }
25
+
26
+ if (flags.version) {
27
+ console.log(`bulletin-bootstrap v${VERSION}`);
28
+ process.exit(0);
29
+ }
30
+
31
+ if (flags.help) {
32
+ console.log(`bulletin-bootstrap v${VERSION}
33
+
34
+ Usage:
35
+ bulletin-bootstrap
36
+
37
+ Options:
38
+ --mnemonic "..." Pool root mnemonic (or set BULLETIN_POOL_MNEMONIC / MNEMONIC env var)
39
+ --rpc wss://... Bulletin RPC (or set BULLETIN_RPC env var)
40
+ --env <id> Load environment by id from environments.json (sets default RPC and V2 flag)
41
+ --pool-size N Number of pool accounts to initialize (default: 10)
42
+ --version Show version
43
+ --help Show this help
44
+
45
+ Initialize pool accounts for Bulletin storage authorization.`);
46
+ process.exit(0);
47
+ }
48
+
49
+ let rpc = flags.rpc ?? process.env.BULLETIN_RPC ?? DEFAULT_BULLETIN_RPC;
50
+ const poolSize = flags.poolSize ?? parseInt(process.env.BULLETIN_POOL_SIZE ?? String(DEFAULT_POOL_SIZE), 10);
51
+ const mnemonic = flags.mnemonic ?? process.env.BULLETIN_POOL_MNEMONIC ?? process.env.MNEMONIC;
52
+
53
+ const bootstrapOpts = {};
54
+
55
+ if (flags.env) {
56
+ const envJsonPath = fileURLToPath(new URL("../assets/environments.json", import.meta.url));
57
+ let envDoc;
58
+ try {
59
+ const raw = await fs.readFile(envJsonPath, "utf8");
60
+ envDoc = JSON.parse(raw);
61
+ } catch (e) {
62
+ console.error(`Error: could not load environments.json: ${e.message}`);
63
+ process.exit(1);
64
+ }
65
+
66
+ const envEntry = envDoc.environments.find(e => e.id === flags.env);
67
+ if (!envEntry) {
68
+ const valid = envDoc.environments.map(e => e.id).join(", ");
69
+ console.error(`Error: unknown environment '${flags.env}'. Valid: ${valid}.`);
70
+ process.exit(1);
71
+ }
72
+
73
+ if (!flags.rpc) {
74
+ const bulletinChain = envDoc.chains.find(c => c.id === "bulletin");
75
+ const ep = bulletinChain?.endpoints?.[flags.env];
76
+ if (ep?.wss) {
77
+ rpc = Array.isArray(ep.wss) ? ep.wss[0] : ep.wss;
78
+ }
79
+ }
80
+
81
+ bootstrapOpts.bulletinAuthorizeV2 = envEntry.bulletinAuthorizeV2 ?? false;
82
+ }
83
+
84
+ await bootstrapPool(rpc, poolSize, mnemonic, bootstrapOpts);