Class: WebContext

(protected) WebContext(engine, installedBusinessNetwork, identity, eventSink, additionalConnectorOptionsopt)

A class representing the current request being handled by the JavaScript engine.

Constructor

(protected) new WebContext(engine, installedBusinessNetwork, identity, eventSink, additionalConnectorOptionsopt)

Constructor.

Parameters:
Name Type Attributes Description
engine Engine

The owning engine.

installedBusinessNetwork InstalledBusinessNetwork

Information on the installed business network.

identity Object

The current identity.

eventSink EventEmitter

The event emitter

additionalConnectorOptions Object <optional>

Additional connector specific options for this transaction.

Source:

Methods

getDataService() → {DataService}

Get the data service provided by the chaincode container.

Source:
Returns:

The data service provided by the chaincode container.

Type
DataService

getEventService() → {EventService}

Get the event service provided by the chaincode container.

Source:
Returns:

The event service provided by the chaincode container.

Type
EventService

getHTTPService() → {HTTPService}

Get the http service provided by the chaincode container.

Source:
Returns:

The http service provided by the chaincode container.

Type
HTTPService

getIdentityService() → {IdentityService}

Get the identity service provided by the chaincode container.

Source:
Returns:

The identity service provided by the chaincode container.

Type
IdentityService

getNativeAPI()

Get the native api

Source: