DbEvent class

Inheritance
Annotations
  • @Collection(inheritance: false)

Constructors

DbEvent({required String pubKey, required int kind, required List<List<String>> tags, required String content, int createdAt = 0, required String sig, bool? validSig, required List<String> sources})

Properties

content String
Event content.
getter/setter pairinherited-setteroverride-getter
createdAt int
Event creation timestamp in Unix time.
getter/setter pairinherited-setteroverride-getter
hashCode int
The hash code for this object.
no setterinherited
id String
The event ID is a 32-byte SHA256 hash of the serialised event data.
getter/setter pairinherited-setteroverride-getter
isIdValid bool
is Id valid?
no setterinherited
kind int
Event kind identifier (e.g. text_note, set_metadata, etc).
no setteroverride
pTags List<String>
return all p tags in event
no setteroverride
pubKey String
The event author's public key.
no setteroverride
replyETags List<String>
return all e tags in event that have a mention marker
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sig String
64-byte Schnorr signature of Nip01Event.id.
getter/setter pairinherited-setteroverride-getter
sources List<String>
Relay that an event was received from
getter/setter pairinherited-setteroverride-getter
tags List<List<String>>
A JSON array of event tags.
getter/setter pairinherited-setteroverride-getter
tTags List<String>
return all t tags in event
no setterinherited
validSig bool?
has signature been validated?
getter/setter pairinherited-setteroverride-getter

Methods

getDtag() String?
return first found d tag
inherited
getEId() String?
return first e tag found
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(String privateKey) → void
sign the event with given privateKey WARN only for testing! Use EventSigner to sign events in production
inherited
toJson() Map<String, dynamic>
Returns the Event object as a JSON object
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromNip01Event(Nip01Event event) DbEvent