bulletin-deploy 0.16.1 → 0.17.0-rc.2
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.
- package/README.md +15 -1
- package/assets/environments.json +1 -2
- package/bin/bulletin-bootstrap +8 -0
- package/bin/bulletin-deploy +59 -97
- package/dist/auth-config.js +4 -4
- package/dist/bug-report.js +4 -4
- package/dist/chain-health.js +3 -3
- package/dist/{chunk-J3NIXHZZ.js → chunk-3MAIF2SF.js} +1 -1
- package/dist/{chunk-C7CZK4IE.js → chunk-4I734GPQ.js} +1 -1
- package/dist/{chunk-KJVRJOKC.js → chunk-AYAVRPAP.js} +12 -4
- package/dist/{chunk-TZYNQJ7P.js → chunk-CB6YGAAB.js} +1 -1
- package/dist/chunk-DSCPTDCZ.js +11 -0
- package/dist/{chunk-7CHUI4JX.js → chunk-ESJC25OU.js} +1 -2
- package/dist/{chunk-PPC5SPAP.js → chunk-EVRNPBNJ.js} +114 -28
- package/dist/chunk-JSV3AGCA.js +398 -0
- package/dist/{chunk-ZYICAJKW.js → chunk-KXMHP4C2.js} +1 -1
- package/dist/{chunk-DB5U6SLK.js → chunk-L3KGTKOD.js} +3 -6
- package/dist/{chunk-AREGYTFD.js → chunk-LKNFD45Z.js} +92 -137
- package/dist/{chunk-KOSF5FDO.js → chunk-LPTKBQII.js} +1 -1
- package/dist/{chunk-IFZCCNIV.js → chunk-LXTYOFFI.js} +3 -3
- package/dist/chunk-M5AKL3FL.js +74 -0
- package/dist/{chunk-2BKPLQY2.js → chunk-MQ3XY57N.js} +1 -1
- package/dist/{chunk-UUZ7BYG3.js → chunk-PTGELCIR.js} +2 -2
- package/dist/{chunk-KZKU7RSW.js → chunk-QAPUBDTU.js} +9 -1
- package/dist/{chunk-4FIJGSCK.js → chunk-QUKV6GUM.js} +2 -2
- package/dist/chunk-RMEDMF4I.js +430 -0
- package/dist/{chunk-3THUTBHU.js → chunk-RXV677CJ.js} +1 -1
- package/dist/{chunk-S7EM5VMW.js → chunk-WPC2PUCV.js} +1 -1
- package/dist/{chunk-UX3XZNVO.js → chunk-X4IXDGEY.js} +50 -35
- package/dist/{chunk-HLU2BVBP.js → chunk-YWQYNCIN.js} +212 -254
- package/dist/chunk-probe.js +3 -3
- package/dist/commands/login.js +18 -17
- package/dist/commands/logout.js +5 -5
- package/dist/commands/transfer.js +7 -7
- package/dist/commands/whoami.js +4 -4
- package/dist/deploy-actors.js +9 -9
- package/dist/deploy.d.ts +126 -44
- package/dist/deploy.js +28 -23
- package/dist/dotns-protocol.d.ts +95 -37
- package/dist/dotns-protocol.js +15 -11
- package/dist/dotns.d.ts +66 -99
- package/dist/dotns.js +9 -13
- package/dist/environments.js +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +34 -70
- package/dist/manifest/byte-budget.js +1 -1
- package/dist/manifest/config-load.js +2 -2
- package/dist/manifest/publish.d.ts +7 -6
- package/dist/manifest/publish.js +24 -19
- package/dist/manifest/schema.js +1 -1
- package/dist/manifest/types.d.ts +55 -7
- package/dist/manifest-embed.js +2 -2
- package/dist/manifest-fetch.js +2 -2
- package/dist/manifest-roundtrip.js +2 -2
- package/dist/manifest.js +1 -1
- package/dist/memory-report.js +2 -2
- package/dist/merkle.d.ts +1 -1
- package/dist/merkle.js +18 -17
- package/dist/personhood/bootstrap.js +14 -14
- package/dist/personhood/people-client.js +7 -7
- package/dist/personhood/ring-proof.d.ts +21 -0
- package/dist/personhood/ring-proof.js +6 -0
- package/dist/pool.d.ts +5 -2
- package/dist/pool.js +5 -3
- package/dist/product-account.d.ts +48 -0
- package/dist/product-account.js +12 -0
- package/dist/run-state.js +1 -1
- package/dist/sss-allowance-cache.js +5 -5
- package/dist/storage-signer.js +18 -17
- package/dist/telemetry.d.ts +16 -6
- package/dist/telemetry.js +6 -2
- package/dist/version-check.d.ts +3 -1
- package/dist/version-check.js +5 -3
- package/docs/bootstrap.md +0 -14
- package/package.json +3 -3
- package/dist/chunk-4HUEHLSW.js +0 -216
- package/dist/chunk-D6AYE6KA.js +0 -169
package/README.md
CHANGED
|
@@ -71,13 +71,27 @@ Key options:
|
|
|
71
71
|
| `--no-transfer-to-signedin-user` | When signed in, sign every DotNS tx with your mobile session instead of the default register-as-worker-then-hand-over flow. |
|
|
72
72
|
| `--to <0xH160>` | Recipient address for the `transfer` subcommand. Defaults to the signed-in account. |
|
|
73
73
|
| `--js-merkle` | Use pure-JS merkleization (no IPFS Kubo binary required). |
|
|
74
|
-
| `--publish` | List the domain in the on-chain Publisher registry after deploy. |
|
|
75
74
|
| `--config <path>` | Explicit path to `bulletin-deploy.config.ts` for product deploys. |
|
|
76
75
|
| `--tag "..."` | Label the deploy in telemetry. |
|
|
77
76
|
| `--version` | Print the installed version and exit. |
|
|
78
77
|
|
|
79
78
|
Subcommands: `login`, `logout`, `whoami` (session management, above) and `transfer <domain.dot>` (hand a name you registered to the signed-in account or `--to`).
|
|
80
79
|
|
|
80
|
+
## Naming
|
|
81
|
+
|
|
82
|
+
A DotNS label is 3-63 lowercase letters, digits, and hyphens, and it must satisfy the on-chain registration rules (PopRules) to be self-registrable:
|
|
83
|
+
|
|
84
|
+
- **Trailing digits:** the label's trailing digit run must be exactly **0 or 2** digits. `myapp1` (one trailing digit) is rejected; `myapp01` or `myapp` both work.
|
|
85
|
+
- **Base length:** the label minus its trailing digit run must be **more than 5 characters**. Shorter base names are reserved for governance.
|
|
86
|
+
|
|
87
|
+
If a name violates either rule, the deploy fails with a message that offers a compliant alternative derived from your own input — no name gets silently substituted.
|
|
88
|
+
|
|
89
|
+
**PR-preview labels** are the case this trips up most often: a bare PR number gives exactly one trailing digit for PRs 1-9 (`myapp-pr7`), which always fails. Zero-pad the PR number instead — `myapp-pr07` — so it stays valid across the full PR range:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
bulletin-deploy ./dist "myapp-pr$(printf '%02d' "$PR_NUMBER")"
|
|
93
|
+
```
|
|
94
|
+
|
|
81
95
|
## Environments
|
|
82
96
|
|
|
83
97
|
bulletin-deploy ships with built-in environment presets (RPC endpoints, contract addresses). The default is `paseo-next-v2`, a Polkadot testnet. Use `--list-environments` to print the table; override individual fields with `--environment-file <path>` or `--contract KEY=0x...`. For what a starting account needs on a given network — funding, a `.dot` name, authorization — see **[DEPLOYMENT.md](DEPLOYMENT.md)**.
|
package/assets/environments.json
CHANGED
|
@@ -163,8 +163,7 @@
|
|
|
163
163
|
"POP_RULES": "0x2181a14081fF2D4477BAA8FB1aEB4C9c44F5F2b0",
|
|
164
164
|
"STORE_FACTORY": "0xD81DC23FAa69B311C1FC553Ea63798772e7D253D",
|
|
165
165
|
"LABEL_STORE_BEACON": "0xc7E86B8DE97AF57F937201d8d372F75ED4BE6633",
|
|
166
|
-
"USER_STORE_BEACON": "0x5924A0dDBb550514A744407F4Ec4b4B7BB6CD736"
|
|
167
|
-
"PUBLISHER": "0xaab42efbe8ea4d4228c3a11e973f94c17b9a0f2c"
|
|
166
|
+
"USER_STORE_BEACON": "0x5924A0dDBb550514A744407F4Ec4b4B7BB6CD736"
|
|
168
167
|
}
|
|
169
168
|
},
|
|
170
169
|
{
|
package/bin/bulletin-bootstrap
CHANGED
|
@@ -117,6 +117,14 @@ if (flags.env) {
|
|
|
117
117
|
|
|
118
118
|
bootstrapOpts.bulletinAuthorizeV2 = envEntry.bulletinAuthorizeV2 ?? false;
|
|
119
119
|
|
|
120
|
+
// #1095: route the //Alice-authorizer-default decision through the env's
|
|
121
|
+
// declared network instead of a live spec_name read — a network:"mainnet"
|
|
122
|
+
// env must never default to signing as //Alice. Once --env resolved an
|
|
123
|
+
// entry, a missing `network` field is a config gap (fail CLOSED via the
|
|
124
|
+
// "unknown" sentinel), not "no env context" (which would fall back to
|
|
125
|
+
// spec_name) — see detectTestnet()'s doc comment in src/pool.ts.
|
|
126
|
+
bootstrapOpts.network = envEntry.network ?? "unknown";
|
|
127
|
+
|
|
120
128
|
// #1209: which key holds TransactionStorage authorizer rights on this env's
|
|
121
129
|
// Bulletin chain. Not always //Alice — previewnet's sole AllowedAuthorizers
|
|
122
130
|
// entry is //Eve. An explicit --authorizer still wins (set above).
|
package/bin/bulletin-deploy
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
// SDK modules that trigger the "@parity/product-sdk-logger" localStorage warning.
|
|
7
7
|
import "../dist/suppress-localstorage-warning.js";
|
|
8
8
|
|
|
9
|
-
import { deploy, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, NonRetryableError, EXIT_CODE_NO_RETRY, isConnectionError, isBenignTeardownError,
|
|
10
|
-
import { VERSION, setDeployAttribute, captureWarning, closeTelemetry, setRunStateActive, markRelaunchOomHintShown } from "../dist/telemetry.js";
|
|
11
|
-
import { handleFailedDeploy, handlePreflightVersionCheck, fetchVersionInfo, preReleaseWarning, checkNodeVersion } from "../dist/version-check.js";
|
|
9
|
+
import { deploy, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, NonRetryableError, EXIT_CODE_NO_RETRY, isConnectionError, isBenignTeardownError, resolveEffectiveMnemonic, resolveEnvId, shouldPublishManifest, nonInteractivePhoneConfirmationError } from "../dist/deploy.js";
|
|
10
|
+
import { VERSION, setDeployAttribute, captureWarning, closeTelemetry, setRunStateActive, markRelaunchOomHintShown, setVersionFreshness } from "../dist/telemetry.js";
|
|
11
|
+
import { handleFailedDeploy, handlePreflightVersionCheck, fetchVersionInfo, preReleaseWarning, checkNodeVersion, classifyVersionFreshness, isInteractive } from "../dist/version-check.js";
|
|
12
12
|
import { setDeployContext, installLogCapture, buildCliFlagsSummary } from "../dist/bug-report.js";
|
|
13
13
|
import { loadRunState, writeRunState, shouldSkipStaleWarning, shouldShowOomHint, probablyOomRssMb } from "../dist/run-state.js";
|
|
14
14
|
import { loadEnvironments, listEnvironments, formatEnvironmentTable, DEFAULT_ENV_ID } from "../dist/environments.js";
|
|
@@ -36,6 +36,7 @@ for (let i = 0; i < args.length; i++) {
|
|
|
36
36
|
else if (args[i] === "--pool-size") { flags.poolSize = parseInt(args[++i], 10); }
|
|
37
37
|
else if (args[i] === "--mnemonic") { flags.mnemonic = args[++i]; }
|
|
38
38
|
else if (args[i] === "--derivation-path") { flags.derivationPath = args[++i]; }
|
|
39
|
+
else if (args[i] === "--product-name") { flags.productName = args[++i]; }
|
|
39
40
|
else if (args[i] === "--rpc") { flags.rpc = args[++i]; }
|
|
40
41
|
else if (args[i] === "--env") { flags.env = args[++i]; }
|
|
41
42
|
else if (args[i] === "--contract") {
|
|
@@ -62,9 +63,6 @@ for (let i = 0; i < args.length; i++) {
|
|
|
62
63
|
else if (args[i].startsWith("--reproducible=")) { flags.reproducibleSource = args[i].slice("--reproducible=".length); }
|
|
63
64
|
else if (args[i] === "--dump-car") { flags.dumpCar = true; }
|
|
64
65
|
else if (args[i].startsWith("--dump-car=")) { flags.dumpCar = args[i].slice("--dump-car=".length); }
|
|
65
|
-
else if (args[i] === "--publish") { flags.publish = true; }
|
|
66
|
-
else if (args[i] === "--unpublish") { flags.unpublish = true; }
|
|
67
|
-
else if (args[i] === "--fail-on-publish-error") { flags.failOnPublishError = true; }
|
|
68
66
|
else if (args[i] === "--suri") { flags.suri = args[++i]; }
|
|
69
67
|
else if (args[i] === "--no-transfer-to-signedin-user") { flags.noTransferToSignedinUser = true; }
|
|
70
68
|
else if (args[i] === "--to") { flags.to = args[++i]; }
|
|
@@ -73,23 +71,8 @@ for (let i = 0; i < args.length; i++) {
|
|
|
73
71
|
else { positional.push(args[i]); }
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
if (flags.publish && flags.unpublish) {
|
|
77
|
-
console.error("Error: --publish and --unpublish are mutually exclusive.");
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// #1163: --no-manifest (--content-only) skips manifest publishing even when a
|
|
82
|
-
// bulletin-deploy.config.* is discoverable; --publish depends on those
|
|
83
|
-
// manifest records (Publisher listing → Browse), so the combination is
|
|
84
|
-
// rejected up front rather than silently publishing a domain with no manifest.
|
|
85
|
-
const noManifestErr = validateNoManifestFlags({ noManifest: !!flags.noManifest, publish: !!flags.publish });
|
|
86
|
-
if (noManifestErr) {
|
|
87
|
-
console.error(noManifestErr);
|
|
88
|
-
process.exit(1);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
74
|
// #1107: the mnemonic actually used to sign — --mnemonic flag > MNEMONIC env
|
|
92
|
-
// var > DOTNS_MNEMONIC env var. Used everywhere deploy
|
|
75
|
+
// var > DOTNS_MNEMONIC env var. Used everywhere a deploy needs
|
|
93
76
|
// a signer identity (existence guards below intentionally keep checking
|
|
94
77
|
// flags.mnemonic / process.env.MNEMONIC directly — only the VALUE forwarded
|
|
95
78
|
// to options.mnemonic changes here).
|
|
@@ -135,32 +118,6 @@ if (flags.listEnvironments) {
|
|
|
135
118
|
}
|
|
136
119
|
}
|
|
137
120
|
|
|
138
|
-
if (flags.unpublish) {
|
|
139
|
-
if (!flags.mnemonic && !process.env.MNEMONIC) {
|
|
140
|
-
console.error("Error: --unpublish requires --mnemonic (or MNEMONIC env var).");
|
|
141
|
-
process.exit(1);
|
|
142
|
-
}
|
|
143
|
-
const [domain] = positional;
|
|
144
|
-
if (!domain) {
|
|
145
|
-
console.error("Error: --unpublish requires a domain (e.g. my-app.dot)");
|
|
146
|
-
process.exit(1);
|
|
147
|
-
}
|
|
148
|
-
try {
|
|
149
|
-
const result = await unpublish(domain, {
|
|
150
|
-
mnemonic: effectiveMnemonic,
|
|
151
|
-
derivationPath: flags.derivationPath,
|
|
152
|
-
rpc: flags.rpc,
|
|
153
|
-
env: effectiveEnvId,
|
|
154
|
-
});
|
|
155
|
-
console.log(`Domain: ${result.domainName}`);
|
|
156
|
-
console.log(`Status: ${result.status}`);
|
|
157
|
-
process.exit(0);
|
|
158
|
-
} catch (e) {
|
|
159
|
-
console.error(`Unpublish failed:`, e?.message ?? e);
|
|
160
|
-
process.exit(1);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
121
|
// The SSO adapter's polkadot-api client fires a benign `DestroyedError: Client
|
|
165
122
|
// destroyed` on orphaned pending-response promises during WS teardown, AFTER an
|
|
166
123
|
// SSO subcommand has done its work. The deploy path's handlers (below) aren't
|
|
@@ -246,11 +203,6 @@ if (positional[0] === "product") {
|
|
|
246
203
|
process.exit(2);
|
|
247
204
|
}
|
|
248
205
|
|
|
249
|
-
if (flags.publish && !flags.mnemonic && !process.env.MNEMONIC) {
|
|
250
|
-
console.error("Error: --publish requires --mnemonic (or MNEMONIC env var).");
|
|
251
|
-
process.exit(1);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
206
|
if (flags.help || positional.length === 0) {
|
|
255
207
|
console.log(`bulletin-deploy v${VERSION}
|
|
256
208
|
|
|
@@ -284,6 +236,7 @@ Options:
|
|
|
284
236
|
--contract DOTNS_REGISTRY=0x.. --contract DOTNS_CONTENT_RESOLVER=0x..
|
|
285
237
|
--mnemonic "..." DotNS owner mnemonic (or set MNEMONIC env var)
|
|
286
238
|
--derivation-path "..." Optional Substrate-style path applied to --mnemonic (e.g. //deploy/3)
|
|
239
|
+
--product-name "..." Deploy as this product's host-derived account (RFC-0022, index 0), so the name is owned by the account the product signs with at runtime
|
|
287
240
|
--no-transfer-to-signedin-user
|
|
288
241
|
When signed in, sign every DotNS tx with your mobile
|
|
289
242
|
session (today's behavior) instead of the default:
|
|
@@ -310,18 +263,7 @@ Options:
|
|
|
310
263
|
Skip manifest publishing entirely, even when a
|
|
311
264
|
bulletin-deploy.config.* is discoverable — plain content
|
|
312
265
|
deploy (storage + root contenthash), same as having no
|
|
313
|
-
config at all.
|
|
314
|
-
--publish After deploy, list <domain> in the on-chain Publisher
|
|
315
|
-
registry (Publisher.publish). Only takes effect on envs
|
|
316
|
-
with a deployed Publisher (currently: PCF-devnet).
|
|
317
|
-
Requires --mnemonic (the signer must own the label).
|
|
318
|
-
--unpublish Standalone mode: removes <domain> from the Publisher
|
|
319
|
-
registry (Publisher.unpublish). Skips the deploy.
|
|
320
|
-
Usage: bulletin-deploy --unpublish <domain.dot>
|
|
321
|
-
Requires --mnemonic. Mutually exclusive with --publish.
|
|
322
|
-
--fail-on-publish-error
|
|
323
|
-
Exit non-zero if --publish fails after a successful deploy.
|
|
324
|
-
Default: non-fatal (warning logged, exit 0).
|
|
266
|
+
config at all.
|
|
325
267
|
--version Show version
|
|
326
268
|
--help Show this help`);
|
|
327
269
|
process.exit(0);
|
|
@@ -488,6 +430,10 @@ try {
|
|
|
488
430
|
|
|
489
431
|
// Await the background version check started at startup.
|
|
490
432
|
const _versionInfo = await _versionCheckPromise;
|
|
433
|
+
// Telemetry (#1346): record the same live npm-registry comparison as a span
|
|
434
|
+
// attribute, before deploy() creates the root span, so getDeployAttributes
|
|
435
|
+
// picks up the resolved value rather than the "unknown" default.
|
|
436
|
+
setVersionFreshness(classifyVersionFreshness(VERSION, _versionInfo));
|
|
491
437
|
if (handlePreflightVersionCheck(_versionInfo) === "abort") process.exit(1);
|
|
492
438
|
|
|
493
439
|
// Frontloaded manifest preflight (paritytech/polkadot-app-deploy#125): when a
|
|
@@ -516,6 +462,7 @@ try {
|
|
|
516
462
|
const result = await deploy(buildDir, domain, {
|
|
517
463
|
mnemonic: effectiveMnemonic,
|
|
518
464
|
derivationPath: flags.derivationPath,
|
|
465
|
+
productName: flags.productName,
|
|
519
466
|
suri: flags.suri,
|
|
520
467
|
rpc: flags.rpc,
|
|
521
468
|
env: effectiveEnvId,
|
|
@@ -528,8 +475,6 @@ try {
|
|
|
528
475
|
allowLargeDeploy: flags.allowLargeDeploy,
|
|
529
476
|
reproducibleSource: flags.reproducibleSource,
|
|
530
477
|
dumpCar: flags.dumpCar,
|
|
531
|
-
publish: flags.publish,
|
|
532
|
-
failOnPublishError: flags.failOnPublishError,
|
|
533
478
|
transferToSignedInUser: !flags.noTransferToSignedinUser,
|
|
534
479
|
// Human-first phone signing hooks (spec: 2026-06-13-human-first-phone-signing-design).
|
|
535
480
|
onPhoneSignaturePlan: (steps) => {
|
|
@@ -549,42 +494,59 @@ try {
|
|
|
549
494
|
// `reason: "silence"` marks a watcher-silence re-arm (no response within
|
|
550
495
|
// the budget) as distinct from the pre-existing verifyEffect-false-negative
|
|
551
496
|
// re-sign case (undefined/"resign", still rendered off `attempt`).
|
|
552
|
-
confirmPhoneReady: ({ label, attempt, approvalBudgetMs, reason }) =>
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
497
|
+
confirmPhoneReady: ({ label, attempt, approvalBudgetMs, reason }) => {
|
|
498
|
+
// #1257: a non-interactive caller (CI, no TTY) can reach this gate — e.g.
|
|
499
|
+
// a stale login session left on the runner's $HOME resolves the signer to
|
|
500
|
+
// "phone required" even though nobody set out to run interactively. Fail
|
|
501
|
+
// fast with an actionable message BEFORE creating readline: readline's
|
|
502
|
+
// "close" fires immediately on a closed/non-TTY stdin, and the old
|
|
503
|
+
// unconditional rl.on("close", ...) below rejected with "aborted by
|
|
504
|
+
// user" for that case too — indistinguishable from a real Ctrl-C, and
|
|
505
|
+
// wrong (nobody aborted anything). Reuses isInteractive() (TTY + !CI)
|
|
506
|
+
// rather than adding a second interactivity check.
|
|
507
|
+
if (!isInteractive()) return Promise.reject(nonInteractivePhoneConfirmationError(label));
|
|
508
|
+
return new Promise((resolve, reject) => {
|
|
509
|
+
const budgetSeconds = Math.round(approvalBudgetMs / 1000);
|
|
510
|
+
if (reason === "silence") {
|
|
511
|
+
console.log(`\n still nothing from your phone — press Y to re-send, Ctrl-C to abort`);
|
|
512
|
+
} else if (attempt >= 2) {
|
|
513
|
+
console.log(`\n Re-sign needed (attempt ${attempt}) — approve on your phone, then press Y to continue (Ctrl-C to abort).`);
|
|
514
|
+
} else {
|
|
515
|
+
console.log(`\n Check your phone → ${label}`);
|
|
516
|
+
console.log(` Press Y when ready — you'll have ~${budgetSeconds}s to approve on your phone (Ctrl-C to abort):`);
|
|
517
|
+
}
|
|
518
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
519
|
+
let settled = false;
|
|
520
|
+
const settle = (fn) => { if (!settled) { settled = true; rl.close(); fn(); } };
|
|
521
|
+
rl.on("close", () => settle(reject.bind(null, new Error("aborted by user"))));
|
|
522
|
+
const ask = () => {
|
|
523
|
+
rl.question(" > ", (line) => {
|
|
524
|
+
const answer = line.trim().toLowerCase();
|
|
525
|
+
// #194: require an EXPLICIT y/yes — bare Enter is the input most
|
|
526
|
+
// likely to come from something other than a deliberate keypress
|
|
527
|
+
// (buffered newline, stray Enter, piped stdin), and accepting it
|
|
528
|
+
// starts a fatal clock with nobody watching.
|
|
529
|
+
if (answer === "y" || answer === "yes") {
|
|
530
|
+
settle(resolve);
|
|
531
|
+
} else {
|
|
532
|
+
ask();
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
ask();
|
|
537
|
+
});
|
|
538
|
+
},
|
|
582
539
|
});
|
|
583
540
|
|
|
584
541
|
const output = process.env.GITHUB_OUTPUT;
|
|
585
542
|
if (output) {
|
|
586
543
|
fs.appendFileSync(output, `cid=${result.cid}\n`);
|
|
587
544
|
fs.appendFileSync(output, `domain=${result.domainName}\n`);
|
|
545
|
+
// #1157: same env-aware URL as the "Check it out here" console line —
|
|
546
|
+
// lets the reusable workflow's PR-comment/summary step reuse this
|
|
547
|
+
// resolution instead of recomputing a gateway URL from its own
|
|
548
|
+
// hardcoded-dot.li default.
|
|
549
|
+
fs.appendFileSync(output, `browserUrl=${result.browserUrl}\n`);
|
|
588
550
|
}
|
|
589
551
|
|
|
590
552
|
console.log(`CID: ${result.cid}`);
|
package/dist/auth-config.js
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
getPeopleChainEndpoints,
|
|
10
10
|
hasPersistedSession,
|
|
11
11
|
resolveBulletinEndpoints
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QUKV6GUM.js";
|
|
13
13
|
import "./chunk-TSPERKUS.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-ESJC25OU.js";
|
|
15
15
|
import "./chunk-ZOC4GITL.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-EVRNPBNJ.js";
|
|
17
|
+
import "./chunk-LXTYOFFI.js";
|
|
18
18
|
export {
|
|
19
19
|
DOT_DAPP_ID,
|
|
20
20
|
DOT_DERIVATION_INDEX,
|
package/dist/bug-report.js
CHANGED
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
offerBugReport,
|
|
11
11
|
scrubSecrets,
|
|
12
12
|
setDeployContext
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-L3KGTKOD.js";
|
|
14
|
+
import "./chunk-QAPUBDTU.js";
|
|
15
|
+
import "./chunk-EVRNPBNJ.js";
|
|
16
|
+
import "./chunk-LXTYOFFI.js";
|
|
17
17
|
export {
|
|
18
18
|
buildCliFlagsSummary,
|
|
19
19
|
buildLabels,
|
package/dist/chain-health.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
DEFAULT_WINDOW_BLOCKS,
|
|
4
4
|
MAX_SPANS_PER_SAMPLER,
|
|
5
5
|
endpointHost
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-KXMHP4C2.js";
|
|
7
|
+
import "./chunk-EVRNPBNJ.js";
|
|
8
|
+
import "./chunk-LXTYOFFI.js";
|
|
9
9
|
export {
|
|
10
10
|
ChainHealthSampler,
|
|
11
11
|
DEFAULT_WINDOW_BLOCKS,
|
|
@@ -85,7 +85,7 @@ function accountsNeedingReauthorization(auths, currentBlock, bufferBlocks = BULL
|
|
|
85
85
|
return auths.filter((a) => !isAuthorizationSufficient(a, deadline));
|
|
86
86
|
}
|
|
87
87
|
function isAutoReauthorizeAllowed(env) {
|
|
88
|
-
return env?.network
|
|
88
|
+
return env?.network === "testnet" && env?.bulletinAutoAuthorize === true;
|
|
89
89
|
}
|
|
90
90
|
function selectAccount(authorizations, random = Math.random, pinnedIndex) {
|
|
91
91
|
if (pinnedIndex != null) {
|
|
@@ -126,8 +126,15 @@ function isTestnetSpecName(specName) {
|
|
|
126
126
|
if (/-test$|-testnet$|-dev$/.test(s)) return true;
|
|
127
127
|
return false;
|
|
128
128
|
}
|
|
129
|
+
function testnetFromNetworkField(network) {
|
|
130
|
+
if (network === "testnet") return true;
|
|
131
|
+
if (network != null && network !== "") return false;
|
|
132
|
+
return void 0;
|
|
133
|
+
}
|
|
129
134
|
var _testnetDetectionCache = null;
|
|
130
|
-
async function detectTestnet(api) {
|
|
135
|
+
async function detectTestnet(api, network) {
|
|
136
|
+
const override = testnetFromNetworkField(network);
|
|
137
|
+
if (override !== void 0) return override;
|
|
131
138
|
if (_testnetDetectionCache !== null) return _testnetDetectionCache;
|
|
132
139
|
try {
|
|
133
140
|
const version = await api.constants.System.Version();
|
|
@@ -177,7 +184,7 @@ async function ensureAuthorized(api, address, label, opts = {}) {
|
|
|
177
184
|
console.log(` Authorized: ${grant}`);
|
|
178
185
|
return;
|
|
179
186
|
}
|
|
180
|
-
const isTestnet = await detectTestnet(api);
|
|
187
|
+
const isTestnet = await detectTestnet(api, opts.network);
|
|
181
188
|
if (isTestnet) {
|
|
182
189
|
throw new Error(
|
|
183
190
|
`Bulletin storage account ${who} is not authorized (or its authorization expired). bulletin-deploy self-authorizes only on allow-listed testnets (environments.json bulletinAutoAuthorize) \u2014 request authorization for this account from the chain's authorizer (testnet faucet / personhood / pool bootstrap), then retry.`
|
|
@@ -293,7 +300,7 @@ ${details}`
|
|
|
293
300
|
console.log(`Using environment authorizer ${opts.envAuthorizer} (${authKey.address})
|
|
294
301
|
`);
|
|
295
302
|
} else {
|
|
296
|
-
const isTestnet = await detectTestnet(api);
|
|
303
|
+
const isTestnet = await detectTestnet(api, opts.network);
|
|
297
304
|
if (isTestnet) {
|
|
298
305
|
const alice = keyring.addFromUri("//Alice");
|
|
299
306
|
authorizerSigner = getPolkadotSigner(alice.publicKey, "Sr25519", (data) => alice.sign(data));
|
|
@@ -356,6 +363,7 @@ export {
|
|
|
356
363
|
selectAccount,
|
|
357
364
|
fetchPoolAuthorizations,
|
|
358
365
|
isTestnetSpecName,
|
|
366
|
+
testnetFromNetworkField,
|
|
359
367
|
detectTestnet,
|
|
360
368
|
_resetTestnetCacheForTests,
|
|
361
369
|
ensureAuthorized,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/personhood/ring-proof.ts
|
|
2
|
+
function makeOneShotBuildRingProof(oneShot, memberEntropy) {
|
|
3
|
+
return async ({ ringExponent, members, context, msg }) => {
|
|
4
|
+
const r = oneShot(ringExponent, memberEntropy, members, context, msg);
|
|
5
|
+
return { proof: r.proof, alias: r.alias };
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
makeOneShotBuildRingProof
|
|
11
|
+
};
|
|
@@ -172,8 +172,7 @@ var environments_default = {
|
|
|
172
172
|
POP_RULES: "0x2181a14081fF2D4477BAA8FB1aEB4C9c44F5F2b0",
|
|
173
173
|
STORE_FACTORY: "0xD81DC23FAa69B311C1FC553Ea63798772e7D253D",
|
|
174
174
|
LABEL_STORE_BEACON: "0xc7E86B8DE97AF57F937201d8d372F75ED4BE6633",
|
|
175
|
-
USER_STORE_BEACON: "0x5924A0dDBb550514A744407F4Ec4b4B7BB6CD736"
|
|
176
|
-
PUBLISHER: "0xaab42efbe8ea4d4228c3a11e973f94c17b9a0f2c"
|
|
175
|
+
USER_STORE_BEACON: "0x5924A0dDBb550514A744407F4Ec4b4B7BB6CD736"
|
|
177
176
|
}
|
|
178
177
|
},
|
|
179
178
|
{
|