@toon-protocol/townhouse 0.7.0 → 0.9.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/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-DSkD9Td1.js';
3
+ import { C as ComposeLoaderOptions, T as TownhouseConfig, W as WalletManager, N as NodeType } from './manager-BzalncRW.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-ZUMMJFGH.js";
32
+ } from "./chunk-UBFITLPQ.js";
33
33
  import "./chunk-5O4SBV5O.js";
34
34
  import {
35
35
  CONTAINER_PREFIX
36
- } from "./chunk-NZR5C3KD.js";
36
+ } from "./chunk-BLNEL3QS.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-4ZF3RRNH.js");
2065
+ const { buildDemoConfig, DEMO_DETERMINISTIC_PASSWORD } = await import("./demo-COZ7SB5F.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
- writeHsConnectorConfig(configDir, config, { force });
3152
+ const apexSettlementKeys = await 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
- evm: --rpc-url <url> --registry <0x..> --token-address <0x..> --key-id <0x..>
3475
- solana: --rpc-url <url> --program-id <addr> --key-id <id> [--ws-url <url>] [--token-mint <addr>]
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: require2("--key-id", f.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: require2("--key-id", f.keyId)
3507
+ ...f.keyId ? { keyId: f.keyId } : {}
3506
3508
  };
3507
3509
  }
3508
3510
  return {