Network

Network

Represents a network.

Constructor

new Network(name, identifier, datetimeConverter, addressHasher, createAddress, AddressClass, NetworkTimestampClass)

Description:
  • Creates a new network with the specified name and identifier byte.

Source:
Parameters:
Name Type Description
name string

Network name.

identifier number

Network identifier byte.

datetimeConverter NetworkTimestampDatetimeConverter

Network timestamp datetime converter associated with this network.

addressHasher function

Gets the primary hasher to use in the public key to address conversion.

createAddress function

Creates an encoded address from an address without checksum and checksum bytes.

AddressClass AddressConstructable

Address class associated with this network.

NetworkTimestampClass Constructable

Network timestamp class associated with this network.

Classes

Network
Network
Network

Members

MAINNET :Network

Description:
  • NEM main network.

Source:

NEM main network.

Type:

MAINNET :Network

Description:
  • Symbol main network.

Source:

Symbol main network.

Type:

NETWORKS :Array.<Network>

Description:
  • NEM well known networks.

Source:

NEM well known networks.

Type:

NETWORKS :Array.<Network>

Description:
  • Symbol well known networks.

Source:

Symbol well known networks.

Type:

TESTNET :Network

Description:
  • NEM test network.

Source:

NEM test network.

Type:

TESTNET :Network

Description:
  • Symbol test network.

Source:

Symbol test network.

Type:

datetimeConverter :NetworkTimestampDatetimeConverter

Description:
  • Network timestamp datetime converter associated with this network.

Source:

Network timestamp datetime converter associated with this network.

Type:

generationHashSeed :Hash256

Description:
  • Network generation hash seed.

Source:

Network generation hash seed.

Type:

identifier :number

Description:
  • Network identifier byte.

Source:

Network identifier byte.

Type:
  • number

name :string

Description:
  • Network name.

Source:

Network name.

Type:
  • string

Methods

fromDatetime(referenceDatetime) → {TNetworkTimestamp}

Description:
  • Converts a datetime to a network timestamp.

Source:
Parameters:
Name Type Description
referenceDatetime Date

Reference datetime to convert.

Returns:

Network timestamp representation of the reference datetime.

Type
TNetworkTimestamp

isValidAddress(address) → {boolean}

Description:
  • Checks if an address is valid and belongs to this network.

Source:
Parameters:
Name Type Description
address TAddress

Address to check.

Returns:

\c true if address is valid and belongs to this network.

Type
boolean

isValidAddressString(addressString) → {boolean}

Description:
  • Checks if an address string is valid and belongs to this network.

Source:
Parameters:
Name Type Description
addressString string

Address to check.

Returns:

\c true if address is valid and belongs to this network.

Type
boolean

publicKeyToAddress(publicKey) → {TAddress}

Description:
  • Converts a public key to an address.

Source:
Parameters:
Name Type Description
publicKey PublicKey

Public key to convert.

Returns:

Address corresponding to the public key input.

Type
TAddress

toDatetime(referenceNetworkTimestamp) → {Date}

Description:
  • Converts a network timestamp to a datetime.

Source:
Parameters:
Name Type Description
referenceNetworkTimestamp TNetworkTimestamp

Reference network timestamp to convert.

Returns:

Datetime representation of the reference network timestamp.

Type
Date

toString() → {string}

Description:
  • Returns string representation of this object.

Source:
Returns:

String representation of this object

Type
string

Network Network

Represents a NEM network.

Constructor

new Network(name, identifier, epochTime)

Description:
  • Creates a new network with the specified name, identifier byte and generation hash seed.

Source:
Parameters:
Name Type Description
name string

Network name.

identifier number

Network identifier byte.

epochTime Date

Network epoch time.

Classes

Network
Network
Network

Members

MAINNET :Network

Description:
  • NEM main network.

Source:

NEM main network.

Type:

MAINNET :Network

Description:
  • Symbol main network.

Source:

Symbol main network.

Type:

NETWORKS :Array.<Network>

Description:
  • NEM well known networks.

Source:

NEM well known networks.

Type:

NETWORKS :Array.<Network>

Description:
  • Symbol well known networks.

Source:

Symbol well known networks.

Type:

TESTNET :Network

Description:
  • NEM test network.

Source:

NEM test network.

Type:

TESTNET :Network

Description:
  • Symbol test network.

Source:

Symbol test network.

Type:

datetimeConverter :NetworkTimestampDatetimeConverter

Description:
  • Network timestamp datetime converter associated with this network.

Source:

Network timestamp datetime converter associated with this network.

Type:

generationHashSeed :Hash256

Description:
  • Network generation hash seed.

Source:

Network generation hash seed.

Type:

identifier :number

Description:
  • Network identifier byte.

Source:

Network identifier byte.

Type:
  • number

name :string

Description:
  • Network name.

Source:

Network name.

Type:
  • string

Methods

fromDatetime(referenceDatetime) → {TNetworkTimestamp}

Description:
  • Converts a datetime to a network timestamp.

Source:
Parameters:
Name Type Description
referenceDatetime Date

Reference datetime to convert.

Returns:

Network timestamp representation of the reference datetime.

Type
TNetworkTimestamp

isValidAddress(address) → {boolean}

Description:
  • Checks if an address is valid and belongs to this network.

Source:
Parameters:
Name Type Description
address TAddress

Address to check.

Returns:

\c true if address is valid and belongs to this network.

Type
boolean

isValidAddressString(addressString) → {boolean}

Description:
  • Checks if an address string is valid and belongs to this network.

Source:
Parameters:
Name Type Description
addressString string

Address to check.

Returns:

\c true if address is valid and belongs to this network.

Type
boolean

publicKeyToAddress(publicKey) → {TAddress}

Description:
  • Converts a public key to an address.

Source:
Parameters:
Name Type Description
publicKey PublicKey

Public key to convert.

Returns:

Address corresponding to the public key input.

Type
TAddress

toDatetime(referenceNetworkTimestamp) → {Date}

Description:
  • Converts a network timestamp to a datetime.

Source:
Parameters:
Name Type Description
referenceNetworkTimestamp TNetworkTimestamp

Reference network timestamp to convert.

Returns:

Datetime representation of the reference network timestamp.

Type
Date

toString() → {string}

Description:
  • Returns string representation of this object.

Source:
Returns:

String representation of this object

Type
string

Network Network

Represents a Symbol network.

Constructor

new Network(name, identifier, epochTime, generationHashSeed)

Description:
  • Creates a new network with the specified name, identifier byte and generation hash seed.

Source:
Parameters:
Name Type Description
name string

Network name.

identifier number

Network identifier byte.

epochTime Date

Network epoch time.

generationHashSeed Hash256

Network generation hash seed.

Classes

Network
Network
Network

Members

MAINNET :Network

Description:
  • NEM main network.

Source:

NEM main network.

Type:

MAINNET :Network

Description:
  • Symbol main network.

Source:

Symbol main network.

Type:

NETWORKS :Array.<Network>

Description:
  • NEM well known networks.

Source:

NEM well known networks.

Type:

NETWORKS :Array.<Network>

Description:
  • Symbol well known networks.

Source:

Symbol well known networks.

Type:

TESTNET :Network

Description:
  • NEM test network.

Source:

NEM test network.

Type:

TESTNET :Network

Description:
  • Symbol test network.

Source:

Symbol test network.

Type:

datetimeConverter :NetworkTimestampDatetimeConverter

Description:
  • Network timestamp datetime converter associated with this network.

Source:

Network timestamp datetime converter associated with this network.

Type:

generationHashSeed :Hash256

Description:
  • Network generation hash seed.

Source:

Network generation hash seed.

Type:

identifier :number

Description:
  • Network identifier byte.

Source:

Network identifier byte.

Type:
  • number

name :string

Description:
  • Network name.

Source:

Network name.

Type:
  • string

Methods

fromDatetime(referenceDatetime) → {TNetworkTimestamp}

Description:
  • Converts a datetime to a network timestamp.

Source:
Parameters:
Name Type Description
referenceDatetime Date

Reference datetime to convert.

Returns:

Network timestamp representation of the reference datetime.

Type
TNetworkTimestamp

isValidAddress(address) → {boolean}

Description:
  • Checks if an address is valid and belongs to this network.

Source:
Parameters:
Name Type Description
address TAddress

Address to check.

Returns:

\c true if address is valid and belongs to this network.

Type
boolean

isValidAddressString(addressString) → {boolean}

Description:
  • Checks if an address string is valid and belongs to this network.

Source:
Parameters:
Name Type Description
addressString string

Address to check.

Returns:

\c true if address is valid and belongs to this network.

Type
boolean

publicKeyToAddress(publicKey) → {TAddress}

Description:
  • Converts a public key to an address.

Source:
Parameters:
Name Type Description
publicKey PublicKey

Public key to convert.

Returns:

Address corresponding to the public key input.

Type
TAddress

toDatetime(referenceNetworkTimestamp) → {Date}

Description:
  • Converts a network timestamp to a datetime.

Source:
Parameters:
Name Type Description
referenceNetworkTimestamp TNetworkTimestamp

Reference network timestamp to convert.

Returns:

Datetime representation of the reference network timestamp.

Type
Date

toString() → {string}

Description:
  • Returns string representation of this object.

Source:
Returns:

String representation of this object

Type
string