New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@noir-lang/acvm_js

Package Overview
Dependencies
Maintainers
1
Versions
354
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.27.0 to 0.28.0-10eae15.nightly

CHANGELOG.md

21

nodejs/acvm_js_bg.wasm.d.ts
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function decompressWitness(a: number, b: number, c: number): void;
export function compressWitness(a: number, b: number): void;
export function buildInfo(): 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 ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
export function keccak256(a: number, b: number, c: number): void;
export function blake2s256(a: number, b: number, c: number): void;
export function sha256(a: number, b: number, c: number): void;
export function xor(a: number, b: number): number;
export function and(a: number, b: number): number;
export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;

@@ -9,4 +18,2 @@ export function executeCircuit(a: number, b: number, c: number, d: number): number;

export function __wbg_wasmblackboxfunctionsolver_free(a: number): void;
export function decompressWitness(a: number, b: number, c: number): void;
export function compressWitness(a: number, b: number): void;
export function initLogLevel(a: number): void;

@@ -18,9 +25,9 @@ export function getPublicWitness(a: number, b: number, c: number, d: number): void;

export function trap___wbgd_downcast_token(): number;
export function __wbindgen_malloc(a: number, b: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
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__h7be0e81f38bcb593(a: number, b: number, c: number): void;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5(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, c: number): void;
export function __wbindgen_free(a: number, b: number): void;
export function __wbindgen_exn_store(a: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(a: number, b: number, c: number, d: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade(a: number, b: number, c: number, d: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
*
* @param {Uint8Array} compressed_witness - A compressed witness.
* @returns {WitnessMap} The decompressed witness map.
*/
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
*
* @param {Uint8Array} compressed_witness - A witness map.
* @returns {WitnessMap} A compressed witness map
*/
export function compressWitness(witness_map: WitnessMap): Uint8Array;
/**
* Returns the `BuildInfo` object containing information about how the installed package was built.

@@ -9,2 +23,53 @@ * @returns {BuildInfo} - Information on how the installed package was built.

/**
* Verifies a ECDSA signature over the secp256r1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
/**
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
* Verifies a ECDSA signature over the secp256k1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
/**
* Calculates the Keccak256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function keccak256(inputs: Uint8Array): Uint8Array;
/**
* Calculates the Blake2s256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function blake2s256(inputs: Uint8Array): Uint8Array;
/**
* Calculates the SHA256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function sha256(inputs: Uint8Array): Uint8Array;
/**
* Performs a bitwise XOR operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
export function xor(lhs: string, rhs: string): string;
/**
* Performs a bitwise AND operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
export function and(lhs: string, rhs: string): string;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.

@@ -33,16 +98,2 @@ *

/**
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
*
* @param {Uint8Array} compressed_witness - A compressed witness.
* @returns {WitnessMap} The decompressed witness map.
*/
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
*
* @param {Uint8Array} compressed_witness - A witness map.
* @returns {WitnessMap} A compressed witness map
*/
export function compressWitness(witness_map: WitnessMap): Uint8Array;
/**
* Sets the package's logging level.

@@ -49,0 +100,0 @@ *

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

function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
function dropObject(idx) {

@@ -45,11 +54,2 @@ if (idx < 132) return;

function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
function isLikeNone(x) {

@@ -98,3 +98,3 @@ return x === undefined || x === null;

const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length, 1) >>> 0;
const ptr = malloc(buf.length) >>> 0;
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);

@@ -106,3 +106,3 @@ WASM_VECTOR_LEN = buf.length;

let len = arg.length;
let ptr = malloc(len, 1) >>> 0;
let ptr = malloc(len) >>> 0;

@@ -123,3 +123,3 @@ const mem = getUint8Memory0();

}
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);

@@ -234,23 +234,7 @@ const ret = encodeString(arg, view);

function __wbg_adapter_54(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7be0e81f38bcb593(arg0, arg1, addHeapObject(arg2));
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5(arg0, arg1, addHeapObject(arg2));
}
/**
* 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);
};
function _assertClass(instance, klass) {
if (!(instance instanceof klass)) {
throw new Error(`expected instance of ${klass.name}`);
}
return instance.ptr;
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1, 1) >>> 0;
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);

@@ -261,42 +245,2 @@ WASM_VECTOR_LEN = arg.length;

/**
* 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, circuit, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(circuit, 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);
};
/**
* 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(circuit, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
module.exports.createBlackBoxSolver = function() {
const ret = wasm.createBlackBoxSolver();
return takeObject(ret);
};
/**
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.

@@ -355,2 +299,185 @@ *

/**
* 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);
};
/**
* Verifies a ECDSA signature over the secp256r1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
const len1 = WASM_VECTOR_LEN;
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
const len2 = WASM_VECTOR_LEN;
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
const len3 = WASM_VECTOR_LEN;
const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
return ret !== 0;
};
/**
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
* Verifies a ECDSA signature over the secp256k1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
const len1 = WASM_VECTOR_LEN;
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
const len2 = WASM_VECTOR_LEN;
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
const len3 = WASM_VECTOR_LEN;
const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
return ret !== 0;
};
/**
* Calculates the Keccak256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
module.exports.keccak256 = function(inputs) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.keccak256(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v2 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
return v2;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Calculates the Blake2s256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
module.exports.blake2s256 = function(inputs) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.blake2s256(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v2 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
return v2;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Calculates the SHA256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
module.exports.sha256 = function(inputs) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.sha256(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v2 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
return v2;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* Performs a bitwise XOR operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
module.exports.xor = function(lhs, rhs) {
const ret = wasm.xor(addHeapObject(lhs), addHeapObject(rhs));
return takeObject(ret);
};
/**
* Performs a bitwise AND operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
module.exports.and = function(lhs, rhs) {
const ret = wasm.and(addHeapObject(lhs), addHeapObject(rhs));
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.
*
* @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, circuit, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(circuit, 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);
};
/**
* 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(circuit, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
};
/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
module.exports.createBlackBoxSolver = function() {
const ret = wasm.createBlackBoxSolver();
return takeObject(ret);
};
/**
* Sets the package's logging level.

@@ -455,4 +582,4 @@ *

}
function __wbg_adapter_148(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
}

@@ -511,2 +638,7 @@

module.exports.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
return addHeapObject(ret);
};
module.exports.__wbindgen_object_drop_ref = function(arg0) {

@@ -521,10 +653,10 @@ takeObject(arg0);

module.exports.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
return addHeapObject(ret);
module.exports.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};
module.exports.__wbindgen_string_new = function(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
module.exports.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};

@@ -537,2 +669,7 @@

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

@@ -543,7 +680,2 @@ const ret = getObject(arg0) === undefined;

module.exports.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};
module.exports.__wbindgen_number_get = function(arg0, arg1) {

@@ -556,13 +688,3 @@ const obj = getObject(arg1);

module.exports.__wbindgen_cb_drop = function(arg0) {
const obj = takeObject(arg0).original;
if (obj.cnt-- == 1) {
obj.a = 0;
return true;
}
const ret = false;
return ret;
};
module.exports.__wbg_constructor_6b4742a211e48095 = function(arg0) {
module.exports.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) {
const ret = new Error(takeObject(arg0));

@@ -581,3 +703,13 @@ return addHeapObject(ret);

module.exports.__wbg_new_212eeacc588e41ad = function() {
module.exports.__wbindgen_cb_drop = function(arg0) {
const obj = takeObject(arg0).original;
if (obj.cnt-- == 1) {
obj.a = 0;
return true;
}
const ret = false;
return ret;
};
module.exports.__wbg_new_d6cb182577c81490 = function() {
const ret = new Map();

@@ -592,7 +724,2 @@ return addHeapObject(ret);

module.exports.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};
module.exports.__wbg_new_abda76e883ba8a5f = function() {

@@ -619,3 +746,3 @@ const ret = new Error();

} finally {
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
wasm.__wbindgen_free(deferred0_0, deferred0_1);
}

@@ -629,5 +756,5 @@ };

module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
const ret = getObject(arg0) === getObject(arg1);
return 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);
};

@@ -645,2 +772,7 @@

module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
const ret = getObject(arg0) === getObject(arg1);
return ret;
};
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {

@@ -656,7 +788,2 @@ const ret = BigInt.asUintN(64, arg0);

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) {

@@ -732,27 +859,27 @@ const val = getObject(arg0);

module.exports.__wbg_debug_9b8701f894da9929 = function(arg0, arg1, arg2, arg3) {
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
module.exports.__wbg_error_788ae33f81d3b84b = function(arg0) {
module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
console.error(getObject(arg0));
};
module.exports.__wbg_error_d9bce418caafb712 = function(arg0, arg1, arg2, arg3) {
module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
module.exports.__wbg_info_bb52f40b06f679de = function(arg0, arg1, arg2, arg3) {
module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
module.exports.__wbg_log_ea7093e35e3efd07 = function(arg0, arg1, arg2, arg3) {
module.exports.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
module.exports.__wbg_warn_dfc0e0cf544a13bd = function(arg0, arg1, arg2, arg3) {
module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
module.exports.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
const ret = getObject(arg0)[arg1 >>> 0];

@@ -762,3 +889,3 @@ return addHeapObject(ret);

module.exports.__wbg_length_fff51ee6522a1a18 = function(arg0) {
module.exports.__wbg_length_820c786973abdd8a = function(arg0) {
const ret = getObject(arg0).length;

@@ -768,3 +895,3 @@ return ret;

module.exports.__wbg_new_898a68150f225f2e = function() {
module.exports.__wbg_new_0394642eae39db16 = function() {
const ret = new Array();

@@ -774,3 +901,3 @@ return addHeapObject(ret);

module.exports.__wbg_BigInt_025925c4804d8575 = function(arg0) {
module.exports.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
const ret = BigInt(getObject(arg0));

@@ -780,3 +907,3 @@ return addHeapObject(ret);

module.exports.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
module.exports.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));

@@ -786,3 +913,3 @@ return addHeapObject(ret);

module.exports.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
module.exports.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
const ret = Reflect.get(getObject(arg0), getObject(arg1));

@@ -792,3 +919,3 @@ return addHeapObject(ret);

module.exports.__wbg_call_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
module.exports.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).call(getObject(arg1));

@@ -798,3 +925,3 @@ return addHeapObject(ret);

module.exports.__wbg_new_b51585de1b234aff = function() {
module.exports.__wbg_new_2b6fea4ea03b1b95 = function() {
const ret = new Object();

@@ -804,3 +931,3 @@ return addHeapObject(ret);

module.exports.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
module.exports.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
const ret = self.self;

@@ -810,3 +937,3 @@ return addHeapObject(ret);

module.exports.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
module.exports.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
const ret = window.window;

@@ -816,3 +943,3 @@ return addHeapObject(ret);

module.exports.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
module.exports.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
const ret = globalThis.globalThis;

@@ -822,3 +949,3 @@ return addHeapObject(ret);

module.exports.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
module.exports.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
const ret = global.global;

@@ -828,3 +955,3 @@ return addHeapObject(ret);

module.exports.__wbg_newwithlength_3ec098a360da1909 = function(arg0) {
module.exports.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
const ret = new Array(arg0 >>> 0);

@@ -834,7 +961,7 @@ return addHeapObject(ret);

module.exports.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
module.exports.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
};
module.exports.__wbg_from_d7c216d4616bb368 = function(arg0) {
module.exports.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
const ret = Array.from(getObject(arg0));

@@ -844,3 +971,3 @@ return addHeapObject(ret);

module.exports.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {
module.exports.__wbg_push_109cfc26d02582dd = function(arg0, arg1) {
const ret = getObject(arg0).push(getObject(arg1));

@@ -850,3 +977,3 @@ return ret;

module.exports.__wbg_byteLength_0488a7a303dccf40 = function(arg0) {
module.exports.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
const ret = getObject(arg0).byteLength;

@@ -856,3 +983,3 @@ return ret;

module.exports.__wbg_toString_26c114c5f3052ff5 = function(arg0, arg1, arg2) {
module.exports.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
const ret = getObject(arg1).toString(arg2);

@@ -865,3 +992,3 @@ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);

module.exports.__wbg_new_d258248ed531ff54 = function(arg0, arg1) {
module.exports.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));

@@ -871,7 +998,7 @@ return addHeapObject(ret);

module.exports.__wbg_setcause_a60925f08b71876d = function(arg0, arg1) {
module.exports.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
getObject(arg0).cause = getObject(arg1);
};
module.exports.__wbg_instanceof_Function_3021b2be9300e7a7 = function(arg0) {
module.exports.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
let result;

@@ -887,3 +1014,3 @@ try {

module.exports.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
module.exports.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));

@@ -893,3 +1020,3 @@ return addHeapObject(ret);

module.exports.__wbg_call_4c92f6aec1e1d6e6 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
module.exports.__wbg_call_4c73e4aecced6a7d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));

@@ -899,3 +1026,3 @@ return addHeapObject(ret);

module.exports.__wbg_bind_f9d2c8ec337bbbe7 = function(arg0, arg1, arg2) {
module.exports.__wbg_bind_7d5ce7224bedd5b8 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));

@@ -905,3 +1032,3 @@ return addHeapObject(ret);

module.exports.__wbg_bind_60a9a80cada2f33c = function(arg0, arg1, arg2, arg3) {
module.exports.__wbg_bind_f5218b29220675c3 = function(arg0, arg1, arg2, arg3) {
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));

@@ -911,3 +1038,3 @@ return addHeapObject(ret);

module.exports.__wbg_forEach_d3ffcb118358250b = function(arg0, arg1, arg2) {
module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
try {

@@ -919,3 +1046,3 @@ var state0 = {a: arg1, b: arg2};

try {
return __wbg_adapter_148(a, state0.b, arg0, arg1);
return __wbg_adapter_155(a, state0.b, arg0, arg1);
} finally {

@@ -931,3 +1058,3 @@ state0.a = a;

module.exports.__wbg_set_bedc3d02d0f05eb0 = function(arg0, arg1, arg2) {
module.exports.__wbg_set_da7be7bf0e037b14 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));

@@ -937,3 +1064,3 @@ return addHeapObject(ret);

module.exports.__wbg_constructor_47e9bb352faf1649 = function(arg0) {
module.exports.__wbg_constructor_f2623999a1f453eb = function(arg0) {
const ret = getObject(arg0).constructor;

@@ -943,3 +1070,3 @@ return addHeapObject(ret);

module.exports.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
try {

@@ -951,3 +1078,3 @@ var state0 = {a: arg0, b: arg1};

try {
return __wbg_adapter_148(a, state0.b, arg0, arg1);
return __wbg_adapter_155(a, state0.b, arg0, arg1);
} finally {

@@ -964,3 +1091,3 @@ state0.a = a;

module.exports.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
module.exports.__wbg_resolve_ae38ad63c43ff98b = function(arg0) {
const ret = Promise.resolve(getObject(arg0));

@@ -970,3 +1097,3 @@ return addHeapObject(ret);

module.exports.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
module.exports.__wbg_then_8df675b8bb5d5e3c = function(arg0, arg1) {
const ret = getObject(arg0).then(getObject(arg1));

@@ -976,3 +1103,3 @@ return addHeapObject(ret);

module.exports.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
module.exports.__wbg_then_835b073a479138e5 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));

@@ -982,3 +1109,3 @@ return addHeapObject(ret);

module.exports.__wbg_buffer_085ec1f694018c4f = function(arg0) {
module.exports.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
const ret = getObject(arg0).buffer;

@@ -988,3 +1115,3 @@ return addHeapObject(ret);

module.exports.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
module.exports.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);

@@ -994,3 +1121,3 @@ return addHeapObject(ret);

module.exports.__wbg_new_8125e318e6245eed = function(arg0) {
module.exports.__wbg_new_09938a7d020f049b = function(arg0) {
const ret = new Uint8Array(getObject(arg0));

@@ -1000,7 +1127,7 @@ return addHeapObject(ret);

module.exports.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
module.exports.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
};
module.exports.__wbg_length_72e2208bbc0efc61 = function(arg0) {
module.exports.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
const ret = getObject(arg0).length;

@@ -1010,3 +1137,3 @@ return ret;

module.exports.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
module.exports.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
const ret = new Uint8Array(arg0 >>> 0);

@@ -1016,3 +1143,3 @@ return addHeapObject(ret);

module.exports.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
module.exports.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);

@@ -1022,3 +1149,3 @@ return addHeapObject(ret);

module.exports.__wbg_compile_0ef211355a4ebea3 = function(arg0) {
module.exports.__wbg_compile_eefe73dfb19bff3d = function(arg0) {
const ret = WebAssembly.compile(getObject(arg0));

@@ -1028,3 +1155,3 @@ return addHeapObject(ret);

module.exports.__wbg_instantiate_8900c71988551df8 = function(arg0, arg1) {
module.exports.__wbg_instantiate_e61ee50cd947cd36 = function(arg0, arg1) {
const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));

@@ -1034,3 +1161,3 @@ return addHeapObject(ret);

module.exports.__wbg_exports_9484b00cdfd311fc = function(arg0) {
module.exports.__wbg_exports_311291a1333429a3 = function(arg0) {
const ret = getObject(arg0).exports;

@@ -1040,3 +1167,3 @@ return addHeapObject(ret);

module.exports.__wbg_exports_b7984a3120d6aba2 = function(arg0) {
module.exports.__wbg_exports_12505982ae149cb0 = function(arg0) {
const ret = WebAssembly.Module.exports(getObject(arg0));

@@ -1046,3 +1173,3 @@ return addHeapObject(ret);

module.exports.__wbg_instanceof_Table_ba74319dfec929b1 = function(arg0) {
module.exports.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
let result;

@@ -1058,3 +1185,3 @@ try {

module.exports.__wbg_get_9bb402f6a9f0b436 = function() { return handleError(function (arg0, arg1) {
module.exports.__wbg_get_b5def15f90c3e295 = function() { return handleError(function (arg0, arg1) {
const ret = getObject(arg0).get(arg1 >>> 0);

@@ -1064,3 +1191,3 @@ return addHeapObject(ret);

module.exports.__wbg_instanceof_Memory_6b2a8e33c4176794 = function(arg0) {
module.exports.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
let result;

@@ -1076,3 +1203,3 @@ try {

module.exports.__wbg_new_5514c0d576222fc2 = function() { return handleError(function (arg0) {
module.exports.__wbg_new_e40873b83efb2dcd = function() { return handleError(function (arg0) {
const ret = new WebAssembly.Memory(getObject(arg0));

@@ -1082,3 +1209,3 @@ return addHeapObject(ret);

module.exports.__wbg_apply_f9ecfcbfefaf7349 = function() { return handleError(function (arg0, arg1, arg2) {
module.exports.__wbg_apply_46ea2bb0ad750196 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));

@@ -1088,3 +1215,3 @@ return addHeapObject(ret);

module.exports.__wbg_getPrototypeOf_2782f7ac7c421741 = function() { return handleError(function (arg0) {
module.exports.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
const ret = Reflect.getPrototypeOf(getObject(arg0));

@@ -1094,3 +1221,3 @@ return addHeapObject(ret);

module.exports.__wbg_set_092e06b0f9d71865 = function() { return handleError(function (arg0, arg1, arg2) {
module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));

@@ -1100,3 +1227,3 @@ return ret;

module.exports.__wbg_parse_670c19d4e984792e = function() { return handleError(function (arg0, arg1) {
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

@@ -1135,4 +1262,4 @@ return addHeapObject(ret);

module.exports.__wbindgen_closure_wrapper595 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 189, __wbg_adapter_54);
module.exports.__wbindgen_closure_wrapper618 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 196, __wbg_adapter_54);
return addHeapObject(ret);

@@ -1139,0 +1266,0 @@ };

{
"name": "@noir-lang/acvm_js",
"version": "0.27.0",
"version": "0.28.0-10eae15.nightly",
"repository": {

@@ -23,3 +23,28 @@ "type": "git",

],
"sideEffects": false
}
"sideEffects": false,
"packageManager": "yarn@3.5.1",
"scripts": {
"build": "bash ./build.sh",
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
"test:browser": "web-test-runner",
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
"publish": "echo 📡 publishing `$npm_package_name` && yarn npm publish",
"nightly:version": "jq --arg new_version \"-$(git rev-parse --short HEAD)$1\" '.version = .version + $new_version' package.json > package-tmp.json && mv package-tmp.json package.json",
"clean": "chmod u+w web nodejs || true && rm -rf web nodejs",
"build:nix": "nix build -L .#acvm_js",
"install:from:nix": "yarn clean && yarn build:nix && cp -rL ./result/acvm_js/nodejs ./ && cp -rL ./result/acvm_js/web ./"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4-fix.0",
"@web/dev-server-esbuild": "^0.3.6",
"@web/test-runner": "^0.15.3",
"@web/test-runner-playwright": "^0.10.0",
"chai": "^4.3.7",
"eslint": "^8.50.0",
"eslint-plugin-prettier": "^5.0.0",
"mocha": "^10.2.0",
"prettier": "3.0.3",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function decompressWitness(a: number, b: number, c: number): void;
export function compressWitness(a: number, b: number): void;
export function buildInfo(): 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 ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
export function keccak256(a: number, b: number, c: number): void;
export function blake2s256(a: number, b: number, c: number): void;
export function sha256(a: number, b: number, c: number): void;
export function xor(a: number, b: number): number;
export function and(a: number, b: number): number;
export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;

@@ -9,4 +18,2 @@ export function executeCircuit(a: number, b: number, c: number, d: number): number;

export function __wbg_wasmblackboxfunctionsolver_free(a: number): void;
export function decompressWitness(a: number, b: number, c: number): void;
export function compressWitness(a: number, b: number): void;
export function initLogLevel(a: number): void;

@@ -18,9 +25,9 @@ export function getPublicWitness(a: number, b: number, c: number, d: number): void;

export function trap___wbgd_downcast_token(): number;
export function __wbindgen_malloc(a: number, b: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
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__h7be0e81f38bcb593(a: number, b: number, c: number): void;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5(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, c: number): void;
export function __wbindgen_free(a: number, b: number): void;
export function __wbindgen_exn_store(a: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(a: number, b: number, c: number, d: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade(a: number, b: number, c: number, d: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
*
* @param {Uint8Array} compressed_witness - A compressed witness.
* @returns {WitnessMap} The decompressed witness map.
*/
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
*
* @param {Uint8Array} compressed_witness - A witness map.
* @returns {WitnessMap} A compressed witness map
*/
export function compressWitness(witness_map: WitnessMap): Uint8Array;
/**
* Returns the `BuildInfo` object containing information about how the installed package was built.

@@ -9,2 +23,53 @@ * @returns {BuildInfo} - Information on how the installed package was built.

/**
* Verifies a ECDSA signature over the secp256r1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
/**
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
* Verifies a ECDSA signature over the secp256k1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
/**
* Calculates the Keccak256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function keccak256(inputs: Uint8Array): Uint8Array;
/**
* Calculates the Blake2s256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function blake2s256(inputs: Uint8Array): Uint8Array;
/**
* Calculates the SHA256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function sha256(inputs: Uint8Array): Uint8Array;
/**
* Performs a bitwise XOR operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
export function xor(lhs: string, rhs: string): string;
/**
* Performs a bitwise AND operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
export function and(lhs: string, rhs: string): string;
/**
* Executes an ACIR circuit to generate the solved witness from the initial witness.

@@ -33,16 +98,2 @@ *

/**
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
*
* @param {Uint8Array} compressed_witness - A compressed witness.
* @returns {WitnessMap} The decompressed witness map.
*/
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
/**
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
*
* @param {Uint8Array} compressed_witness - A witness map.
* @returns {WitnessMap} A compressed witness map
*/
export function compressWitness(witness_map: WitnessMap): Uint8Array;
/**
* Sets the package's logging level.

@@ -149,3 +200,12 @@ *

readonly memory: WebAssembly.Memory;
readonly decompressWitness: (a: number, b: number, c: number) => void;
readonly compressWitness: (a: number, b: number) => void;
readonly buildInfo: () => number;
readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
readonly keccak256: (a: number, b: number, c: number) => void;
readonly blake2s256: (a: number, b: number, c: number) => void;
readonly sha256: (a: number, b: number, c: number) => void;
readonly xor: (a: number, b: number) => number;
readonly and: (a: number, b: number) => number;
readonly executeCircuitWithBlackBoxSolver: (a: number, b: number, c: number, d: number, e: number) => number;

@@ -155,4 +215,2 @@ readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;

readonly __wbg_wasmblackboxfunctionsolver_free: (a: number) => void;
readonly decompressWitness: (a: number, b: number, c: number) => void;
readonly compressWitness: (a: number, b: number) => void;
readonly initLogLevel: (a: number) => void;

@@ -164,10 +222,10 @@ readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;

readonly trap___wbgd_downcast_token: () => number;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
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__h7be0e81f38bcb593: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5: (a: number, b: number, c: number) => void;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
readonly __wbindgen_free: (a: number, b: number) => void;
readonly __wbindgen_exn_store: (a: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0: (a: number, b: number, c: number, d: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade: (a: number, b: number, c: number, d: number) => void;
}

@@ -174,0 +232,0 @@

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

function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
function dropObject(idx) {

@@ -42,11 +51,2 @@ if (idx < 132) return;

function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
function isLikeNone(x) {

@@ -95,3 +95,3 @@ return x === undefined || x === null;

const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length, 1) >>> 0;
const ptr = malloc(buf.length) >>> 0;
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);

@@ -103,3 +103,3 @@ WASM_VECTOR_LEN = buf.length;

let len = arg.length;
let ptr = malloc(len, 1) >>> 0;
let ptr = malloc(len) >>> 0;

@@ -120,3 +120,3 @@ const mem = getUint8Memory0();

}
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);

@@ -231,23 +231,7 @@ const ret = encodeString(arg, view);

function __wbg_adapter_54(arg0, arg1, arg2) {
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7be0e81f38bcb593(arg0, arg1, addHeapObject(arg2));
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb1f60a5b015b6c5(arg0, arg1, addHeapObject(arg2));
}
/**
* 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);
}
function _assertClass(instance, klass) {
if (!(instance instanceof klass)) {
throw new Error(`expected instance of ${klass.name}`);
}
return instance.ptr;
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1, 1) >>> 0;
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);

@@ -258,42 +242,2 @@ WASM_VECTOR_LEN = arg.length;

/**
* 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, circuit, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(circuit, 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);
}
/**
* 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(circuit, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
export function createBlackBoxSolver() {
const ret = wasm.createBlackBoxSolver();
return takeObject(ret);
}
/**
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.

@@ -352,2 +296,185 @@ *

/**
* 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);
}
/**
* Verifies a ECDSA signature over the secp256r1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
const len1 = WASM_VECTOR_LEN;
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
const len2 = WASM_VECTOR_LEN;
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
const len3 = WASM_VECTOR_LEN;
const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
return ret !== 0;
}
/**
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
* Verifies a ECDSA signature over the secp256k1 curve.
* @param {Uint8Array} hashed_msg
* @param {Uint8Array} public_key_x_bytes
* @param {Uint8Array} public_key_y_bytes
* @param {Uint8Array} signature
* @returns {boolean}
*/
export function ecdsa_secp256k1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
const len1 = WASM_VECTOR_LEN;
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
const len2 = WASM_VECTOR_LEN;
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
const len3 = WASM_VECTOR_LEN;
const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
return ret !== 0;
}
/**
* Calculates the Keccak256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function keccak256(inputs) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.keccak256(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v2 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
return v2;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Calculates the Blake2s256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function blake2s256(inputs) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.blake2s256(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v2 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
return v2;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Calculates the SHA256 hash of the input bytes
* @param {Uint8Array} inputs
* @returns {Uint8Array}
*/
export function sha256(inputs) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
wasm.sha256(retptr, ptr0, len0);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v2 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_free(r0, r1 * 1);
return v2;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* Performs a bitwise XOR operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
export function xor(lhs, rhs) {
const ret = wasm.xor(addHeapObject(lhs), addHeapObject(rhs));
return takeObject(ret);
}
/**
* Performs a bitwise AND operation between `lhs` and `rhs`
* @param {string} lhs
* @param {string} rhs
* @returns {string}
*/
export function and(lhs, rhs) {
const ret = wasm.and(addHeapObject(lhs), addHeapObject(rhs));
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.
*
* @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, circuit, initial_witness, foreign_call_handler) {
_assertClass(solver, WasmBlackBoxFunctionSolver);
const ptr0 = passArray8ToWasm0(circuit, 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);
}
/**
* 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(circuit, initial_witness, foreign_call_handler) {
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
return takeObject(ret);
}
/**
* @returns {Promise<WasmBlackBoxFunctionSolver>}
*/
export function createBlackBoxSolver() {
const ret = wasm.createBlackBoxSolver();
return takeObject(ret);
}
/**
* Sets the package's logging level.

@@ -452,4 +579,4 @@ *

}
function __wbg_adapter_148(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2cc2a3675130eda0(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h72933b4dbc34aade(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
}

@@ -540,2 +667,6 @@

imports.wbg = {};
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {

@@ -548,4 +679,12 @@ takeObject(arg0);

};
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
const ret = getObject(arg0);
imports.wbg.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};
imports.wbg.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};
imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
return addHeapObject(ret);

@@ -557,6 +696,2 @@ };

};
imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_is_undefined = function(arg0) {

@@ -566,6 +701,2 @@ const ret = getObject(arg0) === undefined;

};
imports.wbg.__wbindgen_is_array = function(arg0) {
const ret = Array.isArray(getObject(arg0));
return ret;
};
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {

@@ -577,12 +708,3 @@ const obj = getObject(arg1);

};
imports.wbg.__wbindgen_cb_drop = function(arg0) {
const obj = takeObject(arg0).original;
if (obj.cnt-- == 1) {
obj.a = 0;
return true;
}
const ret = false;
return ret;
};
imports.wbg.__wbg_constructor_6b4742a211e48095 = function(arg0) {
imports.wbg.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) {
const ret = new Error(takeObject(arg0));

@@ -599,3 +721,12 @@ return addHeapObject(ret);

};
imports.wbg.__wbg_new_212eeacc588e41ad = function() {
imports.wbg.__wbindgen_cb_drop = function(arg0) {
const obj = takeObject(arg0).original;
if (obj.cnt-- == 1) {
obj.a = 0;
return true;
}
const ret = false;
return ret;
};
imports.wbg.__wbg_new_d6cb182577c81490 = function() {
const ret = new Map();

@@ -608,6 +739,2 @@ return addHeapObject(ret);

};
imports.wbg.__wbindgen_is_string = function(arg0) {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {

@@ -632,3 +759,3 @@ const ret = new Error();

} finally {
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
wasm.__wbindgen_free(deferred0_0, deferred0_1);
}

@@ -640,5 +767,5 @@ };

};
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
const ret = getObject(arg0) === getObject(arg1);
return 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);
};

@@ -653,2 +780,6 @@ imports.wbg.__wbindgen_ge = function(arg0, arg1) {

};
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
const ret = getObject(arg0) === getObject(arg1);
return ret;
};
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {

@@ -662,6 +793,2 @@ const ret = BigInt.asUintN(64, arg0);

};
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) {

@@ -724,88 +851,88 @@ const val = getObject(arg0);

}, arguments) };
imports.wbg.__wbg_debug_9b8701f894da9929 = function(arg0, arg1, arg2, arg3) {
imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
imports.wbg.__wbg_error_788ae33f81d3b84b = function(arg0) {
imports.wbg.__wbg_error_a7e23606158b68b9 = function(arg0) {
console.error(getObject(arg0));
};
imports.wbg.__wbg_error_d9bce418caafb712 = function(arg0, arg1, arg2, arg3) {
imports.wbg.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
imports.wbg.__wbg_info_bb52f40b06f679de = function(arg0, arg1, arg2, arg3) {
imports.wbg.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
imports.wbg.__wbg_log_ea7093e35e3efd07 = function(arg0, arg1, arg2, arg3) {
imports.wbg.__wbg_log_9b164efbe6db702f = function(arg0, arg1, arg2, arg3) {
console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
imports.wbg.__wbg_warn_dfc0e0cf544a13bd = function(arg0, arg1, arg2, arg3) {
imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
const ret = getObject(arg0)[arg1 >>> 0];
return addHeapObject(ret);
};
imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {
imports.wbg.__wbg_length_820c786973abdd8a = function(arg0) {
const ret = getObject(arg0).length;
return ret;
};
imports.wbg.__wbg_new_898a68150f225f2e = function() {
imports.wbg.__wbg_new_0394642eae39db16 = function() {
const ret = new Array();
return addHeapObject(ret);
};
imports.wbg.__wbg_BigInt_025925c4804d8575 = function(arg0) {
imports.wbg.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
const ret = BigInt(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
imports.wbg.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_get_97b561fb56f034b5 = function() { return handleError(function (arg0, arg1) {
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_cb65541d95d71282 = function() { return handleError(function (arg0, arg1) {
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_b51585de1b234aff = function() {
imports.wbg.__wbg_new_2b6fea4ea03b1b95 = function() {
const ret = new Object();
return addHeapObject(ret);
};
imports.wbg.__wbg_self_1ff1d729e9aae938 = function() { return handleError(function () {
imports.wbg.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
const ret = self.self;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_window_5f4faef6c12b79ec = function() { return handleError(function () {
imports.wbg.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
const ret = window.window;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_globalThis_1d39714405582d3c = function() { return handleError(function () {
imports.wbg.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
const ret = globalThis.globalThis;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_global_651f05c6a0944d1c = function() { return handleError(function () {
imports.wbg.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
const ret = global.global;
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_newwithlength_3ec098a360da1909 = function(arg0) {
imports.wbg.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
const ret = new Array(arg0 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
imports.wbg.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
};
imports.wbg.__wbg_from_d7c216d4616bb368 = function(arg0) {
imports.wbg.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
const ret = Array.from(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_push_ca1c26067ef907ac = function(arg0, arg1) {
imports.wbg.__wbg_push_109cfc26d02582dd = function(arg0, arg1) {
const ret = getObject(arg0).push(getObject(arg1));
return ret;
};
imports.wbg.__wbg_byteLength_0488a7a303dccf40 = function(arg0) {
imports.wbg.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
const ret = getObject(arg0).byteLength;
return ret;
};
imports.wbg.__wbg_toString_26c114c5f3052ff5 = function(arg0, arg1, arg2) {
imports.wbg.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
const ret = getObject(arg1).toString(arg2);

@@ -817,10 +944,10 @@ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);

};
imports.wbg.__wbg_new_d258248ed531ff54 = function(arg0, arg1) {
imports.wbg.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
const ret = new Error(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_setcause_a60925f08b71876d = function(arg0, arg1) {
imports.wbg.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
getObject(arg0).cause = getObject(arg1);
};
imports.wbg.__wbg_instanceof_Function_3021b2be9300e7a7 = function(arg0) {
imports.wbg.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
let result;

@@ -835,19 +962,19 @@ try {

};
imports.wbg.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
imports.wbg.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_call_4c92f6aec1e1d6e6 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
imports.wbg.__wbg_call_4c73e4aecced6a7d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_bind_f9d2c8ec337bbbe7 = function(arg0, arg1, arg2) {
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_60a9a80cada2f33c = function(arg0, arg1, arg2, arg3) {
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_d3ffcb118358250b = function(arg0, arg1, arg2) {
imports.wbg.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
try {

@@ -859,3 +986,3 @@ var state0 = {a: arg1, b: arg2};

try {
return __wbg_adapter_148(a, state0.b, arg0, arg1);
return __wbg_adapter_155(a, state0.b, arg0, arg1);
} finally {

@@ -870,11 +997,11 @@ state0.a = a;

};
imports.wbg.__wbg_set_bedc3d02d0f05eb0 = function(arg0, arg1, arg2) {
imports.wbg.__wbg_set_da7be7bf0e037b14 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
};
imports.wbg.__wbg_constructor_47e9bb352faf1649 = function(arg0) {
imports.wbg.__wbg_constructor_f2623999a1f453eb = function(arg0) {
const ret = getObject(arg0).constructor;
return addHeapObject(ret);
};
imports.wbg.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
imports.wbg.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
try {

@@ -886,3 +1013,3 @@ var state0 = {a: arg0, b: arg1};

try {
return __wbg_adapter_148(a, state0.b, arg0, arg1);
return __wbg_adapter_155(a, state0.b, arg0, arg1);
} finally {

@@ -898,58 +1025,58 @@ state0.a = a;

};
imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
imports.wbg.__wbg_resolve_ae38ad63c43ff98b = function(arg0) {
const ret = Promise.resolve(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
imports.wbg.__wbg_then_8df675b8bb5d5e3c = function(arg0, arg1) {
const ret = getObject(arg0).then(getObject(arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
imports.wbg.__wbg_then_835b073a479138e5 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
return addHeapObject(ret);
};
imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {
imports.wbg.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
const ret = getObject(arg0).buffer;
return addHeapObject(ret);
};
imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
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_8125e318e6245eed = function(arg0) {
imports.wbg.__wbg_new_09938a7d020f049b = function(arg0) {
const ret = new Uint8Array(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
imports.wbg.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
};
imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {
imports.wbg.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
const ret = getObject(arg0).length;
return ret;
};
imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
imports.wbg.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
const ret = new Uint8Array(arg0 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
imports.wbg.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_compile_0ef211355a4ebea3 = function(arg0) {
imports.wbg.__wbg_compile_eefe73dfb19bff3d = function(arg0) {
const ret = WebAssembly.compile(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_instantiate_8900c71988551df8 = function(arg0, arg1) {
imports.wbg.__wbg_instantiate_e61ee50cd947cd36 = function(arg0, arg1) {
const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
};
imports.wbg.__wbg_exports_9484b00cdfd311fc = function(arg0) {
imports.wbg.__wbg_exports_311291a1333429a3 = function(arg0) {
const ret = getObject(arg0).exports;
return addHeapObject(ret);
};
imports.wbg.__wbg_exports_b7984a3120d6aba2 = function(arg0) {
imports.wbg.__wbg_exports_12505982ae149cb0 = function(arg0) {
const ret = WebAssembly.Module.exports(getObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbg_instanceof_Table_ba74319dfec929b1 = function(arg0) {
imports.wbg.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
let result;

@@ -964,7 +1091,7 @@ try {

};
imports.wbg.__wbg_get_9bb402f6a9f0b436 = function() { return handleError(function (arg0, arg1) {
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_6b2a8e33c4176794 = function(arg0) {
imports.wbg.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
let result;

@@ -979,19 +1106,19 @@ try {

};
imports.wbg.__wbg_new_5514c0d576222fc2 = function() { return handleError(function (arg0) {
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_f9ecfcbfefaf7349 = function() { return handleError(function (arg0, arg1, arg2) {
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_2782f7ac7c421741 = function() { return handleError(function (arg0) {
imports.wbg.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
const ret = Reflect.getPrototypeOf(getObject(arg0));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_set_092e06b0f9d71865 = function() { return handleError(function (arg0, arg1, arg2) {
imports.wbg.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
return ret;
}, arguments) };
imports.wbg.__wbg_parse_670c19d4e984792e = function() { return handleError(function (arg0, arg1) {
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

@@ -1024,4 +1151,4 @@ return addHeapObject(ret);

};
imports.wbg.__wbindgen_closure_wrapper595 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 189, __wbg_adapter_54);
imports.wbg.__wbindgen_closure_wrapper618 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 196, __wbg_adapter_54);
return addHeapObject(ret);

@@ -1028,0 +1155,0 @@ };

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