chia-blockchain/chia/wallet/puzzles/p2_delegated_puzzle.clvm

20 lines
478 B
Plaintext

(mod
(public_key delegated_puzzle delegated_puzzle_solution)
(include condition_codes.clvm)
;; hash a tree
;; This is used to calculate a puzzle hash given a puzzle program.
(defun sha256tree1
(TREE)
(if (l TREE)
(sha256 2 (sha256tree1 (f TREE)) (sha256tree1 (r TREE)))
(sha256 1 TREE)
)
)
(c (list AGG_SIG_ME public_key (sha256tree1 delegated_puzzle))
(a delegated_puzzle delegated_puzzle_solution))
)