Event class

A Nostr event

For more details about Nostr events refer to NIP-01.

Constructors

Event(String pubKey, int kind, List tags, String content)
Creates a new Nostr event.
Event.fromJson(Map<String, dynamic> data)
factory

Properties

content String
Event content.
final
createdAt int
Event creation timestamp in Unix time.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String
The event ID is a 32-byte SHA256 hash of the serialised event data.
getter/setter pair
isSigned bool
no setter
isValid bool
no setter
kind int
Event kind identifier (e.g. text_note, set_metadata, etc).
final
pubKey String
The event author's public key.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sig String
64-byte Schnorr signature of Event.id.
getter/setter pair
source String
Relay that an event was received from
getter/setter pair
tags List
A JSON array of event tags.
getter/setter pair

Methods

doProofOfWork(int difficulty) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(String privateKey) → void
toJson() Map<String, dynamic>
Returns the Event object as a JSON object
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override