mirror of
https://github.com/aljazceru/mcp-code.git
synced 2025-12-17 12:45:28 +01:00
feat: Add zap command for sending Bitcoin Lightning tips
- Implemented the `zap` command in the CLI to allow users to send sats to a user, event, or snippet using a NIP-60 wallet. - Created a new `zap.ts` file to handle the command logic and integrated it into the MCP server. - Added wallet balance command to check the balance of a user's wallet. - Enhanced the MCP server to register the new zap command and wallet balance command. - Introduced caching for wallets to optimize performance and reduce redundant network requests. - Updated database schema to include snippets table for storing code snippets. - Improved logging functionality for better debugging and tracking of operations. - Added functionality to save snippets to the database upon retrieval. - Updated project overview documentation to reflect new features and structure. - Refactored existing commands and logic for better modularity and maintainability.
This commit is contained in:
7
index.ts
7
index.ts
@@ -2,17 +2,20 @@ import { initConfig, readConfig, writeConfig } from "./config.js";
|
||||
import { initNDK, ndk } from "./ndk.js";
|
||||
import "./db.js";
|
||||
import { runCli } from "./commands/index.js";
|
||||
import { log } from "./lib/utils/log.js";
|
||||
import { runConfigWizard } from "./wizard";
|
||||
|
||||
log("starting up...: args: " + process.argv.join(" "));
|
||||
|
||||
// Load config and ensure defaults
|
||||
const config = initConfig();
|
||||
|
||||
// If there's no privateKey or bunker configured, run the setup wizard
|
||||
if (!config.privateKey && !config.bunker) {
|
||||
const updatedConfig = await runConfigWizard(config);
|
||||
await initNDK(updatedConfig);
|
||||
initNDK(updatedConfig);
|
||||
} else {
|
||||
await initNDK(config);
|
||||
initNDK(config);
|
||||
}
|
||||
|
||||
// Process command-line arguments
|
||||
|
||||
Reference in New Issue
Block a user