The relay provides a table for users that broadcast metadata update on the relay.

What I did is to fetch the username if the npub did an update of the metadata on the relay, otherwise the pubkey of the user is displayed as hex.

Reply to this note

Please Login to reply.

Discussion

Erratum : the user data is not stored on a specific table, thus the relay records metadata events. I cross the data when possible, same way

The key is to play with subqueries and event kinds