NewRoot returns a new Root instance.
(fieldorder *big.Int, config frontend.CompileConfig)
| 23 | |
| 24 | // NewRoot returns a new Root instance. |
| 25 | func NewRoot(fieldorder *big.Int, config frontend.CompileConfig) *Root { |
| 26 | root := Root{ |
| 27 | config: config, |
| 28 | } |
| 29 | root.field = field.GetFieldFromOrder(fieldorder) |
| 30 | root.registry = newSubCircuitRegistry() |
| 31 | |
| 32 | root.builder = root.newBuilder(0) |
| 33 | root.registry.m[0] = &SubCircuit{ |
| 34 | builder: root.builder, |
| 35 | } |
| 36 | |
| 37 | return &root |
| 38 | } |
| 39 | |
| 40 | // PublicVariable creates a new public variable for the circuit. |
| 41 | func (r *Root) PublicVariable(f schema.LeafInfo) frontend.Variable { |
no test coverage detected