JS API Reference

Interface: INetworkApi

network/api.INetworkApi

Implemented by

Table of contents

Methods

Methods

createNetwork

createNetwork(options): Promise<Network>

Creates a new network with the specified options.

Parameters

NameTypeDescription
optionsNetworkOptionsNetworkOptions

Returns

Promise<Network>

Defined in

src/network/api.ts:24


removeNetwork

removeNetwork(network): Promise<void>

Removes an existing network.

Parameters

NameTypeDescription
networkNetworkThe network to be removed.

Returns

Promise<void>

Defined in

src/network/api.ts:30


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>

Defined in

src/network/api.ts:39


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>

Defined in

src/network/api.ts:46


getIdentity

getIdentity(): Promise<string>

Returns the identifier of the requesor

Returns

Promise<string>

Defined in

src/network/api.ts:51