ripple-binary-codec 1.0.0 → 1.0.1-mpt-beta

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.
Files changed (333) hide show
  1. package/README.md +11 -4
  2. package/dist/binary.d.ts +34 -20
  3. package/dist/binary.js +51 -34
  4. package/dist/binary.js.map +1 -1
  5. package/dist/coretypes.d.ts +9 -9
  6. package/dist/coretypes.js +33 -9
  7. package/dist/coretypes.js.map +1 -1
  8. package/dist/enums/bytes.d.ts +25 -0
  9. package/dist/enums/bytes.js +63 -0
  10. package/dist/enums/bytes.js.map +1 -0
  11. package/dist/enums/constants.d.ts +4 -0
  12. package/dist/enums/constants.js +8 -0
  13. package/dist/enums/constants.js.map +1 -0
  14. package/dist/enums/definitions.json +2954 -1760
  15. package/dist/enums/field.d.ts +28 -0
  16. package/dist/enums/field.js +58 -0
  17. package/dist/enums/field.js.map +1 -0
  18. package/dist/enums/index.d.ts +12 -46
  19. package/dist/enums/index.js +22 -110
  20. package/dist/enums/index.js.map +1 -1
  21. package/dist/enums/src/enums/definitions.json +2961 -0
  22. package/dist/enums/utils-renumber.js +20 -20
  23. package/dist/enums/utils-renumber.js.map +1 -1
  24. package/dist/enums/xrpl-definitions-base.d.ts +44 -0
  25. package/dist/enums/xrpl-definitions-base.js +59 -0
  26. package/dist/enums/xrpl-definitions-base.js.map +1 -0
  27. package/dist/enums/xrpl-definitions.d.ts +21 -0
  28. package/dist/enums/xrpl-definitions.js +29 -0
  29. package/dist/enums/xrpl-definitions.js.map +1 -0
  30. package/dist/hash-prefixes.d.ts +1 -2
  31. package/dist/hash-prefixes.js +7 -6
  32. package/dist/hash-prefixes.js.map +1 -1
  33. package/dist/hashes.d.ts +7 -8
  34. package/dist/hashes.js +23 -44
  35. package/dist/hashes.js.map +1 -1
  36. package/dist/index.d.ts +16 -17
  37. package/dist/index.js +65 -40
  38. package/dist/index.js.map +1 -1
  39. package/dist/ledger-hashes.d.ts +6 -3
  40. package/dist/ledger-hashes.js +40 -33
  41. package/dist/ledger-hashes.js.map +1 -1
  42. package/dist/quality.d.ts +3 -4
  43. package/dist/quality.js +20 -19
  44. package/dist/quality.js.map +1 -1
  45. package/dist/serdes/binary-parser.d.ts +8 -6
  46. package/dist/serdes/binary-parser.js +74 -64
  47. package/dist/serdes/binary-parser.js.map +1 -1
  48. package/dist/serdes/binary-serializer.d.ts +10 -11
  49. package/dist/serdes/binary-serializer.js +50 -48
  50. package/dist/serdes/binary-serializer.js.map +1 -1
  51. package/dist/shamap.d.ts +6 -7
  52. package/dist/shamap.js +74 -97
  53. package/dist/shamap.js.map +1 -1
  54. package/dist/src/binary.d.ts +90 -0
  55. package/dist/src/binary.js +128 -0
  56. package/dist/src/binary.js.map +1 -0
  57. package/dist/src/coretypes.d.ts +9 -0
  58. package/dist/src/coretypes.js +48 -0
  59. package/dist/src/coretypes.js.map +1 -0
  60. package/dist/src/enums/bytes.d.ts +25 -0
  61. package/dist/src/enums/bytes.js +63 -0
  62. package/dist/src/enums/bytes.js.map +1 -0
  63. package/dist/src/enums/constants.d.ts +4 -0
  64. package/dist/src/enums/constants.js +8 -0
  65. package/dist/src/enums/constants.js.map +1 -0
  66. package/dist/src/enums/definitions.json +2956 -0
  67. package/dist/src/enums/field.d.ts +28 -0
  68. package/dist/src/enums/field.js +58 -0
  69. package/dist/src/enums/field.js.map +1 -0
  70. package/dist/src/enums/index.d.ts +12 -0
  71. package/dist/src/enums/index.js +31 -0
  72. package/dist/src/enums/index.js.map +1 -0
  73. package/dist/src/enums/utils-renumber.d.ts +101 -0
  74. package/dist/src/enums/utils-renumber.js +127 -0
  75. package/dist/src/enums/utils-renumber.js.map +1 -0
  76. package/dist/src/enums/xrpl-definitions-base.d.ts +44 -0
  77. package/dist/src/enums/xrpl-definitions-base.js +59 -0
  78. package/dist/src/enums/xrpl-definitions-base.js.map +1 -0
  79. package/dist/src/enums/xrpl-definitions.d.ts +21 -0
  80. package/dist/src/enums/xrpl-definitions.js +29 -0
  81. package/dist/src/enums/xrpl-definitions.js.map +1 -0
  82. package/dist/src/hash-prefixes.d.ts +5 -0
  83. package/dist/src/hash-prefixes.js +41 -0
  84. package/dist/src/hash-prefixes.js.map +1 -0
  85. package/dist/src/hashes.d.ts +50 -0
  86. package/dist/src/hashes.js +76 -0
  87. package/dist/src/hashes.js.map +1 -0
  88. package/dist/src/index.d.ts +64 -0
  89. package/dist/src/index.js +123 -0
  90. package/dist/src/index.js.map +1 -0
  91. package/dist/src/ledger-hashes.d.ts +48 -0
  92. package/dist/src/ledger-hashes.js +141 -0
  93. package/dist/src/ledger-hashes.js.map +1 -0
  94. package/dist/src/quality.d.ts +21 -0
  95. package/dist/src/quality.js +42 -0
  96. package/dist/src/quality.js.map +1 -0
  97. package/dist/src/serdes/binary-parser.d.ts +100 -0
  98. package/dist/src/serdes/binary-parser.js +194 -0
  99. package/dist/src/serdes/binary-parser.js.map +1 -0
  100. package/dist/src/serdes/binary-serializer.d.ts +81 -0
  101. package/dist/src/serdes/binary-serializer.js +149 -0
  102. package/dist/src/serdes/binary-serializer.js.map +1 -0
  103. package/dist/src/shamap.d.ts +102 -0
  104. package/dist/src/shamap.js +172 -0
  105. package/dist/src/shamap.js.map +1 -0
  106. package/dist/src/types/account-id.d.ts +35 -0
  107. package/dist/src/types/account-id.js +69 -0
  108. package/dist/src/types/account-id.js.map +1 -0
  109. package/dist/src/types/amount.d.ts +91 -0
  110. package/dist/src/types/amount.js +289 -0
  111. package/dist/src/types/amount.js.map +1 -0
  112. package/dist/src/types/blob.d.ts +24 -0
  113. package/dist/src/types/blob.js +40 -0
  114. package/dist/src/types/blob.js.map +1 -0
  115. package/dist/src/types/currency.d.ts +28 -0
  116. package/dist/src/types/currency.js +127 -0
  117. package/dist/src/types/currency.js.map +1 -0
  118. package/dist/src/types/hash-128.d.ts +16 -0
  119. package/dist/src/types/hash-128.js +32 -0
  120. package/dist/src/types/hash-128.js.map +1 -0
  121. package/dist/src/types/hash-160.d.ts +10 -0
  122. package/dist/src/types/hash-160.js +19 -0
  123. package/dist/src/types/hash-160.js.map +1 -0
  124. package/dist/src/types/hash-192.d.ts +10 -0
  125. package/dist/src/types/hash-192.js +19 -0
  126. package/dist/src/types/hash-192.js.map +1 -0
  127. package/dist/src/types/hash-256.d.ts +10 -0
  128. package/dist/src/types/hash-256.js +16 -0
  129. package/dist/src/types/hash-256.js.map +1 -0
  130. package/dist/src/types/hash.d.ts +40 -0
  131. package/dist/src/types/hash.js +73 -0
  132. package/dist/src/types/hash.js.map +1 -0
  133. package/dist/src/types/index.d.ts +19 -0
  134. package/dist/src/types/index.js +64 -0
  135. package/dist/src/types/index.js.map +1 -0
  136. package/dist/src/types/issue.d.ts +38 -0
  137. package/dist/src/types/issue.js +81 -0
  138. package/dist/src/types/issue.js.map +1 -0
  139. package/dist/src/types/path-set.d.ts +36 -0
  140. package/dist/src/types/path-set.js +233 -0
  141. package/dist/src/types/path-set.js.map +1 -0
  142. package/dist/src/types/serialized-type.d.ts +70 -0
  143. package/dist/src/types/serialized-type.js +105 -0
  144. package/dist/src/types/serialized-type.js.map +1 -0
  145. package/dist/src/types/st-array.d.ts +31 -0
  146. package/dist/src/types/st-array.js +83 -0
  147. package/dist/src/types/st-array.js.map +1 -0
  148. package/dist/src/types/st-object.d.ts +32 -0
  149. package/dist/src/types/st-object.js +155 -0
  150. package/dist/src/types/st-object.js.map +1 -0
  151. package/dist/src/types/uint-16.d.ts +24 -0
  152. package/dist/src/types/uint-16.js +45 -0
  153. package/dist/src/types/uint-16.js.map +1 -0
  154. package/dist/src/types/uint-32.d.ts +24 -0
  155. package/dist/src/types/uint-32.js +50 -0
  156. package/dist/src/types/uint-32.js.map +1 -0
  157. package/dist/src/types/uint-64.d.ts +37 -0
  158. package/dist/src/types/uint-64.js +86 -0
  159. package/dist/src/types/uint-64.js.map +1 -0
  160. package/dist/src/types/uint-8.d.ts +24 -0
  161. package/dist/src/types/uint-8.js +46 -0
  162. package/dist/src/types/uint-8.js.map +1 -0
  163. package/dist/src/types/uint.d.ts +29 -0
  164. package/dist/src/types/uint.js +47 -0
  165. package/dist/src/types/uint.js.map +1 -0
  166. package/dist/src/types/vector-256.d.ts +30 -0
  167. package/dist/src/types/vector-256.js +73 -0
  168. package/dist/src/types/vector-256.js.map +1 -0
  169. package/dist/src/types/xchain-bridge.d.ts +44 -0
  170. package/dist/src/types/xchain-bridge.js +102 -0
  171. package/dist/src/types/xchain-bridge.js.map +1 -0
  172. package/dist/src/utils.d.ts +47 -0
  173. package/dist/src/utils.js +137 -0
  174. package/dist/src/utils.js.map +1 -0
  175. package/dist/tsconfig.tsbuildinfo +1 -0
  176. package/dist/types/account-id.d.ts +2 -3
  177. package/dist/types/account-id.js +29 -37
  178. package/dist/types/account-id.js.map +1 -1
  179. package/dist/types/amount.d.ts +33 -10
  180. package/dist/types/amount.js +181 -101
  181. package/dist/types/amount.js.map +1 -1
  182. package/dist/types/blob.d.ts +3 -4
  183. package/dist/types/blob.js +13 -27
  184. package/dist/types/blob.js.map +1 -1
  185. package/dist/types/currency.d.ts +5 -13
  186. package/dist/types/currency.js +52 -65
  187. package/dist/types/currency.js.map +1 -1
  188. package/dist/types/hash-128.d.ts +8 -3
  189. package/dist/types/hash-128.js +23 -22
  190. package/dist/types/hash-128.js.map +1 -1
  191. package/dist/types/hash-160.d.ts +2 -3
  192. package/dist/types/hash-160.js +7 -24
  193. package/dist/types/hash-160.js.map +1 -1
  194. package/dist/types/hash-192.d.ts +10 -0
  195. package/dist/types/hash-192.js +19 -0
  196. package/dist/types/hash-192.js.map +1 -0
  197. package/dist/types/hash-256.d.ts +2 -3
  198. package/dist/types/hash-256.js +7 -22
  199. package/dist/types/hash-256.js.map +1 -1
  200. package/dist/types/hash.d.ts +4 -5
  201. package/dist/types/hash.js +25 -39
  202. package/dist/types/hash.js.map +1 -1
  203. package/dist/types/index.d.ts +19 -33
  204. package/dist/types/index.js +44 -24
  205. package/dist/types/index.js.map +1 -1
  206. package/dist/types/issue.d.ts +38 -0
  207. package/dist/types/issue.js +81 -0
  208. package/dist/types/issue.js.map +1 -0
  209. package/dist/types/path-set.d.ts +2 -2
  210. package/dist/types/path-set.js +73 -94
  211. package/dist/types/path-set.js.map +1 -1
  212. package/dist/types/serialized-type.d.ts +26 -18
  213. package/dist/types/serialized-type.js +50 -60
  214. package/dist/types/serialized-type.js.map +1 -1
  215. package/dist/types/st-array.d.ts +7 -4
  216. package/dist/types/st-array.js +33 -47
  217. package/dist/types/st-array.js.map +1 -1
  218. package/dist/types/st-object.d.ts +8 -5
  219. package/dist/types/st-object.js +73 -70
  220. package/dist/types/st-object.js.map +1 -1
  221. package/dist/types/uint-16.d.ts +3 -4
  222. package/dist/types/uint-16.js +20 -33
  223. package/dist/types/uint-16.js.map +1 -1
  224. package/dist/types/uint-32.d.ts +3 -4
  225. package/dist/types/uint-32.js +23 -36
  226. package/dist/types/uint-32.js.map +1 -1
  227. package/dist/types/uint-64.d.ts +5 -6
  228. package/dist/types/uint-64.js +44 -48
  229. package/dist/types/uint-64.js.map +1 -1
  230. package/dist/types/uint-8.d.ts +3 -4
  231. package/dist/types/uint-8.js +21 -33
  232. package/dist/types/uint-8.js.map +1 -1
  233. package/dist/types/uint.d.ts +5 -5
  234. package/dist/types/uint.js +17 -27
  235. package/dist/types/uint.js.map +1 -1
  236. package/dist/types/vector-256.d.ts +3 -4
  237. package/dist/types/vector-256.js +28 -45
  238. package/dist/types/vector-256.js.map +1 -1
  239. package/dist/types/xchain-bridge.d.ts +44 -0
  240. package/dist/types/xchain-bridge.js +102 -0
  241. package/dist/types/xchain-bridge.js.map +1 -0
  242. package/dist/utils.d.ts +47 -0
  243. package/dist/utils.js +137 -0
  244. package/dist/utils.js.map +1 -0
  245. package/package.json +23 -33
  246. package/src/README.md +5 -0
  247. package/src/binary.ts +194 -0
  248. package/src/coretypes.ts +31 -0
  249. package/src/enums/README.md +144 -0
  250. package/src/enums/bytes.ts +74 -0
  251. package/src/enums/constants.ts +4 -0
  252. package/src/enums/definitions.json +2961 -0
  253. package/src/enums/field.ts +84 -0
  254. package/src/enums/index.ts +34 -0
  255. package/src/enums/utils-renumber.ts +134 -0
  256. package/src/enums/xrpl-definitions-base.ts +111 -0
  257. package/src/enums/xrpl-definitions.ts +32 -0
  258. package/src/hash-prefixes.ts +40 -0
  259. package/src/hashes.ts +75 -0
  260. package/src/index.ts +153 -0
  261. package/src/ledger-hashes.ts +191 -0
  262. package/src/quality.ts +38 -0
  263. package/src/serdes/binary-parser.ts +224 -0
  264. package/src/serdes/binary-serializer.ts +166 -0
  265. package/src/shamap.ts +186 -0
  266. package/src/types/account-id.ts +86 -0
  267. package/src/types/amount.ts +362 -0
  268. package/src/types/blob.ts +43 -0
  269. package/src/types/currency.ts +140 -0
  270. package/src/types/hash-128.ts +33 -0
  271. package/src/types/hash-160.ts +19 -0
  272. package/src/types/hash-192.ts +19 -0
  273. package/src/types/hash-256.ts +15 -0
  274. package/src/types/hash.ts +83 -0
  275. package/src/types/index.ts +66 -0
  276. package/src/types/issue.ts +96 -0
  277. package/src/types/path-set.ts +290 -0
  278. package/src/types/serialized-type.ts +122 -0
  279. package/src/types/st-array.ts +107 -0
  280. package/src/types/st-object.ts +192 -0
  281. package/src/types/uint-16.ts +53 -0
  282. package/src/types/uint-32.ts +59 -0
  283. package/src/types/uint-64.ts +104 -0
  284. package/src/types/uint-8.ts +52 -0
  285. package/src/types/uint.ts +60 -0
  286. package/src/types/vector-256.ts +79 -0
  287. package/src/types/xchain-bridge.ts +128 -0
  288. package/src/utils.ts +152 -0
  289. package/HISTORY.md +0 -68
  290. package/test/amount.test.js +0 -43
  291. package/test/binary-json.test.js +0 -47
  292. package/test/binary-parser.test.js +0 -397
  293. package/test/binary-serializer.test.js +0 -191
  294. package/test/fixtures/account-tx-transactions.db +0 -0
  295. package/test/fixtures/codec-fixtures.json +0 -4466
  296. package/test/fixtures/data-driven-tests.json +0 -3721
  297. package/test/fixtures/delivermin-tx-binary.json +0 -1
  298. package/test/fixtures/delivermin-tx.json +0 -98
  299. package/test/fixtures/deposit-preauth-tx-binary.json +0 -1
  300. package/test/fixtures/deposit-preauth-tx-meta-binary.json +0 -1
  301. package/test/fixtures/deposit-preauth-tx.json +0 -58
  302. package/test/fixtures/escrow-cancel-binary.json +0 -1
  303. package/test/fixtures/escrow-cancel-tx.json +0 -6
  304. package/test/fixtures/escrow-create-binary.json +0 -1
  305. package/test/fixtures/escrow-create-tx.json +0 -10
  306. package/test/fixtures/escrow-finish-binary.json +0 -1
  307. package/test/fixtures/escrow-finish-meta-binary.json +0 -1
  308. package/test/fixtures/escrow-finish-tx.json +0 -95
  309. package/test/fixtures/ledger-full-38129.json +0 -1
  310. package/test/fixtures/ledger-full-40000.json +0 -1
  311. package/test/fixtures/negative-unl.json +0 -12
  312. package/test/fixtures/payment-channel-claim-binary.json +0 -1
  313. package/test/fixtures/payment-channel-claim-tx.json +0 -8
  314. package/test/fixtures/payment-channel-create-binary.json +0 -1
  315. package/test/fixtures/payment-channel-create-tx.json +0 -11
  316. package/test/fixtures/payment-channel-fund-binary.json +0 -1
  317. package/test/fixtures/payment-channel-fund-tx.json +0 -7
  318. package/test/fixtures/signerlistset-tx-binary.json +0 -1
  319. package/test/fixtures/signerlistset-tx-meta-binary.json +0 -1
  320. package/test/fixtures/signerlistset-tx.json +0 -94
  321. package/test/fixtures/x-codec-fixtures.json +0 -188
  322. package/test/hash.test.js +0 -68
  323. package/test/ledger.test.js +0 -29
  324. package/test/lower-case-hex.test.js +0 -45
  325. package/test/pseudo-transaction.test.js +0 -38
  326. package/test/quality.test.js +0 -15
  327. package/test/shamap.test.js +0 -88
  328. package/test/signing-data-encoding.test.js +0 -129
  329. package/test/tx-encode-decode.test.js +0 -80
  330. package/test/types.test.js +0 -34
  331. package/test/uint.test.js +0 -40
  332. package/test/utils.js +0 -29
  333. package/test/x-address.test.js +0 -147
@@ -1,78 +1,65 @@
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
3
  exports.Hash = void 0;
17
- var serialized_type_1 = require("./serialized-type");
4
+ const serialized_type_1 = require("./serialized-type");
5
+ const utils_1 = require("@xrplf/isomorphic/utils");
6
+ const utils_2 = require("../utils");
18
7
  /**
19
8
  * Base class defining how to encode and decode hashes
20
9
  */
21
- var Hash = /** @class */ (function (_super) {
22
- __extends(Hash, _super);
23
- function Hash(bytes) {
24
- var _this = _super.call(this, bytes) || this;
25
- if (_this.bytes.byteLength !== _this.constructor.width) {
26
- throw new Error("Invalid Hash length " + _this.bytes.byteLength);
10
+ class Hash extends serialized_type_1.Comparable {
11
+ constructor(bytes) {
12
+ super(bytes);
13
+ if (this.bytes.length !== this.constructor.width) {
14
+ throw new Error(`Invalid Hash length ${this.bytes.byteLength}`);
27
15
  }
28
- return _this;
29
16
  }
30
17
  /**
31
18
  * Construct a Hash object from an existing Hash object or a hex-string
32
19
  *
33
20
  * @param value A hash object or hex-string of a hash
34
21
  */
35
- Hash.from = function (value) {
22
+ static from(value) {
36
23
  if (value instanceof this) {
37
24
  return value;
38
25
  }
39
- if (typeof value === "string") {
40
- return new this(Buffer.from(value, "hex"));
26
+ if (typeof value === 'string') {
27
+ return new this((0, utils_1.hexToBytes)(value));
41
28
  }
42
- throw new Error("Cannot construct Hash from given value");
43
- };
29
+ throw new Error('Cannot construct Hash from given value');
30
+ }
44
31
  /**
45
32
  * Read a Hash object from a BinaryParser
46
33
  *
47
34
  * @param parser BinaryParser to read the hash from
48
35
  * @param hint length of the bytes to read, optional
49
36
  */
50
- Hash.fromParser = function (parser, hint) {
37
+ static fromParser(parser, hint) {
51
38
  return new this(parser.read(hint !== null && hint !== void 0 ? hint : this.width));
52
- };
39
+ }
53
40
  /**
54
41
  * Overloaded operator for comparing two hash objects
55
42
  *
56
43
  * @param other The Hash to compare this to
57
44
  */
58
- Hash.prototype.compareTo = function (other) {
59
- return Buffer.compare(this.bytes, this.constructor.from(other).bytes);
60
- };
45
+ compareTo(other) {
46
+ return (0, utils_2.compare)(this.bytes, this.constructor.from(other).bytes);
47
+ }
61
48
  /**
62
49
  * @returns the hex-string representation of this Hash
63
50
  */
64
- Hash.prototype.toString = function () {
51
+ toString() {
65
52
  return this.toHex();
66
- };
53
+ }
67
54
  /**
68
55
  * Returns four bits at the specified depth within a hash
69
56
  *
70
57
  * @param depth The depth of the four bits
71
58
  * @returns The number represented by the four bits
72
59
  */
73
- Hash.prototype.nibblet = function (depth) {
74
- var byteIx = depth > 0 ? (depth / 2) | 0 : 0;
75
- var b = this.bytes[byteIx];
60
+ nibblet(depth) {
61
+ const byteIx = depth > 0 ? (depth / 2) | 0 : 0;
62
+ let b = this.bytes[byteIx];
76
63
  if (depth % 2 === 0) {
77
64
  b = (b & 0xf0) >>> 4;
78
65
  }
@@ -80,8 +67,7 @@ var Hash = /** @class */ (function (_super) {
80
67
  b = b & 0x0f;
81
68
  }
82
69
  return b;
83
- };
84
- return Hash;
85
- }(serialized_type_1.Comparable));
70
+ }
71
+ }
86
72
  exports.Hash = Hash;
87
73
  //# sourceMappingURL=hash.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/types/hash.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAA+C;AAG/C;;GAEG;AACH;IAAmB,wBAAU;IAG3B,cAAY,KAAa;QAAzB,YACE,kBAAM,KAAK,CAAC,SAIb;QAHC,IAAI,KAAI,CAAC,KAAK,CAAC,UAAU,KAAM,KAAI,CAAC,WAA2B,CAAC,KAAK,EAAE;YACrE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,KAAK,CACpD,CAAA;IACH,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,EAAE,CAAA;IACrB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,KAAa;QACnB,MAAM,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9C,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAC1B,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,EAAE;YACnB,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;SACrB;aAAM;YACL,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;SACb;QACD,OAAO,CAAC,CAAA;IACV,CAAC;CACF;AAEQ,oBAAI"}
@@ -1,33 +1,19 @@
1
- import { AccountID } from "./account-id";
2
- import { Amount } from "./amount";
3
- import { Blob } from "./blob";
4
- import { Currency } from "./currency";
5
- import { Hash128 } from "./hash-128";
6
- import { Hash160 } from "./hash-160";
7
- import { Hash256 } from "./hash-256";
8
- import { PathSet } from "./path-set";
9
- import { STArray } from "./st-array";
10
- import { STObject } from "./st-object";
11
- import { UInt16 } from "./uint-16";
12
- import { UInt32 } from "./uint-32";
13
- import { UInt64 } from "./uint-64";
14
- import { UInt8 } from "./uint-8";
15
- import { Vector256 } from "./vector-256";
16
- declare const coreTypes: {
17
- AccountID: typeof AccountID;
18
- Amount: typeof Amount;
19
- Blob: typeof Blob;
20
- Currency: typeof Currency;
21
- Hash128: typeof Hash128;
22
- Hash160: typeof Hash160;
23
- Hash256: typeof Hash256;
24
- PathSet: typeof PathSet;
25
- STArray: typeof STArray;
26
- STObject: typeof STObject;
27
- UInt8: typeof UInt8;
28
- UInt16: typeof UInt16;
29
- UInt32: typeof UInt32;
30
- UInt64: typeof UInt64;
31
- Vector256: typeof Vector256;
32
- };
33
- export { coreTypes };
1
+ import { AccountID } from './account-id';
2
+ import { Amount } from './amount';
3
+ import { Blob } from './blob';
4
+ import { Currency } from './currency';
5
+ import { Hash128 } from './hash-128';
6
+ import { Hash160 } from './hash-160';
7
+ import { Hash192 } from './hash-192';
8
+ import { Hash256 } from './hash-256';
9
+ import { PathSet } from './path-set';
10
+ import { STArray } from './st-array';
11
+ import { STObject } from './st-object';
12
+ import { UInt16 } from './uint-16';
13
+ import { UInt32 } from './uint-32';
14
+ import { UInt64 } from './uint-64';
15
+ import { UInt8 } from './uint-8';
16
+ import { Vector256 } from './vector-256';
17
+ import { type SerializedType } from './serialized-type';
18
+ 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, };
@@ -1,30 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.coreTypes = void 0;
4
- var enums_1 = require("../enums");
5
- var account_id_1 = require("./account-id");
6
- var amount_1 = require("./amount");
7
- var blob_1 = require("./blob");
8
- var currency_1 = require("./currency");
9
- var hash_128_1 = require("./hash-128");
10
- var hash_160_1 = require("./hash-160");
11
- var hash_256_1 = require("./hash-256");
12
- var path_set_1 = require("./path-set");
13
- var st_array_1 = require("./st-array");
14
- var st_object_1 = require("./st-object");
15
- var uint_16_1 = require("./uint-16");
16
- var uint_32_1 = require("./uint-32");
17
- var uint_64_1 = require("./uint-64");
18
- var uint_8_1 = require("./uint-8");
19
- var vector_256_1 = require("./vector-256");
20
- var coreTypes = {
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;
4
+ const account_id_1 = require("./account-id");
5
+ Object.defineProperty(exports, "AccountID", { enumerable: true, get: function () { return account_id_1.AccountID; } });
6
+ const amount_1 = require("./amount");
7
+ Object.defineProperty(exports, "Amount", { enumerable: true, get: function () { return amount_1.Amount; } });
8
+ const blob_1 = require("./blob");
9
+ Object.defineProperty(exports, "Blob", { enumerable: true, get: function () { return blob_1.Blob; } });
10
+ const currency_1 = require("./currency");
11
+ Object.defineProperty(exports, "Currency", { enumerable: true, get: function () { return currency_1.Currency; } });
12
+ const hash_128_1 = require("./hash-128");
13
+ Object.defineProperty(exports, "Hash128", { enumerable: true, get: function () { return hash_128_1.Hash128; } });
14
+ const hash_160_1 = require("./hash-160");
15
+ Object.defineProperty(exports, "Hash160", { enumerable: true, get: function () { return hash_160_1.Hash160; } });
16
+ const hash_192_1 = require("./hash-192");
17
+ Object.defineProperty(exports, "Hash192", { enumerable: true, get: function () { return hash_192_1.Hash192; } });
18
+ const hash_256_1 = require("./hash-256");
19
+ Object.defineProperty(exports, "Hash256", { enumerable: true, get: function () { return hash_256_1.Hash256; } });
20
+ const issue_1 = require("./issue");
21
+ const path_set_1 = require("./path-set");
22
+ Object.defineProperty(exports, "PathSet", { enumerable: true, get: function () { return path_set_1.PathSet; } });
23
+ const st_array_1 = require("./st-array");
24
+ Object.defineProperty(exports, "STArray", { enumerable: true, get: function () { return st_array_1.STArray; } });
25
+ const st_object_1 = require("./st-object");
26
+ Object.defineProperty(exports, "STObject", { enumerable: true, get: function () { return st_object_1.STObject; } });
27
+ const uint_16_1 = require("./uint-16");
28
+ Object.defineProperty(exports, "UInt16", { enumerable: true, get: function () { return uint_16_1.UInt16; } });
29
+ const uint_32_1 = require("./uint-32");
30
+ Object.defineProperty(exports, "UInt32", { enumerable: true, get: function () { return uint_32_1.UInt32; } });
31
+ const uint_64_1 = require("./uint-64");
32
+ Object.defineProperty(exports, "UInt64", { enumerable: true, get: function () { return uint_64_1.UInt64; } });
33
+ const uint_8_1 = require("./uint-8");
34
+ Object.defineProperty(exports, "UInt8", { enumerable: true, get: function () { return uint_8_1.UInt8; } });
35
+ const vector_256_1 = require("./vector-256");
36
+ Object.defineProperty(exports, "Vector256", { enumerable: true, get: function () { return vector_256_1.Vector256; } });
37
+ const xchain_bridge_1 = require("./xchain-bridge");
38
+ const enums_1 = require("../enums");
39
+ const coreTypes = {
21
40
  AccountID: account_id_1.AccountID,
22
41
  Amount: amount_1.Amount,
23
42
  Blob: blob_1.Blob,
24
43
  Currency: currency_1.Currency,
25
44
  Hash128: hash_128_1.Hash128,
26
45
  Hash160: hash_160_1.Hash160,
46
+ Hash192: hash_192_1.Hash192,
27
47
  Hash256: hash_256_1.Hash256,
48
+ Issue: issue_1.Issue,
28
49
  PathSet: path_set_1.PathSet,
29
50
  STArray: st_array_1.STArray,
30
51
  STObject: st_object_1.STObject,
@@ -33,12 +54,11 @@ var coreTypes = {
33
54
  UInt32: uint_32_1.UInt32,
34
55
  UInt64: uint_64_1.UInt64,
35
56
  Vector256: vector_256_1.Vector256,
57
+ XChainBridge: xchain_bridge_1.XChainBridge,
36
58
  };
37
59
  exports.coreTypes = coreTypes;
38
- Object.values(enums_1.Field).forEach(function (field) {
39
- field.associatedType = coreTypes[field.type.name];
40
- });
41
- enums_1.Field["TransactionType"].associatedType = enums_1.TransactionType;
42
- enums_1.Field["TransactionResult"].associatedType = enums_1.TransactionResult;
43
- enums_1.Field["LedgerEntryType"].associatedType = enums_1.LedgerEntryType;
60
+ // Ensures that the DEFAULT_DEFINITIONS object connects these types to fields for serializing/deserializing
61
+ // This is done here instead of in enums/index.ts to avoid a circular dependency
62
+ // because some of the above types depend on BinarySerializer which depends on enums/index.ts.
63
+ enums_1.DEFAULT_DEFINITIONS.associateTypes(coreTypes);
44
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,kCAKkB;AAClB,2CAAyC;AACzC,mCAAkC;AAClC,+BAA8B;AAC9B,u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iDlC,wFAjDO,kBAAO,OAiDP;AAhDT,yCAAoC;AAiDlC,wFAjDO,kBAAO,OAiDP;AAhDT,mCAA+B;AAC/B,yCAAoC;AAgDlC,wFAhDO,kBAAO,OAgDP;AA/CT,yCAAoC;AAgDlC,wFAhDO,kBAAO,OAgDP;AA/CT,2CAAsC;AAgDpC,yFAhDO,oBAAQ,OAgDP;AA/CV,uCAAkC;AAiDhC,uFAjDO,gBAAM,OAiDP;AAhDR,uCAAkC;AAiDhC,uFAjDO,gBAAM,OAiDP;AAhDR,uCAAkC;AAiDhC,uFAjDO,gBAAM,OAiDP;AAhDR,qCAAgC;AA6C9B,sFA7CO,cAAK,OA6CP;AA5CP,6CAAwC;AAgDtC,0FAhDO,sBAAS,OAgDP;AA/CX,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,aAAK;IACL,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,38 @@
1
+ import { BinaryParser } from '../serdes/binary-parser';
2
+ import { JsonObject, SerializedType } from './serialized-type';
3
+ /**
4
+ * Interface for JSON objects that represent amounts
5
+ */
6
+ interface IssueObject extends JsonObject {
7
+ currency: string;
8
+ issuer?: string;
9
+ }
10
+ /**
11
+ * Class for serializing/Deserializing Amounts
12
+ */
13
+ declare class Issue extends SerializedType {
14
+ static readonly ZERO_ISSUED_CURRENCY: Issue;
15
+ constructor(bytes: Uint8Array);
16
+ /**
17
+ * Construct an amount from an IOU or string amount
18
+ *
19
+ * @param value An Amount, object representing an IOU, or a string
20
+ * representing an integer amount
21
+ * @returns An Amount object
22
+ */
23
+ static from<T extends Issue | IssueObject>(value: T): Issue;
24
+ /**
25
+ * Read an amount from a BinaryParser
26
+ *
27
+ * @param parser BinaryParser to read the Amount from
28
+ * @returns An Amount object
29
+ */
30
+ static fromParser(parser: BinaryParser): Issue;
31
+ /**
32
+ * Get the JSON representation of this Amount
33
+ *
34
+ * @returns the JSON interpretation of this.bytes
35
+ */
36
+ toJSON(): IssueObject;
37
+ }
38
+ export { Issue, IssueObject };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Issue = void 0;
4
+ const utils_1 = require("@xrplf/isomorphic/utils");
5
+ const binary_parser_1 = require("../serdes/binary-parser");
6
+ const account_id_1 = require("./account-id");
7
+ const currency_1 = require("./currency");
8
+ const serialized_type_1 = require("./serialized-type");
9
+ /**
10
+ * Type guard for AmountObject
11
+ */
12
+ function isIssueObject(arg) {
13
+ const keys = Object.keys(arg).sort();
14
+ if (keys.length === 1) {
15
+ return keys[0] === 'currency';
16
+ }
17
+ return keys.length === 2 && keys[0] === 'currency' && keys[1] === 'issuer';
18
+ }
19
+ /**
20
+ * Class for serializing/Deserializing Amounts
21
+ */
22
+ class Issue extends serialized_type_1.SerializedType {
23
+ constructor(bytes) {
24
+ super(bytes !== null && bytes !== void 0 ? bytes : Issue.ZERO_ISSUED_CURRENCY.bytes);
25
+ }
26
+ /**
27
+ * Construct an amount from an IOU or string amount
28
+ *
29
+ * @param value An Amount, object representing an IOU, or a string
30
+ * representing an integer amount
31
+ * @returns An Amount object
32
+ */
33
+ static from(value) {
34
+ if (value instanceof Issue) {
35
+ return value;
36
+ }
37
+ if (isIssueObject(value)) {
38
+ const currency = currency_1.Currency.from(value.currency).toBytes();
39
+ if (value.issuer == null) {
40
+ return new Issue(currency);
41
+ }
42
+ const issuer = account_id_1.AccountID.from(value.issuer).toBytes();
43
+ return new Issue((0, utils_1.concat)([currency, issuer]));
44
+ }
45
+ throw new Error('Invalid type to construct an Amount');
46
+ }
47
+ /**
48
+ * Read an amount from a BinaryParser
49
+ *
50
+ * @param parser BinaryParser to read the Amount from
51
+ * @returns An Amount object
52
+ */
53
+ static fromParser(parser) {
54
+ const currency = parser.read(20);
55
+ if (new currency_1.Currency(currency).toJSON() === 'XRP') {
56
+ return new Issue(currency);
57
+ }
58
+ const currencyAndIssuer = [currency, parser.read(20)];
59
+ return new Issue((0, utils_1.concat)(currencyAndIssuer));
60
+ }
61
+ /**
62
+ * Get the JSON representation of this Amount
63
+ *
64
+ * @returns the JSON interpretation of this.bytes
65
+ */
66
+ toJSON() {
67
+ const parser = new binary_parser_1.BinaryParser(this.toString());
68
+ const currency = currency_1.Currency.fromParser(parser);
69
+ if (currency.toJSON() === 'XRP') {
70
+ return { currency: currency.toJSON() };
71
+ }
72
+ const issuer = account_id_1.AccountID.fromParser(parser);
73
+ return {
74
+ currency: currency.toJSON(),
75
+ issuer: issuer.toJSON(),
76
+ };
77
+ }
78
+ }
79
+ exports.Issue = Issue;
80
+ Issue.ZERO_ISSUED_CURRENCY = new Issue(new Uint8Array(20));
81
+ //# sourceMappingURL=issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../src/types/issue.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAChD,2DAAsD;AAEtD,6CAAwC;AACxC,yCAAqC;AACrC,uDAA8D;AAU9D;;GAEG;AACH,SAAS,aAAa,CAAC,GAAG;IACxB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAA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,CAAC,CAAC,MAAM,EAAE,KAAK,KAAK,EAAE;YAC7C,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAA;SAC3B;QACD,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QACrD,OAAO,IAAI,KAAK,CAAC,IAAA,cAAM,EAAC,iBAAiB,CAAC,CAAC,CAAA;IAC7C,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,MAAM,MAAM,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;QAChD,MAAM,QAAQ,GAAG,mBAAQ,CAAC,UAAU,CAAC,MAAM,CAAa,CAAA;QACxD,IAAI,QAAQ,CAAC,MAAM,EAAE,KAAK,KAAK,EAAE;YAC/B,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAA;SACvC;QACD,MAAM,MAAM,GAAG,sBAAS,CAAC,UAAU,CAAC,MAAM,CAAc,CAAA;QAExD,OAAO;YACL,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE;YAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;SACxB,CAAA;IACH,CAAC;;AAGM,sBAAK;AAjEI,0BAAoB,GAAU,IAAI,KAAK,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
- import { BinaryParser } from "../serdes/binary-parser";
2
- import { SerializedType, JsonObject } from "./serialized-type";
1
+ import { BinaryParser } from '../serdes/binary-parser';
2
+ import { SerializedType, JsonObject } from './serialized-type';
3
3
  /**
4
4
  * The object representation of a Hop, an issuer AccountID, an account AccountID, and a Currency
5
5
  */