Nip2 class

Contact List and Petnames

A special event with kind 3, meaning "contact list" is defined as having a list of p tags, one for each of the followed/known profiles one is following.

Each tag entry should contain the key for the profile, a relay URL where events from that key can be found (can be set to an empty string if not needed), and a local name (or "petname") for that profile (can also be set to an empty string or not provided), i.e., "p", "32-bytes hex key", "main relay URL", "petname". The content can be anything and should be ignored.

Constructors

Nip2()

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

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

Static Methods

decode(Event event) List<Profile>
Returns the profils from a contact list event (kind=3)
toProfiles(List<List<String>> tags) List<Profile>
Returns profiles from event.tags
toTags(List<Profile> profiles) List<List<String>>
Returns tags from profiles list