mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-19 07:14:23 +01:00
make event id str type
This commit is contained in:
@@ -20,7 +20,7 @@ class Event():
|
||||
created_at: int=int(time.time()),
|
||||
kind: int=EventKind.TEXT_NOTE,
|
||||
tags: "list[list[str]]"=[],
|
||||
id: int=None,
|
||||
id: str=None,
|
||||
signature: str=None) -> None:
|
||||
self.id = id if id != None else sha256(Event.serialize(public_key, created_at, kind, tags, content)).hexdigest()
|
||||
self.public_key = public_key
|
||||
|
||||
Reference in New Issue
Block a user