Noir
Constructors
new Noir(circuit, backend)
new Noir(circuit, backend?): Noir
Parameters
Parameter | Type |
---|---|
circuit | CompiledCircuit |
backend ? | any |
Returns
Methods
destroy()
destroy(): Promise<void>
Returns
Promise
<void
>
Description
Destroys the underlying backend instance.
Example
await noir.destroy();
execute()
execute(inputs, foreignCallHandler?): Promise<object>
Parameters
Parameter | Type |
---|---|
inputs | InputMap |
foreignCallHandler ? | ForeignCallHandler |
Returns
Promise
<object
>
Description
Allows to execute a circuit to get its witness and return value.
Example
async execute(inputs)
generateProof()
generateProof(inputs, foreignCallHandler?): Promise<ProofData>
Parameters
Parameter | Type |
---|---|
inputs | InputMap |
foreignCallHandler ? | ForeignCallHandler |
Returns
Promise
<ProofData
>
Description
Generates a witness and a proof given an object as input.
Example
async generateProof(input)
verifyProof()
verifyProof(proofData): Promise<boolean>
Parameters
Parameter | Type |
---|---|
proofData | ProofData |
Returns
Promise
<boolean
>
Description
Instantiates the verification key and verifies a proof.
Example
async verifyProof(proof)
Generated using typedoc-plugin-markdown and TypeDoc