mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-19 23:34:19 +01:00
Initial AUTH support
This commit is contained in:
@@ -2,14 +2,16 @@ class ClientMessageType:
|
||||
EVENT = "EVENT"
|
||||
REQUEST = "REQ"
|
||||
CLOSE = "CLOSE"
|
||||
AUTH = "AUTH"
|
||||
|
||||
class RelayMessageType:
|
||||
EVENT = "EVENT"
|
||||
NOTICE = "NOTICE"
|
||||
END_OF_STORED_EVENTS = "EOSE"
|
||||
AUTH = "AUTH"
|
||||
|
||||
@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
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user