aggregatePubKeys method
Aggregate list of G1Element.
Implementation
G1Element aggregatePubKeys(List<G1Element> pks) {
final arrBuf = bindings.AllocPtrArray(pks.length);
pks.asMap().forEach((index, pk) {
// ignore: invalid_use_of_protected_member
bindings.SetPtrArray(arrBuf.cast(), pk.ptr, index);
});
final aggSig = G1Element(
bindings.CCoreMPLAggregatePubKeys(
_coreMPL,
arrBuf.cast(),
pks.length,
),
);
malloc.free(arrBuf);
return aggSig;
}