GiftWrap class

Constructors

GiftWrap({required Accounts accounts})

Properties

accounts Accounts
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createRumor({String? customPubkey, required String content, required int kind, required List<List<String>> tags}) Future<Nip01Event>
Creates a rumor (unsigned event)
fromGiftWrap({required Nip01Event giftWrap}) Future<Nip01Event>
Unwraps a gift-wrapped event to retrieve the original rumor
giftWrap the gift-wrapped event to unwrap
returns the original rumor event
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sealRumor({required Nip01Event rumor, required String recipientPubkey}) Future<Nip01Event>
Seals a rumor (creates a kind:13 event)
toGiftWrap({required Nip01Event rumor, required String recipientPubkey}) Future<Nip01Event>
converts a Nip01Event to a giftWrap Nip01Event
rumor the event you want to wrap
recipientPubkey the reciever of the rumor
returns the wrapped event
toString() String
A string representation of this object.
inherited
unsealRumor({required Nip01Event sealedEvent}) Future<Nip01Event>
unwrapEvent({required Nip01Event wrappedEvent}) Future<Nip01Event>

Operators

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

Static Methods

wrapEvent({required String recipientPublicKey, required Nip01Event sealEvent, List<List<String>>? additionalTags}) Future<Nip01Event>
wraps a sealed msg
recipientPublicKey the reciever of the rumor
sealEvent not wrapped event
returns giftWrapEvent

Constants

kGiftWrapEventkind → const int
kSealEventKind → const int