proto-kit / framework

Apache License 2.0
28 stars 10 forks source link

unify ZkProgramProvider interface #19

Closed rpanic closed 1 year ago

rpanic commented 1 year ago

Create a Interface that all ZkProgram-using classes implement to standardize access to the zkprogram and Proof-subclass

Describe the solution you'd like A interface that looks something like

export interface ZkProgramProvider<
  PublicInputType extends FlexibleProvablePure<any>,
  Methods extends { [x: string]: Tuple<PrivateInput> };
>{

  get zkProgram(): ReturnType<typeof ZkProgram<PublicInputType, Methods>>

  get proofType() : Subclass<typeof Proof<PublicInputType>>

}

and is implemented by all classes that provide ZkPrograms