From fcfc9410654d366640dac7b6b1c612c8eda2beba Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 17 Jan 2022 15:16:13 +0200 Subject: Initial bip340 reference code copy pasta --- nostr/event.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nostr/event.py') diff --git a/nostr/event.py b/nostr/event.py index 9cf363a..3dfe638 100644 --- a/nostr/event.py +++ b/nostr/event.py @@ -9,6 +9,9 @@ class EventKind(Enum): SET_METADATA = 0 TEXT_NOTE = 1 RECOMMEND_SERVER = 2 + CONTACT_LIST = 3 + ENCRYPTED_DIRECT_MESSAGE = 4 + DELETION = 5 class Event: @@ -24,4 +27,5 @@ class Event: def id(self): data = [0, self.pubkey, self.created_at, self.kind, self.tags, self.content] jd = json.dumps(data).encode("utf-8") + print(jd) return hashlib.sha256(jd).hexdigest() -- cgit v1.3.1