encodeNaddr static method

String encodeNaddr({
  1. required String identifier,
  2. required String pubkey,
  3. required int kind,
  4. List<String>? relays,
})

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

Implementation

static String encodeNaddr({
  required String identifier,
  required String pubkey,
  required int kind,
  List<String>? relays,
}) {
  return Nip19Encoder.encodeNaddr(
    identifier: identifier,
    pubkey: pubkey,
    kind: kind,
    relays: relays,
  );
}