Home Reference Source
public class | source

Blockchain

You can directly use an instance of this class. blockchain

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

Agent: *

public
public

Chain: *

public
public

Mining: *

public
public
public
public
public

Wallet: *

public
public get
public get

loaded: *

public set
public
public
public
public get
public set
public get
public set
public get
Private Members
private
private
private
private
private
private
private
private
private

Method Summary

Public Methods
public

async createBlockchain(agentName: *, beforeBlockchainLoadCallback: *, afterBlockchainLoadCallback: *, afterSynchronizationCallback: *, synchronize: boolean)

public
public

async initializeBlockchain(beforeBlockchainLoadCallback: *, afterBlockchainLoadCallback: *, afterSynchronizationCallback: *, synchronize: boolean)

public

async loadWallet()

public

async startMining()

public
public

async synchronizeBlockchain(firstTime: *, synchronizeComplete: boolean): Promise<void>

it tries synchronizing multiple times

Private Methods
private
private

Public Constructors

public constructor() source

Public Members

public AccountantTree: * source

public Agent: * source

public Balances: * source

public Chain: * source

public MinerPoolManagement: * source

public Mining: * source

public PoolManagement: * source

public ServerPoolManagement: * source

public SoloMining: * source

public Transactions: * source

public Wallet: * source

public blockchain: * source

public get isPoolActivated: * source

public get loaded: * source

public set loaded source

public onLoaded: * source

public onPoolsCreated: * source

public onPoolsInitialized: * source

public get poolsLoaded: * source

public set startMiningNextTimeSynchronized source

public get synchronized: * source

public set synchronized source

public get versionCompatibility: * source

Private Members

private _blockchainInitiated: boolean source

private _loaded: boolean source

private _onLoadedResolver: * source

private _onPoolsCreatedResolver: * source

private _onPoolsInitializedResolver: * source

private _poolsLoaded: boolean source

private _startMiningNextTimeSynchronized: boolean source

private _synchronized: * source

private _walletLoaded: boolean source

Public Methods

public async createBlockchain(agentName: *, beforeBlockchainLoadCallback: *, afterBlockchainLoadCallback: *, afterSynchronizationCallback: *, synchronize: boolean) source

Params:

NameTypeAttributeDescription
agentName *
beforeBlockchainLoadCallback *
afterBlockchainLoadCallback *
afterSynchronizationCallback *
synchronize boolean
  • optional
  • default: true

public async createMiningPools() source

public async initializeBlockchain(beforeBlockchainLoadCallback: *, afterBlockchainLoadCallback: *, afterSynchronizationCallback: *, synchronize: boolean) source

Params:

NameTypeAttributeDescription
beforeBlockchainLoadCallback *
afterBlockchainLoadCallback *
afterSynchronizationCallback *
synchronize boolean
  • optional
  • default: true

public async loadWallet() source

public async startMining() source

public async startMiningInstantly() source

public async synchronizeBlockchain(firstTime: *, synchronizeComplete: boolean): Promise<void> source

it tries synchronizing multiple times

Params:

NameTypeAttributeDescription
firstTime *
synchronizeComplete boolean
  • optional
  • default: false

Return:

Promise<void>

Private Methods

private async _initializeMiningPools() source

private async _startMiningPools() source