def get_spender(self, outpoint: str) -> Optional[str]:
        """
        returns txid spending outpoint.
        subscribes to addresses as a side effect.
        """
        prev_txid, index = outpoint.split(':')
        spender_txid = self.db.get_spent_outpoint(prev_txid, int(index))
        # discard local spenders
        tx_mined_status = self.get_tx_height(spender_txid)
        if tx_mined_status.height in [TX_HEIGHT_LOCAL, TX_HEIGHT_FUTURE]:
            spender_txid = None
        if not spender_txid:
            return None
        spender_tx = self.get_transaction(spender_txid)
        for i, o in enumerate(spender_tx.outputs()):
            if o.address is None:
                continue
            if not self.is_mine(o.address):
                self.add_address(o.address)
        return spender_txid

        returns txid spending outpoint.
        subscribes to addresses as a side effect.
        
electrum/address_synchronizer.py