verifyAuthorizationList static method
Map<int, bool>
verifyAuthorizationList(
- List<
Authorization> authorizations, - List<
String> expectedSigners
Verifies a list of authorizations.
Returns a map where keys are authorization indices and values indicate whether each authorization is valid.
Implementation
static Map<int, bool> verifyAuthorizationList(
List<Authorization> authorizations,
List<String> expectedSigners,
) {
if (authorizations.length != expectedSigners.length) {
throw ArgumentError(
'Authorization list and signer list must have the same length');
}
final results = <int, bool>{};
for (var i = 0; i < authorizations.length; i++) {
results[i] = verifyAuthorization(authorizations[i], expectedSigners[i]);
}
return results;
}