public function lookupCounterpartyTransactionType(array $tx, $protocol_version=null) {
        $data = $this->parseBitcoinTransaction($tx, $protocol_version);
        if ($data === null) { return null; }
        return $data['type'];
    }