feat: Namecoin .bit NIP-05 identity verification#79
Open
mstrofnone wants to merge 1 commit into
Open
Conversation
Add Namecoin blockchain-based NIP-05 identity verification for .bit domains. When a user's NIP-05 address ends in .bit (e.g. [email protected]), or uses Namecoin's d/ or id/ namespace, the app queries the Namecoin blockchain via ElectrumX servers instead of making HTTP requests. Ported from Amethyst (MIT License, Vitor Pamplona). New files (12): - lib/services/namecoin/ - 8 service files (ElectrumX client, name resolver, LRU cache, settings, SharedPreferences persistence) - lib/views/settings_view/widgets/property_namecoin.dart - Settings tile - lib/views/settings_view/widgets/namecoin_settings_view.dart - Full settings screen with enable/disable, custom server management, live test lookup - lib/views/widgets/nip05_namecoin_component.dart - Enhanced NIP-05 badge with chain-link icon for verified .bit identifiers - test/services/namecoin/namecoin_name_resolver_test.dart - 24 unit tests Modified files (6): - lib/globals.dart - Added namecoinService and namecoinPreferences globals - lib/initializers.dart - Initialize Namecoin service on startup, graceful fallback if remote cache init fails - lib/repositories/http_functions_repository.dart - Route .bit domains to Namecoin verification in checkNip05Validity() - lib/logic/metadata_cubit/metadata_cubit.dart - Route .bit identifiers to Namecoin resolution in getNip05Pubkey() and batch validation - lib/logic/search_cubit/search_cubit.dart - Route .bit search queries through Namecoin resolver, skip relay connectivity check for .bit domains - lib/views/settings_view/settings_view.dart - Add Namecoin settings tile Supported identifier formats: - NIP-05 style: [email protected] - Bare domain: example.bit - Domain namespace: d/example - Identity namespace: id/alice No new dependencies - uses crypto (already in pubspec.yaml) and dart:io for TCP/TLS sockets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Namecoin blockchain-based NIP-05 identity verification for
.bitdomains. When a user's NIP-05 address ends in.bit(e.g.[email protected]), or uses Namecoin'sd/orid/namespace, the app queries the Namecoin blockchain via ElectrumX servers instead of making HTTP requests.Ported from Amethyst (MIT License, Vitor Pamplona).
New Files (12)
Core Services (
lib/services/namecoin/)UI
Tests
Modified Files (6)
Supported Identifier Formats
[email protected]d/example, findalicein namesexample.bitd/example, use root entryd/exampleid/aliceTesting
[email protected]resolves correctly via ElectrumXcrypto(already in pubspec.yaml) anddart:iofor TCP/TLS sockets