@sorare/crypto
Advanced tools
Comparing version 0.0.3-beta.0 to 0.0.3
@@ -0,6 +1,9 @@ | ||
import { ec } from 'elliptic'; | ||
import { LimitOrder, Transfer, Signature } from './types'; | ||
export declare const PATH = "m/44'/60'/0'/0/0"; | ||
export declare const generateKey: (mnemonic?: string | undefined) => import("elliptic").ec.KeyPair; | ||
export declare const loadPrivateKey: (privateKey: string) => import("elliptic").ec.KeyPair; | ||
export declare const loadPublicKey: (publicKey: string) => import("elliptic").ec.KeyPair; | ||
export declare const generateKey: (mnemonic?: string | undefined) => ec.KeyPair; | ||
export declare const exportPrivateKey: (key: ec.KeyPair) => string; | ||
export declare const exportPublicKey: (key: ec.KeyPair) => string; | ||
export declare const loadPrivateKey: (privateKey: string) => ec.KeyPair; | ||
export declare const loadPublicKey: (publicKey: string) => ec.KeyPair; | ||
export declare const hashTransfer: (transfer: Transfer) => any; | ||
@@ -7,0 +10,0 @@ export declare const hashLimitOrder: (limitOrder: LimitOrder) => any; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.verifyLimitOrder = exports.signLimitOrder = exports.verifyTransfer = exports.signTransfer = exports.verify = exports.sign = exports.hashLimitOrder = exports.hashTransfer = exports.loadPublicKey = exports.loadPrivateKey = exports.generateKey = exports.PATH = void 0; | ||
exports.verifyLimitOrder = exports.signLimitOrder = exports.verifyTransfer = exports.signTransfer = exports.verify = exports.sign = exports.hashLimitOrder = exports.hashTransfer = exports.loadPublicKey = exports.loadPrivateKey = exports.exportPublicKey = exports.exportPrivateKey = exports.generateKey = exports.PATH = void 0; | ||
@@ -35,2 +35,14 @@ var _bn = _interopRequireDefault(require("bn.js")); | ||
var exportPrivateKey = function exportPrivateKey(key) { | ||
return "0x".concat(key.getPrivate('hex').padStart(64, '0')); | ||
}; | ||
exports.exportPrivateKey = exportPrivateKey; | ||
var exportPublicKey = function exportPublicKey(key) { | ||
return "0x".concat(key.getPublic().getX().toString('hex').padStart(64, '0')); | ||
}; | ||
exports.exportPublicKey = exportPublicKey; | ||
var loadPrivateKey = function loadPrivateKey(privateKey) { | ||
@@ -113,2 +125,2 @@ return _signature.starkEc.keyFromPrivate(privateKey.substring(2), 'hex'); | ||
exports.verifyLimitOrder = verifyLimitOrder; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdGFya3dhcmUvaW5kZXgudHMiXSwibmFtZXMiOlsiUEFUSCIsImdlbmVyYXRlS2V5IiwibW5lbW9uaWMiLCJzZWVkIiwiZXRoZXJldW1BZGRyZXNzIiwiaGRrZXkiLCJmcm9tTWFzdGVyU2VlZCIsImRlcml2ZVBhdGgiLCJnZXRXYWxsZXQiLCJnZXRBZGRyZXNzU3RyaW5nIiwicGF0aCIsImxvYWRQcml2YXRlS2V5IiwicHJpdmF0ZUtleSIsInN0YXJrRWMiLCJrZXlGcm9tUHJpdmF0ZSIsInN1YnN0cmluZyIsImxvYWRQdWJsaWNLZXkiLCJwdWJsaWNLZXkiLCJrZXlGcm9tUHVibGljIiwiaGFzaFRyYW5zZmVyIiwidHJhbnNmZXIiLCJhbW91bnQiLCJub25jZSIsInNlbmRlclZhdWx0SWQiLCJ0b2tlbiIsInJlY2VpdmVyVmF1bHRJZCIsInJlY2VpdmVyUHVibGljS2V5IiwiZXhwaXJhdGlvblRpbWVzdGFtcCIsImNvbmRpdGlvbiIsImhhc2hMaW1pdE9yZGVyIiwibGltaXRPcmRlciIsInZhdWx0SWRTZWxsIiwidmF1bHRJZEJ1eSIsImFtb3VudFNlbGwiLCJhbW91bnRCdXkiLCJ0b2tlblNlbGwiLCJ0b2tlbkJ1eSIsInNpZ24iLCJtZXNzYWdlIiwia2V5IiwiciIsInMiLCJ0b1N0cmluZyIsInZlcmlmeSIsInNpZ25hdHVyZSIsInNpZyIsIkJOIiwic2lnblRyYW5zZmVyIiwidmVyaWZ5VHJhbnNmZXIiLCJzaWduTGltaXRPcmRlciIsInZlcmlmeUxpb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HZlcmlmeShwdWJsaWNLZXksIG1lc3NhZ2UsIHNpZ25hdHVyZSk7XG59O1xuIl19 |
@@ -6,3 +6,3 @@ { | ||
"license": "UNLICENSED", | ||
"version": "0.0.3-beta.0", | ||
"version": "0.0.3", | ||
"main": "dist", | ||
@@ -9,0 +9,0 @@ "types": "dist", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
283771
837
0