ChiaLisp Puzzles

raw JSON →
0.1.1 verified Fri May 01 auth: no python

A collection of canonical puzzles (smart contracts) for the Chia blockchain, written in ChiaLisp. Version 0.1.1 is the latest. Release cadence is low; primarily updated alongside Chia protocol changes.

pip install chialisp-puzzles
error ModuleNotFoundError: No module named 'chialisp_puzzles'
cause Package installed via pip with hyphens but imported with underscores - correct import path is with underscores.
fix
Use from chialisp_puzzles import ... (note underscores).
error AttributeError: module 'chialisp_puzzles' has no attribute 'load_puzzle'
cause The `load_puzzle` function may not be directly exposed in the top-level module in older versions.
fix
Use from chialisp_puzzles import load_puzzle (available from 0.1.0+).
gotcha The package uses underscores in import paths (chialisp_puzzles) but the PyPI name uses hyphens (chialisp-puzzles). This mismatch can cause confusion.
fix Use `pip install chialisp-puzzles` and then `import chialisp_puzzles`.
deprecated Some puzzles may be deprecated as the Chia protocol evolves. Always check the puzzle version against your Chia node version.
fix Refer to the official Chia documentation for the latest puzzle set.
gotcha Puzzle names may change between releases. Hardcoding puzzle names can break after updates.
fix Use `list_puzzles()` to enumerate available puzzles at runtime.

Load a canonical puzzle by name.

from chialisp_puzzles import load_puzzle

# Load the standard pay-to-puzzle-hash puzzle
puzzle = load_puzzle('p2_puzzle_hash')
print(puzzle)