Add relay message type enums

This commit is contained in:
Wilson Silva
2023-11-14 16:57:33 +07:00
parent 904fe46a9d
commit 0f9c0d3a3d
4 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# frozen_string_literal: true
module Nostr
# Clients can send 4 types of messages, which must be JSON arrays
module RelayMessageType
# @return [String] Used to notify clients all stored events have been sent
EOSE = 'EOSE'
# @return [String] Used to send events requested to clients
EVENT = 'EVENT'
# @return [String] Used to send human-readable messages to clients
NOTICE = 'NOTICE'
# @return [String] Used to notify clients if an EVENT was successful
OK = 'OK'
end
end