ObsidianDragon - DragonX ImGui Wallet

Full-node GUI wallet for DragonX cryptocurrency.
Built with Dear ImGui, SDL3, and OpenGL3/DX11.

Features:
- Send/receive shielded and transparent transactions
- Autoshield with merged transaction display
- Built-in CPU mining (xmrig)
- Peer management and network monitoring
- Wallet encryption with PIN lock
- QR code generation for receive addresses
- Transaction history with pagination
- Console for direct RPC commands
- Cross-platform (Linux, Windows)
This commit is contained in:
2026-02-26 02:31:52 -06:00
commit 3aee55b49c
306 changed files with 177789 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3
#pragma once
#include <string>
namespace dragonx {
namespace util {
/**
* @brief Ensures only one instance of the wallet runs at a time
*
* Uses file locking on Linux/macOS and named mutex on Windows.
*/
class SingleInstance {
public:
SingleInstance(const std::string& app_name = "dragonx-wallet");
~SingleInstance();
// Non-copyable
SingleInstance(const SingleInstance&) = delete;
SingleInstance& operator=(const SingleInstance&) = delete;
/**
* @brief Try to acquire the single instance lock
* @return true if lock acquired (this is the only instance)
*/
bool tryLock();
/**
* @brief Release the lock
*/
void unlock();
/**
* @brief Check if lock is currently held
*/
bool isLocked() const { return locked_; }
private:
std::string app_name_;
bool locked_ = false;
#ifdef _WIN32
void* mutex_handle_ = nullptr;
#else
int lock_fd_ = -1;
std::string lock_path_;
#endif
};
} // namespace util
} // namespace dragonx