def can_have_lightning(self) -> bool:
        """ whether this wallet can create new channels """
        # we want static_remotekey to be a wallet address
        if not self.txin_type == 'p2wpkh':
            return False
        if self.config.ENABLE_ANCHOR_CHANNELS:
            # exclude watching-only wallets
            if not self.keystore:
                return False
            # exclude hardware wallets
            if not self.keystore.may_have_password():
                return False
        return True
 whether this wallet can create new channels 
electrum/wallet.py