Skip to main content

Class: NodePowProvider

Node POW Provider.

Implements

  • IPowProvider

Table of contents

Constructors

Methods

Constructors

constructor

new NodePowProvider(numCpus?)

Create a new instance of NodePowProvider.

Parameters

NameTypeDescription
numCpus?numberThe number of cpus, defaults to max CPUs.

Methods

pow

pow(message, targetScore): Promise<string>

Perform pow on the message and return the nonce of at least targetScore.

Parameters

NameTypeDescription
messageUint8ArrayThe message to process.
targetScorenumberThe target score.

Returns

Promise<string>

The nonce.

Implementation of

IPowProvider.pow