CircomJS
  • Introduction
    • CircomJS
    • Getting Started
  • Circuit Config File
    • Circuit Config File
    • fileName
    • Circuit ID
  • Classes
    • CircomJS
    • Circuit
Powered by GitBook
On this page
  1. Circuit Config File

fileName

PreviousCircuit Config FileNextCircuit ID

Last updated 2 years ago

fileName

The has a field fileName for every circuit declared inside circuits.

This value of this field is used to resolve the file path of your circuit and helps CircomJS from it.

The resolved file path is inputDIR/fileName. The below diagram illustrates this.

In the above scenario, the fileName is "multiply.circom", hence the file path where CircomJS will look for this circuit, will be at inputDIR/fileName, i.e ./circuits/multiply.circom.

What about nested file paths?

What if your circuit is inside a multiply directory? Then you should assign the following value to fileName->multiply/multiply.circom, this way CircomJS will look inside inputDir/multiply directory for a Circom file with the name multiply.circom.

The above-described method of file resolution only applies for fileName field, all other file paths are resolved relative to the current working directory.

For example in the above diagram, powerOfTauFp will be resolved relative to the current working directory, and not relative toinputDir.

circuit config file
filepath resolution of circuit
filepath resolution for circuits with nested structure.