Remove redundant information in binformat.js.

This commit is contained in:
Stefan Thomas
2014-02-04 21:30:46 -08:00
parent a07b76a28c
commit a15da9ade1

View File

@@ -199,72 +199,72 @@ var REQUIRED = exports.REQUIRED = 0,
DEFAULT = exports.DEFAULT = 2; DEFAULT = exports.DEFAULT = 2;
var base = [ var base = [
[ 'TransactionType' , REQUIRED, 2, "Int16" ], [ 'TransactionType' , REQUIRED ],
[ 'Flags' , OPTIONAL, 2, "Int32" ], [ 'Flags' , OPTIONAL ],
[ 'SourceTag' , OPTIONAL, 3, "Int32" ], [ 'SourceTag' , OPTIONAL ],
[ 'Account' , REQUIRED, 1, "Account" ], [ 'Account' , REQUIRED ],
[ 'Sequence' , REQUIRED, 4, "Int32" ], [ 'Sequence' , REQUIRED ],
[ 'Fee' , REQUIRED, 8, "Amount" ], [ 'Fee' , REQUIRED ],
[ 'OperationLimit' , OPTIONAL, 29, "Int32" ], [ 'OperationLimit' , OPTIONAL ],
[ 'SigningPubKey' , REQUIRED, 3, "VariableLength" ], [ 'SigningPubKey' , REQUIRED ],
[ 'TxnSignature' , OPTIONAL, 4, "VariableLength" ] [ 'TxnSignature' , OPTIONAL ]
]; ];
exports.tx = { exports.tx = {
AccountSet: [3].concat(base, [ AccountSet: [3].concat(base, [
[ 'EmailHash' , OPTIONAL, 1, "Hash128" ], [ 'EmailHash' , OPTIONAL ],
[ 'WalletLocator' , OPTIONAL, 7, "Hash256" ], [ 'WalletLocator' , OPTIONAL ],
[ 'WalletSize' , OPTIONAL, 12, "Int32" ], [ 'WalletSize' , OPTIONAL ],
[ 'MessageKey' , OPTIONAL, 2, "VariableLength" ], [ 'MessageKey' , OPTIONAL ],
[ 'Domain' , OPTIONAL, 7, "VariableLength" ], [ 'Domain' , OPTIONAL ],
[ 'TransferRate' , OPTIONAL, 11, "Int32" ] [ 'TransferRate' , OPTIONAL ]
]), ]),
TrustSet: [20].concat(base, [ TrustSet: [20].concat(base, [
[ 'LimitAmount' , OPTIONAL, 3, "Amount" ], [ 'LimitAmount' , OPTIONAL ],
[ 'QualityIn' , OPTIONAL, 20, "Int32" ], [ 'QualityIn' , OPTIONAL ],
[ 'QualityOut' , OPTIONAL, 21, "Int32" ] [ 'QualityOut' , OPTIONAL ]
]), ]),
OfferCreate: [7].concat(base, [ OfferCreate: [7].concat(base, [
[ 'TakerPays' , REQUIRED, 4, "Amount" ], [ 'TakerPays' , REQUIRED ],
[ 'TakerGets' , REQUIRED, 5, "Amount" ], [ 'TakerGets' , REQUIRED ],
[ 'Expiration' , OPTIONAL, 10, "Int32" ] [ 'Expiration' , OPTIONAL ]
]), ]),
OfferCancel: [8].concat(base, [ OfferCancel: [8].concat(base, [
[ 'OfferSequence' , REQUIRED, 25, "Int32" ] [ 'OfferSequence' , REQUIRED ]
]), ]),
SetRegularKey: [5].concat(base, [ SetRegularKey: [5].concat(base, [
[ 'RegularKey' , REQUIRED, 8, "Account" ] [ 'RegularKey' , REQUIRED ]
]), ]),
Payment: [0].concat(base, [ Payment: [0].concat(base, [
[ 'Destination' , REQUIRED, 3, "Account" ], [ 'Destination' , REQUIRED ],
[ 'Amount' , REQUIRED, 1, "Amount" ], [ 'Amount' , REQUIRED ],
[ 'SendMax' , OPTIONAL, 9, "Amount" ], [ 'SendMax' , OPTIONAL ],
[ 'Paths' , DEFAULT , 1, "PathSet" ], [ 'Paths' , DEFAULT ],
[ 'InvoiceID' , OPTIONAL, 17, "Hash256" ], [ 'InvoiceID' , OPTIONAL ],
[ 'DestinationTag' , OPTIONAL, 14, "Int32" ] [ 'DestinationTag' , OPTIONAL ]
]), ]),
Contract: [9].concat(base, [ Contract: [9].concat(base, [
[ 'Expiration' , REQUIRED, 10, "Int32" ], [ 'Expiration' , REQUIRED ],
[ 'BondAmount' , REQUIRED, 23, "Int32" ], [ 'BondAmount' , REQUIRED ],
[ 'StampEscrow' , REQUIRED, 22, "Int32" ], [ 'StampEscrow' , REQUIRED ],
[ 'RippleEscrow' , REQUIRED, 17, "Amount" ], [ 'RippleEscrow' , REQUIRED ],
[ 'CreateCode' , OPTIONAL, 11, "VariableLength" ], [ 'CreateCode' , OPTIONAL ],
[ 'FundCode' , OPTIONAL, 8, "VariableLength" ], [ 'FundCode' , OPTIONAL ],
[ 'RemoveCode' , OPTIONAL, 9, "VariableLength" ], [ 'RemoveCode' , OPTIONAL ],
[ 'ExpireCode' , OPTIONAL, 10, "VariableLength" ] [ 'ExpireCode' , OPTIONAL ]
]), ]),
RemoveContract: [10].concat(base, [ RemoveContract: [10].concat(base, [
[ 'Target' , REQUIRED, 7, "Account" ] [ 'Target' , REQUIRED ]
]), ]),
EnableFeature: [100].concat(base, [ EnableFeature: [100].concat(base, [
[ 'Feature' , REQUIRED, 19, "Hash256" ] [ 'Feature' , REQUIRED ]
]), ]),
SetFee: [101].concat(base, [ SetFee: [101].concat(base, [
[ 'Features' , REQUIRED, 9, "Array" ], [ 'Features' , REQUIRED ],
[ 'BaseFee' , REQUIRED, 5, "Int64" ], [ 'BaseFee' , REQUIRED ],
[ 'ReferenceFeeUnits' , REQUIRED, 30, "Int32" ], [ 'ReferenceFeeUnits' , REQUIRED ],
[ 'ReserveBase' , REQUIRED, 31, "Int32" ], [ 'ReserveBase' , REQUIRED ],
[ 'ReserveIncrement' , REQUIRED, 32, "Int32" ] [ 'ReserveIncrement' , REQUIRED ]
]) ])
}; };
@@ -282,9 +282,9 @@ exports.ledger = {
}; };
exports.metadata = [ exports.metadata = [
[ 'TransactionIndex' , REQUIRED, 28, "Int32" ], [ 'TransactionIndex' , REQUIRED ],
[ 'TransactionResult' , REQUIRED, 3, "Int8" ], [ 'TransactionResult' , REQUIRED ],
[ 'AffectedNodes' , REQUIRED, 8, "Array" ] [ 'AffectedNodes' , REQUIRED ]
]; ];
exports.ter = { exports.ter = {