Lists class

Lists usecase for access to NIP-51 lists and sets.

This class provides methods to manage Nostr lists and sets according to NIP-51, including creating, reading, updating, and deleting list elements and sets.

Constructors

Lists({required Requests requests, required CacheManager cacheManager, required Broadcast broadcast, required Accounts accounts})
Creates a Lists usecase instance.

Properties

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

Methods

addElementToList({required int kind, required String tag, required String value, Iterable<String>? broadcastRelays, bool private = false}) Future<Nip51List>
Adds an element to a NIP-51 list.
addElementToSet({required String name, required String tag, required String value, required int kind, bool private = false, Iterable<String>? specificRelays}) Future<Nip51Set?>
Adds an element to a NIP-51 set.
broadcastAddNip51ListElement(int kind, String tag, String value, Iterable<String>? broadcastRelays, {bool private = false}) Future<Nip51List>
Use addElementToList instead.
broadcastAddNip51ListRelay(int kind, String relayUrl, Iterable<String>? broadcastRelays, {bool private = false}) Future<Nip51List>
Use addElementToList instead.
broadcastAddNip51SetRelay(String relayUrl, String name, Iterable<String>? broadcastRelays, {bool private = false}) Future<Nip51Set>
Use addElementToSet instead.
broadcastRemoveNip51ListElement(int kind, String tag, String value, Iterable<String>? broadcastRelays) Future<Nip51List?>
Use removeElementFromList instead.
broadcastRemoveNip51Relay(int kind, String relayUrl, Iterable<String>? broadcastRelays, {List<String>? defaultRelaysIfEmpty}) Future<Nip51List?>
Use removeElementFromSet instead.
broadcastRemoveNip51SetRelay(String relayUrl, String name, Iterable<String>? broadcastRelays, {List<String>? defaultRelaysIfEmpty, bool private = false}) Future<Nip51Set?>
Use removeElementFromSet instead.
deleteSet({required String name, required int kind, Iterable<String>? specificRelays}) Future
Deletes a NIP-51 set by name.
getNip51RelaySets(int kind, EventSigner signer, {bool forceRefresh = false}) Future<List<Nip51Set>?>
Use getPublicSets instead.
getPublicNip51RelaySets({required int kind, required String publicKey, bool forceRefresh = false}) Future<List<Nip51Set>?>
Use getPublicSets instead.
getPublicSets({required int kind, String? publicKey, bool forceRefresh = false}) Stream<Iterable<Nip51Set>?>
Returns a stream of public sets for a given public key, default is pubkey of logged in user.
getSetByName({required String name, required int kind, bool forceRefresh = false}) Future<Nip51Set?>
Gets a NIP-51 set by name identifier (d tag).
getSingleNip51List(int kind, {bool forceRefresh = false, Duration timeout = const Duration(seconds: 5)}) Future<Nip51List?>
Returns a NIP-51 list by the given kind.
getSingleNip51RelaySet(String name, {bool forceRefresh = false}) Future<Nip51Set?>
Use getSetByName instead.
getSinglePublicNip51RelaySet({required String name, required String publicKey, bool forceRefresh = false}) Future<Nip51Set?>
return single public nip51 set that match given name and pubkey
use getSetByName instead
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeElementFromList({required int kind, required String tag, required String value, Iterable<String>? broadcastRelays}) Future<Nip51List?>
Removes an element from a NIP-51 list.
removeElementFromSet({required String name, required String value, required String tag, required int kind, bool private = false, Iterable<String>? specificRelays}) Future<Nip51Set?>
Removes an element from a NIP-51 set.
setCompleteSet({required Nip51Set set, required int kind, Iterable<String>? specificRelays}) Future<Nip51Set>
Overwrites or creates a complete NIP-51 set.
toString() String
A string representation of this object.
inherited

Operators

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