Class: Network

Network(networkPassphrase)

The Network class provides helper methods to get the passphrase or id for different stellar 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)

Parameters:
Name Type Description
networkPassphrase string Network passphrase
Source:

Methods

(static) current() → {Network}

Returns currently selected network.
Source:
Returns:
Type
Network

(static) use(network)

Use network defined by Network object.
Parameters:
Name Type Description
network Network Network to use
Source:

(static) usePublicNetwork()

Use Stellar 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