@noir-lang/acvm_js
Advanced tools
Comparing version 0.47.0-55d8e05.nightly to 0.47.0-6936a52.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; | ||
@@ -10,3 +11,2 @@ export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number; | ||
export function getPublicWitness(a: number, b: number, c: number, d: number): void; | ||
export function initLogLevel(a: number, b: number, c: number): void; | ||
export function and(a: number, b: number): number; | ||
@@ -13,0 +13,0 @@ export function xor(a: number, b: 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. | ||
@@ -65,8 +71,2 @@ * | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -156,2 +156,25 @@ * @param {string} lhs | ||
export type ForeignCallInput = string[] | ||
export type ForeignCallOutput = string | string[] | ||
/** | ||
* A callback which performs an foreign call and returns the response. | ||
* @callback ForeignCallHandler | ||
* @param {string} name - The identifier for the type of foreign call being performed. | ||
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call. | ||
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call. | ||
*/ | ||
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>; | ||
export type StackItem = { | ||
index: number; | ||
witness: WitnessMap; | ||
} | ||
export type WitnessStack = Array<StackItem>; | ||
export type RawAssertionPayload = { | ||
@@ -183,26 +206,3 @@ selector: string; | ||
export type StackItem = { | ||
index: number; | ||
witness: WitnessMap; | ||
} | ||
export type WitnessStack = Array<StackItem>; | ||
export type ForeignCallInput = string[] | ||
export type ForeignCallOutput = string | string[] | ||
/** | ||
* A callback which performs an foreign call and returns the response. | ||
* @callback ForeignCallHandler | ||
* @param {string} name - The identifier for the type of foreign call being performed. | ||
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call. | ||
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call. | ||
*/ | ||
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>; | ||
/** | ||
* @typedef {Object} BuildInfo - Information about how the installed package was built | ||
@@ -209,0 +209,0 @@ * @property {string} gitHash - The hash of the git commit from which the package was built. |
@@ -26,2 +26,11 @@ let imports = {}; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
@@ -45,11 +54,2 @@ | ||
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,2 +225,23 @@ | ||
/** | ||
* 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) { | ||
@@ -363,23 +384,2 @@ const ptr = malloc(arg.length * 1) >>> 0; | ||
/** | ||
* 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); | ||
} | ||
}; | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -642,2 +642,22 @@ * @param {string} lhs | ||
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_f139361aad331bd0 = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_number_new = function(arg0) { | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_string_new = function(arg0, arg1) { | ||
@@ -648,2 +668,7 @@ const ret = getStringFromWasm0(arg0, arg1); | ||
module.exports.__wbg_constructor_971e67e66cc5bd6a = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_is_array = function(arg0) { | ||
@@ -654,7 +679,2 @@ const ret = Array.isArray(getObject(arg0)); | ||
module.exports.__wbg_constructor_971e67e66cc5bd6a = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_new_193bac1dd2be232d = function() { | ||
@@ -665,7 +685,2 @@ const ret = new Map(); | ||
module.exports.__wbindgen_number_new = function(arg0) { | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_string_get = function(arg0, arg1) { | ||
@@ -692,17 +707,2 @@ const obj = getObject(arg1); | ||
module.exports.__wbindgen_cb_drop = function(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
const ret = false; | ||
return ret; | ||
}; | ||
module.exports.__wbg_new_f139361aad331bd0 = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -926,4 +926,4 @@ const ret = new Error(); | ||
module.exports.__wbindgen_closure_wrapper739 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 237, __wbg_adapter_22); | ||
module.exports.__wbindgen_closure_wrapper743 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 241, __wbg_adapter_22); | ||
return addHeapObject(ret); | ||
@@ -930,0 +930,0 @@ }; |
{ | ||
"name": "@noir-lang/acvm_js", | ||
"version": "0.47.0-55d8e05.nightly", | ||
"version": "0.47.0-6936a52.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; | ||
@@ -10,3 +11,2 @@ export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number; | ||
export function getPublicWitness(a: number, b: number, c: number, d: number): void; | ||
export function initLogLevel(a: number, b: number, c: number): void; | ||
export function and(a: number, b: number): number; | ||
@@ -13,0 +13,0 @@ export function xor(a: number, b: 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. | ||
@@ -65,8 +71,2 @@ * | ||
/** | ||
* Sets the package's logging level. | ||
* | ||
* @param {LogLevel} level - The maximum level of logging to be emitted. | ||
*/ | ||
export function initLogLevel(filter: string): void; | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -156,2 +156,25 @@ * @param {string} lhs | ||
export type ForeignCallInput = string[] | ||
export type ForeignCallOutput = string | string[] | ||
/** | ||
* A callback which performs an foreign call and returns the response. | ||
* @callback ForeignCallHandler | ||
* @param {string} name - The identifier for the type of foreign call being performed. | ||
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call. | ||
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call. | ||
*/ | ||
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>; | ||
export type StackItem = { | ||
index: number; | ||
witness: WitnessMap; | ||
} | ||
export type WitnessStack = Array<StackItem>; | ||
export type RawAssertionPayload = { | ||
@@ -183,26 +206,3 @@ selector: string; | ||
export type StackItem = { | ||
index: number; | ||
witness: WitnessMap; | ||
} | ||
export type WitnessStack = Array<StackItem>; | ||
export type ForeignCallInput = string[] | ||
export type ForeignCallOutput = string | string[] | ||
/** | ||
* A callback which performs an foreign call and returns the response. | ||
* @callback ForeignCallHandler | ||
* @param {string} name - The identifier for the type of foreign call being performed. | ||
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call. | ||
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call. | ||
*/ | ||
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>; | ||
/** | ||
* @typedef {Object} BuildInfo - Information about how the installed package was built | ||
@@ -225,2 +225,3 @@ * @property {string} gitHash - The hash of the git commit from which the package was built. | ||
readonly memory: WebAssembly.Memory; | ||
readonly initLogLevel: (a: number, b: number, c: number) => void; | ||
readonly executeCircuit: (a: number, b: number, c: number, d: number) => number; | ||
@@ -232,3 +233,2 @@ readonly executeCircuitWithReturnWitness: (a: number, b: number, c: number, d: number) => number; | ||
readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void; | ||
readonly initLogLevel: (a: number, b: number, c: number) => void; | ||
readonly and: (a: number, b: number) => number; | ||
@@ -235,0 +235,0 @@ readonly xor: (a: number, b: number) => number; |
@@ -23,2 +23,11 @@ let wasm; | ||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
heap[idx] = obj; | ||
return idx; | ||
} | ||
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); | ||
@@ -42,11 +51,2 @@ | ||
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,2 +222,23 @@ | ||
/** | ||
* 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) { | ||
@@ -360,23 +381,2 @@ const ptr = malloc(arg.length * 1) >>> 0; | ||
/** | ||
* 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); | ||
} | ||
} | ||
/** | ||
* Performs a bitwise AND operation between `lhs` and `rhs` | ||
@@ -672,2 +672,19 @@ * @param {string} lhs | ||
}; | ||
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_f139361aad331bd0 = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_number_new = function(arg0) { | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_string_new = function(arg0, arg1) { | ||
@@ -677,2 +694,6 @@ const ret = getStringFromWasm0(arg0, arg1); | ||
}; | ||
imports.wbg.__wbg_constructor_971e67e66cc5bd6a = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_array = function(arg0) { | ||
@@ -682,6 +703,2 @@ const ret = Array.isArray(getObject(arg0)); | ||
}; | ||
imports.wbg.__wbg_constructor_971e67e66cc5bd6a = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_193bac1dd2be232d = function() { | ||
@@ -691,6 +708,2 @@ const ret = new Map(); | ||
}; | ||
imports.wbg.__wbindgen_number_new = function(arg0) { | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) { | ||
@@ -714,15 +727,2 @@ const obj = getObject(arg1); | ||
}; | ||
imports.wbg.__wbindgen_cb_drop = function(arg0) { | ||
const obj = takeObject(arg0).original; | ||
if (obj.cnt-- == 1) { | ||
obj.a = 0; | ||
return true; | ||
} | ||
const ret = false; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_f139361aad331bd0 = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -911,4 +911,4 @@ const ret = new Error(); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper739 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 237, __wbg_adapter_22); | ||
imports.wbg.__wbindgen_closure_wrapper743 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 241, __wbg_adapter_22); | ||
return addHeapObject(ret); | ||
@@ -915,0 +915,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
4046903