Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vyper Verifiers #12

Merged
merged 5 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**A zero knowledge kit that helps you interact with Circom circuits.**

- Generate and verify ZK proofs with a single line of code.
- Render optimized Solidity verifiers.
- Render optimized Solidity | Vyper verifiers.
- Build and work with ZK witnesses.

## Installation
Expand All @@ -33,31 +33,31 @@ CircuitZKitConfig = {
circuitName: string;
circuitArtifactsPath: string;
verifierDirPath: string;
templateType?: VerifierTemplateType;
provingSystem?: VerifierProvingSystem;
};
```

This config contains all the information required to work with the circuit, namely:

- `circuitName` - Name of the circuit file without extension
- `circuitArtifactsPath` - Full path to compilation artifacts for the desired circuit
- `verifierDirPath` - Full path to the directory where Solidity verifier file will be generated
- `templateType` - The type of template that will be used to generate the Solidity verifier contract. Right now only `groth16` is supported
- `verifierDirPath` - Full path to the directory where Solidity | Vyper verifier file will be generated
- `provingSystem` - The proving system that will be used to generate the verifier contract. Right now only `groth16` is supported

#### getTemplate()

Static `CircuitZKit` function that returns the contents of a template file by the passed type.

```typescript
const templateContent = CircuitZKit.getTemplate("groth16");
const templateContent = CircuitZKit.getTemplate("groth16", "sol");
```

#### createVerifier()

Creates a Solidity verifier contract on `verifierDirPath` path, which was specified in the config.
Creates a Solidity | Vyper verifier contract on `verifierDirPath` path, which was specified in the config.

```typescript
await multiplier.createVerifier();
await multiplier.createVerifier("sol");
```

#### calculateWitness()
Expand Down Expand Up @@ -89,7 +89,7 @@ const isValidProof = await multiplier.verifyProof(proof);

#### generateCalldata()

Generates calldata by proof for the Solidity verifier's `verifyProof()` method.
Generates calldata by proof for the Solidity | Vyper verifier's `verifyProof()` method.

```typescript
/// You can use this calldata to call the verifier contract
Expand Down
Loading
Loading