No bank or trust company shall pledge, hypothecate, assign, transfer, or create a lien upon or charge against any of its assets except as follows:
(1) to the state;
(2) to secure public deposits;
(3) to secure funds of trustees in bankruptcy;
(4) to secure money borrowed in good faith from other banks, trust companies, a financial agency created by act of Congress, or the state in programs specifically authorizing state banks to participate as an eligible local lender;
(5) to finance the acquisition of real estate to be carried as an asset as provided for in section 47.10;
(6) to secure a liability that arises from a transfer of a direct obligation of, or obligations that are fully guaranteed as to principal and interest by, the United States government or an agency thereof, or obligations of United States government-sponsored entities which are exempt from the registration requirements of the Securities Act of 1933, United States Code, title 15, section 77a, that the bank or trust company is obligated to repurchase;
(7) to a counterparty to secure an interest rate swap agreement.
This section shall not be construed to permit the use of assets as security for public deposits other than the securities made eligible by law for that purpose.