Tests. Autocomplete. Few Fixes. Mocks for Electrum Service. Template-to-Json parser. Fix global paths. Use IO Dependency injection for logging from cli. Additional commands in CLI.

This commit is contained in:
2026-04-20 10:30:38 +00:00
parent df4f438f6d
commit ff2fe126c6
44 changed files with 8220 additions and 1503 deletions

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env node
/**
* XO Wallet CLI - Terminal User Interface for XO crypto wallet.
*
@@ -9,18 +10,25 @@
* 5. Real-time updates via SSE
*/
import { join } from "node:path";
import { App } from "./app.js";
import { getDataDir } from "./utils/paths.js";
/**
* Main entry point.
*/
async function main(): Promise<void> {
try {
const dataDir = getDataDir();
// Create and start the application
await App.create({
syncServerUrl: process.env["SYNC_SERVER_URL"] ?? "http://localhost:3000",
databasePath: process.env["DB_PATH"] ?? "./",
databasePath: process.env["DB_PATH"] ?? dataDir,
databaseFilename: process.env["DB_FILENAME"] ?? "xo-wallet.db",
invitationStoragePath:
process.env["INVITATION_STORAGE_PATH"] ??
join(dataDir, "xo-invitations.db"),
});
} catch (error) {
console.error("Failed to start XO Wallet CLI:", error);