JS API Reference

Class: NetworkNode

network/node.NetworkNode

Describes a node in a VPN, mapping a Golem node id to an IP address

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NetworkNode(id, ip, getNetworkInfo, yagnaBaseUri): NetworkNode

Parameters

NameType
idstring
ipstring
getNetworkInfo() => NetworkInfo
yagnaBaseUristring

Returns

NetworkNode

Defined in

src/network/node.ts:7

Properties

id

Readonly id: string

Defined in

src/network/node.ts:8


ip

Readonly ip: string

Defined in

src/network/node.ts:9


getNetworkInfo

getNetworkInfo: () => NetworkInfo

Type declaration

▸ (): NetworkInfo

Returns

NetworkInfo

Defined in

src/network/node.ts:10


yagnaBaseUri

yagnaBaseUri: string

Defined in

src/network/node.ts:11

Methods

getNetworkConfig

getNetworkConfig(): Object

Generate a dictionary of arguments that are required for the appropriate Deploy command of an exescript in order to pass the network configuration to the runtime on the provider's end.

Returns

Object

NameType
net{ nodeIp: string ; id: string ; ip: string ; mask: string ; gateway?: string ; nodes: { [ip: string]: string; } }[]

Defined in

src/network/node.ts:19


getWebsocketUri

getWebsocketUri(port): string

Parameters

NameType
portnumber

Returns

string

Defined in

src/network/node.ts:30