@toon-protocol/townhouse 0.7.0 → 0.9.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.
@@ -48,7 +48,7 @@ services:
48
48
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
49
49
  townhouse-dev-connector:
50
50
  # Image tag must match DEFAULT_CONNECTOR_IMAGE in packages/townhouse/src/constants.ts
51
- image: ghcr.io/toon-protocol/connector:3.8.1
51
+ image: ghcr.io/toon-protocol/connector:3.9.0
52
52
  container_name: townhouse-dev-connector
53
53
  networks:
54
54
  - townhouse-dev-net
@@ -22,11 +22,11 @@
22
22
  # Story 45.4 boots only connector + townhouse-api at apex install
23
23
  #
24
24
  # Digest placeholders (substituted at build time from dist/image-manifest.json):
25
- # @sha256:6e72054b2c1b98e0e2444cdb7b42ae75e606e692f057c0ebc32ac45888e65e22 → @sha256:<hex>
26
- # @sha256:11d9e6a655ac8e8bbe5c98c8a2fe98a43997c8f8ee58c92ff69cd93bc02f59a8 → @sha256:<hex>
27
- # @sha256:eeab929af6d474cde60c5ae2b548de005fee63ef6735e0dd97d518c6b9419d54 → @sha256:<hex>
28
- # @sha256:1b0e75d1163f266d82e2cd0984b887022bc68fa43a197aec4182d674f333afa9 → @sha256:<hex>
29
- # @sha256:d22a786f82cc928238b0ef14c6455d1238bd2f42744138cad8af81ca1747ff6e → @sha256:<hex>
25
+ # @sha256:453279fcd09f71559c908d6932d341eeb0b6d1aae864e8b735e824218e34aba7 → @sha256:<hex>
26
+ # @sha256:ef715c6e9ae15a2c0e1a824c26631bd171597e15fbf18e0dfe20556f5350d451 → @sha256:<hex>
27
+ # @sha256:2f2b38ffad9470eaefb0f58848d754dd9d86a141dc76a25c8d70c3c50586b680 → @sha256:<hex>
28
+ # @sha256:65eb6eaf2a6620cfe4c07062f291e5c9be40e4ab5d1a5df1451e627baa8167eb → @sha256:<hex>
29
+ # @sha256:673a49e30a5b9ae3968fe7ef5ca99b6ceca21bb69996bda68cd18ec335b874fe → @sha256:<hex>
30
30
  #
31
31
  # Scope guard (Story 45.2 does NOT include):
32
32
  # - ator-sidecar / ator-sidecar-relay (connector v3.5.x does HS publishing in-process)
@@ -106,7 +106,7 @@ services:
106
106
  - townhouse-hs-net
107
107
 
108
108
  connector:
109
- image: ghcr.io/toon-protocol/connector@sha256:d22a786f82cc928238b0ef14c6455d1238bd2f42744138cad8af81ca1747ff6e
109
+ image: ghcr.io/toon-protocol/connector@sha256:673a49e30a5b9ae3968fe7ef5ca99b6ceca21bb69996bda68cd18ec335b874fe
110
110
  # v3.5.1 has the multi-arch manifest but the default resolves to arm64 on
111
111
  # some Docker versions. Pin to amd64 explicitly until the manifest is fixed.
112
112
  platform: linux/amd64
@@ -157,7 +157,7 @@ services:
157
157
  # Port D21-008: Fastify host API on 127.0.0.1:28090.
158
158
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
159
159
  townhouse-api:
160
- image: ghcr.io/toon-protocol/townhouse-api@sha256:6e72054b2c1b98e0e2444cdb7b42ae75e606e692f057c0ebc32ac45888e65e22
160
+ image: ghcr.io/toon-protocol/townhouse-api@sha256:453279fcd09f71559c908d6932d341eeb0b6d1aae864e8b735e824218e34aba7
161
161
  container_name: townhouse-hs-api
162
162
  # Run as the operator's host UID so bind-mounted ~/.townhouse files
163
163
  # (rw------- 600) are readable. TOWNHOUSE_UID is injected by `townhouse hs up`.
@@ -264,7 +264,7 @@ services:
264
264
  # start at first run).
265
265
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
266
266
  town:
267
- image: ghcr.io/toon-protocol/town@sha256:11d9e6a655ac8e8bbe5c98c8a2fe98a43997c8f8ee58c92ff69cd93bc02f59a8
267
+ image: ghcr.io/toon-protocol/town@sha256:ef715c6e9ae15a2c0e1a824c26631bd171597e15fbf18e0dfe20556f5350d451
268
268
  container_name: townhouse-hs-town
269
269
  profiles: [town]
270
270
  networks:
@@ -330,7 +330,7 @@ services:
330
330
  # Lazy-provisioned via Epic 46: `townhouse node add mill`
331
331
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
332
332
  mill:
333
- image: ghcr.io/toon-protocol/mill@sha256:eeab929af6d474cde60c5ae2b548de005fee63ef6735e0dd97d518c6b9419d54
333
+ image: ghcr.io/toon-protocol/mill@sha256:2f2b38ffad9470eaefb0f58848d754dd9d86a141dc76a25c8d70c3c50586b680
334
334
  container_name: townhouse-hs-mill
335
335
  profiles: [mill]
336
336
  networks:
@@ -388,7 +388,7 @@ services:
388
388
  # Lazy-provisioned via Epic 46: `townhouse node add dvm`
389
389
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
390
390
  dvm:
391
- image: ghcr.io/toon-protocol/dvm@sha256:1b0e75d1163f266d82e2cd0984b887022bc68fa43a197aec4182d674f333afa9
391
+ image: ghcr.io/toon-protocol/dvm@sha256:65eb6eaf2a6620cfe4c07062f291e5c9be40e4ab5d1a5df1451e627baa8167eb
392
392
  container_name: townhouse-hs-dvm
393
393
  profiles: [dvm]
394
394
  networks:
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  DEFAULT_CONNECTOR_IMAGE
4
- } from "./chunk-NZR5C3KD.js";
4
+ } from "./chunk-BLNEL3QS.js";
5
5
  import "./chunk-I2R4CRUX.js";
6
6
 
7
7
  // src/presets/demo.ts
@@ -115,4 +115,4 @@ export {
115
115
  defaultLeasesPath,
116
116
  resolveChainEndpoints
117
117
  };
118
- //# sourceMappingURL=demo-4ZF3RRNH.js.map
118
+ //# sourceMappingURL=demo-COZ7SB5F.js.map
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "townhouseVersion": "0.7.0",
4
- "builtAt": "2026-06-03T22:04:17.852Z",
3
+ "townhouseVersion": "0.9.0",
4
+ "builtAt": "2026-06-04T16:27:27.323Z",
5
5
  "images": {
6
6
  "townhouse-api": {
7
7
  "name": "ghcr.io/toon-protocol/townhouse-api",
8
- "tag": "0.7.0",
9
- "digest": "sha256:6e72054b2c1b98e0e2444cdb7b42ae75e606e692f057c0ebc32ac45888e65e22"
8
+ "tag": "0.9.0",
9
+ "digest": "sha256:453279fcd09f71559c908d6932d341eeb0b6d1aae864e8b735e824218e34aba7"
10
10
  },
11
11
  "town": {
12
12
  "name": "ghcr.io/toon-protocol/town",
13
- "tag": "0.7.0",
14
- "digest": "sha256:11d9e6a655ac8e8bbe5c98c8a2fe98a43997c8f8ee58c92ff69cd93bc02f59a8"
13
+ "tag": "0.9.0",
14
+ "digest": "sha256:ef715c6e9ae15a2c0e1a824c26631bd171597e15fbf18e0dfe20556f5350d451"
15
15
  },
16
16
  "mill": {
17
17
  "name": "ghcr.io/toon-protocol/mill",
18
- "tag": "0.7.0",
19
- "digest": "sha256:eeab929af6d474cde60c5ae2b548de005fee63ef6735e0dd97d518c6b9419d54"
18
+ "tag": "0.9.0",
19
+ "digest": "sha256:2f2b38ffad9470eaefb0f58848d754dd9d86a141dc76a25c8d70c3c50586b680"
20
20
  },
21
21
  "dvm": {
22
22
  "name": "ghcr.io/toon-protocol/dvm",
23
- "tag": "0.7.0",
24
- "digest": "sha256:1b0e75d1163f266d82e2cd0984b887022bc68fa43a197aec4182d674f333afa9"
23
+ "tag": "0.9.0",
24
+ "digest": "sha256:65eb6eaf2a6620cfe4c07062f291e5c9be40e4ab5d1a5df1451e627baa8167eb"
25
25
  },
26
26
  "connector": {
27
27
  "name": "ghcr.io/toon-protocol/connector",
28
- "tag": "3.8.1",
29
- "digest": "sha256:d22a786f82cc928238b0ef14c6455d1238bd2f42744138cad8af81ca1747ff6e"
28
+ "tag": "3.9.0",
29
+ "digest": "sha256:673a49e30a5b9ae3968fe7ef5ca99b6ceca21bb69996bda68cd18ec335b874fe"
30
30
  }
31
31
  }
32
32
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { E as EncryptedWallet, T as TownhouseConfig, W as WalletManager, a as ComposeProfile, N as NodeType$1, B as BandwidthStats, H as HealthCheckOptions, b as ChainProviderEntry } from './manager-DSkD9Td1.js';
2
- export { A as ApiConfig, c as ChainType, d as ComposeLoaderError, C as ComposeLoaderOptions, e as ConnectorConfig, f as ContainerSpec, D as DerivedNodeKeys, g as DvmNodeConfig, h as EvmChainProvider, L as LoggingConfig, M as MillNodeConfig, i as MinaChainProvider, j as NodeKeyInfo, k as NodeKeys, l as NodesConfig, O as OrchestratorEvents, S as SolanaChainProvider, m as TownNodeConfig, n as TransportConfig, o as WalletConfig, p as WalletManagerConfig, q as WalletState, r as loadComposeTemplate, s as materializeComposeTemplate } from './manager-DSkD9Td1.js';
1
+ import { E as EncryptedWallet, T as TownhouseConfig, W as WalletManager, a as ComposeProfile, N as NodeType$1, B as BandwidthStats, H as HealthCheckOptions, b as ChainProviderEntry } from './manager-BzalncRW.js';
2
+ export { A as ApiConfig, c as ChainType, d as ComposeLoaderError, C as ComposeLoaderOptions, e as ConnectorConfig, f as ContainerSpec, D as DerivedNodeKeys, g as DvmNodeConfig, h as EvmChainProvider, L as LoggingConfig, M as MillNodeConfig, i as MinaChainProvider, j as NodeKeyInfo, k as NodeKeys, l as NodesConfig, O as OrchestratorEvents, S as SolanaChainProvider, m as TownNodeConfig, n as TransportConfig, o as WalletConfig, p as WalletManagerConfig, q as WalletState, r as loadComposeTemplate, s as materializeComposeTemplate } from './manager-BzalncRW.js';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import Docker from 'dockerode';
5
5
  import { FastifyBaseLogger, FastifyInstance } from 'fastify';
package/dist/index.js CHANGED
@@ -34,9 +34,9 @@ import {
34
34
  utcYearBoundary,
35
35
  validateConfig,
36
36
  writeNodesYaml
37
- } from "./chunk-ZUMMJFGH.js";
37
+ } from "./chunk-UBFITLPQ.js";
38
38
  import "./chunk-5O4SBV5O.js";
39
- import "./chunk-NZR5C3KD.js";
39
+ import "./chunk-BLNEL3QS.js";
40
40
  import "./chunk-I2R4CRUX.js";
41
41
  export {
42
42
  BootReconciler,
@@ -88,8 +88,13 @@ interface EvmChainProvider {
88
88
  registryAddress: string;
89
89
  /** Settlement token (USDC, etc.) contract. */
90
90
  tokenAddress: string;
91
- /** Hex private key / key id the connector signs settlement claims with. */
92
- keyId: string;
91
+ /**
92
+ * Hex private key / key id the connector signs settlement claims with.
93
+ * Optional: when omitted, `townhouse hs up` fills it with the operator's
94
+ * mnemonic-derived apex settlement key (acct index 3). Set it only to use an
95
+ * external/hardware key.
96
+ */
97
+ keyId?: string;
93
98
  }
94
99
  /** Solana settlement chain. */
95
100
  interface SolanaChainProvider {
@@ -104,8 +109,11 @@ interface SolanaChainProvider {
104
109
  programId: string;
105
110
  /** Settlement token mint (base58). */
106
111
  tokenMint?: string;
107
- /** Key id the connector signs settlement claims with. */
108
- keyId: string;
112
+ /**
113
+ * Key id the connector signs settlement claims with. Optional — when omitted,
114
+ * `townhouse hs up` fills it with the operator's mnemonic-derived apex key.
115
+ */
116
+ keyId?: string;
109
117
  }
110
118
  /** Mina settlement chain. */
111
119
  interface MinaChainProvider {
@@ -537,6 +545,31 @@ declare class WalletManager {
537
545
  * still owned by WalletManager and will be zeroed by `lock()`.
538
546
  */
539
547
  getEvmPrivateKeyHex(nodeType: NodeType): string;
548
+ /**
549
+ * Derive the APEX (connector) settlement key from the operator mnemonic at
550
+ * ACCOUNT_INDEX_APEX. The apex signs settlement claims with this key, so the
551
+ * operator never has to supply a raw `keyId` to `townhouse chains add`.
552
+ *
553
+ * Returns the EVM private key as a `0x`-prefixed 64-char hex string — the
554
+ * form the connector config's `keyId` expects (matches the dev placeholder
555
+ * `0x7c85…`). Also returns Solana + Mina settlement keys (connector 3.9.0)
556
+ * derived at the same `ACCOUNT_INDEX_APEX`, in the RAW base58 form the
557
+ * connector resolves a non-EVM `keyId` as:
558
+ * - Solana: base58 of the 32-byte Ed25519 seed,
559
+ * - Mina: `EK…` base58check (via `hexToMinaBase58PrivateKey`).
560
+ *
561
+ * EVM derivation must always succeed (it throws on failure). Solana/Mina
562
+ * derivation is best-effort: if `deriveMillKeys` throws (unsupported
563
+ * platform, library load error) the corresponding key is OMITTED rather than
564
+ * failing the whole method, so the EVM keyId path is never blocked.
565
+ *
566
+ * Async because `deriveMillKeys` is async. Throws when the wallet is locked.
567
+ */
568
+ getApexSettlementKeys(): Promise<{
569
+ evmPrivateKeyHex: string;
570
+ solanaPrivateKeyBase58?: string;
571
+ minaPrivateKeyBase58?: string;
572
+ }>;
540
573
  /**
541
574
  * Returns the Solana Ed25519 private key seed for a node as a 64-char
542
575
  * lowercase hex string (32 raw seed bytes). Throws when the wallet is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toon-protocol/townhouse",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "TOON Townhouse — host-native orchestrator + dashboard for Docker-containerized TOON nodes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,44 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
-
3
- // src/constants.ts
4
- var CONTAINER_PREFIX = "townhouse-";
5
- var NODE_BTP_PORT = 3e3;
6
- var DEFAULT_CONNECTOR_IMAGE = (
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
14
- // native-build failure on Node 24 that left the settlement/claim subsystem
15
- // silently un-wired → value-bearing packets auto-fulfilled instead of
16
- // claim-gated) AND made inbound per-packet claim validation relation-aware
17
- // (toon-protocol/connector#78 — a child node skips the inline-claim
18
- // requirement for PREPAREs forwarded from its parent, unblocking Story 50.3's
19
- // AC#1 kind:1 F06 "No payment channel claim attached" on the apex→child hop).
20
- // No breaking changes to the SDK/admin contract within 3.x (verified >=3.3.2
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
23
- // CONNECTOR_RELEASE_CONTRACT.md.
24
- "ghcr.io/toon-protocol/connector@sha256:d22a786f82cc928238b0ef14c6455d1238bd2f42744138cad8af81ca1747ff6e"
25
- );
26
- var ACCOUNT_INDEX_TOWN = 0;
27
- var ACCOUNT_INDEX_MILL = 1;
28
- var ACCOUNT_INDEX_DVM = 2;
29
- var TOWN_HEALTH_PORT = 3100;
30
- var MILL_HEALTH_PORT = 3200;
31
- var DVM_HEALTH_PORT = 3400;
32
-
33
- export {
34
- CONTAINER_PREFIX,
35
- NODE_BTP_PORT,
36
- DEFAULT_CONNECTOR_IMAGE,
37
- ACCOUNT_INDEX_TOWN,
38
- ACCOUNT_INDEX_MILL,
39
- ACCOUNT_INDEX_DVM,
40
- TOWN_HEALTH_PORT,
41
- MILL_HEALTH_PORT,
42
- DVM_HEALTH_PORT
43
- };
44
- //# sourceMappingURL=chunk-NZR5C3KD.js.map
@@ -1 +0,0 @@
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":[]}