Socket
Socket
Sign inDemoInstall

@noir-lang/acvm_js

Package Overview
Dependencies
Maintainers
1
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noir-lang/acvm_js - npm Package Compare versions

Comparing version 0.46.0 to 0.47.0

26

nodejs/acvm_js_bg.wasm.d.ts
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function executeCircuit(a: number, b: number, c: number, d: number): number;
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
export function executeProgram(a: number, b: number, c: number, d: number): number;
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
export function initLogLevel(a: number, b: number, c: number): void;
export function buildInfo(): number;
export function and(a: number, b: number): number;

@@ -13,2 +18,3 @@ export function xor(a: number, b: number): number;

export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
export function buildInfo(): number;
export function compressWitness(a: number, b: number): void;

@@ -18,22 +24,10 @@ export function decompressWitness(a: number, b: number, c: number): void;

export function decompressWitnessStack(a: number, b: number, c: number): void;
export function __wbg_wasmblackboxfunctionsolver_free(a: number): void;
export function createBlackBoxSolver(): number;
export function executeCircuit(a: number, b: number, c: number, d: number): number;
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number, e: number): number;
export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
export function executeProgram(a: number, b: number, c: number, d: number): number;
export function executeProgramWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
export function __wbg_trap_free(a: number): void;
export function trap___wbg_wasmer_trap(): void;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
export const __wbindgen_export_2: WebAssembly.Table;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5258430255de068(a: number, b: number, c: number): void;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(a: number, b: number, c: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_free(a: number, b: number): void;
export function wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa(a: number, b: number, c: number, d: number, e: number): void;
export function __wbindgen_exn_store(a: number): void;
export function wasm_bindgen__convert__closures__invoke3_mut__h1e7d8ac96c74bd35(a: number, b: number, c: number, d: number, e: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h188e918906ff9a40(a: number, b: number, c: number, d: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h4efdd1050cfb3ea7(a: number, b: number, c: number, d: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} program - A serialized representation of an ACIR program
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
*/
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
/**
* Sets the package's logging level.

@@ -10,7 +71,2 @@ *

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
export function buildInfo(): BuildInfo;
/**
* Performs a bitwise AND operation between `lhs` and `rhs`

@@ -66,2 +122,7 @@ * @param {string} lhs

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
export function buildInfo(): BuildInfo;
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.

@@ -95,76 +156,14 @@ *

export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
export function createBlackBoxSolver(): Promise<WasmBlackBoxFunctionSolver>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
export function executeCircuitWithReturnWitness(solver: WasmBlackBoxFunctionSolver, program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuitWithBlackBoxSolver(solver: WasmBlackBoxFunctionSolver, program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
/**
*/
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
/**
*/
export function executeProgramWithBlackBoxSolver(solver: WasmBlackBoxFunctionSolver, program: Uint8Array, initial_witness: WitnessMap, foreign_call_executor: ForeignCallHandler): Promise<WitnessStack>;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
export type RawAssertionPayload = {
selector: string;
data: string[];
};
export type ExecutionError = Error & {
callStack?: string[];
rawAssertionPayload?: RawAssertionPayload;
};
// Map from witness index to hex string value of witness.

@@ -185,16 +184,11 @@ export type WitnessMap = Map<number, string>;

/**
* @typedef {Object} BuildInfo - Information about how the installed package was built
* @property {string} gitHash - The hash of the git commit from which the package was built.
* @property {string} version - The version of the package at the built git commit.
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
*/
export type BuildInfo = {
gitHash: string;
version: string;
dirty: string;
export type StackItem = {
index: number;
witness: WitnessMap;
}
export type WitnessStack = Array<StackItem>;
export type ForeignCallInput = string[]

@@ -214,25 +208,14 @@ export type ForeignCallOutput = string | string[]

export type RawAssertionPayload = {
selector: string;
data: string[];
};
export type ExecutionError = Error & {
callStack?: string[];
rawAssertionPayload?: RawAssertionPayload;
};
export type StackItem = {
index: number;
witness: WitnessMap;
/**
* @typedef {Object} BuildInfo - Information about how the installed package was built
* @property {string} gitHash - The hash of the git commit from which the package was built.
* @property {string} version - The version of the package at the built git commit.
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
*/
export type BuildInfo = {
gitHash: string;
version: string;
dirty: string;
}
export type WitnessStack = Array<StackItem>;
/**
*/
export class WasmBlackBoxFunctionSolver {
free(): void;
}

@@ -130,11 +130,2 @@ let imports = {};

let cachedBigInt64Memory0 = null;
function getBigInt64Memory0() {
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
}
return cachedBigInt64Memory0;
}
function debugString(val) {

@@ -229,7 +220,143 @@ // primitive types

}
function __wbg_adapter_52(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5258430255de068(arg0, arg1, addHeapObject(arg2));
function __wbg_adapter_22(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(arg0, arg1, addHeapObject(arg2));
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} program - A serialized representation of an ACIR program
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
*/
module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
module.exports.getReturnWitness = function(program, witness_map) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
module.exports.getPublicParametersWitness = function(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
module.exports.getPublicWitness = function(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Sets the package's logging level.

@@ -256,11 +383,2 @@ *

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
module.exports.buildInfo = function() {
const ret = wasm.buildInfo();
return takeObject(ret);
};
/**
* Performs a bitwise AND operation between `lhs` and `rhs`

@@ -287,9 +405,2 @@ * @param {string} lhs

function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
function getArrayU8FromWasm0(ptr, len) {

@@ -405,2 +516,11 @@ ptr = ptr >>> 0;

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
module.exports.buildInfo = function() {
const ret = wasm.buildInfo();
return takeObject(ret);
};
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.

@@ -504,169 +624,6 @@ *

/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
module.exports.createBlackBoxSolver = function() {
const ret = wasm.createBlackBoxSolver();
return takeObject(ret);
};
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
function _assertClass(instance, klass) {
if (!(instance instanceof klass)) {
throw new Error(`expected instance of ${klass.name}`);
}
return instance.ptr;
function __wbg_adapter_76(arg0, arg1, arg2, arg3, arg4) {
wasm.wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
module.exports.executeCircuitWithReturnWitness = function(solver, program, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuitWithReturnWitness(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
module.exports.executeCircuitWithBlackBoxSolver = function(solver, program, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
*/
module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
*/
module.exports.executeProgramWithBlackBoxSolver = function(solver, program, initial_witness, foreign_call_executor) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeProgramWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_executor));
return takeObject(ret);
};
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
module.exports.getReturnWitness = function(program, witness_map) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
module.exports.getPublicParametersWitness = function(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
module.exports.getPublicWitness = function(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
function handleError(f, args) {

@@ -679,61 +636,6 @@ try {

}
function __wbg_adapter_134(arg0, arg1, arg2, arg3, arg4) {
wasm.wasm_bindgen__convert__closures__invoke3_mut__h1e7d8ac96c74bd35(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
function __wbg_adapter_93(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h4efdd1050cfb3ea7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
}
function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h188e918906ff9a40(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
}
/**
* A struct representing a Trap
*/
class Trap {
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_trap_free(ptr);
}
/**
* A marker method to indicate that an object is an instance of the `Trap`
* class.
*/
static __wbg_wasmer_trap() {
wasm.trap___wbg_wasmer_trap();
}
}
module.exports.Trap = Trap;
/**
*/
class WasmBlackBoxFunctionSolver {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(WasmBlackBoxFunctionSolver.prototype);
obj.__wbg_ptr = ptr;
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_wasmblackboxfunctionsolver_free(ptr);
}
}
module.exports.WasmBlackBoxFunctionSolver = WasmBlackBoxFunctionSolver;
module.exports.__wbindgen_object_drop_ref = function(arg0) {

@@ -743,13 +645,18 @@ takeObject(arg0);

module.exports.__wbindgen_error_new = function(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
module.exports.__wbindgen_string_new = function(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
};
module.exports.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
module.exports.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};
module.exports.__wbg_constructor_971e67e66cc5bd6a = function(arg0) {
const ret = new Error(takeObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_new_6f6c75f9324b78e8 = function() {
module.exports.__wbg_new_193bac1dd2be232d = function() {
const ret = new Map();

@@ -764,7 +671,2 @@ return addHeapObject(ret);

module.exports.__wbindgen_string_new = function(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
};
module.exports.__wbindgen_string_get = function(arg0, arg1) {

@@ -779,10 +681,12 @@ const obj = getObject(arg1);

module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
return addHeapObject(ret);
module.exports.__wbindgen_number_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'number' ? obj : undefined;
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
module.exports.__wbg_constructor_81b34c49dcbdd2af = function(arg0) {
const ret = new Error(takeObject(arg0));
return addHeapObject(ret);
module.exports.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};

@@ -800,25 +704,3 @@

module.exports.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
module.exports.__wbindgen_number_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'number' ? obj : undefined;
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
module.exports.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};
module.exports.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};
module.exports.__wbg_new_ee5ac63ff3b0fa4d = function() {
module.exports.__wbg_new_f139361aad331bd0 = function() {
const ret = new Array();

@@ -853,59 +735,2 @@ return addHeapObject(ret);

module.exports.__wbindgen_ge = function(arg0, arg1) {
const ret = getObject(arg0) >= getObject(arg1);
return ret;
};
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
const ret = BigInt.asUintN(64, arg0);
return addHeapObject(ret);
};
module.exports.__wbindgen_shr = function(arg0, arg1) {
const ret = getObject(arg0) >> getObject(arg1);
return addHeapObject(ret);
};
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
const ret = getObject(arg0) === getObject(arg1);
return ret;
};
module.exports.__wbindgen_is_bigint = function(arg0) {
const ret = typeof(getObject(arg0)) === 'bigint';
return ret;
};
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
const ret = arg0;
return addHeapObject(ret);
};
module.exports.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
return addHeapObject(ret);
};
module.exports.__wbindgen_is_object = function(arg0) {
const val = getObject(arg0);
const ret = typeof(val) === 'object' && val !== null;
return ret;
};
module.exports.__wbindgen_is_function = function(arg0) {
const ret = typeof(getObject(arg0)) === 'function';
return ret;
};
module.exports.__wbg_instanceof_Global_f4b019d2b45e18ab = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof WebAssembly.Global;
} catch {
result = false;
}
const ret = result;
return ret;
};
module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {

@@ -943,40 +768,2 @@ console.debug(getObject(arg0));

module.exports.__wbg_crypto_c48a774b022d20ac = function(arg0) {
const ret = getObject(arg0).crypto;
return addHeapObject(ret);
};
module.exports.__wbg_process_298734cf255a885d = function(arg0) {
const ret = getObject(arg0).process;
return addHeapObject(ret);
};
module.exports.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
const ret = getObject(arg0).versions;
return addHeapObject(ret);
};
module.exports.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
const ret = getObject(arg0).node;
return addHeapObject(ret);
};
module.exports.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
const ret = getObject(arg0).msCrypto;
return addHeapObject(ret);
};
module.exports.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
const ret = module.require;
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
getObject(arg0).randomFillSync(takeObject(arg1));
}, arguments) };
module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) };
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {

@@ -997,12 +784,2 @@ const ret = getObject(arg0)[arg1 >>> 0];

module.exports.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
const ret = BigInt(getObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
module.exports.__wbg_new_0f2b71ca2f2a6029 = function() {

@@ -1013,46 +790,2 @@ const ret = new Map();

module.exports.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
const ret = Reflect.get(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).call(getObject(arg1));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_new_2b6fea4ea03b1b95 = function() {
const ret = new Object();
return addHeapObject(ret);
};
module.exports.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
const ret = self.self;
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
const ret = window.window;
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
const ret = globalThis.globalThis;
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
const ret = global.global;
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
const ret = new Array(arg0 >>> 0);
return addHeapObject(ret);
};
module.exports.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
};
module.exports.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {

@@ -1070,3 +803,3 @@ const ret = Array.from(getObject(arg0));

try {
return __wbg_adapter_134(a, state0.b, arg0, arg1, arg2);
return __wbg_adapter_76(a, state0.b, arg0, arg1, arg2);
} finally {

@@ -1092,26 +825,2 @@ state0.a = a;

module.exports.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
const ret = getObject(arg0).byteLength;
return ret;
};
module.exports.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
const ret = getObject(arg1).toString(arg2);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
module.exports.__wbg_instanceof_Error_fac23a8832b241da = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof Error;
} catch {
result = false;
}
const ret = result;
return ret;
};
module.exports.__wbg_new_87297f22973157c8 = function(arg0, arg1) {

@@ -1126,18 +835,2 @@ const ret = new Error(getStringFromWasm0(arg0, arg1));

module.exports.__wbg_message_eab7d45ec69a2135 = function(arg0) {
const ret = getObject(arg0).message;
return addHeapObject(ret);
};
module.exports.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof Function;
} catch {
result = false;
}
const ret = result;
return ret;
};
module.exports.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {

@@ -1153,12 +846,2 @@ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));

module.exports.__wbg_bind_7d5ce7224bedd5b8 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
};
module.exports.__wbg_bind_f5218b29220675c3 = function(arg0, arg1, arg2, arg3) {
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));
return addHeapObject(ret);
};
module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {

@@ -1171,3 +854,3 @@ try {

try {
return __wbg_adapter_171(a, state0.b, arg0, arg1);
return __wbg_adapter_93(a, state0.b, arg0, arg1);
} finally {

@@ -1188,18 +871,2 @@ state0.a = a;

module.exports.__wbg_instanceof_Object_a9e9e5766628e8b5 = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof Object;
} catch {
result = false;
}
const ret = result;
return ret;
};
module.exports.__wbg_constructor_f2623999a1f453eb = function(arg0) {
const ret = getObject(arg0).constructor;
return addHeapObject(ret);
};
module.exports.__wbg_fromEntries_d1b310956d20d858 = function() { return handleError(function (arg0) {

@@ -1210,7 +877,2 @@ const ret = Object.fromEntries(getObject(arg0));

module.exports.__wbg_toString_e2b23ac99490a381 = function(arg0) {
const ret = getObject(arg0).toString();
return addHeapObject(ret);
};
module.exports.__wbg_values_099fd000c271c313 = function(arg0) {

@@ -1228,3 +890,3 @@ const ret = Object.values(getObject(arg0));

try {
return __wbg_adapter_171(a, state0.b, arg0, arg1);
return __wbg_adapter_93(a, state0.b, arg0, arg1);
} finally {

@@ -1256,36 +918,2 @@ state0.a = a;

module.exports.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
const ret = getObject(arg0).buffer;
return addHeapObject(ret);
};
module.exports.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
module.exports.__wbg_new_09938a7d020f049b = function(arg0) {
const ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
};
module.exports.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
const ret = getObject(arg0).length;
return ret;
};
module.exports.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
const ret = new Uint8Array(arg0 >>> 0);
return addHeapObject(ret);
};
module.exports.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {

@@ -1296,64 +924,2 @@ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

module.exports.__wbg_compile_eefe73dfb19bff3d = function(arg0) {
const ret = WebAssembly.compile(getObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_instantiate_e61ee50cd947cd36 = function(arg0, arg1) {
const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
};
module.exports.__wbg_exports_311291a1333429a3 = function(arg0) {
const ret = getObject(arg0).exports;
return addHeapObject(ret);
};
module.exports.__wbg_exports_12505982ae149cb0 = function(arg0) {
const ret = WebAssembly.Module.exports(getObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof WebAssembly.Table;
} catch {
result = false;
}
const ret = result;
return ret;
};
module.exports.__wbg_get_b5def15f90c3e295 = function() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).get(arg1 >>> 0);
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof WebAssembly.Memory;
} catch {
result = false;
}
const ret = result;
return ret;
};
module.exports.__wbg_new_e40873b83efb2dcd = function() { return handleError(function (arg0) {
const ret = new WebAssembly.Memory(getObject(arg0));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_apply_46ea2bb0ad750196 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
const ret = Reflect.getPrototypeOf(getObject(arg0));
return addHeapObject(ret);
}, arguments) };
module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {

@@ -1364,9 +930,2 @@ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));

module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
const v = getObject(arg1);
const ret = typeof(v) === 'bigint' ? v : undefined;
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
module.exports.__wbindgen_debug_string = function(arg0, arg1) {

@@ -1384,17 +943,7 @@ const ret = debugString(getObject(arg1));

module.exports.__wbindgen_memory = function() {
const ret = wasm.memory;
module.exports.__wbindgen_closure_wrapper739 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 237, __wbg_adapter_22);
return addHeapObject(ret);
};
module.exports.__wbindgen_function_table = function() {
const ret = wasm.__wbindgen_export_2;
return addHeapObject(ret);
};
module.exports.__wbindgen_closure_wrapper2147 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 720, __wbg_adapter_52);
return addHeapObject(ret);
};
const path = require('path').join(__dirname, 'acvm_js_bg.wasm');

@@ -1401,0 +950,0 @@ const bytes = require('fs').readFileSync(path);

{
"name": "@noir-lang/acvm_js",
"version": "0.46.0",
"version": "0.47.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function executeCircuit(a: number, b: number, c: number, d: number): number;
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
export function executeProgram(a: number, b: number, c: number, d: number): number;
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
export function initLogLevel(a: number, b: number, c: number): void;
export function buildInfo(): number;
export function and(a: number, b: number): number;

@@ -13,2 +18,3 @@ export function xor(a: number, b: number): number;

export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
export function buildInfo(): number;
export function compressWitness(a: number, b: number): void;

@@ -18,22 +24,10 @@ export function decompressWitness(a: number, b: number, c: number): void;

export function decompressWitnessStack(a: number, b: number, c: number): void;
export function __wbg_wasmblackboxfunctionsolver_free(a: number): void;
export function createBlackBoxSolver(): number;
export function executeCircuit(a: number, b: number, c: number, d: number): number;
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number, e: number): number;
export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
export function executeProgram(a: number, b: number, c: number, d: number): number;
export function executeProgramWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
export function __wbg_trap_free(a: number): void;
export function trap___wbg_wasmer_trap(): void;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
export const __wbindgen_export_2: WebAssembly.Table;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5258430255de068(a: number, b: number, c: number): void;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(a: number, b: number, c: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_free(a: number, b: number): void;
export function wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa(a: number, b: number, c: number, d: number, e: number): void;
export function __wbindgen_exn_store(a: number): void;
export function wasm_bindgen__convert__closures__invoke3_mut__h1e7d8ac96c74bd35(a: number, b: number, c: number, d: number, e: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h188e918906ff9a40(a: number, b: number, c: number, d: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h4efdd1050cfb3ea7(a: number, b: number, c: number, d: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} program - A serialized representation of an ACIR program
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
*/
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
/**
* Sets the package's logging level.

@@ -10,7 +71,2 @@ *

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
export function buildInfo(): BuildInfo;
/**
* Performs a bitwise AND operation between `lhs` and `rhs`

@@ -66,2 +122,7 @@ * @param {string} lhs

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
export function buildInfo(): BuildInfo;
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.

@@ -95,76 +156,14 @@ *

export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
export function createBlackBoxSolver(): Promise<WasmBlackBoxFunctionSolver>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
export function executeCircuitWithReturnWitness(solver: WasmBlackBoxFunctionSolver, program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuitWithBlackBoxSolver(solver: WasmBlackBoxFunctionSolver, program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
/**
*/
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
/**
*/
export function executeProgramWithBlackBoxSolver(solver: WasmBlackBoxFunctionSolver, program: Uint8Array, initial_witness: WitnessMap, foreign_call_executor: ForeignCallHandler): Promise<WitnessStack>;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
export type RawAssertionPayload = {
selector: string;
data: string[];
};
export type ExecutionError = Error & {
callStack?: string[];
rawAssertionPayload?: RawAssertionPayload;
};
// Map from witness index to hex string value of witness.

@@ -185,16 +184,11 @@ export type WitnessMap = Map<number, string>;

/**
* @typedef {Object} BuildInfo - Information about how the installed package was built
* @property {string} gitHash - The hash of the git commit from which the package was built.
* @property {string} version - The version of the package at the built git commit.
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
*/
export type BuildInfo = {
gitHash: string;
version: string;
dirty: string;
export type StackItem = {
index: number;
witness: WitnessMap;
}
export type WitnessStack = Array<StackItem>;
export type ForeignCallInput = string[]

@@ -214,27 +208,16 @@ export type ForeignCallOutput = string | string[]

export type RawAssertionPayload = {
selector: string;
data: string[];
};
export type ExecutionError = Error & {
callStack?: string[];
rawAssertionPayload?: RawAssertionPayload;
};
export type StackItem = {
index: number;
witness: WitnessMap;
/**
* @typedef {Object} BuildInfo - Information about how the installed package was built
* @property {string} gitHash - The hash of the git commit from which the package was built.
* @property {string} version - The version of the package at the built git commit.
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
*/
export type BuildInfo = {
gitHash: string;
version: string;
dirty: string;
}
export type WitnessStack = Array<StackItem>;
/**
*/
export class WasmBlackBoxFunctionSolver {
free(): void;
}
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

@@ -244,4 +227,9 @@

readonly memory: WebAssembly.Memory;
readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;
readonly executeCircuitWithReturnWitness: (a: number, b: number, c: number, d: number) => number;
readonly executeProgram: (a: number, b: number, c: number, d: number) => number;
readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void;
readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void;
readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;
readonly initLogLevel: (a: number, b: number, c: number) => void;
readonly buildInfo: () => number;
readonly and: (a: number, b: number) => number;

@@ -254,2 +242,3 @@ readonly xor: (a: number, b: number) => number;

readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
readonly buildInfo: () => number;
readonly compressWitness: (a: number, b: number) => void;

@@ -259,23 +248,11 @@ readonly decompressWitness: (a: number, b: number, c: number) => void;

readonly decompressWitnessStack: (a: number, b: number, c: number) => void;
readonly __wbg_wasmblackboxfunctionsolver_free: (a: number) => void;
readonly createBlackBoxSolver: () => number;
readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;
readonly executeCircuitWithReturnWitness: (a: number, b: number, c: number, d: number, e: number) => number;
readonly executeCircuitWithBlackBoxSolver: (a: number, b: number, c: number, d: number, e: number) => number;
readonly executeProgram: (a: number, b: number, c: number, d: number) => number;
readonly executeProgramWithBlackBoxSolver: (a: number, b: number, c: number, d: number, e: number) => number;
readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void;
readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void;
readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;
readonly __wbg_trap_free: (a: number) => void;
readonly trap___wbg_wasmer_trap: () => void;
readonly __wbindgen_malloc: (a: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5258430255de068: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380: (a: number, b: number, c: number) => void;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_free: (a: number, b: number) => void;
readonly wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa: (a: number, b: number, c: number, d: number, e: number) => void;
readonly __wbindgen_exn_store: (a: number) => void;
readonly wasm_bindgen__convert__closures__invoke3_mut__h1e7d8ac96c74bd35: (a: number, b: number, c: number, d: number, e: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h188e918906ff9a40: (a: number, b: number, c: number, d: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h4efdd1050cfb3ea7: (a: number, b: number, c: number, d: number) => void;
}

@@ -282,0 +259,0 @@

@@ -127,11 +127,2 @@ let wasm;

let cachedBigInt64Memory0 = null;
function getBigInt64Memory0() {
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
}
return cachedBigInt64Memory0;
}
function debugString(val) {

@@ -226,7 +217,143 @@ // primitive types

}
function __wbg_adapter_52(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5258430255de068(arg0, arg1, addHeapObject(arg2));
function __wbg_adapter_22(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(arg0, arg1, addHeapObject(arg2));
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuit(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} program - A serialized representation of an ACIR program
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
*/
export function executeProgram(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
export function getReturnWitness(program, witness_map) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicParametersWitness(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicWitness(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Sets the package's logging level.

@@ -253,11 +380,2 @@ *

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
export function buildInfo() {
const ret = wasm.buildInfo();
return takeObject(ret);
}
/**
* Performs a bitwise AND operation between `lhs` and `rhs`

@@ -284,9 +402,2 @@ * @param {string} lhs

function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
function getArrayU8FromWasm0(ptr, len) {

@@ -402,2 +513,11 @@ ptr = ptr >>> 0;

/**
* Returns the `BuildInfo` object containing information about how the installed package was built.
* @returns {BuildInfo} - Information on how the installed package was built.
*/
export function buildInfo() {
const ret = wasm.buildInfo();
return takeObject(ret);
}
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.

@@ -501,169 +621,6 @@ *

/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
export function createBlackBoxSolver() {
const ret = wasm.createBlackBoxSolver();
return takeObject(ret);
function __wbg_adapter_76(arg0, arg1, arg2, arg3, arg4) {
wasm.wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuit(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
function _assertClass(instance, klass) {
if (!(instance instanceof klass)) {
throw new Error(`expected instance of ${klass.name}`);
}
return instance.ptr;
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
* This method also extracts the public return values from the solved witness into its own return witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
*/
export function executeCircuitWithReturnWitness(solver, program, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuitWithReturnWitness(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.
*
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
*/
export function executeCircuitWithBlackBoxSolver(solver, program, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
*/
export function executeProgram(program, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
*/
export function executeProgramWithBlackBoxSolver(solver, program, initial_witness, foreign_call_executor) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeProgramWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_executor));
return takeObject(ret);
}
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's return values.
* @param {Uint8Array} program
* @param {WitnessMap} witness_map
* @returns {WitnessMap}
*/
export function getReturnWitness(program, witness_map) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicParametersWitness(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
*
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
* @param {Uint8Array} program
* @param {WitnessMap} solved_witness
* @returns {WitnessMap}
*/
export function getPublicWitness(program, solved_witness) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
function handleError(f, args) {

@@ -676,59 +633,6 @@ try {

}
function __wbg_adapter_134(arg0, arg1, arg2, arg3, arg4) {
wasm.wasm_bindgen__convert__closures__invoke3_mut__h1e7d8ac96c74bd35(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
function __wbg_adapter_93(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h4efdd1050cfb3ea7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
}
function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h188e918906ff9a40(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
}
/**
* A struct representing a Trap
*/
export class Trap {
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_trap_free(ptr);
}
/**
* A marker method to indicate that an object is an instance of the `Trap`
* class.
*/
static __wbg_wasmer_trap() {
wasm.trap___wbg_wasmer_trap();
}
}
/**
*/
export class WasmBlackBoxFunctionSolver {
static __wrap(ptr) {
ptr = ptr >>> 0;
const obj = Object.create(WasmBlackBoxFunctionSolver.prototype);
obj.__wbg_ptr = ptr;
return obj;
}
__destroy_into_raw() {
const ptr = this.__wbg_ptr;
this.__wbg_ptr = 0;
return ptr;
}
free() {
const ptr = this.__destroy_into_raw();
wasm.__wbg_wasmblackboxfunctionsolver_free(ptr);
}
}
async function __wbg_load(module, imports) {

@@ -771,11 +675,15 @@ if (typeof Response === 'function' && module instanceof Response) {

};
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
imports.wbg.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};
imports.wbg.__wbg_constructor_971e67e66cc5bd6a = function(arg0) {
const ret = new Error(takeObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_new_6f6c75f9324b78e8 = function() {
imports.wbg.__wbg_new_193bac1dd2be232d = function() {
const ret = new Map();

@@ -788,6 +696,2 @@ return addHeapObject(ret);

};
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {

@@ -801,9 +705,11 @@ const obj = getObject(arg1);

};
imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
return addHeapObject(ret);
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'number' ? obj : undefined;
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
imports.wbg.__wbg_constructor_81b34c49dcbdd2af = function(arg0) {
const ret = new Error(takeObject(arg0));
return addHeapObject(ret);
imports.wbg.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};

@@ -819,21 +725,3 @@ imports.wbg.__wbindgen_cb_drop = function(arg0) {

};
imports.wbg.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'number' ? obj : undefined;
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
imports.wbg.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};
imports.wbg.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};
imports.wbg.__wbg_new_ee5ac63ff3b0fa4d = function() {
imports.wbg.__wbg_new_f139361aad331bd0 = function() {
const ret = new Array();

@@ -864,49 +752,2 @@ return addHeapObject(ret);

};
imports.wbg.__wbindgen_ge = function(arg0, arg1) {
const ret = getObject(arg0) >= getObject(arg1);
return ret;
};
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
const ret = BigInt.asUintN(64, arg0);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_shr = function(arg0, arg1) {
const ret = getObject(arg0) >> getObject(arg1);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
const ret = getObject(arg0) === getObject(arg1);
return ret;
};
imports.wbg.__wbindgen_is_bigint = function(arg0) {
const ret = typeof(getObject(arg0)) === 'bigint';
return ret;
};
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
const ret = arg0;
return addHeapObject(ret);
};
imports.wbg.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_is_object = function(arg0) {
const val = getObject(arg0);
const ret = typeof(val) === 'object' && val !== null;
return ret;
};
imports.wbg.__wbindgen_is_function = function(arg0) {
const ret = typeof(getObject(arg0)) === 'function';
return ret;
};
imports.wbg.__wbg_instanceof_Global_f4b019d2b45e18ab = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof WebAssembly.Global;
} catch {
result = false;
}
const ret = result;
return ret;
};
imports.wbg.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {

@@ -936,32 +777,2 @@ console.debug(getObject(arg0));

};
imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
const ret = getObject(arg0).crypto;
return addHeapObject(ret);
};
imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {
const ret = getObject(arg0).process;
return addHeapObject(ret);
};
imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
const ret = getObject(arg0).versions;
return addHeapObject(ret);
};
imports.wbg.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
const ret = getObject(arg0).node;
return addHeapObject(ret);
};
imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
const ret = getObject(arg0).msCrypto;
return addHeapObject(ret);
};
imports.wbg.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
const ret = module.require;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
getObject(arg0).randomFillSync(takeObject(arg1));
}, arguments) };
imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) };
imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {

@@ -979,10 +790,2 @@ const ret = getObject(arg0)[arg1 >>> 0];

};
imports.wbg.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
const ret = BigInt(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_new_0f2b71ca2f2a6029 = function() {

@@ -992,37 +795,2 @@ const ret = new Map();

};
imports.wbg.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
const ret = Reflect.get(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).call(getObject(arg1));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function() {
const ret = new Object();
return addHeapObject(ret);
};
imports.wbg.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
const ret = self.self;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
const ret = window.window;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
const ret = globalThis.globalThis;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
const ret = global.global;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
const ret = new Array(arg0 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
};
imports.wbg.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {

@@ -1039,3 +807,3 @@ const ret = Array.from(getObject(arg0));

try {
return __wbg_adapter_134(a, state0.b, arg0, arg1, arg2);
return __wbg_adapter_76(a, state0.b, arg0, arg1, arg2);
} finally {

@@ -1058,23 +826,2 @@ state0.a = a;

};
imports.wbg.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
const ret = getObject(arg0).byteLength;
return ret;
};
imports.wbg.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
const ret = getObject(arg1).toString(arg2);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
imports.wbg.__wbg_instanceof_Error_fac23a8832b241da = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof Error;
} catch {
result = false;
}
const ret = result;
return ret;
};
imports.wbg.__wbg_new_87297f22973157c8 = function(arg0, arg1) {

@@ -1087,16 +834,2 @@ const ret = new Error(getStringFromWasm0(arg0, arg1));

};
imports.wbg.__wbg_message_eab7d45ec69a2135 = function(arg0) {
const ret = getObject(arg0).message;
return addHeapObject(ret);
};
imports.wbg.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof Function;
} catch {
result = false;
}
const ret = result;
return ret;
};
imports.wbg.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {

@@ -1110,10 +843,2 @@ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));

}, arguments) };
imports.wbg.__wbg_bind_7d5ce7224bedd5b8 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
};
imports.wbg.__wbg_bind_f5218b29220675c3 = function(arg0, arg1, arg2, arg3) {
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));
return addHeapObject(ret);
};
imports.wbg.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {

@@ -1126,3 +851,3 @@ try {

try {
return __wbg_adapter_171(a, state0.b, arg0, arg1);
return __wbg_adapter_93(a, state0.b, arg0, arg1);
} finally {

@@ -1141,16 +866,2 @@ state0.a = a;

};
imports.wbg.__wbg_instanceof_Object_a9e9e5766628e8b5 = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof Object;
} catch {
result = false;
}
const ret = result;
return ret;
};
imports.wbg.__wbg_constructor_f2623999a1f453eb = function(arg0) {
const ret = getObject(arg0).constructor;
return addHeapObject(ret);
};
imports.wbg.__wbg_fromEntries_d1b310956d20d858 = function() { return handleError(function (arg0) {

@@ -1160,6 +871,2 @@ const ret = Object.fromEntries(getObject(arg0));

}, arguments) };
imports.wbg.__wbg_toString_e2b23ac99490a381 = function(arg0) {
const ret = getObject(arg0).toString();
return addHeapObject(ret);
};
imports.wbg.__wbg_values_099fd000c271c313 = function(arg0) {

@@ -1176,3 +883,3 @@ const ret = Object.values(getObject(arg0));

try {
return __wbg_adapter_171(a, state0.b, arg0, arg1);
return __wbg_adapter_93(a, state0.b, arg0, arg1);
} finally {

@@ -1200,29 +907,2 @@ state0.a = a;

};
imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
const ret = getObject(arg0).buffer;
return addHeapObject(ret);
};
imports.wbg.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_new_09938a7d020f049b = function(arg0) {
const ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
};
imports.wbg.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
const ret = getObject(arg0).length;
return ret;
};
imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
const ret = new Uint8Array(arg0 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {

@@ -1232,54 +912,2 @@ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

}, arguments) };
imports.wbg.__wbg_compile_eefe73dfb19bff3d = function(arg0) {
const ret = WebAssembly.compile(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_instantiate_e61ee50cd947cd36 = function(arg0, arg1) {
const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_exports_311291a1333429a3 = function(arg0) {
const ret = getObject(arg0).exports;
return addHeapObject(ret);
};
imports.wbg.__wbg_exports_12505982ae149cb0 = function(arg0) {
const ret = WebAssembly.Module.exports(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof WebAssembly.Table;
} catch {
result = false;
}
const ret = result;
return ret;
};
imports.wbg.__wbg_get_b5def15f90c3e295 = function() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).get(arg1 >>> 0);
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
let result;
try {
result = getObject(arg0) instanceof WebAssembly.Memory;
} catch {
result = false;
}
const ret = result;
return ret;
};
imports.wbg.__wbg_new_e40873b83efb2dcd = function() { return handleError(function (arg0) {
const ret = new WebAssembly.Memory(getObject(arg0));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_apply_46ea2bb0ad750196 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
const ret = Reflect.getPrototypeOf(getObject(arg0));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {

@@ -1289,8 +917,2 @@ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));

}, arguments) };
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
const v = getObject(arg1);
const ret = typeof(v) === 'bigint' ? v : undefined;
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
};
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {

@@ -1306,14 +928,6 @@ const ret = debugString(getObject(arg1));

};
imports.wbg.__wbindgen_memory = function() {
const ret = wasm.memory;
imports.wbg.__wbindgen_closure_wrapper739 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 237, __wbg_adapter_22);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_function_table = function() {
const ret = wasm.__wbindgen_export_2;
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper2147 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 720, __wbg_adapter_52);
return addHeapObject(ret);
};

@@ -1330,3 +944,2 @@ return imports;

__wbg_init.__wbindgen_wasm_module = module;
cachedBigInt64Memory0 = null;
cachedFloat64Memory0 = null;

@@ -1333,0 +946,0 @@ cachedInt32Memory0 = null;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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