CertDelegation.fromJson constructor

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

Implementation

factory CertDelegation.fromJson(Map<String, dynamic> json) {
  return CertDelegation(
    json['certificate'] is Uint8List || json['certificate'] is Uint8Buffer
        ? Uint8List.fromList(json['certificate'])
        : Uint8List.fromList([]),
    Uint8List.fromList(json['subnet_id'] as List<int>),
  );
}