Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@noir-lang/noir_wasm

Package Overview
Dependencies
Maintainers
1
Versions
394
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noir-lang/noir_wasm - npm Package Compare versions

Comparing version 0.16.0-1b40af8c1 to 0.16.0-20a160c

10

nodejs/noir_wasm_bg.wasm.d.ts
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function compile(a: number): number;
export function acir_read_bytes(a: number, b: number): number;
export function acir_write_bytes(a: number, b: number): void;
export function init_log_level(a: number, b: number): void;
export function build_info(): number;
export function acir_read_bytes(a: number, b: number): number;
export function acir_write_bytes(a: number, b: number): void;
export function compile(a: number, b: number, c: number, d: number, e: number): void;
export function __wbindgen_export_0(a: number): number;
export function __wbindgen_export_1(a: number, b: number, c: number): number;
export function __wbindgen_export_2(a: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_export_3(a: number, b: number): void;
export function __wbindgen_export_2(a: number, b: number): void;
export function __wbindgen_export_3(a: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* @param {any} args
* @param {Uint8Array} bytes
* @returns {any}
*/
export function compile(args: any): any;
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;
/**
* @param {string} level

@@ -17,10 +22,11 @@ */

/**
* @param {Uint8Array} bytes
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {string[] | undefined} dependencies
* @returns {any}
*/
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;
export function compile(entry_point: string, contracts?: boolean, dependencies?: string[]): any;
export type CompileError = Error;

@@ -5,3 +5,3 @@ let imports = {};

const { read_file } = require(`@noir-lang/source-resolver`);
const { TextDecoder, TextEncoder } = require(`util`);
const { TextEncoder, TextDecoder } = require(`util`);

@@ -14,20 +14,4 @@ const heap = new Array(128).fill(undefined);

let heap_next = heap.length;
let WASM_VECTOR_LEN = 0;
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 });
cachedTextDecoder.decode();
let cachedUint8Memory0 = null;

@@ -42,18 +26,2 @@

function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
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;
let cachedTextEncoder = new TextEncoder('utf-8');

@@ -124,35 +92,35 @@

}
/**
* @param {any} args
* @returns {any}
*/
module.exports.compile = function(args) {
const ret = wasm.compile(addHeapObject(args));
return takeObject(ret);
};
function handleError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
wasm.__wbindgen_export_2(addHeapObject(e));
}
let heap_next = heap.length;
function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}
/**
* @param {string} level
*/
module.exports.init_log_level = function(level) {
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.init_log_level(ptr0, len0);
};
/**
* @returns {any}
*/
module.exports.build_info = function() {
const ret = wasm.build_info();
return takeObject(ret);
};
function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
function passArray8ToWasm0(arg, malloc) {

@@ -190,3 +158,3 @@ const ptr = malloc(arg.length * 1) >>> 0;

var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_3(r0, r1 * 1);
wasm.__wbindgen_export_2(r0, r1 * 1);
return v1;

@@ -198,12 +166,60 @@ } finally {

module.exports.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
/**
* @param {string} level
*/
module.exports.init_log_level = function(level) {
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.init_log_level(ptr0, len0);
};
module.exports.__wbindgen_is_null = function(arg0) {
const ret = getObject(arg0) === null;
return ret;
/**
* @returns {any}
*/
module.exports.build_info = function() {
const ret = wasm.build_info();
return takeObject(ret);
};
/**
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {string[] | undefined} dependencies
* @returns {any}
*/
module.exports.compile = function(entry_point, contracts, dependencies) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependencies) ? 0 : addHeapObject(dependencies));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
function handleError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
wasm.__wbindgen_export_3(addHeapObject(e));
}
}
module.exports.__wbindgen_string_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
var len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
module.exports.__wbindgen_object_drop_ref = function(arg0) {

@@ -213,2 +229,12 @@ takeObject(arg0);

module.exports.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
module.exports.__wbg_constructor_ac1f808f67a5f1e9 = function(arg0) {
const ret = new Error(takeObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_readfile_0c1777c7c5aa8c92 = function() { return handleError(function (arg0, arg1, arg2) {

@@ -248,3 +274,3 @@ const ret = read_file(getStringFromWasm0(arg1, arg2));

} finally {
wasm.__wbindgen_export_3(deferred0_0, deferred0_1);
wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
}

@@ -277,11 +303,12 @@ };

module.exports.__wbindgen_string_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
var len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
const ret = getObject(arg0)[arg1 >>> 0];
return addHeapObject(ret);
};
module.exports.__wbg_length_820c786973abdd8a = function(arg0) {
const ret = getObject(arg0).length;
return ret;
};
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {

@@ -288,0 +315,0 @@ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

@@ -6,3 +6,3 @@ {

],
"version": "0.16.0-1b40af8c1",
"version": "0.16.0-20a160c",
"license": "(MIT OR Apache-2.0)",

@@ -33,3 +33,3 @@ "main": "./nodejs/noir_wasm.js",

"peerDependencies": {
"@noir-lang/source-resolver": "0.16.0-1b40af8c1"
"@noir-lang/source-resolver": "0.16.0-20a160c"
},

@@ -36,0 +36,0 @@ "devDependencies": {

/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function compile(a: number): number;
export function acir_read_bytes(a: number, b: number): number;
export function acir_write_bytes(a: number, b: number): void;
export function init_log_level(a: number, b: number): void;
export function build_info(): number;
export function acir_read_bytes(a: number, b: number): number;
export function acir_write_bytes(a: number, b: number): void;
export function compile(a: number, b: number, c: number, d: number, e: number): void;
export function __wbindgen_export_0(a: number): number;
export function __wbindgen_export_1(a: number, b: number, c: number): number;
export function __wbindgen_export_2(a: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_export_3(a: number, b: number): void;
export function __wbindgen_export_2(a: number, b: number): void;
export function __wbindgen_export_3(a: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* @param {any} args
* @param {Uint8Array} bytes
* @returns {any}
*/
export function compile(args: any): any;
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;
/**
* @param {string} level

@@ -17,12 +22,13 @@ */

/**
* @param {Uint8Array} bytes
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {string[] | undefined} dependencies
* @returns {any}
*/
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;
export function compile(entry_point: string, contracts?: boolean, dependencies?: string[]): any;
export type CompileError = Error;
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

@@ -32,12 +38,12 @@

readonly memory: WebAssembly.Memory;
readonly compile: (a: number) => number;
readonly acir_read_bytes: (a: number, b: number) => number;
readonly acir_write_bytes: (a: number, b: number) => void;
readonly init_log_level: (a: number, b: number) => void;
readonly build_info: () => number;
readonly acir_read_bytes: (a: number, b: number) => number;
readonly acir_write_bytes: (a: number, b: number) => void;
readonly compile: (a: number, b: number, c: number, d: number, e: number) => void;
readonly __wbindgen_export_0: (a: number) => number;
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
readonly __wbindgen_export_2: (a: number) => void;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_export_3: (a: number, b: number) => void;
readonly __wbindgen_export_2: (a: number, b: number) => void;
readonly __wbindgen_export_3: (a: number) => void;
}

@@ -44,0 +50,0 @@

@@ -11,20 +11,4 @@ import { read_file } from '@noir-lang/source-resolver';

let heap_next = heap.length;
let WASM_VECTOR_LEN = 0;
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') } } );
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
let cachedUint8Memory0 = null;

@@ -39,18 +23,2 @@

function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
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;
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );

@@ -121,33 +89,33 @@

}
/**
* @param {any} args
* @returns {any}
*/
export function compile(args) {
const ret = wasm.compile(addHeapObject(args));
return takeObject(ret);
let heap_next = heap.length;
function dropObject(idx) {
if (idx < 132) return;
heap[idx] = heap_next;
heap_next = idx;
}
function handleError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
wasm.__wbindgen_export_2(addHeapObject(e));
}
function takeObject(idx) {
const ret = getObject(idx);
dropObject(idx);
return ret;
}
/**
* @param {string} level
*/
export function init_log_level(level) {
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.init_log_level(ptr0, len0);
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
/**
* @returns {any}
*/
export function build_info() {
const ret = wasm.build_info();
return takeObject(ret);
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;
}

@@ -187,3 +155,3 @@

var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_3(r0, r1 * 1);
wasm.__wbindgen_export_2(r0, r1 * 1);
return v1;

@@ -195,2 +163,51 @@ } finally {

/**
* @param {string} level
*/
export function init_log_level(level) {
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.init_log_level(ptr0, len0);
}
/**
* @returns {any}
*/
export function build_info() {
const ret = wasm.build_info();
return takeObject(ret);
}
/**
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {string[] | undefined} dependencies
* @returns {any}
*/
export function compile(entry_point, contracts, dependencies) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
wasm.compile(retptr, ptr0, len0, isLikeNone(contracts) ? 0xFFFFFF : contracts ? 1 : 0, isLikeNone(dependencies) ? 0 : addHeapObject(dependencies));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
function handleError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
wasm.__wbindgen_export_3(addHeapObject(e));
}
}
async function __wbg_load(module, imports) {

@@ -230,2 +247,13 @@ if (typeof Response === 'function' && module instanceof Response) {

imports.wbg = {};
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
var len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbindgen_is_undefined = function(arg0) {

@@ -235,9 +263,6 @@ const ret = getObject(arg0) === undefined;

};
imports.wbg.__wbindgen_is_null = function(arg0) {
const ret = getObject(arg0) === null;
return ret;
imports.wbg.__wbg_constructor_ac1f808f67a5f1e9 = function(arg0) {
const ret = new Error(takeObject(arg0));
return addHeapObject(ret);
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbg_readfile_0c1777c7c5aa8c92 = function() { return handleError(function (arg0, arg1, arg2) {

@@ -273,3 +298,3 @@ const ret = read_file(getStringFromWasm0(arg1, arg2));

} finally {
wasm.__wbindgen_export_3(deferred0_0, deferred0_1);
wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
}

@@ -295,10 +320,10 @@ };

};
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
const obj = getObject(arg1);
const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
var len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
imports.wbg.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
const ret = getObject(arg0)[arg1 >>> 0];
return addHeapObject(ret);
};
imports.wbg.__wbg_length_820c786973abdd8a = function(arg0) {
const ret = getObject(arg0).length;
return ret;
};
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {

@@ -305,0 +330,0 @@ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc