To many banks, bitcoin and other digital currencies are a mania, or worse. But to a handful of small lenders, they are a moneymaker.

Take Silvergate Bank, a three-branch lender that until recently focused mostly on local businesses in the San Diego area. Last year, its assets nearly doubled to $1.9 billion from $978 million, largely because of business flowing in from crypto-related companies.

Big...