Home Reference Source
public class | source

PoolsUtils

You can directly use an instance of this class. poolsUtils

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

servers: *[]

Method Summary

Public Methods
public

convertServersList(servers: *): *

public

extractPoolURL(url: *): {"poolVersion": *, "poolName": *, "poolFee": *, "poolWebsite": *, "poolServers": *, "poolAddress": *, "poolPublicKey": *, "poolURL": *, "poolReferral": *}

public

getPoolServersStatus(poolServers: *): *

public

async insertServersListWaitlist(serversListArray: *, nodeConsensusType: *): boolean

public

processServersList(serversList: *): *

public

substr(url: *): *

public

substrNext(url: *): *

public

validatePoolActivated(poolActivated: boolean)

public

validatePoolFee(poolFee: *)

public

validatePoolName(poolName: *)

public

validatePoolPublicKey(poolPublicKey: *)

public

validatePoolServers(poolServers: *)

public

validatePoolWebsite(poolWebsite: *)

public

validatePoolsDetails(poolName: *, poolFee: *, poolWebsite: *, poolAddress: *, poolPublicKey: *, poolServers: *, poolActivated: boolean, poolReferralFee: number): boolean

Public Constructors

public constructor() source

Public Members

public servers: *[] source

Public Methods

public convertServersList(servers: *): * source

Params:

NameTypeAttributeDescription
servers *

Return:

*

public extractPoolURL(url: *): {"poolVersion": *, "poolName": *, "poolFee": *, "poolWebsite": *, "poolServers": *, "poolAddress": *, "poolPublicKey": *, "poolURL": *, "poolReferral": *} source

Params:

NameTypeAttributeDescription
url *

Return:

{"poolVersion": *, "poolName": *, "poolFee": *, "poolWebsite": *, "poolServers": *, "poolAddress": *, "poolPublicKey": *, "poolURL": *, "poolReferral": *}

public getPoolServersStatus(poolServers: *): * source

Params:

NameTypeAttributeDescription
poolServers *

Return:

*

public async insertServersListWaitlist(serversListArray: *, nodeConsensusType: *): boolean source

Params:

NameTypeAttributeDescription
serversListArray *
nodeConsensusType *
  • optional

Return:

boolean

public processServersList(serversList: *): * source

Params:

NameTypeAttributeDescription
serversList *

Return:

*

public substr(url: *): * source

Params:

NameTypeAttributeDescription
url *

Return:

*

public substrNext(url: *): * source

Params:

NameTypeAttributeDescription
url *

Return:

*

public validatePoolActivated(poolActivated: boolean) source

Params:

NameTypeAttributeDescription
poolActivated boolean
  • optional
  • default: false

public validatePoolFee(poolFee: *) source

Params:

NameTypeAttributeDescription
poolFee *

public validatePoolName(poolName: *) source

Params:

NameTypeAttributeDescription
poolName *

public validatePoolPublicKey(poolPublicKey: *) source

Params:

NameTypeAttributeDescription
poolPublicKey *

public validatePoolServers(poolServers: *) source

Params:

NameTypeAttributeDescription
poolServers *

public validatePoolWebsite(poolWebsite: *) source

Params:

NameTypeAttributeDescription
poolWebsite *

public validatePoolsDetails(poolName: *, poolFee: *, poolWebsite: *, poolAddress: *, poolPublicKey: *, poolServers: *, poolActivated: boolean, poolReferralFee: number): boolean source

Params:

NameTypeAttributeDescription
poolName *
poolFee *
poolWebsite *
poolAddress *
poolPublicKey *
poolServers *
poolActivated boolean
  • optional
  • default: false
poolReferralFee number
  • optional
  • default: 0

Return:

boolean