Add a 'Namecoin Resolution' section that lets users configure custom
ElectrumX servers for .bit / d/ / id/ name resolution. When custom
servers are configured, they are used EXCLUSIVELY — the hardcoded
public defaults are completely ignored. This gives privacy-conscious
users full control over which servers observe their name lookups.
Server format: host:port (TLS default) or host:port:tcp (plaintext).
Supports .onion addresses for Tor-routed lookups.
New files:
NamecoinSettings.kt
Immutable settings data class with server string parsing/formatting.
NamecoinSharedPreferences.kt
DataStore-backed persistence following the TorSharedPreferences
pattern. Provides a synchronous snapshot for the serverListProvider
lambda and observable StateFlow for the UI.
NamecoinSettingsSection.kt
Compose UI: enable/disable toggle, active server display with
DEFAULT/CUSTOM badge, add/remove servers with validation, reset.
NamecoinSettingsTest.kt
Unit tests for parsing, formatting, round-trips, and edge cases.
Integration:
AppModules.kt — added namecoinPrefs (NamecoinSharedPreferences) and
wired customServersOrNull into the existing serverListProvider so
user-configured servers take priority over the Tor/default logic.
Refactored from an earlier patch to avoid duplicating code already in
main. The quartz-layer ElectrumXClient, NamecoinNameResolver, and
supporting types are reused unchanged.
* 'main' of https://github.com/vitorpamplona/amethyst: (35 commits)
New Crowdin translations by GitHub Action
fix chess tests
Replace subsequent checks with '!isNullOrEmpty()' call
use forEach: no intermediate list created.
Use filterIsInstance to avoid dual iteration
Lambda argument should be moved out of parentheses
replace null checks with Elvis
merge call chain with flatMap (slight performance improvement)
New Crowdin translations by GitHub Action
New Crowdin translations by GitHub Action
update cz, pt, de, sv
was this meant to be withContext?
add names to boolean params
remove unused imports
Explicit type arguments can be inferred
remove redundant modifiers
correct package name
If-Null return/break/... foldable to '?:'
Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable.
Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable.
...
# Conflicts:
# amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/ReactionsSettingsScreen.kt
The NamecoinNameService.init() singleton was the only consumer of
the companion object removed in the previous commit. The
namecoinNameService val itself was never referenced — namecoinResolver
is what's wired into Nip05Client.