@toon-protocol/townhouse 0.3.0 → 0.3.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.
@@ -34,7 +34,7 @@ import {
34
34
  MILL_HEALTH_PORT,
35
35
  NODE_BTP_PORT,
36
36
  TOWN_HEALTH_PORT
37
- } from "./chunk-GQNBZJ6F.js";
37
+ } from "./chunk-NZR5C3KD.js";
38
38
  import {
39
39
  __commonJS,
40
40
  __require,
@@ -22287,4 +22287,4 @@ export {
22287
22287
  @scure/bip32/index.js:
22288
22288
  (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
22289
22289
  */
22290
- //# sourceMappingURL=chunk-B4KWPVEK.js.map
22290
+ //# sourceMappingURL=chunk-6T5CXPYD.js.map
@@ -4,19 +4,24 @@ import { createRequire } from 'module'; const require = createRequire(import.met
4
4
  var CONTAINER_PREFIX = "townhouse-";
5
5
  var NODE_BTP_PORT = 3e3;
6
6
  var DEFAULT_CONNECTOR_IMAGE = (
7
- // v3.8.0 — latest published connector (Story 50.4 bump). Migrates local SQLite
8
- // from better-sqlite3 to libsql (toon-protocol/connector#79 removes the
7
+ // v3.8.1 — latest published connector (Mina settlement fix). Wires the
8
+ // dual-party Mina payment-channel claim path (toon-protocol/connector#84
9
+ // the on-chain `claimFromChannel` now passes the real counterparty balance,
10
+ // salt, and both signatures instead of the single-sig/zeroed placeholders
11
+ // that left Mina settlement un-claimable). EVM and Solana settlement are
12
+ // unchanged. Patch over 3.8.0, which migrated local SQLite from
13
+ // better-sqlite3 to libsql (toon-protocol/connector#79 — removed the
9
14
  // native-build failure on Node 24 that left the settlement/claim subsystem
10
15
  // silently un-wired → value-bearing packets auto-fulfilled instead of
11
- // claim-gated) AND makes inbound per-packet claim validation relation-aware
12
- // (toon-protocol/connector#78 — a child node now skips the inline-claim
16
+ // claim-gated) AND made inbound per-packet claim validation relation-aware
17
+ // (toon-protocol/connector#78 — a child node skips the inline-claim
13
18
  // requirement for PREPAREs forwarded from its parent, unblocking Story 50.3's
14
19
  // AC#1 kind:1 F06 "No payment channel claim attached" on the apex→child hop).
15
20
  // No breaking changes to the SDK/admin contract within 3.x (verified >=3.3.2
16
- // through 3.8.0 — see packages/sdk/CONNECTOR_MIGRATION.md). Digest resolved via
17
- // `docker buildx imagetools inspect` for tag 3.8.0. To bump: see
21
+ // through 3.8.1 — see packages/sdk/CONNECTOR_MIGRATION.md). Digest resolved via
22
+ // `docker buildx imagetools inspect` for tag 3.8.1. To bump: see
18
23
  // CONNECTOR_RELEASE_CONTRACT.md.
19
- "ghcr.io/toon-protocol/connector@sha256:3343c19649290043e521c81b467b7c6410b8eaedd76d48804ea9b6fc810cddb0"
24
+ "ghcr.io/toon-protocol/connector@sha256:d22a786f82cc928238b0ef14c6455d1238bd2f42744138cad8af81ca1747ff6e"
20
25
  );
21
26
  var ACCOUNT_INDEX_TOWN = 0;
22
27
  var ACCOUNT_INDEX_MILL = 1;
@@ -36,4 +41,4 @@ export {
36
41
  MILL_HEALTH_PORT,
37
42
  DVM_HEALTH_PORT
38
43
  };
39
- //# sourceMappingURL=chunk-GQNBZJ6F.js.map
44
+ //# sourceMappingURL=chunk-NZR5C3KD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts"],"sourcesContent":["/**\n * Shared constants for Townhouse package.\n *\n * Single source of truth for values used across multiple modules\n * (orchestrator, config-generator, CLI).\n */\n\n/** Container name prefix for all Townhouse-managed Docker containers */\nexport const CONTAINER_PREFIX = 'townhouse-';\n\n/** Internal BTP port exposed by node containers (Docker-internal only) */\nexport const NODE_BTP_PORT = 3000;\n\n/**\n * Default connector Docker image — digest-pinned per CONNECTOR_RELEASE_CONTRACT.md.\n *\n * To bump: capture a new digest by running the Story 45.1 publish workflow\n * against the desired connector tag, copy the resulting image-manifest.json\n * connector entry's digest, and update this constant + the contract canary\n * fixture. See packages/sdk/CONNECTOR_RELEASE_CONTRACT.md for the full bump\n * checklist + breaking-changes history.\n *\n * To read the human-readable tag for log output, consult dist/image-manifest.json:\n * manifest.images.connector.tag\n */\nexport const DEFAULT_CONNECTOR_IMAGE =\n // v3.8.1 — latest published connector (Mina settlement fix). Wires the\n // dual-party Mina payment-channel claim path (toon-protocol/connector#84 —\n // the on-chain `claimFromChannel` now passes the real counterparty balance,\n // salt, and both signatures instead of the single-sig/zeroed placeholders\n // that left Mina settlement un-claimable). EVM and Solana settlement are\n // unchanged. Patch over 3.8.0, which migrated local SQLite from\n // better-sqlite3 to libsql (toon-protocol/connector#79 — removed the\n // native-build failure on Node 24 that left the settlement/claim subsystem\n // silently un-wired → value-bearing packets auto-fulfilled instead of\n // claim-gated) AND made inbound per-packet claim validation relation-aware\n // (toon-protocol/connector#78 — a child node skips the inline-claim\n // requirement for PREPAREs forwarded from its parent, unblocking Story 50.3's\n // AC#1 kind:1 F06 \"No payment channel claim attached\" on the apex→child hop).\n // No breaking changes to the SDK/admin contract within 3.x (verified >=3.3.2\n // through 3.8.1 — see packages/sdk/CONNECTOR_MIGRATION.md). Digest resolved via\n // `docker buildx imagetools inspect` for tag 3.8.1. To bump: see\n // CONNECTOR_RELEASE_CONTRACT.md.\n 'ghcr.io/toon-protocol/connector@sha256:d22a786f82cc928238b0ef14c6455d1238bd2f42744138cad8af81ca1747ff6e';\n\n/**\n * HD wallet account indices per node type (Story 21.4, D21-008).\n * BIP-44 paths: m/44'/{coin}'/ACCOUNT'/0/0\n */\nexport const ACCOUNT_INDEX_TOWN = 0;\nexport const ACCOUNT_INDEX_MILL = 1;\nexport const ACCOUNT_INDEX_DVM = 2;\n\n/** BLS health port exposed by each node container type (internal Docker port). */\nexport const TOWN_HEALTH_PORT = 3100;\nexport const MILL_HEALTH_PORT = 3200;\nexport const DVM_HEALTH_PORT = 3400;\n"],"mappings":";;;AAQO,IAAM,mBAAmB;AAGzB,IAAM,gBAAgB;AActB,IAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBX;AAAA;AAMK,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,oBAAoB;AAG1B,IAAM,mBAAmB;AACzB,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;","names":[]}
package/dist/cli.js CHANGED
@@ -28,11 +28,11 @@ import {
28
28
  serviceFromContainerName,
29
29
  tailContainerLogs,
30
30
  writeHsConnectorConfig
31
- } from "./chunk-B4KWPVEK.js";
31
+ } from "./chunk-6T5CXPYD.js";
32
32
  import "./chunk-5O4SBV5O.js";
33
33
  import {
34
34
  CONTAINER_PREFIX
35
- } from "./chunk-GQNBZJ6F.js";
35
+ } from "./chunk-NZR5C3KD.js";
36
36
  import {
37
37
  formatRelativeTime,
38
38
  formatUsdc
@@ -689,8 +689,11 @@ async function handleNodeAdd(type, options) {
689
689
  return;
690
690
  }
691
691
  if (response.status === 409 && body.error === "node_type_in_use") {
692
+ const existingId = body.existingId ?? body.type ?? type;
692
693
  process.stderr.write(
693
- `${xMark} Node of type '${body.type}' already exists with id '${body.existingId}'. Remove it first or use a different type.
694
+ `${xMark} A '${body.type}' node already exists (id '${existingId}'). Only one node per type is supported.
695
+ See your nodes: townhouse node list
696
+ Recreate it: townhouse node remove ${existingId} && townhouse node add ${body.type}
694
697
  `
695
698
  );
696
699
  process.exitCode = 1;
@@ -2056,7 +2059,7 @@ async function handleInit(force, configDir, password, preset, yes) {
2056
2059
  mkdirSync(dir, { recursive: true, mode: 448 });
2057
2060
  let configToWrite;
2058
2061
  if (preset === "demo") {
2059
- const { buildDemoConfig, DEMO_DETERMINISTIC_PASSWORD } = await import("./demo-3DWRDMYY.js");
2062
+ const { buildDemoConfig, DEMO_DETERMINISTIC_PASSWORD } = await import("./demo-4ZF3RRNH.js");
2060
2063
  configToWrite = buildDemoConfig({ walletPath: join(dir, "wallet.enc") });
2061
2064
  if (yes && !password) {
2062
2065
  password = DEMO_DETERMINISTIC_PASSWORD;