ripple-binary-codec 1.4.2 → 1.4.3
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/binary.js +25 -29
- package/dist/binary.js.map +1 -1
- package/dist/coretypes.js +31 -8
- package/dist/coretypes.js.map +1 -1
- package/dist/enums/bytes.d.ts +26 -0
- package/dist/enums/bytes.js +64 -0
- package/dist/enums/bytes.js.map +1 -0
- package/dist/enums/constants.d.ts +4 -0
- package/dist/enums/constants.js +8 -0
- package/dist/enums/constants.js.map +1 -0
- package/dist/enums/definitions.json +2330 -1971
- package/dist/enums/field.d.ts +29 -0
- package/dist/enums/field.js +59 -0
- package/dist/enums/field.js.map +1 -0
- package/dist/enums/index.js +69 -60
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/src/enums/definitions.json +2337 -0
- package/dist/enums/utils-renumber.js +14 -14
- package/dist/enums/utils-renumber.js.map +1 -1
- package/dist/enums/xrpl-definitions-base.d.ts +44 -0
- package/dist/enums/xrpl-definitions-base.js +64 -0
- package/dist/enums/xrpl-definitions-base.js.map +1 -0
- package/dist/enums/xrpl-definitions.d.ts +21 -0
- package/dist/enums/xrpl-definitions.js +28 -0
- package/dist/enums/xrpl-definitions.js.map +1 -0
- package/dist/hash-prefixes.js +3 -3
- package/dist/hash-prefixes.js.map +1 -1
- package/dist/hashes.js +21 -43
- package/dist/hashes.js.map +1 -1
- package/dist/index.d.ts +2 -12
- package/dist/index.js +39 -16
- package/dist/index.js.map +1 -1
- package/dist/ledger-hashes.d.ts +1 -1
- package/dist/ledger-hashes.js +51 -28
- package/dist/ledger-hashes.js.map +1 -1
- package/dist/quality.js +18 -21
- package/dist/quality.js.map +1 -1
- package/dist/serdes/binary-parser.js +78 -56
- package/dist/serdes/binary-parser.js.map +1 -1
- package/dist/serdes/binary-serializer.js +59 -40
- package/dist/serdes/binary-serializer.js.map +1 -1
- package/dist/shamap.js +70 -98
- package/dist/shamap.js.map +1 -1
- package/dist/types/account-id.js +18 -35
- package/dist/types/account-id.js.map +1 -1
- package/dist/types/amount.js +71 -88
- package/dist/types/amount.js.map +1 -1
- package/dist/types/blob.js +10 -27
- package/dist/types/blob.js.map +1 -1
- package/dist/types/currency.js +26 -44
- package/dist/types/currency.js.map +1 -1
- package/dist/types/hash-128.d.ts +6 -0
- package/dist/types/hash-128.js +23 -25
- package/dist/types/hash-128.js.map +1 -1
- package/dist/types/hash-160.js +8 -25
- package/dist/types/hash-160.js.map +1 -1
- package/dist/types/hash-256.js +8 -25
- package/dist/types/hash-256.js.map +1 -1
- package/dist/types/hash.js +20 -38
- package/dist/types/hash.js.map +1 -1
- package/dist/types/index.js +18 -18
- package/dist/types/index.js.map +1 -1
- package/dist/types/path-set.js +57 -87
- package/dist/types/path-set.js.map +1 -1
- package/dist/types/serialized-type.d.ts +3 -3
- package/dist/types/serialized-type.js +35 -56
- package/dist/types/serialized-type.js.map +1 -1
- package/dist/types/st-array.js +26 -46
- package/dist/types/st-array.js.map +1 -1
- package/dist/types/st-object.js +49 -73
- package/dist/types/st-object.js.map +1 -1
- package/dist/types/uint-16.js +15 -32
- package/dist/types/uint-16.js.map +1 -1
- package/dist/types/uint-32.js +16 -33
- package/dist/types/uint-32.js.map +1 -1
- package/dist/types/uint-64.d.ts +1 -1
- package/dist/types/uint-64.js +30 -47
- package/dist/types/uint-64.js.map +1 -1
- package/dist/types/uint-8.js +15 -32
- package/dist/types/uint-8.js.map +1 -1
- package/dist/types/uint.d.ts +1 -1
- package/dist/types/uint.js +10 -27
- package/dist/types/uint.js.map +1 -1
- package/dist/types/vector-256.js +23 -40
- package/dist/types/vector-256.js.map +1 -1
- package/package.json +6 -8
- package/test/amount.test.js +1 -1
- package/test/binary-json.test.js +1 -1
- package/test/binary-parser.test.js +4 -4
- package/test/binary-serializer.test.js +3 -3
- package/test/fixtures/data-driven-tests.json +0 -14
- package/test/hash.test.js +28 -2
- package/test/ledger.test.js +1 -1
- package/test/lower-case-hex.test.js +1 -1
- package/test/pseudo-transaction.test.js +1 -1
- package/test/quality.test.js +1 -1
- package/test/shamap.test.js +3 -3
- package/test/signing-data-encoding.test.js +1 -1
- package/test/tx-encode-decode.test.js +1 -1
- package/test/types.test.js +2 -2
- package/test/uint.test.js +2 -2
- package/test/x-address.test.js +1 -1
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.BinarySerializer = exports.BytesList = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
27
|
+
const assert = __importStar(require("assert"));
|
|
28
|
+
const buffer_1 = require("buffer/");
|
|
6
29
|
/**
|
|
7
30
|
* Bytes list is a collection of buffer objects
|
|
8
31
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
32
|
+
class BytesList {
|
|
33
|
+
constructor() {
|
|
11
34
|
this.bytesArray = [];
|
|
12
35
|
}
|
|
13
36
|
/**
|
|
@@ -15,42 +38,41 @@ var BytesList = /** @class */ (function () {
|
|
|
15
38
|
*
|
|
16
39
|
* @return the number of bytes
|
|
17
40
|
*/
|
|
18
|
-
|
|
41
|
+
getLength() {
|
|
19
42
|
return buffer_1.Buffer.concat(this.bytesArray).byteLength;
|
|
20
|
-
}
|
|
43
|
+
}
|
|
21
44
|
/**
|
|
22
45
|
* Put bytes in the BytesList
|
|
23
46
|
*
|
|
24
47
|
* @param bytesArg A Buffer
|
|
25
48
|
* @return this BytesList
|
|
26
49
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
50
|
+
put(bytesArg) {
|
|
51
|
+
const bytes = buffer_1.Buffer.from(bytesArg); // Temporary, to catch instances of Uint8Array being passed in
|
|
29
52
|
this.bytesArray.push(bytes);
|
|
30
53
|
return this;
|
|
31
|
-
}
|
|
54
|
+
}
|
|
32
55
|
/**
|
|
33
56
|
* Write this BytesList to the back of another bytes list
|
|
34
57
|
*
|
|
35
58
|
* @param list The BytesList to write to
|
|
36
59
|
*/
|
|
37
|
-
|
|
60
|
+
toBytesSink(list) {
|
|
38
61
|
list.put(this.toBytes());
|
|
39
|
-
}
|
|
40
|
-
|
|
62
|
+
}
|
|
63
|
+
toBytes() {
|
|
41
64
|
return buffer_1.Buffer.concat(this.bytesArray);
|
|
42
|
-
}
|
|
43
|
-
|
|
65
|
+
}
|
|
66
|
+
toHex() {
|
|
44
67
|
return this.toBytes().toString('hex').toUpperCase();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
}());
|
|
68
|
+
}
|
|
69
|
+
}
|
|
48
70
|
exports.BytesList = BytesList;
|
|
49
71
|
/**
|
|
50
72
|
* BinarySerializer is used to write fields and values to buffers
|
|
51
73
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
class BinarySerializer {
|
|
75
|
+
constructor(sink) {
|
|
54
76
|
this.sink = new BytesList();
|
|
55
77
|
this.sink = sink;
|
|
56
78
|
}
|
|
@@ -59,41 +81,41 @@ var BinarySerializer = /** @class */ (function () {
|
|
|
59
81
|
*
|
|
60
82
|
* @param value a SerializedType value
|
|
61
83
|
*/
|
|
62
|
-
|
|
84
|
+
write(value) {
|
|
63
85
|
value.toBytesSink(this.sink);
|
|
64
|
-
}
|
|
86
|
+
}
|
|
65
87
|
/**
|
|
66
88
|
* Write bytes to this BinarySerializer
|
|
67
89
|
*
|
|
68
90
|
* @param bytes the bytes to write
|
|
69
91
|
*/
|
|
70
|
-
|
|
92
|
+
put(bytes) {
|
|
71
93
|
this.sink.put(bytes);
|
|
72
|
-
}
|
|
94
|
+
}
|
|
73
95
|
/**
|
|
74
96
|
* Write a value of a given type to this BinarySerializer
|
|
75
97
|
*
|
|
76
98
|
* @param type the type to write
|
|
77
99
|
* @param value a value of that type
|
|
78
100
|
*/
|
|
79
|
-
|
|
101
|
+
writeType(type, value) {
|
|
80
102
|
this.write(type.from(value));
|
|
81
|
-
}
|
|
103
|
+
}
|
|
82
104
|
/**
|
|
83
105
|
* Write BytesList to this BinarySerializer
|
|
84
106
|
*
|
|
85
107
|
* @param bl BytesList to write to BinarySerializer
|
|
86
108
|
*/
|
|
87
|
-
|
|
109
|
+
writeBytesList(bl) {
|
|
88
110
|
bl.toBytesSink(this.sink);
|
|
89
|
-
}
|
|
111
|
+
}
|
|
90
112
|
/**
|
|
91
113
|
* Calculate the header of Variable Length encoded bytes
|
|
92
114
|
*
|
|
93
115
|
* @param length the length of the bytes
|
|
94
116
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
117
|
+
encodeVariableLength(length) {
|
|
118
|
+
const lenBytes = buffer_1.Buffer.alloc(3);
|
|
97
119
|
if (length <= 192) {
|
|
98
120
|
lenBytes[0] = length;
|
|
99
121
|
return lenBytes.slice(0, 1);
|
|
@@ -112,16 +134,15 @@ var BinarySerializer = /** @class */ (function () {
|
|
|
112
134
|
return lenBytes.slice(0, 3);
|
|
113
135
|
}
|
|
114
136
|
throw new Error('Overflow error');
|
|
115
|
-
}
|
|
137
|
+
}
|
|
116
138
|
/**
|
|
117
139
|
* Write field and value to BinarySerializer
|
|
118
140
|
*
|
|
119
141
|
* @param field field to write to BinarySerializer
|
|
120
142
|
* @param value value to write to BinarySerializer
|
|
121
143
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
var associatedValue = field.associatedType.from(value);
|
|
144
|
+
writeFieldAndValue(field, value, isUnlModifyWorkaround = false) {
|
|
145
|
+
const associatedValue = field.associatedType.from(value);
|
|
125
146
|
assert.ok(associatedValue.toBytesSink !== undefined);
|
|
126
147
|
assert.ok(field.name !== undefined);
|
|
127
148
|
this.sink.put(field.header);
|
|
@@ -131,23 +152,21 @@ var BinarySerializer = /** @class */ (function () {
|
|
|
131
152
|
else {
|
|
132
153
|
associatedValue.toBytesSink(this.sink);
|
|
133
154
|
}
|
|
134
|
-
}
|
|
155
|
+
}
|
|
135
156
|
/**
|
|
136
157
|
* Write a variable length encoded value to the BinarySerializer
|
|
137
158
|
*
|
|
138
159
|
* @param value length encoded value to write to BytesList
|
|
139
160
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
var bytes = new BytesList();
|
|
161
|
+
writeLengthEncoded(value, isUnlModifyWorkaround = false) {
|
|
162
|
+
const bytes = new BytesList();
|
|
143
163
|
if (!isUnlModifyWorkaround) {
|
|
144
164
|
// this part doesn't happen for the Account field in a UNLModify transaction
|
|
145
165
|
value.toBytesSink(bytes);
|
|
146
166
|
}
|
|
147
167
|
this.put(this.encodeVariableLength(bytes.getLength()));
|
|
148
168
|
this.writeBytesList(bytes);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
}());
|
|
169
|
+
}
|
|
170
|
+
}
|
|
152
171
|
exports.BinarySerializer = BinarySerializer;
|
|
153
172
|
//# sourceMappingURL=binary-serializer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-serializer.js","sourceRoot":"","sources":["../../src/serdes/binary-serializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"binary-serializer.js","sourceRoot":"","sources":["../../src/serdes/binary-serializer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAGhC,oCAAgC;AAEhC;;GAEG;AACH,MAAM,SAAS;IAAf;QACU,eAAU,GAAkB,EAAE,CAAA;IAuCxC,CAAC;IArCC;;;;OAIG;IACI,SAAS;QACd,OAAO,eAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,UAAU,CAAA;IAClD,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,QAAgB;QACzB,MAAM,KAAK,GAAG,eAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA,CAAC,8DAA8D;QAClG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3B,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,IAAe;QAChC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;IAC1B,CAAC;IAEM,OAAO;QACZ,OAAO,eAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACvC,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAA;IACrD,CAAC;CACF;AAqHQ,8BAAS;AAnHlB;;GAEG;AACH,MAAM,gBAAgB;IAGpB,YAAY,IAAe;QAFnB,SAAI,GAAc,IAAI,SAAS,EAAE,CAAA;QAGvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAqB;QACzB,KAAK,CAAC,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
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.ShaMapLeaf = exports.ShaMapNode = exports.ShaMap = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
const assert_1 = require("assert");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const hash_prefixes_1 = require("./hash-prefixes");
|
|
7
|
+
const hashes_1 = require("./hashes");
|
|
8
|
+
const buffer_1 = require("buffer/");
|
|
24
9
|
/**
|
|
25
10
|
* Abstract class describing a SHAMapNode
|
|
26
11
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
return ShaMapNode;
|
|
31
|
-
}());
|
|
12
|
+
class ShaMapNode {
|
|
13
|
+
}
|
|
32
14
|
exports.ShaMapNode = ShaMapNode;
|
|
33
15
|
/**
|
|
34
16
|
* Class describing a Leaf of SHAMap
|
|
35
17
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
_this.item = item;
|
|
42
|
-
return _this;
|
|
18
|
+
class ShaMapLeaf extends ShaMapNode {
|
|
19
|
+
constructor(index, item) {
|
|
20
|
+
super();
|
|
21
|
+
this.index = index;
|
|
22
|
+
this.item = item;
|
|
43
23
|
}
|
|
44
24
|
/**
|
|
45
25
|
* @returns true as ShaMapLeaf is a leaf node
|
|
46
26
|
*/
|
|
47
|
-
|
|
27
|
+
isLeaf() {
|
|
48
28
|
return true;
|
|
49
|
-
}
|
|
29
|
+
}
|
|
50
30
|
/**
|
|
51
31
|
* @returns false as ShaMapLeaf is not an inner node
|
|
52
32
|
*/
|
|
53
|
-
|
|
33
|
+
isInner() {
|
|
54
34
|
return false;
|
|
55
|
-
}
|
|
35
|
+
}
|
|
56
36
|
/**
|
|
57
37
|
* Get the prefix of the this.item
|
|
58
38
|
*
|
|
59
39
|
* @returns The hash prefix, unless this.item is undefined, then it returns an empty Buffer
|
|
60
40
|
*/
|
|
61
|
-
|
|
41
|
+
hashPrefix() {
|
|
62
42
|
return this.item === undefined ? buffer_1.Buffer.alloc(0) : this.item.hashPrefix();
|
|
63
|
-
}
|
|
43
|
+
}
|
|
64
44
|
/**
|
|
65
45
|
* Hash the bytes representation of this
|
|
66
46
|
*
|
|
67
47
|
* @returns hash of this.item concatenated with this.index
|
|
68
48
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
hash() {
|
|
50
|
+
const hash = hashes_1.Sha512Half.put(this.hashPrefix());
|
|
71
51
|
this.toBytesSink(hash);
|
|
72
52
|
return hash.finish();
|
|
73
|
-
}
|
|
53
|
+
}
|
|
74
54
|
/**
|
|
75
55
|
* Write the bytes representation of this to a BytesList
|
|
76
56
|
* @param list BytesList to write bytes to
|
|
77
57
|
*/
|
|
78
|
-
|
|
58
|
+
toBytesSink(list) {
|
|
79
59
|
if (this.item !== undefined) {
|
|
80
60
|
this.item.toBytesSink(list);
|
|
81
61
|
}
|
|
82
62
|
this.index.toBytesSink(list);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}(ShaMapNode));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
86
65
|
exports.ShaMapLeaf = ShaMapLeaf;
|
|
87
66
|
/**
|
|
88
67
|
* Class defining an Inner Node of a SHAMap
|
|
89
68
|
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_this.slotBits = 0;
|
|
97
|
-
_this.branches = Array(16);
|
|
98
|
-
return _this;
|
|
69
|
+
class ShaMapInner extends ShaMapNode {
|
|
70
|
+
constructor(depth = 0) {
|
|
71
|
+
super();
|
|
72
|
+
this.depth = depth;
|
|
73
|
+
this.slotBits = 0;
|
|
74
|
+
this.branches = Array(16);
|
|
99
75
|
}
|
|
100
76
|
/**
|
|
101
77
|
* @returns true as ShaMapInner is an inner node
|
|
102
78
|
*/
|
|
103
|
-
|
|
79
|
+
isInner() {
|
|
104
80
|
return true;
|
|
105
|
-
}
|
|
81
|
+
}
|
|
106
82
|
/**
|
|
107
83
|
* @returns false as ShaMapInner is not a leaf node
|
|
108
84
|
*/
|
|
109
|
-
|
|
85
|
+
isLeaf() {
|
|
110
86
|
return false;
|
|
111
|
-
}
|
|
87
|
+
}
|
|
112
88
|
/**
|
|
113
89
|
* Get the hash prefix for this node
|
|
114
90
|
*
|
|
115
91
|
* @returns hash prefix describing an inner node
|
|
116
92
|
*/
|
|
117
|
-
|
|
93
|
+
hashPrefix() {
|
|
118
94
|
return hash_prefixes_1.HashPrefix.innerNode;
|
|
119
|
-
}
|
|
95
|
+
}
|
|
120
96
|
/**
|
|
121
97
|
* Set a branch of this node to be another node
|
|
122
98
|
*
|
|
123
99
|
* @param slot Slot to add branch to this.branches
|
|
124
100
|
* @param branch Branch to add
|
|
125
101
|
*/
|
|
126
|
-
|
|
102
|
+
setBranch(slot, branch) {
|
|
127
103
|
this.slotBits = this.slotBits | (1 << slot);
|
|
128
104
|
this.branches[slot] = branch;
|
|
129
|
-
}
|
|
105
|
+
}
|
|
130
106
|
/**
|
|
131
107
|
* @returns true if node is empty
|
|
132
108
|
*/
|
|
133
|
-
|
|
109
|
+
empty() {
|
|
134
110
|
return this.slotBits === 0;
|
|
135
|
-
}
|
|
111
|
+
}
|
|
136
112
|
/**
|
|
137
113
|
* Compute the hash of this node
|
|
138
114
|
*
|
|
139
115
|
* @returns The hash of this node
|
|
140
116
|
*/
|
|
141
|
-
|
|
117
|
+
hash() {
|
|
142
118
|
if (this.empty()) {
|
|
143
119
|
return types_1.coreTypes.Hash256.ZERO_256;
|
|
144
120
|
}
|
|
145
|
-
|
|
121
|
+
const hash = hashes_1.Sha512Half.put(this.hashPrefix());
|
|
146
122
|
this.toBytesSink(hash);
|
|
147
123
|
return hash.finish();
|
|
148
|
-
}
|
|
124
|
+
}
|
|
149
125
|
/**
|
|
150
126
|
* Writes the bytes representation of this node to a BytesList
|
|
151
127
|
*
|
|
152
128
|
* @param list BytesList to write bytes to
|
|
153
129
|
*/
|
|
154
|
-
|
|
155
|
-
for (
|
|
156
|
-
|
|
157
|
-
|
|
130
|
+
toBytesSink(list) {
|
|
131
|
+
for (let i = 0; i < this.branches.length; i++) {
|
|
132
|
+
const branch = this.branches[i];
|
|
133
|
+
const hash = branch ? branch.hash() : types_1.coreTypes.Hash256.ZERO_256;
|
|
158
134
|
hash.toBytesSink(list);
|
|
159
135
|
}
|
|
160
|
-
}
|
|
136
|
+
}
|
|
161
137
|
/**
|
|
162
138
|
* Add item to the SHAMap
|
|
163
139
|
*
|
|
@@ -165,34 +141,30 @@ var ShaMapInner = /** @class */ (function (_super) {
|
|
|
165
141
|
* @param item Item to insert in the map
|
|
166
142
|
* @param leaf Leaf node to insert when branch doesn't exist
|
|
167
143
|
*/
|
|
168
|
-
|
|
144
|
+
addItem(index, item, leaf) {
|
|
169
145
|
assert_1.strict.ok(index !== undefined);
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
existing
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
146
|
+
if (index !== undefined) {
|
|
147
|
+
const nibble = index.nibblet(this.depth);
|
|
148
|
+
const existing = this.branches[nibble];
|
|
149
|
+
if (existing === undefined) {
|
|
150
|
+
this.setBranch(nibble, leaf || new ShaMapLeaf(index, item));
|
|
151
|
+
}
|
|
152
|
+
else if (existing instanceof ShaMapLeaf) {
|
|
153
|
+
const newInner = new ShaMapInner(this.depth + 1);
|
|
154
|
+
newInner.addItem(existing.index, undefined, existing);
|
|
155
|
+
newInner.addItem(index, item, leaf);
|
|
156
|
+
this.setBranch(nibble, newInner);
|
|
157
|
+
}
|
|
158
|
+
else if (existing instanceof ShaMapInner) {
|
|
159
|
+
existing.addItem(index, item, leaf);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
throw new Error('invalid ShaMap.addItem call');
|
|
163
|
+
}
|
|
186
164
|
}
|
|
187
|
-
};
|
|
188
|
-
return ShaMapInner;
|
|
189
|
-
}(ShaMapNode));
|
|
190
|
-
var ShaMap = /** @class */ (function (_super) {
|
|
191
|
-
__extends(ShaMap, _super);
|
|
192
|
-
function ShaMap() {
|
|
193
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
194
165
|
}
|
|
195
|
-
|
|
196
|
-
|
|
166
|
+
}
|
|
167
|
+
class ShaMap extends ShaMapInner {
|
|
168
|
+
}
|
|
197
169
|
exports.ShaMap = ShaMap;
|
|
198
170
|
//# sourceMappingURL=shamap.js.map
|
package/dist/shamap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shamap.js","sourceRoot":"","sources":["../src/shamap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shamap.js","sourceRoot":"","sources":["../src/shamap.ts"],"names":[],"mappings":";;;AAAA,mCAAyC;AACzC,mCAAmC;AACnC,mDAA4C;AAC5C,qCAAqC;AAGrC,oCAAgC;AAEhC;;G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AE,IAAiB,EAAE,IAAiB;QAC3D,eAAM,CAAC,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAA;QAC9B,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YAEtC,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC1B,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAA;aAC5D;iBAAM,IAAI,QAAQ,YAAY,UAAU,EAAE;gBACzC,MAAM,QAAQ,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;gBAChD,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;gBACrD,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;gBACnC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;aACjC;iBAAM,IAAI,QAAQ,YAAY,WAAW,EAAE;gBAC1C,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;aACpC;iBAAM;gBACL,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;aAC/C;SACF;IACH,CAAC;CACF;AAED,MAAM,MAAO,SAAQ,WAAW;CAAG;AAE1B,wBAAM"}
|
package/dist/types/account-id.js
CHANGED
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.AccountID = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
const ripple_address_codec_1 = require("ripple-address-codec");
|
|
5
|
+
const hash_160_1 = require("./hash-160");
|
|
6
|
+
const buffer_1 = require("buffer/");
|
|
7
|
+
const HEX_REGEX = /^[A-F0-9]{40}$/;
|
|
23
8
|
/**
|
|
24
9
|
* Class defining how to encode and decode an AccountID
|
|
25
10
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return _super.call(this, bytes !== null && bytes !== void 0 ? bytes : AccountID.defaultAccountID.bytes) || this;
|
|
11
|
+
class AccountID extends hash_160_1.Hash160 {
|
|
12
|
+
constructor(bytes) {
|
|
13
|
+
super(bytes !== null && bytes !== void 0 ? bytes : AccountID.defaultAccountID.bytes);
|
|
30
14
|
}
|
|
31
15
|
/**
|
|
32
16
|
* Defines how to construct an AccountID
|
|
@@ -34,7 +18,7 @@ var AccountID = /** @class */ (function (_super) {
|
|
|
34
18
|
* @param value either an existing AccountID, a hex-string, or a base58 r-Address
|
|
35
19
|
* @returns an AccountID object
|
|
36
20
|
*/
|
|
37
|
-
|
|
21
|
+
static from(value) {
|
|
38
22
|
if (value instanceof AccountID) {
|
|
39
23
|
return value;
|
|
40
24
|
}
|
|
@@ -47,42 +31,41 @@ var AccountID = /** @class */ (function (_super) {
|
|
|
47
31
|
: this.fromBase58(value);
|
|
48
32
|
}
|
|
49
33
|
throw new Error('Cannot construct AccountID from value given');
|
|
50
|
-
}
|
|
34
|
+
}
|
|
51
35
|
/**
|
|
52
36
|
* Defines how to build an AccountID from a base58 r-Address
|
|
53
37
|
*
|
|
54
38
|
* @param value a base58 r-Address
|
|
55
39
|
* @returns an AccountID object
|
|
56
40
|
*/
|
|
57
|
-
|
|
41
|
+
static fromBase58(value) {
|
|
58
42
|
if ((0, ripple_address_codec_1.isValidXAddress)(value)) {
|
|
59
|
-
|
|
43
|
+
const classic = (0, ripple_address_codec_1.xAddressToClassicAddress)(value);
|
|
60
44
|
if (classic.tag !== false)
|
|
61
45
|
throw new Error('Only allowed to have tag on Account or Destination');
|
|
62
46
|
value = classic.classicAddress;
|
|
63
47
|
}
|
|
64
48
|
return new AccountID(buffer_1.Buffer.from((0, ripple_address_codec_1.decodeAccountID)(value)));
|
|
65
|
-
}
|
|
49
|
+
}
|
|
66
50
|
/**
|
|
67
51
|
* Overload of toJSON
|
|
68
52
|
*
|
|
69
53
|
* @returns the base58 string for this AccountID
|
|
70
54
|
*/
|
|
71
|
-
|
|
55
|
+
toJSON() {
|
|
72
56
|
return this.toBase58();
|
|
73
|
-
}
|
|
57
|
+
}
|
|
74
58
|
/**
|
|
75
59
|
* Defines how to encode AccountID into a base58 address
|
|
76
60
|
*
|
|
77
61
|
* @returns the base58 string defined by this.bytes
|
|
78
62
|
*/
|
|
79
|
-
|
|
63
|
+
toBase58() {
|
|
80
64
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
81
65
|
return (0, ripple_address_codec_1.encodeAccountID)(this.bytes);
|
|
82
66
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return AccountID;
|
|
86
|
-
}(hash_160_1.Hash160));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
87
69
|
exports.AccountID = AccountID;
|
|
70
|
+
AccountID.defaultAccountID = new AccountID(buffer_1.Buffer.alloc(20));
|
|
88
71
|
//# sourceMappingURL=account-id.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-id.js","sourceRoot":"","sources":["../../src/types/account-id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"account-id.js","sourceRoot":"","sources":["../../src/types/account-id.ts"],"names":[],"mappings":";;;AAAA,+DAK6B;AAC7B,yCAAoC;AACpC,oCAAgC;AAEhC,MAAM,SAAS,GAAG,gBAAgB,CAAA;AAElC;;GAEG;AACH,MAAM,SAAU,SAAQ,kBAAO;IAG7B,YAAY,KAAc;QACxB,KAAK,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAA;IAClD,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAAI,CAA6B,KAAQ;QAC9C,IAAI,KAAK,YAAY,SAAS,EAAE;YAC9B,OAAO,KAAK,CAAA;SACb;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,IAAI,KAAK,KAAK,EAAE,EAAE;gBAChB,OAAO,IAAI,SAAS,EAAE,CAAA;aACvB;YAED,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC1B,CAAC,CAAC,IAAI,SAAS,CAAC,eAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAC1C,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;SAC3B;QAED,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;IAChE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,KAAa;QAC7B,IAAI,IAAA,sCAAe,EAAC,KAAK,CAAC,EAAE;YAC1B,MAAM,OAAO,GAAG,IAAA,+CAAwB,EAA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