// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3
//
// address_validation.h — pure, offline checksum validation for wallet addresses.
// These verify the *encoding checksum* (Base58Check / Bech32), which is independent
// of the chain's version bytes / HRP, so a correct implementation never rejects a
// genuinely-valid address while still catching transcription errors. Used to make
// the send screen's "Valid address" label/gate reflect reality instead of a bare
// prefix+length heuristic. No network, no daemon — safe for both build variants.

#pragma once

#include <string>

namespace dragonx {
namespace util {

// True if `s` decodes as Base58Check with a valid 4-byte double-SHA256 checksum
// (transparent R-addresses). Version-byte agnostic by design.
bool isValidBase58Check(const std::string& s);

// True if `s` is a valid Bech32 string (Sapling zs-addresses). The HRP is taken
// from the string itself and folded into the checksum, so no HRP is hardcoded.
bool isValidBech32(const std::string& s);

}  // namespace util
}  // namespace dragonx
