getEntityVks method
Get the list of verification keys associated to the given pair of fellowship and template
fellowship
A String label of the fellowship to get the verification keys for
template
A String label of the template to get the verification keys for
Returns the list of verification keys in base58 format associated to the given fellowship and template if possible.
Else null. It is possible that the list of entities is empty.
Implementation
@override
List<String>? getEntityVks(String fellowship, String template) {
final fellowshipResult = fellowshipsStore.findFirstSync(_instance,
finder: Finder(filter: Filter.equals("name", fellowship)));
final templateResult = templatesStore.findFirstSync(_instance,
finder: Finder(filter: Filter.equals("name", template)));
if (fellowshipResult != null && templateResult != null) {
final x = fellowshipResult["x"]! as int;
final y = templateResult["y"]! as int;
final verificationKeyResult =
verificationKeysStore.findFirstSync(_instance,
finder: Finder(
filter: Filter.and([
Filter.equals("x", x),
Filter.equals("y", y),
]),
));
if (verificationKeyResult != null) {
return (verificationKeyResult["vks"]! as List).cast<String>();
}
}
return null;
}