feat: make event kind: 3 replaceable

This commit is contained in:
Vlad Stan 2023-02-06 12:09:53 +02:00
parent 10ef9ee2ac
commit 5a747361af
5 changed files with 110 additions and 9 deletions

View file

@ -59,9 +59,9 @@ class NostrEvent(BaseModel):
id = hashlib.sha256(data.encode()).hexdigest()
return id
def is_meta_event(self) -> bool:
return self.kind == 0
def is_replaceable_event(self) -> bool:
return self.kind in [0, 3]
def is_delete_event(self) -> bool:
return self.kind == 5