tuweni / org.apache.tuweni.scuttlebutt.discovery / LocalIdentity

LocalIdentity

class LocalIdentity (source)

Representation of an identity associated with an IP and port, used for Scuttlebutt local discovery.

See https://ssbc.github.io/scuttlebutt-protocol-guide/ for a detailed description of this identity.

Constructors

<init>

Constructor for a local identity

LocalIdentity(ip: String!, port: String!, id: Identity!)
LocalIdentity(ip: String!, port: Int, id: Identity!)
LocalIdentity(addr: InetSocketAddress!, id: Identity!)

Functions

equals

fun equals(other: Any?): Boolean

fromString

Create a local identity from a String of the form net:IP address:port~shs:base64 of public key

static fun fromString(str: String!): LocalIdentity!

hashCode

fun hashCode(): Int

toCanonicalForm

The canonical form of an invite

fun toCanonicalForm(): String!

toString

fun toString(): String