putTransaction :: Transaction -> Put
putTransaction tx = do
  put (tx^.txVersion)
  put . VarInt . fromIntegral . length $ (tx^.inputs)
  mapM_ put (tx^.inputs)
  put . VarInt . fromIntegral . length $ (tx^.outputs)
  mapM_ put (tx^.outputs)
  put $ tx^.locktime
putTransaction :: Transaction -> Put
putTransaction tx = do
  put (tx^.txVersion)
  put . VarInt . fromIntegral . length $ (tx^.inputs)
  mapM_ put (tx^.inputs)
  put . VarInt . fromIntegral . length $ (tx^.outputs)
  mapM_ put (tx^.outputs)
  put $ tx^.locktime
putTransaction tx = do
  put (tx^.txVersion)
  put . VarInt . fromIntegral . length $ (tx^.inputs)
  mapM_ put (tx^.inputs)
  put . VarInt . fromIntegral . length $ (tx^.outputs)
  mapM_ put (tx^.outputs)
  put $ tx^.locktime