groth16ProveWithZKeyFilePath method

  1. @override
Future<({String proof, String publicSignals})> groth16ProveWithZKeyFilePath({
  1. required String zkeyPath,
  2. required Uint8List witness,
  3. int proofBufferSize = _defaultProofBufferSize,
  4. int? publicBufferSize,
  5. int errorBufferSize = _defaultErrorBufferSize,
})
override

Implementation

@override
Future<({String proof, String publicSignals})> groth16ProveWithZKeyFilePath({
  required String zkeyPath,
  required Uint8List witness,
  int proofBufferSize = _defaultProofBufferSize,
  int? publicBufferSize,
  int errorBufferSize = _defaultErrorBufferSize,
}) async {
  final actualPublicBufferSize = publicBufferSize ??
      await groth16PublicSizeForZkeyFile(
          zkeyPath: zkeyPath, errorBufferSize: errorBufferSize);

  final result = (await methodChannel.invokeMapMethod<String, dynamic>(
    'groth16ProveWithZKeyFilePath',
    {
      "zkeyPath": zkeyPath,
      "witness": witness,
      "proofBufferSize": proofBufferSize,
      "publicBufferSize": actualPublicBufferSize,
      "errorBufferSize": errorBufferSize,
    },
  ))!;

  return (
    proof: result['proof'] as String,
    publicSignals: result['publicSignals'] as String,
  );
}