@noir-lang/backend_barretenberg
Advanced tools
Comparing version 0.19.0 to 0.19.1
@@ -9,6 +9,22 @@ import { Backend, CompiledCircuit, ProofData } from '@noir-lang/types'; | ||
constructor(acirCircuit: CompiledCircuit, options?: BackendOptions); | ||
/** @ignore */ | ||
instantiate(): Promise<void>; | ||
generateFinalProof(decompressedWitness: Uint8Array): Promise<ProofData>; | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const intermediateProof = await backend.generateIntermediateProof(witness); | ||
* ``` | ||
*/ | ||
generateIntermediateProof(witness: Uint8Array): Promise<ProofData>; | ||
/** @ignore */ | ||
generateProof(compressedWitness: Uint8Array, makeEasyToVerifyInCircuit: boolean): Promise<ProofData>; | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const artifacts = await backend.generateIntermediateProofArtifacts(proof, numOfPublicInputs); | ||
* ``` | ||
*/ | ||
generateIntermediateProofArtifacts(proofData: ProofData, numOfPublicInputs?: number): Promise<{ | ||
@@ -20,5 +36,14 @@ proofAsFields: string[]; | ||
verifyFinalProof(proofData: ProofData): Promise<boolean>; | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const isValidIntermediate = await backend.verifyIntermediateProof(proof); | ||
* ``` | ||
*/ | ||
verifyIntermediateProof(proofData: ProofData): Promise<boolean>; | ||
/** @ignore */ | ||
verifyProof(proof: Uint8Array, makeEasyToVerifyInCircuit: boolean): Promise<boolean>; | ||
destroy(): Promise<void>; | ||
} | ||
export { Backend, BackendOptions, CompiledCircuit, ProofData }; |
@@ -24,2 +24,3 @@ "use strict"; | ||
} | ||
/** @ignore */ | ||
async instantiate() { | ||
@@ -59,2 +60,9 @@ if (!this.api) { | ||
// easier to verify in a circuit. | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const intermediateProof = await backend.generateIntermediateProof(witness); | ||
* ``` | ||
*/ | ||
async generateIntermediateProof(witness) { | ||
@@ -64,2 +72,3 @@ const makeEasyToVerifyInCircuit = true; | ||
} | ||
/** @ignore */ | ||
async generateProof(compressedWitness, makeEasyToVerifyInCircuit) { | ||
@@ -88,2 +97,9 @@ await this.instantiate(); | ||
// The number of public inputs denotes how many public inputs are in the inner proof. | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const artifacts = await backend.generateIntermediateProofArtifacts(proof, numOfPublicInputs); | ||
* ``` | ||
*/ | ||
async generateIntermediateProofArtifacts(proofData, numOfPublicInputs = 0) { | ||
@@ -110,2 +126,9 @@ await this.instantiate(); | ||
} | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const isValidIntermediate = await backend.verifyIntermediateProof(proof); | ||
* ``` | ||
*/ | ||
async verifyIntermediateProof(proofData) { | ||
@@ -116,2 +139,3 @@ const proof = reconstructProofWithPublicInputs(proofData); | ||
} | ||
/** @ignore */ | ||
async verifyProof(proof, makeEasyToVerifyInCircuit) { | ||
@@ -118,0 +142,0 @@ await this.instantiate(); |
@@ -0,3 +1,8 @@ | ||
/** | ||
* @description | ||
* An options object, currently only used to specify the number of threads to use. | ||
*/ | ||
export type BackendOptions = { | ||
/** @description Number of threads */ | ||
threads: number; | ||
}; |
@@ -9,6 +9,22 @@ import { Backend, CompiledCircuit, ProofData } from '@noir-lang/types'; | ||
constructor(acirCircuit: CompiledCircuit, options?: BackendOptions); | ||
/** @ignore */ | ||
instantiate(): Promise<void>; | ||
generateFinalProof(decompressedWitness: Uint8Array): Promise<ProofData>; | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const intermediateProof = await backend.generateIntermediateProof(witness); | ||
* ``` | ||
*/ | ||
generateIntermediateProof(witness: Uint8Array): Promise<ProofData>; | ||
/** @ignore */ | ||
generateProof(compressedWitness: Uint8Array, makeEasyToVerifyInCircuit: boolean): Promise<ProofData>; | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const artifacts = await backend.generateIntermediateProofArtifacts(proof, numOfPublicInputs); | ||
* ``` | ||
*/ | ||
generateIntermediateProofArtifacts(proofData: ProofData, numOfPublicInputs?: number): Promise<{ | ||
@@ -20,5 +36,14 @@ proofAsFields: string[]; | ||
verifyFinalProof(proofData: ProofData): Promise<boolean>; | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const isValidIntermediate = await backend.verifyIntermediateProof(proof); | ||
* ``` | ||
*/ | ||
verifyIntermediateProof(proofData: ProofData): Promise<boolean>; | ||
/** @ignore */ | ||
verifyProof(proof: Uint8Array, makeEasyToVerifyInCircuit: boolean): Promise<boolean>; | ||
destroy(): Promise<void>; | ||
} | ||
export { Backend, BackendOptions, CompiledCircuit, ProofData }; |
@@ -21,2 +21,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
} | ||
/** @ignore */ | ||
async instantiate() { | ||
@@ -56,2 +57,9 @@ if (!this.api) { | ||
// easier to verify in a circuit. | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const intermediateProof = await backend.generateIntermediateProof(witness); | ||
* ``` | ||
*/ | ||
async generateIntermediateProof(witness) { | ||
@@ -61,2 +69,3 @@ const makeEasyToVerifyInCircuit = true; | ||
} | ||
/** @ignore */ | ||
async generateProof(compressedWitness, makeEasyToVerifyInCircuit) { | ||
@@ -85,2 +94,9 @@ await this.instantiate(); | ||
// The number of public inputs denotes how many public inputs are in the inner proof. | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const artifacts = await backend.generateIntermediateProofArtifacts(proof, numOfPublicInputs); | ||
* ``` | ||
*/ | ||
async generateIntermediateProofArtifacts(proofData, numOfPublicInputs = 0) { | ||
@@ -107,2 +123,9 @@ await this.instantiate(); | ||
} | ||
/** | ||
* | ||
* @example | ||
* ```typescript | ||
* const isValidIntermediate = await backend.verifyIntermediateProof(proof); | ||
* ``` | ||
*/ | ||
async verifyIntermediateProof(proofData) { | ||
@@ -113,2 +136,3 @@ const proof = reconstructProofWithPublicInputs(proofData); | ||
} | ||
/** @ignore */ | ||
async verifyProof(proof, makeEasyToVerifyInCircuit) { | ||
@@ -115,0 +139,0 @@ await this.instantiate(); |
@@ -0,3 +1,8 @@ | ||
/** | ||
* @description | ||
* An options object, currently only used to specify the number of threads to use. | ||
*/ | ||
export type BackendOptions = { | ||
/** @description Number of threads */ | ||
threads: number; | ||
}; |
@@ -6,3 +6,3 @@ { | ||
], | ||
"version": "0.19.0", | ||
"version": "0.19.1", | ||
"packageManager": "yarn@3.5.1", | ||
@@ -37,3 +37,3 @@ "license": "(MIT OR Apache-2.0)", | ||
"@aztec/bb.js": "0.12.0", | ||
"@noir-lang/types": "0.19.0", | ||
"@noir-lang/types": "0.19.1", | ||
"fflate": "^0.8.0" | ||
@@ -40,0 +40,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22380
493
+ Added@noir-lang/noirc_abi@0.19.1(transitive)
+ Added@noir-lang/types@0.19.1(transitive)
- Removed@noir-lang/noirc_abi@0.19.0(transitive)
- Removed@noir-lang/types@0.19.0(transitive)
Updated@noir-lang/types@0.19.1