Skip to content

Commit 8e13491

Browse files
committed
Update binary format
1 parent 2b531d2 commit 8e13491

File tree

1 file changed

+35
-13
lines changed

1 file changed

+35
-13
lines changed

src/js/ripple/binformat.js

+35-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
'use strict';
2+
3+
/*eslint no-multi-spaces:0,space-in-brackets:0,key-spacing:0,comma-spacing:0*/
4+
15
/**
26
* Data type map.
37
*
48
* Mapping of type ids to data types. The type id is specified by the high
59
*
610
* For reference, see rippled's definition:
7-
* https://github.com/ripple/rippled/blob/develop/src/ripple/data/protocol/SField.cpp
11+
* https://github.com/ripple/rippled/blob/develop/src/ripple/data/protocol
12+
* /SField.cpp
813
*/
9-
var TYPES_MAP = exports.types = [
10-
void(0),
14+
15+
exports.types = [
16+
undefined,
1117

1218
// Common
1319
'Int16', // 1
@@ -20,11 +26,11 @@ var TYPES_MAP = exports.types = [
2026
'Account', // 8
2127

2228
// 9-13 reserved
23-
void(0), // 9
24-
void(0), // 10
25-
void(0), // 11
26-
void(0), // 12
27-
void(0), // 13
29+
undefined, // 9
30+
undefined, // 10
31+
undefined, // 11
32+
undefined, // 12
33+
undefined, // 13
2834

2935
'Object', // 14
3036
'Array', // 15
@@ -151,7 +157,7 @@ var FIELDS_MAP = exports.fields = {
151157
8: 'RegularKey'
152158
},
153159
14: { // Object
154-
1: void(0), //end of Object
160+
1: undefined, // end of Object
155161
2: 'TransactionMetaData',
156162
3: 'CreatedNode',
157163
4: 'DeletedNode',
@@ -163,7 +169,7 @@ var FIELDS_MAP = exports.fields = {
163169
10: 'Memo'
164170
},
165171
15: { // Array
166-
1: void(0), //end of Array
172+
1: undefined, // end of Array
167173
2: 'SigningAccounts',
168174
3: 'TxnSignatures',
169175
4: 'Signatures',
@@ -228,7 +234,9 @@ exports.tx = {
228234
[ 'WalletSize' , OPTIONAL ],
229235
[ 'MessageKey' , OPTIONAL ],
230236
[ 'Domain' , OPTIONAL ],
231-
[ 'TransferRate' , OPTIONAL ]
237+
[ 'TransferRate' , OPTIONAL ],
238+
[ 'SetFlag' , OPTIONAL ],
239+
[ 'ClearFlag' , OPTIONAL ]
232240
]),
233241
TrustSet: [20].concat(base, [
234242
[ 'LimitAmount' , OPTIONAL ],
@@ -238,7 +246,8 @@ exports.tx = {
238246
OfferCreate: [7].concat(base, [
239247
[ 'TakerPays' , REQUIRED ],
240248
[ 'TakerGets' , REQUIRED ],
241-
[ 'Expiration' , OPTIONAL ]
249+
[ 'Expiration' , OPTIONAL ],
250+
[ 'OfferSequence' , OPTIONAL ]
242251
]),
243252
OfferCancel: [8].concat(base, [
244253
[ 'OfferSequence' , REQUIRED ]
@@ -270,11 +279,21 @@ exports.tx = {
270279
EnableFeature: [100].concat(base, [
271280
[ 'Feature' , REQUIRED ]
272281
]),
282+
EnableAmendment: [100].concat(base, [
283+
[ 'Amendment' , REQUIRED ]
284+
]),
273285
SetFee: [101].concat(base, [
274286
[ 'BaseFee' , REQUIRED ],
275287
[ 'ReferenceFeeUnits' , REQUIRED ],
276288
[ 'ReserveBase' , REQUIRED ],
277289
[ 'ReserveIncrement' , REQUIRED ]
290+
]),
291+
TicketCreate: [10].concat(base, [
292+
[ 'Target' , OPTIONAL ],
293+
[ 'Expiration' , OPTIONAL ]
294+
]),
295+
TicketCancel: [11].concat(base, [
296+
[ 'TicketID' , REQUIRED ]
278297
])
279298
};
280299

@@ -412,5 +431,8 @@ exports.ter = {
412431
tecNO_TARGET : 138,
413432
tecNO_PERMISSION : 139,
414433
tecNO_ENTRY : 140,
415-
tecINSUFFICIENT_RESERVE : 141
434+
tecINSUFFICIENT_RESERVE : 141,
435+
tecNEED_MASTER_KEY : 142,
436+
tecDST_TAG_NEEDED : 143,
437+
tecINTERNAL : 144
416438
};

0 commit comments

Comments
 (0)