diff options
| author | Yuval Adam <_@yuv.al> | 2022-01-17 15:16:13 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2022-01-17 15:16:13 +0200 |
| commit | fcfc9410654d366640dac7b6b1c612c8eda2beba (patch) | |
| tree | ff68c30fa063c600f6a7bc546a5ec6251af59f50 /nostr/event.py | |
| parent | 8b7b67e0381bb11fae7691cca134627d26933d57 (diff) | |
Initial bip340 reference code copy pasta
Diffstat (limited to 'nostr/event.py')
| -rw-r--r-- | nostr/event.py | 4 |
1 files changed, 4 insertions, 0 deletions
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() |
