Class Nip01UserMetadataListener

    • Constructor Detail

      • Nip01UserMetadataListener

        public Nip01UserMetadataListener​(java.util.function.Consumer<Nip01UserMetadata> consumer)
      • Nip01UserMetadataListener

        public Nip01UserMetadataListener()
    • Method Detail

      • onSubEvent

        public void onSubEvent​(NostrSubscription sub,
                               SignedNostrEvent event,
                               boolean stored)
        Description copied from interface: NostrSubEventListener
        Called when an event matching the subscription's filter is received.

        This method is invoked for each event that matches the subscription's filter criteria and passes any duplicate detection checks implemented by the subscription's event tracker.

        Specified by:
        onSubEvent in interface NostrSubEventListener
        Parameters:
        sub - The subscription that received the event
        event - The signed Nostr event that was received
        stored - Whether this event came from the relay's stored history (true) or is a new event (false)