BarretenbergBackend
Extends
BarretenbergVerifierBackend
Implements
Constructors
new BarretenbergBackend(acirCircuit, options)
new BarretenbergBackend(acirCircuit, options): BarretenbergBackend
Parameters
Parameter | Type |
---|---|
acirCircuit | CompiledCircuit |
options | BackendOptions |
Returns
Inherited from
BarretenbergVerifierBackend.constructor
Properties
Property | Type | Description | Inheritance |
---|---|---|---|
acirComposer | any | - | BarretenbergVerifierBackend.acirComposer |
acirUncompressedBytecode | Uint8Array | - | BarretenbergVerifierBackend.acirUncompressedBytecode |
api | Barretenberg | - | BarretenbergVerifierBackend.api |
options | BackendOptions | - | BarretenbergVerifierBackend.options |
Methods
destroy()
destroy(): Promise<void>
Returns
Promise
<void
>
Implementation of
Inherited from
BarretenbergVerifierBackend.destroy
Description
Destroys the backend
generateProof()
generateProof(compressedWitness): Promise<ProofData>
Parameters
Parameter | Type |
---|---|
compressedWitness | Uint8Array |
Returns
Promise
<ProofData
>
Implementation of
Description
Generates a proof
generateRecursiveProofArtifacts()
generateRecursiveProofArtifacts(proofData, numOfPublicInputs): Promise<object>
Generates artifacts that will be passed to a circuit that will verify this proof.
Instead of passing the proof and verification key as a byte array, we pass them as fields which makes it cheaper to verify in a circuit.
The proof that is passed here will have been created using a circuit
that has the #[recursive] attribute on its main
method.
The number of public inputs denotes how many public inputs are in the inner proof.
Parameters
Parameter | Type | Default value |
---|---|---|
proofData | ProofData | undefined |
numOfPublicInputs | number | 0 |
Returns
Promise
<object
>
Implementation of
Backend
.generateRecursiveProofArtifacts
Example
const artifacts = await backend.generateRecursiveProofArtifacts(proof, numOfPublicInputs);
getVerificationKey()
getVerificationKey(): Promise<Uint8Array>
Returns
Promise
<Uint8Array
>
Inherited from
BarretenbergVerifierBackend.getVerificationKey
verifyProof()
verifyProof(proofData): Promise<boolean>
Parameters
Parameter | Type |
---|---|
proofData | ProofData |
Returns
Promise
<boolean
>
Implementation of
Inherited from
BarretenbergVerifierBackend.verifyProof
Description
Verifies a proof
Generated using typedoc-plugin-markdown and TypeDoc