I used what was in bdk-ffi with some minor changes:
Renamed the error to EncodeError, as it is the same error for other consensus encodings. In the future we may want to deserialize more types using this error.
Renamed serialize to consensus_serialize
Explicitly clone when generating the Vec<TxIn> and Vec<TxOut>
Made the tuple struct public, as other library developers may want to work with the transaction directly
I really like what Davidson did with his PR, as he allowed users to construct a Transaction from TxIn, TxOut, Version, LockTime. However, I decided to leave that out because it requires more types and discussion (should we support non-standard versions).
I used what was in
bdk-ffi
with some minor changes:EncodeError
, as it is the same error for other consensus encodings. In the future we may want to deserialize more types using this error.serialize
toconsensus_serialize
clone
when generating theVec<TxIn>
andVec<TxOut>
I really like what Davidson did with his PR, as he allowed users to construct a
Transaction
fromTxIn
,TxOut
,Version
,LockTime
. However, I decided to leave that out because it requires more types and discussion (should we support non-standard versions).