addEntityVks method
Add a new entry of entity verification keys to the wallet state's cartesian indexing. Entities are at a pair of x (fellowship) and y (template) layers and thus represent a Child verification key at a participants own x/y path. The respective x and y indices of the specified fellowship and template labels must already exist.
fellowship
A String label of the fellowship to associate the new verification keys with
template
A String label of the template to associate the new verification keys with
entities
The list of Verification Keys in base58 format to add
Implementation
@override
Future<void> addEntityVks(
String fellowship, String contract, List<String> entities) async {
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) {
await verificationKeysStore.add(
_instance,
sk.VerificationKey(
xFellowship: fellowshipResult["xFellowship"]! as int,
yContract: contractResult.key,
vks: entities,
).toSembast,
);
}
}