Using the ffi structs directly everywhere is a bit crude, e.g. the txid is [u8; 32] and not TxId.
The new structs are kept very close to those in ffi, with a few differences:
- Coin is optional, this is so we can eventually parse txs, which doesn't contain the coin.
- We have both Tx and TxMut, one to build txs and the other one as immutable struct for them. Tx auto-derefs to TxMut, so anything taking &self that we add to TxMut will also work for Tx.
Depends on D13530.