Class: EmbeddedConnectionManager

(abstract, protected) EmbeddedConnectionManager(connectionProfileManager)

Base class representing a connection manager that establishes and manages
connections to one or more business networks.

Constructor

(abstract, protected) new EmbeddedConnectionManager(connectionProfileManager)

Creates a new EmbeddedConnectionManager

Parameters:
Name Type Description
connectionProfileManager ConnectionProfileManager
  • the ConnectionProfileManager used to manage access connection profiles.
Source:

Methods

(async) connect(connectionProfile, businessNetworkIdentifier, connectionOptions) → {Promise}

Establish a connection to the business network.

Parameters:
Name Type Description
connectionProfile string

The name of the connection profile

businessNetworkIdentifier string

The identifier of the business network

connectionOptions object

The connection options loaded from the profile

Source:
Returns:

A promise that is resolved with a Connection
object once the connection is established, or rejected with a connection error.

Type
Promise

(async) exportIdentity(connectionProfileName, connectionOptions, id) → {Promise}

Obtain the credentials associated with a given identity.

Parameters:
Name Type Description
connectionProfileName String

Name of the connection profile.

connectionOptions Object

connection options loaded from the profile.

id String

Name of the identity.

Source:
Returns:

Resolves to credentials in the form { certificate: String, privateKey: String }, or
null if the named identity does not exist.

Type
Promise

(async) importIdentity(connectionProfile, connectionOptions, id, certificate, privateKey)

Import an identity into a profile wallet or keystore.

Parameters:
Name Type Description
connectionProfile string

The name of the connection profile

connectionOptions object

The connection options loaded from the profile

id string

the id to associate with the identity

certificate string

the certificate

privateKey string

the private key

Source:

(async) removeIdentity(connectionProfile, connectionOptions, id) → {Promise}

Remove an identity from the profile wallet.

Parameters:
Name Type Description
connectionProfile string

The name of the connection profile

connectionOptions object

The connection options loaded from the profile

id string

the id to associate with the identity

Source:
Returns:

a promise which resolves to true if identity existed and removed, false otherwise
or rejects with an error.

Type
Promise