module CCL::Pow

Overview

A Bitcoin style Proof of Work library for Crystal Mostly inspired by @aantonop's proof of work example https://github.com/bitcoinbook/bitcoinbook/blob/develop/code/proof-of-work-example.py

Extended Modules

Defined in:

ccl-pow.cr

Instance Method Summary

Instance Method Detail

def mine(difficulty nbits : String, for input_data : InputData) : Work #

Returns the nonce and the hash found for the given data input and difficulty

CCL::Pow.mine(difficulty: "1d00ffff", for: "my_blockchain_data")

[View source]