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)
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
// DragonX Wallet - ImGui Edition
|
|
// Copyright 2024-2026 The Hush Developers
|
|
// Released under the GPLv3
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace dragonx {
|
|
namespace util {
|
|
|
|
/**
|
|
* @brief Parsed payment URI data
|
|
*/
|
|
struct PaymentURI {
|
|
std::string address;
|
|
double amount = 0.0;
|
|
std::string label;
|
|
std::string memo;
|
|
std::string message;
|
|
bool valid = false;
|
|
std::string error;
|
|
};
|
|
|
|
/**
|
|
* @brief Parse a DragonX/HUSH payment URI
|
|
*
|
|
* Supports format: drgx:<address>?amount=<amount>&label=<label>&memo=<memo>&message=<message>
|
|
* Also supports hush: prefix for backwards compatibility
|
|
*
|
|
* @param uri The payment URI to parse
|
|
* @return PaymentURI struct with parsed data
|
|
*/
|
|
PaymentURI parsePaymentURI(const std::string& uri);
|
|
|
|
/**
|
|
* @brief URL decode a string
|
|
* @param encoded URL-encoded string
|
|
* @return Decoded string
|
|
*/
|
|
std::string urlDecode(const std::string& encoded);
|
|
|
|
/**
|
|
* @brief Check if a string is a valid payment URI
|
|
* @param str String to check
|
|
* @return true if it starts with drgx: or hush:
|
|
*/
|
|
bool isPaymentURI(const std::string& str);
|
|
|
|
} // namespace util
|
|
} // namespace dragonx
|