// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3

#pragma once

#include <string>
#include <vector>
#include <cstdint>

namespace dragonx {
namespace rpc {

// Transaction types
enum class TxType {
    Sent,
    Received,
    Mined,
    Unknown
};

// Transaction info
struct Transaction {
    std::string txid;
    TxType type = TxType::Unknown;
    int64_t timestamp = 0;
    std::string address;
    double amount = 0.0;
    int confirmations = 0;
    std::string memo;
    std::string from_address;
};

// Peer info
struct Peer {
    int64_t id = 0;
    std::string address;
    std::string tls_cipher;
    bool tls_verified = false;
    int64_t conntime = 0;
    int banscore = 0;
    int protocol_version = 0;
    std::string subver;
    int64_t bytes_sent = 0;
    int64_t bytes_received = 0;
    double pingtime = 0.0;
};

// Banned peer info
struct BannedPeer {
    std::string address;
    std::string subnet;
    int64_t banned_until = 0;
    int64_t asn = 0;
};

// Unspent output (UTXO)
struct UnspentOutput {
    std::string address;
    std::string txid;
    int vout = 0;
    double amount = 0.0;
    int confirmations = 0;
    bool spendable = true;
};

// Address balance
struct AddressBalance {
    std::string address;
    double balance = 0.0;
    bool is_shielded = false;
};

// Blockchain info
struct BlockchainInfo {
    int blocks = 0;
    int headers = 0;
    std::string bestblockhash;
    double difficulty = 0.0;
    double verificationprogress = 0.0;
    bool syncing = false;
};

// Mining info
struct MiningInfo {
    int blocks = 0;
    double difficulty = 0.0;
    double networkhashps = 0.0;
    double localhashps = 0.0;
    int genproclimit = 0;
    bool generate = false;
};

} // namespace rpc
} // namespace dragonx
