An affidavit is submitted in state court. A declaration is submitted in federal court, but they are the same thing. They are sworn testimony, subject to the penalty of perjury. Both support a plaintiff or defendant's position. The person who signed the affidavit [or declaration] must testify consistently in a courtroom with what the written testimony in the affidavit says.