blsInit method

  1. @override
Future<bool> blsInit()
override

Implementation

@override
Future<bool> blsInit() async {
  try {
    // ignore: unnecessary_null_comparison
    if (dylib == null) throw "ERROR: The library is not initialized 🙁";
    final response = ReceivePort();
    await Isolate.spawn(
      _isolateBlsInit,
      [response.sendPort],
    );
    return (await response.first) as bool;
  } catch (e) {
    throw "Cannot initialize BLS instance :$e";
  }
}