Nip01Event class

basic nostr nip01 event data structure

Implementers
Available extensions

Constructors

Nip01Event({String? id, required String pubKey, required int kind, required List<List<String>> tags, required String content, String? sig, bool? validSig, List<String> sources = const [], int createdAt = 0})
Creates a new Nostr event.

Properties

content String
Event content.
final
createdAt int
Event creation timestamp in Unix time.
latefinal
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.
latefinal
kind int
Event kind identifier (e.g. text_note, set_metadata, etc).
final
pTags List<String>
return all p tags in event
no setter
pubKey String
The event author's public key.
final
replyETags List<String>
return all e tags in event that have a reply marker
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sig String?
64-byte Schnorr signature of Nip01Event.id.
final
sources List<String>
Relay that an event was received from
final
tags List<List<String>>
A JSON array of event tags.
final
tTags List<String>
return all t tags in event
no setter
validSig bool?
has signature been validated?
final

Methods

copyWith({String? id, String? pubKey, int? createdAt, int? kind, List<List<String>>? tags, String? content, String? sig, bool? validSig, List<String>? sources}) Nip01Event
getDtag() String?
return first found d tag
getEId() String?
return first e tag found
getFirstTag(String name) String?
Get first tag matching given name
getTags(String tag) List<String>
return all tags that match given tag e.g. 'p'
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonForStorage() Map<String, Object?>

Available on Nip01Event, provided by the Nip01EventExtension extension

toString() String
A string representation of this object.
override

Operators

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

Static Methods

secondsSinceEpoch() int
seconds since epoch

Constants

kTextNodeKind → const int