3.0 KiB
Class: FluencePeer
This class implements the Fluence protocol for javascript-based environments. It provides all the necessary features to communicate with Fluence network
Table of contents
Constructors
Accessors
Methods
Constructors
constructor
• new FluencePeer()
Creates a new Fluence Peer instance. Does not start the workflows.
In order to work with the Peer it has to be initialized with the init
method
Defined in
Accessors
connectionInfo
• get
connectionInfo(): ConnectionInfo
Get the information about Fluence Peer connections
Returns
ConnectionInfo
Defined in
internals
• get
internals(): Object
Does not intended to be used manually. Subject to change
Returns
Object
Name | Type |
---|---|
callServiceHandler |
CallServiceHandler |
initiateFlow |
(request : RequestFlow ) => Promise <void > |
Defined in
default
• Static
get
default(): FluencePeer
Get the default Fluence peer instance. The default peer is used automatically in all the functions generated by the Aqua compiler if not specified otherwise.
Returns
Defined in
Methods
init
▸ init(config?
): Promise
<void
>
Initializes the peer: starts the Aqua VM, initializes the default call service handlers and (optionally) connect to the Fluence network
Parameters
Name | Type | Description |
---|---|---|
config? |
PeerConfig |
object specifying peer configuration |
Returns
Promise
<void
>
Defined in
uninit
▸ uninit(): Promise
<void
>
Uninitializes the peer: stops all the underltying workflows, stops the Aqua VM and disconnects from the Fluence network
Returns
Promise
<void
>