ripple-binary-codec 2.3.0-batch.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binary.d.ts +1 -16
- package/dist/binary.js +1 -28
- package/dist/binary.js.map +1 -1
- package/dist/enums/definitions.json +20 -85
- package/dist/enums/src/enums/definitions.json +20 -90
- package/dist/hash-prefixes.js +0 -2
- package/dist/hash-prefixes.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -9
- package/dist/index.js.map +1 -1
- package/dist/src/binary.d.ts +1 -16
- package/dist/src/binary.js +1 -28
- package/dist/src/binary.js.map +1 -1
- package/dist/src/enums/definitions.json +20 -85
- package/dist/src/hash-prefixes.js +0 -2
- package/dist/src/hash-prefixes.js.map +1 -1
- package/dist/src/index.d.ts +1 -2
- package/dist/src/index.js +2 -9
- package/dist/src/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/binary.ts +0 -40
- package/src/enums/definitions.json +20 -90
- package/src/hash-prefixes.ts +0 -2
- package/src/index.ts +1 -10
- package/src/.DS_Store +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AACzD,mDAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AACzD,mDAAkD;AAiJhD,iGAjJO,gCAAgB,OAiJP;AA9IlB,mCAIgB;AA6Id,oGAhJA,2BAAmB,OAgJA;AAFnB,kGA7IA,yBAAiB,OA6IA;AAGjB,oGA/IA,2BAAmB,OA+IA;AA7IrB,+DAA0D;AA2IxD,gGA3IO,kCAAe,OA2IP;AA1IjB,mCAAmC;AA6IjC,0FA7IO,iBAAS,OA6IP;AA5IX,mDAAoD;AAEpD,MAAM,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I,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI,KAAK,EAAE,CAAA;KAClB;IACD,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE;QAChC,MAAM,IAAI,KAAK,EAAE,CAAA;KAClB;IACD,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;IAChE,OAAO,IAAA,kBAAU,EACf,gBAAgB,CAAC,IAAkB,EAAE,MAAM,EAAE,cAAc,CAAC,CAC7D,CAAA;AACH,CAAC;AAiCC,sDAAqB;AA/BvB;;;;;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;AAqBC,sCAAa;AAnBf;;;;;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;AASC,sCAAa"}
|
package/dist/src/binary.d.ts
CHANGED
|
@@ -87,19 +87,4 @@ declare function signingClaimData(claim: ClaimObject): Uint8Array;
|
|
|
87
87
|
declare function multiSigningData(transaction: JsonObject, signingAccount: string | AccountID, opts?: {
|
|
88
88
|
definitions: XrplDefinitionsBase;
|
|
89
89
|
}): Uint8Array;
|
|
90
|
-
|
|
91
|
-
* Interface describing fields required for a Batch signer
|
|
92
|
-
*/
|
|
93
|
-
interface BatchObject extends JsonObject {
|
|
94
|
-
flags: number;
|
|
95
|
-
txIDs: string[];
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Serialize a signingClaim
|
|
99
|
-
*
|
|
100
|
-
* @param batch A Batch object to serialize
|
|
101
|
-
* @param opts.definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
|
102
|
-
* @returns the serialized object with appropriate prefix
|
|
103
|
-
*/
|
|
104
|
-
declare function signingBatchData(batch: BatchObject): Uint8Array;
|
|
105
|
-
export { BinaryParser, BinarySerializer, BytesList, ClaimObject, BatchObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, signingBatchData, };
|
|
90
|
+
export { BinaryParser, BinarySerializer, BytesList, ClaimObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, };
|
package/dist/src/binary.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable func-style */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.transactionID = exports.sha512Half = exports.binaryToJSON = exports.signingClaimData = exports.signingData = exports.multiSigningData = exports.readJSON = exports.serializeObject = exports.makeParser = exports.BytesList = exports.BinarySerializer = exports.BinaryParser = void 0;
|
|
5
5
|
const utils_1 = require("@xrplf/isomorphic/utils");
|
|
6
6
|
const types_1 = require("./types");
|
|
7
7
|
const binary_parser_1 = require("./serdes/binary-parser");
|
|
@@ -125,31 +125,4 @@ function multiSigningData(transaction, signingAccount, opts = {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
exports.multiSigningData = multiSigningData;
|
|
128
|
-
/**
|
|
129
|
-
* Serialize a signingClaim
|
|
130
|
-
*
|
|
131
|
-
* @param batch A Batch object to serialize
|
|
132
|
-
* @param opts.definitions Custom rippled types to use instead of the default. Used for sidechains and amendments.
|
|
133
|
-
* @returns the serialized object with appropriate prefix
|
|
134
|
-
*/
|
|
135
|
-
function signingBatchData(batch) {
|
|
136
|
-
if (batch.flags == null) {
|
|
137
|
-
throw Error("No field `flags'");
|
|
138
|
-
}
|
|
139
|
-
if (batch.txIDs == null) {
|
|
140
|
-
throw Error('No field `txIDs`');
|
|
141
|
-
}
|
|
142
|
-
const prefix = hash_prefixes_1.HashPrefix.batch;
|
|
143
|
-
const flags = types_1.coreTypes.UInt32.from(batch.flags).toBytes();
|
|
144
|
-
const txIDsLength = types_1.coreTypes.UInt32.from(batch.txIDs.length).toBytes();
|
|
145
|
-
const bytesList = new binary_serializer_1.BytesList();
|
|
146
|
-
bytesList.put(prefix);
|
|
147
|
-
bytesList.put(flags);
|
|
148
|
-
bytesList.put(txIDsLength);
|
|
149
|
-
batch.txIDs.forEach((txID) => {
|
|
150
|
-
bytesList.put(types_1.coreTypes.Hash256.from(txID).toBytes());
|
|
151
|
-
});
|
|
152
|
-
return bytesList.toBytes();
|
|
153
|
-
}
|
|
154
|
-
exports.signingBatchData = signingBatchData;
|
|
155
128
|
//# sourceMappingURL=binary.js.map
|
package/dist/src/binary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../src/binary.ts"],"names":[],"mappings":";AAAA,+BAA+B;;;AAE/B,mDAAoD;AACpD,mCAAmC;AACnC,0DAAqD;
|
|
1
|
+
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../src/binary.ts"],"names":[],"mappings":";AAAA,+BAA+B;;;AAE/B,mDAAoD;AACpD,mCAAmC;AACnC,0DAAqD;AAgLnD,6FAhLO,4BAAY,OAgLP;AA9Kd,mDAA4C;AAC5C,kEAAwE;AA8KtE,iGA9KO,oCAAgB,OA8KP;AAChB,0FA/KyB,6BAAS,OA+KzB;AA9KX,qCAAoD;AAuLlD,2FAvLO,mBAAU,OAuLP;AACV,8FAxLmB,sBAAa,OAwLnB;AAvLf,mCAIgB;AAIhB;;;;;;;GAOG;AACH,MAAM,UAAU,GAAG,CACjB,KAA0B,EAC1B,WAAiC,EACnB,EAAE,CAChB,IAAI,4BAAY,CACd,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AI;QACvB,WAAW,EAAE,IAAI,CAAC,WAAW;KAC9B,CAAC,CAAA;AACJ,CAAC;AAUC,4CAAgB"}
|
|
@@ -913,20 +913,20 @@
|
|
|
913
913
|
[
|
|
914
914
|
"IssuerNode",
|
|
915
915
|
{
|
|
916
|
+
"nth": 27,
|
|
917
|
+
"isVLEncoded": false,
|
|
916
918
|
"isSerialized": true,
|
|
917
919
|
"isSigningField": true,
|
|
918
|
-
"isVLEncoded": false,
|
|
919
|
-
"nth": 27,
|
|
920
920
|
"type": "UInt64"
|
|
921
921
|
}
|
|
922
922
|
],
|
|
923
923
|
[
|
|
924
924
|
"SubjectNode",
|
|
925
925
|
{
|
|
926
|
+
"nth": 28,
|
|
927
|
+
"isVLEncoded": false,
|
|
926
928
|
"isSerialized": true,
|
|
927
929
|
"isSigningField": true,
|
|
928
|
-
"isVLEncoded": false,
|
|
929
|
-
"nth": 28,
|
|
930
930
|
"type": "UInt64"
|
|
931
931
|
}
|
|
932
932
|
],
|
|
@@ -1253,20 +1253,10 @@
|
|
|
1253
1253
|
[
|
|
1254
1254
|
"DomainID",
|
|
1255
1255
|
{
|
|
1256
|
-
"isSerialized": true,
|
|
1257
|
-
"isSigningField": true,
|
|
1258
|
-
"isVLEncoded": false,
|
|
1259
1256
|
"nth": 34,
|
|
1260
|
-
"
|
|
1261
|
-
}
|
|
1262
|
-
],
|
|
1263
|
-
[
|
|
1264
|
-
"ParentBatchID",
|
|
1265
|
-
{
|
|
1257
|
+
"isVLEncoded": false,
|
|
1266
1258
|
"isSerialized": true,
|
|
1267
1259
|
"isSigningField": true,
|
|
1268
|
-
"isVLEncoded": false,
|
|
1269
|
-
"nth": 35,
|
|
1270
1260
|
"type": "Hash256"
|
|
1271
1261
|
}
|
|
1272
1262
|
],
|
|
@@ -1853,10 +1843,10 @@
|
|
|
1853
1843
|
[
|
|
1854
1844
|
"CredentialType",
|
|
1855
1845
|
{
|
|
1846
|
+
"nth": 31,
|
|
1847
|
+
"isVLEncoded": true,
|
|
1856
1848
|
"isSerialized": true,
|
|
1857
1849
|
"isSigningField": true,
|
|
1858
|
-
"isVLEncoded": true,
|
|
1859
|
-
"nth": 31,
|
|
1860
1850
|
"type": "Blob"
|
|
1861
1851
|
}
|
|
1862
1852
|
],
|
|
@@ -2033,21 +2023,11 @@
|
|
|
2033
2023
|
[
|
|
2034
2024
|
"Subject",
|
|
2035
2025
|
{
|
|
2036
|
-
"isSerialized": true,
|
|
2037
|
-
"isSigningField": true,
|
|
2038
|
-
"isVLEncoded": true,
|
|
2039
2026
|
"nth": 24,
|
|
2040
|
-
"
|
|
2041
|
-
}
|
|
2042
|
-
],
|
|
2043
|
-
[
|
|
2044
|
-
"Number",
|
|
2045
|
-
{
|
|
2027
|
+
"isVLEncoded": true,
|
|
2046
2028
|
"isSerialized": true,
|
|
2047
2029
|
"isSigningField": true,
|
|
2048
|
-
"
|
|
2049
|
-
"nth": 1,
|
|
2050
|
-
"type": "Number"
|
|
2030
|
+
"type": "AccountID"
|
|
2051
2031
|
}
|
|
2052
2032
|
],
|
|
2053
2033
|
[
|
|
@@ -2343,30 +2323,10 @@
|
|
|
2343
2323
|
[
|
|
2344
2324
|
"Credential",
|
|
2345
2325
|
{
|
|
2346
|
-
"isSerialized": true,
|
|
2347
|
-
"isSigningField": true,
|
|
2348
|
-
"isVLEncoded": false,
|
|
2349
2326
|
"nth": 33,
|
|
2350
|
-
"type": "STObject"
|
|
2351
|
-
}
|
|
2352
|
-
],
|
|
2353
|
-
[
|
|
2354
|
-
"RawTransaction",
|
|
2355
|
-
{
|
|
2356
|
-
"isSerialized": true,
|
|
2357
|
-
"isSigningField": true,
|
|
2358
2327
|
"isVLEncoded": false,
|
|
2359
|
-
"nth": 34,
|
|
2360
|
-
"type": "STObject"
|
|
2361
|
-
}
|
|
2362
|
-
],
|
|
2363
|
-
[
|
|
2364
|
-
"BatchSigner",
|
|
2365
|
-
{
|
|
2366
2328
|
"isSerialized": true,
|
|
2367
2329
|
"isSigningField": true,
|
|
2368
|
-
"isVLEncoded": false,
|
|
2369
|
-
"nth": 35,
|
|
2370
2330
|
"type": "STObject"
|
|
2371
2331
|
}
|
|
2372
2332
|
],
|
|
@@ -2563,50 +2523,29 @@
|
|
|
2563
2523
|
[
|
|
2564
2524
|
"AuthorizeCredentials",
|
|
2565
2525
|
{
|
|
2526
|
+
"nth": 26,
|
|
2527
|
+
"isVLEncoded": false,
|
|
2566
2528
|
"isSerialized": true,
|
|
2567
2529
|
"isSigningField": true,
|
|
2568
|
-
"isVLEncoded": false,
|
|
2569
|
-
"nth": 26,
|
|
2570
2530
|
"type": "STArray"
|
|
2571
2531
|
}
|
|
2572
2532
|
],
|
|
2573
2533
|
[
|
|
2574
2534
|
"UnauthorizeCredentials",
|
|
2575
2535
|
{
|
|
2576
|
-
"isSerialized": true,
|
|
2577
|
-
"isSigningField": true,
|
|
2578
|
-
"isVLEncoded": false,
|
|
2579
2536
|
"nth": 27,
|
|
2580
|
-
"type": "STArray"
|
|
2581
|
-
}
|
|
2582
|
-
],
|
|
2583
|
-
[
|
|
2584
|
-
"AcceptedCredentials",
|
|
2585
|
-
{
|
|
2586
|
-
"isSerialized": true,
|
|
2587
|
-
"isSigningField": true,
|
|
2588
2537
|
"isVLEncoded": false,
|
|
2589
|
-
"nth": 28,
|
|
2590
|
-
"type": "STArray"
|
|
2591
|
-
}
|
|
2592
|
-
],
|
|
2593
|
-
[
|
|
2594
|
-
"RawTransactions",
|
|
2595
|
-
{
|
|
2596
2538
|
"isSerialized": true,
|
|
2597
2539
|
"isSigningField": true,
|
|
2598
|
-
"isVLEncoded": false,
|
|
2599
|
-
"nth": 29,
|
|
2600
2540
|
"type": "STArray"
|
|
2601
2541
|
}
|
|
2602
2542
|
],
|
|
2603
2543
|
[
|
|
2604
|
-
"
|
|
2605
|
-
|
|
2606
|
-
"isSerialized": true,
|
|
2607
|
-
"isSigningField": false,
|
|
2544
|
+
"AcceptedCredentials", {
|
|
2545
|
+
"nth": 28,
|
|
2608
2546
|
"isVLEncoded": false,
|
|
2609
|
-
"
|
|
2547
|
+
"isSerialized": true,
|
|
2548
|
+
"isSigningField": true,
|
|
2610
2549
|
"type": "STArray"
|
|
2611
2550
|
}
|
|
2612
2551
|
],
|
|
@@ -2793,10 +2732,10 @@
|
|
|
2793
2732
|
[
|
|
2794
2733
|
"CredentialIDs",
|
|
2795
2734
|
{
|
|
2735
|
+
"nth": 5,
|
|
2736
|
+
"isVLEncoded": true,
|
|
2796
2737
|
"isSerialized": true,
|
|
2797
2738
|
"isSigningField": true,
|
|
2798
|
-
"isVLEncoded": true,
|
|
2799
|
-
"nth": 5,
|
|
2800
2739
|
"type": "Vector256"
|
|
2801
2740
|
}
|
|
2802
2741
|
],
|
|
@@ -2927,7 +2866,6 @@
|
|
|
2927
2866
|
"Amendments": 102,
|
|
2928
2867
|
"Bridge": 105,
|
|
2929
2868
|
"Check": 67,
|
|
2930
|
-
"Credential": 129,
|
|
2931
2869
|
"DID": 73,
|
|
2932
2870
|
"DepositPreauth": 112,
|
|
2933
2871
|
"DirectoryNode": 100,
|
|
@@ -2942,6 +2880,7 @@
|
|
|
2942
2880
|
"NegativeUNL": 78,
|
|
2943
2881
|
"Offer": 111,
|
|
2944
2882
|
"Oracle": 128,
|
|
2883
|
+
"Credential": 129,
|
|
2945
2884
|
"PayChannel": 120,
|
|
2946
2885
|
"PermissionedDomain": 130,
|
|
2947
2886
|
"RippleState": 114,
|
|
@@ -2971,7 +2910,6 @@
|
|
|
2971
2910
|
"tecFAILED_PROCESSING": 105,
|
|
2972
2911
|
"tecFROZEN": 137,
|
|
2973
2912
|
"tecHAS_OBLIGATIONS": 151,
|
|
2974
|
-
"tecHOOK_REJECTED": 153,
|
|
2975
2913
|
"tecINCOMPLETE": 169,
|
|
2976
2914
|
"tecINSUFFICIENT_FUNDS": 159,
|
|
2977
2915
|
"tecINSUFFICIENT_PAYMENT": 161,
|
|
@@ -3106,7 +3044,6 @@
|
|
|
3106
3044
|
"temINVALID_ACCOUNT_ID": -268,
|
|
3107
3045
|
"temINVALID_COUNT": -266,
|
|
3108
3046
|
"temINVALID_FLAG": -276,
|
|
3109
|
-
"temINVALID_INNER_BATCH": -250,
|
|
3110
3047
|
"temMALFORMED": -299,
|
|
3111
3048
|
"temREDUNDANT": -275,
|
|
3112
3049
|
"temRIPPLE_EMPTY": -274,
|
|
@@ -3144,13 +3081,12 @@
|
|
|
3144
3081
|
"AMMWithdraw": 37,
|
|
3145
3082
|
"AccountDelete": 21,
|
|
3146
3083
|
"AccountSet": 3,
|
|
3147
|
-
"Batch": 64,
|
|
3148
3084
|
"CheckCancel": 18,
|
|
3149
3085
|
"CheckCash": 17,
|
|
3150
3086
|
"CheckCreate": 16,
|
|
3151
3087
|
"Clawback": 30,
|
|
3152
|
-
"CredentialAccept": 59,
|
|
3153
3088
|
"CredentialCreate": 58,
|
|
3089
|
+
"CredentialAccept": 59,
|
|
3154
3090
|
"CredentialDelete": 60,
|
|
3155
3091
|
"DIDDelete": 50,
|
|
3156
3092
|
"DIDSet": 49,
|
|
@@ -3179,8 +3115,8 @@
|
|
|
3179
3115
|
"PaymentChannelClaim": 15,
|
|
3180
3116
|
"PaymentChannelCreate": 13,
|
|
3181
3117
|
"PaymentChannelFund": 14,
|
|
3182
|
-
"PermissionedDomainDelete": 63,
|
|
3183
3118
|
"PermissionedDomainSet": 62,
|
|
3119
|
+
"PermissionedDomainDelete": 63,
|
|
3184
3120
|
"SetFee": 101,
|
|
3185
3121
|
"SetRegularKey": 5,
|
|
3186
3122
|
"SignerListSet": 12,
|
|
@@ -3210,7 +3146,6 @@
|
|
|
3210
3146
|
"LedgerEntry": 10002,
|
|
3211
3147
|
"Metadata": 10004,
|
|
3212
3148
|
"NotPresent": 0,
|
|
3213
|
-
"Number": 9,
|
|
3214
3149
|
"PathSet": 18,
|
|
3215
3150
|
"STArray": 15,
|
|
3216
3151
|
"STObject": 14,
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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/src/index.d.ts
CHANGED
|
@@ -47,7 +47,6 @@ declare function encodeForSigningClaim(json: object): string;
|
|
|
47
47
|
* @returns a hex string of the encoded transaction
|
|
48
48
|
*/
|
|
49
49
|
declare function encodeForMultisigning(json: object, signer: string, definitions?: XrplDefinitionsBase): string;
|
|
50
|
-
declare function encodeForSigningBatch(json: object): string;
|
|
51
50
|
/**
|
|
52
51
|
* Encode a quality value
|
|
53
52
|
*
|
|
@@ -62,4 +61,4 @@ declare function encodeQuality(value: string): string;
|
|
|
62
61
|
* @returns a string representing the quality
|
|
63
62
|
*/
|
|
64
63
|
declare function decodeQuality(value: string): string;
|
|
65
|
-
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning,
|
|
64
|
+
export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };
|
package/dist/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.TRANSACTION_TYPES = exports.decodeLedgerData = exports.decodeQuality = exports.encodeQuality = exports.
|
|
3
|
+
exports.coreTypes = exports.DEFAULT_DEFINITIONS = exports.XrplDefinitionsBase = exports.XrplDefinitions = exports.TRANSACTION_TYPES = exports.decodeLedgerData = exports.decodeQuality = exports.encodeQuality = exports.encodeForMultisigning = exports.encodeForSigningClaim = exports.encodeForSigning = exports.encode = exports.decode = void 0;
|
|
4
4
|
const coretypes_1 = require("./coretypes");
|
|
5
5
|
const ledger_hashes_1 = require("./ledger-hashes");
|
|
6
6
|
Object.defineProperty(exports, "decodeLedgerData", { enumerable: true, get: function () { return ledger_hashes_1.decodeLedgerData; } });
|
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "XrplDefinitions", { enumerable: true, get: funct
|
|
|
13
13
|
const types_1 = require("./types");
|
|
14
14
|
Object.defineProperty(exports, "coreTypes", { enumerable: true, get: function () { return types_1.coreTypes; } });
|
|
15
15
|
const utils_1 = require("@xrplf/isomorphic/utils");
|
|
16
|
-
const { signingData, signingClaimData, multiSigningData,
|
|
16
|
+
const { signingData, signingClaimData, multiSigningData, binaryToJSON, serializeObject, } = coretypes_1.binary;
|
|
17
17
|
/**
|
|
18
18
|
* Decode a transaction
|
|
19
19
|
*
|
|
@@ -94,13 +94,6 @@ function encodeForMultisigning(json, signer, definitions) {
|
|
|
94
94
|
return (0, utils_1.bytesToHex)(multiSigningData(json, signer, definitionsOpt));
|
|
95
95
|
}
|
|
96
96
|
exports.encodeForMultisigning = encodeForMultisigning;
|
|
97
|
-
function encodeForSigningBatch(json) {
|
|
98
|
-
if (typeof json !== 'object') {
|
|
99
|
-
throw new Error();
|
|
100
|
-
}
|
|
101
|
-
return (0, utils_1.bytesToHex)(signingBatchData(json));
|
|
102
|
-
}
|
|
103
|
-
exports.encodeForSigningBatch = encodeForSigningBatch;
|
|
104
97
|
/**
|
|
105
98
|
* Encode a quality value
|
|
106
99
|
*
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AACzD,mDAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AACzD,mDAAkD;AAiJhD,iGAjJO,gCAAgB,OAiJP;AA9IlB,mCAIgB;AA6Id,oGAhJA,2BAAmB,OAgJA;AAFnB,kGA7IA,yBAAiB,OA6IA;AAGjB,oGA/IA,2BAAmB,OA+IA;AA7IrB,+DAA0D;AA2IxD,gGA3IO,kCAAe,OA2IP;AA1IjB,mCAAmC;AA6IjC,0FA7IO,iBAAS,OA6IP;AA5IX,mDAAoD;AAEpD,MAAM,EACJ,WAAW,EACX,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,6BAA6B,CAAC,CAAA;KAC/C;IACD,OAAO,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;AAC1C,CAAC;AA0GC,wBAAM;AAxGR;;;;;;;GAOG;AACH,SAAS,MAAM,CAAC,IAAY,EAAE,WAAiC;IAC7D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI,KAAK,EAAE,CAAA;KAClB;IACD,OAAO,IAAA,kBAAU,EAAC,eAAe,CAAC,IAAkB,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,CAAA;AACzE,CAAC;AA4FC,wB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