ripple-binary-codec 1.0.2 → 1.0.3-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 +3 -3
  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 +3066 -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 +3073 -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 +3068 -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 +43 -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 +86 -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 +16 -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 +53 -66
  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 +36 -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 -74
  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 +3073 -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 +228 -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 +46 -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 +113 -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 -74
  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 -248
  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 -82
  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
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Quick script to re-number values
4
4
  */
5
- var input = {
5
+ const input = {
6
6
  temBAD_SEND_XRP_PATHS: -283,
7
7
  temBAD_SEQUENCE: -282,
8
8
  temBAD_SIGNATURE: -281,
@@ -93,35 +93,35 @@ var input = {
93
93
  tecHAS_OBLIGATIONS: 151,
94
94
  tecTOO_SOON: 152,
95
95
  };
96
- var startingFromTemBADSENDXRPPATHS = -284;
97
- var startingFromTefFAILURE = -199;
98
- var startingFromTerRETRY = -99;
99
- var tesSUCCESS = 0;
100
- var startingFromTecCLAIM = 100;
101
- var startingFromTecDIRFULL = 121;
102
- var previousKey = "tem";
103
- Object.keys(input).forEach(function (key) {
96
+ let startingFromTemBADSENDXRPPATHS = -284;
97
+ let startingFromTefFAILURE = -199;
98
+ let startingFromTerRETRY = -99;
99
+ const tesSUCCESS = 0;
100
+ let startingFromTecCLAIM = 100;
101
+ const startingFromTecDIRFULL = 121;
102
+ let previousKey = 'tem';
103
+ Object.keys(input).forEach((key) => {
104
104
  if (key.substring(0, 3) !== previousKey.substring(0, 3)) {
105
105
  console.log();
106
106
  previousKey = key;
107
107
  }
108
- if (key.substring(0, 3) === "tem") {
109
- console.log(" \"" + key + "\": " + startingFromTemBADSENDXRPPATHS++ + ",");
108
+ if (key.substring(0, 3) === 'tem') {
109
+ console.log(` "${key}": ${startingFromTemBADSENDXRPPATHS++},`);
110
110
  }
111
- else if (key.substring(0, 3) === "tef") {
112
- console.log(" \"" + key + "\": " + startingFromTefFAILURE++ + ",");
111
+ else if (key.substring(0, 3) === 'tef') {
112
+ console.log(` "${key}": ${startingFromTefFAILURE++},`);
113
113
  }
114
- else if (key.substring(0, 3) === "ter") {
115
- console.log(" \"" + key + "\": " + startingFromTerRETRY++ + ",");
114
+ else if (key.substring(0, 3) === 'ter') {
115
+ console.log(` "${key}": ${startingFromTerRETRY++},`);
116
116
  }
117
- else if (key.substring(0, 3) === "tes") {
118
- console.log(" \"" + key + "\": " + tesSUCCESS + ",");
117
+ else if (key.substring(0, 3) === 'tes') {
118
+ console.log(` "${key}": ${tesSUCCESS},`);
119
119
  }
120
- else if (key.substring(0, 3) === "tec") {
121
- if (key === "tecDIR_FULL") {
120
+ else if (key.substring(0, 3) === 'tec') {
121
+ if (key === 'tecDIR_FULL') {
122
122
  startingFromTecCLAIM = startingFromTecDIRFULL;
123
123
  }
124
- console.log(" \"" + key + "\": " + startingFromTecCLAIM++ + ",");
124
+ console.log(` "${key}": ${startingFromTecCLAIM++},`);
125
125
  }
126
126
  });
127
127
  //# sourceMappingURL=utils-renumber.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils-renumber.js","sourceRoot":"","sources":["../../src/enums/utils-renumber.ts"],"names":[],"mappings":";AAAA;;GAEG;AAEH,IAAM,KAAK,GAAG;IACZ,qBAAqB,EAAE,CAAC,GAAG;IAC3B,eAAe,EAAE,CAAC,GAAG;IACrB,gBAAgB,EAAE,CAAC,GAAG;IACtB,kBAAkB,EAAE,CAAC,GAAG;IACxB,oBAAoB,EAAE,CAAC,GAAG;IAC1B,aAAa,EAAE,CAAC,GAAG;IACnB,aAAa,EAAE,CAAC,GAAG;IACnB,UAAU,EAAE,CAAC,GAAG;IAChB,eAAe,EAAE,CAAC,GAAG;IACrB,YAAY,EAAE,CAAC,GAAG;IAClB,eAAe,EAAE,CAAC,GAAG;IACrB,WAAW,EAAE,CAAC,GAAG;IACjB,aAAa,EAAE,CAAC,GAAG;IACnB,aAAa,EAAE,CAAC,GAAG;IACnB,aAAa,EAAE,CAAC,GAAG;IACnB,gBAAgB,EAAE,CAAC,GAAG;IACtB,qBAAqB,EAAE,CAAC,GAAG;IAC3B,sBAAsB,EAAE,CAAC,GAAG;IAE5B,YAAY,EAAE,CAAC,GAAG;IAClB,UAAU,EAAE,CAAC,GAAG;IAEhB,UAAU,EAAE,CAAC,GAAG;IAChB,UAAU,EAAE,CAAC,GAAG;IAChB,eAAe,EAAE,CAAC,GAAG;IACrB,WAAW,EAAE,CAAC,GAAG;IACjB,aAAa,EAAE,CAAC,GAAG;IACnB,UAAU,EAAE,CAAC,GAAG;IAChB,YAAY,EAAE,CAA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
+ import { FieldInfo, FieldLookup, FieldInstance } from './field';
4
+ interface DefinitionsData {
5
+ TYPES: Record<string, number>;
6
+ LEDGER_ENTRY_TYPES: Record<string, number>;
7
+ FIELDS: (string | FieldInfo)[][];
8
+ TRANSACTION_RESULTS: Record<string, number>;
9
+ TRANSACTION_TYPES: Record<string, number>;
10
+ }
11
+ /**
12
+ * Stores the various types and fields for rippled to be used to encode/decode information later on.
13
+ * XrplDefinitions should be instantiated instead of this class.
14
+ */
15
+ declare class XrplDefinitionsBase {
16
+ field: FieldLookup;
17
+ ledgerEntryType: BytesLookup;
18
+ type: BytesLookup;
19
+ transactionResult: BytesLookup;
20
+ transactionType: BytesLookup;
21
+ transactionNames: string[];
22
+ dataTypes: Record<string, typeof SerializedType>;
23
+ /**
24
+ * Present rippled types in a typed and updatable format.
25
+ * For an example of the input format see `definitions.json`
26
+ * To generate a new definitions file from rippled source code, use this tool: https://github.com/RichardAH/xrpl-codec-gen
27
+ *
28
+ * See the definitions.test.js file for examples of how to create your own updated definitions.json.
29
+ *
30
+ * @param enums - A json encoding of the core types, transaction types, transaction results, transaction names, and fields.
31
+ * @param types - A list of type objects with the same name as the fields defined.
32
+ * You can use the coreTypes object if you are not adding new types.
33
+ */
34
+ constructor(enums: DefinitionsData, types: Record<string, typeof SerializedType>);
35
+ /**
36
+ * Associates each Field to a corresponding class that TypeScript can recognize.
37
+ *
38
+ * @param types a list of type objects with the same name as the fields defined.
39
+ * Defaults to xrpl.js's core type definitions.
40
+ */
41
+ associateTypes(types: Record<string, typeof SerializedType>): void;
42
+ getAssociatedTypes(): Record<string, typeof SerializedType>;
43
+ }
44
+ export { DefinitionsData, XrplDefinitionsBase, FieldLookup, FieldInfo, FieldInstance, Bytes, BytesLookup, };
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BytesLookup = exports.Bytes = exports.FieldLookup = exports.XrplDefinitionsBase = void 0;
4
+ const bytes_1 = require("./bytes");
5
+ Object.defineProperty(exports, "Bytes", { enumerable: true, get: function () { return bytes_1.Bytes; } });
6
+ Object.defineProperty(exports, "BytesLookup", { enumerable: true, get: function () { return bytes_1.BytesLookup; } });
7
+ const field_1 = require("./field");
8
+ Object.defineProperty(exports, "FieldLookup", { enumerable: true, get: function () { return field_1.FieldLookup; } });
9
+ const constants_1 = require("./constants");
10
+ /**
11
+ * Stores the various types and fields for rippled to be used to encode/decode information later on.
12
+ * XrplDefinitions should be instantiated instead of this class.
13
+ */
14
+ class XrplDefinitionsBase {
15
+ /**
16
+ * Present rippled types in a typed and updatable format.
17
+ * For an example of the input format see `definitions.json`
18
+ * To generate a new definitions file from rippled source code, use this tool: https://github.com/RichardAH/xrpl-codec-gen
19
+ *
20
+ * See the definitions.test.js file for examples of how to create your own updated definitions.json.
21
+ *
22
+ * @param enums - A json encoding of the core types, transaction types, transaction results, transaction names, and fields.
23
+ * @param types - A list of type objects with the same name as the fields defined.
24
+ * You can use the coreTypes object if you are not adding new types.
25
+ */
26
+ constructor(enums, types) {
27
+ this.type = new bytes_1.BytesLookup(enums.TYPES, constants_1.TYPE_WIDTH);
28
+ this.ledgerEntryType = new bytes_1.BytesLookup(enums.LEDGER_ENTRY_TYPES, constants_1.LEDGER_ENTRY_WIDTH);
29
+ this.transactionType = new bytes_1.BytesLookup(enums.TRANSACTION_TYPES, constants_1.TRANSACTION_TYPE_WIDTH);
30
+ this.transactionResult = new bytes_1.BytesLookup(enums.TRANSACTION_RESULTS, constants_1.TRANSACTION_RESULT_WIDTH);
31
+ this.field = new field_1.FieldLookup(enums.FIELDS, enums.TYPES);
32
+ this.transactionNames = Object.entries(enums.TRANSACTION_TYPES)
33
+ .filter(([_key, value]) => value >= 0)
34
+ .map(([key, _value]) => key);
35
+ this.dataTypes = {}; // Filled in via associateTypes
36
+ this.associateTypes(types);
37
+ }
38
+ /**
39
+ * Associates each Field to a corresponding class that TypeScript can recognize.
40
+ *
41
+ * @param types a list of type objects with the same name as the fields defined.
42
+ * Defaults to xrpl.js's core type definitions.
43
+ */
44
+ associateTypes(types) {
45
+ // Overwrite any existing type definitions with the given types
46
+ this.dataTypes = Object.assign({}, this.dataTypes, types);
47
+ Object.values(this.field).forEach((field) => {
48
+ field.associatedType = this.dataTypes[field.type.name];
49
+ });
50
+ this.field['TransactionType'].associatedType = this.transactionType;
51
+ this.field['TransactionResult'].associatedType = this.transactionResult;
52
+ this.field['LedgerEntryType'].associatedType = this.ledgerEntryType;
53
+ }
54
+ getAssociatedTypes() {
55
+ return this.dataTypes;
56
+ }
57
+ }
58
+ exports.XrplDefinitionsBase = XrplDefinitionsBase;
59
+ //# sourceMappingURL=xrpl-definitions-base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xrpl-definitions-base.js","sourceRoot":"","sources":["../../src/enums/xrpl-definitions-base.ts"],"names":[],"mappings":";;;AACA,mCAA4C;AA2G1C,sFA3GO,aAAK,OA2GP;AACL,4FA5Gc,mBAAW,OA4Gd;AA3Gb,mCAA+D;AAuG7D,4FAvGkB,mBAAW,OAuGlB;AAtGb,2CAKoB;AAUpB;;;GAGG;AACH,MAAM,mBAAmB;IAgBvB;;;;;;;;;;OAUG;IACH,YACE,KAAsB,EACtB,KAA4C;QAE5C,IAAI,CAAC,IAAI,GAAG,IAAI,mBAAW,CAAC,KAAK,CAAC,KAAK,EAAE,sBAAU,CAAC,CAAA;QACpD,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAW,CACpC,KAAK,CAAC,kBAAkB,EACxB,8BAAkB,CACnB,CAAA;QACD,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAW,CACpC,KAAK,CAAC,iBAAiB,EACvB,kCAAsB,CACvB,CAAA;QACD,IAAI,CAAC,iBAAiB,GAAG,IAAI,mBAAW,CACtC,KAAK,CAAC,mBAAmB,EACzB,oCAAwB,CACzB,CAAA;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,mBAAW,CAC1B,KAAK,CAAC,MAAoC,EAC1C,KAAK,CAAC,KA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types/serialized-type';
3
+ /**
4
+ * Stores the various types and fields for rippled to be used to encode/decode information later on.
5
+ * Should be used instead of XrplDefinitionsBase since this defines default `types` for serializing/deserializing
6
+ * ledger data.
7
+ */
8
+ export declare class XrplDefinitions extends XrplDefinitionsBase {
9
+ /**
10
+ * Present rippled types in a typed and updatable format.
11
+ * For an example of the input format see `definitions.json`
12
+ * To generate a new definitions file from rippled source code, use this tool: https://github.com/RichardAH/xrpl-codec-gen
13
+ *
14
+ * See the definitions.test.js file for examples of how to create your own updated definitions.json.
15
+ *
16
+ * @param enums - A json encoding of the core types, transaction types, transaction results, transaction names, and fields.
17
+ * @param additionalTypes - A list of SerializedType objects with the same name as the fields defined.
18
+ * These types will be included in addition to the coreTypes used on mainnet.
19
+ */
20
+ constructor(enums: DefinitionsData, additionalTypes?: Record<string, typeof SerializedType>);
21
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.XrplDefinitions = void 0;
4
+ const xrpl_definitions_base_1 = require("./xrpl-definitions-base");
5
+ const types_1 = require("../types");
6
+ /**
7
+ * Stores the various types and fields for rippled to be used to encode/decode information later on.
8
+ * Should be used instead of XrplDefinitionsBase since this defines default `types` for serializing/deserializing
9
+ * ledger data.
10
+ */
11
+ class XrplDefinitions extends xrpl_definitions_base_1.XrplDefinitionsBase {
12
+ /**
13
+ * Present rippled types in a typed and updatable format.
14
+ * For an example of the input format see `definitions.json`
15
+ * To generate a new definitions file from rippled source code, use this tool: https://github.com/RichardAH/xrpl-codec-gen
16
+ *
17
+ * See the definitions.test.js file for examples of how to create your own updated definitions.json.
18
+ *
19
+ * @param enums - A json encoding of the core types, transaction types, transaction results, transaction names, and fields.
20
+ * @param additionalTypes - A list of SerializedType objects with the same name as the fields defined.
21
+ * These types will be included in addition to the coreTypes used on mainnet.
22
+ */
23
+ constructor(enums, additionalTypes) {
24
+ const types = Object.assign({}, types_1.coreTypes, additionalTypes);
25
+ super(enums, types);
26
+ }
27
+ }
28
+ exports.XrplDefinitions = XrplDefinitions;
29
+ //# sourceMappingURL=xrpl-definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xrpl-definitions.js","sourceRoot":"","sources":["../../src/enums/xrpl-definitions.ts"],"names":[],"mappings":";;;AAAA,mEAGgC;AAChC,oCAAoC;AAGpC;;;;GAIG;AACH,MAAa,eAAgB,SAAQ,2CAAmB;IACtD;;;;;;;;;;OAUG;IACH,YACE,KAAsB,EACtB,eAAuD;QAEvD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,iBAAS,EAAE,eAAe,CAAC,CAAA;QAC3D,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IACrB,CAAC;CACF;AAnBD,0CAmBC"}
@@ -1,6 +1,5 @@
1
- /// <reference types="node" />
2
1
  /**
3
2
  * Maps HashPrefix names to their byte representation
4
3
  */
5
- declare const HashPrefix: Record<string, Buffer>;
4
+ declare const HashPrefix: Record<string, Uint8Array>;
6
5
  export { HashPrefix };
@@ -1,21 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HashPrefix = void 0;
4
+ const utils_1 = require("./utils");
4
5
  /**
5
- * Write a 32 bit integer to a Buffer
6
+ * Write a 32 bit integer to a Uint8Array
6
7
  *
7
- * @param uint32 32 bit integer to write to buffer
8
- * @returns a buffer with the bytes representation of uint32
8
+ * @param uint32 32 bit integer to write to Uint8Array
9
+ * @returns a Uint8Array with the bytes representation of uint32
9
10
  */
10
11
  function bytes(uint32) {
11
- var result = Buffer.alloc(4);
12
- result.writeUInt32BE(uint32);
12
+ const result = new Uint8Array(4);
13
+ (0, utils_1.writeUInt32BE)(result, uint32, 0);
13
14
  return result;
14
15
  }
15
16
  /**
16
17
  * Maps HashPrefix names to their byte representation
17
18
  */
18
- var HashPrefix = {
19
+ const HashPrefix = {
19
20
  transactionID: bytes(0x54584e00),
20
21
  // transaction plus metadata
21
22
  transaction: bytes(0x534e4400),
@@ -1 +1 @@
1
- {"version":3,"file":"hash-prefixes.js","sourceRoot":"","sources":["../src/hash-prefixes.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,SAAS,KAAK,CAAC,MAAc;IAC3B,IAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,IAAM,UAAU,GAA2B;IACzC,aAAa,EAAE,KAAK,CAAC,UAAU,CAAC;IAChC,4BAA4B;IAC5B,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC;IAC9B,gBAAgB;IAChB,iBAAiB,EAAE,KAAK,CAAC,UAAU,CAAC;IACpC,qBAAqB;IACrB,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC;IAC5B,iCAAiC;IACjC,YAAY,EAAE,KAAK,CAAC,UAAU,CAAC;IAC/B,4BAA4B;IAC5B,cAAc,EAAE,KAAK,CAAC,UAAU,CAAC;IACjC,4BAA4B;IAC5B,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC;IACtC,yBAAyB;IACzB,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC;IAC7B,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC;IAC3B,wBAAwB;IACxB,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC;CACvC,CAAC;AAEO,gCAAU"}
1
+ {"version":3,"file":"hash-prefixes.js","sourceRoot":"","sources":["../src/hash-prefixes.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AAEvC;;;;;GAKG;AACH,SAAS,KAAK,CAAC,MAAc;IAC3B,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAA;IAChC,IAAA,qBAAa,EAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IAChC,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAA+B;IAC7C,aAAa,EAAE,KAAK,CAAC,UAAU,CAAC;IAChC,4BAA4B;IAC5B,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC;IAC9B,gBAAgB;IAChB,iBAAiB,EAAE,KAAK,CAAC,UAAU,CAAC;IACpC,qBAAqB;IACrB,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC;IAC5B,iCAAiC;IACjC,YAAY,EAAE,KAAK,CAAC,UAAU,CAAC;IAC/B,4BAA4B;IAC5B,cAAc,EAAE,KAAK,CAAC,UAAU,CAAC;IACjC,4BAA4B;IAC5B,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC;IACtC,yBAAyB;IACzB,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC;IAC7B,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC;IAC3B,wBAAwB;IACxB,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC;CACvC,CAAA;AAEQ,gCAAU"}
package/dist/hashes.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- /// <reference types="node" />
2
- import { Hash256 } from "./types/hash-256";
3
- import { BytesList } from "./serdes/binary-serializer";
1
+ import { Hash256 } from './types';
2
+ import { BytesList } from './serdes/binary-serializer';
4
3
  /**
5
4
  * Class for hashing with SHA512
6
5
  * @extends BytesList So SerializedTypes can write bytes to a Sha512Half
@@ -13,20 +12,20 @@ declare class Sha512Half extends BytesList {
13
12
  * @param bytes bytes to write to this.hash
14
13
  * @returns the new Sha512Hash object
15
14
  */
16
- static put(bytes: Buffer): Sha512Half;
15
+ static put(bytes: Uint8Array): Sha512Half;
17
16
  /**
18
17
  * Write bytes to an existing Sha512Hash
19
18
  *
20
19
  * @param bytes bytes to write to object
21
20
  * @returns the Sha512 object
22
21
  */
23
- put(bytes: Buffer): Sha512Half;
22
+ put(bytes: Uint8Array): Sha512Half;
24
23
  /**
25
24
  * Compute SHA512 hash and slice in half
26
25
  *
27
26
  * @returns half of a SHA512 hash
28
27
  */
29
- finish256(): Buffer;
28
+ finish256(): Uint8Array;
30
29
  /**
31
30
  * Constructs a Hash256 from the Sha512Half object
32
31
  *
@@ -40,12 +39,12 @@ declare class Sha512Half extends BytesList {
40
39
  * @param args zero or more arguments to hash
41
40
  * @returns the sha512half hash of the arguments.
42
41
  */
43
- declare function sha512Half(...args: Buffer[]): Buffer;
42
+ declare function sha512Half(...args: Uint8Array[]): Uint8Array;
44
43
  /**
45
44
  * Construct a transactionID from a Serialized Transaction
46
45
  *
47
46
  * @param serialized bytes to hash
48
47
  * @returns a Hash256 object
49
48
  */
50
- declare function transactionID(serialized: Buffer): Hash256;
49
+ declare function transactionID(serialized: Uint8Array): Hash256;
51
50
  export { Sha512Half, sha512Half, transactionID };
package/dist/hashes.js CHANGED
@@ -1,33 +1,18 @@
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.transactionID = exports.sha512Half = exports.Sha512Half = void 0;
17
- var hash_prefixes_1 = require("./hash-prefixes");
18
- var createHash = require("create-hash");
19
- var hash_256_1 = require("./types/hash-256");
20
- var binary_serializer_1 = require("./serdes/binary-serializer");
4
+ const hash_prefixes_1 = require("./hash-prefixes");
5
+ const types_1 = require("./types");
6
+ const binary_serializer_1 = require("./serdes/binary-serializer");
7
+ const sha512_1 = require("@xrplf/isomorphic/sha512");
21
8
  /**
22
9
  * Class for hashing with SHA512
23
10
  * @extends BytesList So SerializedTypes can write bytes to a Sha512Half
24
11
  */
25
- var Sha512Half = /** @class */ (function (_super) {
26
- __extends(Sha512Half, _super);
27
- function Sha512Half() {
28
- var _this = _super !== null && _super.apply(this, arguments) || this;
29
- _this.hash = createHash("sha512");
30
- return _this;
12
+ class Sha512Half extends binary_serializer_1.BytesList {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.hash = sha512_1.sha512.create();
31
16
  }
32
17
  /**
33
18
  * Construct a new Sha512Hash and write bytes this.hash
@@ -35,38 +20,36 @@ var Sha512Half = /** @class */ (function (_super) {
35
20
  * @param bytes bytes to write to this.hash
36
21
  * @returns the new Sha512Hash object
37
22
  */
38
- Sha512Half.put = function (bytes) {
23
+ static put(bytes) {
39
24
  return new Sha512Half().put(bytes);
40
- };
25
+ }
41
26
  /**
42
27
  * Write bytes to an existing Sha512Hash
43
28
  *
44
29
  * @param bytes bytes to write to object
45
30
  * @returns the Sha512 object
46
31
  */
47
- Sha512Half.prototype.put = function (bytes) {
32
+ put(bytes) {
48
33
  this.hash.update(bytes);
49
34
  return this;
50
- };
35
+ }
51
36
  /**
52
37
  * Compute SHA512 hash and slice in half
53
38
  *
54
39
  * @returns half of a SHA512 hash
55
40
  */
56
- Sha512Half.prototype.finish256 = function () {
57
- var bytes = this.hash.digest();
58
- return bytes.slice(0, 32);
59
- };
41
+ finish256() {
42
+ return Uint8Array.from(this.hash.digest().slice(0, 32));
43
+ }
60
44
  /**
61
45
  * Constructs a Hash256 from the Sha512Half object
62
46
  *
63
47
  * @returns a Hash256 object
64
48
  */
65
- Sha512Half.prototype.finish = function () {
66
- return new hash_256_1.Hash256(this.finish256());
67
- };
68
- return Sha512Half;
69
- }(binary_serializer_1.BytesList));
49
+ finish() {
50
+ return new types_1.Hash256(this.finish256());
51
+ }
52
+ }
70
53
  exports.Sha512Half = Sha512Half;
71
54
  /**
72
55
  * compute SHA512 hash of a list of bytes
@@ -74,13 +57,9 @@ exports.Sha512Half = Sha512Half;
74
57
  * @param args zero or more arguments to hash
75
58
  * @returns the sha512half hash of the arguments.
76
59
  */
77
- function sha512Half() {
78
- var args = [];
79
- for (var _i = 0; _i < arguments.length; _i++) {
80
- args[_i] = arguments[_i];
81
- }
82
- var hash = new Sha512Half();
83
- args.forEach(function (a) { return hash.put(a); });
60
+ function sha512Half(...args) {
61
+ const hash = new Sha512Half();
62
+ args.forEach((a) => hash.put(a));
84
63
  return hash.finish256();
85
64
  }
86
65
  exports.sha512Half = sha512Half;
@@ -91,7 +70,7 @@ exports.sha512Half = sha512Half;
91
70
  * @returns a Hash256 object
92
71
  */
93
72
  function transactionID(serialized) {
94
- return new hash_256_1.Hash256(sha512Half(hash_prefixes_1.HashPrefix.transactionID, serialized));
73
+ return new types_1.Hash256(sha512Half(hash_prefixes_1.HashPrefix.transactionID, serialized));
95
74
  }
96
75
  exports.transactionID = transactionID;
97
76
  //# sourceMappingURL=hashes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hashes.js","sourceRoot":"","sources":["../src/hashes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA6C;AAC7C,wCAA0C;AAC1C,6CAA2C;AAC3C,gEAAuD;AAEvD;;;GAGG;AACH;IAAyB,8BAAS;IAAlC;QAAA,qEA0CC;QAzCS,UAAI,GAAe,UAAU,CAAC,QAAQ,CAAC,CAAC;;IAyClD,CAAC;IAvCC;;;;;OAKG;IACI,cAAG,GAAV,UAAW,KAAa;QACtB,OAAO,IAAI,UAAU,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACH,wBAAG,GAAH,UAAI,KAAa;QACf,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,8BAAS,GAAT;QACE,IAAM,KAAK,GAAW,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACzC,OAAO,KAAK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;QACvB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IACzD,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO,IAAI,eAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAA;IACtC,CAAC;CACF;AAwBQ,gCAAU;AAtBnB;;;;;GAKG;AACH,SAAS,UAAU,CAAC,GAAG,IAAkB;IACvC,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAA;IAC7B,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IAChC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAA;AACzB,CAAC;AAYoB,gCAAU;AAV/B;;;;;GAKG;AACH,SAAS,aAAa,CAAC,UAAsB;IAC3C,OAAO,IAAI,eAAO,CAAC,UAAU,CAAC,0BAAU,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAA;AACtE,CAAC;AAEgC,sCAAa"}
package/dist/index.d.ts CHANGED
@@ -1,32 +1,40 @@
1
- import { decodeLedgerData } from "./ledger-hashes";
2
- import { JsonObject } from "./types/serialized-type";
1
+ import { decodeLedgerData } from './ledger-hashes';
2
+ import { JsonObject } from './types/serialized-type';
3
+ import { XrplDefinitionsBase, TRANSACTION_TYPES, DEFAULT_DEFINITIONS } from './enums';
4
+ import { XrplDefinitions } from './enums/xrpl-definitions';
5
+ import { coreTypes } from './types';
3
6
  /**
4
7
  * Decode a transaction
5
8
  *
6
9
  * @param binary hex-string of the encoded transaction
10
+ * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
7
11
  * @returns the JSON representation of the transaction
8
12
  */
9
- declare function decode(binary: string): JsonObject;
13
+ declare function decode(binary: string, definitions?: XrplDefinitionsBase): JsonObject;
10
14
  /**
11
15
  * Encode a transaction
12
16
  *
13
17
  * @param json The JSON representation of a transaction
18
+ * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
19
+ *
14
20
  * @returns A hex-string of the encoded transaction
15
21
  */
16
- declare function encode(json: object): string;
22
+ declare function encode(json: object, definitions?: XrplDefinitionsBase): string;
17
23
  /**
18
24
  * Encode a transaction and prepare for signing
19
25
  *
20
26
  * @param json JSON object representing the transaction
21
27
  * @param signer string representing the account to sign the transaction with
28
+ * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
22
29
  * @returns a hex string of the encoded transaction
23
30
  */
24
- declare function encodeForSigning(json: object): string;
31
+ declare function encodeForSigning(json: object, definitions?: XrplDefinitionsBase): string;
25
32
  /**
26
33
  * Encode a transaction and prepare for signing with a claim
27
34
  *
28
35
  * @param json JSON object representing the transaction
29
36
  * @param signer string representing the account to sign the transaction with
37
+ * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
30
38
  * @returns a hex string of the encoded transaction
31
39
  */
32
40
  declare function encodeForSigningClaim(json: object): string;
@@ -35,9 +43,10 @@ declare function encodeForSigningClaim(json: object): string;
35
43
  *
36
44
  * @param json JSON object representing the transaction
37
45
  * @param signer string representing the account to sign the transaction with
46
+ * @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
38
47
  * @returns a hex string of the encoded transaction
39
48
  */
40
- declare function encodeForMultisigning(json: object, signer: string): string;
49
+ declare function encodeForMultisigning(json: object, signer: string, definitions?: XrplDefinitionsBase): string;
41
50
  /**
42
51
  * Encode a quality value
43
52
  *
@@ -52,14 +61,4 @@ declare function encodeQuality(value: string): string;
52
61
  * @returns a string representing the quality
53
62
  */
54
63
  declare function decodeQuality(value: string): string;
55
- declare const _default: {
56
- decode: typeof decode;
57
- encode: typeof encode;
58
- encodeForSigning: typeof encodeForSigning;
59
- encodeForSigningClaim: typeof encodeForSigningClaim;
60
- encodeForMultisigning: typeof encodeForMultisigning;
61
- encodeQuality: typeof encodeQuality;
62
- decodeQuality: typeof decodeQuality;
63
- decodeLedgerData: typeof decodeLedgerData;
64
- };
65
- export = _default;
64
+ export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };