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.18.0-2c9fe26.nightly to 0.18.0-3d5e43a.nightly

8

nodejs/noir_wasm_bg.wasm.d.ts
/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
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 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 __wbindgen_export_0(a: number): number;
export function __wbindgen_export_1(a: number, b: number, c: number): number;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_export_2(a: number, b: number): void;
export function __wbindgen_export_3(a: number): void;
export function __wbindgen_export_2(a: number): void;
export function __wbindgen_export_3(a: number, b: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;
/**
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {DependencyGraph | undefined} dependency_graph
* @returns {any}
* @returns {CompileResult}
*/
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): CompileResult;
/**

@@ -28,2 +18,12 @@ * @param {string} level

export function build_info(): any;
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;

@@ -52,2 +52,34 @@ export type Diagnostic = {

export type CompiledContract = {
noir_version: string;
name: string;
backend: string;
functions: Array<any>;
events: Array<any>;
};
export type CompiledProgram = {
noir_version: string;
backend: string;
abi: any;
bytecode: string;
}
export type DebugArtifact = {
debug_symbols: Array<any>;
file_map: Record<number, any>;
warnings: Array<any>;
};
export type CompileResult = (
| {
contract: CompiledContract;
debug: DebugArtifact;
}
| {
program: CompiledProgram;
debug: DebugArtifact;
}
);

@@ -186,47 +186,7 @@ let imports = {};

}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
module.exports.acir_read_bytes = function(bytes) {
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.acir_read_bytes(ptr0, len0);
return takeObject(ret);
};
function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
}
/**
* @param {any} acir
* @returns {Uint8Array}
*/
module.exports.acir_write_bytes = function(acir) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.acir_write_bytes(retptr, addHeapObject(acir));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_2(r0, r1 * 1);
return v1;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
/**
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {DependencyGraph | undefined} dependency_graph
* @returns {any}
* @returns {CompileResult}
*/

@@ -255,3 +215,3 @@ module.exports.compile = function(entry_point, contracts, dependency_graph) {

} catch (e) {
wasm.__wbindgen_export_3(addHeapObject(e));
wasm.__wbindgen_export_2(addHeapObject(e));
}

@@ -276,2 +236,46 @@ }

function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
module.exports.acir_read_bytes = function(bytes) {
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.acir_read_bytes(ptr0, len0);
return takeObject(ret);
};
function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
}
/**
* @param {any} acir
* @returns {Uint8Array}
*/
module.exports.acir_write_bytes = function(acir) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.acir_write_bytes(retptr, addHeapObject(acir));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_3(r0, r1 * 1);
return v1;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
};
module.exports.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
module.exports.__wbindgen_object_drop_ref = function(arg0) {

@@ -286,5 +290,5 @@ takeObject(arg0);

module.exports.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
module.exports.__wbg_constructor_e29c95824faa216c = function() {
const ret = new Object();
return addHeapObject(ret);
};

@@ -326,3 +330,3 @@

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

@@ -329,0 +333,0 @@ };

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

],
"version": "0.18.0-2c9fe26.nightly",
"version": "0.18.0-3d5e43a.nightly",
"license": "(MIT OR Apache-2.0)",

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

"peerDependencies": {
"@noir-lang/source-resolver": "0.18.0-2c9fe26.nightly"
"@noir-lang/source-resolver": "0.18.0-3d5e43a.nightly"
},

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

/* tslint:disable */
/* eslint-disable */
export const memory: WebAssembly.Memory;
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 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 __wbindgen_export_0(a: number): number;
export function __wbindgen_export_1(a: number, b: number, c: number): number;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_export_2(a: number, b: number): void;
export function __wbindgen_export_3(a: number): void;
export function __wbindgen_export_2(a: number): void;
export function __wbindgen_export_3(a: number, b: number): void;
/* tslint:disable */
/* eslint-disable */
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;
/**
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {DependencyGraph | undefined} dependency_graph
* @returns {any}
* @returns {CompileResult}
*/
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): CompileResult;
/**

@@ -28,2 +18,12 @@ * @param {string} level

export function build_info(): any;
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
export function acir_read_bytes(bytes: Uint8Array): any;
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir: any): Uint8Array;

@@ -52,4 +52,36 @@ export type Diagnostic = {

export type CompiledContract = {
noir_version: string;
name: string;
backend: string;
functions: Array<any>;
events: Array<any>;
};
export type CompiledProgram = {
noir_version: string;
backend: string;
abi: any;
bytecode: string;
}
export type DebugArtifact = {
debug_symbols: Array<any>;
file_map: Record<number, any>;
warnings: Array<any>;
};
export type CompileResult = (
| {
contract: CompiledContract;
debug: DebugArtifact;
}
| {
program: CompiledProgram;
debug: DebugArtifact;
}
);
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

@@ -59,12 +91,12 @@

readonly memory: WebAssembly.Memory;
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 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 __wbindgen_export_0: (a: number) => number;
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_export_2: (a: number, b: number) => void;
readonly __wbindgen_export_3: (a: number) => void;
readonly __wbindgen_export_2: (a: number) => void;
readonly __wbindgen_export_3: (a: number, b: number) => void;
}

@@ -71,0 +103,0 @@

@@ -184,47 +184,7 @@ import { read_file } from '@noir-lang/source-resolver';

}
function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
export function acir_read_bytes(bytes) {
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.acir_read_bytes(ptr0, len0);
return takeObject(ret);
}
function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
}
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.acir_write_bytes(retptr, addHeapObject(acir));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_2(r0, r1 * 1);
return v1;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
/**
* @param {string} entry_point
* @param {boolean | undefined} contracts
* @param {DependencyGraph | undefined} dependency_graph
* @returns {any}
* @returns {CompileResult}
*/

@@ -253,3 +213,3 @@ export function compile(entry_point, contracts, dependency_graph) {

} catch (e) {
wasm.__wbindgen_export_3(addHeapObject(e));
wasm.__wbindgen_export_2(addHeapObject(e));
}

@@ -274,2 +234,41 @@ }

function passArray8ToWasm0(arg, malloc) {
const ptr = malloc(arg.length * 1) >>> 0;
getUint8Memory0().set(arg, ptr / 1);
WASM_VECTOR_LEN = arg.length;
return ptr;
}
/**
* @param {Uint8Array} bytes
* @returns {any}
*/
export function acir_read_bytes(bytes) {
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
const len0 = WASM_VECTOR_LEN;
const ret = wasm.acir_read_bytes(ptr0, len0);
return takeObject(ret);
}
function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
}
/**
* @param {any} acir
* @returns {Uint8Array}
*/
export function acir_write_bytes(acir) {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.acir_write_bytes(retptr, addHeapObject(acir));
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var v1 = getArrayU8FromWasm0(r0, r1).slice();
wasm.__wbindgen_export_3(r0, r1 * 1);
return v1;
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}
async function __wbg_load(module, imports) {

@@ -309,2 +308,6 @@ if (typeof Response === 'function' && module instanceof Response) {

imports.wbg = {};
imports.wbg.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
};
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {

@@ -317,5 +320,5 @@ takeObject(arg0);

};
imports.wbg.__wbindgen_is_undefined = function(arg0) {
const ret = getObject(arg0) === undefined;
return ret;
imports.wbg.__wbg_constructor_e29c95824faa216c = function() {
const ret = new Object();
return addHeapObject(ret);
};

@@ -352,3 +355,3 @@ imports.wbg.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {

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

@@ -355,0 +358,0 @@ };

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