- Add expanded address icon picker with search, bottom-aligned actions, and improved modal sizing - Embed a pickaxe icon font subset and wire it into typography/address icon rendering - Track view-only shielded addresses and prevent sends from non-spendable z-addresses - Improve address transfer dialog sizing, max amount handling, and text clipping - Tune main header layout values in ui.toml - Update README, codebase overview, and third-party license documentation
4.5 KiB
4.5 KiB
Codebase Overview
Current as of 2026-04-27 for ObsidianDragon 1.2.0-rc1.
Purpose
ObsidianDragon is a Dear ImGui full-node wallet for DragonX (DRGX). It manages an embedded or external dragonxd, renders a schema-driven desktop UI, and provides shielded transactions, mining, market data, address management, explorer tools, and bootstrap download support.
Runtime Architecture
src/main.cppinitializes SDL3, graphics backends, ImGui, and the main loop.src/app.cppowns application lifecycle, navigation, rendering, dialogs, and daemon/RPC startup.src/app_network.cppcontains refresh and transaction flows, including balance, address, transaction, mining, market, peer, and address metadata updates.src/app_security.cppcovers wallet encryption, PIN unlock, auto-lock, and secure vault integration.src/app_wizard.cpphandles first-run setup and bootstrap/encryption flow.
The UI thread renders ImGui and drains callback queues. RPC work runs through RPCWorker, which posts worker-thread RPC calls and returns UI-thread callbacks. Console commands can use a separate fast-lane RPC client/worker so they do not queue behind regular refresh batches.
Source Map
| Path | Role |
|---|---|
src/config/ |
Settings JSON persistence and generated version.h |
src/data/ |
Wallet state, address book, exchange info |
src/rpc/ |
libcurl JSON-RPC client, connection config, worker queue |
src/daemon/ |
Embedded dragonxd manager and xmrig pool miner manager |
src/ui/windows/ |
Main tabs and modal dialogs |
src/ui/pages/ |
Page-style screens such as Settings |
src/ui/schema/ |
TOML schema loader, skin manager, color resolver |
src/ui/material/ |
Material-style typography, layout, drawing, components |
src/ui/effects/ |
Acrylic, blur, noise, theme effects, low-spec fallback |
src/resources/ |
Embedded resource extraction for params, daemon assets, themes, images |
src/platform/ |
Windows DX11 and backdrop helpers |
src/util/ |
i18n, logging, platform paths, bootstrap, vault, URI/base64/texture utilities |
Build And Resources
- CMake uses C++17 and outputs
build/bin/ObsidianDragon. - Version comes from
project(... VERSION 1.2.0)plusDRAGONX_VERSION_SUFFIX=-rc1. - SDL3 is found from the system first, then fetched by CMake if unavailable.
- nlohmann/json and toml++ are fetched with CMake FetchContent.
- libcurl is system-provided on Linux/macOS and fetched statically for Windows.
- libsodium is system-provided on Linux or local under
libs/libsodium/,libs/libsodium-win/, orlibs/libsodium-mac/. - Fonts are embedded with INCBIN: Ubuntu, Material Icons, a one-glyph MDI pickaxe subset, and Noto CJK subset.
res/themes/ui.tomlis embedded as a fallback and expanded into build themes withscripts/expand_themes.py.res/default_banlist.txtis embedded intobuild/generated/default_banlist_embedded.h.
RPC And Daemon Notes
- Default RPC port is
21769. RPCClientuses local HTTP with Basic auth. TLS is not assumed for localhost daemon RPC.- DragonX daemon config paths:
- Linux:
~/.hush/DRAGONX/DRAGONX.conf - Windows:
%APPDATA%/Hush/DRAGONX/DRAGONX.conf - macOS:
~/Library/Application Support/Hush/DRAGONX/DRAGONX.conf
- Linux:
Connection::autoDetectConfig()creates missing config files, appendsexportdir,experimentalfeatures=1, anddeveloperencryptwallet=1, and falls back to.cookieauth if norpcpasswordis configured.- The embedded daemon detects an external daemon on the RPC port and connects to it instead of taking ownership.
- Chain args include TLS-only mode, adaptive
-dbcache, DragonX asset parameters, node seedsnode.dragonx.isthroughnode4.dragonx.is, and optional-maxconnections=<n>from Settings.
UI And Data Notes
- Sidebar navigation is driven by
NavPage: Overview, Send, Receive, History, Mining, Market, Console, Network, Explorer, Settings. - Explorer lives in
src/ui/windows/explorer_tab.cpp; Settings usessrc/ui/pages/settings_page.cpp. - Address labels, icons, favorites, hidden state, and manual ordering are persisted in Settings, especially
address_meta. AddressInfo::has_spending_keytracks view-only shielded addresses; send flows filter or reject non-spendable z-addresses.- The pickaxe icon is not a normal
ICON_MD_*glyph. UseAddressLabelDialog::drawIconByName()orTypography::pickaxeFontForSize()for that special case.
Remaining Work
- Investigate
todo.md: determine whether DragonX/Komodo wallet storage supports a safe compaction or consolidation workflow for wallets with too many addresses.