PeerInfo<H, N>.fromJson constructor

PeerInfo<H, N>.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PeerInfo.fromJson(Map<String, dynamic> json) {
  return PeerInfo(
    peerId: json['peerId'] as String,
    roles: json['roles'] as String,
    bestHash: json['bestHash'] as H,
    bestNumber: json['bestNumber'] as N,
  );
}