Add Mining module as a native Go plugin for lthn-desktop: - Add github.com/Snider/Mining dependency (v0.0.9) - Create MiningBridge that wraps the Mining service for Wails - Implement module.GinModule interface for API route registration - Register mining module with the Core module registry - Provide Wails-bound methods for frontend: ListMiners, GetMinerStats, StartMiner, StopMiner, GetAvailableMiners, InstallMiner, UninstallMiner - Update mining.itw3.json with native module configuration The mining module provides: - XMRig and TTMiner support - Mining pool management - Real-time hashrate monitoring - Miner installation/uninstallation - Mining profiles Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52 lines
2.5 KiB
JSON
52 lines
2.5 KiB
JSON
{
|
|
"code": "mining",
|
|
"type": "core",
|
|
"name": "Mining Module",
|
|
"version": "0.1.0",
|
|
"namespace": "mining",
|
|
"description": "Native cryptocurrency mining management powered by Snider/Mining",
|
|
"author": "Lethean",
|
|
"contexts": ["miner", "default"],
|
|
"menu": [
|
|
{
|
|
"id": "mining",
|
|
"label": "Mining",
|
|
"order": 200,
|
|
"contexts": ["miner"],
|
|
"children": [
|
|
{"id": "mining-dashboard", "label": "Dashboard", "route": "/mining/dashboard", "order": 1},
|
|
{"id": "mining-pools", "label": "Pools", "route": "/mining/pools", "order": 2},
|
|
{"id": "mining-miners", "label": "Miners", "route": "/mining/miners", "order": 3},
|
|
{"id": "mining-sep1", "separator": true, "order": 4},
|
|
{"id": "mining-start", "label": "Start Mining", "action": "mining:start", "order": 5},
|
|
{"id": "mining-stop", "label": "Stop Mining", "action": "mining:stop", "order": 6}
|
|
]
|
|
}
|
|
],
|
|
"routes": [
|
|
{"path": "/mining/dashboard", "component": "mining-dashboard", "title": "Mining Dashboard", "contexts": ["miner"]},
|
|
{"path": "/mining/pools", "component": "mining-pools", "title": "Mining Pools", "contexts": ["miner"]},
|
|
{"path": "/mining/miners", "component": "mining-miners", "title": "Miners", "contexts": ["miner"]}
|
|
],
|
|
"api": [
|
|
{"method": "GET", "path": "/health", "description": "Health check"},
|
|
{"method": "GET", "path": "/ready", "description": "Readiness check"},
|
|
{"method": "GET", "path": "/info", "description": "Get mining service info"},
|
|
{"method": "GET", "path": "/metrics", "description": "Get mining metrics"},
|
|
{"method": "GET", "path": "/miners", "description": "List running miners"},
|
|
{"method": "GET", "path": "/miners/available", "description": "List available miners"},
|
|
{"method": "POST", "path": "/miners/:miner_name/install", "description": "Install a miner"},
|
|
{"method": "DELETE", "path": "/miners/:miner_name/uninstall", "description": "Uninstall a miner"},
|
|
{"method": "DELETE", "path": "/miners/:miner_name", "description": "Stop a miner"},
|
|
{"method": "GET", "path": "/miners/:miner_name/stats", "description": "Get miner stats"},
|
|
{"method": "GET", "path": "/miners/:miner_name/logs", "description": "Get miner logs"},
|
|
{"method": "POST", "path": "/profiles", "description": "Create mining profile"},
|
|
{"method": "GET", "path": "/profiles", "description": "List mining profiles"},
|
|
{"method": "POST", "path": "/profiles/:id/start", "description": "Start mining with profile"}
|
|
],
|
|
"config": {
|
|
"defaultPool": "",
|
|
"threads": 0,
|
|
"intensity": 50
|
|
}
|
|
}
|