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 contract) {
final fellowshipResult = fellowshipsStore.findFirstSync(_instance,
finder: Finder(filter: Filter.equals("name", fellowship)));
final contractResult = contractsStore.findFirstSync(_instance,
finder: Finder(filter: Filter.equals("contract", contract)));
if (fellowshipResult != null && contractResult != null) {
final verificationKeyResult =
verificationKeysStore.findFirstSync(_instance,
finder: Finder(
filter: Filter.and([
Filter.equals("xFellowship", fellowshipResult["xFellowship"]),
Filter.equals("yContract", contractResult.key),
]),
));
if (verificationKeyResult != null) {
return (verificationKeyResult["vks"]! as List).cast<String>();
}
}
return null;
}