@sorare/crypto
Advanced tools
Comparing version 1.3.1-beta.7 to 1.3.1-beta.8
@@ -11,3 +11,3 @@ import { ec } from 'elliptic'; | ||
export declare const signMessage: (privateKey: string, message: string) => Signature; | ||
export declare const verifyMessage: (publicKey: string, message: string, signature: Signature) => boolean; | ||
export declare const verifyMessage: (publicKey: string, message: string, signature: Signature) => any; | ||
export declare const signTransfer: (privateKey: string, transfer: Transfer) => Signature; | ||
@@ -14,0 +14,0 @@ export declare const verifyTransfer: (publicKey: string, transfer: Transfer, signature: Signature) => boolean; |
@@ -34,10 +34,8 @@ "use strict"; | ||
var _keyDerivation = require("./starkware/cpp/keyDerivation"); | ||
var _keyDerivation = require("./starkware/keyDerivation"); | ||
var _signature = require("./starkware/cpp/signature"); | ||
var _signature = require("./starkware/signature"); | ||
var _useCpp = require("./starkware/cpp/useCpp"); | ||
var _crypto = require("./starkware/crypto"); | ||
var _crypto = require("./starkware/cpp/crypto"); | ||
var _types = require("./types"); | ||
@@ -135,3 +133,3 @@ | ||
var verify = function verify(publicKey, message, signature) { | ||
if (_useCpp.useCryptoCpp) { | ||
if (_crypto.useCryptoCpp) { | ||
return (0, _crypto.verify)(BigInt(publicKey), BigInt("0x".concat(message)), BigInt(signature.r), BigInt(signature.s)); | ||
@@ -193,2 +191,2 @@ } | ||
exports.verifyLimitOrder = verifyLimitOrder; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6WyJQQVRIIiwiZ2VuZXJhdGVLZXkiLCJtbmVtb25pYyIsInNlZWQiLCJldGhlcmV1bUFkZHJlc3MiLCJoZGtleSIsImZyb21NYXN0ZXJTZWVkIiwiZGVyaXZlUGF0aCIsImdldFdhbGxldCIsImdldEFkZHJlc3NTdHJpbmciLCJwYXRoIiwiZXhwb3J0UHJpdmF0ZUtleSIsImtleSIsImdldFByaXZhdGUiLCJwYWRTdGFydCIsImV4c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lID0+IHtcbiAgY29uc3QgbWVzc2FnZSA9IGhhc2hUcmFuc2Zlcih0cmFuc2Zlcik7XG5cbiAgcmV0dXJuIHNpZ24ocHJpdmF0ZUtleSwgbWVzc2FnZSk7XG59O1xuXG5leHBvcnQgY29uc3QgdmVyaWZ5VHJhbnNmZXIgPSAoXG4gIHB1YmxpY0tleTogc3RyaW5nLFxuICB0cmFuc2ZlcjogVHJhbnNmZXIsXG4gIHNpZ25hdHVyZTogU2lnbmF0dXJlXG4pOiBib29sZWFuID0+IHtcbiAgY29uc3QgbWVzc2FnZSA9IGhhc2hUcmFuc2Zlcih0cmFuc2Zlcik7XG5cbiAgcmV0dXJuIHZlcmlmeShwdWJsaWNLZXksIG1lc3NhZ2UsIHNpZ25hdHVyZSk7XG59O1xuXG5leHBvcnQgY29uc3Qgc2lnbkxpbWl0T3JkZXIgPSAoXG4gIHByaXZhdGVLZXk6IHN0cmluZyxcbiAgbGltaXRPcmRlcjogTGltaXRPcmRlclxuKTogU2lnbmF0dXJlID0+IHtcbiAgY29uc3QgbWVzc2FnZSA9IGhhc2hMaW1pdE9yZGVyKGxpbWl0T3JkZXIpO1xuXG4gIHJldHVybiBzaWduKHByaXZhdGVLZXksIG1lc3NhZ2UpO1xufTtcblxuZXhwb3J0IGNvbnN0IHZlcmlmeUxpbWl0T3JkZXIgPSAoXG4gIHB1YmxpY0tleTogc3RyaW5nLFxuICBsaW1pdE9yZGVyOiBMaW1pdE9yZGVyLFxuICBzaWduYXR1cmU6IFNpZ25hdHVyZVxuKTogYm9vbGVhbiA9PiB7XG4gIGNvbnN0IG1lc3NhZ2UgPSBoYXNoTGltaXRPcmRlcihsaW1pdE9yZGVyKTtcblxuICByZXR1cm4gdmVyaWZ5KHB1YmxpY0tleSwgbWVzc2FnZSwgc2lnbmF0dXJlKTtcbn07XG4iXX0= |
@@ -8,1 +8,2 @@ export function pedersen(x: any, y: any): bigint; | ||
export function getPublicKey(private_key: any): bigint; | ||
export const useCryptoCpp: boolean; |
@@ -26,11 +26,18 @@ "use strict"; | ||
var ffi = require('ffi-napi'); // Native crypto bindings. | ||
var useCryptoCpp = Boolean(process.env.USE_STARKWARE_CRYPTO_CPP); | ||
var libcrypto; // Only load FFI bindings if we run in a Node environment and we asked for it | ||
if (useCryptoCpp) { | ||
// eslint-disable-next-line | ||
var ffi = require('ffi-napi'); // Native crypto bindings. | ||
var libcrypto = ffi.Library(path.join(__dirname, '..', '..', 'build', 'Release', 'crypto'), { | ||
Hash: ['int', ['string', 'string', 'string']], | ||
Verify: ['bool', ['string', 'string', 'string', 'string']], | ||
Sign: ['int', ['string', 'string', 'string', 'string']], | ||
GetPublicKey: ['int', ['string', 'string']] | ||
}); | ||
libcrypto = ffi.Library(path.join(__dirname, '..', '..', 'build', 'Release', 'crypto'), { | ||
Hash: ['int', ['string', 'string', 'string']], | ||
Verify: ['bool', ['string', 'string', 'string', 'string']], | ||
Sign: ['int', ['string', 'string', 'string', 'string']], | ||
GetPublicKey: ['int', ['string', 'string']] | ||
}); | ||
} | ||
var curveOrder = new BN('800000000000010ffffffffffffffffb781126dcae7b2321e66a241adc64d2f', 16); | ||
@@ -110,4 +117,5 @@ /* | ||
verify: verify, | ||
getPublicKey: getPublicKey | ||
getPublicKey: getPublicKey, | ||
useCryptoCpp: useCryptoCpp | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdGFya3dhcmUvY3J5cHRvLmpzIl0sIm5hbWVzIjpbInBhdGgiLCJyZXF1aXJlIiwiQk4iLCJCaWdJbnRCdWZmZXIiLCJhc3NlcnQiLCJmZmkiLCJsaWJjcnlwdG8iLCJMaWJyYXJ5Iiwiam9pbiIsIl9fZGlybmFtZSIsIkhhc2giLCJWZXJpZnkiLCJTaWduIiwiR2V0UHVibGljS2V5IiwiY3VydmVPcmRlciIsInBlZGVyc2VuIiwieCIsInkiLCJ4X2J1ZiIsInRvQnVmZmVy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TSxFQUFOQSxNQUhlO0FBSWZzQixFQUFBQSxZQUFZLEVBQVpBO0FBSmUsQ0FBakIiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIENvcHlyaWdodCAyMDE5IFN0YXJrV2FyZSBJbmR1c3RyaWVzIEx0ZC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL1xuLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vXG4vLyBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpLiAgICAgICAgICAgICAvL1xuLy8gWW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLiAgICAgICAgICAgIC8vXG4vLyBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9cbi8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL1xuLy8gaHR0cHM6Ly93d3cuc3Rhcmt3YXJlLmNvL29wZW4tc291cmNlLWxpY2Vuc2UvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vXG4vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9cbi8vIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW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by5HZXRQdWJsaWNLZXkocHJpdmF0ZV9rZXlfYnVmLCByZXNfYnVmKTtcbiAgYXNzZXJ0LnN0cmljdChyZXMgPT0gMCwgJ0Vycm9yOiAnICsgcmVzX2J1Zi50b1N0cmluZygndXRmLTgnKSk7XG4gIHJldHVybiBCaWdJbnRCdWZmZXIudG9CaWdJbnRMRShyZXNfYnVmKTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIHBlZGVyc2VuLFxuICBzaWduLFxuICB2ZXJpZnksXG4gIGdldFB1YmxpY0tleSxcbiAgdXNlQ3J5cHRvQ3BwLFxufTtcbiJdfQ== |
@@ -8,3 +8,2 @@ export function pedersen(input: any): any; | ||
export function verify(publicKey: any, msgHash: any, msgSignature: any): any; | ||
export const useCryptoCpp: boolean; | ||
export const prime: BN; | ||
@@ -11,0 +10,0 @@ export const maxEcdsaVal: BN; |
@@ -6,5 +6,4 @@ { | ||
"license": "MIT", | ||
"version": "1.3.1-beta.7", | ||
"version": "1.3.1-beta.8", | ||
"main": "lib.js", | ||
"browser": "lib-browser.js", | ||
"dependencies": { | ||
@@ -61,2 +60,3 @@ "bigint-buffer": "^1.1.5", | ||
"prepublish": "yarn run build", | ||
"install": "(test -n \"$USE_STARKWARE_CRYPTO_CPP\" && node-gyp rebuild) || true", | ||
"postinstall": "patch-package", | ||
@@ -76,5 +76,3 @@ "test": "jest ./src", | ||
"lib.js", | ||
"lib-browser.js", | ||
"lib.d.ts", | ||
"lib-browser.d.ts" | ||
"lib.d.ts" | ||
], | ||
@@ -81,0 +79,0 @@ "browserslist": [ |
@@ -44,3 +44,3 @@ <!-- logo --> | ||
Starting from v1.2.0, C++ bindings can be used for faster `verifyTransfer` and `verifyLimitOrder` operations. It uses Starkware's [crypto-cpp](https://github.com/starkware-libs/crypto-cpp) library and can be enabled by adding `USE_STARKWARE_CRYPTO_CPP=true` to your env. Please also note that `yarn install` will build C++ bindings (using [node-gyp](https://github.com/nodejs/node-gyp)) starting from this version. | ||
Starting from v1.3.2, C++ bindings can be used for faster `verifyTransfer` and `verifyLimitOrder` operations. It uses Starkware's [crypto-cpp](https://github.com/starkware-libs/crypto-cpp) library and can be enabled by adding `USE_STARKWARE_CRYPTO_CPP=true` to your env. Please note that this variable also needs to be set when `yarn install` runs in order to build the C++ bindings using [node-gyp](https://github.com/nodejs/node-gyp). | ||
@@ -47,0 +47,0 @@ # License |
Sorry, the diff of this file is too big to display
2
719319
57
1075