Socket
Socket
Sign inDemoInstall

@hashgraph/cryptography

Package Overview
Dependencies
2
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

20

lib/KeyList.d.ts

@@ -6,7 +6,2 @@ /**

/**
* @param {number} threshold
* @returns {KeyList}
*/
static withThreshold(threshold: number): KeyList;
/**
* @param {Key[]} keys

@@ -37,4 +32,13 @@ * @returns {KeyList}

*/
threshold: number | null;
_threshold: number | null;
/**
* @returns {?number}
*/
get threshold(): number | null;
/**
* @param {number} threshold
* @returns {this}
*/
setThreshold(threshold: number): this;
/**
* @param {Key[]} keys

@@ -61,3 +65,7 @@ * @returns {number}

[Symbol.iterator](): Iterator<Key>;
/**
* @returns {Key[]}
*/
toArray(): Key[];
}
import Key from "./Key";

@@ -32,14 +32,5 @@ "use strict";

this.threshold = threshold == null ? null : threshold;
this._threshold = threshold == null ? null : threshold;
}
/**
* @param {number} threshold
* @returns {KeyList}
*/
static withThreshold(threshold) {
return new KeyList(null, threshold);
}
/**
* @param {Key[]} keys

@@ -70,2 +61,20 @@ * @returns {KeyList}

/**
* @returns {?number}
*/
get threshold() {
return this._threshold;
}
/**
* @param {number} threshold
* @returns {this}
*/
setThreshold(threshold) {
this._threshold = threshold;
return this;
}
/**
* @param {Key[]} keys

@@ -108,5 +117,13 @@ * @returns {number}

}
/**
* @returns {Key[]}
*/
toArray() {
return this._keys.slice();
}
}
exports.default = KeyList;

@@ -47,8 +47,6 @@ "use strict";

const view1 = new DataView(array.buffer, 0, arrayPrefix.byteLength);
const view2 = new DataView(arrayPrefix.buffer);
let i = arrayPrefix.byteLength;
while (i--) {
if (view1.getUint8(i) !== view2.getUint8(i)) {
if (array[i] !== arrayPrefix[i]) {
return false;

@@ -55,0 +53,0 @@ }

{
"name": "@hashgraph/cryptography",
"version": "1.0.3",
"version": "1.0.4",
"description": "Cryptographic utilities and primitives for the Hedera™ Hashgraph SDK",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -23,14 +23,6 @@ import Key from "./Key";

*/
this.threshold = threshold == null ? null : threshold;
this._threshold = threshold == null ? null : threshold;
}
/**
* @param {number} threshold
* @returns {KeyList}
*/
static withThreshold(threshold) {
return new KeyList(null, threshold);
}
/**
* @param {Key[]} keys

@@ -59,2 +51,18 @@ * @returns {KeyList}

/**
* @returns {?number}
*/
get threshold() {
return this._threshold;
}
/**
* @param {number} threshold
* @returns {this}
*/
setThreshold(threshold) {
this._threshold = threshold;
return this;
}
/**
* @param {Key[]} keys

@@ -95,2 +103,9 @@ * @returns {number}

}
/**
* @returns {Key[]}
*/
toArray() {
return this._keys.slice();
}
}

@@ -39,9 +39,6 @@ /**

const view1 = new DataView(array.buffer, 0, arrayPrefix.byteLength);
const view2 = new DataView(arrayPrefix.buffer);
let i = arrayPrefix.byteLength;
while (i--) {
if (view1.getUint8(i) !== view2.getUint8(i)) {
if (array[i] !== arrayPrefix[i]) {
return false;

@@ -48,0 +45,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc