๐ A blazingly fast, parallel Capjs proof-of-work solver implemented in Rust
- ๐ฏ Single Challenge Solving: Solve individual proof-of-work challenges with precision
- ๐ฆ Batch Processing: Generate and solve thousands of challenges in parallel
- ๐ง JSON Support: Import/export challenges in structured JSON format
- ๐งต Multi-threading: Configurable worker threads for maximum CPU utilization
- ๐ Progress Tracking: Beautiful progress bars with ETA for long operations
- ๐จ Flexible Output: Choose between plain text, JSON, or pretty-printed formats
- โก Zero-Copy Operations: Optimized buffer operations for maximum performance
- ๐ SHA-256 Hashing: Industry-standard cryptographic hashing
git clone https://github.com/liuzhen9320/capjs-cli.git
cd capjs-cli
cargo install --path .Download the latest release from our GitHub Releases page.
# Basic usage
pow-solver single --salt "a5b6fda4aaed97cf61d7dd9259f733b5" --target "d455"
# Output:
# Salt: a5b6fda4aaed97cf61d7dd9259f733b5
# Target: d455
# Nonce: 67302
# Duration: 371.226518 ms# Standard web page validation. The data here can be obtained from the http://API_HOST/API_KEY/challenge endpoint
pow-solver multi -c 50 -d 4 -s 32 -t 4097a4371e6852602a1b7d91bd4eccf5e356365756fef135b9
# More scientific, using JSON output for easier parsing
pow-solver multi -c 50 -d 4 -s 32 -t 4097a4371e6852602a1b7d91bd4eccf5e356365756fef135b9 -o jsonChallenge 0: salt=a1b2c3, target=000012, nonce=87654, duration=0.234s
Challenge 1: salt=d4e5f6, target=000034, nonce=12345, duration=0.456s
[
{
"challenge_index": 0,
"salt": "a1b2c3",
"target": "000012",
"nonce": 87654,
"duration": 0.234
}
][
{
"challenge_index": 0,
"salt": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"target": "000012",
"nonce": 87654,
"duration": 0.234
}
]| Flag | Description | Example |
|---|---|---|
-s, --salt |
Salt string for hashing | --salt "mysalt123" |
-t, --target |
Target hex prefix | --target "00000a" |
| Flag | Default | Description |
|---|---|---|
-t, --challenge |
Required | Seed token for generation |
-c, --count |
1 |
Number of challenges |
-s, --salt-length |
32 |
Generated salt length |
-d, --target-length |
6 |
Target difficulty length |
-w, --workers |
0 |
Worker threads (0=auto) |
-o, --output |
plain |
Output format |
| Flag | Default | Description |
|---|---|---|
-i, --input |
Required | JSON challenge array |
-w, --workers |
0 |
Worker threads (0=auto) |
Understanding target difficulty:
| Length | Avg Attempts | Difficulty | Use Case |
|---|---|---|---|
| 3 | ~4K | ๐ข Easy | Development/Testing |
| 4 | ~65K | ๐ก Medium | Small-scale mining |
| 5 | ~1M | ๐ Hard | Production use |
| 6 | ~16M | ๐ด Very Hard | High security |
| 7 | ~268M | โซ Extreme | Enterprise/Research |
๐ก Tip: Each additional hex character increases difficulty by ~16x
We welcome contributions!
- ๐ Check existing issues
- ๐ Create a detailed bug report
- ๐ท๏ธ Add appropriate labels
- ๐ญ Open an issue with the "enhancement" label
- ๐ Describe the use case and benefits
- ๐ค Discuss implementation approaches
- Source: https://github.com/tiagozip/cap
- License: Apache License 2.0
This project uses this library and complies with the requirements of the Apache-2.0 license. The full license text is included in the appendix.