Module: Identities

Identities provides a framework for generating and managing identity details and providers.

Source:

Namespaces

Identities

Methods

(async) Identities(params) → {module:Identities~Identities}

Creates an instance of Identities.

Parameters:
Name Type Description
params Object

One or more parameters for configuring Identities.

Properties
Name Type Attributes Description
keystore module:KeyStore <optional>

A preconfigured KeyStore. A KeyStore will be created in the path defined by the path param. If neither Keystore nor path are defined, a new KeyStore is stored in ./orbitdb identities.

path string <optional>

The path to a KeyStore. If no path is provided, the default is ./orbitdb/identities.

storage module:Storage <optional>

An instance of a compatible storage module.

ipfs IPFS <optional>

An instance of IPFS. This param is not required if storage is provided.

Source:
Returns:

An instance of Identities.

Type
module:Identities~Identities

(static) useIdentityProvider(identityProvider)

Adds an identity provider.

Parameters:
Name Type Description
identityProvider IdentityProvider

The identity provider to add.

Source:
Throws:
  • Given IdentityProvider doesn't have a field 'type'.

  • Given IdentityProvider doesn't have a function 'verifyIdentity'.

  • IdentityProvider $ already added.

    Type
    IdentityProvider.type

Type Definitions

Identity

Type:
  • Object
Properties:
Name Type Description
id string

A unique identifer for the identity.

publicKey object

A public key.

signatures object

A signed identity id and public key.

type string

The type of identity provider.

sign function

A sign function to sign data using this identity.

verify function

A verify function to verify data signed by this identity.

Source: