PublicVariable creates a new public variable for the circuit.
(f schema.LeafInfo)
| 39 | |
| 40 | // PublicVariable creates a new public variable for the circuit. |
| 41 | func (r *Root) PublicVariable(f schema.LeafInfo) frontend.Variable { |
| 42 | r.instructions = append(r.instructions, irsource.Instruction{ |
| 43 | Type: irsource.ConstantLike, |
| 44 | ExtraId: 2 + uint64(r.nbPublicInputs), |
| 45 | }) |
| 46 | r.nbPublicInputs++ |
| 47 | return r.addVar() |
| 48 | } |
| 49 | |
| 50 | // SecretVariable creates a new secret variable for the circuit. |
| 51 | func (r *Root) SecretVariable(f schema.LeafInfo) frontend.Variable { |