@dydxprotocol/starkex-lib
Advanced tools
Comparing version 0.10.3 to 0.10.4
@@ -48,8 +48,8 @@ /** | ||
const mockSignature = ( | ||
'0398287472161cba0e6386ff0b2f25f39ba37c646b7bbadace80eee6b8e7157d' + | ||
'01ba924272e1e42b3211b96bbbe012e7e8101e1b3e5b83ea90d161ad11fcced4' | ||
'015d2f1c7f68f2dc7c8f2557e0cd9cf6f9cf62c53f2747acc4cce3b6ef241765' + | ||
'0472fa737331754017aad07e08d6bb094cba54780ea86bbccfc4d130ec04fcba' | ||
); | ||
const mockSignatureEvenY = ( | ||
'05cf391a69386f53693344bada2e0d245879f3c6a98971498b2862ff2f359c49' + | ||
'0737deea7e201eaa86c8d6eeb2c1ca3ce89ac248b3fe1a6182301aa72d6e8e4f' | ||
'01a1e043c20da0563538445ae790918b8f478279cb4c2c3e9b201172c0b7967e' + | ||
'007ce48d9ef25643f0f78c8a60e201b2c6bf67732e4c68a4e5add78f647c6941' | ||
); | ||
@@ -216,3 +216,3 @@ | ||
// Order expiration should be rounded up, and should have a buffer added. | ||
expect(starkwareOrder.expirationEpochHours).toBe(444581); | ||
expect(starkwareOrder.expirationEpochHours).toBe(444701); | ||
}); | ||
@@ -219,0 +219,0 @@ |
@@ -38,6 +38,6 @@ "use strict"; | ||
}; | ||
const mockSignature = ('0398287472161cba0e6386ff0b2f25f39ba37c646b7bbadace80eee6b8e7157d' + | ||
'01ba924272e1e42b3211b96bbbe012e7e8101e1b3e5b83ea90d161ad11fcced4'); | ||
const mockSignatureEvenY = ('05cf391a69386f53693344bada2e0d245879f3c6a98971498b2862ff2f359c49' + | ||
'0737deea7e201eaa86c8d6eeb2c1ca3ce89ac248b3fe1a6182301aa72d6e8e4f'); | ||
const mockSignature = ('015d2f1c7f68f2dc7c8f2557e0cd9cf6f9cf62c53f2747acc4cce3b6ef241765' + | ||
'0472fa737331754017aad07e08d6bb094cba54780ea86bbccfc4d130ec04fcba'); | ||
const mockSignatureEvenY = ('01a1e043c20da0563538445ae790918b8f478279cb4c2c3e9b201172c0b7967e' + | ||
'007ce48d9ef25643f0f78c8a60e201b2c6bf67732e4c68a4e5add78f647c6941'); | ||
describe('SignableOrder', () => { | ||
@@ -182,3 +182,3 @@ describe('verifySignature()', () => { | ||
// Order expiration should be rounded up, and should have a buffer added. | ||
expect_1.default(starkwareOrder.expirationEpochHours).toBe(444581); | ||
expect_1.default(starkwareOrder.expirationEpochHours).toBe(444701); | ||
}); | ||
@@ -185,0 +185,0 @@ it('throws if the market is unknown', () => { |
@@ -43,5 +43,5 @@ "use strict"; | ||
function addOrderExpirationBufferHours(expirationEpochHours) { | ||
return expirationEpochHours + constants_1.STARK_SIGNATURE_EXPIRATION_BUFFER_HOURS; | ||
return expirationEpochHours + constants_1.STARK_ORDER_SIGNATURE_EXPIRATION_BUFFER_HOURS; | ||
} | ||
exports.addOrderExpirationBufferHours = addOrderExpirationBufferHours; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlzYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9oZWxwZXJzL21pc2MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOztHQUVHOzs7Ozs7QUFFSCxvREFBZ0M7QUFFaEMsa0RBQXVCO0FBRXZCLHNDQUFzQztBQUN0QyxxREFHK0I7QUFFL0IsTUFBTSxTQUFTLEdBQUcsSUFBSSxlQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLElBQUksZUFBRSxDQUFDLG1DQUF1QixDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7QUFDdkUsTUFBTSxhQUFhLEdBQUcsSUFBSSxDQUFDO0FBQzNCLE1BQU0sV0FBVyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsYUFBYSxDQUFDO0FBRTVDOztHQUVHO0FBQ0gsU0FBZ0IsaUJBQWlCLENBQUMsUUFBZ0I7SUFD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xTQUFnQiw2QkFBNkIsQ0FBQyxvQkFBNEI7SUFDeEUsT0FBTyxvQkFBb0IsR0FBRyx5REFBNkMsQ0FBQztBQUM5RSxDQUFDO0FBRkQsc0VBRUMifQ== |
@@ -1,2 +0,2 @@ | ||
export declare const STARK_SIGNATURE_EXPIRATION_BUFFER_HOURS: number; | ||
export declare const STARK_ORDER_SIGNATURE_EXPIRATION_BUFFER_HOURS: number; | ||
export declare const ORDER_FIELD_BIT_LENGTHS: { | ||
@@ -3,0 +3,0 @@ assetIdSynthetic: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ORACLE_PRICE_FIELD_BIT_LENGTHS = exports.CONDITIONAL_TRANSFER_FIELD_BIT_LENGTHS = exports.WITHDRAWAL_FIELD_BIT_LENGTHS = exports.ORDER_FIELD_BIT_LENGTHS = exports.STARK_SIGNATURE_EXPIRATION_BUFFER_HOURS = void 0; | ||
exports.STARK_SIGNATURE_EXPIRATION_BUFFER_HOURS = 24 * 2; // Two days. | ||
exports.ORACLE_PRICE_FIELD_BIT_LENGTHS = exports.CONDITIONAL_TRANSFER_FIELD_BIT_LENGTHS = exports.WITHDRAWAL_FIELD_BIT_LENGTHS = exports.ORDER_FIELD_BIT_LENGTHS = exports.STARK_ORDER_SIGNATURE_EXPIRATION_BUFFER_HOURS = void 0; | ||
exports.STARK_ORDER_SIGNATURE_EXPIRATION_BUFFER_HOURS = 24 * 7; // Seven days. | ||
exports.ORDER_FIELD_BIT_LENGTHS = { | ||
@@ -36,2 +36,2 @@ assetIdSynthetic: 128, | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NpZ25hYmxlL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHVDQUF1QyxH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10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLDZDQUE2QyxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUMsQ0FBQyxjQUFjO0FBRXRFLFFBQUEsdUJBQXVCLEdBQUc7SUFDckMsZ0JBQWdCLEVBQUUsR0FBRztJQUNyQixpQkFBaUIsRUFBRSxHQUFHO0lBQ3RCLFVBQVUsRUFBRSxHQUFHO0lBQ2YsY0FBYyxFQUFFLEVBQUU7SUFDbEIsS0FBSyxFQUFFLEVBQUU7SUFDVCxVQUFVLEVBQUUsRUFBRTtJQUNkLG9CQUFvQixFQUFFLEVBQUU7Q0FDekIsQ0FBQztBQUVXLFFBQUEsNEJBQTRCLEdBQUc7SUFDMUMsT0FBTyxFQUFFLEdBQUc7SUFDWixVQUFVLEVBQUUsRUFBRTtJQUNkLEtBQUssRUFBRSxFQUFFO0lBQ1QsY0FBYyxFQUFFLEVBQUU7SUFDbEIsb0JBQW9CLEVBQUUsRUFBRTtDQUN6QixDQUFDO0FBRVcsUUFBQSxzQ0FBc0MsR0FBRztJQUNwRCxPQUFPLEVBQUUsR0FBRztJQUNaLGlCQUFpQixFQUFFLEdBQUc7SUFDdEIsVUFBVSxFQUFFLEVBQUU7SUFDZCxLQUFLLEVBQUUsRUFBRTtJQUNULGNBQWMsRUFBRSxFQUFFO0lBQ2xCLG9CQUFvQixFQUFFLEVBQUU7SUFDeEIsU0FBUyxFQUFFLEdBQUc7Q0FDZixDQUFDO0FBRVcsUUFBQSw4QkFBOEIsR0FBRztJQUM1QyxTQUFTLEVBQUUsR0FBRztJQUNkLFVBQVUsRUFBRSxFQUFFO0lBQ2QsS0FBSyxFQUFFLEdBQUc7SUFDVixxQkFBcUIsRUFBRSxFQUFFO0NBQzFCLENBQUMifQ== |
{ | ||
"name": "@dydxprotocol/starkex-lib", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"description": "Cryptographic functions for use with StarkEx", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
@@ -12,3 +12,3 @@ /** | ||
ORDER_FIELD_BIT_LENGTHS, | ||
STARK_SIGNATURE_EXPIRATION_BUFFER_HOURS, | ||
STARK_ORDER_SIGNATURE_EXPIRATION_BUFFER_HOURS, | ||
} from '../signable/constants'; | ||
@@ -46,3 +46,3 @@ | ||
export function addOrderExpirationBufferHours(expirationEpochHours: number): number { | ||
return expirationEpochHours + STARK_SIGNATURE_EXPIRATION_BUFFER_HOURS; | ||
return expirationEpochHours + STARK_ORDER_SIGNATURE_EXPIRATION_BUFFER_HOURS; | ||
} |
@@ -1,2 +0,2 @@ | ||
export const STARK_SIGNATURE_EXPIRATION_BUFFER_HOURS = 24 * 2; // Two days. | ||
export const STARK_ORDER_SIGNATURE_EXPIRATION_BUFFER_HOURS = 24 * 7; // Seven days. | ||
@@ -3,0 +3,0 @@ export const ORDER_FIELD_BIT_LENGTHS = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
531202