tfchain/TFChainClient.py
def transaction_get(self, txid):
        """
        Get a transaction from an available explorer Node.

        @param txid: the identifier (bytes, bytearray, hash or string) that points to the desired transaction
        """
        txid = self._normalize_id(txid)
        endpoint = "/explorer/hashes/"+txid
        resp = self.explorer_get(endpoint=endpoint)
        resp = json_loads(resp)
        try:
            if resp['hashtype'] != 'transactionid':
                raise tfchain.errors.ExplorerInvalidResponse("expected hash type 'transactionid' not '{}'".format(resp['hashtype']), endpoint, resp)
            resp = resp['transaction']
            if resp['id'] != txid:
                raise tfchain.errors.ExplorerInvalidResponse("expected transaction ID '{}' not '{}'".format(txid, resp['id']), endpoint, resp)
            return self._transaction_from_explorer_transaction(resp, endpoint=endpoint, resp=resp)
        except KeyError as exc:
            # return a KeyError as an invalid Explorer Response
            raise tfchain.errors.ExplorerInvalidResponse(str(exc), endpoint, resp) from exc

        Get a transaction from an available explorer Node.

        @param txid: the identifier (bytes, bytearray, hash or string) that points to the desired transaction
        
Get a transaction from an available explorer Node.
Get a transaction from an available explorer Node .
def transaction_get(self, txid):
        txid = self._normalize_id(txid)
        endpoint = "/explorer/hashes/"+txid
        resp = self.explorer_get(endpoint=endpoint)
        resp = json_loads(resp)
        try:
            if resp['hashtype'] != 'transactionid':
                raise tfchain.errors.ExplorerInvalidResponse("expected hash type 'transactionid' not '{}'".format(resp['hashtype']), endpoint, resp)
            resp = resp['transaction']
            if resp['id'] != txid:
                raise tfchain.errors.ExplorerInvalidResponse("expected transaction ID '{}' not '{}'".format(txid, resp['id']), endpoint, resp)
            return self._transaction_from_explorer_transaction(resp, endpoint=endpoint, resp=resp)
        except KeyError as exc:
            raise tfchain.errors.ExplorerInvalidResponse(str(exc), endpoint, resp) from exc
def transaction_get ( self , txid ) : txid = self . _normalize_id ( txid ) endpoint = "/explorer/hashes/" + txid resp = self . explorer_get ( endpoint = endpoint ) resp = json_loads ( resp ) try : if resp [ 'hashtype' ] != 'transactionid' : raise tfchain . errors . ExplorerInvalidResponse ( "expected hash type 'transactionid' not '{}'" . format ( resp [ 'hashtype' ] ) , endpoint , resp ) resp = resp [ 'transaction' ] if resp [ 'id' ] != txid : raise tfchain . errors . ExplorerInvalidResponse ( "expected transaction ID '{}' not '{}'" . format ( txid , resp [ 'id' ] ) , endpoint , resp ) return self . _transaction_from_explorer_transaction ( resp , endpoint = endpoint , resp = resp ) except KeyError as exc : raise tfchain . errors . ExplorerInvalidResponse ( str ( exc ) , endpoint , resp ) from exc
Get a transaction from an available explorer Node.
Get a transaction from an available explorer Node .
"""
        Get a transaction from an available explorer Node.

        @param txid: the identifier (bytes, bytearray, hash or string) that points to the desired transaction
        """ # return a KeyError as an invalid Explorer Response
self
txid
the identifier (bytes, bytearray, hash or string) that points to the desired transaction
the identifier ( bytes bytearray hash or string ) that points to the desired transaction