@transia/ripple-binary-codec 1.4.6-alpha.9 → 2.5.1
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.d.ts +30 -16
- package/dist/binary.js +36 -16
- package/dist/binary.js.map +1 -1
- package/dist/enums/bytes.d.ts +1 -2
- package/dist/enums/bytes.js +3 -2
- package/dist/enums/bytes.js.map +1 -1
- package/dist/enums/constants.d.ts +1 -0
- package/dist/enums/constants.js +6 -5
- package/dist/enums/constants.js.map +1 -1
- package/dist/enums/definitions.json +1604 -969
- package/dist/enums/field.d.ts +1 -2
- package/dist/enums/field.js +1 -2
- package/dist/enums/field.js.map +1 -1
- package/dist/enums/index.d.ts +1 -2
- package/dist/enums/index.js +5 -27
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/src/enums/definitions.json +1606 -971
- package/dist/enums/xrpl-definitions-base.d.ts +5 -3
- package/dist/enums/xrpl-definitions-base.js +26 -6
- package/dist/enums/xrpl-definitions-base.js.map +1 -1
- package/dist/enums/xrpl-definitions.d.ts +2 -1
- package/dist/enums/xrpl-definitions.js +2 -1
- package/dist/enums/xrpl-definitions.js.map +1 -1
- package/dist/hash-prefixes.d.ts +1 -2
- package/dist/hash-prefixes.js +8 -6
- package/dist/hash-prefixes.js.map +1 -1
- package/dist/hashes.d.ts +6 -7
- package/dist/hashes.js +6 -7
- package/dist/hashes.js.map +1 -1
- package/dist/index.d.ts +16 -11
- package/dist/index.js +53 -58
- package/dist/index.js.map +1 -1
- package/dist/ledger-hashes.d.ts +1 -2
- package/dist/ledger-hashes.js +11 -30
- package/dist/ledger-hashes.js.map +1 -1
- package/dist/quality.d.ts +3 -4
- package/dist/quality.js +10 -8
- package/dist/quality.js.map +1 -1
- package/dist/serdes/binary-parser.d.ts +2 -3
- package/dist/serdes/binary-parser.js +16 -32
- package/dist/serdes/binary-parser.js.map +1 -1
- package/dist/serdes/binary-serializer.d.ts +7 -8
- package/dist/serdes/binary-serializer.js +14 -37
- package/dist/serdes/binary-serializer.js.map +1 -1
- package/dist/shamap.d.ts +4 -5
- package/dist/shamap.js +5 -5
- package/dist/shamap.js.map +1 -1
- package/dist/src/binary.d.ts +106 -0
- package/dist/src/binary.js +154 -0
- package/dist/src/binary.js.map +1 -0
- package/dist/src/coretypes.d.ts +9 -0
- package/dist/src/coretypes.js +48 -0
- package/dist/src/coretypes.js.map +1 -0
- package/dist/src/enums/bytes.d.ts +25 -0
- package/dist/src/enums/bytes.js +65 -0
- package/dist/src/enums/bytes.js.map +1 -0
- package/dist/src/enums/constants.d.ts +5 -0
- package/dist/src/enums/constants.js +9 -0
- package/dist/src/enums/constants.js.map +1 -0
- package/dist/src/enums/definitions.json +3404 -0
- package/dist/src/enums/field.d.ts +28 -0
- package/dist/src/enums/field.js +58 -0
- package/dist/src/enums/field.js.map +1 -0
- package/dist/src/enums/index.d.ts +12 -0
- package/dist/src/enums/index.js +31 -0
- package/dist/src/enums/index.js.map +1 -0
- package/dist/src/enums/utils-renumber.d.ts +101 -0
- package/dist/src/enums/utils-renumber.js +127 -0
- package/dist/src/enums/utils-renumber.js.map +1 -0
- package/dist/src/enums/xrpl-definitions-base.d.ts +47 -0
- package/dist/src/enums/xrpl-definitions-base.js +83 -0
- package/dist/src/enums/xrpl-definitions-base.js.map +1 -0
- package/dist/src/enums/xrpl-definitions.d.ts +22 -0
- package/dist/src/enums/xrpl-definitions.js +30 -0
- package/dist/src/enums/xrpl-definitions.js.map +1 -0
- package/dist/src/hash-prefixes.d.ts +5 -0
- package/dist/src/hash-prefixes.js +43 -0
- package/dist/src/hash-prefixes.js.map +1 -0
- package/dist/src/hashes.d.ts +50 -0
- package/dist/src/hashes.js +76 -0
- package/dist/src/hashes.js.map +1 -0
- package/dist/src/index.d.ts +69 -0
- package/dist/src/index.js +134 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/ledger-hashes.d.ts +48 -0
- package/dist/src/ledger-hashes.js +141 -0
- package/dist/src/ledger-hashes.js.map +1 -0
- package/dist/src/quality.d.ts +21 -0
- package/dist/src/quality.js +42 -0
- package/dist/src/quality.js.map +1 -0
- package/dist/src/serdes/binary-parser.d.ts +100 -0
- package/dist/src/serdes/binary-parser.js +194 -0
- package/dist/src/serdes/binary-parser.js.map +1 -0
- package/dist/src/serdes/binary-serializer.d.ts +81 -0
- package/dist/src/serdes/binary-serializer.js +149 -0
- package/dist/src/serdes/binary-serializer.js.map +1 -0
- package/dist/src/shamap.d.ts +102 -0
- package/dist/src/shamap.js +172 -0
- package/dist/src/shamap.js.map +1 -0
- package/dist/src/types/account-id.d.ts +37 -0
- package/dist/src/types/account-id.js +73 -0
- package/dist/src/types/account-id.js.map +1 -0
- package/dist/src/types/amount.d.ts +92 -0
- package/dist/src/types/amount.js +292 -0
- package/dist/src/types/amount.js.map +1 -0
- package/dist/src/types/blob.d.ts +25 -0
- package/dist/src/types/blob.js +46 -0
- package/dist/src/types/blob.js.map +1 -0
- package/dist/src/types/currency.d.ts +30 -0
- package/dist/src/types/currency.js +131 -0
- package/dist/src/types/currency.js.map +1 -0
- package/dist/src/types/data.d.ts +104 -0
- package/dist/src/types/data.js +387 -0
- package/dist/src/types/data.js.map +1 -0
- package/dist/src/types/dataType.d.ts +94 -0
- package/dist/src/types/dataType.js +145 -0
- package/dist/src/types/dataType.js.map +1 -0
- package/dist/src/types/hash-128.d.ts +18 -0
- package/dist/src/types/hash-128.js +36 -0
- package/dist/src/types/hash-128.js.map +1 -0
- package/dist/src/types/hash-160.d.ts +12 -0
- package/dist/src/types/hash-160.js +23 -0
- package/dist/src/types/hash-160.js.map +1 -0
- package/dist/src/types/hash-192.d.ts +12 -0
- package/dist/src/types/hash-192.js +23 -0
- package/dist/src/types/hash-192.js.map +1 -0
- package/dist/src/types/hash-256.d.ts +12 -0
- package/dist/src/types/hash-256.js +20 -0
- package/dist/src/types/hash-256.js.map +1 -0
- package/dist/src/types/hash.d.ts +40 -0
- package/dist/src/types/hash.js +76 -0
- package/dist/src/types/hash.js.map +1 -0
- package/dist/src/types/index.d.ts +21 -0
- package/dist/src/types/index.js +72 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/issue.d.ts +49 -0
- package/dist/src/types/issue.js +107 -0
- package/dist/src/types/issue.js.map +1 -0
- package/dist/src/types/json.d.ts +169 -0
- package/dist/src/types/json.js +529 -0
- package/dist/src/types/json.js.map +1 -0
- package/dist/src/types/path-set.d.ts +37 -0
- package/dist/src/types/path-set.js +236 -0
- package/dist/src/types/path-set.js.map +1 -0
- package/dist/src/types/serialized-type.d.ts +117 -0
- package/dist/src/types/serialized-type.js +242 -0
- package/dist/src/types/serialized-type.js.map +1 -0
- package/dist/src/types/st-array.d.ts +32 -0
- package/dist/src/types/st-array.js +89 -0
- package/dist/src/types/st-array.js.map +1 -0
- package/dist/src/types/st-number.d.ts +55 -0
- package/dist/src/types/st-number.js +212 -0
- package/dist/src/types/st-number.js.map +1 -0
- package/dist/src/types/st-object.d.ts +33 -0
- package/dist/src/types/st-object.js +176 -0
- package/dist/src/types/st-object.js.map +1 -0
- package/dist/src/types/uint-16.d.ts +26 -0
- package/dist/src/types/uint-16.js +49 -0
- package/dist/src/types/uint-16.js.map +1 -0
- package/dist/src/types/uint-32.d.ts +26 -0
- package/dist/src/types/uint-32.js +54 -0
- package/dist/src/types/uint-32.js.map +1 -0
- package/dist/src/types/uint-64.d.ts +40 -0
- package/dist/src/types/uint-64.js +112 -0
- package/dist/src/types/uint-64.js.map +1 -0
- package/dist/src/types/uint-8.d.ts +26 -0
- package/dist/src/types/uint-8.js +50 -0
- package/dist/src/types/uint-8.js.map +1 -0
- package/dist/src/types/uint.d.ts +29 -0
- package/dist/src/types/uint.js +47 -0
- package/dist/src/types/uint.js.map +1 -0
- package/dist/src/types/vector-256.d.ts +31 -0
- package/dist/src/types/vector-256.js +76 -0
- package/dist/src/types/vector-256.js.map +1 -0
- package/dist/src/types/xchain-bridge.d.ts +45 -0
- package/dist/src/types/xchain-bridge.js +105 -0
- package/dist/src/types/xchain-bridge.js.map +1 -0
- package/dist/src/utils.d.ts +79 -0
- package/dist/src/utils.js +181 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/account-id.d.ts +3 -2
- package/dist/types/account-id.js +8 -6
- package/dist/types/account-id.js.map +1 -1
- package/dist/types/amount.d.ts +33 -9
- package/dist/types/amount.js +128 -43
- package/dist/types/amount.js.map +1 -1
- package/dist/types/blob.d.ts +3 -3
- package/dist/types/blob.js +8 -2
- package/dist/types/blob.js.map +1 -1
- package/dist/types/currency.d.ts +3 -2
- package/dist/types/currency.js +17 -13
- package/dist/types/currency.js.map +1 -1
- package/dist/types/data.d.ts +104 -0
- package/dist/types/data.js +387 -0
- package/dist/types/data.js.map +1 -0
- package/dist/types/dataType.d.ts +94 -0
- package/dist/types/dataType.js +145 -0
- package/dist/types/dataType.js.map +1 -0
- package/dist/types/hash-128.d.ts +3 -2
- package/dist/types/hash-128.js +7 -3
- package/dist/types/hash-128.js.map +1 -1
- package/dist/types/hash-160.d.ts +3 -2
- package/dist/types/hash-160.js +5 -2
- package/dist/types/hash-160.js.map +1 -1
- package/dist/types/hash-192.d.ts +12 -0
- package/dist/types/hash-192.js +23 -0
- package/dist/types/hash-192.js.map +1 -0
- package/dist/types/hash-256.d.ts +3 -2
- package/dist/types/hash-256.js +5 -2
- package/dist/types/hash-256.js.map +1 -1
- package/dist/types/hash.d.ts +2 -3
- package/dist/types/hash.js +8 -4
- package/dist/types/hash.js.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.js +17 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/issue.d.ts +49 -0
- package/dist/types/issue.js +107 -0
- package/dist/types/issue.js.map +1 -0
- package/dist/types/json.d.ts +169 -0
- package/dist/types/json.js +529 -0
- package/dist/types/json.js.map +1 -0
- package/dist/types/path-set.d.ts +2 -1
- package/dist/types/path-set.js +15 -12
- package/dist/types/path-set.js.map +1 -1
- package/dist/types/serialized-type.d.ts +70 -16
- package/dist/types/serialized-type.js +153 -8
- package/dist/types/serialized-type.js.map +1 -1
- package/dist/types/st-array.d.ts +7 -3
- package/dist/types/st-array.js +20 -11
- package/dist/types/st-array.js.map +1 -1
- package/dist/types/st-number.d.ts +55 -0
- package/dist/types/st-number.js +212 -0
- package/dist/types/st-number.js.map +1 -0
- package/dist/types/st-object.d.ts +2 -1
- package/dist/types/st-object.js +35 -8
- package/dist/types/st-object.js.map +1 -1
- package/dist/types/uint-16.d.ts +3 -2
- package/dist/types/uint-16.js +10 -5
- package/dist/types/uint-16.js.map +1 -1
- package/dist/types/uint-32.d.ts +3 -2
- package/dist/types/uint-32.js +11 -6
- package/dist/types/uint-32.js.map +1 -1
- package/dist/types/uint-64.d.ts +8 -7
- package/dist/types/uint-64.js +49 -24
- package/dist/types/uint-64.js.map +1 -1
- package/dist/types/uint-8.d.ts +3 -2
- package/dist/types/uint-8.js +11 -5
- package/dist/types/uint-8.js.map +1 -1
- package/dist/types/uint.d.ts +5 -6
- package/dist/types/uint.js +5 -0
- package/dist/types/uint.js.map +1 -1
- package/dist/types/vector-256.d.ts +3 -3
- package/dist/types/vector-256.js +5 -4
- package/dist/types/vector-256.js.map +1 -1
- package/dist/types/xchain-bridge.d.ts +45 -0
- package/dist/types/xchain-bridge.js +105 -0
- package/dist/types/xchain-bridge.js.map +1 -0
- package/dist/utils.d.ts +79 -0
- package/dist/utils.js +181 -0
- package/dist/utils.js.map +1 -0
- package/package.json +21 -17
- package/src/README.md +5 -0
- package/src/binary.ts +235 -0
- package/src/coretypes.ts +31 -0
- package/src/enums/README.md +144 -0
- package/src/enums/bytes.ts +80 -0
- package/src/enums/constants.ts +5 -0
- package/src/enums/definitions.json +3409 -0
- package/src/enums/field.ts +84 -0
- package/src/enums/index.ts +34 -0
- package/src/enums/utils-renumber.ts +134 -0
- package/src/enums/xrpl-definitions-base.ts +150 -0
- package/src/enums/xrpl-definitions.ts +33 -0
- package/src/hash-prefixes.ts +42 -0
- package/src/hashes.ts +75 -0
- package/src/index.ts +166 -0
- package/src/ledger-hashes.ts +191 -0
- package/src/quality.ts +38 -0
- package/src/serdes/binary-parser.ts +228 -0
- package/src/serdes/binary-serializer.ts +166 -0
- package/src/shamap.ts +189 -0
- package/src/types/account-id.ts +91 -0
- package/src/types/amount.ts +366 -0
- package/src/types/blob.ts +50 -0
- package/src/types/currency.ts +145 -0
- package/src/types/data.ts +496 -0
- package/src/types/dataType.ts +178 -0
- package/src/types/hash-128.ts +38 -0
- package/src/types/hash-160.ts +24 -0
- package/src/types/hash-192.ts +24 -0
- package/src/types/hash-256.ts +20 -0
- package/src/types/hash.ts +86 -0
- package/src/types/index.ts +74 -0
- package/src/types/issue.ts +140 -0
- package/src/types/json.ts +641 -0
- package/src/types/path-set.ts +294 -0
- package/src/types/serialized-type.ts +271 -0
- package/src/types/st-array.ts +117 -0
- package/src/types/st-number.ts +238 -0
- package/src/types/st-object.ts +219 -0
- package/src/types/uint-16.ts +58 -0
- package/src/types/uint-32.ts +64 -0
- package/src/types/uint-64.ts +141 -0
- package/src/types/uint-8.ts +57 -0
- package/src/types/uint.ts +60 -0
- package/src/types/vector-256.ts +83 -0
- package/src/types/xchain-bridge.ts +132 -0
- package/src/utils.ts +220 -0
- package/test/amount.test.js +0 -43
- package/test/binary-json.test.js +0 -45
- package/test/binary-parser.test.js +0 -396
- package/test/binary-serializer.test.js +0 -319
- package/test/definitions.test.js +0 -100
- package/test/fixtures/account-tx-transactions.db +0 -0
- package/test/fixtures/codec-fixtures.json +0 -4466
- package/test/fixtures/data-driven-tests.json +0 -2919
- package/test/fixtures/delivermin-tx-binary.json +0 -1
- package/test/fixtures/delivermin-tx.json +0 -98
- package/test/fixtures/deposit-preauth-tx-binary.json +0 -1
- package/test/fixtures/deposit-preauth-tx-meta-binary.json +0 -1
- package/test/fixtures/deposit-preauth-tx.json +0 -58
- package/test/fixtures/escrow-cancel-binary.json +0 -1
- package/test/fixtures/escrow-cancel-tx.json +0 -6
- package/test/fixtures/escrow-create-binary.json +0 -1
- package/test/fixtures/escrow-create-tx.json +0 -10
- package/test/fixtures/escrow-finish-binary.json +0 -1
- package/test/fixtures/escrow-finish-meta-binary.json +0 -1
- package/test/fixtures/escrow-finish-tx.json +0 -95
- package/test/fixtures/ledger-full-38129.json +0 -1
- package/test/fixtures/ledger-full-40000.json +0 -1
- package/test/fixtures/negative-unl.json +0 -12
- package/test/fixtures/nf-token.json +0 -547
- package/test/fixtures/payment-channel-claim-binary.json +0 -1
- package/test/fixtures/payment-channel-claim-tx.json +0 -8
- package/test/fixtures/payment-channel-create-binary.json +0 -1
- package/test/fixtures/payment-channel-create-tx.json +0 -11
- package/test/fixtures/payment-channel-fund-binary.json +0 -1
- package/test/fixtures/payment-channel-fund-tx.json +0 -7
- package/test/fixtures/remit-binary.json +0 -1
- package/test/fixtures/remit-tx.json +0 -39
- package/test/fixtures/signerlistset-tx-binary.json +0 -1
- package/test/fixtures/signerlistset-tx-meta-binary.json +0 -1
- package/test/fixtures/signerlistset-tx.json +0 -94
- package/test/fixtures/ticket-create-binary.json +0 -1
- package/test/fixtures/ticket-create-tx.json +0 -7
- package/test/fixtures/unl-report-binary.json +0 -1
- package/test/fixtures/unl-report-meta-binary.json +0 -1
- package/test/fixtures/unl-report.json +0 -89
- package/test/fixtures/x-codec-fixtures.json +0 -188
- package/test/hash.test.js +0 -135
- package/test/ledger.test.js +0 -29
- package/test/lower-case-hex.test.js +0 -46
- package/test/pseudo-transaction.test.js +0 -38
- package/test/quality.test.js +0 -15
- package/test/shamap.test.js +0 -89
- package/test/signing-data-encoding.test.js +0 -213
- package/test/tx-encode-decode.test.js +0 -119
- package/test/types.test.js +0 -34
- package/test/uint.test.js +0 -148
- package/test/utils.js +0 -30
- package/test/x-address.test.js +0 -181
|
@@ -19,12 +19,14 @@ declare class XrplDefinitionsBase {
|
|
|
19
19
|
transactionResult: BytesLookup;
|
|
20
20
|
transactionType: BytesLookup;
|
|
21
21
|
transactionNames: string[];
|
|
22
|
-
transactionMap: Record<string, number>;
|
|
23
22
|
dataTypes: Record<string, typeof SerializedType>;
|
|
23
|
+
granularPermissions: Record<string, number>;
|
|
24
|
+
delegatablePermissions: BytesLookup;
|
|
24
25
|
/**
|
|
25
26
|
* Present rippled types in a typed and updatable format.
|
|
26
|
-
* For an example of the input format see `definitions.json
|
|
27
|
-
* To generate a new definitions file from rippled source code, use
|
|
27
|
+
* For an example of the input format see `definitions.json`.
|
|
28
|
+
* To generate a new definitions file from rippled source code, use the tool at
|
|
29
|
+
* `packages/ripple-binary-codec/tools/generateDefinitions.js`.
|
|
28
30
|
*
|
|
29
31
|
* See the definitions.test.js file for examples of how to create your own updated definitions.json.
|
|
30
32
|
*
|
|
@@ -14,8 +14,9 @@ const constants_1 = require("./constants");
|
|
|
14
14
|
class XrplDefinitionsBase {
|
|
15
15
|
/**
|
|
16
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
|
|
17
|
+
* For an example of the input format see `definitions.json`.
|
|
18
|
+
* To generate a new definitions file from rippled source code, use the tool at
|
|
19
|
+
* `packages/ripple-binary-codec/tools/generateDefinitions.js`.
|
|
19
20
|
*
|
|
20
21
|
* See the definitions.test.js file for examples of how to create your own updated definitions.json.
|
|
21
22
|
*
|
|
@@ -32,12 +33,28 @@ class XrplDefinitionsBase {
|
|
|
32
33
|
this.transactionNames = Object.entries(enums.TRANSACTION_TYPES)
|
|
33
34
|
.filter(([_key, value]) => value >= 0)
|
|
34
35
|
.map(([key, _value]) => key);
|
|
35
|
-
const ignoreList = ['EnableAmendment', 'SetFee', 'UNLModify', 'EmitFailure'];
|
|
36
|
-
this.transactionMap = Object.assign({}, ...Object.entries(enums.TRANSACTION_TYPES)
|
|
37
|
-
.filter(([_key, _value]) => _value >= 0 || ignoreList.includes(_key))
|
|
38
|
-
.map(([key, value]) => ({ [key]: value })));
|
|
39
36
|
this.dataTypes = {}; // Filled in via associateTypes
|
|
40
37
|
this.associateTypes(types);
|
|
38
|
+
this.granularPermissions = {
|
|
39
|
+
TrustlineAuthorize: 65537,
|
|
40
|
+
TrustlineFreeze: 65538,
|
|
41
|
+
TrustlineUnfreeze: 65539,
|
|
42
|
+
AccountDomainSet: 65540,
|
|
43
|
+
AccountEmailHashSet: 65541,
|
|
44
|
+
AccountMessageKeySet: 65542,
|
|
45
|
+
AccountTransferRateSet: 65543,
|
|
46
|
+
AccountTickSizeSet: 65544,
|
|
47
|
+
PaymentMint: 65545,
|
|
48
|
+
PaymentBurn: 65546,
|
|
49
|
+
MPTokenIssuanceLock: 65547,
|
|
50
|
+
MPTokenIssuanceUnlock: 65548,
|
|
51
|
+
};
|
|
52
|
+
const incrementedTransactionTypes = Object.fromEntries(Object.entries(enums.TRANSACTION_TYPES).map(([key, value]) => [
|
|
53
|
+
key,
|
|
54
|
+
value + 1,
|
|
55
|
+
]));
|
|
56
|
+
const combinedPermissions = Object.assign(Object.assign({}, this.granularPermissions), incrementedTransactionTypes);
|
|
57
|
+
this.delegatablePermissions = new bytes_1.BytesLookup(combinedPermissions, constants_1.DELEGATABLE_PERMISSIONS_WIDTH);
|
|
41
58
|
}
|
|
42
59
|
/**
|
|
43
60
|
* Associates each Field to a corresponding class that TypeScript can recognize.
|
|
@@ -54,6 +71,9 @@ class XrplDefinitionsBase {
|
|
|
54
71
|
this.field['TransactionType'].associatedType = this.transactionType;
|
|
55
72
|
this.field['TransactionResult'].associatedType = this.transactionResult;
|
|
56
73
|
this.field['LedgerEntryType'].associatedType = this.ledgerEntryType;
|
|
74
|
+
if (this.field['PermissionValue']) {
|
|
75
|
+
this.field['PermissionValue'].associatedType = this.delegatablePermissions;
|
|
76
|
+
}
|
|
57
77
|
}
|
|
58
78
|
getAssociatedTypes() {
|
|
59
79
|
return this.dataTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xrpl-definitions-base.js","sourceRoot":"","sources":["../../src/enums/xrpl-definitions-base.ts"],"names":[],"mappings":";;;AACA,mCAA4C;
|
|
1
|
+
{"version":3,"file":"xrpl-definitions-base.js","sourceRoot":"","sources":["../../src/enums/xrpl-definitions-base.ts"],"names":[],"mappings":";;;AACA,mCAA4C;AAkJ1C,sFAlJO,aAAK,OAkJP;AACL,4FAnJc,mBAAW,OAmJd;AAlJb,mCAA+D;AA8I7D,4FA9IkB,mBAAW,OA8IlB;AA7Ib,2CAMoB;AAUpB;;;GAGG;AACH,MAAM,mBAAmB;IAoBvB;;;;;;;;;;;OAWG;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,KAAK,CACZ,CAAA;QACD,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC;aAC5D,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC;aACrC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAA;QAE9B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAA,CAAC,+BAA+B;QACnD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;QAE1B,I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IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAA;QACvE,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,eAAe,CAAA;QACnE,IAAI,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE;YACjC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC,sBAAsB,CAAA;SAC3E;IACH,CAAC;IAEM,kBAAkB;QACvB,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;CACF;AAIC,kDAAmB"}
|
|
@@ -9,7 +9,8 @@ export declare class XrplDefinitions extends XrplDefinitionsBase {
|
|
|
9
9
|
/**
|
|
10
10
|
* Present rippled types in a typed and updatable format.
|
|
11
11
|
* For an example of the input format see `definitions.json`
|
|
12
|
-
* To generate a new definitions file from rippled source code, use
|
|
12
|
+
* To generate a new definitions file from rippled source code, use the tool at
|
|
13
|
+
* `packages/ripple-binary-codec/tools/generateDefinitions.js`.
|
|
13
14
|
*
|
|
14
15
|
* See the definitions.test.js file for examples of how to create your own updated definitions.json.
|
|
15
16
|
*
|
|
@@ -12,7 +12,8 @@ class XrplDefinitions extends xrpl_definitions_base_1.XrplDefinitionsBase {
|
|
|
12
12
|
/**
|
|
13
13
|
* Present rippled types in a typed and updatable format.
|
|
14
14
|
* For an example of the input format see `definitions.json`
|
|
15
|
-
* To generate a new definitions file from rippled source code, use
|
|
15
|
+
* To generate a new definitions file from rippled source code, use the tool at
|
|
16
|
+
* `packages/ripple-binary-codec/tools/generateDefinitions.js`.
|
|
16
17
|
*
|
|
17
18
|
* See the definitions.test.js file for examples of how to create your own updated definitions.json.
|
|
18
19
|
*
|
|
@@ -1 +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
|
|
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;;;;;;;;;;;OAWG;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;AApBD,0CAoBC"}
|
package/dist/hash-prefixes.d.ts
CHANGED
package/dist/hash-prefixes.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HashPrefix = void 0;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
5
|
/**
|
|
6
|
-
* Write a 32 bit integer to a
|
|
6
|
+
* Write a 32 bit integer to a Uint8Array
|
|
7
7
|
*
|
|
8
|
-
* @param uint32 32 bit integer to write to
|
|
9
|
-
* @returns a
|
|
8
|
+
* @param uint32 32 bit integer to write to Uint8Array
|
|
9
|
+
* @returns a Uint8Array with the bytes representation of uint32
|
|
10
10
|
*/
|
|
11
11
|
function bytes(uint32) {
|
|
12
|
-
const result =
|
|
13
|
-
|
|
12
|
+
const result = new Uint8Array(4);
|
|
13
|
+
(0, utils_1.writeUInt32BE)(result, uint32, 0);
|
|
14
14
|
return result;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
@@ -36,6 +36,8 @@ const HashPrefix = {
|
|
|
36
36
|
proposal: bytes(0x50525000),
|
|
37
37
|
// payment channel claim
|
|
38
38
|
paymentChannelClaim: bytes(0x434c4d00),
|
|
39
|
+
// batch
|
|
40
|
+
batch: bytes(0x42434800),
|
|
39
41
|
};
|
|
40
42
|
exports.HashPrefix = HashPrefix;
|
|
41
43
|
//# sourceMappingURL=hash-prefixes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-prefixes.js","sourceRoot":"","sources":["../src/hash-prefixes.ts"],"names":[],"mappings":";;;AAAA,
|
|
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;IACtC,QAAQ;IACR,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC;CACzB,CAAA;AAEQ,gCAAU"}
|
package/dist/hashes.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Hash256 } from './types
|
|
1
|
+
import { Hash256 } from './types';
|
|
2
2
|
import { BytesList } from './serdes/binary-serializer';
|
|
3
|
-
import { Buffer } from 'buffer/';
|
|
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:
|
|
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:
|
|
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():
|
|
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:
|
|
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:
|
|
49
|
+
declare function transactionID(serialized: Uint8Array): Hash256;
|
|
51
50
|
export { Sha512Half, sha512Half, transactionID };
|
package/dist/hashes.js
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transactionID = exports.sha512Half = exports.Sha512Half = void 0;
|
|
4
4
|
const hash_prefixes_1 = require("./hash-prefixes");
|
|
5
|
-
const
|
|
6
|
-
const hash_256_1 = require("./types/hash-256");
|
|
5
|
+
const types_1 = require("./types");
|
|
7
6
|
const binary_serializer_1 = require("./serdes/binary-serializer");
|
|
8
|
-
const
|
|
7
|
+
const sha512_1 = require("@transia/isomorphic/sha512");
|
|
9
8
|
/**
|
|
10
9
|
* Class for hashing with SHA512
|
|
11
10
|
* @extends BytesList So SerializedTypes can write bytes to a Sha512Half
|
|
@@ -13,7 +12,7 @@ const buffer_1 = require("buffer/");
|
|
|
13
12
|
class Sha512Half extends binary_serializer_1.BytesList {
|
|
14
13
|
constructor() {
|
|
15
14
|
super(...arguments);
|
|
16
|
-
this.hash =
|
|
15
|
+
this.hash = sha512_1.sha512.create();
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
18
|
* Construct a new Sha512Hash and write bytes this.hash
|
|
@@ -40,7 +39,7 @@ class Sha512Half extends binary_serializer_1.BytesList {
|
|
|
40
39
|
* @returns half of a SHA512 hash
|
|
41
40
|
*/
|
|
42
41
|
finish256() {
|
|
43
|
-
return
|
|
42
|
+
return Uint8Array.from(this.hash.digest().slice(0, 32));
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* Constructs a Hash256 from the Sha512Half object
|
|
@@ -48,7 +47,7 @@ class Sha512Half extends binary_serializer_1.BytesList {
|
|
|
48
47
|
* @returns a Hash256 object
|
|
49
48
|
*/
|
|
50
49
|
finish() {
|
|
51
|
-
return new
|
|
50
|
+
return new types_1.Hash256(this.finish256());
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
exports.Sha512Half = Sha512Half;
|
|
@@ -71,7 +70,7 @@ exports.sha512Half = sha512Half;
|
|
|
71
70
|
* @returns a Hash256 object
|
|
72
71
|
*/
|
|
73
72
|
function transactionID(serialized) {
|
|
74
|
-
return new
|
|
73
|
+
return new types_1.Hash256(sha512Half(hash_prefixes_1.HashPrefix.transactionID, serialized));
|
|
75
74
|
}
|
|
76
75
|
exports.transactionID = transactionID;
|
|
77
76
|
//# sourceMappingURL=hashes.js.map
|
package/dist/hashes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashes.js","sourceRoot":"","sources":["../src/hashes.ts"],"names":[],"mappings":";;;AAAA,mDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"hashes.js","sourceRoot":"","sources":["../src/hashes.ts"],"names":[],"mappings":";;;AAAA,mDAA4C;AAC5C,mCAAiC;AACjC,kEAAsD;AACtD,uDAAmD;AAEnD;;;GAGG;AACH,MAAM,UAAW,SAAQ,6BAAS;IAAlC;;QACU,SAAI,GAAG,eAAM,CAAC,MAAM,EAAE,CAAA;IAwChC,CAAC;IAtCC;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,KAAiB;QAC1B,OAAO,IAAI,UAAU,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,KAAiB;QACnB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;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,6 +1,6 @@
|
|
|
1
1
|
import { decodeLedgerData } from './ledger-hashes';
|
|
2
2
|
import { JsonObject } from './types/serialized-type';
|
|
3
|
-
import { XrplDefinitionsBase, TRANSACTION_TYPES,
|
|
3
|
+
import { XrplDefinitionsBase, TRANSACTION_TYPES, DEFAULT_DEFINITIONS } from './enums';
|
|
4
4
|
import { XrplDefinitions } from './enums/xrpl-definitions';
|
|
5
5
|
import { coreTypes } from './types';
|
|
6
6
|
/**
|
|
@@ -30,23 +30,28 @@ declare function encode(json: object, definitions?: XrplDefinitionsBase): string
|
|
|
30
30
|
*/
|
|
31
31
|
declare function encodeForSigning(json: object, definitions?: XrplDefinitionsBase): string;
|
|
32
32
|
/**
|
|
33
|
-
* Encode a
|
|
33
|
+
* Encode a payment channel claim for signing.
|
|
34
34
|
*
|
|
35
|
-
* @param json JSON object representing the
|
|
36
|
-
* @
|
|
37
|
-
* @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
|
38
|
-
* @returns a hex string of the encoded transaction
|
|
35
|
+
* @param json JSON object representing the claim.
|
|
36
|
+
* @returns a hex string of the encoded claim.
|
|
39
37
|
*/
|
|
40
38
|
declare function encodeForSigningClaim(json: object): string;
|
|
41
39
|
/**
|
|
42
|
-
* Encode a transaction and prepare for multi-signing
|
|
40
|
+
* Encode a transaction and prepare for multi-signing.
|
|
43
41
|
*
|
|
44
|
-
* @param json JSON object representing the transaction
|
|
45
|
-
* @param signer string representing the account to sign the transaction with
|
|
42
|
+
* @param json JSON object representing the transaction.
|
|
43
|
+
* @param signer string representing the account to sign the transaction with.
|
|
46
44
|
* @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
|
47
|
-
* @returns a hex string of the encoded transaction
|
|
45
|
+
* @returns a hex string of the encoded transaction.
|
|
48
46
|
*/
|
|
49
47
|
declare function encodeForMultisigning(json: object, signer: string, definitions?: XrplDefinitionsBase): string;
|
|
48
|
+
/**
|
|
49
|
+
* Encode a Batch transaction for signing.
|
|
50
|
+
*
|
|
51
|
+
* @param json JSON object representing the transaction.
|
|
52
|
+
* @returns a hex string of the encoded transaction.
|
|
53
|
+
*/
|
|
54
|
+
declare function encodeForSigningBatch(json: object): string;
|
|
50
55
|
/**
|
|
51
56
|
* Encode a quality value
|
|
52
57
|
*
|
|
@@ -61,4 +66,4 @@ declare function encodeQuality(value: string): string;
|
|
|
61
66
|
* @returns a string representing the quality
|
|
62
67
|
*/
|
|
63
68
|
declare function decodeQuality(value: string): string;
|
|
64
|
-
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES,
|
|
69
|
+
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeForSigningBatch, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,19 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.
|
|
27
|
-
const assert = __importStar(require("assert"));
|
|
3
|
+
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.TRANSACTION_TYPES = exports.decodeLedgerData = exports.decodeQuality = exports.encodeQuality = exports.encodeForSigningBatch = exports.encodeForMultisigning = exports.encodeForSigningClaim = exports.encodeForSigning = exports.encode = exports.decode = void 0;
|
|
28
4
|
const coretypes_1 = require("./coretypes");
|
|
29
5
|
const ledger_hashes_1 = require("./ledger-hashes");
|
|
30
6
|
Object.defineProperty(exports, "decodeLedgerData", { enumerable: true, get: function () { return ledger_hashes_1.decodeLedgerData; } });
|
|
31
7
|
const enums_1 = require("./enums");
|
|
32
8
|
Object.defineProperty(exports, "XrplDefinitionsBase", { enumerable: true, get: function () { return enums_1.XrplDefinitionsBase; } });
|
|
33
9
|
Object.defineProperty(exports, "TRANSACTION_TYPES", { enumerable: true, get: function () { return enums_1.TRANSACTION_TYPES; } });
|
|
34
|
-
Object.defineProperty(exports, "TRANSACTION_TYPE_MAP", { enumerable: true, get: function () { return enums_1.TRANSACTION_TYPE_MAP; } });
|
|
35
10
|
Object.defineProperty(exports, "DEFAULT_DEFINITIONS", { enumerable: true, get: function () { return enums_1.DEFAULT_DEFINITIONS; } });
|
|
36
11
|
const xrpl_definitions_1 = require("./enums/xrpl-definitions");
|
|
37
12
|
Object.defineProperty(exports, "XrplDefinitions", { enumerable: true, get: function () { return xrpl_definitions_1.XrplDefinitions; } });
|
|
38
13
|
const types_1 = require("./types");
|
|
39
14
|
Object.defineProperty(exports, "coreTypes", { enumerable: true, get: function () { return types_1.coreTypes; } });
|
|
40
|
-
const
|
|
15
|
+
const utils_1 = require("@transia/isomorphic/utils");
|
|
16
|
+
const { signingData, signingClaimData, multiSigningData, signingBatchData, binaryToJSON, serializeObject, } = coretypes_1.binary;
|
|
41
17
|
/**
|
|
42
18
|
* Decode a transaction
|
|
43
19
|
*
|
|
@@ -46,7 +22,9 @@ const { signingData, signingClaimData, multiSigningData, binaryToJSON, serialize
|
|
|
46
22
|
* @returns the JSON representation of the transaction
|
|
47
23
|
*/
|
|
48
24
|
function decode(binary, definitions) {
|
|
49
|
-
|
|
25
|
+
if (typeof binary !== 'string') {
|
|
26
|
+
throw new Error('binary must be a hex string');
|
|
27
|
+
}
|
|
50
28
|
return binaryToJSON(binary, definitions);
|
|
51
29
|
}
|
|
52
30
|
exports.decode = decode;
|
|
@@ -59,10 +37,10 @@ exports.decode = decode;
|
|
|
59
37
|
* @returns A hex-string of the encoded transaction
|
|
60
38
|
*/
|
|
61
39
|
function encode(json, definitions) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
40
|
+
if (typeof json !== 'object') {
|
|
41
|
+
throw new Error();
|
|
42
|
+
}
|
|
43
|
+
return (0, utils_1.bytesToHex)(serializeObject(json, { definitions }));
|
|
66
44
|
}
|
|
67
45
|
exports.encode = encode;
|
|
68
46
|
/**
|
|
@@ -74,46 +52,59 @@ exports.encode = encode;
|
|
|
74
52
|
* @returns a hex string of the encoded transaction
|
|
75
53
|
*/
|
|
76
54
|
function encodeForSigning(json, definitions) {
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
if (typeof json !== 'object') {
|
|
56
|
+
throw new Error();
|
|
57
|
+
}
|
|
58
|
+
return (0, utils_1.bytesToHex)(signingData(json, coretypes_1.HashPrefix.transactionSig, {
|
|
79
59
|
definitions,
|
|
80
|
-
})
|
|
81
|
-
.toString('hex')
|
|
82
|
-
.toUpperCase();
|
|
60
|
+
}));
|
|
83
61
|
}
|
|
84
62
|
exports.encodeForSigning = encodeForSigning;
|
|
85
63
|
/**
|
|
86
|
-
* Encode a
|
|
64
|
+
* Encode a payment channel claim for signing.
|
|
87
65
|
*
|
|
88
|
-
* @param json JSON object representing the
|
|
89
|
-
* @
|
|
90
|
-
* @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
|
91
|
-
* @returns a hex string of the encoded transaction
|
|
66
|
+
* @param json JSON object representing the claim.
|
|
67
|
+
* @returns a hex string of the encoded claim.
|
|
92
68
|
*/
|
|
93
69
|
function encodeForSigningClaim(json) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
70
|
+
if (typeof json !== 'object') {
|
|
71
|
+
throw new Error();
|
|
72
|
+
}
|
|
73
|
+
return (0, utils_1.bytesToHex)(signingClaimData(json));
|
|
98
74
|
}
|
|
99
75
|
exports.encodeForSigningClaim = encodeForSigningClaim;
|
|
100
76
|
/**
|
|
101
|
-
* Encode a transaction and prepare for multi-signing
|
|
77
|
+
* Encode a transaction and prepare for multi-signing.
|
|
102
78
|
*
|
|
103
|
-
* @param json JSON object representing the transaction
|
|
104
|
-
* @param signer string representing the account to sign the transaction with
|
|
79
|
+
* @param json JSON object representing the transaction.
|
|
80
|
+
* @param signer string representing the account to sign the transaction with.
|
|
105
81
|
* @param definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
|
106
|
-
* @returns a hex string of the encoded transaction
|
|
82
|
+
* @returns a hex string of the encoded transaction.
|
|
107
83
|
*/
|
|
108
84
|
function encodeForMultisigning(json, signer, definitions) {
|
|
109
|
-
|
|
110
|
-
|
|
85
|
+
if (typeof json !== 'object') {
|
|
86
|
+
throw new Error();
|
|
87
|
+
}
|
|
88
|
+
if (json['SigningPubKey'] !== '') {
|
|
89
|
+
throw new Error();
|
|
90
|
+
}
|
|
111
91
|
const definitionsOpt = definitions ? { definitions } : undefined;
|
|
112
|
-
return multiSigningData(json, signer, definitionsOpt)
|
|
113
|
-
.toString('hex')
|
|
114
|
-
.toUpperCase();
|
|
92
|
+
return (0, utils_1.bytesToHex)(multiSigningData(json, signer, definitionsOpt));
|
|
115
93
|
}
|
|
116
94
|
exports.encodeForMultisigning = encodeForMultisigning;
|
|
95
|
+
/**
|
|
96
|
+
* Encode a Batch transaction for signing.
|
|
97
|
+
*
|
|
98
|
+
* @param json JSON object representing the transaction.
|
|
99
|
+
* @returns a hex string of the encoded transaction.
|
|
100
|
+
*/
|
|
101
|
+
function encodeForSigningBatch(json) {
|
|
102
|
+
if (typeof json !== 'object') {
|
|
103
|
+
throw new Error('Need an object to encode a Batch transaction');
|
|
104
|
+
}
|
|
105
|
+
return (0, utils_1.bytesToHex)(signingBatchData(json));
|
|
106
|
+
}
|
|
107
|
+
exports.encodeForSigningBatch = encodeForSigningBatch;
|
|
117
108
|
/**
|
|
118
109
|
* Encode a quality value
|
|
119
110
|
*
|
|
@@ -121,8 +112,10 @@ exports.encodeForMultisigning = encodeForMultisigning;
|
|
|
121
112
|
* @returns a hex-string representing the quality
|
|
122
113
|
*/
|
|
123
114
|
function encodeQuality(value) {
|
|
124
|
-
|
|
125
|
-
|
|
115
|
+
if (typeof value !== 'string') {
|
|
116
|
+
throw new Error();
|
|
117
|
+
}
|
|
118
|
+
return (0, utils_1.bytesToHex)(coretypes_1.quality.encode(value));
|
|
126
119
|
}
|
|
127
120
|
exports.encodeQuality = encodeQuality;
|
|
128
121
|
/**
|
|
@@ -132,7 +125,9 @@ exports.encodeQuality = encodeQuality;
|
|
|
132
125
|
* @returns a string representing the quality
|
|
133
126
|
*/
|
|
134
127
|
function decodeQuality(value) {
|
|
135
|
-
|
|
128
|
+
if (typeof value !== 'string') {
|
|
129
|
+
throw new Error();
|
|
130
|
+
}
|
|
136
131
|
return coretypes_1.quality.decode(value).toString();
|
|
137
132
|
}
|
|
138
133
|
exports.decodeQuality = decodeQuality;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AACzD,mDAAkD;AA8JhD,iGA9JO,gCAAgB,OA8JP;AA3JlB,mCAIgB;AA0Jd,oGA7JA,2BAAmB,OA6JA;AAFnB,kGA1JA,yBAAiB,OA0JA;AAGjB,oGA5JA,2BAAmB,OA4JA;AA1JrB,+DAA0D;AAwJxD,gGAxJO,kCAAe,OAwJP;AAvJjB,mCAAmC;AA0JjC,0FA1JO,iBAAS,OA0JP;AAzJX,qDAAsD;AAEtD,MAAM,EACJ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,GAAG,kBAAM,CAAA;AAEV;;;;;;GAMG;AACH,SAAS,MAAM,CAAC,MAAc,EAAE,WAAiC;IAC/D,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,6BAA6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AC,CAAC,SAAS,CAAA;IAChE,OAAO,IAAA,kBAAU,EACf,gBAAgB,CAAC,IAAkB,EAAE,MAAM,EAAE,cAAc,CAAC,CAC7D,CAAA;AACH,CAAC;AA8CC,sDAAqB;AA5CvB;;;;;GAKG;AACH,SAAS,qBAAqB,CAAC,IAAY;IACzC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;KAChE;IACD,OAAO,IAAA,kBAAU,EAAC,gBAAgB,CAAC,IAAmB,CAAC,CAAC,CAAA;AAC1D,CAAC;AAkCC,sDAAqB;AAhCvB;;;;;GAKG;AACH,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,MAAM,IAAI,KAAK,EAAE,CAAA;KAClB;IACD,OAAO,IAAA,kBAAU,EAAC,mBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;AAC1C,CAAC;AAsBC,sCAAa;AApBf;;;;;GAKG;AACH,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,MAAM,IAAI,KAAK,EAAE,CAAA;KAClB;IACD,OAAO,mBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAA;AACzC,CAAC;AAUC,sCAAa"}
|
package/dist/ledger-hashes.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Hash256 } from './types/hash-256';
|
|
2
2
|
import { JsonObject } from './types/serialized-type';
|
|
3
|
-
import bigInt = require('big-integer');
|
|
4
3
|
import { XrplDefinitionsBase } from './enums';
|
|
5
4
|
/**
|
|
6
5
|
* Function computing the hash of a transaction tree
|
|
@@ -21,7 +20,7 @@ declare function accountStateHash(param: Array<JsonObject>): Hash256;
|
|
|
21
20
|
*/
|
|
22
21
|
interface ledgerObject {
|
|
23
22
|
ledger_index: number;
|
|
24
|
-
total_coins: string | number |
|
|
23
|
+
total_coins: string | number | bigint;
|
|
25
24
|
parent_hash: string;
|
|
26
25
|
transaction_hash: string;
|
|
27
26
|
account_hash: string;
|
package/dist/ledger-hashes.js
CHANGED
|
@@ -1,30 +1,6 @@
|
|
|
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
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.decodeLedgerData = exports.ledgerHash = exports.transactionTreeHash = exports.accountStateHash = void 0;
|
|
27
|
-
const assert = __importStar(require("assert"));
|
|
28
4
|
const shamap_1 = require("./shamap");
|
|
29
5
|
const hash_prefixes_1 = require("./hash-prefixes");
|
|
30
6
|
const hashes_1 = require("./hashes");
|
|
@@ -35,7 +11,6 @@ const uint_64_1 = require("./types/uint-64");
|
|
|
35
11
|
const uint_32_1 = require("./types/uint-32");
|
|
36
12
|
const uint_8_1 = require("./types/uint-8");
|
|
37
13
|
const binary_parser_1 = require("./serdes/binary-parser");
|
|
38
|
-
const bigInt = require("big-integer");
|
|
39
14
|
/**
|
|
40
15
|
* Computes the hash of a list of objects
|
|
41
16
|
*
|
|
@@ -55,7 +30,9 @@ function computeHash(itemizer, itemsJson) {
|
|
|
55
30
|
* @returns a tuple of index and item to be added to SHAMap
|
|
56
31
|
*/
|
|
57
32
|
function transactionItemizer(json) {
|
|
58
|
-
|
|
33
|
+
if (!json.hash) {
|
|
34
|
+
throw new Error();
|
|
35
|
+
}
|
|
59
36
|
const index = hash_256_1.Hash256.from(json.hash);
|
|
60
37
|
const item = {
|
|
61
38
|
hashPrefix() {
|
|
@@ -119,10 +96,12 @@ exports.accountStateHash = accountStateHash;
|
|
|
119
96
|
function ledgerHash(header) {
|
|
120
97
|
const hash = new hashes_1.Sha512Half();
|
|
121
98
|
hash.put(hash_prefixes_1.HashPrefix.ledgerHeader);
|
|
122
|
-
|
|
123
|
-
|
|
99
|
+
if (header.parent_close_time === undefined ||
|
|
100
|
+
header.close_flags === undefined) {
|
|
101
|
+
throw new Error();
|
|
102
|
+
}
|
|
124
103
|
uint_32_1.UInt32.from(header.ledger_index).toBytesSink(hash);
|
|
125
|
-
uint_64_1.UInt64.from(
|
|
104
|
+
uint_64_1.UInt64.from(BigInt(String(header.total_coins))).toBytesSink(hash);
|
|
126
105
|
hash_256_1.Hash256.from(header.parent_hash).toBytesSink(hash);
|
|
127
106
|
hash_256_1.Hash256.from(header.transaction_hash).toBytesSink(hash);
|
|
128
107
|
hash_256_1.Hash256.from(header.account_hash).toBytesSink(hash);
|
|
@@ -142,7 +121,9 @@ exports.ledgerHash = ledgerHash;
|
|
|
142
121
|
* @returns A JSON object describing a ledger header
|
|
143
122
|
*/
|
|
144
123
|
function decodeLedgerData(binary, definitions) {
|
|
145
|
-
|
|
124
|
+
if (typeof binary !== 'string') {
|
|
125
|
+
throw new Error('binary must be a hex string');
|
|
126
|
+
}
|
|
146
127
|
const parser = new binary_parser_1.BinaryParser(binary, definitions);
|
|
147
128
|
return {
|
|
148
129
|
ledger_index: parser.readUInt32(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-hashes.js","sourceRoot":"","sources":["../src/ledger-hashes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ledger-hashes.js","sourceRoot":"","sources":["../src/ledger-hashes.ts"],"names":[],"mappings":";;;AAAA,qCAAyD;AACzD,mDAA4C;AAC5C,qCAAqC;AACrC,qCAA4D;AAC5D,+CAA0C;AAC1C,iDAA4C;AAC5C,6CAAwC;AACxC,6CAAwC;AACxC,2CAAsC;AACtC,0DAAqD;AAIrD;;;;;;GAMG;AACH,SAAS,WAAW,CAClB,QAAoE,EACpE,SAA4B;IAE5B,MAAM,GAAG,GAAG,IAAI,eAAM,EAAE,CAAA;IACxB,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAC3D,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AAUD;;;;;GAKG;AACH,SAAS,mBAAmB,CAC1B,IAA2B;IAE3B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACd,MAAM,IAAI,KAAK,EAAE,CAAA;KAClB;IACD,MAAM,KAAK,GAAG,kBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,MAAM,IAAI,GAAG;QACX,UAAU;YACR,OAAO,0BAAU,CAAC,WAAW,CAAA;QAC/B,CAAC;QACD,WAAW,CAAC,IAAI;YACd,MAAM,UAAU,GAAG,IAAI,yBAAgB,CAAC,IAAI,CAAC,CAAA;YAC7C,UAAU,CA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