canBeDeserialized static method

bool canBeDeserialized(
  1. String dataFromRelay
)

Wether the given dataFromRelay can be deserialized into a NostrEvent.

Implementation

static bool canBeDeserialized(String dataFromRelay) {
  final decoded = jsonDecode(dataFromRelay) as List;

  return decoded.first == NostrConstants.event;
}