@noir-lang/acvm_js
Advanced tools
Comparing version 1.0.0-beta.1-ad5a980.nightly to 1.0.0-beta.1-c44b626.nightly
/* 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 initLogLevel(a: number, b: number, c: number): void; | ||
export function buildInfo(): number; | ||
@@ -18,14 +22,10 @@ export function getReturnWitness(a: number, b: number, c: number, d: number): void; | ||
export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
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 initLogLevel(a: number, b: number, c: number): 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 wasm_bindgen__convert__closures__invoke1_mut__h7f1511a2915e72e7(a: number, b: number, c: number): void; | ||
export function wasm_bindgen__convert__closures__invoke1_mut__h88a56384c96b757b(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__h0ccbefcb4d729e69(a: number, b: number, c: number, d: number, e: number): void; | ||
export function wasm_bindgen__convert__closures__invoke3_mut__h24d1dd0bd469df82(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__invoke2_mut__h2ed79be2e23ac22f(a: number, b: number, c: number, d: number): void; | ||
export function wasm_bindgen__convert__closures__invoke2_mut__h57a2220e5f1e0a1e(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>; | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
@@ -115,36 +149,2 @@ * @returns {BuildInfo} - Information on how the installed package was built. | ||
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean; | ||
/** | ||
* 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>; | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
@@ -151,0 +151,0 @@ // Map from witness index to hex string value of witness. |
@@ -220,6 +220,79 @@ let imports = {}; | ||
function __wbg_adapter_22(arg0, arg1, arg2) { | ||
wasm.wasm_bindgen__convert__closures__invoke1_mut__h7f1511a2915e72e7(arg0, arg1, addHeapObject(arg2)); | ||
wasm.wasm_bindgen__convert__closures__invoke1_mut__h88a56384c96b757b(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); | ||
}; | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
module.exports.initLogLevel = function(filter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.initLogLevel(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
@@ -233,8 +306,2 @@ * @returns {BuildInfo} - Information on how the installed package was built. | ||
function passArray8ToWasm0(arg, malloc) { | ||
const ptr = malloc(arg.length * 1) >>> 0; | ||
getUint8Memory0().set(arg, ptr / 1); | ||
WASM_VECTOR_LEN = arg.length; | ||
return ptr; | ||
} | ||
/** | ||
@@ -556,71 +623,4 @@ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
/** | ||
* 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); | ||
}; | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
module.exports.initLogLevel = function(filter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.initLogLevel(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
function __wbg_adapter_75(arg0, arg1, arg2, arg3, arg4) { | ||
wasm.wasm_bindgen__convert__closures__invoke3_mut__h0ccbefcb4d729e69(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); | ||
wasm.wasm_bindgen__convert__closures__invoke3_mut__h24d1dd0bd469df82(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); | ||
} | ||
@@ -636,3 +636,3 @@ | ||
function __wbg_adapter_92(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2ed79be2e23ac22f(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h57a2220e5f1e0a1e(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -664,2 +664,7 @@ | ||
module.exports.__wbg_constructor_a10f2b77c63b8d5e = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_new_d86d15722f6b14a4 = function() { | ||
@@ -689,7 +694,2 @@ const ret = new Map(); | ||
module.exports.__wbg_constructor_a10f2b77c63b8d5e = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_new_a16954212d33afab = function() { | ||
@@ -925,4 +925,4 @@ const ret = new Array(); | ||
module.exports.__wbindgen_closure_wrapper763 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 297, __wbg_adapter_22); | ||
module.exports.__wbindgen_closure_wrapper765 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 299, __wbg_adapter_22); | ||
return addHeapObject(ret); | ||
@@ -929,0 +929,0 @@ }; |
{ | ||
"name": "@noir-lang/acvm_js", | ||
"version": "1.0.0-beta.1-ad5a980.nightly", | ||
"version": "1.0.0-beta.1-c44b626.nightly", | ||
"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 initLogLevel(a: number, b: number, c: number): void; | ||
export function buildInfo(): number; | ||
@@ -18,14 +22,10 @@ export function getReturnWitness(a: number, b: number, c: number, d: number): void; | ||
export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
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 initLogLevel(a: number, b: number, c: number): 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 wasm_bindgen__convert__closures__invoke1_mut__h7f1511a2915e72e7(a: number, b: number, c: number): void; | ||
export function wasm_bindgen__convert__closures__invoke1_mut__h88a56384c96b757b(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__h0ccbefcb4d729e69(a: number, b: number, c: number, d: number, e: number): void; | ||
export function wasm_bindgen__convert__closures__invoke3_mut__h24d1dd0bd469df82(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__invoke2_mut__h2ed79be2e23ac22f(a: number, b: number, c: number, d: number): void; | ||
export function wasm_bindgen__convert__closures__invoke2_mut__h57a2220e5f1e0a1e(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>; | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
@@ -115,36 +149,2 @@ * @returns {BuildInfo} - Information on how the installed package was built. | ||
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean; | ||
/** | ||
* 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>; | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
@@ -220,2 +220,6 @@ // Map from witness index to hex string value of witness. | ||
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 initLogLevel: (a: number, b: number, c: number) => void; | ||
readonly buildInfo: () => number; | ||
@@ -235,15 +239,11 @@ readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number; | ||
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 initLogLevel: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_malloc: (a: number) => number; | ||
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number; | ||
readonly __wbindgen_export_2: WebAssembly.Table; | ||
readonly wasm_bindgen__convert__closures__invoke1_mut__h7f1511a2915e72e7: (a: number, b: number, c: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke1_mut__h88a56384c96b757b: (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__h0ccbefcb4d729e69: (a: number, b: number, c: number, d: number, e: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke3_mut__h24d1dd0bd469df82: (a: number, b: number, c: number, d: number, e: number) => void; | ||
readonly __wbindgen_exn_store: (a: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke2_mut__h2ed79be2e23ac22f: (a: number, b: number, c: number, d: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke2_mut__h57a2220e5f1e0a1e: (a: number, b: number, c: number, d: number) => void; | ||
} | ||
@@ -250,0 +250,0 @@ |
@@ -217,6 +217,79 @@ let wasm; | ||
function __wbg_adapter_22(arg0, arg1, arg2) { | ||
wasm.wasm_bindgen__convert__closures__invoke1_mut__h7f1511a2915e72e7(arg0, arg1, addHeapObject(arg2)); | ||
wasm.wasm_bindgen__convert__closures__invoke1_mut__h88a56384c96b757b(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); | ||
} | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.initLogLevel(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
@@ -230,8 +303,2 @@ * @returns {BuildInfo} - Information on how the installed package was built. | ||
function passArray8ToWasm0(arg, malloc) { | ||
const ptr = malloc(arg.length * 1) >>> 0; | ||
getUint8Memory0().set(arg, ptr / 1); | ||
WASM_VECTOR_LEN = arg.length; | ||
return ptr; | ||
} | ||
/** | ||
@@ -553,71 +620,4 @@ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
/** | ||
* 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); | ||
} | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.initLogLevel(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
function __wbg_adapter_75(arg0, arg1, arg2, arg3, arg4) { | ||
wasm.wasm_bindgen__convert__closures__invoke3_mut__h0ccbefcb4d729e69(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); | ||
wasm.wasm_bindgen__convert__closures__invoke3_mut__h24d1dd0bd469df82(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); | ||
} | ||
@@ -633,3 +633,3 @@ | ||
function __wbg_adapter_92(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2ed79be2e23ac22f(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h57a2220e5f1e0a1e(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -691,2 +691,6 @@ | ||
}; | ||
imports.wbg.__wbg_constructor_a10f2b77c63b8d5e = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_d86d15722f6b14a4 = function() { | ||
@@ -712,6 +716,2 @@ const ret = new Map(); | ||
}; | ||
imports.wbg.__wbg_constructor_a10f2b77c63b8d5e = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_a16954212d33afab = function() { | ||
@@ -910,4 +910,4 @@ const ret = new Array(); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper763 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 297, __wbg_adapter_22); | ||
imports.wbg.__wbindgen_closure_wrapper765 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 299, __wbg_adapter_22); | ||
return addHeapObject(ret); | ||
@@ -914,0 +914,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4087500