public class Network
extends java.lang.Object
networkPassphrase
which is hashed to
every transaction id.
There is no default network. You need to specify network when initializing your app by calling
use(Network)
, usePublicNetwork()
or useTestNetwork()
.Constructor and Description |
---|
Network(java.lang.String networkPassphrase)
Creates a new Network object to represent a network with a given passphrase
|
Modifier and Type | Method and Description |
---|---|
static Network |
current()
Returns currently used Network object.
|
byte[] |
getNetworkId()
Returns network id (SHA-256 hashed
networkPassphrase ). |
java.lang.String |
getNetworkPassphrase()
Returns network passphrase
|
static void |
use(Network network)
Use
network as a current network. |
static void |
usePublicNetwork()
Use DigitalBits Public Network
|
static void |
useTestNetwork()
Use DigitalBits Test Network.
|
public Network(java.lang.String networkPassphrase)
networkPassphrase
- public java.lang.String getNetworkPassphrase()
public byte[] getNetworkId()
networkPassphrase
).public static Network current()
public static void use(Network network)
network
as a current network.network
- Network object to set as current networkpublic static void usePublicNetwork()
public static void useTestNetwork()