New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sorare/crypto

Package Overview
Dependencies
Maintainers
40
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sorare/crypto - npm Package Compare versions

Comparing version 1.3.1-beta.1 to 1.3.1-beta.2

3

dist/browser.d.ts

@@ -10,3 +10,3 @@ import { ec } from 'elliptic';

export declare const sign: (privateKey: string, message: string) => Signature;
export declare const verify: (publicKey: string, message: string, signature: Signature) => any;
export declare const verifyMessage: (publicKey: string, message: string, signature: Signature) => any;
export declare const signTransfer: (privateKey: string, transfer: Transfer) => Signature;

@@ -16,2 +16,1 @@ export declare const verifyTransfer: (publicKey: string, transfer: Transfer, signature: Signature) => boolean;

export declare const verifyLimitOrder: (publicKey: string, limitOrder: LimitOrder, signature: Signature) => boolean;
export declare const hash: (message: string) => string;

@@ -6,3 +6,3 @@ "use strict";

});
exports.verifyTransfer = exports.verifyLimitOrder = exports.verify = exports.signTransfer = exports.signLimitOrder = exports.sign = exports.loadPublicKey = exports.loadPrivateKey = exports.hash = exports.generateKey = exports.exportPublicKeyX = exports.exportPublicKey = exports.exportPrivateKey = void 0;
exports.verifyTransfer = exports.verifyMessage = exports.verifyLimitOrder = exports.signTransfer = exports.signLimitOrder = exports.sign = exports.loadPublicKey = exports.loadPrivateKey = exports.generateKey = exports.exportPublicKeyX = exports.exportPublicKey = exports.exportPrivateKey = void 0;

@@ -15,4 +15,2 @@ var _bn = _interopRequireDefault(require("bn.js"));

var _hash = _interopRequireDefault(require("hash.js"));
var _keyDerivation = require("./starkware/native/keyDerivation");

@@ -122,4 +120,9 @@

exports.verify = verify;
var verifyMessage = function verifyMessage(publicKey, message, signature) {
var input = (0, _signature.pedersen)(message);
return verify(publicKey, input, signature);
};
exports.verifyMessage = verifyMessage;
var signTransfer = function signTransfer(privateKey, transfer) {

@@ -152,8 +155,2 @@ var message = hashTransfer(transfer);

exports.verifyLimitOrder = verifyLimitOrder;
var hash = function hash(message) {
return _hash.default.sha256().update(message).digest('hex');
};
exports.hash = hash;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9icm93c2VyLnRzIl0sIm5hbWVzIjpbIlBBVEgiLCJnZW5lcmF0ZUtleSIsIm1uZW1vbmljIiwic2VlZCIsImV0aGVyZXVtQWRkcmVzcyIsImhka2V5IiwiZnJvbU1hc3RlclNlZWQiLCJkZXJpdmVQYXRoIiwiZ2V0V2FsbGV0IiwiZ2V0QWRkcmVzc1N0cmluZyIsInBhdGgiLCJleHBvcnRQcml2YXRlS2V5Iiwia2V5IiwiZ2V0UHJpdmF0ZSIsInBhZFN0YXJ0IiwiZXhwb3J0UHVibGljS2V5IiwiZ2V0UHVibGljIiwiZXhwb3J0UHVibGljS2V5WCIsImdldFgiLCJ0b1N0cmluZyIsImxvYWRQcml2YXRlS2V5IiwicHJpdmF0ZUtleSIsInN0YXJrRWMiLCJrZXlGcm9tUHJpdmF0ZSIsInN1YnN0cmluZyIsImxvYWRQdWJsaWNLZXkiLCJwdWJsaWNLZXkiLCJrZXlGcm9tUHVibGljIiwiaGFzaFRyYW5zZmVyIiwidHJhbnNmZXIiLCJhbW91bnQiLCJub25jZSIsInNlbmRlclZhdWx0SWQiLCJ0b2tlbiIsInJlY2VpdmVyVmF1bHRJZCIsInJlY2VpdmVyUHVibGljS2V5IiwiZXhwaXJhdGlvblRpbWVzdGFtcCIsImNvbmRpdGlvbiIsImZlZUluZm9Vc2VyIiwiYXJncyIsImdldFRyYW5zZmVyTXNnSGFzaFdpdGhGZWUiLCJ0b2tlbklkIiwic291cmNlVmF1bHRJZCIsImZlZUxpbWl0IiwiZ2V0VHJhbnNmZXJNc2dIYXNoIiwiaGFzaExpbWl0T3JkZXIiLCJsaW1pdE9yZGVyIiwidmF1bHRJZFNlbGwiLCJ2YXVsdElkQnV5IiwiYW1vdW50U2Vsb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lclxuKTogU2lnbmF0dXJlID0+IHtcbiAgY29uc3QgbWVzc2FnZSA9IGhhc2hUcmFuc2Zlcih0cmFuc2Zlcik7XG5cbiAgcmV0dXJuIHNpZ24ocHJpdmF0ZUtleSwgbWVzc2FnZSk7XG59O1xuXG5leHBvcnQgY29uc3QgdmVyaWZ5VHJhbnNmZXIgPSAoXG4gIHB1YmxpY0tleTogc3RyaW5nLFxuICB0cmFuc2ZlcjogVHJhbnNmZXIsXG4gIHNpZ25hdHVyZTogU2lnbmF0dXJlXG4pOiBib29sZWFuID0+IHtcbiAgY29uc3QgbWVzc2FnZSA9IGhhc2hUcmFuc2Zlcih0cmFuc2Zlcik7XG5cbiAgcmV0dXJuIHZlcmlmeShwdWJsaWNLZXksIG1lc3NhZ2UsIHNpZ25hdHVyZSk7XG59O1xuXG5leHBvcnQgY29uc3Qgc2lnbkxpbWl0T3JkZXIgPSAoXG4gIHByaXZhdGVLZXk6IHN0cmluZyxcbiAgbGltaXRPcmRlcjogTGltaXRPcmRlclxuKTogU2lnbmF0dXJlID0+IHtcbiAgY29uc3QgbWVzc2FnZSA9IGhhc2hMaW1pdE9yZGVyKGxpbWl0T3JkZXIpO1xuXG4gIHJldHVybiBzaWduKHByaXZhdGVLZXksIG1lc3NhZ2UpO1xufTtcblxuZXhwb3J0IGNvbnN0IHZlcmlmeUxpbWl0T3JkZXIgPSAoXG4gIHB1YmxpY0tleTogc3RyaW5nLFxuICBsaW1pdE9yZGVyOiBMaW1pdE9yZGVyLFxuICBzaWduYXR1cmU6IFNpZ25hdHVyZVxuKTogYm9vbGVhbiA9PiB7XG4gIGNvbnN0IG1lc3NhZ2UgPSBoYXNoTGltaXRPcmRlcihsaW1pdE9yZGVyKTtcblxuICByZXR1cm4gdmVyaWZ5KHB1YmxpY0tleSwgbWVzc2FnZSwgc2lnbmF0dXJlKTtcbn07XG4iXX0=

@@ -10,4 +10,4 @@ import { ec } from 'elliptic';

export declare const loadPublicKey: (publicKey: string) => ec.KeyPair;
export declare const sign: (privateKey: string, message: string) => Signature;
export declare const verify: (publicKey: string, message: string, signature: Signature) => any;
export declare const signMessage: (privateKey: string, message: string) => Signature;
export declare const verifyMessage: (publicKey: string, message: string, signature: Signature) => any;
export declare const signTransfer: (privateKey: string, transfer: Transfer) => Signature;

@@ -17,2 +17,1 @@ export declare const verifyTransfer: (publicKey: string, transfer: Transfer, signature: Signature) => boolean;

export declare const verifyLimitOrder: (publicKey: string, limitOrder: LimitOrder, signature: Signature) => boolean;
export declare const hash: (message: string) => string;

@@ -24,3 +24,3 @@ "use strict";

});
exports.verifyTransfer = exports.verifyLimitOrder = exports.verify = exports.signTransfer = exports.signLimitOrder = exports.sign = exports.loadPublicKey = exports.loadPrivateKey = exports.hash = exports.generateKey = exports.exportPublicKeyX = exports.exportPublicKey = exports.exportPrivateKey = void 0;
exports.verifyTransfer = exports.verifyMessage = exports.verifyLimitOrder = exports.signTransfer = exports.signMessage = exports.signLimitOrder = exports.loadPublicKey = exports.loadPrivateKey = exports.generateKey = exports.exportPublicKeyX = exports.exportPublicKey = exports.exportPrivateKey = void 0;

@@ -33,4 +33,2 @@ var _bn = _interopRequireDefault(require("bn.js"));

var _hash = _interopRequireDefault(require("hash.js"));
var _keyDerivation = require("./starkware/cpp/keyDerivation");

@@ -135,4 +133,2 @@

exports.sign = sign;
var verify = function verify(publicKey, message, signature) {

@@ -151,4 +147,16 @@ if (_useCpp.useCryptoCpp) {

exports.verify = verify;
var signMessage = function signMessage(privateKey, message) {
var input = (0, _signature.pedersen)(message);
return sign(privateKey, input);
};
exports.signMessage = signMessage;
var verifyMessage = function verifyMessage(publicKey, message, signature) {
var input = (0, _signature.pedersen)(message);
return verify(publicKey, input, signature);
};
exports.verifyMessage = verifyMessage;
var signTransfer = function signTransfer(privateKey, transfer) {

@@ -181,8 +189,2 @@ var message = hashTransfer(transfer);

exports.verifyLimitOrder = verifyLimitOrder;
var hash = function hash(message) {
return _hash.default.sha256().update(message).digest('hex');
};
exports.hash = hash;
//#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bmV4cG9ydCBjb25zdCB2ZXJpZnlUcmFuc2ZlciA9IChcbiAgcHVibGljS2V5OiBzdHJpbmcsXG4gIHRyYW5zZmVyOiBUcmFuc2ZlcixcbiAgc2lnbmF0dXJlOiBTaWduYXR1cmVcbik6IGJvb2xlYW4gPT4ge1xuICBjb25zdCBtZXNzYWdlID0gaGFzaFRyYW5zZmVyKHRyYW5zZmVyKTtcblxuICByZXR1cm4gdmVyaWZ5KHB1YmxpY0tleSwgbWVzc2FnZSwgc2lnbmF0dXJlKTtcbn07XG5cbmV4cG9ydCBjb25zdCBzaWduTGltaXRPcmRlciA9IChcbiAgcHJpdmF0ZUtleTogc3RyaW5nLFxuICBsaW1pdE9yZGVyOiBMaW1pdE9yZGVyXG4pOiBTaWduYXR1cmUgPT4ge1xuICBjb25zdCBtZXNzYWdlID0gaGFzaExpbWl0T3JkZXIobGltaXRPcmRlcik7XG5cbiAgcmV0dXJuIHNpZ24ocHJpdmF0ZUtleSwgbWVzc2FnZSk7XG59O1xuXG5leHBvcnQgY29uc3QgdmVyaWZ5TGltaXRPcmRlciA9IChcbiAgcHVibGljS2V5OiBzdHJpbmcsXG4gIGxpbWl0T3JkZXI6IExpbWl0T3JkZXIsXG4gIHNpZ25hdHVyZTogU2lnbmF0dXJlXG4pOiBib29sZWFuID0+IHtcbiAgY29uc3QgbWVzc2FnZSA9IGhhc2hMaW1pdE9yZGVyKGxpbWl0T3JkZXIpO1xuXG4gIHJldHVybiB2ZXJpZnkocHVibGljS2V5LCBtZXNzYWdlLCBzaWduYXR1cmUpO1xufTtcbiJdfQ==

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

"license": "MIT",
"version": "1.3.1-beta.1",
"version": "1.3.1-beta.2",
"main": "lib.js",

@@ -9,0 +9,0 @@ "browser": "lib-browser.js",

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