Event constructor

Event({
  1. required int kind,
  2. required List<List<String>> tags,
  3. required String content,
  4. required int created_at,
  5. String id = '',
  6. String sig = '',
  7. String pubkey = '',
  8. String? subscriptionId,
  9. bool verify = true,
})

Creates a new instance of the Event class.

If verify is true (which is the default), this constructor verifies that the sig field is a valid signature of the id field using the public key in the pubkey field.

Implementation

Event({
  required this.kind,
  required this.tags,
  required this.content,
  required this.created_at,
  this.id = '',
  this.sig = '',
  this.pubkey = '',
  this.subscriptionId,
  bool verify = true,
});