Options
All
  • Public
  • Public/Protected
  • All
Menu

This class implements the Fluence protocol for javascript-based environments. It provides all the necessary features to communicate with Fluence network

Hierarchy

  • FluencePeer

Index

Constructors

Methods

  • getServices(): { sig: Sig }
  • registerMarineService(wasm: SharedArrayBuffer | Buffer, serviceId: string): Promise<void>
  • Registers marine service within the Fluence peer from wasm file. Following helper functions can be used to load wasm files:

    • loadWasmFromFileSystem
    • loadWasmFromNpmPackage
    • loadWasmFromServer

    Parameters

    • wasm: SharedArrayBuffer | Buffer

      buffer with the wasm file for service

    • serviceId: string

      the service id by which the service can be accessed in aqua

    Returns Promise<void>

  • removeMarineService(serviceId: string): void
  • Removes the specified marine service from the Fluence peer

    Parameters

    • serviceId: string

      the service id to remove

    Returns void

  • Initializes the peer: starts the Aqua VM, initializes the default call service handlers and (optionally) connect to the Fluence network

    Parameters

    • config: PeerConfig = {}

      object specifying peer configuration

    Returns Promise<void>

  • stop(): Promise<void>
  • Un-initializes the peer: stops all the underlying workflows, stops the Aqua VM and disconnects from the Fluence network

    Returns Promise<void>

  • Checks whether the object is instance of FluencePeer class

    Parameters

    • obj: unknown

      object to check if it is FluencePeer

    Returns obj is FluencePeer

    true if the object is FluencePeer false otherwise

Generated using TypeDoc