@@ -13,6 +13,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
1313interface PortsConfig {
1414 TRANSLATOR_PORT : number ;
1515 JDC_PORT : number ;
16+ JDC_AUTHORITY_PUBLIC_KEY : string ;
1617}
1718
1819function loadPorts ( ) : PortsConfig {
@@ -35,6 +36,7 @@ function loadPorts(): PortsConfig {
3536const ports = loadPorts ( ) ;
3637export const TRANSLATOR_PORT = ports . TRANSLATOR_PORT ;
3738export const JDC_PORT = ports . JDC_PORT ;
39+ export const JDC_AUTHORITY_PUBLIC_KEY = ports . JDC_AUTHORITY_PUBLIC_KEY ;
3840
3941/**
4042 * Generate Translator Proxy config (tproxy-config.toml)
@@ -54,7 +56,7 @@ export function generateTranslatorConfig(data: SetupData): string {
5456 // When connecting to local JDC, we don't need authority key (using hardcoded keys)
5557 // When connecting to external pool, we need the pool's authority key
5658 const authorityPubkey = mode === 'jd'
57- ? '9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72'
59+ ? JDC_AUTHORITY_PUBLIC_KEY
5860 : pool . authority_public_key ;
5961
6062 // Min hashrate from user config (default 100 TH/s if not set)
@@ -131,7 +133,7 @@ max_supported_version = 2
131133min_supported_version = 2
132134
133135# Auth keys for downstream connections
134- authority_public_key = "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72 "
136+ authority_public_key = "${ JDC_AUTHORITY_PUBLIC_KEY } "
135137authority_secret_key = "mkDLTBBRxdBv998612qipDYoTK3YUrqLe8uWw7gu3iXbSrn2n"
136138cert_validity_sec = 3600
137139
0 commit comments