bulletin-deploy 0.10.1-dev.0 → 0.11.0-rc.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 (40) hide show
  1. package/bin/bulletin-deploy +42 -10
  2. package/dist/auth-config.js +3 -3
  3. package/dist/bug-report.js +4 -4
  4. package/dist/{chunk-TE5ILRKP.js → chunk-4PLUBND7.js} +1 -1
  5. package/dist/{chunk-H73WL3JM.js → chunk-5SWXGBOO.js} +10 -5
  6. package/dist/{chunk-LDMBTCMO.js → chunk-7H6UYIDE.js} +14 -1
  7. package/dist/{chunk-UCRSE6CA.js → chunk-BJXJ7ZLD.js} +1 -1
  8. package/dist/{chunk-WWHAWJ6W.js → chunk-CW6GFAEF.js} +2 -2
  9. package/dist/{chunk-R74IZLP4.js → chunk-IMHVYM7Q.js} +1 -1
  10. package/dist/{chunk-Q5JW6NOW.js → chunk-TXJ6KQWM.js} +55 -10
  11. package/dist/{chunk-VHW7K7JW.js → chunk-U2JW2FSV.js} +6 -11
  12. package/dist/chunk-UWAZDGBT.js +78 -0
  13. package/dist/{chunk-XZXMZ2EN.js → chunk-VJNXVT3F.js} +122 -91
  14. package/dist/{chunk-Y3GVAWTH.js → chunk-XCK7YHBD.js} +1 -1
  15. package/dist/chunk-probe.js +3 -3
  16. package/dist/commands/login.js +22 -21
  17. package/dist/commands/logout.js +7 -7
  18. package/dist/commands/transfer.js +3 -3
  19. package/dist/commands/whoami.js +3 -3
  20. package/dist/deploy-actors.d.ts +84 -3
  21. package/dist/deploy-actors.js +12 -35
  22. package/dist/deploy.d.ts +30 -4
  23. package/dist/deploy.js +13 -9
  24. package/dist/dotns.d.ts +42 -2
  25. package/dist/dotns.js +3 -3
  26. package/dist/index.js +21 -17
  27. package/dist/manifest/publish.js +14 -10
  28. package/dist/memory-report.js +2 -2
  29. package/dist/merkle.js +13 -9
  30. package/dist/personhood/bootstrap.js +6 -6
  31. package/dist/personhood/people-client.js +3 -3
  32. package/dist/run-state.js +1 -1
  33. package/dist/sss-allowance-cache.js +4 -4
  34. package/dist/storage-signer.js +13 -9
  35. package/dist/suppress-localstorage-warning.d.ts +2 -0
  36. package/dist/suppress-localstorage-warning.js +7 -0
  37. package/dist/telemetry.d.ts +9 -1
  38. package/dist/telemetry.js +6 -2
  39. package/dist/version-check.js +3 -3
  40. package/package.json +6 -11
@@ -1,5 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // Must be the FIRST import: installs process.emitWarning suppressor before any
4
+ // SDK module-init code runs. In ESM, static imports are evaluated before inline
5
+ // code, so the suppressor must live in a separate module imported ahead of the
6
+ // SDK modules that trigger the "@parity/product-sdk-logger" localStorage warning.
7
+ import "../dist/suppress-localstorage-warning.js";
8
+
3
9
  import { deploy, DEFAULT_BULLETIN_RPC, DEFAULT_POOL_SIZE, NonRetryableError, EXIT_CODE_NO_RETRY, isConnectionError, isBenignTeardownError, unpublish } from "../dist/deploy.js";
4
10
  import { VERSION, setDeployAttribute, captureWarning, closeTelemetry, setRunStateActive, markRelaunchOomHintShown } from "../dist/telemetry.js";
5
11
  import { handleFailedDeploy, handlePreflightVersionCheck, fetchVersionInfo, preReleaseWarning, checkNodeVersion } from "../dist/version-check.js";
@@ -7,16 +13,7 @@ import { setDeployContext, installLogCapture, buildCliFlagsSummary } from "../di
7
13
  import { loadRunState, writeRunState, shouldSkipStaleWarning, shouldShowOomHint, probablyOomRssMb } from "../dist/run-state.js";
8
14
  import { loadEnvironments, listEnvironments, formatEnvironmentTable, DEFAULT_ENV_ID } from "../dist/environments.js";
9
15
  import * as fs from "fs";
10
-
11
- // Suppress "@parity/product-sdk-logger" localStorage warning in Node.js v22+.
12
- // The logger tries to read log-level config from localStorage which doesn't exist
13
- // in Node.js — it emits a NoSuchNativeMethod warning we cannot fix upstream.
14
- const _origEmitWarning = process.emitWarning.bind(process);
15
- process.emitWarning = (warning, ...rest) => {
16
- const msg = (typeof warning === "string" ? warning : warning?.message ?? String(warning)).toLowerCase();
17
- if (msg.includes("localstorage") || msg.includes("local storage")) return;
18
- _origEmitWarning(warning, ...rest);
19
- };
16
+ import * as readline from "readline";
20
17
 
21
18
  // Install early so anything printed during flag parsing / preflight is
22
19
  // available to the bug-report log tail.
@@ -477,6 +474,41 @@ try {
477
474
  publish: flags.publish,
478
475
  failOnPublishError: flags.failOnPublishError,
479
476
  transferToSignedInUser: !flags.noTransferToSignedinUser,
477
+ // Human-first phone signing hooks (spec: 2026-06-13-human-first-phone-signing-design).
478
+ onPhoneSignaturePlan: (steps) => {
479
+ if (steps.length === 1) {
480
+ console.log(`\nHave your phone ready — 1 signature needed (${steps[0].toLowerCase()})`);
481
+ } else if (steps.length > 1) {
482
+ const display = steps.flatMap((s, i) =>
483
+ s === "Register" && steps[i - 1] === "Commitment" ? ["(wait)", s] : [s]
484
+ );
485
+ console.log(`\nHave your phone ready — ${steps.length} signatures needed`);
486
+ console.log(` ${display.map(s => s.toLowerCase()).join(" · ")}`);
487
+ }
488
+ },
489
+ confirmPhoneReady: ({ label, attempt }) => new Promise((resolve, reject) => {
490
+ if (attempt >= 2) {
491
+ console.log(`\n Re-sign needed (attempt ${attempt}) — approve on your phone, then press Y to continue (Ctrl-C to abort).`);
492
+ } else {
493
+ console.log(`\n Check your phone → ${label}`);
494
+ console.log(` Press Y when ready (Ctrl-C to abort):`);
495
+ }
496
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
497
+ let settled = false;
498
+ const settle = (fn) => { if (!settled) { settled = true; rl.close(); fn(); } };
499
+ rl.on("close", () => settle(reject.bind(null, new Error("aborted by user"))));
500
+ const ask = () => {
501
+ rl.question(" > ", (line) => {
502
+ const answer = line.trim().toLowerCase();
503
+ if (answer === "y" || answer === "") {
504
+ settle(resolve);
505
+ } else {
506
+ ask();
507
+ }
508
+ });
509
+ };
510
+ ask();
511
+ }),
480
512
  });
481
513
 
482
514
  const output = process.env.GITHUB_OUTPUT;
@@ -9,10 +9,10 @@ import {
9
9
  getPeopleChainEndpoints,
10
10
  hasPersistedSession,
11
11
  resolveBulletinEndpoints
12
- } from "./chunk-TE5ILRKP.js";
12
+ } from "./chunk-4PLUBND7.js";
13
13
  import "./chunk-TSPERKUS.js";
14
- import "./chunk-LDMBTCMO.js";
15
- import "./chunk-VHW7K7JW.js";
14
+ import "./chunk-7H6UYIDE.js";
15
+ import "./chunk-U2JW2FSV.js";
16
16
  import "./chunk-QRKI6MMK.js";
17
17
  import "./chunk-ZOC4GITL.js";
18
18
  export {
@@ -9,10 +9,10 @@ import {
9
9
  offerBugReport,
10
10
  scrubSecrets,
11
11
  setDeployContext
12
- } from "./chunk-H73WL3JM.js";
13
- import "./chunk-UCRSE6CA.js";
14
- import "./chunk-LDMBTCMO.js";
15
- import "./chunk-VHW7K7JW.js";
12
+ } from "./chunk-5SWXGBOO.js";
13
+ import "./chunk-BJXJ7ZLD.js";
14
+ import "./chunk-7H6UYIDE.js";
15
+ import "./chunk-U2JW2FSV.js";
16
16
  export {
17
17
  buildCliFlagsSummary,
18
18
  buildLabels,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-TSPERKUS.js";
4
4
  import {
5
5
  VERSION
6
- } from "./chunk-LDMBTCMO.js";
6
+ } from "./chunk-7H6UYIDE.js";
7
7
  import {
8
8
  loadEnvironments
9
9
  } from "./chunk-QRKI6MMK.js";
@@ -2,15 +2,20 @@ import {
2
2
  classifyErrorArea,
3
3
  isInteractive,
4
4
  promptYesNo
5
- } from "./chunk-UCRSE6CA.js";
5
+ } from "./chunk-BJXJ7ZLD.js";
6
6
  import {
7
7
  VERSION,
8
- getCurrentSentryTraceId
9
- } from "./chunk-LDMBTCMO.js";
8
+ getCurrentSentryTraceId,
9
+ resolveIssueRepoSlug
10
+ } from "./chunk-7H6UYIDE.js";
11
+ import {
12
+ package_default
13
+ } from "./chunk-U2JW2FSV.js";
10
14
 
11
15
  // src/bug-report.ts
12
16
  import { execSync, execFileSync } from "child_process";
13
17
  import * as os from "os";
18
+ var ISSUE_REPO = resolveIssueRepoSlug(package_default.repository);
14
19
  var _deployContext = {};
15
20
  function setDeployContext(ctx) {
16
21
  _deployContext = { ..._deployContext, ...ctx };
@@ -148,7 +153,7 @@ function createGhIssue(title, body, labels) {
148
153
  "issue",
149
154
  "create",
150
155
  "--repo",
151
- "paritytech/bulletin-deploy",
156
+ ISSUE_REPO,
152
157
  "--title",
153
158
  title,
154
159
  ...labels.flatMap((l) => ["--label", l]),
@@ -179,7 +184,7 @@ async function offerBugReport(error) {
179
184
  const labels = buildLabels(error);
180
185
  if (!hasGhCli()) {
181
186
  console.error("\n gh CLI not found. Debug info below \u2014 paste into a new issue:\n");
182
- console.error(` https://github.com/paritytech/bulletin-deploy/issues/new
187
+ console.error(` https://github.com/${ISSUE_REPO}/issues/new
183
188
  `);
184
189
  printFallback(title, body, labels);
185
190
  return;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  package_default,
3
3
  writeRunState
4
- } from "./chunk-VHW7K7JW.js";
4
+ } from "./chunk-U2JW2FSV.js";
5
5
 
6
6
  // src/memory-report.ts
7
7
  import * as fs2 from "fs";
@@ -22,6 +22,17 @@ var PARITY_HOST_APPS = /* @__PURE__ */ new Set(["playground-cli"]);
22
22
  function extractRepoSlug(url) {
23
23
  return url.replace(/.*github\.com[:/]/, "").replace(/\.git$/, "");
24
24
  }
25
+ var FALLBACK_ISSUE_REPO = "paritytech/bulletin-deploy";
26
+ function resolveIssueRepoSlug(repository) {
27
+ try {
28
+ const raw = typeof repository === "string" ? repository : repository?.url;
29
+ if (!raw || typeof raw !== "string") return FALLBACK_ISSUE_REPO;
30
+ const slug = extractRepoSlug(raw.trim());
31
+ if (/^[^/\s]+\/[^/\s]+$/.test(slug)) return slug;
32
+ } catch {
33
+ }
34
+ return FALLBACK_ISSUE_REPO;
35
+ }
25
36
  function tryGitRemote() {
26
37
  try {
27
38
  return extractRepoSlug(execSync("git remote get-url origin", { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }).trim());
@@ -724,6 +735,8 @@ export {
724
735
  maybeWriteMemoryReport,
725
736
  sampleFromBytes,
726
737
  VERSION,
738
+ extractRepoSlug,
739
+ resolveIssueRepoSlug,
727
740
  isInternalContextFromSignals,
728
741
  isInternalContext,
729
742
  isTelemetryDisabled,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-LDMBTCMO.js";
3
+ } from "./chunk-7H6UYIDE.js";
4
4
 
5
5
  // src/version-check.ts
6
6
  import { execSync, execFileSync } from "child_process";
@@ -7,10 +7,10 @@ import {
7
7
  resolveDotnsConnectOptions,
8
8
  storeDirectory,
9
9
  storeFile
10
- } from "./chunk-XZXMZ2EN.js";
10
+ } from "./chunk-VJNXVT3F.js";
11
11
  import {
12
12
  DotNS
13
- } from "./chunk-Q5JW6NOW.js";
13
+ } from "./chunk-TXJ6KQWM.js";
14
14
  import {
15
15
  getPopSelfServeConfig,
16
16
  loadEnvironments,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  captureWarning
3
- } from "./chunk-LDMBTCMO.js";
3
+ } from "./chunk-7H6UYIDE.js";
4
4
 
5
5
  // src/chunk-probe.ts
6
6
  import { Twox128, Blake2128Concat, decAnyMetadata, unifyMetadata } from "@polkadot-api/substrate-bindings";
@@ -11,7 +11,7 @@ import {
11
11
  setDeploySentryTag,
12
12
  truncateAddress,
13
13
  withSpan
14
- } from "./chunk-LDMBTCMO.js";
14
+ } from "./chunk-7H6UYIDE.js";
15
15
  import {
16
16
  validateContractAddresses
17
17
  } from "./chunk-QRKI6MMK.js";
@@ -988,6 +988,11 @@ var DotNS = class {
988
988
  _popSelfServe = null;
989
989
  _registerStorageDeposit = MINIMUM_REGISTER_STORAGE_DEPOSIT;
990
990
  _onPhoneSigningRequired = void 0;
991
+ _confirmPhoneReady = void 0;
992
+ /** Total phone-signature count for this DotNS session (drives the `total` field passed to confirmPhoneReady). */
993
+ _phoneSignatureTotal = 0;
994
+ /** Running attempt counter per label for re-sign detection. Reset at connect/disconnect. */
995
+ _phoneSignatureAttempts = /* @__PURE__ */ new Map();
991
996
  // Test-only seam: consumed once by classifyAliasAccountState() then cleared.
992
997
  // Mirrors the __setDeployRootSpanForTest / __setSentryForTest pattern.
993
998
  _classifyOverrideForTest = null;
@@ -1038,6 +1043,9 @@ var DotNS = class {
1038
1043
  if (options.onPhoneSigningRequired !== void 0) {
1039
1044
  this._onPhoneSigningRequired = options.onPhoneSigningRequired;
1040
1045
  }
1046
+ if (options.confirmPhoneReady !== void 0) {
1047
+ this._confirmPhoneReady = options.confirmPhoneReady;
1048
+ }
1041
1049
  const rpc = options.rpc || process.env.DOTNS_RPC || this.assetHubEndpoints[0];
1042
1050
  this.rpc = rpc;
1043
1051
  this._usesExternalSigner = Boolean(options.signer && options.signerAddress);
@@ -1458,11 +1466,14 @@ var DotNS = class {
1458
1466
  return decodeFunctionResult({ abi: contractAbi, functionName, data: rawData });
1459
1467
  }
1460
1468
  async contractTransaction(contractAddress, value, contractAbi, functionName, args = [], statusCallback = () => {
1461
- }, { useNoncePolling, verifyEffect, feeAsset } = {}) {
1469
+ }, { useNoncePolling, verifyEffect, feeAsset, phoneLabel } = {}) {
1462
1470
  this.ensureConnected();
1463
1471
  if (!this.clientWrapper) throw new Error("contractTransaction: polkadot-api client not available");
1464
1472
  const encodedCallData = encodeFunctionData({ abi: contractAbi, functionName, args });
1465
1473
  const rpcs = this.rpc ? [this.rpc, ...this.assetHubEndpoints.filter((ep) => ep !== this.rpc)] : this.assetHubEndpoints;
1474
+ if (phoneLabel !== void 0) {
1475
+ await this._awaitPhoneReady(phoneLabel);
1476
+ }
1466
1477
  return await withTimeout(
1467
1478
  this.clientWrapper.submitTransaction(contractAddress, value, encodedCallData, this.substrateAddress, this.signer, statusCallback, { rpcs, useNoncePolling, functionName, args, contracts: this._contracts, verifyEffect, feeAsset }),
1468
1479
  OPERATION_TIMEOUT_MS,
@@ -1735,8 +1746,7 @@ var DotNS = class {
1735
1746
  };
1736
1747
  console.log(`
1737
1748
  Linking content...`);
1738
- this._onPhoneSigningRequired?.("Link content");
1739
- const txRes = await this.contractTransaction(this._contracts.DOTNS_CONTENT_RESOLVER, 0n, DOTNS_CONTENT_RESOLVER_ABI, "setContenthash", [node, contenthashHex], (s) => console.log(` ${s}`), { useNoncePolling: true, verifyEffect, feeAsset: opts.feeAsset });
1749
+ const txRes = await this.contractTransaction(this._contracts.DOTNS_CONTENT_RESOLVER, 0n, DOTNS_CONTENT_RESOLVER_ABI, "setContenthash", [node, contenthashHex], (s) => console.log(` ${s}`), { useNoncePolling: true, verifyEffect, feeAsset: opts.feeAsset, phoneLabel: "Link content" });
1740
1750
  const finalOnChain = (await this.getContenthash(domainName) || "0x").toLowerCase();
1741
1751
  if (finalOnChain !== expected) {
1742
1752
  throw new Error(
@@ -1963,8 +1973,7 @@ var DotNS = class {
1963
1973
  }
1964
1974
  };
1965
1975
  try {
1966
- this._onPhoneSigningRequired?.("Publish to registry");
1967
- const txRes = await this.contractTransaction(publisher, 0n, PUBLISHER_ABI, "publish", [label], (s) => console.log(` ${s}`), { useNoncePolling: true, verifyEffect });
1976
+ const txRes = await this.contractTransaction(publisher, 0n, PUBLISHER_ABI, "publish", [label], (s) => console.log(` ${s}`), { useNoncePolling: true, verifyEffect, phoneLabel: "Publish to registry" });
1968
1977
  const finalPublished = await withTimeout(
1969
1978
  this.contractCall(publisher, PUBLISHER_ABI, "isPublished", [labelhash]),
1970
1979
  3e4,
@@ -2108,8 +2117,7 @@ var DotNS = class {
2108
2117
  this.ensureConnected();
2109
2118
  console.log(`
2110
2119
  Submitting commitment...`);
2111
- this._onPhoneSigningRequired?.("Commitment");
2112
- const commitTxRes = await this.contractTransaction(this._contracts.DOTNS_REGISTRAR_CONTROLLER, 0n, DOTNS_REGISTRAR_CONTROLLER_ABI, "commit", [commitment], (s) => console.log(` ${s}`));
2120
+ const commitTxRes = await this.contractTransaction(this._contracts.DOTNS_REGISTRAR_CONTROLLER, 0n, DOTNS_REGISTRAR_CONTROLLER_ABI, "commit", [commitment], (s) => console.log(` ${s}`), { phoneLabel: "Commitment" });
2113
2121
  logTxResolution(commitTxRes);
2114
2122
  console.log(` Committed at: ${(/* @__PURE__ */ new Date()).toISOString()}`);
2115
2123
  }
@@ -2202,8 +2210,7 @@ var DotNS = class {
2202
2210
  setDeployAttribute("deploy.payment_wei", priceWei.toString());
2203
2211
  console.log(` Oracle price: ${formatEther(priceWei)} PAS`);
2204
2212
  console.log(` Paying: ${formatEther(bufferedPaymentWei)} PAS`);
2205
- this._onPhoneSigningRequired?.("Register");
2206
- const registerTxRes = await this.contractTransaction(this._contracts.DOTNS_REGISTRAR_CONTROLLER, bufferedPaymentNative, DOTNS_REGISTRAR_CONTROLLER_ABI, "register", [registration], (s) => console.log(` ${s}`));
2213
+ const registerTxRes = await this.contractTransaction(this._contracts.DOTNS_REGISTRAR_CONTROLLER, bufferedPaymentNative, DOTNS_REGISTRAR_CONTROLLER_ABI, "register", [registration], (s) => console.log(` ${s}`), { phoneLabel: "Register" });
2207
2214
  logTxResolution(registerTxRes);
2208
2215
  if (registerTxRes.kind === TX_KIND_HASH) {
2209
2216
  setDeployAttribute("deploy.register.tx", registerTxRes.hash);
@@ -2651,6 +2658,41 @@ var DotNS = class {
2651
2658
  const envId = this._environmentId ?? "paseo-next-v2";
2652
2659
  return runBootstrap({ mnemonic, environmentId: envId });
2653
2660
  }
2661
+ /**
2662
+ * Set the expected total number of phone signatures for this DotNS session.
2663
+ * Called from deploy() at preflight after computePhoneSigningSteps so that
2664
+ * confirmPhoneReady receives the correct `total`.
2665
+ */
2666
+ setPhoneSignatureTotal(total) {
2667
+ this._phoneSignatureTotal = total;
2668
+ }
2669
+ /**
2670
+ * Internal: await the human-ready gate then fire the "check your phone"
2671
+ * notification. Must be called OUTSIDE any withTimeout — the human wait is
2672
+ * unbounded and must never be inside the machine timeout.
2673
+ *
2674
+ * Behaviour:
2675
+ * - confirmPhoneReady provided → await it (counts re-signs via attempt map).
2676
+ * - not provided + non-TTY → fail fast (NonRetryableError).
2677
+ * - not provided + TTY → no-op (bin must have supplied the hook; if it did
2678
+ * not, the caller proceeds without a gate — backward-compat for library
2679
+ * consumers that supply neither hook nor TTY check).
2680
+ * After the gate resolves, fires onPhoneSigningRequired (the "check your
2681
+ * phone" notification) so the user knows the request is now being sent.
2682
+ */
2683
+ async _awaitPhoneReady(label) {
2684
+ if (!this._usesExternalSigner) return;
2685
+ const attempt = (this._phoneSignatureAttempts.get(label) ?? 0) + 1;
2686
+ this._phoneSignatureAttempts.set(label, attempt);
2687
+ if (this._confirmPhoneReady) {
2688
+ await this._confirmPhoneReady({ label, attempt, total: this._phoneSignatureTotal });
2689
+ } else if (!(process.stdout.isTTY && process.stdin.isTTY)) {
2690
+ throw new NonRetryableError(
2691
+ "phone signer active but no confirmPhoneReady hook provided and not running in a TTY \u2014 re-run interactively or provide the confirmPhoneReady option"
2692
+ );
2693
+ }
2694
+ this._onPhoneSigningRequired?.(label);
2695
+ }
2654
2696
  disconnect() {
2655
2697
  if (this.client) {
2656
2698
  this.client.destroy();
@@ -2660,6 +2702,9 @@ var DotNS = class {
2660
2702
  }
2661
2703
  this._usesExternalSigner = false;
2662
2704
  this._onPhoneSigningRequired = void 0;
2705
+ this._confirmPhoneReady = void 0;
2706
+ this._phoneSignatureTotal = 0;
2707
+ this._phoneSignatureAttempts.clear();
2663
2708
  }
2664
2709
  };
2665
2710
  var dotns = new DotNS();
@@ -6,7 +6,7 @@ import * as path from "path";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "bulletin-deploy",
9
- version: "0.10.1-dev.0",
9
+ version: "0.11.0-rc.1",
10
10
  private: false,
11
11
  repository: {
12
12
  type: "git",
@@ -51,7 +51,7 @@ var package_default = {
51
51
  "tools/release-retry-wrapper.mjs"
52
52
  ],
53
53
  scripts: {
54
- build: "tsup src/index.ts src/deploy.ts src/dotns.ts src/pool.ts src/telemetry.ts src/memory-report.ts src/merkle.ts src/gh-pages-mirror.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/proof-validity.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/personhood/chain-prereqs.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/config-load.ts src/manifest/publish.ts src/auth/index.ts src/auth/vendor/index.ts src/auth/vendor/ui/index.ts src/auth-config.ts src/commands/login.ts src/commands/logout.ts src/commands/whoami.ts src/commands/transfer.ts src/storage-signer.ts src/spinner.ts src/sss-allowance.ts src/sss-allowance-cache.ts src/deploy-actors.ts --format esm --dts --clean --target node22",
54
+ build: "tsup src/suppress-localstorage-warning.ts src/index.ts src/deploy.ts src/dotns.ts src/pool.ts src/telemetry.ts src/memory-report.ts src/merkle.ts src/gh-pages-mirror.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/manifest.ts src/chunk-probe.ts src/manifest-embed.ts src/manifest-fetch.ts src/manifest-roundtrip.ts src/incremental-stats.ts src/chunker.ts src/personhood/encoding.ts src/personhood/hashing.ts src/personhood/constants.ts src/personhood/member-key.ts src/personhood/people-client.ts src/personhood/proof-validity.ts src/personhood/reprove.ts src/personhood/bind-personal-id.ts src/personhood/claim-pgas.ts src/personhood/bind-paid-alias.ts src/personhood/bootstrap.ts src/personhood/chain-prereqs.ts src/manifest/types.ts src/manifest/schema.ts src/manifest/byte-budget.ts src/manifest/config-load.ts src/manifest/publish.ts src/auth/index.ts src/auth/vendor/index.ts src/auth/vendor/ui/index.ts src/auth-config.ts src/commands/login.ts src/commands/logout.ts src/commands/whoami.ts src/commands/transfer.ts src/storage-signer.ts src/spinner.ts src/sss-allowance.ts src/sss-allowance-cache.ts src/deploy-actors.ts --format esm --dts --clean --target node22",
55
55
  "refresh-environments": "node scripts/refresh-environments.mjs",
56
56
  postinstall: "patch-package || true",
57
57
  prepare: "npm run build",
@@ -68,9 +68,9 @@ var package_default = {
68
68
  "@ipld/dag-pb": "^4.1.3",
69
69
  "@noble/hashes": "^1.7.2",
70
70
  "@parity/product-sdk-address": "^0.1.1",
71
- "@parity/product-sdk-keys": "^0.3.0",
72
- "@parity/product-sdk-terminal": "^0.4.0",
73
- "@parity/product-sdk-tx": "^0.2.4",
71
+ "@parity/product-sdk-keys": "^0.3.8",
72
+ "@parity/product-sdk-terminal": "^0.5.1",
73
+ "@parity/product-sdk-tx": "^0.2.12",
74
74
  "@polkadot-api/metadata-builders": "^0.14.2",
75
75
  "@polkadot-api/substrate-bindings": "^0.20.2",
76
76
  "@polkadot-labs/hdkd": "^0.0.28",
@@ -96,12 +96,7 @@ var package_default = {
96
96
  vitest: "^4.1.0"
97
97
  },
98
98
  overrides: {
99
- "@polkadot-api/json-rpc-provider": "^0.2.0",
100
- "@novasamatech/host-api": "0.8.6",
101
- "@novasamatech/host-papp": "0.8.6",
102
- "@novasamatech/scale": "0.8.6",
103
- "@novasamatech/statement-store": "0.8.6",
104
- "@novasamatech/storage-adapter": "0.8.6"
99
+ "@polkadot-api/json-rpc-provider": "^0.2.0"
105
100
  },
106
101
  minimumVersion: "0.5.6",
107
102
  engines: {
@@ -0,0 +1,78 @@
1
+ import {
2
+ BULLETIN_RESOURCE,
3
+ resolveSigner
4
+ } from "./chunk-5FLTDWWP.js";
5
+ import {
6
+ DOT_PRODUCT_ID
7
+ } from "./chunk-4PLUBND7.js";
8
+ import {
9
+ DEFAULT_MNEMONIC
10
+ } from "./chunk-TXJ6KQWM.js";
11
+
12
+ // src/deploy-actors.ts
13
+ var DEFAULT_WORKER_SURI = DEFAULT_MNEMONIC;
14
+ var MainnetDefaultWorkerError = class extends Error {
15
+ constructor() {
16
+ super(
17
+ "Refusing to default the deploy worker to Alice on a non-testnet environment. Pass --mnemonic <a funded, sufficiently-verified key> to do the transfer flow, or --no-transfer-to-signedin-user to sign directly with your mobile session."
18
+ );
19
+ this.name = "MainnetDefaultWorkerError";
20
+ }
21
+ };
22
+ async function resolveDeployActors(authClient, { suri, transferEnabled, isTestnet, sessionPresent }) {
23
+ if (sessionPresent && transferEnabled) {
24
+ if (!suri && !isTestnet) throw new MainnetDefaultWorkerError();
25
+ const worker2 = await resolveSigner(authClient, { suri: suri ?? DEFAULT_WORKER_SURI });
26
+ const handle = await authClient.getSessionSigner();
27
+ if (!handle) throw new Error("transfer mode active but no session resolved; pass --no-transfer-to-signedin-user.");
28
+ try {
29
+ return { worker: worker2, recipientH160: handle.addresses.productH160 };
30
+ } finally {
31
+ handle.destroy();
32
+ }
33
+ }
34
+ const worker = await resolveSigner(authClient, { suri });
35
+ return { worker };
36
+ }
37
+ async function resolveStorageSigner(session, deps) {
38
+ if (!session?.userSession || !session?.adapter) return null;
39
+ const { userSession, adapter } = session;
40
+ try {
41
+ const signerResult = await deps.getBulletinSigner(userSession.id, DOT_PRODUCT_ID, adapter);
42
+ if (signerResult.isOk() && signerResult.value) {
43
+ const signer = signerResult.value;
44
+ const slotAddress = deps.ss58Encode(signer.publicKey);
45
+ return { signer, slotAddress, owned: true };
46
+ }
47
+ const reason = signerResult.error?.reason;
48
+ if (reason === "NoSession") {
49
+ return null;
50
+ }
51
+ deps.promptBeforeAllocation();
52
+ const outcomes = await deps.requestResourceAllocation(
53
+ userSession,
54
+ adapter,
55
+ [BULLETIN_RESOURCE]
56
+ );
57
+ const outcome = outcomes[0];
58
+ if (!outcome || outcome.tag !== "Allocated") {
59
+ return null;
60
+ }
61
+ if (deps.createSlotAccountSigner) {
62
+ const slotSigner = await deps.createSlotAccountSigner(adapter, BULLETIN_RESOURCE);
63
+ if (slotSigner) {
64
+ const slotAddress = deps.ss58Encode(slotSigner.publicKey);
65
+ return { signer: slotSigner, slotAddress, owned: true };
66
+ }
67
+ }
68
+ return null;
69
+ } catch {
70
+ return null;
71
+ }
72
+ }
73
+
74
+ export {
75
+ MainnetDefaultWorkerError,
76
+ resolveDeployActors,
77
+ resolveStorageSigner
78
+ };