All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tbk.lnurl.Lnurl Maven / Gradle / Ivy

There is a newer version: 0.14.0
Show newest version
package org.tbk.lnurl;

import java.net.URI;

import static java.util.Objects.requireNonNull;

public interface Lnurl {

    static boolean isSupported(URI uri) {
        requireNonNull(uri, "'uri' must not be null");

        if (!"https".equals(uri.getScheme())) {
            boolean isLocal = "localhost".equals(uri.getHost());
            boolean isTor = "http".equals(uri.getScheme()) && uri.getHost().endsWith(".onion");
            return isLocal || isTor;
        }
        return true;
    }

    URI toUri();

    String toLnurlString();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy