[ HiveTalk/swarm ] Fix npub conversion by sending hex from frontend
- Frontend now sends converted hex pubkey instead of raw input
- Prevents server-side bech32 decoding issues
- Maintains fallback npub conversion on server for robustness
- Fixes 'invalid padding' error in bech32 implementation
The frontend successfully converts npub to hex using nostr-tools,
so we send that validated hex value to the server.
[ HiveTalk/swarm ] Fix JSON error responses in NIP-05 API
- Replace http.Error calls with proper JSON error responses
- Add Content-Type header for all responses
- Create returnError helper function for consistent error format
- Prevents 'JSON.parse: unexpected keyword' errors in frontend
Now all API responses are properly formatted JSON with success/error status