@noir-lang/noirc_abi
Advanced tools
Comparing version 0.16.0-1b40af8c1 to 0.16.0-20a160c
@@ -10,3 +10,3 @@ /* tslint:disable */ | ||
export function __wbindgen_free(a: number, b: number): void; | ||
export function wasm_bindgen__convert__closures__invoke2_mut__h640c0c6add9d0132(a: number, b: number, c: number, d: number): void; | ||
export function wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(a: number, b: number, c: number, d: number): void; | ||
export function __wbindgen_exn_store(a: number): void; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {any} abi | ||
* @param {any} inputs | ||
* @param {any} return_value | ||
* @param {Abi} abi | ||
* @param {InputMap} inputs | ||
* @param {InputValue | undefined} return_value | ||
* @returns {WitnessMap} | ||
*/ | ||
export function abiEncode(abi: any, inputs: any, return_value: any): WitnessMap; | ||
export function abiEncode(abi: Abi, inputs: InputMap, return_value?: InputValue): WitnessMap; | ||
/** | ||
* @param {any} abi | ||
* @param {Abi} abi | ||
* @param {WitnessMap} witness_map | ||
* @returns {any} | ||
*/ | ||
export function abiDecode(abi: any, witness_map: WitnessMap): any; | ||
export function abiDecode(abi: Abi, witness_map: WitnessMap): any; | ||
export type Field = string | number | boolean; | ||
export type InputValue = Field | Field[] | InputMap; | ||
export type InputMap = { [key: string]: InputValue }; | ||
export type Visibility = "public" | "private"; | ||
export type Sign = "unsigned" | "signed"; | ||
export type AbiType = | ||
{ kind: "field" } | | ||
{ kind: "boolean" } | | ||
{ kind: "string", length: number } | | ||
{ kind: "integer", sign: Sign, width: number } | | ||
{ kind: "array", length: number, type: AbiType } | | ||
{ kind: "tuple", fields: AbiType[] } | | ||
{ kind: "struct", path: string, fields: [string, AbiType][] }; | ||
export type AbiParameter = { | ||
name: string, | ||
type: AbiType, | ||
visibility: Visibility, | ||
}; | ||
export type Abi = { | ||
parameters: AbiParameter[], | ||
param_witnesses: Record<string, number[]>, | ||
return_type: AbiType | null, | ||
return_witnesses: number[], | ||
} | ||
// Map from witness index to hex string value of witness. | ||
@@ -18,0 +50,0 @@ export type WitnessMap = Map<number, string>; |
@@ -12,24 +12,2 @@ let imports = {}; | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
let cachedFloat64Memory0 = null; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
let heap_next = heap.length; | ||
@@ -58,2 +36,24 @@ | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
let cachedFloat64Memory0 = null; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -132,5 +132,5 @@ | ||
/** | ||
* @param {any} abi | ||
* @param {any} inputs | ||
* @param {any} return_value | ||
* @param {Abi} abi | ||
* @param {InputMap} inputs | ||
* @param {InputValue | undefined} return_value | ||
* @returns {WitnessMap} | ||
@@ -141,3 +141,3 @@ */ | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), addHeapObject(return_value)); | ||
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), isLikeNone(return_value) ? 0 : addHeapObject(return_value)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -156,3 +156,3 @@ var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
/** | ||
* @param {any} abi | ||
* @param {Abi} abi | ||
* @param {WitnessMap} witness_map | ||
@@ -177,4 +177,4 @@ * @returns {any} | ||
function __wbg_adapter_28(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h640c0c6add9d0132(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
function __wbg_adapter_26(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -190,9 +190,2 @@ | ||
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_object_drop_ref = function(arg0) { | ||
@@ -202,2 +195,7 @@ takeObject(arg0); | ||
module.exports.__wbg_constructor_ee715a20a6d6befb = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbg_new_b88faf1d36aaeaaf = function() { | ||
@@ -213,2 +211,9 @@ const ret = new Map(); | ||
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_string_get = function(arg0, arg1) { | ||
@@ -223,7 +228,2 @@ const obj = getObject(arg1); | ||
module.exports.__wbg_constructor_ee715a20a6d6befb = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
module.exports.__wbindgen_is_undefined = function(arg0) { | ||
@@ -234,7 +234,2 @@ const ret = getObject(arg0) === undefined; | ||
module.exports.__wbindgen_is_null = function(arg0) { | ||
const ret = getObject(arg0) === null; | ||
return ret; | ||
}; | ||
module.exports.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -277,3 +272,3 @@ const ret = new Error(); | ||
try { | ||
return __wbg_adapter_28(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_26(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -280,0 +275,0 @@ state0.a = a; |
@@ -6,3 +6,3 @@ { | ||
], | ||
"version": "0.16.0-1b40af8c1", | ||
"version": "0.16.0-20a160c", | ||
"license": "(MIT OR Apache-2.0)", | ||
@@ -9,0 +9,0 @@ "files": [ |
@@ -10,3 +10,3 @@ /* tslint:disable */ | ||
export function __wbindgen_free(a: number, b: number): void; | ||
export function wasm_bindgen__convert__closures__invoke2_mut__h640c0c6add9d0132(a: number, b: number, c: number, d: number): void; | ||
export function wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(a: number, b: number, c: number, d: number): void; | ||
export function __wbindgen_exn_store(a: number): void; |
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* @param {any} abi | ||
* @param {any} inputs | ||
* @param {any} return_value | ||
* @param {Abi} abi | ||
* @param {InputMap} inputs | ||
* @param {InputValue | undefined} return_value | ||
* @returns {WitnessMap} | ||
*/ | ||
export function abiEncode(abi: any, inputs: any, return_value: any): WitnessMap; | ||
export function abiEncode(abi: Abi, inputs: InputMap, return_value?: InputValue): WitnessMap; | ||
/** | ||
* @param {any} abi | ||
* @param {Abi} abi | ||
* @param {WitnessMap} witness_map | ||
* @returns {any} | ||
*/ | ||
export function abiDecode(abi: any, witness_map: WitnessMap): any; | ||
export function abiDecode(abi: Abi, witness_map: WitnessMap): any; | ||
export type Field = string | number | boolean; | ||
export type InputValue = Field | Field[] | InputMap; | ||
export type InputMap = { [key: string]: InputValue }; | ||
export type Visibility = "public" | "private"; | ||
export type Sign = "unsigned" | "signed"; | ||
export type AbiType = | ||
{ kind: "field" } | | ||
{ kind: "boolean" } | | ||
{ kind: "string", length: number } | | ||
{ kind: "integer", sign: Sign, width: number } | | ||
{ kind: "array", length: number, type: AbiType } | | ||
{ kind: "tuple", fields: AbiType[] } | | ||
{ kind: "struct", path: string, fields: [string, AbiType][] }; | ||
export type AbiParameter = { | ||
name: string, | ||
type: AbiType, | ||
visibility: Visibility, | ||
}; | ||
export type Abi = { | ||
parameters: AbiParameter[], | ||
param_witnesses: Record<string, number[]>, | ||
return_type: AbiType | null, | ||
return_witnesses: number[], | ||
} | ||
// Map from witness index to hex string value of witness. | ||
@@ -36,3 +68,3 @@ export type WitnessMap = Map<number, string>; | ||
readonly __wbindgen_free: (a: number, b: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke2_mut__h640c0c6add9d0132: (a: number, b: number, c: number, d: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9: (a: number, b: number, c: number, d: number) => void; | ||
readonly __wbindgen_exn_store: (a: number) => void; | ||
@@ -39,0 +71,0 @@ } |
@@ -9,24 +9,2 @@ let wasm; | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
let cachedFloat64Memory0 = null; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
let heap_next = heap.length; | ||
@@ -55,2 +33,24 @@ | ||
function isLikeNone(x) { | ||
return x === undefined || x === null; | ||
} | ||
let cachedFloat64Memory0 = null; | ||
function getFloat64Memory0() { | ||
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { | ||
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); | ||
} | ||
return cachedFloat64Memory0; | ||
} | ||
let cachedInt32Memory0 = null; | ||
function getInt32Memory0() { | ||
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { | ||
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); | ||
} | ||
return cachedInt32Memory0; | ||
} | ||
let WASM_VECTOR_LEN = 0; | ||
@@ -129,5 +129,5 @@ | ||
/** | ||
* @param {any} abi | ||
* @param {any} inputs | ||
* @param {any} return_value | ||
* @param {Abi} abi | ||
* @param {InputMap} inputs | ||
* @param {InputValue | undefined} return_value | ||
* @returns {WitnessMap} | ||
@@ -138,3 +138,3 @@ */ | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), addHeapObject(return_value)); | ||
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), isLikeNone(return_value) ? 0 : addHeapObject(return_value)); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
@@ -153,3 +153,3 @@ var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
/** | ||
* @param {any} abi | ||
* @param {Abi} abi | ||
* @param {WitnessMap} witness_map | ||
@@ -174,4 +174,4 @@ * @returns {any} | ||
function __wbg_adapter_28(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h640c0c6add9d0132(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
function __wbg_adapter_26(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -221,11 +221,9 @@ | ||
imports.wbg = {}; | ||
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_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbg_constructor_ee715a20a6d6befb = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_b88faf1d36aaeaaf = function() { | ||
@@ -239,2 +237,8 @@ const ret = new Map(); | ||
}; | ||
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_string_get = function(arg0, arg1) { | ||
@@ -248,6 +252,2 @@ const obj = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_constructor_ee715a20a6d6befb = function(arg0) { | ||
const ret = new Error(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_undefined = function(arg0) { | ||
@@ -257,6 +257,2 @@ const ret = getObject(arg0) === undefined; | ||
}; | ||
imports.wbg.__wbindgen_is_null = function(arg0) { | ||
const ret = getObject(arg0) === null; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_abda76e883ba8a5f = function() { | ||
@@ -295,3 +291,3 @@ const ret = new Error(); | ||
try { | ||
return __wbg_adapter_28(a, state0.b, arg0, arg1); | ||
return __wbg_adapter_26(a, state0.b, arg0, arg1); | ||
} finally { | ||
@@ -298,0 +294,0 @@ state0.a = a; |
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
828627
684
3