Namespace: Identities

Identities~Identities

The instance returned by module:Identities.

Source:

Methods

(async) createIdentity(options) → {module:Identities~Identity}

Creates an identity, adding it to storage.

Parameters:
Name Type Description
options Object

Various options for configuring a new identity.

Properties
Name Type Attributes Default Description
provider function <optional>
PublicKeyIdentityProvider()

An instance of the Provider to use for generating an identity, e.g. PublicKeyIdentityProvider({ keystore })

Source:
Returns:

An instance of identity.

Type
module:Identities~Identity

(async) getIdentity(hash) → {module:Identities~Identity}

Gets an identity by hash.

Parameters:
Name Type Description
hash string

An identity hash.

Source:
Returns:

An instance of identity.

Type
module:Identities~Identity

(async, static) verifyIdentity(identity) → {boolean}

Verifies an identity using the identity's provider.

Parameters:
Name Type Description
identity module:Identities~Identity

The identity to verify.

Source:
Returns:

True the identity is valid, false otherwise.

Type
boolean