BaseProofGenerator class

This is the abstract base class for the ProofGenerator and UnsignedProofGenerator classes.

export abstract class BaseProofGenerator<Type> {
  protected zkpComponentPath: string;
  protected zkpComponentName: string;

  constructor(
    zkpComponentPath: string,
    zkpComponentName: string
  )
  {
    this.zkpComponentPath = zkpComponentPath;
    this.zkpComponentName = zkpComponentName;
  }

  protected abstract formatCustomInput(customInput: Type): object

  protected createProof = async (
    input: object,
    wasmFile: string,
    provingKeyFile: string
  ): Promise<[string, string]> => {
    ... deleted for clarity...
  }
}

Last updated