add folder
This commit is contained in:
parent
e8c9950cb0
commit
f03284d4ea
29 changed files with 1171 additions and 0 deletions
15
nostr/message_type.py
Normal file
15
nostr/message_type.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
class ClientMessageType:
|
||||
EVENT = "EVENT"
|
||||
REQUEST = "REQ"
|
||||
CLOSE = "CLOSE"
|
||||
|
||||
class RelayMessageType:
|
||||
EVENT = "EVENT"
|
||||
NOTICE = "NOTICE"
|
||||
END_OF_STORED_EVENTS = "EOSE"
|
||||
|
||||
@staticmethod
|
||||
def is_valid(type: str) -> bool:
|
||||
if type == RelayMessageType.EVENT or type == RelayMessageType.NOTICE or type == RelayMessageType.END_OF_STORED_EVENTS:
|
||||
return True
|
||||
return False
|
||||
Loading…
Add table
Add a link
Reference in a new issue