Nip01Utils class

Constructors

Nip01Utils()

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

calculateEventId({required String publicKey, required int createdAt, required int kind, required List tags, required String content}) Future<String>
Calculate event id asynchronously running in an isolate
calculateEventIdSync({required String pubKey, required int createdAt, required int kind, required List tags, required String content}) String
Calculate event id synchronously
calculateId(Nip01Event event) String
createEventCalculateId({required String pubKey, required int kind, required List<List<String>> tags, required String content, int createdAt = 0}) Nip01Event
create event and calculate id
returns event with calculated id
isIdValid(Nip01Event event) bool
checks if event id is valid, including proof of work if present
signWithPrivateKey({required Nip01Event event, required String privateKey}) Nip01Event
this method signs the event with the provided private key mainly used for testing purposes, please use the account usecase to sign events!