ZapRequest class

Zap Request

Inheritance

Constructors

ZapRequest({required String pubKey, required List<List<String>> tags, required String content, String? sig})
creates a zap request
pubKey the pubkey of the zap requester
tags the tags of the zap request
content the content of the zap request
sig the signature of the zap request (optional)
returns the zap request \
factory
ZapRequest.nip01Event({required Nip01Event event})
creates a zap request from a nip01 event
event the nip01 event
returns the zap request
kind is set to kZapRequestKind

Properties

content String
Event content.
finalinherited
createdAt int
Event creation timestamp in Unix time.
latefinalinherited
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.
latefinalinherited
kind int
Event kind identifier (e.g. text_note, set_metadata, etc).
finalinherited
pTags List<String>
return all p tags in event
no setterinherited
pubKey String
The event author's public key.
finalinherited
replyETags List<String>
return all e tags in event that have a reply 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.
finalinherited
sources List<String>
Relay that an event was received from
finalinherited
tags List<List<String>>
A JSON array of event tags.
finalinherited
tTags List<String>
return all t tags in event
no setterinherited
validSig bool?
has signature been validated?
finalinherited

Methods

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

Operators

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

Constants

kZapRequestKind → const int