-
Mika Hyttinen authored
Implemented core user profile management for DHT: New Features: - User profile data structures (dht_profile.h/c) - Profile with identity, nickname, pubkeys, avatar, groups - Nickname validation (3-32 chars, alphanumeric + underscore) - Binary serialization/deserialization - SHA256-based identity computation - DHT storage functions (dna_dht.c) - dna_dht_register_user() - Register with optional nickname - dna_dht_lookup_profile() - Get profile by identity - dna_dht_lookup_nickname() - Resolve nickname → identity - dna_dht_update_profile() - Update profile (stub) - Profile storage in DHT - Profile entry: SHA256("profile:identity") → user_profile_t - Nickname index: SHA256("nickname:alice") → identity - 1-year TTL for profiles - Nickname collision detection - Python test client (test_client.py) - send - Send messages - inbox - Get message list - get - Retrieve specific message - register - Register user (ready for HTTP endpoint) - lookup - Lookup profile - search - Search by nickname - stats - Node statistics - Demo script (demo.sh) - Quick testing of messaging APIs - Example usage patterns Technical Details: - Profile serialization: version + identity + flags + keys + metadata - Supports groups array (for future group messaging) - Avatar stored as hash reference (image stored separately) - Backwards compatible with flat/nested config formats - Thread-safe logging integrated Testing: ✓ Profile creation and serialization ✓ Nickname validation ✓ Identity computation (SHA256 of pubkey) ✓ Clean build with no warnings Still TODO: - HTTP endpoints for /api/v1/users/* (Phase 2) - Profile replication to peers - Avatar image storage - Profile update implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude <noreply@anthropic.com>
Mika Hyttinen authoredImplemented core user profile management for DHT: New Features: - User profile data structures (dht_profile.h/c) - Profile with identity, nickname, pubkeys, avatar, groups - Nickname validation (3-32 chars, alphanumeric + underscore) - Binary serialization/deserialization - SHA256-based identity computation - DHT storage functions (dna_dht.c) - dna_dht_register_user() - Register with optional nickname - dna_dht_lookup_profile() - Get profile by identity - dna_dht_lookup_nickname() - Resolve nickname → identity - dna_dht_update_profile() - Update profile (stub) - Profile storage in DHT - Profile entry: SHA256("profile:identity") → user_profile_t - Nickname index: SHA256("nickname:alice") → identity - 1-year TTL for profiles - Nickname collision detection - Python test client (test_client.py) - send - Send messages - inbox - Get message list - get - Retrieve specific message - register - Register user (ready for HTTP endpoint) - lookup - Lookup profile - search - Search by nickname - stats - Node statistics - Demo script (demo.sh) - Quick testing of messaging APIs - Example usage patterns Technical Details: - Profile serialization: version + identity + flags + keys + metadata - Supports groups array (for future group messaging) - Avatar stored as hash reference (image stored separately) - Backwards compatible with flat/nested config formats - Thread-safe logging integrated Testing: ✓ Profile creation and serialization ✓ Nickname validation ✓ Identity computation (SHA256 of pubkey) ✓ Clean build with no warnings Still TODO: - HTTP endpoints for /api/v1/users/* (Phase 2) - Profile replication to peers - Avatar image storage - Profile update implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code ) Co-Authored-By:Claude <noreply@anthropic.com>
Loading