security: remove .env from tracking (contains secrets)

This commit is contained in:
ZOMBIIIIIII
2026-05-11 18:15:21 +03:00
parent 295c3a9d6d
commit 64696b334c
26 changed files with 1840 additions and 128 deletions

View File

@@ -1,6 +1,7 @@
import app from './app';
import { env, initEnv } from './config/env';
import { refreshAllKeys, startKeyRotation, stopKeyRotation } from './services/key-rotation.service';
import { isCryptoReady } from './services/crypto.service';
import { logger } from './lib/logger';
async function main() {
@@ -8,6 +9,13 @@ async function main() {
await initEnv();
await refreshAllKeys();
// Custodial: без master-key сервис не может расшифровать ни одну мнемонику — fail fast.
if (!isCryptoReady()) {
logger.error('Crypto master key not loaded — refusing to start (custodial wallets require it)');
process.exit(1);
}
startKeyRotation();
const server = app.listen(env.port, () => {