ReadProof.fromJson constructor

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

Implementation

factory ReadProof.fromJson(Map<String, dynamic> json) {
  return ReadProof(
    at: Uint8List.fromList(hex.decode((json['at'] as String).substring(2))),
    proof: (json['proof'] as List)
        .cast<String>()
        .map((proof) => Uint8List.fromList(hex.decode(proof.substring(2))))
        .toList(),
  );
}