Skip to main content
Version: v0.29.0

Noir

Constructors

new Noir(circuit, backend)

new Noir(circuit, backend?): Noir

Parameters

ParameterType
circuitCompiledCircuit
backend?any

Returns

Noir

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

ParameterType
inputsInputMap
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

ParameterType
inputsInputMap
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

ParameterType
proofDataProofData

Returns

Promise<boolean>

Description

Instantiates the verification key and verifies a proof.

Example

async verifyProof(proof)

Generated using typedoc-plugin-markdown and TypeDoc