uniqueKey method

NostrEventKey uniqueKey()

Returns a unique tag for this event that you can use to identify it.

Implementation

NostrEventKey uniqueKey() {
  if (subscriptionId == null) {
    throw Exception(
      "You can't get a unique key for an event that you created, you can only get a unique key for an event that you got from the relays",
    );
  }

 if (id == null) {
    throw Exception(
      "You can't get a unique key for an event that you created, you can only get a unique key for an event that you got from the relays",
    );
  }

  return NostrEventKey(
    eventId: id!,
    sourceSubscriptionId: subscriptionId!,
    originalSourceEvent: this,
  );
}