ripple-binary-codec 2.2.0 → 2.3.0-batch.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 CHANGED
@@ -87,4 +87,19 @@ 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
- export { BinaryParser, BinarySerializer, BytesList, ClaimObject, makeParser, serializeObject, readJSON, multiSigningData, signingData, signingClaimData, binaryToJSON, sha512Half, transactionID, };
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, };
package/dist/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.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;
4
+ exports.signingBatchData = 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,4 +125,31 @@ 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;
128
155
  //# sourceMappingURL=binary.js.map
@@ -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;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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;IAEjC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACrB,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IACpB,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IAC1B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,EAAE;QACnC,SAAS,CAAC,GAAG,CAAC,iBAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;IACvD,CAAC,CAAC,CAAA;IAEF,OAAO,SAAS,CAAC,OAAO,EAAE,CAAA;AAC5B,CAAC;AAiBC,4CAAgB"}
@@ -913,20 +913,20 @@
913
913
  [
914
914
  "IssuerNode",
915
915
  {
916
- "nth": 27,
917
- "isVLEncoded": false,
918
916
  "isSerialized": true,
919
917
  "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,
928
926
  "isSerialized": true,
929
927
  "isSigningField": true,
928
+ "isVLEncoded": false,
929
+ "nth": 28,
930
930
  "type": "UInt64"
931
931
  }
932
932
  ],
@@ -1250,6 +1250,26 @@
1250
1250
  "type": "Hash256"
1251
1251
  }
1252
1252
  ],
1253
+ [
1254
+ "DomainID",
1255
+ {
1256
+ "isSerialized": true,
1257
+ "isSigningField": true,
1258
+ "isVLEncoded": false,
1259
+ "nth": 34,
1260
+ "type": "Hash256"
1261
+ }
1262
+ ],
1263
+ [
1264
+ "ParentBatchID",
1265
+ {
1266
+ "isSerialized": true,
1267
+ "isSigningField": true,
1268
+ "isVLEncoded": false,
1269
+ "nth": 35,
1270
+ "type": "Hash256"
1271
+ }
1272
+ ],
1253
1273
  [
1254
1274
  "hash",
1255
1275
  {
@@ -1833,10 +1853,10 @@
1833
1853
  [
1834
1854
  "CredentialType",
1835
1855
  {
1836
- "nth": 31,
1837
- "isVLEncoded": true,
1838
1856
  "isSerialized": true,
1839
1857
  "isSigningField": true,
1858
+ "isVLEncoded": true,
1859
+ "nth": 31,
1840
1860
  "type": "Blob"
1841
1861
  }
1842
1862
  ],
@@ -2013,13 +2033,23 @@
2013
2033
  [
2014
2034
  "Subject",
2015
2035
  {
2016
- "nth": 24,
2017
- "isVLEncoded": true,
2018
2036
  "isSerialized": true,
2019
2037
  "isSigningField": true,
2038
+ "isVLEncoded": true,
2039
+ "nth": 24,
2020
2040
  "type": "AccountID"
2021
2041
  }
2022
2042
  ],
2043
+ [
2044
+ "Number",
2045
+ {
2046
+ "isSerialized": true,
2047
+ "isSigningField": true,
2048
+ "isVLEncoded": false,
2049
+ "nth": 1,
2050
+ "type": "Number"
2051
+ }
2052
+ ],
2023
2053
  [
2024
2054
  "TransactionMetaData",
2025
2055
  {
@@ -2313,10 +2343,30 @@
2313
2343
  [
2314
2344
  "Credential",
2315
2345
  {
2346
+ "isSerialized": true,
2347
+ "isSigningField": true,
2348
+ "isVLEncoded": false,
2316
2349
  "nth": 33,
2350
+ "type": "STObject"
2351
+ }
2352
+ ],
2353
+ [
2354
+ "RawTransaction",
2355
+ {
2356
+ "isSerialized": true,
2357
+ "isSigningField": true,
2317
2358
  "isVLEncoded": false,
2359
+ "nth": 34,
2360
+ "type": "STObject"
2361
+ }
2362
+ ],
2363
+ [
2364
+ "BatchSigner",
2365
+ {
2318
2366
  "isSerialized": true,
2319
2367
  "isSigningField": true,
2368
+ "isVLEncoded": false,
2369
+ "nth": 35,
2320
2370
  "type": "STObject"
2321
2371
  }
2322
2372
  ],
@@ -2513,20 +2563,50 @@
2513
2563
  [
2514
2564
  "AuthorizeCredentials",
2515
2565
  {
2516
- "nth": 26,
2517
- "isVLEncoded": false,
2518
2566
  "isSerialized": true,
2519
2567
  "isSigningField": true,
2568
+ "isVLEncoded": false,
2569
+ "nth": 26,
2520
2570
  "type": "STArray"
2521
2571
  }
2522
2572
  ],
2523
2573
  [
2524
2574
  "UnauthorizeCredentials",
2525
2575
  {
2576
+ "isSerialized": true,
2577
+ "isSigningField": true,
2578
+ "isVLEncoded": false,
2526
2579
  "nth": 27,
2580
+ "type": "STArray"
2581
+ }
2582
+ ],
2583
+ [
2584
+ "AcceptedCredentials",
2585
+ {
2586
+ "isSerialized": true,
2587
+ "isSigningField": true,
2527
2588
  "isVLEncoded": false,
2589
+ "nth": 28,
2590
+ "type": "STArray"
2591
+ }
2592
+ ],
2593
+ [
2594
+ "RawTransactions",
2595
+ {
2528
2596
  "isSerialized": true,
2529
2597
  "isSigningField": true,
2598
+ "isVLEncoded": false,
2599
+ "nth": 29,
2600
+ "type": "STArray"
2601
+ }
2602
+ ],
2603
+ [
2604
+ "BatchSigners",
2605
+ {
2606
+ "isSerialized": true,
2607
+ "isSigningField": false,
2608
+ "isVLEncoded": false,
2609
+ "nth": 30,
2530
2610
  "type": "STArray"
2531
2611
  }
2532
2612
  ],
@@ -2713,10 +2793,10 @@
2713
2793
  [
2714
2794
  "CredentialIDs",
2715
2795
  {
2716
- "nth": 5,
2717
- "isVLEncoded": true,
2718
2796
  "isSerialized": true,
2719
2797
  "isSigningField": true,
2798
+ "isVLEncoded": true,
2799
+ "nth": 5,
2720
2800
  "type": "Vector256"
2721
2801
  }
2722
2802
  ],
@@ -2847,6 +2927,7 @@
2847
2927
  "Amendments": 102,
2848
2928
  "Bridge": 105,
2849
2929
  "Check": 67,
2930
+ "Credential": 129,
2850
2931
  "DID": 73,
2851
2932
  "DepositPreauth": 112,
2852
2933
  "DirectoryNode": 100,
@@ -2861,8 +2942,8 @@
2861
2942
  "NegativeUNL": 78,
2862
2943
  "Offer": 111,
2863
2944
  "Oracle": 128,
2864
- "Credential": 129,
2865
2945
  "PayChannel": 120,
2946
+ "PermissionedDomain": 130,
2866
2947
  "RippleState": 114,
2867
2948
  "SignerList": 83,
2868
2949
  "Ticket": 84,
@@ -2890,6 +2971,7 @@
2890
2971
  "tecFAILED_PROCESSING": 105,
2891
2972
  "tecFROZEN": 137,
2892
2973
  "tecHAS_OBLIGATIONS": 151,
2974
+ "tecHOOK_REJECTED": 153,
2893
2975
  "tecINCOMPLETE": 169,
2894
2976
  "tecINSUFFICIENT_FUNDS": 159,
2895
2977
  "tecINSUFFICIENT_PAYMENT": 161,
@@ -3024,6 +3106,7 @@
3024
3106
  "temINVALID_ACCOUNT_ID": -268,
3025
3107
  "temINVALID_COUNT": -266,
3026
3108
  "temINVALID_FLAG": -276,
3109
+ "temINVALID_INNER_BATCH": -250,
3027
3110
  "temMALFORMED": -299,
3028
3111
  "temREDUNDANT": -275,
3029
3112
  "temRIPPLE_EMPTY": -274,
@@ -3053,6 +3136,7 @@
3053
3136
  },
3054
3137
  "TRANSACTION_TYPES": {
3055
3138
  "AMMBid": 39,
3139
+ "AMMClawback": 31,
3056
3140
  "AMMCreate": 35,
3057
3141
  "AMMDelete": 40,
3058
3142
  "AMMDeposit": 36,
@@ -3060,12 +3144,13 @@
3060
3144
  "AMMWithdraw": 37,
3061
3145
  "AccountDelete": 21,
3062
3146
  "AccountSet": 3,
3147
+ "Batch": 64,
3063
3148
  "CheckCancel": 18,
3064
3149
  "CheckCash": 17,
3065
3150
  "CheckCreate": 16,
3066
3151
  "Clawback": 30,
3067
- "CredentialCreate": 58,
3068
3152
  "CredentialAccept": 59,
3153
+ "CredentialCreate": 58,
3069
3154
  "CredentialDelete": 60,
3070
3155
  "DIDDelete": 50,
3071
3156
  "DIDSet": 49,
@@ -3085,6 +3170,7 @@
3085
3170
  "NFTokenCancelOffer": 28,
3086
3171
  "NFTokenCreateOffer": 27,
3087
3172
  "NFTokenMint": 25,
3173
+ "NFTokenModify": 61,
3088
3174
  "OfferCancel": 8,
3089
3175
  "OfferCreate": 7,
3090
3176
  "OracleDelete": 52,
@@ -3093,6 +3179,8 @@
3093
3179
  "PaymentChannelClaim": 15,
3094
3180
  "PaymentChannelCreate": 13,
3095
3181
  "PaymentChannelFund": 14,
3182
+ "PermissionedDomainDelete": 63,
3183
+ "PermissionedDomainSet": 62,
3096
3184
  "SetFee": 101,
3097
3185
  "SetRegularKey": 5,
3098
3186
  "SignerListSet": 12,
@@ -3122,6 +3210,7 @@
3122
3210
  "LedgerEntry": 10002,
3123
3211
  "Metadata": 10004,
3124
3212
  "NotPresent": 0,
3213
+ "Number": 9,
3125
3214
  "PathSet": 18,
3126
3215
  "STArray": 15,
3127
3216
  "STObject": 14,
@@ -913,20 +913,20 @@
913
913
  [
914
914
  "IssuerNode",
915
915
  {
916
- "nth": 27,
917
- "isVLEncoded": false,
918
916
  "isSerialized": true,
919
917
  "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,
928
926
  "isSerialized": true,
929
927
  "isSigningField": true,
928
+ "isVLEncoded": false,
929
+ "nth": 28,
930
930
  "type": "UInt64"
931
931
  }
932
932
  ],
@@ -1250,6 +1250,26 @@
1250
1250
  "type": "Hash256"
1251
1251
  }
1252
1252
  ],
1253
+ [
1254
+ "DomainID",
1255
+ {
1256
+ "isSerialized": true,
1257
+ "isSigningField": true,
1258
+ "isVLEncoded": false,
1259
+ "nth": 34,
1260
+ "type": "Hash256"
1261
+ }
1262
+ ],
1263
+ [
1264
+ "ParentBatchID",
1265
+ {
1266
+ "isSerialized": true,
1267
+ "isSigningField": true,
1268
+ "isVLEncoded": false,
1269
+ "nth": 35,
1270
+ "type": "Hash256"
1271
+ }
1272
+ ],
1253
1273
  [
1254
1274
  "hash",
1255
1275
  {
@@ -1833,10 +1853,10 @@
1833
1853
  [
1834
1854
  "CredentialType",
1835
1855
  {
1836
- "nth": 31,
1837
- "isVLEncoded": true,
1838
1856
  "isSerialized": true,
1839
1857
  "isSigningField": true,
1858
+ "isVLEncoded": true,
1859
+ "nth": 31,
1840
1860
  "type": "Blob"
1841
1861
  }
1842
1862
  ],
@@ -2013,13 +2033,23 @@
2013
2033
  [
2014
2034
  "Subject",
2015
2035
  {
2016
- "nth": 24,
2017
- "isVLEncoded": true,
2018
2036
  "isSerialized": true,
2019
2037
  "isSigningField": true,
2038
+ "isVLEncoded": true,
2039
+ "nth": 24,
2020
2040
  "type": "AccountID"
2021
2041
  }
2022
2042
  ],
2043
+ [
2044
+ "Number",
2045
+ {
2046
+ "isSerialized": true,
2047
+ "isSigningField": true,
2048
+ "isVLEncoded": false,
2049
+ "nth": 1,
2050
+ "type": "Number"
2051
+ }
2052
+ ],
2023
2053
  [
2024
2054
  "TransactionMetaData",
2025
2055
  {
@@ -2313,10 +2343,30 @@
2313
2343
  [
2314
2344
  "Credential",
2315
2345
  {
2346
+ "isSerialized": true,
2347
+ "isSigningField": true,
2348
+ "isVLEncoded": false,
2316
2349
  "nth": 33,
2350
+ "type": "STObject"
2351
+ }
2352
+ ],
2353
+ [
2354
+ "RawTransaction",
2355
+ {
2356
+ "isSerialized": true,
2357
+ "isSigningField": true,
2317
2358
  "isVLEncoded": false,
2359
+ "nth": 34,
2360
+ "type": "STObject"
2361
+ }
2362
+ ],
2363
+ [
2364
+ "BatchSigner",
2365
+ {
2318
2366
  "isSerialized": true,
2319
2367
  "isSigningField": true,
2368
+ "isVLEncoded": false,
2369
+ "nth": 35,
2320
2370
  "type": "STObject"
2321
2371
  }
2322
2372
  ],
@@ -2513,20 +2563,50 @@
2513
2563
  [
2514
2564
  "AuthorizeCredentials",
2515
2565
  {
2516
- "nth": 26,
2517
- "isVLEncoded": false,
2518
2566
  "isSerialized": true,
2519
2567
  "isSigningField": true,
2568
+ "isVLEncoded": false,
2569
+ "nth": 26,
2520
2570
  "type": "STArray"
2521
2571
  }
2522
2572
  ],
2523
2573
  [
2524
2574
  "UnauthorizeCredentials",
2525
2575
  {
2576
+ "isSerialized": true,
2577
+ "isSigningField": true,
2578
+ "isVLEncoded": false,
2526
2579
  "nth": 27,
2580
+ "type": "STArray"
2581
+ }
2582
+ ],
2583
+ [
2584
+ "AcceptedCredentials",
2585
+ {
2586
+ "isSerialized": true,
2587
+ "isSigningField": true,
2527
2588
  "isVLEncoded": false,
2589
+ "nth": 28,
2590
+ "type": "STArray"
2591
+ }
2592
+ ],
2593
+ [
2594
+ "RawTransactions",
2595
+ {
2528
2596
  "isSerialized": true,
2529
2597
  "isSigningField": true,
2598
+ "isVLEncoded": false,
2599
+ "nth": 29,
2600
+ "type": "STArray"
2601
+ }
2602
+ ],
2603
+ [
2604
+ "BatchSigners",
2605
+ {
2606
+ "isSerialized": true,
2607
+ "isSigningField": false,
2608
+ "isVLEncoded": false,
2609
+ "nth": 30,
2530
2610
  "type": "STArray"
2531
2611
  }
2532
2612
  ],
@@ -2713,10 +2793,10 @@
2713
2793
  [
2714
2794
  "CredentialIDs",
2715
2795
  {
2716
- "nth": 5,
2717
- "isVLEncoded": true,
2718
2796
  "isSerialized": true,
2719
2797
  "isSigningField": true,
2798
+ "isVLEncoded": true,
2799
+ "nth": 5,
2720
2800
  "type": "Vector256"
2721
2801
  }
2722
2802
  ],
@@ -2847,6 +2927,7 @@
2847
2927
  "Amendments": 102,
2848
2928
  "Bridge": 105,
2849
2929
  "Check": 67,
2930
+ "Credential": 129,
2850
2931
  "DID": 73,
2851
2932
  "DepositPreauth": 112,
2852
2933
  "DirectoryNode": 100,
@@ -2861,8 +2942,8 @@
2861
2942
  "NegativeUNL": 78,
2862
2943
  "Offer": 111,
2863
2944
  "Oracle": 128,
2864
- "Credential": 129,
2865
2945
  "PayChannel": 120,
2946
+ "PermissionedDomain": 130,
2866
2947
  "RippleState": 114,
2867
2948
  "SignerList": 83,
2868
2949
  "Ticket": 84,
@@ -2890,6 +2971,7 @@
2890
2971
  "tecFAILED_PROCESSING": 105,
2891
2972
  "tecFROZEN": 137,
2892
2973
  "tecHAS_OBLIGATIONS": 151,
2974
+ "tecHOOK_REJECTED": 153,
2893
2975
  "tecINCOMPLETE": 169,
2894
2976
  "tecINSUFFICIENT_FUNDS": 159,
2895
2977
  "tecINSUFFICIENT_PAYMENT": 161,
@@ -2948,6 +3030,7 @@
2948
3030
  "tecXCHAIN_SELF_COMMIT": 184,
2949
3031
  "tecXCHAIN_SENDING_ACCOUNT_MISMATCH": 179,
2950
3032
  "tecXCHAIN_WRONG_CHAIN": 176,
3033
+
2951
3034
  "tefALREADY": -198,
2952
3035
  "tefBAD_ADD_AUTH": -197,
2953
3036
  "tefBAD_AUTH": -196,
@@ -2970,6 +3053,7 @@
2970
3053
  "tefPAST_SEQ": -190,
2971
3054
  "tefTOO_BIG": -181,
2972
3055
  "tefWRONG_PRIOR": -189,
3056
+
2973
3057
  "telBAD_DOMAIN": -398,
2974
3058
  "telBAD_PATH_COUNT": -397,
2975
3059
  "telBAD_PUBLIC_KEY": -396,
@@ -2987,6 +3071,7 @@
2987
3071
  "telNO_DST_PARTIAL": -393,
2988
3072
  "telREQUIRES_NETWORK_ID": -385,
2989
3073
  "telWRONG_NETWORK": -386,
3074
+
2990
3075
  "temARRAY_EMPTY": -253,
2991
3076
  "temARRAY_TOO_LARGE": -252,
2992
3077
  "temBAD_AMM_TOKENS": -261,
@@ -3024,6 +3109,7 @@
3024
3109
  "temINVALID_ACCOUNT_ID": -268,
3025
3110
  "temINVALID_COUNT": -266,
3026
3111
  "temINVALID_FLAG": -276,
3112
+ "temINVALID_INNER_BATCH": -250,
3027
3113
  "temMALFORMED": -299,
3028
3114
  "temREDUNDANT": -275,
3029
3115
  "temRIPPLE_EMPTY": -274,
@@ -3036,6 +3122,7 @@
3036
3122
  "temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT": -255,
3037
3123
  "temXCHAIN_BRIDGE_NONDOOR_OWNER": -257,
3038
3124
  "temXCHAIN_EQUAL_DOOR_ACCOUNTS": -260,
3125
+
3039
3126
  "terFUNDS_SPENT": -98,
3040
3127
  "terINSUF_FEE_B": -97,
3041
3128
  "terLAST": -91,
@@ -3049,10 +3136,12 @@
3049
3136
  "terPRE_TICKET": -88,
3050
3137
  "terQUEUED": -89,
3051
3138
  "terRETRY": -99,
3139
+
3052
3140
  "tesSUCCESS": 0
3053
3141
  },
3054
3142
  "TRANSACTION_TYPES": {
3055
3143
  "AMMBid": 39,
3144
+ "AMMClawback": 31,
3056
3145
  "AMMCreate": 35,
3057
3146
  "AMMDelete": 40,
3058
3147
  "AMMDeposit": 36,
@@ -3060,12 +3149,13 @@
3060
3149
  "AMMWithdraw": 37,
3061
3150
  "AccountDelete": 21,
3062
3151
  "AccountSet": 3,
3152
+ "Batch": 64,
3063
3153
  "CheckCancel": 18,
3064
3154
  "CheckCash": 17,
3065
3155
  "CheckCreate": 16,
3066
3156
  "Clawback": 30,
3067
- "CredentialCreate": 58,
3068
3157
  "CredentialAccept": 59,
3158
+ "CredentialCreate": 58,
3069
3159
  "CredentialDelete": 60,
3070
3160
  "DIDDelete": 50,
3071
3161
  "DIDSet": 49,
@@ -3085,6 +3175,7 @@
3085
3175
  "NFTokenCancelOffer": 28,
3086
3176
  "NFTokenCreateOffer": 27,
3087
3177
  "NFTokenMint": 25,
3178
+ "NFTokenModify": 61,
3088
3179
  "OfferCancel": 8,
3089
3180
  "OfferCreate": 7,
3090
3181
  "OracleDelete": 52,
@@ -3093,6 +3184,8 @@
3093
3184
  "PaymentChannelClaim": 15,
3094
3185
  "PaymentChannelCreate": 13,
3095
3186
  "PaymentChannelFund": 14,
3187
+ "PermissionedDomainDelete": 63,
3188
+ "PermissionedDomainSet": 62,
3096
3189
  "SetFee": 101,
3097
3190
  "SetRegularKey": 5,
3098
3191
  "SignerListSet": 12,
@@ -3122,6 +3215,7 @@
3122
3215
  "LedgerEntry": 10002,
3123
3216
  "Metadata": 10004,
3124
3217
  "NotPresent": 0,
3218
+ "Number": 9,
3125
3219
  "PathSet": 18,
3126
3220
  "STArray": 15,
3127
3221
  "STObject": 14,
@@ -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,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"}
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/index.d.ts CHANGED
@@ -47,6 +47,7 @@ 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;
50
51
  /**
51
52
  * Encode a quality value
52
53
  *
@@ -61,4 +62,4 @@ declare function encodeQuality(value: string): string;
61
62
  * @returns a string representing the quality
62
63
  */
63
64
  declare function decodeQuality(value: string): string;
64
- export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };
65
+ export { decode, encode, encodeForSigning, encodeForSigningClaim, encodeForMultisigning, encodeForSigningBatch, encodeQuality, decodeQuality, decodeLedgerData, TRANSACTION_TYPES, XrplDefinitions, XrplDefinitionsBase, DEFAULT_DEFINITIONS, coreTypes, };