#puzzle #hash #primitive #wallet #chik #collection #bindings

chik-puzzles

Chik primitives needed for building wallets

8 breaking releases

0.20.1 Feb 6, 2025
0.17.0 Feb 6, 2025
0.10.0 Jul 11, 2024

#16 in #chik

Download history 3/week @ 2024-11-14 8/week @ 2024-11-21 3/week @ 2024-11-28 7/week @ 2024-12-05 11/week @ 2024-12-12 280/week @ 2025-01-30 666/week @ 2025-02-06 101/week @ 2025-02-13 149/week @ 2025-02-20 74/week @ 2025-02-27

1,105 downloads per month
Used in 13 crates (7 directly)

Apache-2.0

375KB
960 lines

Chik Puzzles

This is a collection of the standard Chik puzzles. These are the puzzles which are deployed on chain and therefore cannot change.

This repository tracks the source code, the compiled hex, and a hash of the compiled hex to ensure continuity.

All puzzles are kept in the puzzles folder as both a .clsp and .clsp.hex file.

The Python and Rust bindings are created by running generate_chiklisp_constants.py

Adding Bindings for a New Puzzle

  1. Add the .clsp and .clsp.hex files into the programs folder.
  2. Add the puzzle name, path, and shatree hash into the list in generate_chiklisp_constants.py.
  3. Run generate_chiklisp_constants.py.
  4. Commit your changes, including to the outputted programs.py and programs.rs.

Testing

This project is managed with poetry for Python and cargo for Rust.

To run the Python tests:

python -m venv venv

pip install poetry
. ./venv/bin/activate
poetry install
pytest chik_puzzles_py/tests

If you're on Windows activate the venv with . venv\Scripts\activate instead

To run the Rust tests:

cargo test --all

Dependencies