Socket
Socket
Sign inDemoInstall

zksync-crypto

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zksync-crypto - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

2

dist/node_bg.d.ts

@@ -7,5 +7,5 @@ /* tslint:disable */

export function private_key_to_pubkey_hash(a: number, b: number, c: number): void;
export function sign_musig_sha256(a: number, b: number, c: number, d: number, e: number): void;
export function sign_musig_rescue(a: number, b: number, c: number, d: number, e: number): void;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_free(a: number, b: number): void;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
/* tslint:disable */
/* eslint-disable */
/**
* This method initializes params for current thread, otherwise they will be initialized when signing
* first message.
*/

@@ -17,2 +19,8 @@ export function init(): void;

/**
* We use musig Schnorr signature scheme.
* It is impossible to restore signer for signature, that is why we provide public key of the signer
* along with signature.
* [0..32] - packed public key of signer.
* [32..64] - packed r point of the signature.
* [64..96] - s poing of the signature.
* @param {Uint8Array} private_key

@@ -22,2 +30,2 @@ * @param {Uint8Array} msg

*/
export function sign_musig_sha256(private_key: Uint8Array, msg: Uint8Array): Uint8Array;
export function sign_musig_rescue(private_key: Uint8Array, msg: Uint8Array): Uint8Array;

@@ -26,2 +26,4 @@ let imports = {};

/**
* This method initializes params for current thread, otherwise they will be initialized when signing
* first message.
*/

@@ -91,2 +93,8 @@ module.exports.init = function() {

/**
* We use musig Schnorr signature scheme.
* It is impossible to restore signer for signature, that is why we provide public key of the signer
* along with signature.
* [0..32] - packed public key of signer.
* [32..64] - packed r point of the signature.
* [64..96] - s poing of the signature.
* @param {Uint8Array} private_key

@@ -96,3 +104,3 @@ * @param {Uint8Array} msg

*/
module.exports.sign_musig_sha256 = function(private_key, msg) {
module.exports.sign_musig_rescue = function(private_key, msg) {
var ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);

@@ -102,3 +110,3 @@ var len0 = WASM_VECTOR_LEN;

var len1 = WASM_VECTOR_LEN;
wasm.sign_musig_sha256(8, ptr0, len0, ptr1, len1);
wasm.sign_musig_rescue(8, ptr0, len0, ptr1, len1);
var r0 = getInt32Memory0()[8 / 4 + 0];

@@ -105,0 +113,0 @@ var r1 = getInt32Memory0()[8 / 4 + 1];

@@ -7,5 +7,5 @@ /* tslint:disable */

export function private_key_to_pubkey_hash(a: number, b: number, c: number): void;
export function sign_musig_sha256(a: number, b: number, c: number, d: number, e: number): void;
export function sign_musig_rescue(a: number, b: number, c: number, d: number, e: number): void;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_free(a: number, b: number): void;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
/* tslint:disable */
/* eslint-disable */
/**
* This method initializes params for current thread, otherwise they will be initialized when signing
* first message.
*/

@@ -17,2 +19,8 @@ export function init(): void;

/**
* We use musig Schnorr signature scheme.
* It is impossible to restore signer for signature, that is why we provide public key of the signer
* along with signature.
* [0..32] - packed public key of signer.
* [32..64] - packed r point of the signature.
* [64..96] - s poing of the signature.
* @param {Uint8Array} private_key

@@ -22,2 +30,2 @@ * @param {Uint8Array} msg

*/
export function sign_musig_sha256(private_key: Uint8Array, msg: Uint8Array): Uint8Array;
export function sign_musig_rescue(private_key: Uint8Array, msg: Uint8Array): Uint8Array;

@@ -23,2 +23,4 @@ import * as wasm from './web_bg.wasm';

/**
* This method initializes params for current thread, otherwise they will be initialized when signing
* first message.
*/

@@ -88,2 +90,8 @@ export function init() {

/**
* We use musig Schnorr signature scheme.
* It is impossible to restore signer for signature, that is why we provide public key of the signer
* along with signature.
* [0..32] - packed public key of signer.
* [32..64] - packed r point of the signature.
* [64..96] - s poing of the signature.
* @param {Uint8Array} private_key

@@ -93,3 +101,3 @@ * @param {Uint8Array} msg

*/
export function sign_musig_sha256(private_key, msg) {
export function sign_musig_rescue(private_key, msg) {
var ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);

@@ -99,3 +107,3 @@ var len0 = WASM_VECTOR_LEN;

var len1 = WASM_VECTOR_LEN;
wasm.sign_musig_sha256(8, ptr0, len0, ptr1, len1);
wasm.sign_musig_rescue(8, ptr0, len0, ptr1, len1);
var r0 = getInt32Memory0()[8 / 4 + 0];

@@ -108,4 +116,6 @@ var r1 = getInt32Memory0()[8 / 4 + 1];

let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
const lTextDecoder = typeof TextDecoder === 'undefined' ? require('util').TextDecoder : TextDecoder;
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();

@@ -126,4 +136,6 @@

let cachedTextEncoder = new TextEncoder('utf-8');
const lTextEncoder = typeof TextEncoder === 'undefined' ? require('util').TextEncoder : TextEncoder;
let cachedTextEncoder = new lTextEncoder('utf-8');
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'

@@ -130,0 +142,0 @@ ? function (arg, view) {

{
"name": "zksync-crypto",
"version": "0.0.2",
"version": "0.1.0",
"browser": "dist/web.js",

@@ -12,5 +12,5 @@ "main": "dist/node.js",

"scripts": {
"build": "./build.sh",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "build.sh",
"test": "f cargo test"
}
}

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