add folder

This commit is contained in:
callebtc 2023-02-13 15:28:47 +01:00
parent e8c9950cb0
commit f03284d4ea
29 changed files with 1171 additions and 0 deletions

15
nostr/message_type.py Normal file
View 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