toOnionAddress

@JvmStatic
@JvmName(name = "get")
fun String.toOnionAddress(): OnionAddress(source)

Parses a String for any .onion address.

String can be either a URL containing the .onion address, or the .onion address itself.

Currently, only v3 .onion addresses are supported.

Return

OnionAddress

Throws

IllegalArgumentException

if no .onion address is found


@JvmStatic
@JvmName(name = "get")
fun ByteArray.toOnionAddress(): OnionAddress(source)

Transforms provided bytes into a .onion address.

Currently, only v3 .onion addresses are supported.

Return

OnionAddress

Throws

IllegalArgumentException

if no .onion address is found