Skip to main content

Perform Proof of Work

You can perform Proof of Work(POW) operations using the following functions :

You will need to provide a block and a targetScore to any of these functions. If successful, they will return nonce.

Example Code

stardust/packages/iota/examples/pow/src/index.ts
loading...

Expected Output


Neon Pow
Target Score 100
Data Length 500
Iterations 1
Iteration 1
Nonce 173109
Score 118.098
Average Time (s) 0.62

Node Pow
Target Score 100
Data Length 500
Iterations 1
Iteration 1
Nonce 173109
Score 118.098
Average Time (s) 27.11

Wasm Pow
Target Score 100
Data Length 500
Iterations 1
Iteration 1
Nonce 173109
Score 118.098
Average Time (s) 25.42

Local Pow
Target Score 100
Data Length 500
Iterations 1
Iteration 1
Nonce 173109
Score 118.098
Average Time (s) 24.54

Done