Table of Contents

Class Extensions

Namespace
LNURL
Assembly
LNURL.Core.dll

Provides extension methods for Uri used by the LNURL library to determine network characteristics of service endpoints.

public static class Extensions
Inheritance
Extensions
Inherited Members

Methods

IsLocalNetwork(Uri)

Determines whether the URI points to a local network address. This includes DNS names ending in .internal, .local, .lan, single-label hostnames (no dots), and RFC 1918 / loopback IP addresses. LNURL allows HTTP (instead of HTTPS) for local network addresses.

public static bool IsLocalNetwork(this Uri server)

Parameters

server Uri

The URI to check.

Returns

bool

true if the URI host is on a local network; otherwise false.

Exceptions

ArgumentNullException

Thrown when server is null.

IsOnion(Uri)

Determines whether the URI points to a Tor hidden service (.onion address). LNURL allows HTTP (instead of HTTPS) for .onion addresses.

public static bool IsOnion(this Uri uri)

Parameters

uri Uri

The URI to check.

Returns

bool

true if the URI host ends with .onion; otherwise false.