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

@noir-lang/noirc_abi

Package Overview
Dependencies
Maintainers
1
Versions
279
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noir-lang/noirc_abi - npm Package Compare versions

Comparing version 0.16.0-20a160c to 0.16.0-38acee5.aztec

44

nodejs/noirc_abi_wasm.d.ts
/* tslint:disable */
/* eslint-disable */
/**
* @param {Abi} abi
* @param {InputMap} inputs
* @param {InputValue | undefined} return_value
* @param {any} abi
* @param {any} inputs
* @param {any} return_value
* @returns {WitnessMap}
*/
export function abiEncode(abi: Abi, inputs: InputMap, return_value?: InputValue): WitnessMap;
export function abiEncode(abi: any, inputs: any, return_value: any): WitnessMap;
/**
* @param {Abi} abi
* @param {any} abi
* @param {WitnessMap} witness_map
* @returns {any}
*/
export function abiDecode(abi: Abi, witness_map: WitnessMap): any;
export function abiDecode(abi: any, 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.

@@ -50,0 +18,0 @@ export type WitnessMap = Map<number, string>;

87

nodejs/noirc_abi_wasm.js

@@ -12,2 +12,24 @@ 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;

@@ -36,24 +58,2 @@

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 {Abi} abi
* @param {InputMap} inputs
* @param {InputValue | undefined} return_value
* @param {any} abi
* @param {any} inputs
* @param {any} return_value
* @returns {WitnessMap}

@@ -141,3 +141,3 @@ */

const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), isLikeNone(return_value) ? 0 : addHeapObject(return_value));
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), addHeapObject(return_value));
var r0 = getInt32Memory0()[retptr / 4 + 0];

@@ -156,3 +156,3 @@ var r1 = getInt32Memory0()[retptr / 4 + 1];

/**
* @param {Abi} abi
* @param {any} abi
* @param {WitnessMap} witness_map

@@ -177,3 +177,3 @@ * @returns {any}

function __wbg_adapter_26(arg0, arg1, arg2, arg3) {
function __wbg_adapter_28(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));

@@ -190,2 +190,9 @@ }

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) {

@@ -195,7 +202,2 @@ takeObject(arg0);

module.exports.__wbg_constructor_ee715a20a6d6befb = function(arg0) {
const ret = new Error(takeObject(arg0));
return addHeapObject(ret);
};
module.exports.__wbg_new_b88faf1d36aaeaaf = function() {

@@ -211,9 +213,2 @@ 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) {

@@ -228,2 +223,7 @@ 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,2 +234,7 @@ 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() {

@@ -272,3 +277,3 @@ const ret = new Error();

try {
return __wbg_adapter_26(a, state0.b, arg0, arg1);
return __wbg_adapter_28(a, state0.b, arg0, arg1);
} finally {

@@ -275,0 +280,0 @@ state0.a = a;

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

],
"version": "0.16.0-20a160c",
"version": "0.16.0-38acee5.aztec",
"license": "(MIT OR Apache-2.0)",

@@ -30,5 +30,7 @@ "files": [

"clean": "chmod u+w web nodejs || true && rm -rf ./nodejs ./web ./target ./result",
"nightly:version": "jq --arg new_version \"-$(git rev-parse --short HEAD)\" '.version = .version + $new_version' package.json > package-tmp.json && mv package-tmp.json package.json",
"nightly:version": "jq --arg new_version \"-$(git rev-parse --short HEAD)$1\" '.version = .version + $new_version' package.json > package-tmp.json && mv package-tmp.json package.json",
"publish": "echo 📡 publishing `$npm_package_name` && yarn npm publish",
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0"
"lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
"build:nix": "nix build -L .#noirc_abi_wasm",
"install:from:nix": "yarn clean && yarn build:nix && cp -rL ./result/noirc_abi_wasm/nodejs ./ && cp -rL ./result/noirc_abi_wasm/web ./"
},

@@ -35,0 +37,0 @@ "devDependencies": {

/* tslint:disable */
/* eslint-disable */
/**
* @param {Abi} abi
* @param {InputMap} inputs
* @param {InputValue | undefined} return_value
* @param {any} abi
* @param {any} inputs
* @param {any} return_value
* @returns {WitnessMap}
*/
export function abiEncode(abi: Abi, inputs: InputMap, return_value?: InputValue): WitnessMap;
export function abiEncode(abi: any, inputs: any, return_value: any): WitnessMap;
/**
* @param {Abi} abi
* @param {any} abi
* @param {WitnessMap} witness_map
* @returns {any}
*/
export function abiDecode(abi: Abi, witness_map: WitnessMap): any;
export function abiDecode(abi: any, 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.

@@ -50,0 +18,0 @@ export type WitnessMap = Map<number, string>;

@@ -9,2 +9,24 @@ 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;

@@ -33,24 +55,2 @@

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 {Abi} abi
* @param {InputMap} inputs
* @param {InputValue | undefined} return_value
* @param {any} abi
* @param {any} inputs
* @param {any} return_value
* @returns {WitnessMap}

@@ -138,3 +138,3 @@ */

const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), isLikeNone(return_value) ? 0 : addHeapObject(return_value));
wasm.abiEncode(retptr, addHeapObject(abi), addHeapObject(inputs), addHeapObject(return_value));
var r0 = getInt32Memory0()[retptr / 4 + 0];

@@ -153,3 +153,3 @@ var r1 = getInt32Memory0()[retptr / 4 + 1];

/**
* @param {Abi} abi
* @param {any} abi
* @param {WitnessMap} witness_map

@@ -174,3 +174,3 @@ * @returns {any}

function __wbg_adapter_26(arg0, arg1, arg2, arg3) {
function __wbg_adapter_28(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h345d08f7c40b28d9(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));

@@ -221,9 +221,11 @@ }

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() {

@@ -237,8 +239,2 @@ 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) {

@@ -252,2 +248,6 @@ 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,2 +257,6 @@ 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() {

@@ -291,3 +295,3 @@ const ret = new Error();

try {
return __wbg_adapter_26(a, state0.b, arg0, arg1);
return __wbg_adapter_28(a, state0.b, arg0, arg1);
} finally {

@@ -294,0 +298,0 @@ state0.a = a;

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