fix transaction body optional fields still showed when empty
This was the case for the treasury value, validity interval and outputs.
This was the case for the treasury value, validity interval and outputs.
- "account" -> "credential", for consistency with the rest of the API - "greaterThanOrEqualTo" & the like are dangerous names to use in the API because semantic of the bounds may change (it has twice in the past in different occasions). So it is better to use more opaque terms and defer semantic to description.
- 'directDeposits' -> 'credits': the term 'deposit' is already overloaded to mean something else. So as a coherence principle for the API, we shall not use the same words to designate two semantically different objects. - 'requiredExtraGuards' -> 'guards': there's nothing 'extra' about them; guards are a newly introduced concept meant to replace the withdraw-0 design pattern.
avoid logic duplication and unnecessary specialisation; keep changes local + define proper Json encoders in the prelude.
Necessary since the introduction of maxReferenceScriptsSizePerBlock
Awkward to read 'Withdrawals' as type for direct deposit.