/// import { Particle } from './particle'; import * as PeerId from 'peer-id'; import Multiaddr from 'multiaddr'; import { FluenceConnection } from './fluenceConnection'; import { ModuleConfig } from './moduleConfig'; export declare class FluenceClient { readonly selfPeerId: PeerId; readonly selfPeerIdStr: string; private nodePeerIdStr; private subscriptions; private interpreter; connection: FluenceConnection; constructor(selfPeerId: PeerId); /** * Pass a particle to a interpreter and send a result to other services. */ private handleParticle; /** * Handle incoming particle from a relay. */ private handleExternalParticle; disconnect(): Promise; /** * Instantiate WebAssembly with AIR interpreter to execute AIR scripts */ instantiateInterpreter(): Promise; /** * Establish a connection to the node. If the connection is already established, disconnect and reregister all services in a new connection. * * @param multiaddr */ connect(multiaddr: string | Multiaddr): Promise; sendParticle(particle: Particle): Promise; executeParticle(particle: Particle): Promise; nodeIdentityCall(): string; requestResponse(name: string, call: (nodeId: string) => string, returnValue: string, data: Map, handleResponse: (args: any[]) => T, nodeId?: string, ttl?: number): Promise; /** * Send a script to add module to a relay. Waiting for a response from a relay. */ addModule(name: string, moduleBase64: string, config?: ModuleConfig, nodeId?: string, ttl?: number): Promise; /** * Send a script to add module to a relay. Waiting for a response from a relay. */ addBlueprint(name: string, dependencies: string[], blueprintId?: string, nodeId?: string, ttl?: number): Promise; /** * Send a script to create a service to a relay. Waiting for a response from a relay. */ createService(blueprintId: string, nodeId?: string, ttl?: number): Promise; /** * Get all available modules hosted on a connected relay. */ getAvailableModules(nodeId?: string, ttl?: number): Promise; /** * Get all available blueprints hosted on a connected relay. */ getBlueprints(nodeId: string, ttl?: number): Promise; /** * Add a provider to DHT network to neighborhood around a key. */ addProvider(key: Buffer, providerPeer: string, providerServiceId?: string, nodeId?: string, ttl?: number): Promise; /** * Get a provider from DHT network from neighborhood around a key.. */ getProviders(key: Buffer, nodeId?: string, ttl?: number): Promise; /** * Get relays neighborhood */ neighborhood(node: string, ttl?: number): Promise; /** * Call relays 'identity' method. It should return passed 'fields' */ relayIdentity(fields: string[], data: Map, nodeId?: string, ttl?: number): Promise; } //# sourceMappingURL=fluenceClient.d.ts.map