@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.
@@ -35,7 +35,7 @@ import {
35
35
  MILL_HEALTH_PORT,
36
36
  NODE_BTP_PORT,
37
37
  TOWN_HEALTH_PORT
38
- } from "./chunk-BLNEL3QS.js";
38
+ } from "./chunk-GPNMOJTR.js";
39
39
  import {
40
40
  __commonJS,
41
41
  __require,
@@ -6498,13 +6498,51 @@ function validateConfig(raw) {
6498
6498
  );
6499
6499
  }
6500
6500
  }
6501
+ let settlementOptions;
6502
+ if (entry["settlementOptions"] !== void 0) {
6503
+ const soPath = `${path}.settlementOptions`;
6504
+ assertObject(entry["settlementOptions"], soPath);
6505
+ const so = entry["settlementOptions"];
6506
+ settlementOptions = {};
6507
+ if (so["threshold"] !== void 0) {
6508
+ assertString(so["threshold"], `${soPath}.threshold`);
6509
+ if (!/^\d+$/.test(so["threshold"])) {
6510
+ throw new ConfigValidationError(
6511
+ `${soPath}.threshold must be a non-negative integer string (token base units)`
6512
+ );
6513
+ }
6514
+ settlementOptions.threshold = so["threshold"];
6515
+ }
6516
+ if (so["settlementTimeoutSecs"] !== void 0) {
6517
+ assertNumber(
6518
+ so["settlementTimeoutSecs"],
6519
+ `${soPath}.settlementTimeoutSecs`
6520
+ );
6521
+ settlementOptions.settlementTimeoutSecs = so["settlementTimeoutSecs"];
6522
+ }
6523
+ if (so["initialDepositMultiplier"] !== void 0) {
6524
+ assertNumber(
6525
+ so["initialDepositMultiplier"],
6526
+ `${soPath}.initialDepositMultiplier`
6527
+ );
6528
+ settlementOptions.initialDepositMultiplier = so["initialDepositMultiplier"];
6529
+ }
6530
+ if (so["pollingIntervalMs"] !== void 0) {
6531
+ assertNumber(
6532
+ so["pollingIntervalMs"],
6533
+ `${soPath}.pollingIntervalMs`
6534
+ );
6535
+ settlementOptions.pollingIntervalMs = so["pollingIntervalMs"];
6536
+ }
6537
+ }
6501
6538
  return {
6502
6539
  chainType: "evm",
6503
6540
  chainId: entry["chainId"],
6504
6541
  rpcUrl: entry["rpcUrl"],
6505
6542
  registryAddress: entry["registryAddress"],
6506
6543
  tokenAddress: entry["tokenAddress"],
6507
- ...entry["keyId"] !== void 0 ? { keyId: entry["keyId"] } : {}
6544
+ ...entry["keyId"] !== void 0 ? { keyId: entry["keyId"] } : {},
6545
+ ...settlementOptions !== void 0 ? { settlementOptions } : {}
6508
6546
  };
6509
6547
  }
6510
6548
  if (chainType === "solana") {
@@ -6814,7 +6852,14 @@ var ConnectorConfigGenerator = class {
6814
6852
  rpcUrl: p.rpcUrl,
6815
6853
  registryAddress: p.registryAddress,
6816
6854
  tokenAddress: p.tokenAddress,
6817
- ...p.keyId !== void 0 ? { keyId: p.keyId } : {}
6855
+ ...p.keyId !== void 0 ? { keyId: p.keyId } : {},
6856
+ // The connector reads its GLOBAL settlement threshold from the
6857
+ // first EVM chainProvider carrying `settlementOptions`. Pass it
6858
+ // through so operators can lower the threshold below the
6859
+ // per-publish fee and have single paid publishes settle on-chain
6860
+ // (including for Solana/Mina dynamic peers — one defaultThreshold
6861
+ // governs all chains). See EvmChainProvider.settlementOptions.
6862
+ ...p.settlementOptions !== void 0 ? { settlementOptions: p.settlementOptions } : {}
6818
6863
  };
6819
6864
  }
6820
6865
  if (p.chainType === "solana") {
@@ -23003,4 +23048,4 @@ export {
23003
23048
  @scure/bip32/index.js:
23004
23049
  (*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
23005
23050
  */
23006
- //# sourceMappingURL=chunk-UBFITLPQ.js.map
23051
+ //# sourceMappingURL=chunk-DKMXPQTJ.js.map