Given a transaction message and its index in the block,
        go and create a "verbose" transaction structure
        containing all the information in a nice, easy-to-read
        dict (i.e. like what bitcoind would give us).

        Does not work on coinbase transactions.
        Does not include segwit witnesses

def parse_tx( self, txn, block_header, block_hash, txindex ):
        """
        Given a transaction message and its index in the block,
        go and create a "verbose" transaction structure
        containing all the information in a nice, easy-to-read
        dict (i.e. like what bitcoind would give us).

        Does not work on coinbase transactions.
        Does not include segwit witnesses
        """

        txn_serializer = TxSerializer()
        tx_bin = txn_serializer.serialize(txn)

        txdata = {
            "version": txn.version,
            "locktime": txn.lock_time,
            "hex": binascii.hexlify( tx_bin ),
            "txid": txn.calculate_hash(),
            "size": len( tx_bin ),
            "blockhash": block_hash,
            "blocktime": block_header.get('timestamp', 0),

            # non-standard; added by us for virtualchain
            "txindex": txindex,
            "relindex": None,
            "senders": None,
            "fee": 0,
            "nulldata": None,
            "ins": None,     # library-specific field, to be passed to the state engine
            "outs": None,    # library-specific field, to be passed to the state engine
            "tx_merkle_path": None
        }
        
        # keep these around too, since this is what gets fed into the virtualchain state engine implementation 
        virtualchain_btc_tx_data = bits.btc_tx_deserialize(txdata['hex'])
        txdata['ins'] = virtualchain_btc_tx_data['ins']
        txdata['outs'] = virtualchain_btc_tx_data['outs']

        # we know how many senders there have to be 
        txdata['senders'] = [None] * len(txdata['ins'])

        return txdata