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
403
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.6.0-7bad243 to 0.6.0-905d39d

4

nodejs/noir_wasm_bg.wasm.d.ts
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
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): number;
export function init_log_level(a: number, b: number): void;
export function build_info(): number;
export function __wbindgen_export_0(a: number): number;

@@ -10,0 +10,0 @@ export function __wbindgen_export_1(a: number, b: number, c: number): number;

/* tslint:disable */
/* eslint-disable */
/**
* @param {string} level
*/
export function init_log_level(level: string): void;
/**
* @returns {any}
*/
export function build_info(): any;
/**
* @param {Uint8Array} bytes

@@ -18,9 +26,1 @@ * @returns {any}

export function compile(args: any): any;
/**
* @param {string} level
*/
export function init_log_level(level: string): void;
/**
* @returns {any}
*/
export function build_info(): any;

@@ -41,2 +41,3 @@ let imports = {};

function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));

@@ -75,3 +76,3 @@ }

const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length);
const ptr = malloc(buf.length) >>> 0;
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);

@@ -83,3 +84,3 @@ WASM_VECTOR_LEN = buf.length;

let len = arg.length;
let ptr = malloc(len);
let ptr = malloc(len) >>> 0;

@@ -100,3 +101,3 @@ const mem = getUint8Memory0();

}
ptr = realloc(ptr, len, len = offset + arg.length * 3);
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);

@@ -124,5 +125,21 @@ const ret = encodeString(arg, view);

}
/**
* @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 passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1);
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);

@@ -144,2 +161,3 @@ WASM_VECTOR_LEN = arg.length;

function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);

@@ -157,5 +175,5 @@ }

var r1 = getInt32Memory0()[retptr / 4 + 1];
var v0 = getArrayU8FromWasm0(r0, r1).slice();
var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_2(r0, r1 * 1);
return v0;
return v1;
} finally {

@@ -175,19 +193,2 @@ wasm.__wbindgen_add_to_stack_pointer(16);

/**
* @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 handleError(f, args) {

@@ -227,13 +228,17 @@ try {

const ret = getObject(arg1).stack;
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
let deferred0_0;
let deferred0_1;
try {
deferred0_0 = arg0;
deferred0_1 = arg1;
console.error(getStringFromWasm0(arg0, arg1));
} finally {
wasm.__wbindgen_export_2(arg0, arg1);
wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
}

@@ -244,29 +249,29 @@ };

const ret = read_file(getStringFromWasm0(arg1, arg2));
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
}, arguments) };
module.exports.__wbg_debug_7960d327fd96f71a = function(arg0, arg1, arg2, arg3) {
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
module.exports.__wbg_error_fe807da27c4a4ced = function(arg0) {
module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
console.error(getObject(arg0));
};
module.exports.__wbg_error_fd84ca2a8a977774 = 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_5566be377f5b52ae = 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_7b690f184ae4519b = 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_48cbddced45e5414 = 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));

@@ -278,9 +283,9 @@ };

const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
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_parse_3ac95b51fc312db8 = function() { return handleError(function (arg0, arg1) {
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));

@@ -290,3 +295,3 @@ return addHeapObject(ret);

module.exports.__wbg_stringify_029a979dfb73aa17 = function() { return handleError(function (arg0) {
module.exports.__wbg_stringify_d06ad2addc54d51e = function() { return handleError(function (arg0) {
const ret = JSON.stringify(getObject(arg0));

@@ -293,0 +298,0 @@ return addHeapObject(ret);

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

],
"version": "0.6.0-7bad243",
"version": "0.6.0-905d39d",
"files": [

@@ -25,4 +25,4 @@ "nodejs",

"compiler": {
"versionHash": "7bad243f2da93337afdddd832dd6467c8c8ddfb2"
"versionHash": "905d39d84d34504e3052774f4d0f92e5f01643f5"
}
}
# Noir Lang WASM JavaScript Package
This JavaScript package enables users to compile a Noir program, i.e. generating its artifacts.
The package also handles dependency management like how Nargo (Noir's CLI tool) opreates, but the package is used just for compilation, not proving, verifying and simulating functions.
## Tracks
Noir lang Repository [noir-lang/noir@7bad243](https://github.com/noir-lang/noir/tree/7bad243f2da93337afdddd832dd6467c8c8ddfb2)
Noir lang Repository [noir-lang/noir@905d39d](https://github.com/noir-lang/noir/tree/905d39d84d34504e3052774f4d0f92e5f01643f5)
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
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): number;
export function init_log_level(a: number, b: number): void;
export function build_info(): number;
export function __wbindgen_export_0(a: number): number;

@@ -10,0 +10,0 @@ export function __wbindgen_export_1(a: number, b: number, c: number): number;

/* tslint:disable */
/* eslint-disable */
/**
* @param {string} level
*/
export function init_log_level(level: string): void;
/**
* @returns {any}
*/
export function build_info(): any;
/**
* @param {Uint8Array} bytes

@@ -18,10 +26,2 @@ * @returns {any}

export function compile(args: any): any;
/**
* @param {string} level
*/
export function init_log_level(level: string): void;
/**
* @returns {any}
*/
export function build_info(): any;

@@ -32,7 +32,7 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

readonly memory: WebAssembly.Memory;
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) => number;
readonly init_log_level: (a: number, b: number) => void;
readonly build_info: () => number;
readonly __wbindgen_export_0: (a: number) => number;

@@ -64,2 +64,2 @@ readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;

*/
export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;

@@ -25,5 +25,5 @@ import { read_file } from '@noir-lang/noir-source-resolver';

const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
cachedTextDecoder.decode();
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };

@@ -40,2 +40,3 @@ let cachedUint8Memory0 = null;

function getStringFromWasm0(ptr, len) {
ptr = ptr >>> 0;
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));

@@ -55,3 +56,3 @@ }

const cachedTextEncoder = new TextEncoder('utf-8');
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );

@@ -75,3 +76,3 @@ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'

const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length);
const ptr = malloc(buf.length) >>> 0;
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);

@@ -83,3 +84,3 @@ WASM_VECTOR_LEN = buf.length;

let len = arg.length;
let ptr = malloc(len);
let ptr = malloc(len) >>> 0;

@@ -100,3 +101,3 @@ const mem = getUint8Memory0();

}
ptr = realloc(ptr, len, len = offset + arg.length * 3);
ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);

@@ -124,5 +125,21 @@ const ret = encodeString(arg, view);

}
/**
* @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);
}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1);
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);

@@ -144,2 +161,3 @@ WASM_VECTOR_LEN = arg.length;

function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);

@@ -157,5 +175,5 @@ }

var r1 = getInt32Memory0()[retptr / 4 + 1];
var v0 = getArrayU8FromWasm0(r0, r1).slice();
var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_2(r0, r1 * 1);
return v0;
return v1;
} finally {

@@ -175,19 +193,2 @@ wasm.__wbindgen_add_to_stack_pointer(16);

/**
* @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);
}
function handleError(f, args) {

@@ -201,3 +202,3 @@ try {

async function load(module, imports) {
async function __wbg_load(module, imports) {
if (typeof Response === 'function' && module instanceof Response) {

@@ -233,3 +234,3 @@ if (typeof WebAssembly.instantiateStreaming === 'function') {

function getImports() {
function __wbg_get_imports() {
const imports = {};

@@ -258,12 +259,16 @@ imports.wbg = {};

const ret = getObject(arg1).stack;
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
};
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
let deferred0_0;
let deferred0_1;
try {
deferred0_0 = arg0;
deferred0_1 = arg1;
console.error(getStringFromWasm0(arg0, arg1));
} finally {
wasm.__wbindgen_export_2(arg0, arg1);
wasm.__wbindgen_export_2(deferred0_0, deferred0_1);
}

@@ -273,23 +278,23 @@ };

const ret = read_file(getStringFromWasm0(arg1, arg2));
const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
}, arguments) };
imports.wbg.__wbg_debug_7960d327fd96f71a = function(arg0, arg1, arg2, arg3) {
imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
};
imports.wbg.__wbg_error_fe807da27c4a4ced = function(arg0) {
imports.wbg.__wbg_error_a7e23606158b68b9 = function(arg0) {
console.error(getObject(arg0));
};
imports.wbg.__wbg_error_fd84ca2a8a977774 = 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_5566be377f5b52ae = 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_7b690f184ae4519b = 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_48cbddced45e5414 = 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));

@@ -300,12 +305,12 @@ };

const ret = typeof(obj) === 'string' ? obj : undefined;
var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
var len0 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
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_parse_3ac95b51fc312db8 = function() { return handleError(function (arg0, arg1) {
imports.wbg.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_stringify_029a979dfb73aa17 = function() { return handleError(function (arg0) {
imports.wbg.__wbg_stringify_d06ad2addc54d51e = function() { return handleError(function (arg0) {
const ret = JSON.stringify(getObject(arg0));

@@ -321,9 +326,9 @@ return addHeapObject(ret);

function initMemory(imports, maybe_memory) {
function __wbg_init_memory(imports, maybe_memory) {
}
function finalizeInit(instance, module) {
function __wbg_finalize_init(instance, module) {
wasm = instance.exports;
init.__wbindgen_wasm_module = module;
__wbg_init.__wbindgen_wasm_module = module;
cachedInt32Memory0 = null;

@@ -337,6 +342,8 @@ cachedUint8Memory0 = null;

function initSync(module) {
const imports = getImports();
if (wasm !== undefined) return wasm;
initMemory(imports);
const imports = __wbg_get_imports();
__wbg_init_memory(imports);
if (!(module instanceof WebAssembly.Module)) {

@@ -348,10 +355,12 @@ module = new WebAssembly.Module(module);

return finalizeInit(instance, module);
return __wbg_finalize_init(instance, module);
}
async function init(input) {
async function __wbg_init(input) {
if (wasm !== undefined) return wasm;
if (typeof input === 'undefined') {
input = new URL('noir_wasm_bg.wasm', import.meta.url);
}
const imports = getImports();
const imports = __wbg_get_imports();

@@ -362,10 +371,10 @@ if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {

initMemory(imports);
__wbg_init_memory(imports);
const { instance, module } = await load(await input, imports);
const { instance, module } = await __wbg_load(await input, imports);
return finalizeInit(instance, module);
return __wbg_finalize_init(instance, module);
}
export { initSync }
export default init;
export default __wbg_init;

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