Answer :

The specific purpose of the declaration was to provide a formal explanation as to why the congress had voted in favour of independence two days before, on July 2, 1776.

It was seen as a basis for the independence of US  since.

The main purpose of the declaration of independence was to explain to foreign nations why many colonies decided that it was time to separate from Great Britain.