The Welsh government could provide a “substantial investment” for the 320-MW Swansea Bay tidal lagoon project, it was announced on Wednesday.