Nip19Encoder class

NIP-19 encoding functions

Constructors

Nip19Encoder()

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

encodeNaddr({required String identifier, required String pubkey, required int kind, List<String>? relays}) String
Encode naddr (addressable event coordinate) identifier - the "d" tag value (empty string for normal replaceable events) pubkey - 32-byte hex public key of the event author (required) kind - event kind number (required) relays - optional list of relay URLs where the event may be found
encodeNevent({required String eventId, List<String>? relays, String? author, int? kind}) String
Encode nevent (event reference) eventId - 32-byte hex event ID (required) relays - optional list of relay URLs where the event may be found author - optional 32-byte hex public key of the event author kind - optional event kind number
encodeNoteId(String id) String
Encode a note ID as note1
encodeNprofile({required String pubkey, List<String>? relays}) String
Encode nprofile (profile reference) pubkey - 32-byte hex public key (required) relays - optional list of relay URLs where the profile may be found
encodePrivateKey(String privateKey) String
Encode a private key as nsec
encodePubKey(String pubkey) String
Encode a public key as npub