Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dydxprotocol/starkex-lib

Package Overview
Dependencies
Maintainers
10
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dydxprotocol/starkex-lib - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

__tests__/util.ts

123

__tests__/helpers/crypto.test.ts

@@ -7,3 +7,3 @@ /**

import { KeyPair } from '../../src/types';
import { KeyPair, KeyPairWithYCoordinate } from '../../src/types';

@@ -17,12 +17,17 @@ // Module under test.

deserializeSignature,
isValidPublicKey,
serializeSignature,
} from '../../src/helpers/crypto';
import { generateKeyPairUnsafe, keyPairFromData } from '../../src/keys';
import { mutateHexStringAt } from '../util';
// Mock params.
const mockKeyPair: KeyPair = {
const mockKeyPair: KeyPairWithYCoordinate = {
publicKey: '3b865a18323b8d147a12c556bfb1d502516c325b1477a23ba6c77af31f020fd',
publicKeyYCoordinate: '211496e5e8ccf71930aebbfb7e815807acbfd0021f17f8b3944a3ed5f06c27',
privateKey: '58c7d5a90b1776bde86ebac077e053ed85b0f7164f53b080304a531947f46e3',
};
const mockPaddedKeyPair: KeyPair = {
const mockPaddedKeyPair: KeyPairWithYCoordinate = {
publicKey: `0${mockKeyPair.publicKey}`,
publicKeyYCoordinate: `00${mockKeyPair.publicKeyYCoordinate}`,
privateKey: `0${mockKeyPair.privateKey}`,

@@ -84,2 +89,114 @@ };

describe('isValidPublicKey()', () => {
it('returns true for valid x-coordinates', () => {
expect(isValidPublicKey('1')).toBe(true);
expect(isValidPublicKey('A')).toBe(true);
expect(isValidPublicKey(
'0800000000000000000000000000000000000000000000000000000000000000',
)).toBe(true);
expect(isValidPublicKey(mockKeyPair.publicKey)).toBe(true);
// Okay with 0x prefix.
expect(isValidPublicKey(`0x${mockKeyPair.publicKey}`)).toBe(true);
// Repeat some number of times.
for (let i = 0; i < 25; i++) {
// Random key pair.
expect(isValidPublicKey(generateKeyPairUnsafe().publicKey)).toBe(true);
// Key pair from fixed seed.
expect(isValidPublicKey(keyPairFromData(Buffer.from([i])).publicKey)).toBe(true);
}
});
it('returns false for invalid x-coordinates', () => {
expect(isValidPublicKey('0')).toBe(false);
expect(isValidPublicKey('C')).toBe(false);
expect(isValidPublicKey(
'8000000000000000000000000000000000000000000000000000000000000001',
)).toBe(false);
// Not a hex string.
expect(isValidPublicKey('asdf')).toBe(false);
// Out of range.
expect(isValidPublicKey(
'8000000000000000000000000000000000000000000000000000000000000000',
)).toBe(false);
expect(isValidPublicKey(
'800000000000000000000000000000000000000000000000000000000000abcd',
)).toBe(false);
});
it('returns true for valid (x, y) pairs', () => {
expect(isValidPublicKey({
x: mockKeyPair.publicKey,
y: mockKeyPair.publicKeyYCoordinate,
})).toBe(true);
// Okay with 0x prefix.
expect(isValidPublicKey({
x: `0x${mockKeyPair.publicKey}`,
y: `0x${mockKeyPair.publicKeyYCoordinate}`,
})).toBe(true);
// The other valid y-coordinate. Note that this pair does not match mockKeyPair.privateKey.
expect(isValidPublicKey({
x: mockKeyPair.publicKey,
y: '7deeb691a173319e6cf514404817ea7f853402ffde0e8074c6bb5c12a0f93da',
})).toBe(true);
// Repeat some number of times.
for (let i = 0; i < 25; i++) {
// Random key pair.
const randomKeyPair = generateKeyPairUnsafe();
expect(isValidPublicKey({
x: randomKeyPair.publicKey,
y: randomKeyPair.publicKeyYCoordinate,
})).toBe(true);
// Key pair from fixed seed.
const deterministicKeyPair = keyPairFromData(Buffer.from([i]));
expect(isValidPublicKey({
x: deterministicKeyPair.publicKey,
y: deterministicKeyPair.publicKeyYCoordinate,
})).toBe(true);
}
});
it('returns false for invalid (x, y) pairs', () => {
expect(isValidPublicKey({
x: mutateHexStringAt(mockKeyPair.publicKey, 0),
y: mockKeyPair.publicKeyYCoordinate,
})).toBe(false);
expect(isValidPublicKey({
x: mutateHexStringAt(mockKeyPair.publicKey, 62),
y: mockKeyPair.publicKeyYCoordinate,
})).toBe(false);
expect(isValidPublicKey({
x: mockKeyPair.publicKey,
y: mutateHexStringAt(mockKeyPair.publicKeyYCoordinate, 0),
})).toBe(false);
expect(isValidPublicKey({
x: mockKeyPair.publicKey,
y: mutateHexStringAt(mockKeyPair.publicKeyYCoordinate, 62),
})).toBe(false);
// Repeat some number of times.
for (let i = 0; i < 25; i++) {
// Random key pair.
const randomKeyPair = generateKeyPairUnsafe();
expect(isValidPublicKey({
x: mutateHexStringAt(randomKeyPair.publicKey, Math.floor(Math.random() * 62)),
y: randomKeyPair.publicKeyYCoordinate,
})).toBe(false);
expect(isValidPublicKey({
x: randomKeyPair.publicKey,
y: mutateHexStringAt(randomKeyPair.publicKeyYCoordinate, Math.floor(Math.random() * 62)),
})).toBe(false);
}
});
});
describe('serializeSignature()', () => {

@@ -86,0 +203,0 @@

2

__tests__/signable/conditional-transfer.test.ts

@@ -13,3 +13,3 @@ /**

import { generateKeyPairUnsafe } from '../../src/keys';
import { mutateHexStringAt } from './util';
import { mutateHexStringAt } from '../util';

@@ -16,0 +16,0 @@ // Module under test.

@@ -13,3 +13,3 @@ /**

import { generateKeyPairUnsafe } from '../../src/keys';
import { mutateHexStringAt } from './util';
import { mutateHexStringAt } from '../util';

@@ -16,0 +16,0 @@ // Module under test.

@@ -19,3 +19,3 @@ /**

import { nonceFromClientId } from '../../src/helpers';
import { mutateHexStringAt } from './util';
import { mutateHexStringAt } from '../util';

@@ -30,2 +30,5 @@ // Module under test.

};
const mockKeyPairPublicYCoordinate = (
'211496e5e8ccf71930aebbfb7e815807acbfd0021f17f8b3944a3ed5f06c27'
);
const mockKeyPairEvenY: KeyPair = {

@@ -65,2 +68,9 @@ publicKey: '5c749cd4c44bdc730bc90af9bfbdede9deb2c1c96c05806ce1bc1cb4fed64f7',

it('returns true for a valid signature (odd y), with y-coordinate provided', () => {
const result = SignableOrder
.fromOrder(mockOrder)
.verifySignature(mockSignature, mockKeyPair.publicKey, mockKeyPairPublicYCoordinate);
expect(result).toBe(true);
});
it('returns true for a valid signature (even y)', () => {

@@ -92,2 +102,26 @@ const result = SignableOrder

});
it('returns false for a invalid signature (odd y), with y-coordinate provided', () => {
const badSignature = mutateHexStringAt(mockSignature, 0);
const result = SignableOrder
.fromOrder(mockOrder)
.verifySignature(badSignature, mockKeyPair.publicKey, mockKeyPairPublicYCoordinate);
expect(result).toBe(false);
});
it('returns false if the x-coordinate is invalid, when y-coordinate is provided', () => {
const badX = mutateHexStringAt(mockKeyPair.publicKey, 20); // Arbitrary offset.
const result = SignableOrder
.fromOrder(mockOrder)
.verifySignature(mockSignature, badX, mockKeyPairPublicYCoordinate);
expect(result).toBe(false);
});
it('returns false if the y-coordinate is invalid', () => {
const badY = mutateHexStringAt(mockKeyPairPublicYCoordinate, 20); // Arbitrary offset.
const result = SignableOrder
.fromOrder(mockOrder)
.verifySignature(mockSignature, mockKeyPair.publicKey, badY);
expect(result).toBe(false);
});
});

@@ -94,0 +128,0 @@

@@ -15,3 +15,3 @@ /**

import { nonceFromClientId } from '../../src/helpers';
import { mutateHexStringAt } from './util';
import { mutateHexStringAt } from '../util';

@@ -18,0 +18,0 @@ // Module under test.

@@ -12,5 +12,8 @@ "use strict";

const crypto_1 = require("../../src/helpers/crypto");
const keys_1 = require("../../src/keys");
const util_1 = require("../util");
// Mock params.
const mockKeyPair = {
publicKey: '3b865a18323b8d147a12c556bfb1d502516c325b1477a23ba6c77af31f020fd',
publicKeyYCoordinate: '211496e5e8ccf71930aebbfb7e815807acbfd0021f17f8b3944a3ed5f06c27',
privateKey: '58c7d5a90b1776bde86ebac077e053ed85b0f7164f53b080304a531947f46e3',

@@ -20,2 +23,3 @@ };

publicKey: `0${mockKeyPair.publicKey}`,
publicKeyYCoordinate: `00${mockKeyPair.publicKeyYCoordinate}`,
privateKey: `0${mockKeyPair.privateKey}`,

@@ -64,2 +68,91 @@ };

});
describe('isValidPublicKey()', () => {
it('returns true for valid x-coordinates', () => {
expect_1.default(crypto_1.isValidPublicKey('1')).toBe(true);
expect_1.default(crypto_1.isValidPublicKey('A')).toBe(true);
expect_1.default(crypto_1.isValidPublicKey('0800000000000000000000000000000000000000000000000000000000000000')).toBe(true);
expect_1.default(crypto_1.isValidPublicKey(mockKeyPair.publicKey)).toBe(true);
// Okay with 0x prefix.
expect_1.default(crypto_1.isValidPublicKey(`0x${mockKeyPair.publicKey}`)).toBe(true);
// Repeat some number of times.
for (let i = 0; i < 25; i++) {
// Random key pair.
expect_1.default(crypto_1.isValidPublicKey(keys_1.generateKeyPairUnsafe().publicKey)).toBe(true);
// Key pair from fixed seed.
expect_1.default(crypto_1.isValidPublicKey(keys_1.keyPairFromData(Buffer.from([i])).publicKey)).toBe(true);
}
});
it('returns false for invalid x-coordinates', () => {
expect_1.default(crypto_1.isValidPublicKey('0')).toBe(false);
expect_1.default(crypto_1.isValidPublicKey('C')).toBe(false);
expect_1.default(crypto_1.isValidPublicKey('8000000000000000000000000000000000000000000000000000000000000001')).toBe(false);
// Not a hex string.
expect_1.default(crypto_1.isValidPublicKey('asdf')).toBe(false);
// Out of range.
expect_1.default(crypto_1.isValidPublicKey('8000000000000000000000000000000000000000000000000000000000000000')).toBe(false);
expect_1.default(crypto_1.isValidPublicKey('800000000000000000000000000000000000000000000000000000000000abcd')).toBe(false);
});
it('returns true for valid (x, y) pairs', () => {
expect_1.default(crypto_1.isValidPublicKey({
x: mockKeyPair.publicKey,
y: mockKeyPair.publicKeyYCoordinate,
})).toBe(true);
// Okay with 0x prefix.
expect_1.default(crypto_1.isValidPublicKey({
x: `0x${mockKeyPair.publicKey}`,
y: `0x${mockKeyPair.publicKeyYCoordinate}`,
})).toBe(true);
// The other valid y-coordinate. Note that this pair does not match mockKeyPair.privateKey.
expect_1.default(crypto_1.isValidPublicKey({
x: mockKeyPair.publicKey,
y: '7deeb691a173319e6cf514404817ea7f853402ffde0e8074c6bb5c12a0f93da',
})).toBe(true);
// Repeat some number of times.
for (let i = 0; i < 25; i++) {
// Random key pair.
const randomKeyPair = keys_1.generateKeyPairUnsafe();
expect_1.default(crypto_1.isValidPublicKey({
x: randomKeyPair.publicKey,
y: randomKeyPair.publicKeyYCoordinate,
})).toBe(true);
// Key pair from fixed seed.
const deterministicKeyPair = keys_1.keyPairFromData(Buffer.from([i]));
expect_1.default(crypto_1.isValidPublicKey({
x: deterministicKeyPair.publicKey,
y: deterministicKeyPair.publicKeyYCoordinate,
})).toBe(true);
}
});
it('returns false for invalid (x, y) pairs', () => {
expect_1.default(crypto_1.isValidPublicKey({
x: util_1.mutateHexStringAt(mockKeyPair.publicKey, 0),
y: mockKeyPair.publicKeyYCoordinate,
})).toBe(false);
expect_1.default(crypto_1.isValidPublicKey({
x: util_1.mutateHexStringAt(mockKeyPair.publicKey, 62),
y: mockKeyPair.publicKeyYCoordinate,
})).toBe(false);
expect_1.default(crypto_1.isValidPublicKey({
x: mockKeyPair.publicKey,
y: util_1.mutateHexStringAt(mockKeyPair.publicKeyYCoordinate, 0),
})).toBe(false);
expect_1.default(crypto_1.isValidPublicKey({
x: mockKeyPair.publicKey,
y: util_1.mutateHexStringAt(mockKeyPair.publicKeyYCoordinate, 62),
})).toBe(false);
// Repeat some number of times.
for (let i = 0; i < 25; i++) {
// Random key pair.
const randomKeyPair = keys_1.generateKeyPairUnsafe();
expect_1.default(crypto_1.isValidPublicKey({
x: util_1.mutateHexStringAt(randomKeyPair.publicKey, Math.floor(Math.random() * 62)),
y: randomKeyPair.publicKeyYCoordinate,
})).toBe(false);
expect_1.default(crypto_1.isValidPublicKey({
x: randomKeyPair.publicKey,
y: util_1.mutateHexStringAt(randomKeyPair.publicKeyYCoordinate, Math.floor(Math.random() * 62)),
})).toBe(false);
}
});
});
describe('serializeSignature()', () => {

@@ -87,2 +180,2 @@ it('pads r', () => {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3J5cHRvLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9fX3Rlc3RzX18vaGVscGVycy9jcnlwdG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0FBQztRQUNsRSxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0lBRUgsUUFBUSxDQUFDLHdCQUF3QixFQUFFLEdBQUcsRUFBRTtRQUV0QyxFQUFFLENBQUMseURBQXlELEVBQUUsR0FBRyxFQUFFO1lBQ2pFLGdCQUFNLENBQUMsR0FBRyxFQUFFLENBQUMsNkJBQW9CLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUNoRSw4QkFBOEIsQ0FDL0IsQ0FBQztRQUNKLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUMsQ0FBQyJ9

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

const keys_1 = require("../../src/keys");
const util_1 = require("./util");
const util_1 = require("../util");
// Module under test.

@@ -93,2 +93,2 @@ const conditional_transfer_1 = require("../../src/signable/conditional-transfer");

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZGl0aW9uYWwtdHJhbnNmZXIudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL19fdGVzdHNfXy9zaWduYWJsZS9jb25kaXRpb25hbC10cmFuc2Zlci50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7R0FFRzs7Ozs7QUFFSCxvREFBNEI7QUFPNUIseUNBQXVEO0FBQ3ZELGlDQUEyQztBQUUzQyxxQkFBcUI7QUFDckIsa0ZBQXNGO0FBRXRGLGVBQWU7QUFDZixNQUFNLFdBQVcsR0FBWTtJQUMzQixTQUFTLEVBQUUsaUVBQWlFO0lBQzVFLFVBQVUsRUFBRSxpRUFBaUU7Q0FDOUUsQ0FBQztBQUNGLE1BQU0sVUFBVSxHQUE4QjtJQUM1QyxnQkFBZ0IsRUFBRSxPQUFPO0lBQ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0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUN6RSxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLFlBQVksRUFBRSxHQUFHLEVBQUU7UUFDcEIsTUFBTSxPQUFPLEdBQVksNEJBQXFCLEVBQUUsQ0FBQztRQUNqRCxNQUFNLFFBQVEsR0FBRyxJQUFJLGtEQUEyQixDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBQzdELE1BQU0sU0FBUyxHQUFHLFFBQVEsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBRXBELCtEQUErRDtRQUMvRCxnQkFBTSxDQUNKLFFBQVEsQ0FBQyxlQUFlLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FDdkQsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7UUFFYixtRUFBbUU7UUFDbkUsZ0JBQU0sQ0FDSixRQUFRLENBQUMsZUFBZSxDQUFDLFNBQVMsRUFBRSxXQUFXLENBQUMsU0FBUyxDQUFDLENBQzNELENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ2hCLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDLENBQUMifQ==

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

const keys_1 = require("../../src/keys");
const util_1 = require("./util");
const util_1 = require("../util");
// Module under test.

@@ -107,2 +107,2 @@ const oracle_price_1 = require("../../src/signable/oracle-price");

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlLXByaWNlLnRlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9fX3Rlc3RzX18vc2lnbmFibGUvb3JhY2xlLXByaWNlLnRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5nc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UvRCwrREFBK0Q7WUFDL0QsZ0JBQU0sQ0FDSixtQkFBbUIsQ0FBQyxlQUFlLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FDbEUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7WUFFYixtRUFBbUU7WUFDbkUsZ0JBQU0sQ0FDSixtQkFBbUIsQ0FBQyxlQUFlLENBQUMsU0FBUyxFQUFFLFdBQVcsQ0FBQyxTQUFTLENBQUMsQ0FDdEUsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7U0FDZjtJQUNILENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDLENBQUMifQ==

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

const helpers_1 = require("../../src/helpers");
const util_1 = require("./util");
const util_1 = require("../util");
// Module under test.

@@ -23,2 +23,3 @@ const order_1 = require("../../src/signable/order");

};
const mockKeyPairPublicYCoordinate = ('211496e5e8ccf71930aebbfb7e815807acbfd0021f17f8b3944a3ed5f06c27');
const mockKeyPairEvenY = {

@@ -50,2 +51,8 @@ publicKey: '5c749cd4c44bdc730bc90af9bfbdede9deb2c1c96c05806ce1bc1cb4fed64f7',

});
it('returns true for a valid signature (odd y), with y-coordinate provided', () => {
const result = order_1.SignableOrder
.fromOrder(mockOrder)
.verifySignature(mockSignature, mockKeyPair.publicKey, mockKeyPairPublicYCoordinate);
expect_1.default(result).toBe(true);
});
it('returns true for a valid signature (even y)', () => {

@@ -75,2 +82,23 @@ const result = order_1.SignableOrder

});
it('returns false for a invalid signature (odd y), with y-coordinate provided', () => {
const badSignature = util_1.mutateHexStringAt(mockSignature, 0);
const result = order_1.SignableOrder
.fromOrder(mockOrder)
.verifySignature(badSignature, mockKeyPair.publicKey, mockKeyPairPublicYCoordinate);
expect_1.default(result).toBe(false);
});
it('returns false if the x-coordinate is invalid, when y-coordinate is provided', () => {
const badX = util_1.mutateHexStringAt(mockKeyPair.publicKey, 20); // Arbitrary offset.
const result = order_1.SignableOrder
.fromOrder(mockOrder)
.verifySignature(mockSignature, badX, mockKeyPairPublicYCoordinate);
expect_1.default(result).toBe(false);
});
it('returns false if the y-coordinate is invalid', () => {
const badY = util_1.mutateHexStringAt(mockKeyPairPublicYCoordinate, 20); // Arbitrary offset.
const result = order_1.SignableOrder
.fromOrder(mockOrder)
.verifySignature(mockSignature, mockKeyPair.publicKey, badY);
expect_1.default(result).toBe(false);
});
});

@@ -179,2 +207,2 @@ describe('sign()', () => {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JkZXIudGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL19fdGVzdHNfXy9zaWduYWJsZS9vcmRlci50ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7R0FFRzs7Ozs7QUFFSCxvREFBMkM7QUFDM0Msb0RBQTRCO0FBRTVCLDJDQVF5QjtBQUN6Qix5Q0FBdUQ7QUFDdkQsK0NBQXNEO0FBQ3RELGlDQUEyQztBQUUzQyxxQkFBcUI7QUFDckIsb0RBQXlEO0FBRXpELGVBQWU7QUFDZixNQUFNLFdBQVcsR0FBWTtJQUMzQixTQUFTLEVBQUUsaUVBQWlFO0lBQzVFLFVBQVUsRUFBRSxpRUFBaUU7Q0FDOUUsQ0FBQztBQUNGLE1BQU0sZ0JBQWdCLEdBQVk7SUFDaEMsU0FBUyxFQUFFLGlFQUFpRTtJQUM1RSxVQUFVLEVBQUUsaUVBQWlFO0NBQzlFLENBQUM7QUFDRixNQUFNLFNBQVMsR0FBc0I7SUFDbkMsVUFBVSxFQUFFLE9BQU87SUFDbkIsU0FBUyxFQUFFLFVBQVU7SUFDckIsUUFBUSxFQUFFLE9BQU87SUFDakIsTUFBTSxFQUFFLGtCQUFVLENBQUMsT0FBTztJQUMxQixJQUFJLEVBQUUsMEJBQWtCLENBQUMsR0FB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QyxLQUFLLENBQUMsQ0FBQztTQUNmO0lBQ0gsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUMsQ0FBQyJ9

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

const helpers_1 = require("../../src/helpers");
const util_1 = require("./util");
const util_1 = require("../util");
// Module under test.

@@ -117,2 +117,2 @@ const withdrawal_1 = require("../../src/signable/withdrawal");

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2l0aGRyYXdhbC50ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vX190ZXN0c19fL3NpZ25hYmxlL3dpdGhkcmF3YWwudGVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7O0dBRUc7Ozs7O0FBRUgsb0RBQTRCO0FBUTVCLHlDQUF1RDtBQUN2RCwrQ0FBc0Q7QUFDdEQsaUNBQTJDO0FBRTNDLHFCQUFxQjtBQUNyQiw4REFBbUU7QUFFbkUsZUFBZTtBQUNmLE1BQU0sV0FBVyxHQUFZO0lBQzNCLFNBQVMsRUFBRSxpRUFBaUU7SUFDNUUsVUFBVSxFQUFFLGlFQUFpRTtDQUM5RSxDQUFDO0FBQ0YsTUFBTSxjQUFjLEdBQTJCO0lBQzdDLFVBQVUsRUFBRSxPQUFPO0lBQ25CLFdBQVcsRUFBRSxXQUFXO0lBQ3hCLHNCQUFzQixFQUFFLDBCQUEwQjtJQUNsRCxRQUFRLEVBQUUsd0VBQXdFO0NBQ25GLENBQUM7QUFDRixNQUFNLGFBQWEsR0FBRyxDQUNwQixrRUFBa0U7SUFDbEUsa0VBQWtFLENBQ25FLENBQUM7QUFFRixRQUFRLENBQUMsb0JBQW9CLEVBQUUsR0FBRyxFQUFFO0lBRWxDLFFBQVEsQ0FBQyxtQkFBbUIsRUFBRSxHQUFHLEVBQUU7UUFFakMsRUFBRSxDQUFDLG9DQUFvQyxFQUFFLEdBQUcsRUF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UMsQ0FBQztRQUNoRSxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLFlBQVksRUFBRSxHQUFHLEVBQUU7UUFDcEIsK0JBQStCO1FBQy9CLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7WUFDMUIsTUFBTSxPQUFPLEdBQVksNEJBQXFCLEVBQUUsQ0FBQztZQUNqRCxNQUFNLGtCQUFrQixHQUFHLCtCQUFrQixDQUFDLGNBQWMsQ0FBQyxjQUFjLENBQUMsQ0FBQztZQUM3RSxNQUFNLFNBQVMsR0FBRyxrQkFBa0IsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDO1lBRTlELCtEQUErRDtZQUMvRCxnQkFBTSxDQUNKLGtCQUFrQixDQUFDLGVBQWUsQ0FBQyxTQUFTLEVBQUUsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUNqRSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztZQUViLG1FQUFtRTtZQUNuRSxnQkFBTSxDQUNKLGtCQUFrQixDQUFDLGVBQWUsQ0FBQyxTQUFTLEVBQUUsV0FBVyxDQUFDLFNBQVMsQ0FBQyxDQUNyRSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztTQUNmO0lBQ0gsQ0FBQyxDQUFDLENBQUM7QUFDTCxDQUFDLENBQUMsQ0FBQyJ9

@@ -5,3 +5,3 @@ /**

import elliptic from 'elliptic';
import { KeyPair, SignatureStruct } from '../types';
import { KeyPair, KeyPairWithYCoordinate, SignatureStruct } from '../types';
/**

@@ -16,6 +16,9 @@ * Helper for if you want to access additional cryptographic functionality with a private key.

*
* The provided parameter should be the x-coordinate of the public key as a hex string. There are
* two possible values for the y-coordinate, so `isOdd` is required to choose between the two.
* The provided parameter should be the x-coordinate of the public key, or an (x, y) pair.
* If given as an x-coordinate, then `yCoordinateIsOdd` is required.
*/
export declare function asEcKeyPairPublic(publicKey: string, isOdd: boolean): elliptic.ec.KeyPair;
export declare function asEcKeyPairPublic(publicKey: string | {
x: string;
y: string;
}, yCoordinateIsOdd?: boolean | null): elliptic.ec.KeyPair;
/**

@@ -26,3 +29,3 @@ * Converts an `elliptic` KeyPair object to a simple object with publicKey & privateKey hex strings.

*/
export declare function asSimpleKeyPair(ecKeyPair: elliptic.ec.KeyPair): KeyPair;
export declare function asSimpleKeyPair(ecKeyPair: elliptic.ec.KeyPair): KeyPairWithYCoordinate;
/**

@@ -35,2 +38,11 @@ * Converts an `elliptic` BasePoint object to a compressed representation: the x-coordinate as hex.

/**
* Check whether the string or (x, y) pair is a valid public key.
*
* Will not throw, always returns a boolean.
*/
export declare function isValidPublicKey(publicKey: string | {
x: string;
y: string;
}): boolean;
/**
* Convert an (r, s) signature struct to a string.

@@ -37,0 +49,0 @@ */

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.deserializeSignature = exports.serializeSignature = exports.asSimplePublicKey = exports.asSimpleKeyPair = exports.asEcKeyPairPublic = exports.asEcKeyPair = void 0;
exports.deserializeSignature = exports.serializeSignature = exports.isValidPublicKey = exports.asSimplePublicKey = exports.asSimpleKeyPair = exports.asEcKeyPairPublic = exports.asEcKeyPair = void 0;
const starkex_resources_1 = require("../lib/starkex-resources");

@@ -25,7 +25,19 @@ const util_1 = require("../lib/util");

*
* The provided parameter should be the x-coordinate of the public key as a hex string. There are
* two possible values for the y-coordinate, so `isOdd` is required to choose between the two.
* The provided parameter should be the x-coordinate of the public key, or an (x, y) pair.
* If given as an x-coordinate, then `yCoordinateIsOdd` is required.
*/
function asEcKeyPairPublic(publicKey, isOdd) {
const prefix = isOdd ? '03' : '02';
function asEcKeyPairPublic(publicKey, yCoordinateIsOdd = null) {
if (typeof publicKey !== 'string') {
if (typeof publicKey.x !== 'string' || typeof publicKey.y !== 'string') {
throw new Error('asEcKeyPairPublic: Public key must be a string or (x, y) pair');
}
return starkex_resources_1.starkEc.keyFromPublic({
x: util_1.normalizeHex32(publicKey.x),
y: util_1.normalizeHex32(publicKey.y),
});
}
if (yCoordinateIsOdd === null) {
throw new Error('asEcKeyPairPublic: Key was not given as an (x, y) pair, so yCoordinateIsOdd is required');
}
const prefix = yCoordinateIsOdd ? '03' : '02';
const prefixedPublicKey = `${prefix}${util_1.normalizeHex32(publicKey)}`;

@@ -52,3 +64,4 @@ // This will get the point from only the x-coordinate via:

return {
publicKey: asSimplePublicKey(ecPublicKey),
publicKey: util_1.bnToHex32(ecPublicKey.getX()),
publicKeyYCoordinate: util_1.bnToHex32(ecPublicKey.getY()),
privateKey: util_1.bnToHex32(ecPrivateKey),

@@ -68,2 +81,27 @@ };

/**
* Check whether the string or (x, y) pair is a valid public key.
*
* Will not throw, always returns a boolean.
*/
function isValidPublicKey(publicKey) {
try {
const ecPublicKey = asEcKeyPairPublic(publicKey, false);
if (!ecPublicKey.validate().result) {
return false;
}
// Return false for out-of-range values and non-hex strings.
const expectedX = publicKey.x || publicKey;
const resultX = ecPublicKey.getPublic().getX().toString(16);
if (util_1.normalizeHex32(resultX) !== util_1.normalizeHex32(expectedX)) {
return false;
}
return true;
}
catch (error) {
// Just catch everything. Public keys which throw include 0 and (2^251 + 1).
return false;
}
}
exports.isValidPublicKey = isValidPublicKey;
/**
* Convert an (r, s) signature struct to a string.

@@ -88,2 +126,2 @@ */

exports.deserializeSignature = deserializeSignature;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3J5cHRvLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2hlbHBlcnMvY3J5cHRvLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7R0FFRzs7O0FBSUgsZ0VBQW1EO0FBQ25ELHNDQUdxQjtBQU1yQjs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UFFLENBQ3BGLENBQUM7S0FDSDtJQUNELE9BQU87UUFDTCxDQUFDLEVBQUUsU0FBUyxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDO1FBQ3pCLENBQUMsRUFBRSxTQUFTLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQztLQUN2QixDQUFDO0FBQ0osQ0FBQztBQVpELG9EQVlDIn0=
/// <reference types="node" />
import { KeyPair } from './types';
import { KeyPairWithYCoordinate } from './types';
/**
* Generate a pseudorandom StarkEx key pair. NOT FOR USE IN PRODUCTION.
*/
export declare function generateKeyPairUnsafe(): KeyPair;
export declare function generateKeyPairUnsafe(): KeyPairWithYCoordinate;
/**
* Generate a STARK key pair deterministically from a Buffer.
*/
export declare function keyPairFromData(data: Buffer): KeyPair;
export declare function keyPairFromData(data: Buffer): KeyPairWithYCoordinate;

@@ -27,2 +27,2 @@ "use strict";

exports.keyPairFromData = keyPairFromData;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9rZXlzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlEQUF5RDtBQUV6RCx1Q0FHbUI7QUFDbkIscUNBR29CO0FBR3BCOztHQUVHO0FBQ0gsU0FBZ0IscUJBQXFCO0lBQ25DLE9BQU8sZUFBZSxDQUFDLG1CQUFZLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUMzQyxDQUFDO0FBRkQsc0RBRUM7QUFFRDs7R0FFRztBQUNILFNBQWdCLGVBQWUsQ0FDN0IsSUFBWTtJQUVaLElBQUksSUFBSSxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7UUFDckIsTUFBTSxJQUFJLEtBQUssQ0FBQywrQkFBK0IsQ0FBQyxDQUFDO0tBQ2xEO0lBQ0QsTUFBTSxVQUFVLEd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DO0lBQ25ELE1BQU0sVUFBVSxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsNkJBQTZCO0lBQ2xGLE9BQU8seUJBQWUsQ0FBQyxxQkFBVyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7QUFDbEQsQ0FBQztBQVJELDBDQVFDIn0=

@@ -22,3 +22,3 @@ import BN from 'bn.js';

*/
verifySignature(signature: string, publicKey: string): boolean;
verifySignature(signature: string, publicKey: string, publicKeyYCoordinate?: string | null): boolean;
/**

@@ -25,0 +25,0 @@ * Calculate the message hash.

@@ -40,4 +40,9 @@ "use strict";

*/
verifySignature(signature, publicKey) {
verifySignature(signature, publicKey, publicKeyYCoordinate = null) {
const signatureStruct = helpers_1.deserializeSignature(signature);
// If y-coordinate is available, save time by using it, instead of having to infer it.
if (publicKeyYCoordinate) {
const ecPublicKey = crypto_1.starkEc.keyFromPublic({ x: publicKey, y: publicKeyYCoordinate });
return crypto_1.verify(ecPublicKey, this.hashBN, signatureStruct);
}
// Return true if the signature is valid for either of the two possible y-coordinates.

@@ -52,2 +57,2 @@ //

exports.StarkSignable = StarkSignable;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Rhcmstc2lnbmFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc2lnbmFibGUvc3Rhcmstc2lnbmFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsd0NBS29CO0FBQ3BCLDREQUd5QztBQUN6QyxzQ0FBd0M7QUFHeEM7O0dBRUc7QUFDSCxNQUFzQixhQUFhO0lBS2pDLFlBQ0UsT0FBVTtRQUhKLFlBQU8sR0FBYyxJQUFJLENBQUM7UUFLaEMsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUM7SUFDek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dCQUFTLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztZQUMzQixDQUFDLEVBQUUsZ0JBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDO1NBQzVCLENBQUMsQ0FBQztJQUNMLENBQUM7SUFFRDs7T0FFRztJQUNILGVBQWUsQ0FDYixTQUFpQixFQUNqQixTQUFpQixFQUNqQix1QkFBc0MsSUFBSTtRQUUxQyxNQUFNLGVBQWUsR0FBRyw4QkFBb0IsQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUV4RCxzRkFBc0Y7UUFDdEYsSUFBSSxvQkFBb0IsRUFBRTtZQUN4QixNQUFNLFdBQVcsR0FBRyxnQkFBTyxDQUFDLGFBQWEsQ0FBQyxFQUFFLENBQUMsRUFBRSxTQUFTLEVBQUUsQ0FBQyxFQUFFLG9CQUFvQixFQUFFLENBQUMsQ0FBQztZQUNyRixPQUFPLGVBQU0sQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLE1BQU0sRUFBRSxlQUFlLENBQUMsQ0FBQztTQUMxRDtRQUVELHNGQUFzRjtRQUN0RixFQUFFO1FBQ0YsZ0JBQWdCO1FBQ2hCLHdKQUF3SjtRQUN4SixPQUFPLENBQ0wsZUFBTSxDQUFDLDJCQUFpQixDQUFDLFNBQVMsRUFBRSxLQUFLLENBQUMsRUFBRSxJQUFJLENBQUMsTUFBTSxFQUFFLGVBQWUsQ0FBQztZQUN6RSxlQUFNLENBQUMsMkJBQWlCLENBQUMsU0FBUyxFQUFFLElBQUksQ0FBQyxFQUFFLElBQUksQ0FBQyxNQUFNLEVBQUUsZUFBZSxDQUFDLENBQ3pFLENBQUM7SUFDSixDQUFDO0NBTUY7QUFwRUQsc0NBb0VDIn0=

@@ -22,4 +22,8 @@ /// <reference types="node" />

publicKey: string;
publicKeyYCoordinate?: string;
privateKey: string;
}
export interface KeyPairWithYCoordinate extends KeyPair {
publicKeyYCoordinate: string;
}
export interface SignatureStruct {

@@ -26,0 +30,0 @@ r: string;

@@ -35,2 +35,2 @@ "use strict";

})(ApiMethod = exports.ApiMethod || (exports.ApiMethod = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBWSxrQkFFWDtBQUZELFdBQVksa0JBQWtCO0lBQzVCLHFFQUErQyxDQUFBO0FBQ2pELENBQUMsRUFGVyxrQkFBa0IsR0FBbEIsMEJBQWtCLEtBQWxCLDBCQUFrQixRQUU3QjtBQUVELElBQVksa0JBR1g7QUFIRCxXQUFZLGtCQUFrQjtJQUM1QixpQ0FBVyxDQUFBO0lBQ1gsbUNBQWEsQ0FBQTtBQUNmLENBQUMsRUFIVyxrQkFBa0IsR0FBbEIsMEJBQWtCLEtBQWxCLDBCQUFrQixRQUc3QjtBQUVELHVDQUF1QztBQUN2QyxJQUFZLFVBSVg7QUFKRCxXQUFZLFVBQVU7SUFDcEIsaUNBQW1CLENBQUE7SUFDbkIsaUNBQW1CLENBQUE7SUFDbkIsbUNBQXFCLENBQUE7QUFDdkIsQ0FBQyxFQUpXLFVBQVUsR0FBVixrQkFBVSxLQUFWLGtCQUFVLFFBSXJCO0FBRUQsSUFBWSxTQUtYO0FBTEQsV0FBWSxTQUFTO0lBQ25CLDBCQUFhLENBQUE7SUFDYix3QkFBVyxDQUFBO0lBQ1gsd0JBQVcsQ0FBQTtJQUNYLDBCQUFhLENBQUE7QUFDZixDQUFDLEVBTFcsU0FBUyxHQUFULGlCQUFTLEtBQVQsaUJBQVMsUUFLcEI7QUF3R0QsbURBQW1EO0FBRW5ELElBQVksU0FLWDtBQUxELFdBQVksU0FBUztJQUNuQiwwQkFBYSxDQUFBO0lBQ2Isd0JBQVcsQ0FBQTtJQUNYLHdCQUFXLENBQUE7SUFDWCw4QkFBaUIsQ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QkFBaUIsQ0FBQTtBQUNuQixDQUFDLEVBTFcsU0FBUyxHQUFULGlCQUFTLEtBQVQsaUJBQVMsUUFLcEIifQ==
{
"name": "@dydxprotocol/starkex-lib",
"version": "0.8.1",
"version": "0.8.2",
"description": "Cryptographic functions for use with StarkEx",

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

@@ -14,2 +14,3 @@ /**

KeyPair,
KeyPairWithYCoordinate,
SignatureStruct,

@@ -35,10 +36,26 @@ } from '../types';

*
* The provided parameter should be the x-coordinate of the public key as a hex string. There are
* two possible values for the y-coordinate, so `isOdd` is required to choose between the two.
* The provided parameter should be the x-coordinate of the public key, or an (x, y) pair.
* If given as an x-coordinate, then `yCoordinateIsOdd` is required.
*/
export function asEcKeyPairPublic(
publicKey: string,
isOdd: boolean,
publicKey: string | { x: string; y: string },
yCoordinateIsOdd: boolean | null = null,
): elliptic.ec.KeyPair {
const prefix = isOdd ? '03' : '02';
if (typeof publicKey !== 'string') {
if (typeof publicKey.x !== 'string' || typeof publicKey.y !== 'string') {
throw new Error('asEcKeyPairPublic: Public key must be a string or (x, y) pair');
}
return starkEc.keyFromPublic({
x: normalizeHex32(publicKey.x),
y: normalizeHex32(publicKey.y),
});
}
if (yCoordinateIsOdd === null) {
throw new Error(
'asEcKeyPairPublic: Key was not given as an (x, y) pair, so yCoordinateIsOdd is required',
);
}
const prefix = yCoordinateIsOdd ? '03' : '02';
const prefixedPublicKey = `${prefix}${normalizeHex32(publicKey)}`;

@@ -61,3 +78,3 @@

ecKeyPair: elliptic.ec.KeyPair,
): KeyPair {
): KeyPairWithYCoordinate {
const ecPrivateKey = ecKeyPair.getPrivate();

@@ -69,3 +86,4 @@ if (!ecPrivateKey) {

return {
publicKey: asSimplePublicKey(ecPublicKey),
publicKey: bnToHex32(ecPublicKey.getX()),
publicKeyYCoordinate: bnToHex32(ecPublicKey.getY()),
privateKey: bnToHex32(ecPrivateKey),

@@ -87,2 +105,33 @@ };

/**
* Check whether the string or (x, y) pair is a valid public key.
*
* Will not throw, always returns a boolean.
*/
export function isValidPublicKey(
publicKey: string | { x: string; y: string },
): boolean {
try {
const ecPublicKey = asEcKeyPairPublic(
publicKey,
false, // Should not affect the result.
);
if (!ecPublicKey.validate().result) {
return false;
}
// Return false for out-of-range values and non-hex strings.
const expectedX = (publicKey as { x: string }).x || (publicKey as string);
const resultX = ecPublicKey.getPublic().getX().toString(16);
if (normalizeHex32(resultX) !== normalizeHex32(expectedX)) {
return false;
}
return true;
} catch (error) {
// Just catch everything. Public keys which throw include 0 and (2^251 + 1).
return false;
}
}
/**
* Convert an (r, s) signature struct to a string.

@@ -89,0 +138,0 @@ */

@@ -11,3 +11,3 @@ import { keccak256 } from 'ethereum-cryptography/keccak';

} from './lib/util';
import { KeyPair } from './types';
import { KeyPairWithYCoordinate } from './types';

@@ -17,3 +17,3 @@ /**

*/
export function generateKeyPairUnsafe(): KeyPair {
export function generateKeyPairUnsafe(): KeyPairWithYCoordinate {
return keyPairFromData(randomBuffer(32));

@@ -25,5 +25,3 @@ }

*/
export function keyPairFromData(
data: Buffer,
): KeyPair {
export function keyPairFromData(data: Buffer): KeyPairWithYCoordinate {
if (data.length === 0) {

@@ -30,0 +28,0 @@ throw new Error('keyPairFromData: Empty buffer');

@@ -11,2 +11,3 @@ import BN from 'bn.js';

sign,
starkEc,
verify,

@@ -64,5 +65,12 @@ } from '../lib/starkex-resources/crypto';

publicKey: string,
publicKeyYCoordinate: string | null = null,
): boolean {
const signatureStruct = deserializeSignature(signature);
// If y-coordinate is available, save time by using it, instead of having to infer it.
if (publicKeyYCoordinate) {
const ecPublicKey = starkEc.keyFromPublic({ x: publicKey, y: publicKeyYCoordinate });
return verify(ecPublicKey, this.hashBN, signatureStruct);
}
// Return true if the signature is valid for either of the two possible y-coordinates.

@@ -69,0 +77,0 @@ //

@@ -26,6 +26,11 @@ export enum StarkwareOrderType {

export interface KeyPair {
publicKey: string; // x-coordinate
publicKey: string; // Required x-coordinate.
publicKeyYCoordinate?: string; // Optional y-coordinate.
privateKey: string;
}
export interface KeyPairWithYCoordinate extends KeyPair {
publicKeyYCoordinate: string;
}
// Signature, represented as hex strings, no 0x prefix.

@@ -32,0 +37,0 @@ export interface SignatureStruct {

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