Version: 0.13.7

Class: CurrencyNetwork

"CurrencyNetwork".CurrencyNetwork

The CurrencyNetwork class contains all functions relevant for retrieving currency network related information. It is meant to be called via a TLNetwork instance like:

const tlNetwork = new TLNetwork(...)
// Get all networks
tlNetwork.currencyNetwork.getAll().then(
networks => console.log("All networks:", networks)
)

Hierarchy#

  • CurrencyNetwork

Methods#

getAll#

getAll(): Promise<NetworkDetails[]>

Defined in src/CurrencyNetwork.ts:52

Returns all registered currency networks.

Returns: Promise<NetworkDetails[]>


getInfo#

getInfo(networkAddress: string): Promise<NetworkDetails>

Defined in src/CurrencyNetwork.ts:70

Returns detailed information of specific currency network.

Parameters:#

NameTypeDescription
networkAddressstringAddress of a currency network.

Returns: Promise<NetworkDetails>

A network object with information about name, decimals, number of users and address.


getUserOverview#

getUserOverview(networkAddress: string, userAddress: string, options?: { decimalsOptions?: DecimalsOptions }): Promise<UserOverview>

Defined in src/CurrencyNetwork.ts:100

Returns overview of a user in a specific currency network.

Parameters:#

NameTypeDefault valueDescription
networkAddressstring-Address of a currency network.
userAddressstring-Address of a user.
options{ decimalsOptions?: DecimalsOptions }{}-

Returns: Promise<UserOverview>


getUsers#

getUsers(networkAddress: string): Promise<string[]>

Defined in src/CurrencyNetwork.ts:88

Returns all addresses of users in a currency network.

Parameters:#

NameTypeDescription
networkAddressstringAddress of a currency network.

Returns: Promise<string[]>