@compiler >= 8
include "String.aes"
contract SigProbe =
entrypoint init() = ()
entrypoint digest(ct : address, order_id : string, fill_id : string, to : address, amount : int, deadline : int) : hash =
String.blake2b(String.concats(["xchange-escrow-v2:release:", Address.to_str(ct), ":", order_id, ":", fill_id, ":", Address.to_str(to), ":", Int.to_str(amount), ":", Int.to_str(deadline)]))
entrypoint check(h : hash, who : address, sig : signature) : bool =
Crypto.verify_sig(h, who, sig)