BeaconState.fromJson constructor

BeaconState.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BeaconState.fromJson(Map<String, dynamic> json) {
  return BeaconState(
    witnesses: (json['witnesses'] as List)
        .map((e) => WitnessData.fromJson(e))
        .toList(),
    epoch: json['epoch'],
    witnessesRequiredForClaim: json['witnessesRequiredForClaim'],
    nextEpochTimestampS: json['nextEpochTimestampS'],
  );
}