ccl-pow

Version, currently 0.1.32 versions

github.com/cocol-project/ccl-pow

Bitcoin style Proof of Work library in Crystal

3 stars
1 dependent
License: MPL-2.0

Installation

# Add this to your shard.yml
dependencies:
  ccl-pow:
    github: cocol-project/ccl-pow
    version: ~> 0.1.3

Then run:

shards install

shard.yml

Crystal
0.33.0
License
MPL-2.0
Author
Cristian Șerb
Target
  • pow from src/ccl-pow.cr

Dependencies

Development Dependencies

  • icr*github: crystal-community/icr, branch: masterdev
  • minitest*github: ysbaddaden/minitest.crdev

README

Cocol Proof of Work

Build Status

Bitcoin style Proof of Work lib written in Crystal

Docs: https://cocol-project.github.io/ccl-pow

Installation

  1. Add the dependency to your shard.yml:
dependencies:
  btcpow:
    github: cocol-project/ccl-pow
  1. Run shards install

Usage

require "ccl-pow"

Mining

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

Calculate target based on difficulty bits

CCL::Pow::Utils.calculate_target(from: "1d00ffff")

Contributing

  1. Fork it (https://github.com/cocol-project/ccl-pow/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors