Home Reference Source
public class | source

MiniBlockchainMining

Extends:

InterfaceBlockchainMiningBasicInterfaceBlockchainMining → MiniBlockchainMining

Method Summary

Private Methods
private

Inherited Summary

From class InterfaceBlockchainMiningBasic
public get
public set
public get
public set
public get
public
public
public
public
public
public
private
private
private
private
private
private
private
public

async loadMinerAddress(defaultAddress: *, Wallet: *): boolean

public

async mineNextBlock(suspend: *)

public
public

async saveMinerAddress(minerAddress: *): boolean

public

async startMining()

public
private
private

_setAddress(newAddress: *, save: boolean): *

private
From class InterfaceBlockchainMining
public
public
public

block: *

public
public
public
private
public

calculateHash(nonce: *): *

public

async getNextBlock(): *

public

async mine(block: *, difficulty: *): Promise<boolean>

Simple Mining with no Workers

public

async mineBlock(block: *, difficulty: *)

Mine a specific Block

public

async mineNextBlock(suspend: *)

mine next block

private

async _mineNonces(start: *, end: *): {"result": *, "hash": *, "nonce": *}

private

Private Methods

private _simulatedNextBlockMining(nextBlock: *): boolean source

Override:

InterfaceBlockchainMining#_simulatedNextBlockMining

Params:

NameTypeAttributeDescription
nextBlock *

Return:

boolean