@toon-protocol/townhouse 0.6.0 → 0.8.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/README.md +61 -26
- package/dist/{chunk-ZUMMJFGH.js → chunk-BDT2FIQL.js} +608 -566
- package/dist/chunk-BDT2FIQL.js.map +1 -0
- package/dist/{chunk-NZR5C3KD.js → chunk-RCHQDZBZ.js} +3 -1
- package/dist/{chunk-NZR5C3KD.js.map → chunk-RCHQDZBZ.js.map} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +11 -9
- package/dist/cli.js.map +1 -1
- package/dist/compose/townhouse-hs.yml +8 -8
- package/dist/{demo-4ZF3RRNH.js → demo-CKC6HA7X.js} +2 -2
- package/dist/image-manifest.json +10 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{manager-DSkD9Td1.d.ts → manager-CKTAGzVH.d.ts} +25 -4
- package/package.json +5 -5
- package/dist/chunk-ZUMMJFGH.js.map +0 -1
- /package/dist/{demo-4ZF3RRNH.js.map → demo-CKC6HA7X.js.map} +0 -0
|
@@ -26,6 +26,7 @@ var DEFAULT_CONNECTOR_IMAGE = (
|
|
|
26
26
|
var ACCOUNT_INDEX_TOWN = 0;
|
|
27
27
|
var ACCOUNT_INDEX_MILL = 1;
|
|
28
28
|
var ACCOUNT_INDEX_DVM = 2;
|
|
29
|
+
var ACCOUNT_INDEX_APEX = 3;
|
|
29
30
|
var TOWN_HEALTH_PORT = 3100;
|
|
30
31
|
var MILL_HEALTH_PORT = 3200;
|
|
31
32
|
var DVM_HEALTH_PORT = 3400;
|
|
@@ -37,8 +38,9 @@ export {
|
|
|
37
38
|
ACCOUNT_INDEX_TOWN,
|
|
38
39
|
ACCOUNT_INDEX_MILL,
|
|
39
40
|
ACCOUNT_INDEX_DVM,
|
|
41
|
+
ACCOUNT_INDEX_APEX,
|
|
40
42
|
TOWN_HEALTH_PORT,
|
|
41
43
|
MILL_HEALTH_PORT,
|
|
42
44
|
DVM_HEALTH_PORT
|
|
43
45
|
};
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-RCHQDZBZ.js.map
|
|
@@ -1 +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.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;
|
|
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 * 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,EAkBX;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-CKTAGzVH.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-BDT2FIQL.js";
|
|
33
33
|
import "./chunk-5O4SBV5O.js";
|
|
34
34
|
import {
|
|
35
35
|
CONTAINER_PREFIX
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RCHQDZBZ.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-CKC6HA7X.js");
|
|
2066
2066
|
configToWrite = buildDemoConfig({ walletPath: join(dir, "wallet.enc") });
|
|
2067
2067
|
if (yes && !password) {
|
|
2068
2068
|
password = DEMO_DETERMINISTIC_PASSWORD;
|
|
@@ -3149,7 +3149,8 @@ async function handleHsUp(_configPath, configDir, config, docker, options) {
|
|
|
3149
3149
|
}
|
|
3150
3150
|
const ribbon = new OnboardingRibbon();
|
|
3151
3151
|
try {
|
|
3152
|
-
|
|
3152
|
+
const apexSettlementKeys = walletManager.getApexSettlementKeys();
|
|
3153
|
+
writeHsConnectorConfig(configDir, config, { force, apexSettlementKeys });
|
|
3153
3154
|
const materialize = hsOverrides?.materializeComposeTemplate ?? materializeComposeTemplate;
|
|
3154
3155
|
const { composePath } = materialize("hs", { townhouseHome: configDir });
|
|
3155
3156
|
writeHsNodeEnvFile(configDir, config);
|
|
@@ -3470,9 +3471,10 @@ Usage:
|
|
|
3470
3471
|
townhouse chains add --chain-type <evm|solana|mina> --chain-id <id> [fields] [-c <path>]
|
|
3471
3472
|
townhouse chains remove <chainId> [-c <path>]
|
|
3472
3473
|
|
|
3473
|
-
Fields by chain type
|
|
3474
|
-
|
|
3475
|
-
|
|
3474
|
+
Fields by chain type ([--key-id] is OPTIONAL \u2014 defaults to the operator's
|
|
3475
|
+
mnemonic-derived apex settlement key; pass it only for an external/hardware key):
|
|
3476
|
+
evm: --rpc-url <url> --registry <0x..> --token-address <0x..> [--key-id <0x..>]
|
|
3477
|
+
solana: --rpc-url <url> --program-id <addr> [--key-id <id>] [--ws-url <url>] [--token-mint <addr>]
|
|
3476
3478
|
mina: --graphql-url <url> --zkapp <addr> [--key-id <id>]`;
|
|
3477
3479
|
function buildChainProviderFromFlags(f) {
|
|
3478
3480
|
const { chainType, chainId } = f;
|
|
@@ -3491,7 +3493,7 @@ function buildChainProviderFromFlags(f) {
|
|
|
3491
3493
|
rpcUrl: require2("--rpc-url", f.rpcUrl),
|
|
3492
3494
|
registryAddress: require2("--registry", f.registry),
|
|
3493
3495
|
tokenAddress: require2("--token-address", f.tokenAddress),
|
|
3494
|
-
keyId:
|
|
3496
|
+
...f.keyId ? { keyId: f.keyId } : {}
|
|
3495
3497
|
};
|
|
3496
3498
|
}
|
|
3497
3499
|
if (chainType === "solana") {
|
|
@@ -3502,7 +3504,7 @@ function buildChainProviderFromFlags(f) {
|
|
|
3502
3504
|
...f.wsUrl ? { wsUrl: f.wsUrl } : {},
|
|
3503
3505
|
programId: require2("--program-id", f.programId),
|
|
3504
3506
|
...f.tokenMint ? { tokenMint: f.tokenMint } : {},
|
|
3505
|
-
keyId:
|
|
3507
|
+
...f.keyId ? { keyId: f.keyId } : {}
|
|
3506
3508
|
};
|
|
3507
3509
|
}
|
|
3508
3510
|
return {
|