broadcastDeletion method
NdkBroadcastResponse
broadcastDeletion({
- required String eventId,
- Iterable<
String> ? customRelays, - EventSigner? customSigner,
request a deletion of an event
eventId
event you want to delete
customRelays
relay URls to send the deletion request to specific relays
customSigner
if you want to use a different signer than the default specified in NdkConfig
Implementation
NdkBroadcastResponse broadcastDeletion({
required String eventId,
Iterable<String>? customRelays,
EventSigner? customSigner,
}) {
final EventSigner mySigner = _checkSinger(customSigner: customSigner);
Nip01Event event = Nip01Event(
pubKey: mySigner.getPublicKey(),
kind: Deletion.KIND,
tags: [
["e", eventId]
],
content: "delete",
createdAt: DateTime.now().millisecondsSinceEpoch ~/ 1000);
return broadcast(
nostrEvent: event,
specificRelays: customRelays,
customSigner: customSigner,
);
}