SignedDelegation.fromJson constructor

SignedDelegation.fromJson(
  1. Map<String, dynamic> map
)

Implementation

factory SignedDelegation.fromJson(Map<String, dynamic> map) {
  return SignedDelegation(
    delegation: map['delegation'] is Delegation
        ? map['delegation']
        : Delegation.fromJson(map['delegation']),
    signature: map['signature'] is String
        ? (map['signature'] as String).toU8a()
        : Uint8List.fromList(map['signature']),
  );
}