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

19 lines
400 B
Plaintext

(mod
(public_key conditions)
(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 conditions)) conditions)
)