BarretenbergBackend
Implements
Constructors
new BarretenbergBackend(acirCircuit, options)
new BarretenbergBackend(acirCircuit, options): BarretenbergBackend
Parameters
Parameter | Type |
---|---|
acirCircuit | CompiledCircuit |
options | BackendOptions |
Returns
Methods
destroy()
destroy(): Promise<void>
Returns
Promise
<void
>
Implementation of
Description
Destroys the backend
generateFinalProof()
generateFinalProof(decompressedWitness): Promise<ProofData>
Parameters
Parameter | Type |
---|---|
decompressedWitness | Uint8Array |
Returns
Promise
<ProofData
>
Implementation of
Description
Generates a final proof (not meant to be verified in another circuit)
generateIntermediateProof()
generateIntermediateProof(witness): Promise<ProofData>
Parameters
Parameter | Type |
---|---|
witness | Uint8Array |
Returns
Promise
<ProofData
>
Implementation of
Backend
.generateIntermediateProof
Example
const intermediateProof = await backend.generateIntermediateProof(witness);
generateIntermediateProofArtifacts()
generateIntermediateProofArtifacts(proofData, numOfPublicInputs): Promise<object>
Parameters
Parameter | Type | Default value |
---|---|---|
proofData | ProofData | undefined |
numOfPublicInputs | number | 0 |
Returns
Promise
<object
>
Implementation of
Backend
.generateIntermediateProofArtifacts
Example
const artifacts = await backend.generateIntermediateProofArtifacts(proof, numOfPublicInputs);
verifyFinalProof()
verifyFinalProof(proofData): Promise<boolean>
Parameters
Parameter | Type |
---|---|
proofData | ProofData |
Returns
Promise
<boolean
>
Implementation of
Description
Verifies a final proof
verifyIntermediateProof()
verifyIntermediateProof(proofData): Promise<boolean>
Parameters
Parameter | Type |
---|---|
proofData | ProofData |
Returns
Promise
<boolean
>
Implementation of
Backend
.verifyIntermediateProof
Example
const isValidIntermediate = await backend.verifyIntermediateProof(proof);
Generated using typedoc-plugin-markdown and TypeDoc