module NostrManager
  class ValidateId < NostrManagerService
    def initialize(event:)
      @event = Nostr::Event.new(**event)
    end

    def call
      @event.id == Digest::SHA256.hexdigest(JSON.generate(@event.serialize))
    end
  end
end
