getEventId method
To obtain the event.id, we sha256 the serialized event. The serialization is done over the UTF-8 JSON-serialized string (with no white space or line breaks) of the following structure:
0,
<pubkey, as a (lowercase) hex string>,
<created_at, as a number>,
<kind, as a number>,
<tags, as an array of arrays of non-null strings>,
<content, as a string>
Implementation
String getEventId() {
// Included for minimum breaking changes
return _processEventId(
pubkey,
createdAt,
kind,
tags,
content,
);
}