Network⚓︎
- Network
- Represents a Symbol network.
Extends⚓︎
Network
<any
,any
>
Constructors⚓︎
new Network()⚓︎
Creates a new network with the specified name, identifier byte and generation hash seed.
Parameters⚓︎
Parameter | Type | Description |
---|---|---|
name |
string |
Network name. |
identifier |
number |
Network identifier byte. |
epochTime |
Date |
Network epoch time. |
generationHashSeed |
Hash256 |
Network generation hash seed. |
Returns⚓︎
Network
Overrides⚓︎
Properties⚓︎
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
datetimeConverter |
public |
NetworkTimestampDatetimeConverter |
Network timestamp datetime converter associated with this network. | Network .datetimeConverter |
generationHashSeed |
public |
Hash256 |
Network generation hash seed. | - |
identifier |
public |
number |
Network identifier byte. | Network .identifier |
name |
public |
string |
Network name. | Network .name |
MAINNET |
static |
Network |
Symbol main network. | - |
NETWORKS |
static |
Network [] |
Symbol well known networks. | - |
TESTNET |
static |
Network |
Symbol test network. | - |
Methods⚓︎
fromDatetime()⚓︎
- Network.fromDatetime
- Converts a datetime to a network timestamp.
Parameters⚓︎
Parameter | Type | Description |
---|---|---|
referenceDatetime |
Date |
Reference datetime to convert. |
Returns⚓︎
any
Network timestamp representation of the reference datetime.
Inherited from⚓︎
isValidAddress()⚓︎
- Network.isValidAddress
- Checks if an address is valid and belongs to this network.
Parameters⚓︎
Parameter | Type | Description |
---|---|---|
address |
any |
Address to check. |
Returns⚓︎
boolean
\c true if address is valid and belongs to this network.
Inherited from⚓︎
isValidAddressString()⚓︎
- Network.isValidAddressString
- Checks if an address string is valid and belongs to this network.
Parameters⚓︎
Parameter | Type | Description |
---|---|---|
addressString |
string |
Address to check. |
Returns⚓︎
boolean
\c true if address is valid and belongs to this network.
Inherited from⚓︎
publicKeyToAddress()⚓︎
- Network.publicKeyToAddress
- Converts a public key to an address.
Parameters⚓︎
Parameter | Type | Description |
---|---|---|
publicKey |
PublicKey |
Public key to convert. |
Returns⚓︎
any
Address corresponding to the public key input.
Inherited from⚓︎
toDatetime()⚓︎
- Network.toDatetime
- Converts a network timestamp to a datetime.
Parameters⚓︎
Parameter | Type | Description |
---|---|---|
referenceNetworkTimestamp |
any |
Reference network timestamp to convert. |
Returns⚓︎
Date
Datetime representation of the reference network timestamp.
Inherited from⚓︎
toString()⚓︎
- Network.toString
- Returns string representation of this object.
Returns⚓︎
string
String representation of this object