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:
57
src/ui/windows/key_export_dialog.h
Normal file
57
src/ui/windows/key_export_dialog.h
Normal file
@@ -0,0 +1,57 @@
|
||||
// DragonX Wallet - ImGui Edition
|
||||
// Copyright 2024-2026 The Hush Developers
|
||||
// Released under the GPLv3
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace dragonx {
|
||||
|
||||
class App;
|
||||
|
||||
namespace ui {
|
||||
|
||||
/**
|
||||
* @brief Dialog for exporting private/viewing keys
|
||||
*
|
||||
* Displays the private or viewing key for a given address with
|
||||
* security warnings and copy functionality.
|
||||
*/
|
||||
class KeyExportDialog {
|
||||
public:
|
||||
enum class KeyType {
|
||||
Private,
|
||||
Viewing
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Show the key export dialog for an address
|
||||
* @param address The address to export key for
|
||||
* @param type The type of key to export
|
||||
*/
|
||||
static void show(const std::string& address, KeyType type);
|
||||
|
||||
/**
|
||||
* @brief Render the dialog (call every frame)
|
||||
* @param app Pointer to app instance for RPC calls
|
||||
*/
|
||||
static void render(App* app);
|
||||
|
||||
/**
|
||||
* @brief Check if dialog is currently open
|
||||
*/
|
||||
static bool isOpen();
|
||||
|
||||
private:
|
||||
static bool s_open;
|
||||
static bool s_fetching;
|
||||
static bool s_show_key;
|
||||
static KeyType s_key_type;
|
||||
static std::string s_address;
|
||||
static std::string s_key;
|
||||
static std::string s_error;
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
} // namespace dragonx
|
||||
Reference in New Issue
Block a user