JS API Reference

Class: NetworkModuleImpl

network/network.module.NetworkModuleImpl

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NetworkModuleImpl(deps): NetworkModuleImpl

Parameters

NameType
depsObject
deps.logger?Logger
deps.networkApiINetworkApi

Returns

NetworkModuleImpl

Defined in

src/network/network.module.ts:78

Properties

events

events: EventEmitter<NetworkEvents, any>

Implementation of

NetworkModule.events

Defined in

src/network/network.module.ts:70

Methods

createNetwork

createNetwork(options?): Promise<Network>

Creates a new network with the specified options.

Parameters

NameTypeDescription
options?NetworkOptionsNetworkOptions

Returns

Promise<Network>

Implementation of

NetworkModule.createNetwork

Defined in

src/network/network.module.ts:85


removeNetwork

removeNetwork(network): Promise<void>

Removes an existing network.

Parameters

NameTypeDescription
networkNetworkThe network to be removed.

Returns

Promise<void>

Implementation of

NetworkModule.removeNetwork

Defined in

src/network/network.module.ts:121


createNetworkNode

createNetworkNode(network, nodeId, nodeIp?): Promise<NetworkNode>

Creates a new node within a specified network.

Parameters

NameTypeDescription
networkNetworkThe network to which the node will be added.
nodeIdstringThe ID of the node to be created.
nodeIp?stringOptional IP address for the node. If not provided, the first available IP address will be assigned.

Returns

Promise<NetworkNode>

Implementation of

NetworkModule.createNetworkNode

Defined in

src/network/network.module.ts:136


removeNetworkNode

removeNetworkNode(network, node): Promise<void>

Removes an existing node from a specified network.

Parameters

NameTypeDescription
networkNetworkThe network from which the node will be removed.
nodeNetworkNodeThe node to be removed.

Returns

Promise<void>

Implementation of

NetworkModule.removeNetworkNode

Defined in

src/network/network.module.ts:167