@toon-protocol/townhouse 0.1.3 → 0.2.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.
- package/dist/{chunk-QHFUIWEN.js → chunk-B4KWPVEK.js} +206 -33
- package/dist/chunk-B4KWPVEK.js.map +1 -0
- package/dist/cli.d.ts +1 -7
- package/dist/cli.js +181 -2
- package/dist/cli.js.map +1 -1
- package/dist/compose/townhouse-hs.yml +8 -8
- package/dist/image-manifest.json +10 -10
- package/dist/index.d.ts +9 -3
- package/dist/index.js +1 -1
- package/dist/{manager-SsneW_Mj.d.ts → manager-BtpOFwd6.d.ts} +44 -8
- package/package.json +3 -3
- package/dist/chunk-QHFUIWEN.js.map +0 -1
|
@@ -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:
|
|
26
|
-
# @sha256:
|
|
27
|
-
# @sha256:
|
|
28
|
-
# @sha256:
|
|
25
|
+
# @sha256:f8f5d24ea14f288d2469459cf38ffcb93c5aa30c70c5387fe5451259cd78b8c4 → @sha256:<hex>
|
|
26
|
+
# @sha256:464e556d2388d3f804987340fd0a4369ca9de0b8e4f8e00072ef5a821e5107bc → @sha256:<hex>
|
|
27
|
+
# @sha256:d60e3678b376b5215ce10a8730632dcb7042265aaeefde254b1d1feed4e8088b → @sha256:<hex>
|
|
28
|
+
# @sha256:b7b5f3522a5885c0fdb4197181ee55dfae795782c3f4a81aae24e1422fccbd9e → @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:
|
|
155
|
+
image: ghcr.io/toon-protocol/townhouse-api@sha256:f8f5d24ea14f288d2469459cf38ffcb93c5aa30c70c5387fe5451259cd78b8c4
|
|
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:
|
|
255
|
+
image: ghcr.io/toon-protocol/town@sha256:464e556d2388d3f804987340fd0a4369ca9de0b8e4f8e00072ef5a821e5107bc
|
|
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:
|
|
306
|
+
image: ghcr.io/toon-protocol/mill@sha256:d60e3678b376b5215ce10a8730632dcb7042265aaeefde254b1d1feed4e8088b
|
|
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:
|
|
354
|
+
image: ghcr.io/toon-protocol/dvm@sha256:b7b5f3522a5885c0fdb4197181ee55dfae795782c3f4a81aae24e1422fccbd9e
|
|
355
355
|
container_name: townhouse-hs-dvm
|
|
356
356
|
profiles: [dvm]
|
|
357
357
|
networks:
|
package/dist/image-manifest.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"townhouseVersion": "0.
|
|
4
|
-
"builtAt": "2026-06-
|
|
3
|
+
"townhouseVersion": "0.2.0",
|
|
4
|
+
"builtAt": "2026-06-02T15:50:15.649Z",
|
|
5
5
|
"images": {
|
|
6
6
|
"townhouse-api": {
|
|
7
7
|
"name": "ghcr.io/toon-protocol/townhouse-api",
|
|
8
|
-
"tag": "0.
|
|
9
|
-
"digest": "sha256:
|
|
8
|
+
"tag": "0.2.0",
|
|
9
|
+
"digest": "sha256:f8f5d24ea14f288d2469459cf38ffcb93c5aa30c70c5387fe5451259cd78b8c4"
|
|
10
10
|
},
|
|
11
11
|
"town": {
|
|
12
12
|
"name": "ghcr.io/toon-protocol/town",
|
|
13
|
-
"tag": "0.
|
|
14
|
-
"digest": "sha256:
|
|
13
|
+
"tag": "0.2.0",
|
|
14
|
+
"digest": "sha256:464e556d2388d3f804987340fd0a4369ca9de0b8e4f8e00072ef5a821e5107bc"
|
|
15
15
|
},
|
|
16
16
|
"mill": {
|
|
17
17
|
"name": "ghcr.io/toon-protocol/mill",
|
|
18
|
-
"tag": "0.
|
|
19
|
-
"digest": "sha256:
|
|
18
|
+
"tag": "0.2.0",
|
|
19
|
+
"digest": "sha256:d60e3678b376b5215ce10a8730632dcb7042265aaeefde254b1d1feed4e8088b"
|
|
20
20
|
},
|
|
21
21
|
"dvm": {
|
|
22
22
|
"name": "ghcr.io/toon-protocol/dvm",
|
|
23
|
-
"tag": "0.
|
|
24
|
-
"digest": "sha256:
|
|
23
|
+
"tag": "0.2.0",
|
|
24
|
+
"digest": "sha256:b7b5f3522a5885c0fdb4197181ee55dfae795782c3f4a81aae24e1422fccbd9e"
|
|
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-
|
|
2
|
-
export { A as ApiConfig,
|
|
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
|
@@ -58,29 +58,65 @@ interface ConnectorConfig {
|
|
|
58
58
|
adminPort: number;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* Connector chain-provider entry —
|
|
62
|
-
*
|
|
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
|
-
|
|
71
|
-
|
|
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
|
-
/**
|
|
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,
|
|
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.
|
|
3
|
+
"version": "0.2.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",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"vitest": "^1.0.0",
|
|
74
74
|
"@toon-protocol/core": "^1.4.1",
|
|
75
75
|
"@toon-protocol/mill": "^0.1.0",
|
|
76
|
-
"@toon-protocol/
|
|
76
|
+
"@toon-protocol/client": "^0.9.1",
|
|
77
77
|
"@toon-protocol/relay": "^1.3.1",
|
|
78
|
-
"@toon-protocol/
|
|
78
|
+
"@toon-protocol/sdk": "^0.5.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "tsup",
|