Network

Network

The Network class provides helper methods to get the passphrase or id for different digitalbits networks. It also provides the Network.current class method that returns the network that will be used by this process for the purposes of generating signatures.

You should select network your app will use before adding the first signature. You can use the use, usePublicNetwork and useTestNetwork helper methods.

Creates a new Network object.

Constructor

new Network(networkPassphrase)

Source:
Parameters:
Name Type Description
networkPassphrase string

Network passphrase

Methods

(static) current() → {Network}

Returns currently selected network.

Source:
Returns:
Type:
Network

(static) use(network)

Use network defined by Network object.

Source:
Parameters:
Name Type Description
network Network

Network to use

(static) usePublicNetwork()

Use DigitalBits Public Network

Source:

(static) useTestNetwork()

Use test network.

Source:

networkId() → {string}

Returns Network ID. Network ID is SHA-256 hash of network passphrase.

Source:
Returns:
Type:
string

networkPassphrase() → {string}

Returns network passphrase.

Source:
Returns:
Type:
string