Home Reference Source
public class | source

MinerProtocol

Extends:

common/mining-pools/common/Pool-Protocol-List~PoolProtocolList → MinerProtocol

Constructor Summary

Public Constructor
public

constructor(poolData: *)

Member Summary

Public Members
public
public

list: *

public
public

Method Summary

Public Methods
public

async askWalletMining(poolSocket: *): {"result": *, "message": *}

public

async changeWalletMining(poolSocket: *, newAddress: *, oldAddress: *): boolean

public

async getReferralData(poolSocket: *): {"result": *}

public

async insertServersListWaitlist(serversListArray: *): *

public

async pushWork(miningAnswer: *, poolSocket: *): boolean

public

async requestWork(): boolean

Private Methods
private
private

async _sendPoolHello(socket: *): boolean

private
private
private

async _subscribeMiner(nodesListObject: *): boolean

private

_unsubscribeMiner(nodesListObject: *)

private
private

_validateRequestWork(work: *, socket: *)

Public Constructors

public constructor(poolData: *) source

Params:

NameTypeAttributeDescription
poolData *

should contain connectivity information

Public Members

public connectedPools: *[] source

public list: * source

public loaded: boolean source

public minerPoolManagement: * source

Public Methods

public async askWalletMining(poolSocket: *): {"result": *, "message": *} source

Params:

NameTypeAttributeDescription
poolSocket *

Return:

{"result": *, "message": *}

public async changeWalletMining(poolSocket: *, newAddress: *, oldAddress: *): boolean source

Params:

NameTypeAttributeDescription
poolSocket *
newAddress *
oldAddress *

Return:

boolean

public async getReferralData(poolSocket: *): {"result": *} source

Params:

NameTypeAttributeDescription
poolSocket *

Return:

{"result": *}

public async insertServersListWaitlist(serversListArray: *): * source

Params:

NameTypeAttributeDescription
serversListArray *

Return:

*

public async pushWork(miningAnswer: *, poolSocket: *): boolean source

Params:

NameTypeAttributeDescription
miningAnswer *
poolSocket *

Return:

boolean

public async requestWork(): boolean source

Return:

boolean

Private Methods

private async _connectionEstablishedWithPool(socket: *) source

Params:

NameTypeAttributeDescription
socket *

private async _sendPoolHello(socket: *): boolean source

Params:

NameTypeAttributeDescription
socket *

Return:

boolean

private async _startMinerProtocol(): boolean source

Return:

boolean

private async _stopMinerProtocol() source

private async _subscribeMiner(nodesListObject: *): boolean source

Params:

NameTypeAttributeDescription
nodesListObject *

Return:

boolean

private _unsubscribeMiner(nodesListObject: *) source

Params:

NameTypeAttributeDescription
nodesListObject *

private _updateStatistics(data: *) source

Params:

NameTypeAttributeDescription
data *

private _validateRequestWork(work: *, socket: *) source

Params:

NameTypeAttributeDescription
work *
socket *