@noir-lang/acvm_js
Advanced tools
Comparing version 0.27.0 to 0.28.0-1b40af8c1
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export const memory: WebAssembly.Memory; | ||
export function buildInfo(): number; | ||
export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number; | ||
@@ -11,2 +10,10 @@ export function executeCircuit(a: number, b: number, c: number, d: number): number; | ||
export function compressWitness(a: number, b: number): void; | ||
export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
export function 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 buildInfo(): number; | ||
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__h1dfec0dba43a4c9e(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__h43234701b229d587(a: number, b: number, c: number, d: number): void; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* 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; | ||
/** | ||
* Executes an ACIR circuit to generate the solved witness from the initial witness. | ||
@@ -46,2 +41,58 @@ * | ||
/** | ||
* 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; | ||
/** | ||
* 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; | ||
/** | ||
* Sets the package's logging level. | ||
@@ -114,2 +165,6 @@ * | ||
export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE"; | ||
export type ExecutionError = Error & { | ||
@@ -121,6 +176,2 @@ callStack?: string[]; | ||
export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE"; | ||
// Map from witness index to hex string value of witness. | ||
@@ -127,0 +178,0 @@ export type WitnessMap = Map<number, string>; |
@@ -6,22 +6,2 @@ let imports = {}; | ||
const heap = new Array(128).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
function getObject(idx) { return heap[idx]; } | ||
let heap_next = heap.length; | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
@@ -45,2 +25,8 @@ | ||
const heap = new Array(128).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
let heap_next = heap.length; | ||
function addHeapObject(obj) { | ||
@@ -55,2 +41,16 @@ if (heap_next === heap.length) heap.push(heap.length + 1); | ||
function getObject(idx) { return heap[idx]; } | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
function isLikeNone(x) { | ||
@@ -99,3 +99,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); | ||
@@ -107,3 +107,3 @@ WASM_VECTOR_LEN = buf.length; | ||
let len = arg.length; | ||
let ptr = malloc(len, 1) >>> 0; | ||
let ptr = malloc(len) >>> 0; | ||
@@ -124,3 +124,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); | ||
@@ -235,14 +235,5 @@ 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__h1dfec0dba43a4c9e(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) { | ||
@@ -256,3 +247,3 @@ if (!(instance instanceof klass)) { | ||
function passArray8ToWasm0(arg, malloc) { | ||
const ptr = malloc(arg.length * 1, 1) >>> 0; | ||
const ptr = malloc(arg.length * 1) >>> 0; | ||
getUint8Memory0().set(arg, ptr / 1); | ||
@@ -356,2 +347,139 @@ WASM_VECTOR_LEN = arg.length; | ||
/** | ||
* 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); | ||
}; | ||
/** | ||
* 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); | ||
}; | ||
/** | ||
* Sets the package's logging level. | ||
@@ -456,4 +584,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__h43234701b229d587(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -512,6 +640,2 @@ | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
module.exports.__wbindgen_error_new = function(arg0, arg1) { | ||
@@ -527,5 +651,4 @@ const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
module.exports.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
@@ -538,2 +661,7 @@ | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_is_undefined = function(arg0) { | ||
@@ -544,7 +672,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) { | ||
@@ -557,17 +680,7 @@ 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; | ||
module.exports.__wbindgen_is_array = function(arg0) { | ||
const ret = Array.isArray(getObject(arg0)); | ||
return ret; | ||
}; | ||
module.exports.__wbg_constructor_6b4742a211e48095 = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_string_get = function(arg0, arg1) { | ||
@@ -582,3 +695,18 @@ const obj = getObject(arg1); | ||
module.exports.__wbg_new_212eeacc588e41ad = function() { | ||
module.exports.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
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(); | ||
@@ -619,3 +747,3 @@ return addHeapObject(ret); | ||
} finally { | ||
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); | ||
wasm.__wbindgen_free(deferred0_0, deferred0_1); | ||
} | ||
@@ -691,10 +819,2 @@ }; | ||
module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).getRandomValues(getObject(arg1)); | ||
}, arguments) }; | ||
module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).randomFillSync(takeObject(arg1)); | ||
}, arguments) }; | ||
module.exports.__wbg_crypto_c48a774b022d20ac = function(arg0) { | ||
@@ -730,27 +850,35 @@ const ret = getObject(arg0).crypto; | ||
module.exports.__wbg_debug_9b8701f894da9929 = function(arg0, arg1, arg2, arg3) { | ||
module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).getRandomValues(getObject(arg1)); | ||
}, arguments) }; | ||
module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).randomFillSync(takeObject(arg1)); | ||
}, arguments) }; | ||
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]; | ||
@@ -760,3 +888,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_length_fff51ee6522a1a18 = function(arg0) { | ||
module.exports.__wbg_length_820c786973abdd8a = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
@@ -766,3 +894,3 @@ return ret; | ||
module.exports.__wbg_new_898a68150f225f2e = function() { | ||
module.exports.__wbg_new_0394642eae39db16 = function() { | ||
const ret = new Array(); | ||
@@ -772,3 +900,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_BigInt_025925c4804d8575 = function(arg0) { | ||
module.exports.__wbg_BigInt_9523742cb675bb6f = function(arg0) { | ||
const ret = BigInt(getObject(arg0)); | ||
@@ -778,3 +906,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)); | ||
@@ -784,3 +912,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)); | ||
@@ -790,3 +918,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)); | ||
@@ -796,3 +924,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_new_b51585de1b234aff = function() { | ||
module.exports.__wbg_new_2b6fea4ea03b1b95 = function() { | ||
const ret = new Object(); | ||
@@ -802,3 +930,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; | ||
@@ -808,3 +936,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; | ||
@@ -814,3 +942,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; | ||
@@ -820,3 +948,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; | ||
@@ -826,3 +954,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_newwithlength_3ec098a360da1909 = function(arg0) { | ||
module.exports.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) { | ||
const ret = new Array(arg0 >>> 0); | ||
@@ -832,7 +960,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)); | ||
@@ -842,3 +970,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)); | ||
@@ -848,3 +976,3 @@ return ret; | ||
module.exports.__wbg_byteLength_0488a7a303dccf40 = function(arg0) { | ||
module.exports.__wbg_byteLength_1a59a59856fc656a = function(arg0) { | ||
const ret = getObject(arg0).byteLength; | ||
@@ -854,3 +982,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); | ||
@@ -863,3 +991,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)); | ||
@@ -869,7 +997,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; | ||
@@ -885,3 +1013,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)); | ||
@@ -891,3 +1019,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)); | ||
@@ -897,3 +1025,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)); | ||
@@ -903,3 +1031,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)); | ||
@@ -909,3 +1037,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_forEach_d3ffcb118358250b = function(arg0, arg1, arg2) { | ||
module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) { | ||
try { | ||
@@ -917,3 +1045,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 { | ||
@@ -929,3 +1057,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)); | ||
@@ -935,3 +1063,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_constructor_47e9bb352faf1649 = function(arg0) { | ||
module.exports.__wbg_constructor_f2623999a1f453eb = function(arg0) { | ||
const ret = getObject(arg0).constructor; | ||
@@ -941,3 +1069,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) { | ||
module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) { | ||
try { | ||
@@ -949,3 +1077,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 { | ||
@@ -962,3 +1090,3 @@ state0.a = a; | ||
module.exports.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) { | ||
module.exports.__wbg_resolve_ae38ad63c43ff98b = function(arg0) { | ||
const ret = Promise.resolve(getObject(arg0)); | ||
@@ -968,3 +1096,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)); | ||
@@ -974,3 +1102,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)); | ||
@@ -980,3 +1108,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_buffer_085ec1f694018c4f = function(arg0) { | ||
module.exports.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
@@ -986,3 +1114,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); | ||
@@ -992,3 +1120,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_new_8125e318e6245eed = function(arg0) { | ||
module.exports.__wbg_new_09938a7d020f049b = function(arg0) { | ||
const ret = new Uint8Array(getObject(arg0)); | ||
@@ -998,7 +1126,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; | ||
@@ -1008,3 +1136,3 @@ return ret; | ||
module.exports.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) { | ||
module.exports.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) { | ||
const ret = new Uint8Array(arg0 >>> 0); | ||
@@ -1014,3 +1142,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); | ||
@@ -1020,3 +1148,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_compile_0ef211355a4ebea3 = function(arg0) { | ||
module.exports.__wbg_compile_eefe73dfb19bff3d = function(arg0) { | ||
const ret = WebAssembly.compile(getObject(arg0)); | ||
@@ -1026,3 +1154,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)); | ||
@@ -1032,3 +1160,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_exports_9484b00cdfd311fc = function(arg0) { | ||
module.exports.__wbg_exports_311291a1333429a3 = function(arg0) { | ||
const ret = getObject(arg0).exports; | ||
@@ -1038,3 +1166,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)); | ||
@@ -1044,3 +1172,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_instanceof_Table_ba74319dfec929b1 = function(arg0) { | ||
module.exports.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) { | ||
let result; | ||
@@ -1056,3 +1184,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); | ||
@@ -1062,3 +1190,3 @@ return addHeapObject(ret); | ||
module.exports.__wbg_instanceof_Memory_6b2a8e33c4176794 = function(arg0) { | ||
module.exports.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) { | ||
let result; | ||
@@ -1074,3 +1202,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)); | ||
@@ -1080,3 +1208,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)); | ||
@@ -1086,3 +1214,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)); | ||
@@ -1092,3 +1220,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)); | ||
@@ -1098,3 +1226,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)); | ||
@@ -1133,4 +1261,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_wrapper614 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 193, __wbg_adapter_54); | ||
return addHeapObject(ret); | ||
@@ -1137,0 +1265,0 @@ }; |
{ | ||
"name": "@noir-lang/acvm_js", | ||
"version": "0.27.0", | ||
"version": "0.28.0-1b40af8c1", | ||
"repository": { | ||
@@ -23,3 +23,26 @@ "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)\" '.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" | ||
}, | ||
"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 buildInfo(): number; | ||
export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number; | ||
@@ -11,2 +10,10 @@ export function executeCircuit(a: number, b: number, c: number, d: number): number; | ||
export function compressWitness(a: number, b: number): void; | ||
export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; | ||
export function 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 buildInfo(): number; | ||
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__h1dfec0dba43a4c9e(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__h43234701b229d587(a: number, b: number, c: number, d: number): void; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* 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; | ||
/** | ||
* Executes an ACIR circuit to generate the solved witness from the initial witness. | ||
@@ -46,2 +41,58 @@ * | ||
/** | ||
* 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; | ||
/** | ||
* 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; | ||
/** | ||
* Sets the package's logging level. | ||
@@ -114,2 +165,6 @@ * | ||
export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE"; | ||
export type ExecutionError = Error & { | ||
@@ -121,6 +176,2 @@ callStack?: string[]; | ||
export type LogLevel = "OFF" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE"; | ||
// Map from witness index to hex string value of witness. | ||
@@ -150,3 +201,2 @@ export type WitnessMap = Map<number, string>; | ||
readonly memory: WebAssembly.Memory; | ||
readonly buildInfo: () => number; | ||
readonly executeCircuitWithBlackBoxSolver: (a: number, b: number, c: number, d: number, e: number) => number; | ||
@@ -158,2 +208,10 @@ readonly executeCircuit: (a: number, b: number, c: number, d: number) => number; | ||
readonly compressWitness: (a: number, b: number) => void; | ||
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 buildInfo: () => number; | ||
readonly initLogLevel: (a: number) => void; | ||
@@ -165,10 +223,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__h1dfec0dba43a4c9e: (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__h43234701b229d587: (a: number, b: number, c: number, d: number) => void; | ||
} | ||
@@ -175,0 +233,0 @@ |
let wasm; | ||
const heap = new Array(128).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
function getObject(idx) { return heap[idx]; } | ||
let heap_next = heap.length; | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); | ||
@@ -41,2 +21,8 @@ | ||
const heap = new Array(128).fill(undefined); | ||
heap.push(undefined, null, true, false); | ||
let heap_next = heap.length; | ||
function addHeapObject(obj) { | ||
@@ -51,2 +37,16 @@ if (heap_next === heap.length) heap.push(heap.length + 1); | ||
function getObject(idx) { return heap[idx]; } | ||
function dropObject(idx) { | ||
if (idx < 132) return; | ||
heap[idx] = heap_next; | ||
heap_next = idx; | ||
} | ||
function takeObject(idx) { | ||
const ret = getObject(idx); | ||
dropObject(idx); | ||
return ret; | ||
} | ||
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,14 +231,5 @@ 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__h1dfec0dba43a4c9e(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) { | ||
@@ -252,3 +243,3 @@ if (!(instance instanceof klass)) { | ||
function passArray8ToWasm0(arg, malloc) { | ||
const ptr = malloc(arg.length * 1, 1) >>> 0; | ||
const ptr = malloc(arg.length * 1) >>> 0; | ||
getUint8Memory0().set(arg, ptr / 1); | ||
@@ -352,2 +343,139 @@ WASM_VECTOR_LEN = arg.length; | ||
/** | ||
* 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); | ||
} | ||
/** | ||
* 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); | ||
} | ||
/** | ||
* Sets the package's logging level. | ||
@@ -452,4 +580,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__h43234701b229d587(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -540,5 +668,2 @@ | ||
imports.wbg = {}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_error_new = function(arg0, arg1) { | ||
@@ -552,5 +677,4 @@ const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
}; | ||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
@@ -561,2 +685,6 @@ imports.wbg.__wbg_wasmblackboxfunctionsolver_new = function(arg0) { | ||
}; | ||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) { | ||
const ret = getStringFromWasm0(arg0, arg1); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_undefined = function(arg0) { | ||
@@ -566,6 +694,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,15 +701,6 @@ 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; | ||
imports.wbg.__wbindgen_is_array = function(arg0) { | ||
const ret = Array.isArray(getObject(arg0)); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_constructor_6b4742a211e48095 = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) { | ||
@@ -599,3 +714,16 @@ const obj = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_new_212eeacc588e41ad = function() { | ||
imports.wbg.__wbg_constructor_bd5b3ba6619fce81 = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
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(); | ||
@@ -631,3 +759,3 @@ return addHeapObject(ret); | ||
} finally { | ||
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); | ||
wasm.__wbindgen_free(deferred0_0, deferred0_1); | ||
} | ||
@@ -690,8 +818,2 @@ }; | ||
}; | ||
imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).getRandomValues(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).randomFillSync(takeObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) { | ||
@@ -721,88 +843,94 @@ const ret = getObject(arg0).crypto; | ||
}, arguments) }; | ||
imports.wbg.__wbg_debug_9b8701f894da9929 = function(arg0, arg1, arg2, arg3) { | ||
imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).getRandomValues(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).randomFillSync(takeObject(arg1)); | ||
}, arguments) }; | ||
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); | ||
@@ -814,10 +942,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; | ||
@@ -832,19 +960,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 { | ||
@@ -856,3 +984,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 { | ||
@@ -867,11 +995,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 { | ||
@@ -883,3 +1011,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 { | ||
@@ -895,58 +1023,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; | ||
@@ -961,7 +1089,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; | ||
@@ -976,19 +1104,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)); | ||
@@ -1021,4 +1149,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_wrapper614 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 193, __wbg_adapter_54); | ||
return addHeapObject(ret); | ||
@@ -1025,0 +1153,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
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
5879525
11
2595
11