Trying to build onchain guessing game using commit-reveal pattern pattern uses encryption, solidity example is

// Check the hash to ensure the commitment is correct
require(keccak256(abi.encodePacked(msg.sender, choice, blindingFactor)) == commitChoice.commitment, "invalid hash");

From previos stack exchange answers ı found that tezos doesnt have encryption in smart contracts. Instead using timeclock/chests.

the problem is how I can create a chest in client side ? only code I found is in OCaml

note: can't open approite tags due to low reputation


1 Answer 1


You have a few examples here : https://github.com/RomarQ/tezos-timelock#generate-chest-and-chest-key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.