bulletin-deploy 0.18.4 → 0.19.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 (57) hide show
  1. package/README.md +1 -1
  2. package/dist/auth-config.js +4 -4
  3. package/dist/bug-report.js +4 -4
  4. package/dist/chain-health.js +3 -3
  5. package/dist/{chunk-K23BCUAG.js → chunk-6H3GBTBA.js} +21 -16
  6. package/dist/{chunk-GZ4O5DIU.js → chunk-A7MFUE2N.js} +1 -1
  7. package/dist/chunk-DMNLTQGA.js +64 -0
  8. package/dist/{chunk-WCGCM45C.js → chunk-G2Z4U4OQ.js} +11 -44
  9. package/dist/{chunk-TTUXQMD3.js → chunk-G664B5Y4.js} +1 -1
  10. package/dist/{chunk-CVQ7DJHG.js → chunk-I5PNPQZO.js} +64 -3
  11. package/dist/{chunk-5HFXRNCQ.js → chunk-IQUS43B7.js} +1 -1
  12. package/dist/{chunk-4NIOCONP.js → chunk-J6N3W3KJ.js} +1 -1
  13. package/dist/{chunk-STXAFUTQ.js → chunk-JZTZWMP7.js} +4 -1
  14. package/dist/{chunk-7I3MTGOR.js → chunk-K5SP4OUC.js} +19 -1
  15. package/dist/{chunk-MJCXPKBL.js → chunk-K6OAMQQU.js} +62 -14
  16. package/dist/{chunk-JGIPHFBT.js → chunk-KXQVZWDW.js} +2 -2
  17. package/dist/{chunk-WEVSXHII.js → chunk-NKDGBZBP.js} +1 -1
  18. package/dist/{chunk-HDGD5FYX.js → chunk-NYNAUG4V.js} +13 -4
  19. package/dist/{chunk-A55GRHCX.js → chunk-R7HIFZDM.js} +3 -3
  20. package/dist/{chunk-E7PNP2NP.js → chunk-RBI2B5SW.js} +3 -3
  21. package/dist/{chunk-5MS64TTR.js → chunk-SVVPNIGN.js} +2 -2
  22. package/dist/{chunk-RXV677CJ.js → chunk-YTRNJMI4.js} +7 -36
  23. package/dist/chunk-probe.js +3 -3
  24. package/dist/commands/login.js +13 -13
  25. package/dist/commands/logout.js +5 -5
  26. package/dist/commands/transfer.js +6 -6
  27. package/dist/commands/whoami.js +4 -4
  28. package/dist/deploy-actors.js +8 -8
  29. package/dist/deploy.d.ts +1 -1
  30. package/dist/deploy.js +13 -13
  31. package/dist/dotns-protocol.d.ts +32 -1
  32. package/dist/dotns-protocol.js +5 -1
  33. package/dist/dotns.d.ts +12 -3
  34. package/dist/dotns.js +8 -6
  35. package/dist/environments.d.ts +5 -2
  36. package/dist/environments.js +3 -1
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.js +21 -20
  39. package/dist/manifest/byte-budget.js +2 -1
  40. package/dist/manifest/compose.d.ts +20 -0
  41. package/dist/manifest/compose.js +8 -0
  42. package/dist/manifest/config-load.js +2 -2
  43. package/dist/manifest/publish.js +18 -17
  44. package/dist/manifest/schema.js +1 -1
  45. package/dist/manifest/types.d.ts +29 -1
  46. package/dist/memory-report.js +2 -2
  47. package/dist/merkle.js +13 -13
  48. package/dist/personhood/bootstrap.js +7 -7
  49. package/dist/personhood/people-client.js +6 -6
  50. package/dist/run-state.js +1 -1
  51. package/dist/sss-allowance-cache.js +5 -5
  52. package/dist/storage-signer.js +13 -13
  53. package/dist/telemetry.d.ts +1 -1
  54. package/dist/telemetry.js +2 -2
  55. package/dist/version-check.js +3 -3
  56. package/docs/product-manifest.md +76 -0
  57. package/package.json +3 -3
@@ -7,13 +7,13 @@ import {
7
7
  } from "./chunk-AYAVRPAP.js";
8
8
  import {
9
9
  validateContractAddresses
10
- } from "./chunk-HDGD5FYX.js";
10
+ } from "./chunk-NYNAUG4V.js";
11
11
  import {
12
12
  NonRetryableError
13
13
  } from "./chunk-ZOC4GITL.js";
14
14
  import {
15
15
  ChainHealthSampler
16
- } from "./chunk-5HFXRNCQ.js";
16
+ } from "./chunk-IQUS43B7.js";
17
17
  import {
18
18
  captureWarning,
19
19
  markCodePath,
@@ -21,14 +21,16 @@ import {
21
21
  setDeploySentryTag,
22
22
  truncateAddress,
23
23
  withSpan
24
- } from "./chunk-STXAFUTQ.js";
24
+ } from "./chunk-JZTZWMP7.js";
25
25
  import {
26
+ HIGHEST_VERIFIED_DOTNS_RELEASE,
26
27
  POP_CONTROLLER_PROBE_ABI,
27
28
  PROTOCOL_PROBE_LABEL,
29
+ classifyDeclaredProtocolVersion,
28
30
  classifyProtocolVersion,
29
31
  getAdapter,
30
32
  withTenPercentBuffer
31
- } from "./chunk-7I3MTGOR.js";
33
+ } from "./chunk-K5SP4OUC.js";
32
34
 
33
35
  // src/dotns.ts
34
36
  import crypto from "crypto";
@@ -370,7 +372,8 @@ var DOTNS_REGISTRAR_ABI = [
370
372
  ];
371
373
  var DOTNS_REGISTRAR_TRANSFER_ABI = [
372
374
  ...DOTNS_REGISTRAR_ABI,
373
- { inputs: [{ name: "from", type: "address" }, { name: "to", type: "address" }, { name: "tokenId", type: "uint256" }], name: "transferFrom", outputs: [], stateMutability: "payable", type: "function" }
375
+ { inputs: [{ name: "from", type: "address" }, { name: "to", type: "address" }, { name: "tokenId", type: "uint256" }], name: "transferFrom", outputs: [], stateMutability: "payable", type: "function" },
376
+ { inputs: [{ name: "tokenId", type: "uint256" }], name: "isSoulbound", outputs: [{ name: "", type: "bool" }], stateMutability: "view", type: "function" }
374
377
  ];
375
378
  var POP_RULES_ABI = [
376
379
  { inputs: [{ name: "name", type: "string" }], name: "classifyName", outputs: [{ name: "requirement", type: "uint8" }, { name: "message", type: "string" }], stateMutability: "pure", type: "function" },
@@ -437,7 +440,9 @@ var DOTNS_CONTENT_RESOLVER_ABI = [
437
440
  ];
438
441
  var DOTNS_PROTOCOL_REGISTRY_ABI = [
439
442
  { inputs: [], name: "tld", outputs: [{ name: "", type: "string" }], stateMutability: "view", type: "function" },
440
- { inputs: [], name: "tldNode", outputs: [{ name: "", type: "bytes32" }], stateMutability: "view", type: "function" }
443
+ { inputs: [], name: "tldNode", outputs: [{ name: "", type: "bytes32" }], stateMutability: "view", type: "function" },
444
+ // v0.8.0 and up; reverts below it, empty until a release is declared.
445
+ { inputs: [], name: "protocolVersion", outputs: [{ name: "", type: "string" }], stateMutability: "view", type: "function" }
441
446
  ];
442
447
  var DOTNS_TEXT_RESOLVER_ABI = [
443
448
  { inputs: [{ name: "node", type: "bytes32" }, { name: "key", type: "string" }, { name: "value", type: "string" }], name: "setText", outputs: [], stateMutability: "nonpayable", type: "function" },
@@ -822,6 +827,9 @@ function isShortNameBand(baseLength) {
822
827
  function shortNamesClosedReason(label, baseLength, tld, environmentId) {
823
828
  return `${label}.${tld} has a ${baseLength}-character base and short names are not on sale on ${environmentId ?? "this environment"}. PopRules.shortNamesEnabled is off, which closes the 6 to 8 character band to every signer, whatever their personhood status. Use a base of 9 characters or more, for example ${exampleNoStatusLabel(label, tld)}.`;
824
829
  }
830
+ function soulboundTransferReason(label, tld) {
831
+ return `${label}.${tld} is soulbound and cannot be transferred. It was issued through the PoP gateway, which binds a name to the account that received it. Nothing clears the flag, so no account can move this name at any point in the future.`;
832
+ }
825
833
  function parseDomainName(input, tld = DEFAULT_TLD) {
826
834
  const configuredSuffix = `.${tld}`;
827
835
  let name;
@@ -1324,6 +1332,7 @@ var DotNS = class _DotNS {
1324
1332
  _isPhoneSigner = false;
1325
1333
  _localMnemonic = null;
1326
1334
  _contracts = CONTRACTS;
1335
+ _contractSources = {};
1327
1336
  _nativeToEthRatio = NATIVE_TO_ETH_RATIO;
1328
1337
  _environmentId = null;
1329
1338
  // #1095: the resolved env's declared `network`, when connect() was given
@@ -1509,9 +1518,10 @@ var DotNS = class _DotNS {
1509
1518
  this.assetHubEndpoints = options.assetHubEndpoints;
1510
1519
  }
1511
1520
  if (options.contracts && Object.keys(options.contracts).length > 0) {
1512
- validateContractAddresses(options.contracts, options.environmentId ?? "unknown");
1521
+ validateContractAddresses(options.contracts, options.environmentId ?? "unknown", options.contractSources);
1513
1522
  this._contracts = { ...CONTRACTS, ...options.contracts };
1514
1523
  }
1524
+ this._contractSources = options.contractSources ?? {};
1515
1525
  if (options.environmentId) {
1516
1526
  this._environmentId = options.environmentId;
1517
1527
  }
@@ -1901,7 +1911,8 @@ var DotNS = class _DotNS {
1901
1911
  });
1902
1912
  }
1903
1913
  /**
1904
- * Low-level dry-run read against DotnsProtocolRegistry (tld() / tldNode()).
1914
+ * Low-level dry-run read against DotnsProtocolRegistry (tld() / tldNode() /
1915
+ * protocolVersion()).
1905
1916
  * Deliberately does NOT reuse contractCall/contractCallNullable: both of
1906
1917
  * those throw on a revert or on empty data, which would make "contract
1907
1918
  * doesn't support this function yet" indistinguishable from "the RPC call
@@ -2000,25 +2011,43 @@ var DotNS = class _DotNS {
2000
2011
  const popRulesAddress = this._contracts.POP_RULES;
2001
2012
  const popControllerAddress = this._contracts.DOTNS_POP_CONTROLLER;
2002
2013
  const env = this._environmentId ?? "unknown";
2003
- const [hasCodeResult, pricingVersionOk, startingPriceOk, isPopIssuedOk] = await Promise.all([
2014
+ const [hasCodeResult, pricingVersionOk, startingPriceOk, isPopIssuedOk, declaredResult] = await Promise.all([
2004
2015
  this.clientWrapper.hasContractCode(popRulesAddress),
2005
2016
  this.probeViewFunctionOk(popRulesAddress, getAdapter("v0.5.8-rc1").popRulesAbi, "pricingVersion", []),
2006
2017
  this.probeViewFunctionOk(popRulesAddress, getAdapter("poprules-startingPrice").popRulesAbi, "startingPrice", []),
2007
- popControllerAddress ? this.probeViewFunctionOk(popControllerAddress, POP_CONTROLLER_PROBE_ABI, "isPopIssued", [PROTOCOL_PROBE_LABEL]) : Promise.resolve(null)
2018
+ popControllerAddress ? this.probeViewFunctionOk(popControllerAddress, POP_CONTROLLER_PROBE_ABI, "isPopIssued", [PROTOCOL_PROBE_LABEL]) : Promise.resolve(null),
2019
+ // Informational, so an RPC failure must not fail a connect the probes
2020
+ // can classify. Caught here, not in dryRunRegistryString, which
2021
+ // propagates on purpose for tld() — swallowing there picks a wrong TLD.
2022
+ this.dryRunRegistryString("protocolVersion").catch(() => ({ ok: false }))
2008
2023
  ]);
2009
2024
  const classification = classifyProtocolVersion({ hasCode: hasCodeResult, pricingVersionOk, startingPriceOk, isPopIssuedOk });
2010
2025
  if (classification.profile === null) {
2011
- throw new Error(`${env} (${dotnsContractName(popRulesAddress, this._contracts)} ${popRulesAddress}): ${classification.reason}`);
2026
+ throw new Error(`${env} (${dotnsContractName(popRulesAddress, this._contracts)} ${popRulesAddress}): ${classification.reason}${hasCodeResult === true ? "" : this.contractSourceHint("POP_RULES")}`);
2012
2027
  }
2013
2028
  const profile = classification.profile;
2029
+ const declared = classifyDeclaredProtocolVersion(declaredResult.ok ? declaredResult.value : null);
2014
2030
  this._protocolVersion = profile;
2015
2031
  this._adapter = getAdapter(profile);
2016
2032
  setDeployAttribute("deploy.dotns.protocol_version", profile);
2017
- console.log(` DotNS ABI profile ${profile} detected on ${env}`);
2033
+ setDeployAttribute("deploy.dotns.declared_release", declaredResult.ok ? declaredResult.value || "undeclared" : "unavailable");
2034
+ console.log(` DotNS ABI profile ${profile} detected on ${env}${declared ? ` (declares DotNS ${declared.raw})` : ""}`);
2035
+ if (declared && declared.profile !== profile) {
2036
+ console.log(` NOTE: ${env} declares DotNS ${declared.raw}, which is the ${declared.profile} profile, but the probes detect ${profile}. Using ${profile}: the probes read the ABI that is actually deployed.`);
2037
+ }
2038
+ if (declared?.aboveVerifiedCeiling) {
2039
+ console.log(` WARNING: ${env} declares DotNS ${declared.raw}, newer than ${HIGHEST_VERIFIED_DOTNS_RELEASE} \u2014 the newest release whose ABI has been checked against this client. Continuing on the ${profile} profile, which is correct only if that release changed nothing bulletin-deploy calls. Re-run the upstream ABI diff.`);
2040
+ }
2018
2041
  if (profile === "v0.5.8-rc1" && pricingVersionOk && isPopIssuedOk === null) {
2019
2042
  console.log(` NOTE: could not confirm whether ${env} is v0.5.8-rc1 or v0.6.0 \u2014 DOTNS_POP_CONTROLLER has no configured address here, so the isPopIssued discriminator probe was never attempted. Defaulting to v0.5.8-rc1 label semantics (registration itself is unaffected: both profiles share an identical ABI/adapter).`);
2020
2043
  }
2021
2044
  }
2045
+ // Ends an address error with where that address came from. A key with no
2046
+ // recorded source fell through to the defaults compiled into this module.
2047
+ contractSourceHint(name) {
2048
+ const src = this._contractSources[name];
2049
+ return src ? ` This address came from ${src}.` : ` No environment or --contract supplied ${name}, so this is the built-in default address.`;
2050
+ }
2022
2051
  async contractCall(contractAddress, contractAbi, functionName, args = []) {
2023
2052
  this.ensureConnected();
2024
2053
  if (!this.clientWrapper) throw new Error("contractCall: polkadot-api client not available");
@@ -2050,12 +2079,12 @@ var DotNS = class _DotNS {
2050
2079
  const env = this._environmentId ?? "(unset)";
2051
2080
  if (hasCode === false) {
2052
2081
  throw new Error(
2053
- `No contract deployed at ${contractAddress} (${name}) env=${env} \u2014 the dry-run call to ${functionName} returned empty success data, which on pallet-revive means the target address has no contract code. Check environments.json / --contract config for this network.`
2082
+ `No contract deployed at ${contractAddress} (${name}) env=${env} \u2014 the dry-run call to ${functionName} returned empty success data, which on pallet-revive means the target address has no contract code.${this.contractSourceHint(name)}`
2054
2083
  );
2055
2084
  }
2056
2085
  if (hasCode === null) {
2057
2086
  throw new Error(
2058
- `Contract call returned empty data \u2014 contract=${name} (${contractAddress}) env=${env} functionName=${functionName}. Could not verify whether contract code exists at this address (runtime code-presence query failed); investigate the contract/ABI or the configured address.`
2087
+ `Contract call returned empty data \u2014 contract=${name} (${contractAddress}) env=${env} functionName=${functionName}. Could not verify whether contract code exists at this address (runtime code-presence query failed); investigate the contract/ABI or the configured address.${this.contractSourceHint(name)}`
2059
2088
  );
2060
2089
  }
2061
2090
  throw new Error(
@@ -2350,6 +2379,21 @@ var DotNS = class _DotNS {
2350
2379
  if (authorised !== null) return { authorised, owner };
2351
2380
  return { authorised: owner !== null && owner.toLowerCase() === account.toLowerCase(), owner };
2352
2381
  }
2382
+ /** False when the registrar gave no usable answer, including one too old to
2383
+ * have the function at all: let the chain refuse rather than guess. A read
2384
+ * that never completed propagates, so a network blip is not "not soulbound". */
2385
+ async readIsSoulbound(tokenId) {
2386
+ try {
2387
+ return await withTimeout(
2388
+ this.contractCall(this._contracts.DOTNS_REGISTRAR, DOTNS_REGISTRAR_TRANSFER_ABI, "isSoulbound", [tokenId]),
2389
+ 3e4,
2390
+ "isSoulbound"
2391
+ ) === true;
2392
+ } catch (e) {
2393
+ if (READ_NEVER_COMPLETED_RE.test(e?.message ?? String(e))) throw e;
2394
+ return false;
2395
+ }
2396
+ }
2353
2397
  /** Live transfer-fee quote. transferFloor is a pure PopRules view — it
2354
2398
  * classifies the label and reads both tiers, so it works BEFORE the name is
2355
2399
  * registered (unlike quoteTransferFee, which reverts on an unregistered token). */
@@ -2379,6 +2423,9 @@ var DotNS = class _DotNS {
2379
2423
  if (owner.toLowerCase() !== this.evmAddress.toLowerCase()) {
2380
2424
  throw new Error(`Cannot transfer ${validated}.${this._tld}: it is owned by ${owner}, not the worker ${this.evmAddress}.`);
2381
2425
  }
2426
+ if (await this.readIsSoulbound(tokenId)) {
2427
+ throw new NonRetryableError(soulboundTransferReason(validated, this._tld));
2428
+ }
2382
2429
  const { feeWei, feeNative } = await this.quoteTransferFloorNative(validated, this.evmAddress, toH160);
2383
2430
  const txRes = await this.contractTransaction(
2384
2431
  this._contracts.DOTNS_REGISTRAR,
@@ -3808,6 +3855,7 @@ export {
3808
3855
  classifyDotnsLabel,
3809
3856
  canRegister,
3810
3857
  shortNamesClosedReason,
3858
+ soulboundTransferReason,
3811
3859
  parseDomainName,
3812
3860
  parseProofOfPersonhoodStatus,
3813
3861
  popStatusName,
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-5FLTDWWP.js";
5
5
  import {
6
6
  DEFAULT_MNEMONIC
7
- } from "./chunk-MJCXPKBL.js";
7
+ } from "./chunk-K6OAMQQU.js";
8
8
  import {
9
9
  DOT_PRODUCT_ID
10
- } from "./chunk-5MS64TTR.js";
10
+ } from "./chunk-SVVPNIGN.js";
11
11
 
12
12
  // src/deploy-actors.ts
13
13
  var DEFAULT_WORKER_SURI = DEFAULT_MNEMONIC;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  validateProductConfig
3
- } from "./chunk-CVQ7DJHG.js";
3
+ } from "./chunk-I5PNPQZO.js";
4
4
  import {
5
5
  NonRetryableError
6
6
  } from "./chunk-ZOC4GITL.js";
@@ -509,15 +509,23 @@ var ZERO_ADDRESS = "0x" + "0".repeat(40);
509
509
  function isValidContractAddress(addr) {
510
510
  return typeof addr === "string" && EVM_ADDRESS_RE.test(addr) && addr.toLowerCase() !== ZERO_ADDRESS;
511
511
  }
512
- function validateContractAddresses(contracts, envId) {
512
+ function validateContractAddresses(contracts, envId, sources) {
513
513
  for (const [name, addr] of Object.entries(contracts)) {
514
514
  if (!isValidContractAddress(addr)) {
515
515
  throw new Error(
516
- `Invalid contract address for ${name} in environment ${envId}: ${addr}. Check assets/environments.json against https://github.com/paritytech/dotns#deployments`
516
+ `Invalid contract address for ${name} in environment ${envId}: ${addr}. ` + (sources?.[name] ? `This address came from ${sources[name]}.` : `Check assets/environments.json against https://github.com/paritytech/dotns#deployments`)
517
517
  );
518
518
  }
519
519
  }
520
520
  }
521
+ function describeContractSources(envContracts, cliContracts, source, userFilePath, envId) {
522
+ const env = envId ?? "unknown";
523
+ const docOrigin = source === "file" && userFilePath ? `${userFilePath} (environment ${env})` : source === "hardcoded-fallback" ? `the built-in fallback for ${env}` : `assets/environments.json shipped with bulletin-deploy (environment ${env})`;
524
+ const out = {};
525
+ for (const key of Object.keys(envContracts)) out[key] = docOrigin;
526
+ for (const [key, addr] of Object.entries(cliContracts ?? {})) out[key] = `the --contract flag or contracts option (${key}=${addr})`;
527
+ return out;
528
+ }
521
529
  function isValidDoc(value) {
522
530
  if (!value || typeof value !== "object") return false;
523
531
  const v = value;
@@ -594,13 +602,13 @@ async function loadEnvironments(opts = {}) {
594
602
  for (const env of merged.environments) {
595
603
  if (env.contracts && Object.keys(env.contracts).length > 0) {
596
604
  try {
597
- validateContractAddresses(env.contracts, env.id);
605
+ validateContractAddresses(env.contracts, env.id, describeContractSources(env.contracts, void 0, "file", userFilePath, env.id));
598
606
  } catch (err) {
599
607
  warn(`bulletin-deploy: Warning: ${err?.message ?? err}`);
600
608
  }
601
609
  }
602
610
  }
603
- return { doc: merged, source: "file" };
611
+ return { doc: merged, source: "file", userFilePath };
604
612
  }
605
613
  const bundled = await readBundled(bundledPath, capture);
606
614
  if (bundled) return { doc: bundled, source: "bundled" };
@@ -722,6 +730,7 @@ export {
722
730
  defaultBundledPath,
723
731
  isValidContractAddress,
724
732
  validateContractAddresses,
733
+ describeContractSources,
725
734
  deepMergeEnvironments,
726
735
  loadEnvironments,
727
736
  resolveEndpoints,
@@ -2,15 +2,15 @@ import {
2
2
  classifyErrorArea,
3
3
  isInteractive,
4
4
  promptYesNo
5
- } from "./chunk-TTUXQMD3.js";
5
+ } from "./chunk-G664B5Y4.js";
6
6
  import {
7
7
  VERSION,
8
8
  getCurrentSentryTraceId,
9
9
  resolveIssueRepoSlug
10
- } from "./chunk-STXAFUTQ.js";
10
+ } from "./chunk-JZTZWMP7.js";
11
11
  import {
12
12
  package_default
13
- } from "./chunk-E7PNP2NP.js";
13
+ } from "./chunk-RBI2B5SW.js";
14
14
 
15
15
  // src/bug-report.ts
16
16
  import { execSync, execFileSync } from "child_process";
@@ -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.18.4",
9
+ version: "0.19.0",
10
10
  private: false,
11
11
  repository: {
12
12
  type: "git",
@@ -52,11 +52,11 @@ var package_default = {
52
52
  "tools/verify-baked-dsn.mjs"
53
53
  ],
54
54
  scripts: {
55
- build: "tsup src/suppress-localstorage-warning.ts src/index.ts src/deploy.ts src/dotns.ts src/dotns-protocol.ts src/pool.ts src/telemetry.ts src/chain-health.ts src/memory-report.ts src/merkle.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/subname-depth.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/ring-proof.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 src/product-account.ts --format esm --dts --clean --target node22",
55
+ build: "tsup src/suppress-localstorage-warning.ts src/index.ts src/deploy.ts src/dotns.ts src/dotns-protocol.ts src/pool.ts src/telemetry.ts src/chain-health.ts src/memory-report.ts src/merkle.ts src/version-check.ts src/bug-report.ts src/run-state.ts src/environments.ts src/errors.ts src/subname-depth.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/ring-proof.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/compose.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 src/product-account.ts --format esm --dts --clean --target node22",
56
56
  "refresh-environments": "node scripts/refresh-environments.mjs",
57
57
  postinstall: "patch-package || true",
58
58
  prepare: "npm run build",
59
- test: "npm run build && node --test test/test.js test/cli-help.test.js test/helpers/e2e-helpers.test.js test/helpers/e2e-exit-guard.test.js test/environments.test.js test/refresh-environments.test.js test/chunk-sharing-report.test.js test/dotns-deployments-parser.test.js test/dotns-token-id.test.js test/dotns-subnode-id.test.js test/dotns-protocol.test.js test/product-manifest.test.js test/cache-savings-totals.test.js test/error-pattern-signature.test.js test/exit-codes.test.js test/probe-env-health.test.js test/e2e-chain-calls.test.js test/auth-config.test.js test/whoami.test.js test/login.test.js test/logout.test.js test/auth-resolve.test.js test/storage-signer.test.js test/spinner.test.js test/sss-allowance.test.js test/sss-allowance-cache.test.js test/dotns-transfer.test.js test/deploy-actors.test.js test/transfer-command.test.js test/dotns-register-fee.test.js test/deploy-label-ordering.test.js test/benign-teardown.test.js test/verify-baked-dsn.test.js test/product-account.test.js test/post-release-monitor-skill.test.js test/test-release-retry-wrapper.js test/reprove-alias-tool.test.js test/bootstrap-env.test.js test/check-chain-identity.test.js && npm run test:vendor",
59
+ test: "npm run build && node --test test/test.js test/cli-help.test.js test/helpers/e2e-helpers.test.js test/helpers/e2e-exit-guard.test.js test/environments.test.js test/refresh-environments.test.js test/chunk-sharing-report.test.js test/dotns-deployments-parser.test.js test/dotns-token-id.test.js test/dotns-subnode-id.test.js test/dotns-protocol.test.js test/product-manifest.test.js test/manifest-trusted-products.test.js test/cache-savings-totals.test.js test/error-pattern-signature.test.js test/exit-codes.test.js test/probe-env-health.test.js test/e2e-chain-calls.test.js test/auth-config.test.js test/whoami.test.js test/login.test.js test/logout.test.js test/auth-resolve.test.js test/storage-signer.test.js test/spinner.test.js test/sss-allowance.test.js test/sss-allowance-cache.test.js test/dotns-transfer.test.js test/deploy-actors.test.js test/transfer-command.test.js test/dotns-register-fee.test.js test/deploy-label-ordering.test.js test/benign-teardown.test.js test/verify-baked-dsn.test.js test/product-account.test.js test/post-release-monitor-skill.test.js test/test-release-retry-wrapper.js test/reprove-alias-tool.test.js test/bootstrap-env.test.js test/check-chain-identity.test.js && npm run test:vendor",
60
60
  "test:e2e": "npm run build && node --test test/e2e.test.js",
61
61
  "test:e2e:smoke": "bash scripts/e2e-pass.sh smoke",
62
62
  "test:e2e:pr": "bash scripts/e2e-pass.sh pr",
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-TSPERKUS.js";
4
4
  import {
5
5
  loadEnvironments
6
- } from "./chunk-HDGD5FYX.js";
6
+ } from "./chunk-NYNAUG4V.js";
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-STXAFUTQ.js";
9
+ } from "./chunk-JZTZWMP7.js";
10
10
 
11
11
  // src/auth-config.ts
12
12
  import { existsSync, readdirSync } from "fs";
@@ -1,3 +1,8 @@
1
+ import {
2
+ composeExecutable,
3
+ composeRoot
4
+ } from "./chunk-DMNLTQGA.js";
5
+
1
6
  // src/manifest/byte-budget.ts
2
7
  var DEFAULT_TEXT_RECORD_BUDGET_BYTES = 1024;
3
8
  var PLACEHOLDER_CID = "bafk2bzacecjiwibwnfb6fl6rd26a5lrokoutx4lxut6pgw6mmtkqg4comxrae";
@@ -15,12 +20,7 @@ function assertWithinBudget(key, serialized, budget) {
15
20
  }
16
21
  function pessimisticSizePreflight(config, budget = getTextRecordBudgetBytes()) {
17
22
  const checks = [];
18
- const placeholderRoot = {
19
- $v: 1,
20
- displayName: config.displayName,
21
- description: config.description,
22
- icon: { cid: PLACEHOLDER_CID, format: config.icon.format }
23
- };
23
+ const placeholderRoot = composeRoot(config, PLACEHOLDER_CID);
24
24
  checks.push(
25
25
  assertWithinBudget(
26
26
  `${config.domain}#manifest`,
@@ -29,7 +29,7 @@ function pessimisticSizePreflight(config, budget = getTextRecordBudgetBytes()) {
29
29
  )
30
30
  );
31
31
  for (const exec of config.executables) {
32
- const placeholder = composePlaceholderExecutable(exec);
32
+ const placeholder = composeExecutable(exec);
33
33
  checks.push(
34
34
  assertWithinBudget(
35
35
  `${exec.kind}.${config.domain}#executable`,
@@ -40,35 +40,6 @@ function pessimisticSizePreflight(config, budget = getTextRecordBudgetBytes()) {
40
40
  }
41
41
  return { ok: checks.every((c) => c.ok), budget, checks };
42
42
  }
43
- function composePlaceholderExecutable(exec) {
44
- if (exec.kind === "app") {
45
- return "manifest" in exec ? exec.manifest : { $v: 1, kind: "app", appVersion: exec.appVersion };
46
- }
47
- if (exec.kind === "widget") {
48
- return {
49
- $v: 1,
50
- kind: "widget",
51
- appVersion: exec.appVersion,
52
- dimensions: exec.dimensions,
53
- ...exec.description !== void 0 ? { description: exec.description } : {}
54
- };
55
- }
56
- if (exec.kind === "funding") {
57
- return {
58
- $v: 1,
59
- kind: "funding",
60
- appVersion: exec.appVersion,
61
- modes: exec.modes
62
- };
63
- }
64
- return {
65
- $v: 1,
66
- kind: "worker",
67
- appVersion: exec.appVersion,
68
- entrypoint: exec.entrypoint,
69
- includes: exec.includes
70
- };
71
- }
72
43
 
73
44
  export {
74
45
  DEFAULT_TEXT_RECORD_BUDGET_BYTES,
@@ -8,9 +8,9 @@ import {
8
8
  getBestBlockNumber,
9
9
  probeChunks,
10
10
  probeFinalityGap
11
- } from "./chunk-4NIOCONP.js";
12
- import "./chunk-STXAFUTQ.js";
13
- import "./chunk-E7PNP2NP.js";
11
+ } from "./chunk-J6N3W3KJ.js";
12
+ import "./chunk-JZTZWMP7.js";
13
+ import "./chunk-RBI2B5SW.js";
14
14
  export {
15
15
  ChainProbeCrossValidationError,
16
16
  ChainProbeMetadataError,
@@ -4,12 +4,12 @@ import {
4
4
  import {
5
5
  isBenignTeardownError,
6
6
  waitForBulletinAuthorization
7
- } from "../chunk-K23BCUAG.js";
7
+ } from "../chunk-6H3GBTBA.js";
8
8
  import "../chunk-HNJWIY55.js";
9
9
  import "../chunk-M5AKL3FL.js";
10
10
  import {
11
11
  preflightSssAllowance
12
- } from "../chunk-GZ4O5DIU.js";
12
+ } from "../chunk-A7MFUE2N.js";
13
13
  import {
14
14
  statementSigningAccount
15
15
  } from "../chunk-GRPLHUYC.js";
@@ -17,11 +17,11 @@ import "../chunk-IW3X2MJF.js";
17
17
  import "../chunk-LPTKBQII.js";
18
18
  import "../chunk-3MAIF2SF.js";
19
19
  import "../chunk-WPC2PUCV.js";
20
- import "../chunk-A55GRHCX.js";
21
- import "../chunk-TTUXQMD3.js";
22
- import "../chunk-4NIOCONP.js";
20
+ import "../chunk-R7HIFZDM.js";
21
+ import "../chunk-G664B5Y4.js";
22
+ import "../chunk-J6N3W3KJ.js";
23
23
  import "../chunk-C2TS5MER.js";
24
- import "../chunk-JGIPHFBT.js";
24
+ import "../chunk-KXQVZWDW.js";
25
25
  import "../chunk-JQKKMUCT.js";
26
26
  import {
27
27
  BULLETIN_RESOURCE,
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  renderLoginStatus
35
35
  } from "../chunk-RIRDBSBG.js";
36
- import "../chunk-MJCXPKBL.js";
36
+ import "../chunk-K6OAMQQU.js";
37
37
  import "../chunk-SI2ZUOYD.js";
38
38
  import "../chunk-AYAVRPAP.js";
39
39
  import {
@@ -41,18 +41,18 @@ import {
41
41
  getAuthClient,
42
42
  getPeopleChainEndpoints,
43
43
  resolveBulletinEndpoints
44
- } from "../chunk-5MS64TTR.js";
44
+ } from "../chunk-SVVPNIGN.js";
45
45
  import {
46
46
  CLI_NAME
47
47
  } from "../chunk-TSPERKUS.js";
48
48
  import {
49
49
  loadEnvironments
50
- } from "../chunk-HDGD5FYX.js";
50
+ } from "../chunk-NYNAUG4V.js";
51
51
  import "../chunk-ZOC4GITL.js";
52
- import "../chunk-5HFXRNCQ.js";
53
- import "../chunk-STXAFUTQ.js";
54
- import "../chunk-E7PNP2NP.js";
55
- import "../chunk-7I3MTGOR.js";
52
+ import "../chunk-IQUS43B7.js";
53
+ import "../chunk-JZTZWMP7.js";
54
+ import "../chunk-RBI2B5SW.js";
55
+ import "../chunk-K5SP4OUC.js";
56
56
 
57
57
  // src/commands/login.ts
58
58
  import { ss58Encode } from "@parity/product-sdk-address";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearSssAllowanceCache
3
- } from "../chunk-GZ4O5DIU.js";
3
+ } from "../chunk-A7MFUE2N.js";
4
4
  import "../chunk-GRPLHUYC.js";
5
5
  import "../chunk-JQKKMUCT.js";
6
6
  import "../chunk-5FLTDWWP.js";
@@ -9,12 +9,12 @@ import {
9
9
  } from "../chunk-RIRDBSBG.js";
10
10
  import {
11
11
  getAuthClient
12
- } from "../chunk-5MS64TTR.js";
12
+ } from "../chunk-SVVPNIGN.js";
13
13
  import "../chunk-TSPERKUS.js";
14
- import "../chunk-HDGD5FYX.js";
14
+ import "../chunk-NYNAUG4V.js";
15
15
  import "../chunk-ZOC4GITL.js";
16
- import "../chunk-STXAFUTQ.js";
17
- import "../chunk-E7PNP2NP.js";
16
+ import "../chunk-JZTZWMP7.js";
17
+ import "../chunk-RBI2B5SW.js";
18
18
 
19
19
  // src/commands/logout.ts
20
20
  function formatLogout(status) {
@@ -3,7 +3,7 @@ import {
3
3
  DEFAULT_TLD,
4
4
  DotNS,
5
5
  parseDomainName
6
- } from "../chunk-MJCXPKBL.js";
6
+ } from "../chunk-K6OAMQQU.js";
7
7
  import "../chunk-SI2ZUOYD.js";
8
8
  import "../chunk-AYAVRPAP.js";
9
9
  import {
@@ -13,12 +13,12 @@ import {
13
13
  getPopSelfServeConfig,
14
14
  loadEnvironments,
15
15
  resolveEndpoints
16
- } from "../chunk-HDGD5FYX.js";
16
+ } from "../chunk-NYNAUG4V.js";
17
17
  import "../chunk-ZOC4GITL.js";
18
- import "../chunk-5HFXRNCQ.js";
19
- import "../chunk-STXAFUTQ.js";
20
- import "../chunk-E7PNP2NP.js";
21
- import "../chunk-7I3MTGOR.js";
18
+ import "../chunk-IQUS43B7.js";
19
+ import "../chunk-JZTZWMP7.js";
20
+ import "../chunk-RBI2B5SW.js";
21
+ import "../chunk-K5SP4OUC.js";
22
22
 
23
23
  // src/commands/transfer.ts
24
24
  import { zeroAddress } from "viem";
@@ -2,14 +2,14 @@ import {
2
2
  STALE_SESSION_MESSAGE,
3
3
  getAuthClient,
4
4
  hasPersistedSession
5
- } from "../chunk-5MS64TTR.js";
5
+ } from "../chunk-SVVPNIGN.js";
6
6
  import {
7
7
  CLI_NAME
8
8
  } from "../chunk-TSPERKUS.js";
9
- import "../chunk-HDGD5FYX.js";
9
+ import "../chunk-NYNAUG4V.js";
10
10
  import "../chunk-ZOC4GITL.js";
11
- import "../chunk-STXAFUTQ.js";
12
- import "../chunk-E7PNP2NP.js";
11
+ import "../chunk-JZTZWMP7.js";
12
+ import "../chunk-RBI2B5SW.js";
13
13
 
14
14
  // src/commands/whoami.ts
15
15
  function formatWhoami(addresses) {
@@ -2,21 +2,21 @@ import {
2
2
  MainnetDefaultWorkerError,
3
3
  resolveDeployActors,
4
4
  resolveStorageSigner
5
- } from "./chunk-JGIPHFBT.js";
5
+ } from "./chunk-KXQVZWDW.js";
6
6
  import "./chunk-JQKKMUCT.js";
7
7
  import "./chunk-5FLTDWWP.js";
8
8
  import "./chunk-RIRDBSBG.js";
9
- import "./chunk-MJCXPKBL.js";
9
+ import "./chunk-K6OAMQQU.js";
10
10
  import "./chunk-SI2ZUOYD.js";
11
11
  import "./chunk-AYAVRPAP.js";
12
- import "./chunk-5MS64TTR.js";
12
+ import "./chunk-SVVPNIGN.js";
13
13
  import "./chunk-TSPERKUS.js";
14
- import "./chunk-HDGD5FYX.js";
14
+ import "./chunk-NYNAUG4V.js";
15
15
  import "./chunk-ZOC4GITL.js";
16
- import "./chunk-5HFXRNCQ.js";
17
- import "./chunk-STXAFUTQ.js";
18
- import "./chunk-E7PNP2NP.js";
19
- import "./chunk-7I3MTGOR.js";
16
+ import "./chunk-IQUS43B7.js";
17
+ import "./chunk-JZTZWMP7.js";
18
+ import "./chunk-RBI2B5SW.js";
19
+ import "./chunk-K5SP4OUC.js";
20
20
  export {
21
21
  MainnetDefaultWorkerError,
22
22
  resolveDeployActors,
package/dist/deploy.d.ts CHANGED
@@ -622,7 +622,7 @@ interface DeployOptions {
622
622
  }) => Promise<void>;
623
623
  }
624
624
  declare function resolveProductSigner(options: Pick<DeployOptions, "productName" | "mnemonic" | "signer" | "signerAddress" | "suri" | "derivationPath">): Pick<DeployOptions, "signer" | "signerAddress" | "mnemonic" | "localSigner"> | null;
625
- declare function resolveDotnsConnectOptions(options: Pick<DeployOptions, "mnemonic" | "derivationPath" | "signer" | "signerAddress">, assetHubEndpoints?: string[], autoAccountMapping?: boolean, contracts?: Record<string, string>, nativeToEthRatio?: bigint, environmentId?: string, popSelfServe?: PopSelfServeConfig | null, registerStorageDeposit?: bigint, tld?: string, network?: string): Pick<DotNSConnectOptions, "signer" | "signerAddress" | "mnemonic" | "derivationPath" | "assetHubEndpoints" | "autoAccountMapping" | "contracts" | "nativeToEthRatio" | "environmentId" | "popSelfServe" | "registerStorageDeposit" | "tld" | "network">;
625
+ declare function resolveDotnsConnectOptions(options: Pick<DeployOptions, "mnemonic" | "derivationPath" | "signer" | "signerAddress">, assetHubEndpoints?: string[], autoAccountMapping?: boolean, contracts?: Record<string, string>, nativeToEthRatio?: bigint, environmentId?: string, popSelfServe?: PopSelfServeConfig | null, registerStorageDeposit?: bigint, tld?: string, network?: string, contractSources?: Record<string, string>): Pick<DotNSConnectOptions, "signer" | "signerAddress" | "mnemonic" | "derivationPath" | "assetHubEndpoints" | "autoAccountMapping" | "contracts" | "nativeToEthRatio" | "environmentId" | "popSelfServe" | "registerStorageDeposit" | "tld" | "network" | "contractSources">;
626
626
  declare function estimateUploadBytes(content: DeployContent): Promise<number | null>;
627
627
  /**
628
628
  * Throws NonRetryableError if a subdomain is owned by a different address
package/dist/deploy.js CHANGED
@@ -66,37 +66,37 @@ import {
66
66
  storeDirectory,
67
67
  storeDirectoryV2,
68
68
  storeFile
69
- } from "./chunk-K23BCUAG.js";
69
+ } from "./chunk-6H3GBTBA.js";
70
70
  import "./chunk-HNJWIY55.js";
71
71
  import "./chunk-M5AKL3FL.js";
72
- import "./chunk-GZ4O5DIU.js";
72
+ import "./chunk-A7MFUE2N.js";
73
73
  import "./chunk-GRPLHUYC.js";
74
74
  import "./chunk-IW3X2MJF.js";
75
75
  import "./chunk-LPTKBQII.js";
76
76
  import "./chunk-3MAIF2SF.js";
77
77
  import "./chunk-WPC2PUCV.js";
78
- import "./chunk-A55GRHCX.js";
79
- import "./chunk-TTUXQMD3.js";
80
- import "./chunk-4NIOCONP.js";
78
+ import "./chunk-R7HIFZDM.js";
79
+ import "./chunk-G664B5Y4.js";
80
+ import "./chunk-J6N3W3KJ.js";
81
81
  import "./chunk-C2TS5MER.js";
82
- import "./chunk-JGIPHFBT.js";
82
+ import "./chunk-KXQVZWDW.js";
83
83
  import "./chunk-JQKKMUCT.js";
84
84
  import "./chunk-5FLTDWWP.js";
85
85
  import "./chunk-RIRDBSBG.js";
86
- import "./chunk-MJCXPKBL.js";
86
+ import "./chunk-K6OAMQQU.js";
87
87
  import "./chunk-SI2ZUOYD.js";
88
88
  import "./chunk-AYAVRPAP.js";
89
- import "./chunk-5MS64TTR.js";
89
+ import "./chunk-SVVPNIGN.js";
90
90
  import "./chunk-TSPERKUS.js";
91
- import "./chunk-HDGD5FYX.js";
91
+ import "./chunk-NYNAUG4V.js";
92
92
  import {
93
93
  EXIT_CODE_NO_RETRY,
94
94
  NonRetryableError
95
95
  } from "./chunk-ZOC4GITL.js";
96
- import "./chunk-5HFXRNCQ.js";
97
- import "./chunk-STXAFUTQ.js";
98
- import "./chunk-E7PNP2NP.js";
99
- import "./chunk-7I3MTGOR.js";
96
+ import "./chunk-IQUS43B7.js";
97
+ import "./chunk-JZTZWMP7.js";
98
+ import "./chunk-RBI2B5SW.js";
99
+ import "./chunk-K5SP4OUC.js";
100
100
  export {
101
101
  BLAKE2B_256_MULTIHASH_CODE,
102
102
  BULLETIN_ENDPOINTS,