@toon-protocol/townhouse 0.5.3 → 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-XFPIK22M.js → chunk-ZUMMJFGH.js} +32 -4
- package/dist/chunk-ZUMMJFGH.js.map +1 -0
- 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 +1 -1
- package/dist/chunk-XFPIK22M.js.map +0 -1
|
@@ -13999,6 +13999,17 @@ var ILP_TO_SEMANTIC = Object.freeze({
|
|
|
13999
13999
|
T00: "internal_error",
|
|
14000
14000
|
T04: "insufficient_funds",
|
|
14001
14001
|
F00: "invalid_request",
|
|
14002
|
+
// F01 ("Invalid Packet" in ILP terms — emitted by the swap handler for
|
|
14003
|
+
// "Invalid gift wrap" / "Invalid amount") has NO dedicated entry in the
|
|
14004
|
+
// connector's REJECT_CODE_MAP (accepted semantics are: insufficient_funds,
|
|
14005
|
+
// expired, unreachable, invalid_request, invalid_amount,
|
|
14006
|
+
// insufficient_destination_amount, unexpected_payment, application_error,
|
|
14007
|
+
// internal_error, timeout). The closest faithful reason is `invalid_request`,
|
|
14008
|
+
// which the connector re-encodes to wire code F00. We map F01 EXPLICITLY
|
|
14009
|
+
// (rather than relying on the fallback below) so the F01 -> F00 normalization
|
|
14010
|
+
// is intentional and test-pinned, not a silent collapse that misleads callers
|
|
14011
|
+
// into thinking they hit a different failure class. See issue #86.
|
|
14012
|
+
F01: "invalid_request",
|
|
14002
14013
|
F02: "unreachable",
|
|
14003
14014
|
F03: "invalid_amount",
|
|
14004
14015
|
F04: "insufficient_destination_amount",
|
|
@@ -14533,6 +14544,13 @@ var NodesYamlEntrySchema = z.object({
|
|
|
14533
14544
|
peerId: z.string().min(1),
|
|
14534
14545
|
ilpAddress: z.string().min(1),
|
|
14535
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(),
|
|
14536
14554
|
enabledAt: z.string().datetime({ offset: true }),
|
|
14537
14555
|
lastSeenAt: z.string().datetime({ offset: true }).nullable()
|
|
14538
14556
|
}).strict();
|
|
@@ -20406,12 +20424,13 @@ function buildNetworkNodeEnv(config) {
|
|
|
20406
20424
|
}
|
|
20407
20425
|
return env;
|
|
20408
20426
|
}
|
|
20409
|
-
function buildNodeEnv(type, nostrSecretKeyHex, evmPrivateKeyHex, mnemonic, apexEvmAddress, chainEnv) {
|
|
20427
|
+
function buildNodeEnv(type, nostrSecretKeyHex, nostrPubkeyHex, evmPrivateKeyHex, mnemonic, apexEvmAddress, chainEnv) {
|
|
20410
20428
|
const evmPrivateKeyHex0x = `0x${evmPrivateKeyHex}`;
|
|
20411
20429
|
switch (type) {
|
|
20412
20430
|
case "town":
|
|
20413
20431
|
return {
|
|
20414
20432
|
TOWN_SECRET_KEY: nostrSecretKeyHex,
|
|
20433
|
+
TOWN_NOSTR_PUBKEY: nostrPubkeyHex,
|
|
20415
20434
|
TOWN_SETTLEMENT_PRIVATE_KEY: evmPrivateKeyHex0x,
|
|
20416
20435
|
APEX_EVM_ADDRESS: apexEvmAddress,
|
|
20417
20436
|
...chainEnv
|
|
@@ -20419,6 +20438,7 @@ function buildNodeEnv(type, nostrSecretKeyHex, evmPrivateKeyHex, mnemonic, apexE
|
|
|
20419
20438
|
case "mill":
|
|
20420
20439
|
return {
|
|
20421
20440
|
MILL_SECRET_KEY: nostrSecretKeyHex,
|
|
20441
|
+
MILL_NOSTR_PUBKEY: nostrPubkeyHex,
|
|
20422
20442
|
MILL_SETTLEMENT_PRIVATE_KEY: evmPrivateKeyHex0x,
|
|
20423
20443
|
MILL_MNEMONIC: mnemonic ?? "",
|
|
20424
20444
|
APEX_EVM_ADDRESS: apexEvmAddress,
|
|
@@ -20426,7 +20446,8 @@ function buildNodeEnv(type, nostrSecretKeyHex, evmPrivateKeyHex, mnemonic, apexE
|
|
|
20426
20446
|
};
|
|
20427
20447
|
case "dvm":
|
|
20428
20448
|
return {
|
|
20429
|
-
DVM_SECRET_KEY: nostrSecretKeyHex
|
|
20449
|
+
DVM_SECRET_KEY: nostrSecretKeyHex,
|
|
20450
|
+
DVM_NOSTR_PUBKEY: nostrPubkeyHex
|
|
20430
20451
|
};
|
|
20431
20452
|
}
|
|
20432
20453
|
}
|
|
@@ -20471,7 +20492,10 @@ function registerNodeLifecycleRoutes(app, deps) {
|
|
|
20471
20492
|
ilpAddress: entry.ilpAddress,
|
|
20472
20493
|
status,
|
|
20473
20494
|
enabledAt: entry.enabledAt,
|
|
20474
|
-
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 } : {}
|
|
20475
20499
|
};
|
|
20476
20500
|
});
|
|
20477
20501
|
return reply.status(200).send({ nodes });
|
|
@@ -20600,6 +20624,9 @@ function registerNodeLifecycleRoutes(app, deps) {
|
|
|
20600
20624
|
peerId,
|
|
20601
20625
|
ilpAddress,
|
|
20602
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,
|
|
20603
20630
|
enabledAt,
|
|
20604
20631
|
lastSeenAt: null
|
|
20605
20632
|
};
|
|
@@ -20679,6 +20706,7 @@ function registerNodeLifecycleRoutes(app, deps) {
|
|
|
20679
20706
|
const nodeEnv = buildNodeEnv(
|
|
20680
20707
|
type,
|
|
20681
20708
|
nostrSecretKeyHex,
|
|
20709
|
+
keys.nostrPubkey,
|
|
20682
20710
|
evmPrivateKeyHex,
|
|
20683
20711
|
mnemonicSnapshot,
|
|
20684
20712
|
apexEvmAddress,
|
|
@@ -22834,4 +22862,4 @@ export {
|
|
|
22834
22862
|
@scure/bip32/index.js:
|
|
22835
22863
|
(*! scure-bip32 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
22836
22864
|
*/
|
|
22837
|
-
//# sourceMappingURL=chunk-
|
|
22865
|
+
//# sourceMappingURL=chunk-ZUMMJFGH.js.map
|