A NSW piggery becomes the first to generate carbon credits.