The larvae of the black soldier fly (Hermetia illucens) are known as Phoenix worms and used for composting and as pet food.
I usually see the black soldier fly maggots offered for sale at reptile shows, they are still a somewhat specialty item, not available in all local pet stores.
The larvae are usually pre-packaged in fancy looking small boxes and sold as high calcium food for your insectivorous pet at a somewhat hefty price considering how little organic matter you get.
Black soldier fly maggots eat all sorts of decomposing organic matter and they can be used to make compost. They can also be used as high protein human food — although I would imagine to feed humans with them the price definitely would need to be a lot lower than what pet food producers charge for it.