@noir-lang/acvm_js
Advanced tools
Comparing version 0.51.0 to 0.52.0-07ab515.nightly
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function initLogLevel(a: number, b: number, c: number): void; | ||
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 buildInfo(): number; | ||
export function getReturnWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicWitness(a: number, b: number, c: number, d: number): void; | ||
export function and(a: number, b: number): number; | ||
@@ -12,3 +15,2 @@ export function xor(a: number, b: number): number; | ||
export function blake2s256(a: number, b: number, c: number): void; | ||
export function keccak256(a: number, b: number, c: number): void; | ||
export function ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
@@ -20,6 +22,3 @@ export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
export function decompressWitnessStack(a: number, b: number, c: number): void; | ||
export function buildInfo(): number; | ||
export function getReturnWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicWitness(a: number, b: number, c: number, d: number): void; | ||
export function initLogLevel(a: number, b: number, c: number): void; | ||
export function __wbindgen_malloc(a: number): number; | ||
@@ -26,0 +25,0 @@ export function __wbindgen_realloc(a: number, b: number, c: number): number; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
/** | ||
* Executes an ACIR circuit to generate the solved witness from the initial witness. | ||
@@ -38,2 +32,40 @@ * | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
* @returns {BuildInfo} - Information on how the installed package was built. | ||
*/ | ||
export function buildInfo(): BuildInfo; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -66,8 +98,2 @@ * @param {string} lhs | ||
/** | ||
* Calculates the Keccak256 hash of the input bytes | ||
* @param {Uint8Array} inputs | ||
* @returns {Uint8Array} | ||
*/ | ||
export function keccak256(inputs: Uint8Array): Uint8Array; | ||
/** | ||
* Verifies a ECDSA signature over the secp256k1 curve. | ||
@@ -120,55 +146,8 @@ * @param {Uint8Array} hashed_msg | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
* @returns {BuildInfo} - Information on how the installed package was built. | ||
*/ | ||
export function buildInfo(): BuildInfo; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* Sets the package's logging level. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
export function initLogLevel(filter: string): void; | ||
// Map from witness index to hex string value of witness. | ||
export type WitnessMap = Map<number, string>; | ||
/** | ||
* An execution result containing two witnesses. | ||
* 1. The full solved witness of the execution. | ||
* 2. The return witness which contains the given public return values within the full witness. | ||
*/ | ||
export type SolvedAndReturnWitness = { | ||
solvedWitness: WitnessMap; | ||
returnWitness: WitnessMap; | ||
} | ||
export type ForeignCallInput = string[] | ||
@@ -223,1 +202,16 @@ export type ForeignCallOutput = string | string[] | ||
// Map from witness index to hex string value of witness. | ||
export type WitnessMap = Map<number, string>; | ||
/** | ||
* An execution result containing two witnesses. | ||
* 1. The full solved witness of the execution. | ||
* 2. The return witness which contains the given public return values within the full witness. | ||
*/ | ||
export type SolvedAndReturnWitness = { | ||
solvedWitness: WitnessMap; | ||
returnWitness: WitnessMap; | ||
} | ||
@@ -48,11 +48,2 @@ 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; | ||
} | ||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
@@ -76,2 +67,11 @@ | ||
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; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -225,23 +225,2 @@ | ||
/** | ||
* 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 passArray8ToWasm0(arg, malloc) { | ||
@@ -300,2 +279,95 @@ const ptr = malloc(arg.length * 1) >>> 0; | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
* @returns {BuildInfo} - Information on how the installed package was built. | ||
*/ | ||
module.exports.buildInfo = function() { | ||
const ret = wasm.buildInfo(); | ||
return takeObject(ret); | ||
}; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
*/ | ||
module.exports.getReturnWitness = function(program, witness_map) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
module.exports.getPublicParametersWitness = function(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
module.exports.getPublicWitness = function(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -392,23 +464,2 @@ * @param {string} lhs | ||
/** | ||
* 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); | ||
} | ||
}; | ||
/** | ||
* Verifies a ECDSA signature over the secp256k1 curve. | ||
@@ -555,33 +606,17 @@ * @param {Uint8Array} hashed_msg | ||
/** | ||
* 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); | ||
}; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* Sets the package's logging level. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
module.exports.getReturnWitness = function(program, witness_map) { | ||
module.exports.initLogLevel = function(filter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map)); | ||
wasm.initLogLevel(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
@@ -592,59 +627,3 @@ wasm.__wbindgen_add_to_stack_pointer(16); | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
module.exports.getPublicParametersWitness = function(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
module.exports.getPublicWitness = function(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
}; | ||
function __wbg_adapter_76(arg0, arg1, arg2, arg3, arg4) { | ||
function __wbg_adapter_75(arg0, arg1, arg2, arg3, arg4) { | ||
wasm.wasm_bindgen__convert__closures__invoke3_mut__h17fc532521b46256(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); | ||
@@ -660,6 +639,27 @@ } | ||
} | ||
function __wbg_adapter_93(arg0, arg1, arg2, arg3) { | ||
function __wbg_adapter_92(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h0d187b0f08495587(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
module.exports.__wbindgen_is_array = function(arg0) { | ||
const ret = Array.isArray(getObject(arg0)); | ||
return ret; | ||
}; | ||
module.exports.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
module.exports.__wbindgen_number_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
}; | ||
module.exports.__wbindgen_cb_drop = function(arg0) { | ||
@@ -675,15 +675,14 @@ const obj = takeObject(arg0).original; | ||
module.exports.__wbindgen_number_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
module.exports.__wbg_constructor_720343c738f4344c = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_new_3b3e21164d5381ca = function() { | ||
const ret = new Map(); | ||
module.exports.__wbg_new_55c288bb849e1b31 = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
@@ -697,4 +696,4 @@ }; | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
module.exports.__wbg_new_7379c57bfbea14d0 = function() { | ||
const ret = new Map(); | ||
return addHeapObject(ret); | ||
@@ -712,22 +711,2 @@ }; | ||
module.exports.__wbg_constructor_f4bcf4c70838c703 = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_is_array = function(arg0) { | ||
const ret = Array.isArray(getObject(arg0)); | ||
return ret; | ||
}; | ||
module.exports.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
module.exports.__wbg_new_e14625531a95427d = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -822,3 +801,3 @@ const ret = new Error(); | ||
try { | ||
return __wbg_adapter_76(a, state0.b, arg0, arg1, arg2); | ||
return __wbg_adapter_75(a, state0.b, arg0, arg1, arg2); | ||
} finally { | ||
@@ -870,3 +849,3 @@ state0.a = a; | ||
try { | ||
return __wbg_adapter_93(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_92(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -904,3 +883,3 @@ state0.a = a; | ||
try { | ||
return __wbg_adapter_93(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_92(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -954,4 +933,4 @@ state0.a = a; | ||
module.exports.__wbindgen_closure_wrapper747 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 266, __wbg_adapter_22); | ||
module.exports.__wbindgen_closure_wrapper727 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 267, __wbg_adapter_22); | ||
return addHeapObject(ret); | ||
@@ -958,0 +937,0 @@ }; |
{ | ||
"name": "@noir-lang/acvm_js", | ||
"version": "0.51.0", | ||
"version": "0.52.0-07ab515.nightly", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function initLogLevel(a: number, b: number, c: number): void; | ||
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 buildInfo(): number; | ||
export function getReturnWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicWitness(a: number, b: number, c: number, d: number): void; | ||
export function and(a: number, b: number): number; | ||
@@ -12,3 +15,2 @@ export function xor(a: number, b: number): number; | ||
export function blake2s256(a: number, b: number, c: number): void; | ||
export function keccak256(a: number, b: number, c: number): void; | ||
export function ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
@@ -20,6 +22,3 @@ export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
export function decompressWitnessStack(a: number, b: number, c: number): void; | ||
export function buildInfo(): number; | ||
export function getReturnWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void; | ||
export function getPublicWitness(a: number, b: number, c: number, d: number): void; | ||
export function initLogLevel(a: number, b: number, c: number): void; | ||
export function __wbindgen_malloc(a: number): number; | ||
@@ -26,0 +25,0 @@ export function __wbindgen_realloc(a: number, b: number, c: number): number; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
/** | ||
* Executes an ACIR circuit to generate the solved witness from the initial witness. | ||
@@ -38,2 +32,40 @@ * | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
* @returns {BuildInfo} - Information on how the installed package was built. | ||
*/ | ||
export function buildInfo(): BuildInfo; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -66,8 +98,2 @@ * @param {string} lhs | ||
/** | ||
* Calculates the Keccak256 hash of the input bytes | ||
* @param {Uint8Array} inputs | ||
* @returns {Uint8Array} | ||
*/ | ||
export function keccak256(inputs: Uint8Array): Uint8Array; | ||
/** | ||
* Verifies a ECDSA signature over the secp256k1 curve. | ||
@@ -120,55 +146,8 @@ * @param {Uint8Array} hashed_msg | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
* @returns {BuildInfo} - Information on how the installed package was built. | ||
*/ | ||
export function buildInfo(): BuildInfo; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* Sets the package's logging level. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap; | ||
export function initLogLevel(filter: string): void; | ||
// Map from witness index to hex string value of witness. | ||
export type WitnessMap = Map<number, string>; | ||
/** | ||
* An execution result containing two witnesses. | ||
* 1. The full solved witness of the execution. | ||
* 2. The return witness which contains the given public return values within the full witness. | ||
*/ | ||
export type SolvedAndReturnWitness = { | ||
solvedWitness: WitnessMap; | ||
returnWitness: WitnessMap; | ||
} | ||
export type ForeignCallInput = string[] | ||
@@ -224,2 +203,17 @@ export type ForeignCallOutput = string | string[] | ||
// Map from witness index to hex string value of witness. | ||
export type WitnessMap = Map<number, string>; | ||
/** | ||
* An execution result containing two witnesses. | ||
* 1. The full solved witness of the execution. | ||
* 2. The return witness which contains the given public return values within the full witness. | ||
*/ | ||
export type SolvedAndReturnWitness = { | ||
solvedWitness: WitnessMap; | ||
returnWitness: WitnessMap; | ||
} | ||
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; | ||
@@ -229,6 +223,9 @@ | ||
readonly memory: WebAssembly.Memory; | ||
readonly initLogLevel: (a: number, b: number, c: number) => void; | ||
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 buildInfo: () => number; | ||
readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly and: (a: number, b: number) => number; | ||
@@ -238,3 +235,2 @@ readonly xor: (a: number, b: number) => number; | ||
readonly blake2s256: (a: number, b: number, c: number) => void; | ||
readonly keccak256: (a: number, b: number, c: number) => void; | ||
readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number; | ||
@@ -246,6 +242,3 @@ readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number; | ||
readonly decompressWitnessStack: (a: number, b: number, c: number) => void; | ||
readonly buildInfo: () => number; | ||
readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly initLogLevel: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_malloc: (a: number) => number; | ||
@@ -252,0 +245,0 @@ readonly __wbindgen_realloc: (a: number, b: number, c: number) => number; |
@@ -45,11 +45,2 @@ 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; | ||
} | ||
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); | ||
@@ -73,2 +64,11 @@ | ||
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; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -222,23 +222,2 @@ | ||
/** | ||
* 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 passArray8ToWasm0(arg, malloc) { | ||
@@ -297,2 +276,95 @@ const ptr = malloc(arg.length * 1) >>> 0; | ||
/** | ||
* Returns the `BuildInfo` object containing information about how the installed package was built. | ||
* @returns {BuildInfo} - Information on how the installed package was built. | ||
*/ | ||
export function buildInfo() { | ||
const ret = wasm.buildInfo(); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getReturnWitness(program, witness_map) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicParametersWitness(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicWitness(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -389,23 +461,2 @@ * @param {string} lhs | ||
/** | ||
* 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); | ||
} | ||
} | ||
/** | ||
* Verifies a ECDSA signature over the secp256k1 curve. | ||
@@ -552,33 +603,17 @@ * @param {Uint8Array} hashed_msg | ||
/** | ||
* 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); | ||
} | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values. | ||
* Sets the package's logging level. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's return values. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} witness_map | ||
* @returns {WitnessMap} | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function getReturnWitness(program, witness_map) { | ||
export function initLogLevel(filter) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map)); | ||
wasm.initLogLevel(retptr, ptr0, len0); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
if (r1) { | ||
throw takeObject(r0); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
@@ -589,59 +624,3 @@ wasm.__wbindgen_add_to_stack_pointer(16); | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public parameters. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicParametersWitness(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs. | ||
* | ||
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit | ||
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit. | ||
* @returns {WitnessMap} A witness map containing the circuit's public inputs. | ||
* @param {Uint8Array} program | ||
* @param {WitnessMap} solved_witness | ||
* @returns {WitnessMap} | ||
*/ | ||
export function getPublicWitness(program, solved_witness) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
function __wbg_adapter_76(arg0, arg1, arg2, arg3, arg4) { | ||
function __wbg_adapter_75(arg0, arg1, arg2, arg3, arg4) { | ||
wasm.wasm_bindgen__convert__closures__invoke3_mut__h17fc532521b46256(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4)); | ||
@@ -657,3 +636,3 @@ } | ||
} | ||
function __wbg_adapter_93(arg0, arg1, arg2, arg3) { | ||
function __wbg_adapter_92(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h0d187b0f08495587(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
@@ -696,2 +675,19 @@ } | ||
imports.wbg = {}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_is_array = function(arg0) { | ||
const ret = Array.isArray(getObject(arg0)); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_number_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
}; | ||
imports.wbg.__wbindgen_cb_drop = function(arg0) { | ||
@@ -706,13 +702,12 @@ const obj = takeObject(arg0).original; | ||
}; | ||
imports.wbg.__wbindgen_number_get = function(arg0, arg1) { | ||
const obj = getObject(arg1); | ||
const ret = typeof(obj) === 'number' ? obj : undefined; | ||
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; | ||
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); | ||
imports.wbg.__wbg_constructor_720343c738f4344c = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_3b3e21164d5381ca = function() { | ||
const ret = new Map(); | ||
imports.wbg.__wbg_new_55c288bb849e1b31 = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
@@ -724,4 +719,4 @@ }; | ||
}; | ||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
imports.wbg.__wbg_new_7379c57bfbea14d0 = function() { | ||
const ret = new Map(); | ||
return addHeapObject(ret); | ||
@@ -737,18 +732,2 @@ }; | ||
}; | ||
imports.wbg.__wbg_constructor_f4bcf4c70838c703 = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_array = function(arg0) { | ||
const ret = Array.isArray(getObject(arg0)); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_e14625531a95427d = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -827,3 +806,3 @@ const ret = new Error(); | ||
try { | ||
return __wbg_adapter_76(a, state0.b, arg0, arg1, arg2); | ||
return __wbg_adapter_75(a, state0.b, arg0, arg1, arg2); | ||
} finally { | ||
@@ -868,3 +847,3 @@ state0.a = a; | ||
try { | ||
return __wbg_adapter_93(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_92(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -898,3 +877,3 @@ state0.a = a; | ||
try { | ||
return __wbg_adapter_93(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_92(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -940,4 +919,4 @@ state0.a = a; | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper747 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 266, __wbg_adapter_22); | ||
imports.wbg.__wbindgen_closure_wrapper727 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 267, __wbg_adapter_22); | ||
return addHeapObject(ret); | ||
@@ -944,0 +923,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4118473
2202
3