RelayInformations.fromNip11Response constructor

RelayInformations.fromNip11Response(
  1. Map<String, dynamic> json
)

Implementation

factory RelayInformations.fromNip11Response(Map<String, dynamic> json) {
  final supportedNips = json['supported_nips'].cast<int>();

  return RelayInformations(
    contact: json['contact'] as String?,
    description: json['description'] as String?,
    name: json['name'] as String?,
    pubkey: json['pubkey'] as String?,
    software: json['software'] as String?,
    supportedNips: supportedNips as List<int>?,
    version: json['version'] as String?,
  );
}