'Get outputs for a public key'

def get_outputs_by_public_key(self, public_key):

    res = list(query.get_owned_ids(self.connection, public_key))
    txs = [tx for (_, tx) in self.filter_valid_items(res)]
    return [TransactionLink(tx['id'], index) for tx in txs for (index, output) in enumerate(tx['outputs']) if condition_details_has_owner(output['condition']['details'], public_key)]
