ripple-binary-codec 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enums/definitions.json +1 -1
- package/dist/enums/src/enums/definitions.json +6 -1
- package/dist/src/enums/definitions.json +1 -1
- package/dist/src/types/hash-128.js +1 -1
- package/dist/src/types/hash-128.js.map +1 -1
- package/dist/src/types/hash-160.js +1 -1
- package/dist/src/types/hash-160.js.map +1 -1
- package/dist/src/types/hash-192.js +1 -1
- package/dist/src/types/hash-192.js.map +1 -1
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/types/index.js +4 -1
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/int-32.d.ts +33 -0
- package/dist/src/types/int-32.js +64 -0
- package/dist/src/types/int-32.js.map +1 -0
- package/dist/src/types/int.d.ts +38 -0
- package/dist/src/types/int.js +57 -0
- package/dist/src/types/int.js.map +1 -0
- package/dist/src/types/st-number.js +88 -33
- package/dist/src/types/st-number.js.map +1 -1
- package/dist/src/types/uint-16.js +2 -2
- package/dist/src/types/uint-16.js.map +1 -1
- package/dist/src/types/uint-32.js +1 -1
- package/dist/src/types/uint-32.js.map +1 -1
- package/dist/src/types/uint-64.js +1 -1
- package/dist/src/types/uint-64.js.map +1 -1
- package/dist/src/types/uint-8.js +1 -1
- package/dist/src/types/uint-8.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/hash-128.js +1 -1
- package/dist/types/hash-128.js.map +1 -1
- package/dist/types/hash-160.js +1 -1
- package/dist/types/hash-160.js.map +1 -1
- package/dist/types/hash-192.js +1 -1
- package/dist/types/hash-192.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js +4 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/int-32.d.ts +33 -0
- package/dist/types/int-32.js +64 -0
- package/dist/types/int-32.js.map +1 -0
- package/dist/types/int.d.ts +38 -0
- package/dist/types/int.js +57 -0
- package/dist/types/int.js.map +1 -0
- package/dist/types/st-number.js +88 -33
- package/dist/types/st-number.js.map +1 -1
- package/dist/types/uint-16.js +2 -2
- package/dist/types/uint-16.js.map +1 -1
- package/dist/types/uint-32.js +1 -1
- package/dist/types/uint-32.js.map +1 -1
- package/dist/types/uint-64.js +1 -1
- package/dist/types/uint-64.js.map +1 -1
- package/dist/types/uint-8.js +1 -1
- package/dist/types/uint-8.js.map +1 -1
- package/package.json +1 -1
- package/src/enums/definitions.json +6 -1
- package/src/types/hash-128.ts +1 -1
- package/src/types/hash-160.ts +1 -1
- package/src/types/hash-192.ts +1 -1
- package/src/types/index.ts +3 -0
- package/src/types/int-32.ts +72 -0
- package/src/types/int.ts +75 -0
- package/src/types/st-number.ts +107 -31
- package/src/types/uint-16.ts +2 -2
- package/src/types/uint-32.ts +1 -1
- package/src/types/uint-64.ts +1 -1
- package/src/types/uint-8.ts +1 -1
|
@@ -731,7 +731,7 @@
|
|
|
731
731
|
}
|
|
732
732
|
],
|
|
733
733
|
[
|
|
734
|
-
"
|
|
734
|
+
"PreviousPaymentDueDate",
|
|
735
735
|
{
|
|
736
736
|
"isSerialized": true,
|
|
737
737
|
"isSigningField": true,
|
|
@@ -3549,6 +3549,7 @@
|
|
|
3549
3549
|
"tecXCHAIN_SELF_COMMIT": 184,
|
|
3550
3550
|
"tecXCHAIN_SENDING_ACCOUNT_MISMATCH": 179,
|
|
3551
3551
|
"tecXCHAIN_WRONG_CHAIN": 176,
|
|
3552
|
+
|
|
3552
3553
|
"tefALREADY": -198,
|
|
3553
3554
|
"tefBAD_ADD_AUTH": -197,
|
|
3554
3555
|
"tefBAD_AUTH": -196,
|
|
@@ -3571,6 +3572,7 @@
|
|
|
3571
3572
|
"tefPAST_SEQ": -190,
|
|
3572
3573
|
"tefTOO_BIG": -181,
|
|
3573
3574
|
"tefWRONG_PRIOR": -189,
|
|
3575
|
+
|
|
3574
3576
|
"telBAD_DOMAIN": -398,
|
|
3575
3577
|
"telBAD_PATH_COUNT": -397,
|
|
3576
3578
|
"telBAD_PUBLIC_KEY": -396,
|
|
@@ -3588,6 +3590,7 @@
|
|
|
3588
3590
|
"telNO_DST_PARTIAL": -393,
|
|
3589
3591
|
"telREQUIRES_NETWORK_ID": -385,
|
|
3590
3592
|
"telWRONG_NETWORK": -386,
|
|
3593
|
+
|
|
3591
3594
|
"temARRAY_EMPTY": -253,
|
|
3592
3595
|
"temARRAY_TOO_LARGE": -252,
|
|
3593
3596
|
"temBAD_AMM_TOKENS": -261,
|
|
@@ -3638,6 +3641,7 @@
|
|
|
3638
3641
|
"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT": -255,
|
|
3639
3642
|
"temXCHAIN_BRIDGE_NONDOOR_OWNER": -257,
|
|
3640
3643
|
"temXCHAIN_EQUAL_DOOR_ACCOUNTS": -260,
|
|
3644
|
+
|
|
3641
3645
|
"terADDRESS_COLLISION": -86,
|
|
3642
3646
|
"terFUNDS_SPENT": -98,
|
|
3643
3647
|
"terINSUF_FEE_B": -97,
|
|
@@ -3653,6 +3657,7 @@
|
|
|
3653
3657
|
"terPRE_TICKET": -88,
|
|
3654
3658
|
"terQUEUED": -89,
|
|
3655
3659
|
"terRETRY": -99,
|
|
3660
|
+
|
|
3656
3661
|
"tesSUCCESS": 0
|
|
3657
3662
|
},
|
|
3658
3663
|
"TRANSACTION_TYPES": {
|
|
@@ -8,7 +8,7 @@ const utils_1 = require("@xrplf/isomorphic/utils");
|
|
|
8
8
|
*/
|
|
9
9
|
class Hash128 extends hash_1.Hash {
|
|
10
10
|
constructor(bytes) {
|
|
11
|
-
if (bytes
|
|
11
|
+
if ((bytes === null || bytes === void 0 ? void 0 : bytes.byteLength) === 0) {
|
|
12
12
|
bytes = Hash128.ZERO_128.bytes;
|
|
13
13
|
}
|
|
14
14
|
super(bytes !== null && bytes !== void 0 ? bytes : Hash128.ZERO_128.bytes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-128.js","sourceRoot":"","sources":["../../../src/types/hash-128.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,mDAAoD;AAEpD;;GAEG;AACH,MAAM,OAAQ,SAAQ,WAAI;IAIxB,YAAY,KAAiB;QAC3B,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"hash-128.js","sourceRoot":"","sources":["../../../src/types/hash-128.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,mDAAoD;AAEpD;;GAEG;AACH,MAAM,OAAQ,SAAQ,WAAI;IAIxB,YAAY,KAAiB;QAC3B,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,MAAK,CAAC,EAAE;YAC3B,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;SAC/B;QAED,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,MAAM,GAAG,GAAG,IAAA,kBAAU,EAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;QACtC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACpB,OAAO,EAAE,CAAA;SACV;QACD,OAAO,GAAG,CAAA;IACZ,CAAC;;AAGM,0BAAO;AAzBE,aAAK,GAAG,EAAE,CAAA;AACV,gBAAQ,GAAY,IAAI,OAAO,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA"}
|
|
@@ -7,7 +7,7 @@ const hash_1 = require("./hash");
|
|
|
7
7
|
*/
|
|
8
8
|
class Hash160 extends hash_1.Hash {
|
|
9
9
|
constructor(bytes) {
|
|
10
|
-
if (bytes
|
|
10
|
+
if ((bytes === null || bytes === void 0 ? void 0 : bytes.byteLength) === 0) {
|
|
11
11
|
bytes = Hash160.ZERO_160.bytes;
|
|
12
12
|
}
|
|
13
13
|
super(bytes !== null && bytes !== void 0 ? bytes : Hash160.ZERO_160.bytes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-160.js","sourceRoot":"","sources":["../../../src/types/hash-160.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B;;GAEG;AACH,MAAM,OAAQ,SAAQ,WAAI;IAIxB,YAAY,KAAkB;QAC5B,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"hash-160.js","sourceRoot":"","sources":["../../../src/types/hash-160.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B;;GAEG;AACH,MAAM,OAAQ,SAAQ,WAAI;IAIxB,YAAY,KAAkB;QAC5B,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,MAAK,CAAC,EAAE;YAC3B,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;SAC/B;QAED,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;;AAGM,0BAAO;AAZE,aAAK,GAAG,EAAE,CAAA;AACV,gBAAQ,GAAY,IAAI,OAAO,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA"}
|
|
@@ -7,7 +7,7 @@ const hash_1 = require("./hash");
|
|
|
7
7
|
*/
|
|
8
8
|
class Hash192 extends hash_1.Hash {
|
|
9
9
|
constructor(bytes) {
|
|
10
|
-
if (bytes
|
|
10
|
+
if ((bytes === null || bytes === void 0 ? void 0 : bytes.byteLength) === 0) {
|
|
11
11
|
bytes = Hash192.ZERO_192.bytes;
|
|
12
12
|
}
|
|
13
13
|
super(bytes !== null && bytes !== void 0 ? bytes : Hash192.ZERO_192.bytes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-192.js","sourceRoot":"","sources":["../../../src/types/hash-192.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B;;GAEG;AACH,MAAM,OAAQ,SAAQ,WAAI;IAIxB,YAAY,KAAkB;QAC5B,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"hash-192.js","sourceRoot":"","sources":["../../../src/types/hash-192.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B;;GAEG;AACH,MAAM,OAAQ,SAAQ,WAAI;IAIxB,YAAY,KAAkB;QAC5B,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,MAAK,CAAC,EAAE;YAC3B,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;SAC/B;QAED,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;;AAGM,0BAAO;AAZE,aAAK,GAAG,EAAE,CAAA;AACV,gBAAQ,GAAY,IAAI,OAAO,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA"}
|
|
@@ -6,6 +6,7 @@ import { Hash128 } from './hash-128';
|
|
|
6
6
|
import { Hash160 } from './hash-160';
|
|
7
7
|
import { Hash192 } from './hash-192';
|
|
8
8
|
import { Hash256 } from './hash-256';
|
|
9
|
+
import { Int32 } from './int-32';
|
|
9
10
|
import { PathSet } from './path-set';
|
|
10
11
|
import { STArray } from './st-array';
|
|
11
12
|
import { STObject } from './st-object';
|
|
@@ -16,4 +17,4 @@ import { UInt8 } from './uint-8';
|
|
|
16
17
|
import { Vector256 } from './vector-256';
|
|
17
18
|
import { type SerializedType } from './serialized-type';
|
|
18
19
|
declare const coreTypes: Record<string, typeof SerializedType>;
|
|
19
|
-
export { coreTypes, AccountID, Amount, Blob, Currency, Hash128, Hash160, Hash192, Hash256, PathSet, STArray, STObject, UInt8, UInt16, UInt32, UInt64, Vector256, };
|
|
20
|
+
export { coreTypes, AccountID, Amount, Blob, Currency, Hash128, Hash160, Hash192, Hash256, Int32, PathSet, STArray, STObject, UInt8, UInt16, UInt32, UInt64, Vector256, };
|
package/dist/src/types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Vector256 = exports.UInt64 = exports.UInt32 = exports.UInt16 = exports.UInt8 = exports.STObject = exports.STArray = exports.PathSet = exports.Hash256 = exports.Hash192 = exports.Hash160 = exports.Hash128 = exports.Currency = exports.Blob = exports.Amount = exports.AccountID = exports.coreTypes = void 0;
|
|
3
|
+
exports.Vector256 = exports.UInt64 = exports.UInt32 = exports.UInt16 = exports.UInt8 = exports.STObject = exports.STArray = exports.PathSet = exports.Int32 = exports.Hash256 = exports.Hash192 = exports.Hash160 = exports.Hash128 = exports.Currency = exports.Blob = exports.Amount = exports.AccountID = exports.coreTypes = void 0;
|
|
4
4
|
const account_id_1 = require("./account-id");
|
|
5
5
|
Object.defineProperty(exports, "AccountID", { enumerable: true, get: function () { return account_id_1.AccountID; } });
|
|
6
6
|
const amount_1 = require("./amount");
|
|
@@ -17,6 +17,8 @@ const hash_192_1 = require("./hash-192");
|
|
|
17
17
|
Object.defineProperty(exports, "Hash192", { enumerable: true, get: function () { return hash_192_1.Hash192; } });
|
|
18
18
|
const hash_256_1 = require("./hash-256");
|
|
19
19
|
Object.defineProperty(exports, "Hash256", { enumerable: true, get: function () { return hash_256_1.Hash256; } });
|
|
20
|
+
const int_32_1 = require("./int-32");
|
|
21
|
+
Object.defineProperty(exports, "Int32", { enumerable: true, get: function () { return int_32_1.Int32; } });
|
|
20
22
|
const issue_1 = require("./issue");
|
|
21
23
|
const st_number_1 = require("./st-number");
|
|
22
24
|
const path_set_1 = require("./path-set");
|
|
@@ -46,6 +48,7 @@ const coreTypes = {
|
|
|
46
48
|
Hash160: hash_160_1.Hash160,
|
|
47
49
|
Hash192: hash_192_1.Hash192,
|
|
48
50
|
Hash256: hash_256_1.Hash256,
|
|
51
|
+
Int32: int_32_1.Int32,
|
|
49
52
|
Issue: issue_1.Issue,
|
|
50
53
|
Number: st_number_1.STNumber,
|
|
51
54
|
PathSet: path_set_1.PathSet,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAqDtC,0FArDO,sBAAS,OAqDP;AApDX,qCAAiC;AAqD/B,uFArDO,eAAM,OAqDP;AApDR,iCAA6B;AAqD3B,qFArDO,WAAI,OAqDP;AApDN,yCAAqC;AAqDnC,yFArDO,mBAAQ,OAqDP;AApDV,yCAAoC;AAqDlC,wFArDO,kBAAO,OAqDP;AApDT,yCAAoC;AAqDlC,wFArDO,kBAAO,OAqDP;AApDT,yCAAoC;AAqDlC,wFArDO,kBAAO,OAqDP;AApDT,yCAAoC;AAqDlC,wFArDO,kBAAO,OAqDP;AApDT,qCAAgC;AAqD9B,sFArDO,cAAK,OAqDP;AApDP,mCAA+B;AAC/B,2CAAsC;AACtC,yCAAoC;AAmDlC,wFAnDO,kBAAO,OAmDP;AAlDT,yCAAoC;AAmDlC,wFAnDO,kBAAO,OAmDP;AAlDT,2CAAsC;AAmDpC,yFAnDO,oBAAQ,OAmDP;AAlDV,uCAAkC;AAoDhC,uFApDO,gBAAM,OAoDP;AAnDR,uCAAkC;AAoDhC,uFApDO,gBAAM,OAoDP;AAnDR,uCAAkC;AAoDhC,uFApDO,gBAAM,OAoDP;AAnDR,qCAAgC;AAgD9B,sFAhDO,cAAK,OAgDP;AA/CP,6CAAwC;AAmDtC,0FAnDO,sBAAS,OAmDP;AAlDX,mDAA8C;AAE9C,oCAA8C;AAE9C,MAAM,SAAS,GAA0C;IACvD,SAAS,EAAT,sBAAS;IACT,MAAM,EAAN,eAAM;IACN,IAAI,EAAJ,WAAI;IACJ,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAP,kBAAO;IACP,OAAO,EAAP,kBAAO;IACP,OAAO,EAAP,kBAAO;IACP,OAAO,EAAP,kBAAO;IACP,KAAK,EAAL,cAAK;IACL,KAAK,EAAL,aAAK;IACL,MAAM,EAAE,oBAAQ;IAChB,OAAO,EAAP,kBAAO;IACP,OAAO,EAAP,kBAAO;IACP,QAAQ,EAAR,oBAAQ;IACR,KAAK,EAAL,cAAK;IACL,MAAM,EAAN,gBAAM;IACN,MAAM,EAAN,gBAAM;IACN,MAAM,EAAN,gBAAM;IACN,SAAS,EAAT,sBAAS;IACT,YAAY,EAAZ,4BAAY;CACb,CAAA;AAQC,8BAAS;AANX,2GAA2G;AAC3G,gFAAgF;AAChF,8FAA8F;AAC9F,2BAAmB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Int } from './int';
|
|
2
|
+
import { BinaryParser } from '../serdes/binary-parser';
|
|
3
|
+
/**
|
|
4
|
+
* Derived Int class for serializing/deserializing signed 32-bit integers.
|
|
5
|
+
*/
|
|
6
|
+
declare class Int32 extends Int {
|
|
7
|
+
protected static readonly width: number;
|
|
8
|
+
static readonly defaultInt32: Int32;
|
|
9
|
+
static readonly MIN_VALUE: number;
|
|
10
|
+
static readonly MAX_VALUE: number;
|
|
11
|
+
constructor(bytes: Uint8Array);
|
|
12
|
+
/**
|
|
13
|
+
* Construct an Int32 from a BinaryParser
|
|
14
|
+
*
|
|
15
|
+
* @param parser BinaryParser to read Int32 from
|
|
16
|
+
* @returns An Int32 object
|
|
17
|
+
*/
|
|
18
|
+
static fromParser(parser: BinaryParser): Int;
|
|
19
|
+
/**
|
|
20
|
+
* Construct an Int32 object from a number or string
|
|
21
|
+
*
|
|
22
|
+
* @param val Int32 object, number, or string
|
|
23
|
+
* @returns An Int32 object
|
|
24
|
+
*/
|
|
25
|
+
static from<T extends Int32 | number | string>(val: T): Int32;
|
|
26
|
+
/**
|
|
27
|
+
* Get the value of the Int32 object
|
|
28
|
+
*
|
|
29
|
+
* @returns the signed 32-bit integer represented by this.bytes
|
|
30
|
+
*/
|
|
31
|
+
valueOf(): number;
|
|
32
|
+
}
|
|
33
|
+
export { Int32 };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Int32 = void 0;
|
|
4
|
+
const int_1 = require("./int");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Derived Int class for serializing/deserializing signed 32-bit integers.
|
|
8
|
+
*/
|
|
9
|
+
class Int32 extends int_1.Int {
|
|
10
|
+
constructor(bytes) {
|
|
11
|
+
super(bytes !== null && bytes !== void 0 ? bytes : Int32.defaultInt32.bytes);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Construct an Int32 from a BinaryParser
|
|
15
|
+
*
|
|
16
|
+
* @param parser BinaryParser to read Int32 from
|
|
17
|
+
* @returns An Int32 object
|
|
18
|
+
*/
|
|
19
|
+
static fromParser(parser) {
|
|
20
|
+
return new Int32(parser.read(Int32.width));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Construct an Int32 object from a number or string
|
|
24
|
+
*
|
|
25
|
+
* @param val Int32 object, number, or string
|
|
26
|
+
* @returns An Int32 object
|
|
27
|
+
*/
|
|
28
|
+
static from(val) {
|
|
29
|
+
if (val instanceof Int32) {
|
|
30
|
+
return val;
|
|
31
|
+
}
|
|
32
|
+
const buf = new Uint8Array(Int32.width);
|
|
33
|
+
if (typeof val === 'string') {
|
|
34
|
+
const num = Number(val);
|
|
35
|
+
if (!Number.isFinite(num) || !Number.isInteger(num)) {
|
|
36
|
+
throw new Error(`Cannot construct Int32 from string: ${val}`);
|
|
37
|
+
}
|
|
38
|
+
Int32.checkIntRange('Int32', num, Int32.MIN_VALUE, Int32.MAX_VALUE);
|
|
39
|
+
(0, utils_1.writeInt32BE)(buf, num, 0);
|
|
40
|
+
return new Int32(buf);
|
|
41
|
+
}
|
|
42
|
+
if (typeof val === 'number' && Number.isInteger(val)) {
|
|
43
|
+
Int32.checkIntRange('Int32', val, Int32.MIN_VALUE, Int32.MAX_VALUE);
|
|
44
|
+
(0, utils_1.writeInt32BE)(buf, val, 0);
|
|
45
|
+
return new Int32(buf);
|
|
46
|
+
}
|
|
47
|
+
throw new Error('Cannot construct Int32 from given value');
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get the value of the Int32 object
|
|
51
|
+
*
|
|
52
|
+
* @returns the signed 32-bit integer represented by this.bytes
|
|
53
|
+
*/
|
|
54
|
+
valueOf() {
|
|
55
|
+
return (0, utils_1.readInt32BE)(this.bytes, 0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.Int32 = Int32;
|
|
59
|
+
Int32.width = 32 / 8; // 4 bytes
|
|
60
|
+
Int32.defaultInt32 = new Int32(new Uint8Array(Int32.width));
|
|
61
|
+
// Signed 32-bit integer range
|
|
62
|
+
Int32.MIN_VALUE = -2147483648; // -2^31
|
|
63
|
+
Int32.MAX_VALUE = 2147483647; // 2^31 - 1
|
|
64
|
+
//# sourceMappingURL=int-32.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"int-32.js","sourceRoot":"","sources":["../../../src/types/int-32.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,oCAAoD;AAEpD;;GAEG;AACH,MAAM,KAAM,SAAQ,SAAG;IAQrB,YAAY,KAAiB;QAC3B,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IAC1C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,MAAoB;QACpC,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAC5C,CAAC;IAED;;;;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,CAAC,UAAU;AAC3C,kBAAY,GAAU,IAAI,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;AAE5E,8BAA8B;AACd,eAAS,GAAW,CAAC,UAAU,CAAA,CAAC,QAAQ;AACxC,eAAS,GAAW,UAAU,CAAA,CAAC,WAAW"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Comparable } from './serialized-type';
|
|
2
|
+
/**
|
|
3
|
+
* Base class for serializing and deserializing signed integers.
|
|
4
|
+
*/
|
|
5
|
+
declare abstract class Int extends Comparable<Int | number> {
|
|
6
|
+
protected static width: number;
|
|
7
|
+
constructor(bytes: Uint8Array);
|
|
8
|
+
/**
|
|
9
|
+
* Overload of compareTo for Comparable
|
|
10
|
+
*
|
|
11
|
+
* @param other other Int to compare this to
|
|
12
|
+
* @returns -1, 0, or 1 depending on how the objects relate to each other
|
|
13
|
+
*/
|
|
14
|
+
compareTo(other: Int | number): number;
|
|
15
|
+
/**
|
|
16
|
+
* Convert an Int object to JSON
|
|
17
|
+
*
|
|
18
|
+
* @returns number or string represented by this.bytes
|
|
19
|
+
*/
|
|
20
|
+
toJSON(): number | string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the value of the Int represented by this.bytes
|
|
23
|
+
*
|
|
24
|
+
* @returns the value
|
|
25
|
+
*/
|
|
26
|
+
abstract valueOf(): number | bigint;
|
|
27
|
+
/**
|
|
28
|
+
* Validate that a number is within the specified signed integer range
|
|
29
|
+
*
|
|
30
|
+
* @param typeName The name of the type (for error messages)
|
|
31
|
+
* @param val The number to validate
|
|
32
|
+
* @param min The minimum allowed value
|
|
33
|
+
* @param max The maximum allowed value
|
|
34
|
+
* @throws Error if the value is out of range
|
|
35
|
+
*/
|
|
36
|
+
static checkIntRange(typeName: string, val: number | bigint, min: number | bigint, max: number | bigint): void;
|
|
37
|
+
}
|
|
38
|
+
export { Int };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Int = void 0;
|
|
4
|
+
const serialized_type_1 = require("./serialized-type");
|
|
5
|
+
/**
|
|
6
|
+
* Compare numbers and bigInts n1 and n2
|
|
7
|
+
*
|
|
8
|
+
* @param n1 First object to compare
|
|
9
|
+
* @param n2 Second object to compare
|
|
10
|
+
* @returns -1, 0, or 1, depending on how the two objects compare
|
|
11
|
+
*/
|
|
12
|
+
function compare(n1, n2) {
|
|
13
|
+
return n1 < n2 ? -1 : n1 == n2 ? 0 : 1;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Base class for serializing and deserializing signed integers.
|
|
17
|
+
*/
|
|
18
|
+
class Int extends serialized_type_1.Comparable {
|
|
19
|
+
constructor(bytes) {
|
|
20
|
+
super(bytes);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Overload of compareTo for Comparable
|
|
24
|
+
*
|
|
25
|
+
* @param other other Int to compare this to
|
|
26
|
+
* @returns -1, 0, or 1 depending on how the objects relate to each other
|
|
27
|
+
*/
|
|
28
|
+
compareTo(other) {
|
|
29
|
+
return compare(this.valueOf(), other.valueOf());
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Convert an Int object to JSON
|
|
33
|
+
*
|
|
34
|
+
* @returns number or string represented by this.bytes
|
|
35
|
+
*/
|
|
36
|
+
toJSON() {
|
|
37
|
+
const val = this.valueOf();
|
|
38
|
+
return typeof val === 'number' ? val : val.toString();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Validate that a number is within the specified signed integer range
|
|
42
|
+
*
|
|
43
|
+
* @param typeName The name of the type (for error messages)
|
|
44
|
+
* @param val The number to validate
|
|
45
|
+
* @param min The minimum allowed value
|
|
46
|
+
* @param max The maximum allowed value
|
|
47
|
+
* @throws Error if the value is out of range
|
|
48
|
+
*/
|
|
49
|
+
// eslint-disable-next-line max-params -- for error clarity in browsers
|
|
50
|
+
static checkIntRange(typeName, val, min, max) {
|
|
51
|
+
if (val < min || val > max) {
|
|
52
|
+
throw new Error(`Invalid ${typeName}: ${val} must be >= ${min} and <= ${max}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.Int = Int;
|
|
57
|
+
//# sourceMappingURL=int.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"int.js","sourceRoot":"","sources":["../../../src/types/int.ts"],"names":[],"mappings":";;;AAAA,uDAA8C;AAE9C;;;;;;GAMG;AACH,SAAS,OAAO,CAAC,EAAmB,EAAE,EAAmB;IACvD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACxC,CAAC;AAED;;GAEG;AACH,MAAe,GAAI,SAAQ,4BAAwB;IAGjD,YAAY,KAAiB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAA;IACd,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,KAAmB;QAC3B,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;IACjD,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;QAC1B,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;IACvD,CAAC;IASD;;;;;;;;OAQG;IACH,uEAAuE;IACvE,MAAM,CAAC,aAAa,CAClB,QAAgB,EAChB,GAAoB,EACpB,GAAoB,EACpB,GAAoB;QAEpB,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,EAAE;YAC1B,MAAM,IAAI,KAAK,CACb,WAAW,QAAQ,KAAK,GAAG,eAAe,GAAG,WAAW,GAAG,EAAE,CAC9D,CAAA;SACF;IACH,CAAC;CACF;AAEQ,kBAAG"}
|
|
@@ -7,8 +7,9 @@ const utils_1 = require("../utils");
|
|
|
7
7
|
* Constants for mantissa and exponent normalization per XRPL Number spec.
|
|
8
8
|
* These define allowed magnitude for mantissa and exponent after normalization.
|
|
9
9
|
*/
|
|
10
|
-
const MIN_MANTISSA = BigInt('
|
|
11
|
-
const MAX_MANTISSA = BigInt('
|
|
10
|
+
const MIN_MANTISSA = BigInt('1000000000000000000'); // 10^18
|
|
11
|
+
const MAX_MANTISSA = BigInt('9999999999999999999'); // 10^19 - 1
|
|
12
|
+
const MAX_INT64 = BigInt('9223372036854775807'); // 2^63 - 1, max signed 64-bit integer
|
|
12
13
|
const MIN_EXPONENT = -32768;
|
|
13
14
|
const MAX_EXPONENT = 32768;
|
|
14
15
|
const DEFAULT_VALUE_EXPONENT = -2147483648;
|
|
@@ -56,6 +57,11 @@ function extractNumberPartsFromString(val) {
|
|
|
56
57
|
}
|
|
57
58
|
if (expPart)
|
|
58
59
|
exponent += parseInt(expPart, 10);
|
|
60
|
+
// Remove trailing zeros from mantissa and adjust exponent
|
|
61
|
+
while (mantissaStr.length > 1 && mantissaStr.endsWith('0')) {
|
|
62
|
+
mantissaStr = mantissaStr.slice(0, -1);
|
|
63
|
+
exponent += 1;
|
|
64
|
+
}
|
|
59
65
|
let mantissa = BigInt(mantissaStr);
|
|
60
66
|
if (sign === '-')
|
|
61
67
|
mantissa = -mantissa;
|
|
@@ -65,7 +71,7 @@ function extractNumberPartsFromString(val) {
|
|
|
65
71
|
/**
|
|
66
72
|
* Normalize the mantissa and exponent to XRPL constraints.
|
|
67
73
|
*
|
|
68
|
-
* Ensures that after normalization, the mantissa is between MIN_MANTISSA and
|
|
74
|
+
* Ensures that after normalization, the mantissa is between MIN_MANTISSA and MAX_INT64.
|
|
69
75
|
* Adjusts the exponent as needed by shifting the mantissa left/right (multiplying/dividing by 10).
|
|
70
76
|
*
|
|
71
77
|
* @param mantissa - The unnormalized mantissa (BigInt).
|
|
@@ -76,16 +82,57 @@ function extractNumberPartsFromString(val) {
|
|
|
76
82
|
function normalize(mantissa, exponent) {
|
|
77
83
|
let m = mantissa < BigInt(0) ? -mantissa : mantissa;
|
|
78
84
|
const isNegative = mantissa < BigInt(0);
|
|
79
|
-
|
|
85
|
+
// Handle zero
|
|
86
|
+
if (m === BigInt(0)) {
|
|
87
|
+
return { mantissa: BigInt(0), exponent: DEFAULT_VALUE_EXPONENT };
|
|
88
|
+
}
|
|
89
|
+
// Grow mantissa until it reaches MIN_MANTISSA
|
|
90
|
+
while (m < MIN_MANTISSA && exponent > MIN_EXPONENT) {
|
|
80
91
|
exponent -= 1;
|
|
81
92
|
m *= BigInt(10);
|
|
82
93
|
}
|
|
94
|
+
let lastDigit = null;
|
|
95
|
+
// Shrink mantissa until it fits within MAX_MANTISSA
|
|
83
96
|
while (m > MAX_MANTISSA) {
|
|
84
|
-
if (exponent >= MAX_EXPONENT)
|
|
97
|
+
if (exponent >= MAX_EXPONENT) {
|
|
85
98
|
throw new Error('Mantissa and exponent are too large');
|
|
99
|
+
}
|
|
86
100
|
exponent += 1;
|
|
101
|
+
lastDigit = m % BigInt(10);
|
|
87
102
|
m /= BigInt(10);
|
|
88
103
|
}
|
|
104
|
+
// Handle underflow: if exponent too small or mantissa too small, throw error
|
|
105
|
+
if (exponent < MIN_EXPONENT || m < MIN_MANTISSA) {
|
|
106
|
+
throw new Error('Underflow: value too small to represent');
|
|
107
|
+
}
|
|
108
|
+
// Handle overflow: if exponent exceeds MAX_EXPONENT after growing.
|
|
109
|
+
if (exponent > MAX_EXPONENT) {
|
|
110
|
+
throw new Error('Exponent overflow: value too large to represent');
|
|
111
|
+
}
|
|
112
|
+
// Handle overflow: if mantissa exceeds MAX_INT64 (2^63-1) after growing.
|
|
113
|
+
if (m > MAX_INT64) {
|
|
114
|
+
if (exponent >= MAX_EXPONENT) {
|
|
115
|
+
throw new Error('Exponent overflow: value too large to represent');
|
|
116
|
+
}
|
|
117
|
+
exponent += 1;
|
|
118
|
+
lastDigit = m % BigInt(10);
|
|
119
|
+
m /= BigInt(10);
|
|
120
|
+
}
|
|
121
|
+
if (lastDigit != null && lastDigit >= BigInt(5)) {
|
|
122
|
+
m += BigInt(1);
|
|
123
|
+
// After rounding, mantissa may exceed MAX_INT64 again
|
|
124
|
+
if (m > MAX_INT64) {
|
|
125
|
+
if (exponent >= MAX_EXPONENT) {
|
|
126
|
+
throw new Error('Exponent overflow: value too large to represent');
|
|
127
|
+
}
|
|
128
|
+
lastDigit = m % BigInt(10);
|
|
129
|
+
exponent += 1;
|
|
130
|
+
m /= BigInt(10);
|
|
131
|
+
if (lastDigit >= BigInt(5)) {
|
|
132
|
+
m += BigInt(1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
89
136
|
if (isNegative)
|
|
90
137
|
m = -m;
|
|
91
138
|
return { mantissa: m, exponent };
|
|
@@ -139,18 +186,8 @@ class STNumber extends serialized_type_1.SerializedType {
|
|
|
139
186
|
* @throws Error if val is not a valid number string.
|
|
140
187
|
*/
|
|
141
188
|
static fromValue(val) {
|
|
142
|
-
const { mantissa, exponent
|
|
143
|
-
|
|
144
|
-
let normalizedExponent;
|
|
145
|
-
if (mantissa === BigInt(0) && exponent === 0 && !isNegative) {
|
|
146
|
-
normalizedMantissa = BigInt(0);
|
|
147
|
-
normalizedExponent = DEFAULT_VALUE_EXPONENT;
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
;
|
|
151
|
-
({ mantissa: normalizedMantissa, exponent: normalizedExponent } =
|
|
152
|
-
normalize(mantissa, exponent));
|
|
153
|
-
}
|
|
189
|
+
const { mantissa, exponent } = extractNumberPartsFromString(val);
|
|
190
|
+
const { mantissa: normalizedMantissa, exponent: normalizedExponent } = normalize(mantissa, exponent);
|
|
154
191
|
const bytes = new Uint8Array(12);
|
|
155
192
|
(0, utils_1.writeInt64BE)(bytes, normalizedMantissa, 0);
|
|
156
193
|
(0, utils_1.writeInt32BE)(bytes, normalizedExponent, 8);
|
|
@@ -171,35 +208,53 @@ class STNumber extends serialized_type_1.SerializedType {
|
|
|
171
208
|
*
|
|
172
209
|
* @returns String representation of the value
|
|
173
210
|
*/
|
|
174
|
-
// eslint-disable-next-line complexity -- required
|
|
175
211
|
toJSON() {
|
|
176
212
|
const b = this.bytes;
|
|
177
|
-
if (!b || b.length !== 12)
|
|
213
|
+
if (!b || (b === null || b === void 0 ? void 0 : b.length) !== 12)
|
|
178
214
|
throw new Error('STNumber internal bytes not set or wrong length');
|
|
179
215
|
// Signed 64-bit mantissa
|
|
180
216
|
const mantissa = (0, utils_1.readInt64BE)(b, 0);
|
|
181
217
|
// Signed 32-bit exponent
|
|
182
|
-
|
|
218
|
+
let exponent = (0, utils_1.readInt32BE)(b, 8);
|
|
183
219
|
// Special zero: XRPL encodes canonical zero as mantissa=0, exponent=DEFAULT_VALUE_EXPONENT.
|
|
184
220
|
if (mantissa === BigInt(0) && exponent === DEFAULT_VALUE_EXPONENT) {
|
|
185
221
|
return '0';
|
|
186
222
|
}
|
|
187
|
-
if (exponent === 0)
|
|
188
|
-
return mantissa.toString();
|
|
189
|
-
// Use scientific notation for small/large exponents, decimal otherwise
|
|
190
|
-
if (exponent < -25 || exponent > -5) {
|
|
191
|
-
return `${mantissa}e${exponent}`;
|
|
192
|
-
}
|
|
193
|
-
// Decimal rendering for -25 <= exp <= -5
|
|
194
223
|
const isNegative = mantissa < BigInt(0);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
224
|
+
let mantissaAbs = isNegative ? -mantissa : mantissa;
|
|
225
|
+
// If mantissa < MIN_MANTISSA, it was shrunk for int64 serialization (mantissa > 2^63-1).
|
|
226
|
+
// Restore it for proper string rendering to match rippled's internal representation.
|
|
227
|
+
if (mantissaAbs !== BigInt(0) && mantissaAbs < MIN_MANTISSA) {
|
|
228
|
+
mantissaAbs *= BigInt(10);
|
|
229
|
+
exponent -= 1;
|
|
230
|
+
}
|
|
231
|
+
// For large mantissa range (default), rangeLog = 18
|
|
232
|
+
const rangeLog = 18;
|
|
233
|
+
// Use scientific notation for exponents that are too small or too large
|
|
234
|
+
// Condition from rippled: exponent != 0 AND (exponent < -(rangeLog + 10) OR exponent > -(rangeLog - 10))
|
|
235
|
+
// For rangeLog = 18: exponent != 0 AND (exponent < -28 OR exponent > -8)
|
|
236
|
+
if (exponent !== 0 &&
|
|
237
|
+
(exponent < -(rangeLog + 10) || exponent > -(rangeLog - 10))) {
|
|
238
|
+
// Strip trailing zeros from mantissa (matches rippled behavior)
|
|
239
|
+
let exp = exponent;
|
|
240
|
+
while (mantissaAbs !== BigInt(0) &&
|
|
241
|
+
mantissaAbs % BigInt(10) === BigInt(0) &&
|
|
242
|
+
exp < MAX_EXPONENT) {
|
|
243
|
+
mantissaAbs /= BigInt(10);
|
|
244
|
+
exp += 1;
|
|
245
|
+
}
|
|
246
|
+
const sign = isNegative ? '-' : '';
|
|
247
|
+
return `${sign}${mantissaAbs}e${exp}`;
|
|
248
|
+
}
|
|
249
|
+
// Decimal rendering for -(rangeLog + 10) <= exponent <= -(rangeLog - 10)
|
|
250
|
+
// i.e., -28 <= exponent <= -8, or exponent == 0
|
|
251
|
+
const padPrefix = rangeLog + 12; // 30
|
|
252
|
+
const padSuffix = rangeLog + 8; // 26
|
|
198
253
|
const mantissaStr = mantissaAbs.toString();
|
|
199
254
|
const rawValue = '0'.repeat(padPrefix) + mantissaStr + '0'.repeat(padSuffix);
|
|
200
|
-
const
|
|
201
|
-
const integerPart = rawValue.slice(0,
|
|
202
|
-
const fractionPart = rawValue.slice(
|
|
255
|
+
const offset = exponent + padPrefix + rangeLog + 1; // exponent + 49
|
|
256
|
+
const integerPart = rawValue.slice(0, offset).replace(/^0+/, '') || '0';
|
|
257
|
+
const fractionPart = rawValue.slice(offset).replace(/0+$/, '');
|
|
203
258
|
return `${isNegative ? '-' : ''}${integerPart}${fractionPart ? '.' + fractionPart : ''}`;
|
|
204
259
|
}
|
|
205
260
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"st-number.js","sourceRoot":"","sources":["../../../src/types/st-number.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"st-number.js","sourceRoot":"","sources":["../../../src/types/st-number.ts"],"names":[],"mappings":";;;AAEA,uDAAkD;AAClD,oCAA+E;AAE/E;;;GAGG;AACH,MAAM,YAAY,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA,CAAC,QAAQ;AAC3D,MAAM,YAAY,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA,CAAC,YAAY;AAC/D,MAAM,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA,CAAC,sCAAsC;AACtF,MAAM,YAAY,GAAG,CAAC,KAAK,CAAA;AAC3B,MAAM,YAAY,GAAG,KAAK,CAAA;AAC1B,MAAM,sBAAsB,GAAG,CAAC,UAAU,CAAA;AAE1C;;;;;;;;;;;GAWG;AACH,SAAS,4BAA4B,CAAC,GAAW;IAK/C;;;;;;;;;;;;;;OAcG;IACH,sDAAsD;IACtD,MAAM,KAAK,GAAG,wDAAwD,CAAA;IACtE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC7B,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,GAAG,EAAE,CAAC,CAAA;IAEzE,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,GAAG,KAAK,CAAA;IAClD,4DAA4D;IAC5D,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,GAAG,CAAA;IAE5D,IAAI,WAAW,GAAG,YAAY,CAAA;IAC9B,IAAI,QAAQ,GAAG,CAAC,CAAA;IAEhB,IAAI,QAAQ,EAAE;QACZ,WAAW,IAAI,QAAQ,CAAA;QACvB,QAAQ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AAC,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,CAAA;QACvE,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAE9D,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,GAC3C,YAAY,CAAC,CAAC,CAAC,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,EACtC,EAAE,CAAA;IACJ,CAAC;;AAzIH,4BA0IC;AAzIC,gDAAgD;AACzC,qBAAY,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -22,13 +22,13 @@ class UInt16 extends uint_1.UInt {
|
|
|
22
22
|
if (val instanceof UInt16) {
|
|
23
23
|
return val;
|
|
24
24
|
}
|
|
25
|
-
if (typeof val === 'number') {
|
|
25
|
+
if (typeof val === 'number' && Number.isInteger(val)) {
|
|
26
26
|
UInt16.checkUintRange(val, 0, 0xffff);
|
|
27
27
|
const buf = new Uint8Array(UInt16.width);
|
|
28
28
|
(0, utils_1.writeUInt16BE)(buf, val, 0);
|
|
29
29
|
return new UInt16(buf);
|
|
30
30
|
}
|
|
31
|
-
throw new Error('
|
|
31
|
+
throw new Error('Cannot construct UInt16 from given value');
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* get the value of a UInt16 object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uint-16.js","sourceRoot":"","sources":["../../../src/types/uint-16.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B,oCAAsD;AAEtD;;GAEG;AACH,MAAM,MAAO,SAAQ,WAAI;IAMvB,YAAY,KAAiB;QAC3B,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,MAAoB;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AIG;IACH,OAAO;QACL,OAAO,QAAQ,CAAC,IAAA,oBAAY,EAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;IAC9C,CAAC;;AAGM,wBAAM;AA5Ca,YAAK,GAAW,EAAE,GAAG,CAAC,CAAA,CAAC,IAAI;AACrC,oBAAa,GAAW,IAAI,MAAM,CAChD,IAAI,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAC7B,CAAA"}
|
|
@@ -28,7 +28,7 @@ class UInt32 extends uint_1.UInt {
|
|
|
28
28
|
(0, utils_1.writeUInt32BE)(buf, num, 0);
|
|
29
29
|
return new UInt32(buf);
|
|
30
30
|
}
|
|
31
|
-
if (typeof val === 'number') {
|
|
31
|
+
if (typeof val === 'number' && Number.isInteger(val)) {
|
|
32
32
|
UInt32.checkUintRange(val, 0, 0xffffffff);
|
|
33
33
|
(0, utils_1.writeUInt32BE)(buf, val, 0);
|
|
34
34
|
return new UInt32(buf);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uint-32.js","sourceRoot":"","sources":["../../../src/types/uint-32.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B,oCAAsD;AAEtD;;GAEG;AACH,MAAM,MAAO,SAAQ,WAAI;IAMvB,YAAY,KAAiB;QAC3B,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,MAAoB;QACpC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IAC9C,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAqC,GAAM;QACpD,IAAI,GAAG,YAAY,MAAM,EAAE;YACzB,OAAO,GAAG,CAAA;SACX;QAED,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,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