fromRelayMessage static method

NostrNotice fromRelayMessage(
  1. String data
)

Implementation

static NostrNotice fromRelayMessage(String data) {
  assert(canBeDeserialized(data));

  final decoded = jsonDecode(data) as List;
  assert(decoded.first == NostrConstants.notice);
  final message = decoded[1] as String;

  return NostrNotice(message: message);
}