@toon-protocol/townhouse 0.1.3 → 0.3.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:2b4b38bba0538ff1be4ff966ba941461485718bf6c2ba09bdf4b75df3c700e84 → @sha256:<hex>
26
- # @sha256:36b0563b0bfc9fdda1a5723fb1496427188048cdf9f96c813b71c32161532874 → @sha256:<hex>
27
- # @sha256:1fd4e8015087314d9f99240ecce81f48bac318311f77aeacb57d881594d133cc → @sha256:<hex>
28
- # @sha256:ebc5f8e38672954a76c69bda90924a3a0ad7cdac42520f22d2e05960d06986ae → @sha256:<hex>
25
+ # @sha256:247e38556c5477952ba128eea9d7f2d3217c1d2d38c8d830996cfb4199797912 → @sha256:<hex>
26
+ # @sha256:e21109af0331ad8a8b4cb2ec9b953ef4fc5253af9564cbcbc14eba77f8afa3b2 → @sha256:<hex>
27
+ # @sha256:0d696eeed5a0f0b831f531f23c90bfcd2a40e5c07de127e9a6bdd8b2a68ea634 → @sha256:<hex>
28
+ # @sha256:778668561d71a37483b092950d6ded536b6edc6cde195b7c0e42904e9dfd32b0 → @sha256:<hex>
29
29
  # @sha256:3343c19649290043e521c81b467b7c6410b8eaedd76d48804ea9b6fc810cddb0 → @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:2b4b38bba0538ff1be4ff966ba941461485718bf6c2ba09bdf4b75df3c700e84
155
+ image: ghcr.io/toon-protocol/townhouse-api@sha256:247e38556c5477952ba128eea9d7f2d3217c1d2d38c8d830996cfb4199797912
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:36b0563b0bfc9fdda1a5723fb1496427188048cdf9f96c813b71c32161532874
255
+ image: ghcr.io/toon-protocol/town@sha256:e21109af0331ad8a8b4cb2ec9b953ef4fc5253af9564cbcbc14eba77f8afa3b2
256
256
  container_name: townhouse-hs-town
257
257
  profiles: [town]
258
258
  networks:
@@ -303,7 +303,7 @@ services:
303
303
  # Lazy-provisioned via Epic 46: `townhouse node add mill`
304
304
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
305
305
  mill:
306
- image: ghcr.io/toon-protocol/mill@sha256:1fd4e8015087314d9f99240ecce81f48bac318311f77aeacb57d881594d133cc
306
+ image: ghcr.io/toon-protocol/mill@sha256:0d696eeed5a0f0b831f531f23c90bfcd2a40e5c07de127e9a6bdd8b2a68ea634
307
307
  container_name: townhouse-hs-mill
308
308
  profiles: [mill]
309
309
  networks:
@@ -351,7 +351,7 @@ services:
351
351
  # Lazy-provisioned via Epic 46: `townhouse node add dvm`
352
352
  # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
353
353
  dvm:
354
- image: ghcr.io/toon-protocol/dvm@sha256:ebc5f8e38672954a76c69bda90924a3a0ad7cdac42520f22d2e05960d06986ae
354
+ image: ghcr.io/toon-protocol/dvm@sha256:778668561d71a37483b092950d6ded536b6edc6cde195b7c0e42904e9dfd32b0
355
355
  container_name: townhouse-hs-dvm
356
356
  profiles: [dvm]
357
357
  networks:
@@ -1,27 +1,27 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "townhouseVersion": "0.1.3",
4
- "builtAt": "2026-06-02T13:43:36.534Z",
3
+ "townhouseVersion": "0.3.0",
4
+ "builtAt": "2026-06-02T16:22:21.789Z",
5
5
  "images": {
6
6
  "townhouse-api": {
7
7
  "name": "ghcr.io/toon-protocol/townhouse-api",
8
- "tag": "0.1.3",
9
- "digest": "sha256:2b4b38bba0538ff1be4ff966ba941461485718bf6c2ba09bdf4b75df3c700e84"
8
+ "tag": "0.3.0",
9
+ "digest": "sha256:247e38556c5477952ba128eea9d7f2d3217c1d2d38c8d830996cfb4199797912"
10
10
  },
11
11
  "town": {
12
12
  "name": "ghcr.io/toon-protocol/town",
13
- "tag": "0.1.3",
14
- "digest": "sha256:36b0563b0bfc9fdda1a5723fb1496427188048cdf9f96c813b71c32161532874"
13
+ "tag": "0.3.0",
14
+ "digest": "sha256:e21109af0331ad8a8b4cb2ec9b953ef4fc5253af9564cbcbc14eba77f8afa3b2"
15
15
  },
16
16
  "mill": {
17
17
  "name": "ghcr.io/toon-protocol/mill",
18
- "tag": "0.1.3",
19
- "digest": "sha256:1fd4e8015087314d9f99240ecce81f48bac318311f77aeacb57d881594d133cc"
18
+ "tag": "0.3.0",
19
+ "digest": "sha256:0d696eeed5a0f0b831f531f23c90bfcd2a40e5c07de127e9a6bdd8b2a68ea634"
20
20
  },
21
21
  "dvm": {
22
22
  "name": "ghcr.io/toon-protocol/dvm",
23
- "tag": "0.1.3",
24
- "digest": "sha256:ebc5f8e38672954a76c69bda90924a3a0ad7cdac42520f22d2e05960d06986ae"
23
+ "tag": "0.3.0",
24
+ "digest": "sha256:778668561d71a37483b092950d6ded536b6edc6cde195b7c0e42904e9dfd32b0"
25
25
  },
26
26
  "connector": {
27
27
  "name": "ghcr.io/toon-protocol/connector",
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 } from './manager-SsneW_Mj.js';
2
- export { A as ApiConfig, b as ComposeLoaderError, C as ComposeLoaderOptions, c as ConnectorConfig, d as ContainerSpec, D as DerivedNodeKeys, e as DvmNodeConfig, L as LoggingConfig, M as MillNodeConfig, f as NodeKeyInfo, g as NodeKeys, h as NodesConfig, O as OrchestratorEvents, i as TownNodeConfig, j as TransportConfig, k as WalletConfig, l as WalletManagerConfig, m as WalletState, n as loadComposeTemplate, o as materializeComposeTemplate } from './manager-SsneW_Mj.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-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';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import Docker from 'dockerode';
5
5
  import { FastifyBaseLogger, FastifyInstance } from 'fastify';
@@ -1269,6 +1269,12 @@ interface WizardInitRequest {
1269
1269
  transport: {
1270
1270
  mode: 'direct' | 'ator';
1271
1271
  };
1272
+ /**
1273
+ * Optional settlement chains (connector chainProviders) to configure during
1274
+ * first-run setup. Omitted/empty → the connector uses the dev-Anvil default.
1275
+ * Validated deeply when the resulting config is saved.
1276
+ */
1277
+ chainProviders?: ChainProviderEntry[];
1272
1278
  }
1273
1279
  /** Progress messages streamed over WS /api/wizard/progress */
1274
1280
  type WizardProgressMessage = {
@@ -2038,4 +2044,4 @@ declare class BootReconciler {
2038
2044
  private appendLog;
2039
2045
  }
2040
2046
 
2041
- export { type AggregateEarningsInput, type AggregatedEarnings, type AggregatedEarningsStatus, type AggregatorLogger, type ApiDeps, type ApiServer, type BandwidthPayload, BandwidthStats, BootReconciler, ComposeProfile, ConfigValidationError, ConnectorAdminClient, ConnectorConfigGenerator, type ConnectorRuntimeConfig, DEFAULT_ATOR_PROXY, type DeltaComputer, type DepositAddressEntry, type DepositAddressesPayload, type DivergenceAction, type DivergenceLog, DockerOrchestrator, type DvmHealthResponse, EncryptedWallet, HealthCheckOptions, type HealthResponse, type HsHostnameResponse, type ImageManifest, ImageManifestSchema, type JobsByKindEntry, type JobsRecentPayload, type MetricsPayload, type MetricsPeerEntry, type MetricsResponse, type MillHealthResponse, type MillSwapsRecentPayload, type NodeDetail, type NodeEarnings, type NodeHealthPayload, type NodeInfo, type NodeState, NodeType$1 as NodeType, type NodesYaml, type NodesYamlEntry, NodesYamlEntrySchema, NodesYamlSchema, type NostrEventPayload, OrchestratorError, type PacketLogEntry, type PacketLogFilter, type PacketTimeseriesPayload, type PeerEntry, type PeerStatus, PeerTypeResolver, type PeersResponse, type PerAsset, type ReconcileSummary, type RevealRequest, type RevealResponse, type SnapshotEntry, SnapshotWriter, type SnapshotWriterOptions, type SwapByPairEntry, type TimeseriesBucket, type TownHealthPayload, TownhouseConfig, type TransactionReceiptPayload, type TransportPatchRequest, type TransportPatchResponse, TransportProbe, type TransportStatusPayload, type WalletBalanceEntry, type WalletBalancesPayload, WalletManager, type WithdrawDryRunResponse, type WithdrawRequest, type WithdrawResponse, type WithdrawSuccessResponse, type WizardInitRequest, type WizardProgressMessage, type WizardStatePayload, type WsBatchMessage, type WsConnectorRestartedMessage, type WsConnectorRestartingMessage, type WsHeartbeatMessage, type WsMessage, type WsMetricsMessage, type WsNodeStateMessage, type WsRelayEventsMessage, createApiServer, createDeltaComputer, createWizardApiServer, decryptWallet, encryptWallet, getDefaultConfig, loadConfig, loadWallet, readImageManifest, readNodesYaml, saveConfig, saveWallet, utcDayBoundary, utcMonthBoundary, utcYearBoundary, validateConfig, writeNodesYaml };
2047
+ export { type AggregateEarningsInput, type AggregatedEarnings, type AggregatedEarningsStatus, type AggregatorLogger, type ApiDeps, type ApiServer, type BandwidthPayload, BandwidthStats, BootReconciler, ChainProviderEntry, ComposeProfile, ConfigValidationError, ConnectorAdminClient, ConnectorConfigGenerator, type ConnectorRuntimeConfig, DEFAULT_ATOR_PROXY, type DeltaComputer, type DepositAddressEntry, type DepositAddressesPayload, type DivergenceAction, type DivergenceLog, DockerOrchestrator, type DvmHealthResponse, EncryptedWallet, HealthCheckOptions, type HealthResponse, type HsHostnameResponse, type ImageManifest, ImageManifestSchema, type JobsByKindEntry, type JobsRecentPayload, type MetricsPayload, type MetricsPeerEntry, type MetricsResponse, type MillHealthResponse, type MillSwapsRecentPayload, type NodeDetail, type NodeEarnings, type NodeHealthPayload, type NodeInfo, type NodeState, NodeType$1 as NodeType, type NodesYaml, type NodesYamlEntry, NodesYamlEntrySchema, NodesYamlSchema, type NostrEventPayload, OrchestratorError, type PacketLogEntry, type PacketLogFilter, type PacketTimeseriesPayload, type PeerEntry, type PeerStatus, PeerTypeResolver, type PeersResponse, type PerAsset, type ReconcileSummary, type RevealRequest, type RevealResponse, type SnapshotEntry, SnapshotWriter, type SnapshotWriterOptions, type SwapByPairEntry, type TimeseriesBucket, type TownHealthPayload, TownhouseConfig, type TransactionReceiptPayload, type TransportPatchRequest, type TransportPatchResponse, TransportProbe, type TransportStatusPayload, type WalletBalanceEntry, type WalletBalancesPayload, WalletManager, type WithdrawDryRunResponse, type WithdrawRequest, type WithdrawResponse, type WithdrawSuccessResponse, type WizardInitRequest, type WizardProgressMessage, type WizardStatePayload, type WsBatchMessage, type WsConnectorRestartedMessage, type WsConnectorRestartingMessage, type WsHeartbeatMessage, type WsMessage, type WsMetricsMessage, type WsNodeStateMessage, type WsRelayEventsMessage, createApiServer, createDeltaComputer, createWizardApiServer, decryptWallet, encryptWallet, getDefaultConfig, loadConfig, loadWallet, readImageManifest, readNodesYaml, saveConfig, saveWallet, utcDayBoundary, utcMonthBoundary, utcYearBoundary, validateConfig, writeNodesYaml };
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  utcYearBoundary,
35
35
  validateConfig,
36
36
  writeNodesYaml
37
- } from "./chunk-QHFUIWEN.js";
37
+ } from "./chunk-B4KWPVEK.js";
38
38
  import "./chunk-5O4SBV5O.js";
39
39
  import "./chunk-GQNBZJ6F.js";
40
40
  import "./chunk-I2R4CRUX.js";
@@ -58,29 +58,65 @@ interface ConnectorConfig {
58
58
  adminPort: number;
59
59
  }
60
60
  /**
61
- * Connector chain-provider entry — surfaces what the connector needs to spin
62
- * up its settlement subsystem (AccountManager + ClaimReceiver). Without at
63
- * least one entry, `/admin/earnings.json` returns 503 and Townhouse's
61
+ * Connector chain-provider entry — what the connector needs to spin up its
62
+ * settlement subsystem (AccountManager + ClaimReceiver) for one chain. Without
63
+ * at least one entry, `/admin/earnings.json` returns 503 and Townhouse's
64
64
  * earnings data plane breaks (Epic 47 BUG-1).
65
65
  *
66
+ * This is a discriminated union on `chainType` that mirrors the connector's
67
+ * `ProviderConfig` contract (EVM | Solana | Mina), so entries pass straight
68
+ * through `ConnectorConfigGenerator` to the connector. The connector already
69
+ * implements payment-channel providers for all three chains.
70
+ *
66
71
  * Dev-Anvil deterministic placeholders are exposed via
67
72
  * `DEFAULT_HS_CHAIN_PROVIDERS` in `defaults.ts`; operators running on real
68
73
  * chains override this in their `config.yaml`.
69
74
  */
70
- interface ChainProviderEntry {
71
- /** Currently only 'evm' supported. */
75
+ /** Supported settlement chain families. */
76
+ type ChainType = 'evm' | 'solana' | 'mina';
77
+ /** EVM settlement chain (Base, Arbitrum, Anvil dev, …). */
78
+ interface EvmChainProvider {
72
79
  chainType: 'evm';
73
80
  /** Canonical chain id, e.g. 'evm:base:31337' (dev-Anvil) or 'evm:base:8453' (mainnet). */
74
81
  chainId: string;
75
- /** Chain RPC endpoint. May be a dead address in offline/demo mode. */
82
+ /** JSON-RPC endpoint. May be a dead address in offline/demo mode. */
76
83
  rpcUrl: string;
77
84
  /** PaymentChannel registry contract. */
78
85
  registryAddress: string;
79
86
  /** Settlement token (USDC, etc.) contract. */
80
87
  tokenAddress: string;
81
- /** Hex private key the connector signs settlement claims with. */
88
+ /** Hex private key / key id the connector signs settlement claims with. */
89
+ keyId: string;
90
+ }
91
+ /** Solana settlement chain. */
92
+ interface SolanaChainProvider {
93
+ chainType: 'solana';
94
+ /** Canonical chain id, e.g. 'solana:devnet' or 'solana:mainnet'. */
95
+ chainId: string;
96
+ /** Cluster RPC endpoint (HTTP). */
97
+ rpcUrl: string;
98
+ /** WebSocket endpoint for account subscriptions (derived from rpcUrl if absent). */
99
+ wsUrl?: string;
100
+ /** On-chain payment-channel program id (base58). */
101
+ programId: string;
102
+ /** Settlement token mint (base58). */
103
+ tokenMint?: string;
104
+ /** Key id the connector signs settlement claims with. */
82
105
  keyId: string;
83
106
  }
107
+ /** Mina settlement chain. */
108
+ interface MinaChainProvider {
109
+ chainType: 'mina';
110
+ /** Canonical chain id, e.g. 'mina:devnet' or 'mina:mainnet'. */
111
+ chainId: string;
112
+ /** Mina GraphQL endpoint. */
113
+ graphqlUrl: string;
114
+ /** zkApp address for the payment-channel contract (base58). */
115
+ zkAppAddress: string;
116
+ /** Key id the connector signs settlement claims with. */
117
+ keyId?: string;
118
+ }
119
+ type ChainProviderEntry = EvmChainProvider | SolanaChainProvider | MinaChainProvider;
84
120
  /**
85
121
  * Hidden-service publication config (Story 35.5 of the connector repo).
86
122
  *
@@ -516,4 +552,4 @@ declare class WalletManager {
516
552
  private deriveNodeKeys;
517
553
  }
518
554
 
519
- export { type ApiConfig as A, type BandwidthStats as B, type ComposeLoaderOptions as C, type DerivedNodeKeys as D, type EncryptedWallet as E, type HealthCheckOptions as H, type LoggingConfig as L, type MillNodeConfig as M, type NodeType as N, type OrchestratorEvents as O, type TownhouseConfig as T, WalletManager as W, type ComposeProfile as a, ComposeLoaderError as b, type ConnectorConfig as c, type ContainerSpec as d, type DvmNodeConfig as e, type NodeKeyInfo as f, type NodeKeys as g, type NodesConfig as h, type TownNodeConfig as i, type TransportConfig as j, type WalletConfig as k, type WalletManagerConfig as l, type WalletState as m, loadComposeTemplate as n, materializeComposeTemplate as o };
555
+ export { type ApiConfig as A, type BandwidthStats as B, type ComposeLoaderOptions as C, type DerivedNodeKeys as D, type EncryptedWallet as E, type HealthCheckOptions as H, type LoggingConfig as L, type MillNodeConfig as M, type NodeType as N, type OrchestratorEvents as O, type SolanaChainProvider as S, type TownhouseConfig as T, WalletManager as W, type ComposeProfile as a, type ChainProviderEntry as b, type ChainType as c, ComposeLoaderError as d, type ConnectorConfig as e, type ContainerSpec as f, type DvmNodeConfig as g, type EvmChainProvider as h, type MinaChainProvider as i, type NodeKeyInfo as j, type NodeKeys as k, type NodesConfig as l, type TownNodeConfig as m, type TransportConfig as n, type WalletConfig as o, type WalletManagerConfig as p, type WalletState as q, loadComposeTemplate as r, materializeComposeTemplate as s };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toon-protocol/townhouse",
3
- "version": "0.1.3",
3
+ "version": "0.3.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",
@@ -71,11 +71,11 @@
71
71
  "tsup": "^8.0.0",
72
72
  "typescript": "^5.3.0",
73
73
  "vitest": "^1.0.0",
74
- "@toon-protocol/core": "^1.4.1",
74
+ "@toon-protocol/client": "^0.9.1",
75
75
  "@toon-protocol/mill": "^0.1.0",
76
- "@toon-protocol/sdk": "^0.5.0",
77
76
  "@toon-protocol/relay": "^1.3.1",
78
- "@toon-protocol/client": "^0.9.1"
77
+ "@toon-protocol/core": "^1.4.1",
78
+ "@toon-protocol/sdk": "^0.5.0"
79
79
  },
80
80
  "scripts": {
81
81
  "build": "tsup",