registerCountResponseCallBack method

void registerCountResponseCallBack({
  1. required String subscriptionId,
  2. required void onCountResponse(
    1. String relay,
    2. NostrCountResponse countResponse
    ),
  3. required String relay,
})

Registers a count response callback to the registry with the given subscriptionId.

Implementation

void registerCountResponseCallBack({
  required String subscriptionId,
  required void Function(String relay, NostrCountResponse countResponse)
      onCountResponse,
  required String relay,
}) {
  final relayCountRegister = countResponseCallBacks[subscriptionId];

  relayCountRegister?[subscriptionId] = onCountResponse;
}