@toon-protocol/townhouse 0.5.4 → 0.6.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-FFGRTYIK.js → chunk-ZUMMJFGH.js} +21 -4
- package/dist/{chunk-FFGRTYIK.js.map → chunk-ZUMMJFGH.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/compose/townhouse-dev.yml +10 -5
- package/dist/compose/townhouse-hs.yml +21 -11
- package/dist/image-manifest.json +10 -10
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -14544,6 +14544,13 @@ var NodesYamlEntrySchema = z.object({
|
|
|
14544
14544
|
peerId: z.string().min(1),
|
|
14545
14545
|
ilpAddress: z.string().min(1),
|
|
14546
14546
|
derivationIndex: z.number().int().nonnegative(),
|
|
14547
|
+
// x-only Nostr pubkey (32-byte / 64-char lowercase hex) derived from the
|
|
14548
|
+
// node's secret key at provisioning time. Surfaced by `node list --json`
|
|
14549
|
+
// so operators / SDK clients can read e.g. the mill pubkey (for streamSwap
|
|
14550
|
+
// seal verification) without re-deriving from the secret (issue #81).
|
|
14551
|
+
// Optional for backward compatibility with nodes.yaml files written before
|
|
14552
|
+
// the field existed.
|
|
14553
|
+
nostrPubkey: z.string().regex(/^[0-9a-f]{64}$/, "must be 64-char lowercase hex").optional(),
|
|
14547
14554
|
enabledAt: z.string().datetime({ offset: true }),
|
|
14548
14555
|
lastSeenAt: z.string().datetime({ offset: true }).nullable()
|
|
14549
14556
|
}).strict();
|
|
@@ -20417,12 +20424,13 @@ function buildNetworkNodeEnv(config) {
|
|
|
20417
20424
|
}
|
|
20418
20425
|
return env;
|
|
20419
20426
|
}
|
|
20420
|
-
function buildNodeEnv(type, nostrSecretKeyHex, evmPrivateKeyHex, mnemonic, apexEvmAddress, chainEnv) {
|
|
20427
|
+
function buildNodeEnv(type, nostrSecretKeyHex, nostrPubkeyHex, evmPrivateKeyHex, mnemonic, apexEvmAddress, chainEnv) {
|
|
20421
20428
|
const evmPrivateKeyHex0x = `0x${evmPrivateKeyHex}`;
|
|
20422
20429
|
switch (type) {
|
|
20423
20430
|
case "town":
|
|
20424
20431
|
return {
|
|
20425
20432
|
TOWN_SECRET_KEY: nostrSecretKeyHex,
|
|
20433
|
+
TOWN_NOSTR_PUBKEY: nostrPubkeyHex,
|
|
20426
20434
|
TOWN_SETTLEMENT_PRIVATE_KEY: evmPrivateKeyHex0x,
|
|
20427
20435
|
APEX_EVM_ADDRESS: apexEvmAddress,
|
|
20428
20436
|
...chainEnv
|
|
@@ -20430,6 +20438,7 @@ function buildNodeEnv(type, nostrSecretKeyHex, evmPrivateKeyHex, mnemonic, apexE
|
|
|
20430
20438
|
case "mill":
|
|
20431
20439
|
return {
|
|
20432
20440
|
MILL_SECRET_KEY: nostrSecretKeyHex,
|
|
20441
|
+
MILL_NOSTR_PUBKEY: nostrPubkeyHex,
|
|
20433
20442
|
MILL_SETTLEMENT_PRIVATE_KEY: evmPrivateKeyHex0x,
|
|
20434
20443
|
MILL_MNEMONIC: mnemonic ?? "",
|
|
20435
20444
|
APEX_EVM_ADDRESS: apexEvmAddress,
|
|
@@ -20437,7 +20446,8 @@ function buildNodeEnv(type, nostrSecretKeyHex, evmPrivateKeyHex, mnemonic, apexE
|
|
|
20437
20446
|
};
|
|
20438
20447
|
case "dvm":
|
|
20439
20448
|
return {
|
|
20440
|
-
DVM_SECRET_KEY: nostrSecretKeyHex
|
|
20449
|
+
DVM_SECRET_KEY: nostrSecretKeyHex,
|
|
20450
|
+
DVM_NOSTR_PUBKEY: nostrPubkeyHex
|
|
20441
20451
|
};
|
|
20442
20452
|
}
|
|
20443
20453
|
}
|
|
@@ -20482,7 +20492,10 @@ function registerNodeLifecycleRoutes(app, deps) {
|
|
|
20482
20492
|
ilpAddress: entry.ilpAddress,
|
|
20483
20493
|
status,
|
|
20484
20494
|
enabledAt: entry.enabledAt,
|
|
20485
|
-
lastSeenAt: entry.lastSeenAt
|
|
20495
|
+
lastSeenAt: entry.lastSeenAt,
|
|
20496
|
+
// x-only Nostr pubkey (issue #81). Undefined for legacy yaml entries
|
|
20497
|
+
// written before the field existed — omitted from the JSON in that case.
|
|
20498
|
+
...entry.nostrPubkey !== void 0 ? { nostrPubkey: entry.nostrPubkey } : {}
|
|
20486
20499
|
};
|
|
20487
20500
|
});
|
|
20488
20501
|
return reply.status(200).send({ nodes });
|
|
@@ -20611,6 +20624,9 @@ function registerNodeLifecycleRoutes(app, deps) {
|
|
|
20611
20624
|
peerId,
|
|
20612
20625
|
ilpAddress,
|
|
20613
20626
|
derivationIndex,
|
|
20627
|
+
// x-only pubkey derived from the node secret — persisted so
|
|
20628
|
+
// `node list --json` can surface it without re-deriving (issue #81).
|
|
20629
|
+
nostrPubkey: keys.nostrPubkey,
|
|
20614
20630
|
enabledAt,
|
|
20615
20631
|
lastSeenAt: null
|
|
20616
20632
|
};
|
|
@@ -20690,6 +20706,7 @@ function registerNodeLifecycleRoutes(app, deps) {
|
|
|
20690
20706
|
const nodeEnv = buildNodeEnv(
|
|
20691
20707
|
type,
|
|
20692
20708
|
nostrSecretKeyHex,
|
|
20709
|
+
keys.nostrPubkey,
|
|
20693
20710
|
evmPrivateKeyHex,
|
|
20694
20711
|
mnemonicSnapshot,
|
|
20695
20712
|
apexEvmAddress,
|
|
@@ -22845,4 +22862,4 @@ export {
|
|
|
22845
22862
|
@scure/bip32/index.js:
|
|
22846
22863
|
(*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
22847
22864
|
*/
|
|
22848
|
-
//# sourceMappingURL=chunk-
|
|
22865
|
+
//# sourceMappingURL=chunk-ZUMMJFGH.js.map
|