@vostokplatform/signature-generator
Advanced tools
Comparing version 1.6.7-RC7 to 1.6.7-RC8
@@ -28,2 +28,5 @@ import { BigNumber } from '@waves/data-entities'; | ||
} | ||
export declare class Integer extends ByteProcessor { | ||
process(value: number): Promise<Uint8Array>; | ||
} | ||
export declare class StringWithLength extends ByteProcessor { | ||
@@ -30,0 +33,0 @@ process(value: string, byteLength?: number): Promise<Uint8Array>; |
@@ -160,4 +160,4 @@ "use strict"; | ||
throw new Error('You should pass a number to Short constructor'); | ||
if (value < 0 || value > 65535) | ||
throw new Error('Short value must fit between 0 and 65535'); | ||
if (value < -2147483648 || value > 2147483647) | ||
throw new Error('Short value must fit between -2147483648 and 2147483647'); | ||
return Promise.resolve(Uint8Array.from(convert_1.default.shortToByteArray(value))); | ||
@@ -168,2 +168,17 @@ }; | ||
exports.Short = Short; | ||
var Integer = /** @class */ (function (_super) { | ||
__extends(Integer, _super); | ||
function Integer() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
Integer.prototype.process = function (value) { | ||
if (typeof value !== 'number') | ||
throw new Error('You should pass a number to Integer constructor'); | ||
if (value < 0 || value > 65535) | ||
throw new Error('Short value must fit between 0 and 65535'); | ||
return Promise.resolve(Uint8Array.from(convert_1.default.IntToByteArray(value))); | ||
}; | ||
return Integer; | ||
}(ByteProcessor)); | ||
exports.Integer = Integer; | ||
var StringWithLength = /** @class */ (function (_super) { | ||
@@ -170,0 +185,0 @@ __extends(StringWithLength, _super); |
@@ -331,3 +331,3 @@ "use strict"; | ||
new __1.Long('timestamp'), | ||
new __1.Short('contractVersion'), | ||
new __1.Integer('contractVersion'), | ||
new __1.AssetId('feeAssetId'), | ||
@@ -334,0 +334,0 @@ ]); |
{ | ||
"name": "@vostokplatform/signature-generator", | ||
"version": "1.6.7-RC7", | ||
"version": "1.6.7-RC8", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
5990229
102357