registerOkCommandCallBack method

void registerOkCommandCallBack({
  1. required String associatedEventId,
  2. required void onOk(
    1. String relay,
    2. NostrEventOkCommand ok
    ),
  3. required String relay,
})

Registers an ok command callback to the registry with the given associatedEventId.

Implementation

void registerOkCommandCallBack({
  required String associatedEventId,
  required void Function(String relay, NostrEventOkCommand ok) onOk,
  required String relay,
}) {
  final relayOkRegister = getOrCreateRegister(okCommandCallBacks, relay);

  relayOkRegister[associatedEventId] = onOk;
}