@toon-protocol/townhouse 0.3.2 → 0.5.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.
@@ -22,10 +22,10 @@
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:8ea74562b2951ece78e1c0dcd4f2ed19810e2dc12b3d49f608b3fa0ba5096ce2 → @sha256:<hex>
26
- # @sha256:c18fc293ced49bf76ab14a6bcae203d4e078c2a80857cf7d2274ca3c99c9b06b → @sha256:<hex>
27
- # @sha256:81d49762fd255d8c596c23885fae3c577cfe201860351a357ed0ad21fda12284 → @sha256:<hex>
28
- # @sha256:d9824a4ca71b0bcc332ffc282bc4e67031d62d989ffa8d471b6dd494ec954a9a → @sha256:<hex>
25
+ # @sha256:4f155c733c56b3d0a574694ffb3be9a8c9911d1eb446f362df262b55ebc3319b → @sha256:<hex>
26
+ # @sha256:97a8458097b452232c3838bab746f4a1a20461bfc1dfbb6b7ef26dfc8dca4c49 → @sha256:<hex>
27
+ # @sha256:be0911da96970e1b066d5124411280610f517ba8c9653510fe28b09baf087b2a → @sha256:<hex>
28
+ # @sha256:88f617f3d83e52daa37d14ab0728a649ffcb5a745e8904f0301fda43f341d9b7 → @sha256:<hex>
29
29
  # @sha256:d22a786f82cc928238b0ef14c6455d1238bd2f42744138cad8af81ca1747ff6e → @sha256:<hex>
30
30
  #
31
31
  # Scope guard (Story 45.2 does NOT include):
@@ -152,7 +152,7 @@ services:
152
152
  # Port D21-008: Fastify host API on 127.0.0.1:28090.
153
153
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
154
154
  townhouse-api:
155
- image: ghcr.io/toon-protocol/townhouse-api@sha256:8ea74562b2951ece78e1c0dcd4f2ed19810e2dc12b3d49f608b3fa0ba5096ce2
155
+ image: ghcr.io/toon-protocol/townhouse-api@sha256:4f155c733c56b3d0a574694ffb3be9a8c9911d1eb446f362df262b55ebc3319b
156
156
  container_name: townhouse-hs-api
157
157
  # Run as the operator's host UID so bind-mounted ~/.townhouse files
158
158
  # (rw------- 600) are readable. TOWNHOUSE_UID is injected by `townhouse hs up`.
@@ -252,7 +252,7 @@ services:
252
252
  # start at first run).
253
253
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
254
254
  town:
255
- image: ghcr.io/toon-protocol/town@sha256:c18fc293ced49bf76ab14a6bcae203d4e078c2a80857cf7d2274ca3c99c9b06b
255
+ image: ghcr.io/toon-protocol/town@sha256:97a8458097b452232c3838bab746f4a1a20461bfc1dfbb6b7ef26dfc8dca4c49
256
256
  container_name: townhouse-hs-town
257
257
  profiles: [town]
258
258
  networks:
@@ -271,7 +271,12 @@ services:
271
271
  NODE_ID: town
272
272
  PARENT_PEER_ID: apex
273
273
  FEE_PER_EVENT: '0'
274
- # Chain RPCoperator sets EVM_RPC_URL in ~/.townhouse/env or via CLI.
274
+ # Chain selectiondriven by the `network` flag (resolveNetworkProfile).
275
+ # EVM_CHAIN is the primary EVM preset name (e.g. base-mainnet) → town
276
+ # TOON_CHAIN; EVM_RPC_URL is the matching RPC. Both come from the node-env
277
+ # overlay (nodes-lifecycle buildNetworkNodeEnv) and ~/.townhouse/compose/.env
278
+ # (env-writer). 'none' makes the town node run relay-only (no settlement).
279
+ TOON_CHAIN: ${EVM_CHAIN:-}
275
280
  TOON_RPC_URL: ${EVM_RPC_URL:-}
276
281
  NODE_NOSTR_PUBKEY: ''
277
282
  NODE_EVM_ADDRESS: ''
@@ -303,7 +308,7 @@ services:
303
308
  # Lazy-provisioned via Epic 46: `townhouse node add mill`
304
309
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
305
310
  mill:
306
- image: ghcr.io/toon-protocol/mill@sha256:81d49762fd255d8c596c23885fae3c577cfe201860351a357ed0ad21fda12284
311
+ image: ghcr.io/toon-protocol/mill@sha256:be0911da96970e1b066d5124411280610f517ba8c9653510fe28b09baf087b2a
307
312
  container_name: townhouse-hs-mill
308
313
  profiles: [mill]
309
314
  networks:
@@ -351,7 +356,7 @@ services:
351
356
  # Lazy-provisioned via Epic 46: `townhouse node add dvm`
352
357
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
353
358
  dvm:
354
- image: ghcr.io/toon-protocol/dvm@sha256:d9824a4ca71b0bcc332ffc282bc4e67031d62d989ffa8d471b6dd494ec954a9a
359
+ image: ghcr.io/toon-protocol/dvm@sha256:88f617f3d83e52daa37d14ab0728a649ffcb5a745e8904f0301fda43f341d9b7
355
360
  container_name: townhouse-hs-dvm
356
361
  profiles: [dvm]
357
362
  networks:
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "townhouseVersion": "0.3.2",
4
- "builtAt": "2026-06-02T20:51:01.918Z",
3
+ "townhouseVersion": "0.5.0",
4
+ "builtAt": "2026-06-03T01:16:26.828Z",
5
5
  "images": {
6
6
  "townhouse-api": {
7
7
  "name": "ghcr.io/toon-protocol/townhouse-api",
8
- "tag": "0.3.2",
9
- "digest": "sha256:8ea74562b2951ece78e1c0dcd4f2ed19810e2dc12b3d49f608b3fa0ba5096ce2"
8
+ "tag": "0.5.0",
9
+ "digest": "sha256:4f155c733c56b3d0a574694ffb3be9a8c9911d1eb446f362df262b55ebc3319b"
10
10
  },
11
11
  "town": {
12
12
  "name": "ghcr.io/toon-protocol/town",
13
- "tag": "0.3.2",
14
- "digest": "sha256:c18fc293ced49bf76ab14a6bcae203d4e078c2a80857cf7d2274ca3c99c9b06b"
13
+ "tag": "0.5.0",
14
+ "digest": "sha256:97a8458097b452232c3838bab746f4a1a20461bfc1dfbb6b7ef26dfc8dca4c49"
15
15
  },
16
16
  "mill": {
17
17
  "name": "ghcr.io/toon-protocol/mill",
18
- "tag": "0.3.2",
19
- "digest": "sha256:81d49762fd255d8c596c23885fae3c577cfe201860351a357ed0ad21fda12284"
18
+ "tag": "0.5.0",
19
+ "digest": "sha256:be0911da96970e1b066d5124411280610f517ba8c9653510fe28b09baf087b2a"
20
20
  },
21
21
  "dvm": {
22
22
  "name": "ghcr.io/toon-protocol/dvm",
23
- "tag": "0.3.2",
24
- "digest": "sha256:d9824a4ca71b0bcc332ffc282bc4e67031d62d989ffa8d471b6dd494ec954a9a"
23
+ "tag": "0.5.0",
24
+ "digest": "sha256:88f617f3d83e52daa37d14ab0728a649ffcb5a745e8904f0301fda43f341d9b7"
25
25
  },
26
26
  "connector": {
27
27
  "name": "ghcr.io/toon-protocol/connector",
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
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-BtpOFwd6.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-BtpOFwd6.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-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';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import Docker from 'dockerode';
5
5
  import { FastifyBaseLogger, FastifyInstance } from 'fastify';
6
6
  import { z } from 'zod';
7
+ export { NetworkMode } from '@toon-protocol/core';
7
8
 
8
9
  /**
9
10
  * Wallet encryption/decryption for Townhouse (Story 21.4, Task 2).
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  utcYearBoundary,
35
35
  validateConfig,
36
36
  writeNodesYaml
37
- } from "./chunk-6T5CXPYD.js";
37
+ } from "./chunk-IXG4IYTG.js";
38
38
  import "./chunk-5O4SBV5O.js";
39
39
  import "./chunk-NZR5C3KD.js";
40
40
  import "./chunk-I2R4CRUX.js";
@@ -1,7 +1,10 @@
1
+ import { NetworkMode } from '@toon-protocol/core';
2
+
1
3
  /**
2
4
  * Townhouse configuration schema — TypeScript interfaces only.
3
5
  * Runtime validation lives in validator.ts.
4
6
  */
7
+
5
8
  interface TownNodeConfig {
6
9
  enabled: boolean;
7
10
  /** Nostr relay fee in millisatoshis per event */
@@ -196,12 +199,37 @@ interface TownhouseConfig {
196
199
  transport: TransportConfig;
197
200
  api: ApiConfig;
198
201
  logging: LoggingConfig;
202
+ /**
203
+ * Network mode selecting the chain tier for BOTH the apex connector and the
204
+ * child node containers (EVM = Base primary + Arbitrum; Solana; Mina):
205
+ * - `mainnet` (default when unset) — public production chains
206
+ * - `testnet` — public Sepolia / Solana testnet / Mina devnet
207
+ * - `devnet` — public Sepolia / Solana+Mina devnets (no local chain)
208
+ * - `custom` — operator supplies `chainProviders` directly, OR just RPC URLs
209
+ * via `endpoints` (below) to point at the project's dev chains
210
+ *
211
+ * Resolved via `resolveNetworkProfile()` (@toon-protocol/core). An explicit
212
+ * non-empty `chainProviders` always overrides the derived providers.
213
+ */
214
+ network?: NetworkMode;
215
+ /**
216
+ * Operator-supplied RPC URLs for `network: 'custom'` (`--evm-url`/`--sol-url`
217
+ * or EVM_URL/SOL_URL env). Points the apex + nodes at the project's dev chains
218
+ * hosted anywhere — e.g. the anvil + solana that scripts/akash-deploy.sh
219
+ * deploys to Akash (ingress hostnames rotate per redeploy, so the operator
220
+ * passes the current URLs). EVM is the chain-id 31338 Anvil
221
+ * (settlement-complete); Solana is RPC + Mock-USDC only (relay-only).
222
+ */
223
+ endpoints?: {
224
+ evmUrl?: string;
225
+ solUrl?: string;
226
+ };
199
227
  /**
200
228
  * Connector chain providers — required for the connector's settlement
201
229
  * subsystem (AccountManager + ClaimReceiver) to initialize. When unset on
202
- * `townhouse hs up`, `hs-config-writer.ts` injects
203
- * `DEFAULT_HS_CHAIN_PROVIDERS` so the earnings route returns 200 out of
204
- * the box (Epic 47 BUG-1 product fix).
230
+ * `townhouse hs up`, `hs-config-writer.ts` derives them from `network` (or
231
+ * injects `DEFAULT_HS_CHAIN_PROVIDERS` as a last resort) so the earnings
232
+ * route returns 200 out of the box (Epic 47 BUG-1 product fix).
205
233
  */
206
234
  chainProviders?: ChainProviderEntry[];
207
235
  /** Present only when the config was generated by `init --preset=<name>`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toon-protocol/townhouse",
3
- "version": "0.3.2",
3
+ "version": "0.5.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",
@@ -72,9 +72,9 @@
72
72
  "typescript": "^5.3.0",
73
73
  "vitest": "^1.0.0",
74
74
  "@toon-protocol/client": "^0.9.1",
75
+ "@toon-protocol/core": "^1.4.1",
75
76
  "@toon-protocol/mill": "^0.1.0",
76
77
  "@toon-protocol/relay": "^1.3.1",
77
- "@toon-protocol/core": "^1.4.1",
78
78
  "@toon-protocol/sdk": "^0.5.0"
79
79
  },
80
80
  "scripts": {