signSorted static method
Takes the given data
, converts it to an alphabetically sorted
JSON object and signs its content using the given wallet
.
Implementation
static Uint8List signSorted(Map<String, dynamic> data, Wallet wallet) {
final sorted = MapSorter.sort(data);
final dataToSign = Uint8List.fromList(utf8.encode(json.encode(sorted)));
return wallet.sign(dataToSign);
}