ripple / ripple-binary-codec

Convert between json and hex representations of transactions and ledger entries on the XRP Ledger. Moved to: https://github.com/XRPLF/xrpl.js/tree/develop/packages/ripple-binary-codec
https://github.com/XRPLF/xrpl.js/tree/develop/packages/ripple-binary-codec
ISC License
18 stars 45 forks source link

Add format checking #10

Closed sublimator closed 2 years ago

sublimator commented 8 years ago

The primary client of this module is RippleAPI which checks/enforces its own schema, however it would still be useful to add per TransactionType format checking to encodeForSigning and encodeForMultiSigning

intelliot commented 7 years ago

Should we just throw if the format check fails?

sublimator commented 7 years ago

I would

sublimator commented 7 years ago

I think @wilsonianb might be using it for validator manifests, which have no TransactionType/LedgerEntryType so keep that in mind.

sublimator commented 7 years ago

So probably you could get away with full format checking if LedgerEntryType/TransactionType field is in the object, $somehow detect a validator manifest and handle accordingly, otherwise require at least one serialized field (https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json#L40)

intelliot commented 2 years ago

Replaced by https://github.com/XRPLF/xrpl.js/issues/1807