Delegation.fromJson constructor
Delegation.fromJson(
- Map map
Implementation
factory Delegation.fromJson(Map map) {
return Delegation(
map['pubkey'] is String
? (map['pubkey'] as String).toU8a()
: Uint8List.fromList(map['pubkey']),
map['expiration'] is BigInt
? map['expiration']
: (map['expiration'] as String).hexToBn(),
map['targets'] != null
? (map['targets'] as List).map((e) => Principal.fromHex(e)).toList()
: null,
);
}