@toon-protocol/townhouse 0.14.0 → 0.15.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-UBFITLPQ.js → chunk-DKMXPQTJ.js} +49 -4
- package/dist/chunk-DKMXPQTJ.js.map +1 -0
- package/dist/chunk-GPNMOJTR.js +51 -0
- package/dist/chunk-GPNMOJTR.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +3 -3
- package/dist/compose/townhouse-dev.yml +3 -3
- package/dist/compose/townhouse-hs.yml +10 -10
- package/dist/{demo-COZ7SB5F.js → demo-AXPH2QRB.js} +2 -2
- package/dist/image-manifest.json +12 -12
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{manager-BzalncRW.d.ts → manager-CbWZyFXp.d.ts} +28 -0
- package/package.json +2 -2
- package/dist/chunk-BLNEL3QS.js +0 -39
- package/dist/chunk-BLNEL3QS.js.map +0 -1
- package/dist/chunk-UBFITLPQ.js.map +0 -1
- /package/dist/{demo-COZ7SB5F.js.map → demo-AXPH2QRB.js.map} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
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.9.6 — full non-EVM settle chain. Completes the CLAIM_FROM_CHANNEL +
|
|
8
|
+
// SETTLE_CHANNEL on-chain settle for BOTH Solana and Mina, fixing #94/#95/#98/#99
|
|
9
|
+
// atop the earlier #88/#90/#92 work:
|
|
10
|
+
// #94 (3.9.4) — Solana Ed25519 precompile / on-chain message reconstruction.
|
|
11
|
+
// #95 (3.9.4) — Mina getChannelState missing setActiveInstance.
|
|
12
|
+
// #98 (3.9.5) — Mina balance-proof commitment was compared against the zkApp
|
|
13
|
+
// address; fixed to compare the on-chain `balanceCommitment`.
|
|
14
|
+
// #99 (3.9.5) — Solana CLAIM_FROM_CHANNEL fee-payer decoupled from the claiming
|
|
15
|
+
// participant so the connector can unilaterally redeem a
|
|
16
|
+
// peer-signed inbound claim.
|
|
17
|
+
// 3.9.6 — connector-CI fix only (no runtime change vs 3.9.5).
|
|
18
|
+
// Builds on 3.9.3's Solana settle-executor channel-lookup fix (#92), 3.9.2's Mina
|
|
19
|
+
// settlement-side proof-encoding fix (#90), 3.9.1's #88 fix (SettlementExecutor
|
|
20
|
+
// resolves the settlement chain for dynamic anonymous HS peers), and 3.9.1's
|
|
21
|
+
// blockchain-typed inbound claim validation (validateClaimMessage switches on
|
|
22
|
+
// claim.blockchain → validateEVMClaim / validateSolanaClaim / validateMinaClaim).
|
|
23
|
+
// validateSolanaClaim accepts { blockchain:'solana', programId, channelAccount
|
|
24
|
+
// (base58), nonce, transferredAmount, signature, signerPublicKey (base58),
|
|
25
|
+
// cluster? }. No breaking changes to the SDK/admin contract within 3.x (verified
|
|
26
|
+
// >=3.3.2 through 3.9.6 — see packages/sdk/CONNECTOR_MIGRATION.md). Digest
|
|
27
|
+
// resolved via `docker buildx imagetools inspect` for tag 3.9.6 (manifest-index
|
|
28
|
+
// digest). To bump: see CONNECTOR_RELEASE_CONTRACT.md.
|
|
29
|
+
"ghcr.io/toon-protocol/connector@sha256:98e9ea6bf9fad557f0c9d0100956c231acba0c4f38f8ca79ffd576d192b413ce"
|
|
30
|
+
);
|
|
31
|
+
var ACCOUNT_INDEX_TOWN = 0;
|
|
32
|
+
var ACCOUNT_INDEX_MILL = 1;
|
|
33
|
+
var ACCOUNT_INDEX_DVM = 2;
|
|
34
|
+
var ACCOUNT_INDEX_APEX = 3;
|
|
35
|
+
var TOWN_HEALTH_PORT = 3100;
|
|
36
|
+
var MILL_HEALTH_PORT = 3200;
|
|
37
|
+
var DVM_HEALTH_PORT = 3400;
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
CONTAINER_PREFIX,
|
|
41
|
+
NODE_BTP_PORT,
|
|
42
|
+
DEFAULT_CONNECTOR_IMAGE,
|
|
43
|
+
ACCOUNT_INDEX_TOWN,
|
|
44
|
+
ACCOUNT_INDEX_MILL,
|
|
45
|
+
ACCOUNT_INDEX_DVM,
|
|
46
|
+
ACCOUNT_INDEX_APEX,
|
|
47
|
+
TOWN_HEALTH_PORT,
|
|
48
|
+
MILL_HEALTH_PORT,
|
|
49
|
+
DVM_HEALTH_PORT
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=chunk-GPNMOJTR.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.9.6 — full non-EVM settle chain. Completes the CLAIM_FROM_CHANNEL +\n // SETTLE_CHANNEL on-chain settle for BOTH Solana and Mina, fixing #94/#95/#98/#99\n // atop the earlier #88/#90/#92 work:\n // #94 (3.9.4) — Solana Ed25519 precompile / on-chain message reconstruction.\n // #95 (3.9.4) — Mina getChannelState missing setActiveInstance.\n // #98 (3.9.5) — Mina balance-proof commitment was compared against the zkApp\n // address; fixed to compare the on-chain `balanceCommitment`.\n // #99 (3.9.5) — Solana CLAIM_FROM_CHANNEL fee-payer decoupled from the claiming\n // participant so the connector can unilaterally redeem a\n // peer-signed inbound claim.\n // 3.9.6 — connector-CI fix only (no runtime change vs 3.9.5).\n // Builds on 3.9.3's Solana settle-executor channel-lookup fix (#92), 3.9.2's Mina\n // settlement-side proof-encoding fix (#90), 3.9.1's #88 fix (SettlementExecutor\n // resolves the settlement chain for dynamic anonymous HS peers), and 3.9.1's\n // blockchain-typed inbound claim validation (validateClaimMessage switches on\n // claim.blockchain → validateEVMClaim / validateSolanaClaim / validateMinaClaim).\n // validateSolanaClaim accepts { blockchain:'solana', programId, channelAccount\n // (base58), nonce, transferredAmount, signature, signerPublicKey (base58),\n // cluster? }. No breaking changes to the SDK/admin contract within 3.x (verified\n // >=3.3.2 through 3.9.6 — see packages/sdk/CONNECTOR_MIGRATION.md). Digest\n // resolved via `docker buildx imagetools inspect` for tag 3.9.6 (manifest-index\n // digest). To bump: see CONNECTOR_RELEASE_CONTRACT.md.\n 'ghcr.io/toon-protocol/connector@sha256:98e9ea6bf9fad557f0c9d0100956c231acba0c4f38f8ca79ffd576d192b413ce';\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 * Apex (connector) settlement account. The apex is the parent connector\n * (`g.townhouse`) that signs settlement claims; its key is derived from the\n * operator mnemonic at this index so the operator never has to supply a raw\n * settlement key. Index 3 continues the town/mill/dvm sequence (and matches the\n * dev convention where the apex is Anvil account[3], 0x90F79bf6…).\n */\nexport const ACCOUNT_INDEX_APEX = 3;\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;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBX;AAAA;AAMK,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,oBAAoB;AAQ1B,IAAM,qBAAqB;AAG3B,IAAM,mBAAmB;AACzB,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;","names":[]}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import Docker from 'dockerode';
|
|
3
|
-
import { C as ComposeLoaderOptions, T as TownhouseConfig, W as WalletManager, N as NodeType } from './manager-
|
|
3
|
+
import { C as ComposeLoaderOptions, T as TownhouseConfig, W as WalletManager, N as NodeType } from './manager-CbWZyFXp.js';
|
|
4
4
|
import '@toon-protocol/core';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/cli.js
CHANGED
|
@@ -29,11 +29,11 @@ import {
|
|
|
29
29
|
tailContainerLogs,
|
|
30
30
|
writeHsConnectorConfig,
|
|
31
31
|
writeHsNodeEnvFile
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-DKMXPQTJ.js";
|
|
33
33
|
import "./chunk-5O4SBV5O.js";
|
|
34
34
|
import {
|
|
35
35
|
CONTAINER_PREFIX
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GPNMOJTR.js";
|
|
37
37
|
import {
|
|
38
38
|
formatRelativeTime,
|
|
39
39
|
formatUsdc
|
|
@@ -2062,7 +2062,7 @@ async function handleInit(force, configDir, password, preset, yes, network, endp
|
|
|
2062
2062
|
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
2063
2063
|
let configToWrite;
|
|
2064
2064
|
if (preset === "demo") {
|
|
2065
|
-
const { buildDemoConfig, DEMO_DETERMINISTIC_PASSWORD } = await import("./demo-
|
|
2065
|
+
const { buildDemoConfig, DEMO_DETERMINISTIC_PASSWORD } = await import("./demo-AXPH2QRB.js");
|
|
2066
2066
|
configToWrite = buildDemoConfig({ walletPath: join(dir, "wallet.enc") });
|
|
2067
2067
|
if (yes && !password) {
|
|
2068
2068
|
password = DEMO_DETERMINISTIC_PASSWORD;
|
|
@@ -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.9.
|
|
51
|
+
image: ghcr.io/toon-protocol/connector:3.9.6
|
|
52
52
|
container_name: townhouse-dev-connector
|
|
53
53
|
networks:
|
|
54
54
|
- townhouse-dev-net
|
|
@@ -174,7 +174,7 @@ services:
|
|
|
174
174
|
RUN_ARCHIVE_NODE: 'false'
|
|
175
175
|
SLOT_TIME: '20000'
|
|
176
176
|
ports:
|
|
177
|
-
- '127.0.0.1:28085:
|
|
177
|
+
- '127.0.0.1:28085:3085' # GraphQL (direct to daemon)
|
|
178
178
|
- '127.0.0.1:28181:8181' # Accounts Manager
|
|
179
179
|
networks:
|
|
180
180
|
- townhouse-dev-net
|
|
@@ -187,7 +187,7 @@ services:
|
|
|
187
187
|
test:
|
|
188
188
|
[
|
|
189
189
|
'CMD-SHELL',
|
|
190
|
-
'curl -sf -X POST -H "Content-Type: application/json" -d "{\"query\":\"{syncStatus}\"}" http://localhost:
|
|
190
|
+
'curl -sf -X POST -H "Content-Type: application/json" -d "{\"query\":\"{syncStatus}\"}" http://localhost:3085/graphql | grep -q SYNCED || exit 1',
|
|
191
191
|
]
|
|
192
192
|
interval: 10s
|
|
193
193
|
timeout: 10s
|
|
@@ -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:
|
|
26
|
-
# @sha256:
|
|
27
|
-
# @sha256:
|
|
28
|
-
# @sha256:
|
|
29
|
-
# @sha256:
|
|
25
|
+
# @sha256:b118c2bfc847d537f309b6bf97c87e797a82992a887abef5e939f4128b033d5e → @sha256:<hex>
|
|
26
|
+
# @sha256:7b3e2f6eaed34093f19598425bb3b10de9a9c4a939b364b56bf088f802b59a9a → @sha256:<hex>
|
|
27
|
+
# @sha256:c0419aa1f4140e55031284e498919e76fb4f3e075cffda91168a35a3e9e0e547 → @sha256:<hex>
|
|
28
|
+
# @sha256:b8efaf8a1cecac483e4c7908a78888df50e86255a7140e4f236ed3af1bfcb723 → @sha256:<hex>
|
|
29
|
+
# @sha256:98e9ea6bf9fad557f0c9d0100956c231acba0c4f38f8ca79ffd576d192b413ce → @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:
|
|
109
|
+
image: ghcr.io/toon-protocol/connector@sha256:98e9ea6bf9fad557f0c9d0100956c231acba0c4f38f8ca79ffd576d192b413ce
|
|
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:
|
|
160
|
+
image: ghcr.io/toon-protocol/townhouse-api@sha256:b118c2bfc847d537f309b6bf97c87e797a82992a887abef5e939f4128b033d5e
|
|
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:
|
|
267
|
+
image: ghcr.io/toon-protocol/town@sha256:7b3e2f6eaed34093f19598425bb3b10de9a9c4a939b364b56bf088f802b59a9a
|
|
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:
|
|
333
|
+
image: ghcr.io/toon-protocol/mill@sha256:c0419aa1f4140e55031284e498919e76fb4f3e075cffda91168a35a3e9e0e547
|
|
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:
|
|
391
|
+
image: ghcr.io/toon-protocol/dvm@sha256:b8efaf8a1cecac483e4c7908a78888df50e86255a7140e4f236ed3af1bfcb723
|
|
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-
|
|
4
|
+
} from "./chunk-GPNMOJTR.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-
|
|
118
|
+
//# sourceMappingURL=demo-AXPH2QRB.js.map
|
package/dist/image-manifest.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"townhouseVersion": "0.
|
|
4
|
-
"builtAt": "2026-06-
|
|
3
|
+
"townhouseVersion": "0.15.0",
|
|
4
|
+
"builtAt": "2026-06-07T00:15:48.768Z",
|
|
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.15.0",
|
|
9
|
+
"digest": "sha256:b118c2bfc847d537f309b6bf97c87e797a82992a887abef5e939f4128b033d5e"
|
|
10
10
|
},
|
|
11
11
|
"town": {
|
|
12
12
|
"name": "ghcr.io/toon-protocol/town",
|
|
13
|
-
"tag": "0.
|
|
14
|
-
"digest": "sha256:
|
|
13
|
+
"tag": "0.15.0",
|
|
14
|
+
"digest": "sha256:7b3e2f6eaed34093f19598425bb3b10de9a9c4a939b364b56bf088f802b59a9a"
|
|
15
15
|
},
|
|
16
16
|
"mill": {
|
|
17
17
|
"name": "ghcr.io/toon-protocol/mill",
|
|
18
|
-
"tag": "0.
|
|
19
|
-
"digest": "sha256:
|
|
18
|
+
"tag": "0.15.0",
|
|
19
|
+
"digest": "sha256:c0419aa1f4140e55031284e498919e76fb4f3e075cffda91168a35a3e9e0e547"
|
|
20
20
|
},
|
|
21
21
|
"dvm": {
|
|
22
22
|
"name": "ghcr.io/toon-protocol/dvm",
|
|
23
|
-
"tag": "0.
|
|
24
|
-
"digest": "sha256:
|
|
23
|
+
"tag": "0.15.0",
|
|
24
|
+
"digest": "sha256:b8efaf8a1cecac483e4c7908a78888df50e86255a7140e4f236ed3af1bfcb723"
|
|
25
25
|
},
|
|
26
26
|
"connector": {
|
|
27
27
|
"name": "ghcr.io/toon-protocol/connector",
|
|
28
|
-
"tag": "3.9.
|
|
29
|
-
"digest": "sha256:
|
|
28
|
+
"tag": "3.9.6",
|
|
29
|
+
"digest": "sha256:98e9ea6bf9fad557f0c9d0100956c231acba0c4f38f8ca79ffd576d192b413ce"
|
|
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-
|
|
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-
|
|
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-CbWZyFXp.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-CbWZyFXp.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-
|
|
37
|
+
} from "./chunk-DKMXPQTJ.js";
|
|
38
38
|
import "./chunk-5O4SBV5O.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-GPNMOJTR.js";
|
|
40
40
|
import "./chunk-I2R4CRUX.js";
|
|
41
41
|
export {
|
|
42
42
|
BootReconciler,
|
|
@@ -95,6 +95,34 @@ interface EvmChainProvider {
|
|
|
95
95
|
* external/hardware key.
|
|
96
96
|
*/
|
|
97
97
|
keyId?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Settlement tuning knobs. The connector reads its GLOBAL settlement
|
|
100
|
+
* threshold from the FIRST EVM chainProvider that carries `settlementOptions`
|
|
101
|
+
* (connector `connector-node.ts`: `chainProviders.find(evm && settlementOptions)`)
|
|
102
|
+
* and applies that single `threshold` as the `defaultThreshold` for the
|
|
103
|
+
* event-driven settlement monitor across ALL chains (EVM, Solana, Mina).
|
|
104
|
+
*
|
|
105
|
+
* When omitted the connector falls back to a default threshold of `1000000`,
|
|
106
|
+
* which exactly equals the per-publish fee (1 USDC at scale 6). Because the
|
|
107
|
+
* monitor triggers on `cumulativeAmount > threshold` (STRICTLY greater), a
|
|
108
|
+
* single paid publish at the default never crosses it and on-chain
|
|
109
|
+
* settlement (`claimFromChannel`/`SETTLE_CHANNEL`) is never triggered for a
|
|
110
|
+
* dynamically-registered (anonymous HS) peer. Set `threshold` BELOW the
|
|
111
|
+
* per-publish fee to make a single paid publish settle on-chain.
|
|
112
|
+
*
|
|
113
|
+
* Mirrors the connector's `EVMProviderConfig.settlementOptions` contract.
|
|
114
|
+
*/
|
|
115
|
+
settlementOptions?: {
|
|
116
|
+
/** Cumulative balance (in token base units, as a decimal string) that
|
|
117
|
+
* must be exceeded before the connector settles a peer on-chain. */
|
|
118
|
+
threshold?: string;
|
|
119
|
+
/** Channel settlement timeout in seconds (connector default 86400). */
|
|
120
|
+
settlementTimeoutSecs?: number;
|
|
121
|
+
/** Initial channel deposit multiplier (connector default 1). */
|
|
122
|
+
initialDepositMultiplier?: number;
|
|
123
|
+
/** Settlement polling interval in ms (legacy poll-based monitor). */
|
|
124
|
+
pollingIntervalMs?: number;
|
|
125
|
+
};
|
|
98
126
|
}
|
|
99
127
|
/** Solana settlement chain. */
|
|
100
128
|
interface SolanaChainProvider {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toon-protocol/townhouse",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.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,8 +73,8 @@
|
|
|
73
73
|
"vitest": "^1.0.0",
|
|
74
74
|
"@toon-protocol/client": "^0.9.1",
|
|
75
75
|
"@toon-protocol/core": "^1.4.1",
|
|
76
|
-
"@toon-protocol/relay": "^1.3.1",
|
|
77
76
|
"@toon-protocol/mill": "^0.1.0",
|
|
77
|
+
"@toon-protocol/relay": "^1.3.1",
|
|
78
78
|
"@toon-protocol/sdk": "^0.5.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
package/dist/chunk-BLNEL3QS.js
DELETED
|
@@ -1,39 +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.9.0 — wires Solana + Mina settlement end-to-end (toon-protocol/connector#86).
|
|
8
|
-
// Adds non-EVM key resolution (chainProviders[].keyId as a raw base58 private
|
|
9
|
-
// key, or SOLANA_PRIVATE_KEY / MINA_PRIVATE_KEY env), bootstrap registration of
|
|
10
|
-
// Solana/Mina payment-channel providers, and the non-EVM branch in the
|
|
11
|
-
// settlement executor. EVM settlement is unchanged. Builds on 3.8.1's dual-party
|
|
12
|
-
// Mina claim path (#84) and 3.8.0's libsql migration (#79) + relation-aware
|
|
13
|
-
// inbound claim validation (#78). No breaking changes to the SDK/admin contract
|
|
14
|
-
// within 3.x (verified >=3.3.2 through 3.9.0 — see packages/sdk/CONNECTOR_MIGRATION.md).
|
|
15
|
-
// Digest resolved via `docker buildx imagetools inspect` for tag 3.9.0. To bump:
|
|
16
|
-
// see CONNECTOR_RELEASE_CONTRACT.md.
|
|
17
|
-
"ghcr.io/toon-protocol/connector@sha256:673a49e30a5b9ae3968fe7ef5ca99b6ceca21bb69996bda68cd18ec335b874fe"
|
|
18
|
-
);
|
|
19
|
-
var ACCOUNT_INDEX_TOWN = 0;
|
|
20
|
-
var ACCOUNT_INDEX_MILL = 1;
|
|
21
|
-
var ACCOUNT_INDEX_DVM = 2;
|
|
22
|
-
var ACCOUNT_INDEX_APEX = 3;
|
|
23
|
-
var TOWN_HEALTH_PORT = 3100;
|
|
24
|
-
var MILL_HEALTH_PORT = 3200;
|
|
25
|
-
var DVM_HEALTH_PORT = 3400;
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
CONTAINER_PREFIX,
|
|
29
|
-
NODE_BTP_PORT,
|
|
30
|
-
DEFAULT_CONNECTOR_IMAGE,
|
|
31
|
-
ACCOUNT_INDEX_TOWN,
|
|
32
|
-
ACCOUNT_INDEX_MILL,
|
|
33
|
-
ACCOUNT_INDEX_DVM,
|
|
34
|
-
ACCOUNT_INDEX_APEX,
|
|
35
|
-
TOWN_HEALTH_PORT,
|
|
36
|
-
MILL_HEALTH_PORT,
|
|
37
|
-
DVM_HEALTH_PORT
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=chunk-BLNEL3QS.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.9.0 — wires Solana + Mina settlement end-to-end (toon-protocol/connector#86).\n // Adds non-EVM key resolution (chainProviders[].keyId as a raw base58 private\n // key, or SOLANA_PRIVATE_KEY / MINA_PRIVATE_KEY env), bootstrap registration of\n // Solana/Mina payment-channel providers, and the non-EVM branch in the\n // settlement executor. EVM settlement is unchanged. Builds on 3.8.1's dual-party\n // Mina claim path (#84) and 3.8.0's libsql migration (#79) + relation-aware\n // inbound claim validation (#78). No breaking changes to the SDK/admin contract\n // within 3.x (verified >=3.3.2 through 3.9.0 — see packages/sdk/CONNECTOR_MIGRATION.md).\n // Digest resolved via `docker buildx imagetools inspect` for tag 3.9.0. To bump:\n // see CONNECTOR_RELEASE_CONTRACT.md.\n 'ghcr.io/toon-protocol/connector@sha256:673a49e30a5b9ae3968fe7ef5ca99b6ceca21bb69996bda68cd18ec335b874fe';\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 * Apex (connector) settlement account. The apex is the parent connector\n * (`g.townhouse`) that signs settlement claims; its key is derived from the\n * operator mnemonic at this index so the operator never has to supply a raw\n * settlement key. Index 3 continues the town/mill/dvm sequence (and matches the\n * dev convention where the apex is Anvil account[3], 0x90F79bf6…).\n */\nexport const ACCOUNT_INDEX_APEX = 3;\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,EAWX;AAAA;AAMK,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,oBAAoB;AAQ1B,IAAM,qBAAqB;AAG3B,IAAM,mBAAmB;AACzB,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;","names":[]}
|