> For the complete documentation index, see [llms.txt](https://zefi.gitbook.io/circomjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zefi.gitbook.io/circomjs/classes/circuit.md).

# Circuit

### Circuit

Class `Circuit` represent a circuit in a CircomJS project.&#x20;

{% hint style="info" %}
Instances of this class shouldn't be initiated directly by the user and users should rely upon getting them from `CircomJS`'s **`getCircuit`** method.
{% endhint %}

Below is a description of `properties` and `methods` associated with instances of `Circuit` class:

* `compile()` : compiles your circuits and produces the following artifacts:
  * r1cs
  * sym
  * witness generation program
  * &#x20;zkey
  * &#x20;vkey
* `calculateWitness(inp)`: calculates witness for a certain input passed as a javascript object and returns it.
* `checkConstraints(witness)`: takes witnesses generated from `calculateWitness` and returns the result of checking the constraints of the provided witness.
* `getTotatlConstraints()`:  returns the total constraints of the circuit.
* `genProof(inp)`:  generates proof for the given input and returns it as a javascript object, check out the following [link](/circomjs/introduction/getting-started.md#generating-proof) for more info.
* `verifyProof(proof)`: verifies proof generated from `genProof`, returns a boolean indicating the status of verification.
* `getOutputDIR()`: returns the output directory { the directory where its builds will be stored }.&#x20;
