JS API Reference
Interface: NetworkModule
network/network.module.NetworkModule
Implemented by
Table of contents
Properties
Methods
Properties
events
• events: EventEmitter<NetworkEvents, any>
Defined in
src/network/network.module.ts:39
Methods
createNetwork
▸ createNetwork(options?): Promise<Network>
Creates a new network with the specified options.
Parameters
| Name | Type | Description | 
|---|---|---|
| options? | NetworkOptions | NetworkOptions | 
Returns
Promise<Network>
Defined in
src/network/network.module.ts:45
removeNetwork
▸ removeNetwork(network): Promise<void>
Removes an existing network.
Parameters
| Name | Type | Description | 
|---|---|---|
| network | Network | The network to be removed. | 
Returns
Promise<void>
Defined in
src/network/network.module.ts:51
createNetworkNode
▸ createNetworkNode(network, nodeId, nodeIp?): Promise<NetworkNode>
Creates a new node within a specified network.
Parameters
| Name | Type | Description | 
|---|---|---|
| network | Network | The network to which the node will be added. | 
| nodeId | string | The ID of the node to be created. | 
| nodeIp? | string | Optional IP address for the node. If not provided, the first available IP address will be assigned. | 
Returns
Promise<NetworkNode>
Defined in
src/network/network.module.ts:59
removeNetworkNode
▸ removeNetworkNode(network, node): Promise<void>
Removes an existing node from a specified network.
Parameters
| Name | Type | Description | 
|---|---|---|
| network | Network | The network from which the node will be removed. | 
| node | NetworkNode | The node to be removed. | 
Returns
Promise<void>