Socket
Socket
Sign inDemoInstall

@noir-lang/backend_barretenberg

Package Overview
Dependencies
Maintainers
1
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noir-lang/backend_barretenberg - npm Package Compare versions

Comparing version 0.19.0-3107159.nightly to 0.19.0-e5a1f78.nightly

25

lib/cjs/index.d.ts

@@ -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;
};

4

package.json

@@ -6,3 +6,3 @@ {

],
"version": "0.19.0-3107159.nightly",
"version": "0.19.0-e5a1f78.nightly",
"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-3107159.nightly",
"@noir-lang/types": "0.19.0-e5a1f78.nightly",
"fflate": "^0.8.0"

@@ -40,0 +40,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc