DanS 4db609fb52 feat(chat): composer + contact requests — outgoing construction (Phase 4)
Add the outgoing side of HushChat: compose messages and start conversations.
The wire construction is the byte-exact inverse of the receive parser and is
proven by a self-consistent round-trip (build → parse → decrypt).

- src/chat/chat_outgoing.{h,cpp} (pure): buildOutgoingMessage encrypts via
  encryptOutgoing and buildOutgoingContactRequest carries plaintext; both emit
  the header memo JSON ({h,v,z,cid,t,e,p}, which nlohmann serializes
  alphabetically to match SilentDragonXLite) + the payload memo, validating the
  512-byte memo limit, the 64-hex peer key, and the "no leading '{'" rule for
  request text. My public key goes in header "p"; the peer's key is the
  encryption recipient.
- ChatService: composeMessage/composeContactRequest (encrypt with the held
  identity) + recordOutgoing (echo an Outgoing ChatMessage into the store + DB —
  we never harvest our own sends, so this is the only local record).
- App: sendChatMessage(cid,text) sources the peer z-addr + public key from the
  conversation, composes, and records a random-id echo; startChatConversation
  (zaddr,text) mints a random cid + composes a plaintext contact request;
  chatReplyZaddr() picks a spendable z-addr. broadcastChatMemos() is the Phase-5
  transport seam (network delivery + real-SDXL interop verification land there).
- Chat tab: a message composer (shown once the peer's key is known, else a
  "waiting for reply" hint) + a "New conversation" modal that sends a contact
  request to a z-address.
- Tests: outgoing round-trip through the receive parser + decrypt, contact-request
  passthrough, validation guards, and ChatService compose + recordOutgoing echo.

Adversarially reviewed (crypto/interop, secret hygiene, logic, UI) — 0 findings.
Gated by DRAGONX_ENABLE_CHAT (default OFF). Verified: Linux + Windows(mingw)
build with chat ON, ctest 100%, hygiene clean; caches restored to the OFF default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 15:30:41 -05:00
2026-03-19 14:46:33 -05:00
2026-03-03 01:20:03 -06:00
2026-02-27 00:26:01 -06:00

ObsidianDragon - DragonX Wallet

A lightweight, portable full-node cryptocurrency wallet for DragonX (DRGX), built with Dear ImGui.

Current pre-release: 1.2.0-rc1.

License Platform

Features

  • Full Node Support: Connects to dragonxd for complete blockchain verification
  • Shielded Transactions: Full z-address support with encrypted memos
  • Address Management: Labels, icons, favorites, hidden addresses, and address-to-address transfers
  • Integrated Mining: Solo CPU mining plus pool mining through xmrig, with idle-mining controls
  • Explorer Tools: Block/transaction lookup and bootstrap snapshot download
  • Market Data: Real-time price charts from CoinGecko
  • QR Codes: Generate and display QR codes for receiving addresses
  • Multi-language: i18n support for English, German, Spanish, French, Japanese, Korean, Portuguese, Russian, and Chinese
  • CJK Fonts: Bundled CJK subset font for translated interfaces
  • Lightweight: ~5-10MB binary vs ~50MB+ for Qt version
  • Fast Builds: Compiles in seconds, not minutes

Screenshots



Building

Quick Setup

The setup script detects your OS, installs all build dependencies, and validates your environment:

./setup.sh              # Install core build deps (interactive)
./setup.sh --check      # Just report what's missing
./setup.sh --all        # Core + Windows/macOS cross-compile + Sapling params
./setup.sh --win        # Also install mingw-w64 + libsodium-win

Manual Prerequisites

Click to expand manual install commands

Linux (Ubuntu/Debian):

sudo apt install build-essential cmake git pkg-config
sudo apt install libgl1-mesa-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev
sudo apt install libsodium-dev libcurl4-openssl-dev

Linux (Arch):

sudo pacman -S base-devel cmake git pkg-config mesa libx11 libxcursor libxrandr libxinerama libxi libsodium curl

macOS:

xcode-select --install
brew install cmake

Windows:

  • Visual Studio 2019+ with C++ workload
  • CMake 3.20+

Binaries

Download linux and windows binaries of latest releases and place in binary directories:

DragonX daemon (https://git.dragonx.is/DragonX/dragonx):

  • prebuilt-binaries/dragonxd-linux/
  • prebuilt-binaries/dragonxd-win/
  • prebuilt-binaries/dragonxd-mac/

xmrig HAC fork (https://git.dragonx.is/dragonx/xmrig-hac):

  • prebuilt-binaries/xmrig-hac/

Build Steps

### Clone repository (if not already)
git clone https://git.dragonx.is/dragonx/ObsidianDragon.git
cd ObsidianDragon/

Windows Build

./build.sh --win-release

Release Build

./build.sh --linux-release    # Linux release + AppImage
./build.sh --win-release      # Windows cross-compile
./build.sh --mac-release      # macOS .app bundle + DMG
./build.sh --clean --linux-release  # Clean + Release

Running

  1. Start dragonxd (if not using embedded daemon):

    dragonxd -daemon
    
  2. Run the wallet:

    cd build/bin
    ./ObsidianDragon
    

The wallet will automatically connect to the daemon using credentials from ~/.hush/DRAGONX/DRAGONX.conf.

Using Custom Node Binaries

The wallet checks its own directory first when looking for DragonX node binaries. This means you can test new or different branch builds of hush-arrakis-chain/hushd without waiting for a new wallet release:

  1. Build or download the node binaries you want to test
  2. Place them in the same directory as the wallet executable (e.g. build/bin/)
  3. Launch the wallet — it will use the local binaries instead of the bundled ones

Search order:

  1. Wallet executable directory (highest priority)
  2. Embedded/extracted daemon (app data directory)
  3. System-wide locations (/usr/local/bin, ~/dragonx/src, etc.)

This is useful for testing new branches or hotfixes to the node software before they are bundled into a wallet release.

Configuration

Configuration is stored in ~/.hush/DRAGONX/DRAGONX.conf:

rpcuser=your_rpc_user
rpcpassword=your_rpc_password
rpcport=21769

Project Structure

ObsidianDragon/
├── src/
│   ├── main.cpp           # Entry point, SDL/ImGui setup
│   ├── app.cpp/h          # Main application class
│   ├── data/              # WalletState, address book, exchange info
│   ├── config/            # Settings persistence and committed/generated version.h
│   ├── ui/
│   │   ├── schema/        # TOML UI schema and skin manager
│   │   ├── material/      # Material components, typography, layout
│   │   ├── windows/       # Tabs and dialogs
│   │   └── pages/         # Multi-page screens such as Settings
│   ├── rpc/
│   │   ├── rpc_client.cpp # JSON-RPC client
│   │   └── connection.cpp # Daemon connection
│   ├── resources/         # Embedded resource extraction
│   ├── platform/          # Windows DX11/backdrop helpers
│   ├── util/
│   │   ├── i18n.cpp       # Internationalization
│   │   └── ...
│   └── daemon/
│       └── embedded_daemon.cpp
├── res/
│   ├── fonts/             # Ubuntu, icon, and CJK fonts
│   └── lang/              # Translation files
├── libs/
│   └── qrcode/            # QR code generation
├── CMakeLists.txt
├── build.sh               # Release/cross-platform build script
└── scripts/create-appimage.sh # AppImage packaging

Dependencies

Fetched or discovered by CMake:

  • SDL3 — Cross-platform windowing/input
  • nlohmann/json — JSON parsing
  • toml++ — TOML parsing (UI schema/themes)
  • libcurl — HTTP/HTTPS transport for daemon RPC and network calls (system on Linux/macOS, fetched on Windows)

Bundled in libs/:

  • Dear ImGui — Immediate mode GUI
  • libsodium — Cryptographic operations (system on Linux or fetched by scripts/fetch-libsodium.sh)
  • QR-Code-generator — QR code rendering
  • miniz — ZIP compression
  • GLAD — OpenGL loader (Linux/macOS)
  • stb_image — Image loading
  • incbin — Binary resource embedding (Windows builds)

Keyboard Shortcuts

Shortcut Action
Ctrl+, Settings
F5 Refresh
Alt+F4 Exit

Translation

Current language files live in res/lang/ as de, es, fr, ja, ko, pt, ru, and zh JSON files, with built-in English fallbacks.

To add a new language:

  1. Copy res/lang/es.json to res/lang/<code>.json
  2. Translate all strings
  3. The language will appear in Settings automatically

License

This project is licensed under the GNU General Public License v3 (GPLv3).

Credits

  • The Hush Developers
  • DragonX Community
  • Dear ImGui by Omar Cornut
  • SDL by Sam Lantinga
Description
No description provided
Readme GPL-3.0 54 MiB
2026-03-25 11:24:21 -05:00
Languages
C++ 72.9%
C 20.4%
Python 4.4%
Shell 1.8%
CMake 0.5%