Home Reference Source Test
public class | source

SmartPoolMiner

Extends:

ObservableMinerBasePoolMiner → SmartPoolMiner

Constructor Summary

Public Constructor
public

constructor(blockchain: BaseChain, accounts: Accounts, mempool: Mempool, time: Time, address: Address, deviceId: number, deviceData: object | null, extraData: Uint8Array)

Inherited Summary

From class Observable
public static get

WILDCARD: string: string

public

bubble(observable: Observable, types: ...string)

public

fire(type: string, args: ...*): Promise | null

public

off(type: string, id: number)

public

on(type: string, callback: Function): number

From class Miner
public get
public set
public get

extraData: Uint8Array

public set

extraData: Uint8Array

public get

hashrate: number

public get

numBlocksMined: number

public get
public set

shareCompact: number

public get

threads: number

public set

threads(threads: number)

public get

throttleAfter: number

public set

throttleAfter(throttleAfter: number)

public get

throttleWait: number

public set

throttleWait(throttleWait: number)

public get

working: boolean

public

async getNextBlock(address: Address, extraData: Uint8Array): Promise<Block>

public

async onWorkerShare(obj: {hash: Hash, nonce: number, block: Block})

public
public
protected

async _getNextBody(interlinkSize: number, address: Address, extraData: Uint8Array): BlockBody

protected

async _getNextHeader(nextTarget: BigNumber, interlink: BlockInterlink, body: BlockBody): Promise<BlockHeader>

protected

_getNextInterlink(nextTarget: BigNumber): Promise<BlockInterlink>

protected

_getNextTimestamp(): number

From class BasePoolMiner
public static

generateDeviceId(networkConfig: NetworkConfig): number

public get
public set
public get

host: string

public get

port: number

public

balance: *

public
public

connectionState: BasePoolMiner.ConnectionState

public

mode: BasePoolMiner.Mode

public
public

connect(host: *, port: *)

public
public

isConnected(): boolean

public

isDisconnected(): boolean

public

Public Constructors

public constructor(blockchain: BaseChain, accounts: Accounts, mempool: Mempool, time: Time, address: Address, deviceId: number, deviceData: object | null, extraData: Uint8Array) source

Override:

BasePoolMiner#constructor

Params:

NameTypeAttributeDescription
blockchain BaseChain
accounts Accounts
mempool Mempool
time Time
address Address
deviceId number
deviceData object | null
extraData Uint8Array
  • optional
  • default: new Uint8Array(0)