Open
Description
Currently the CashScript docs do not have any info on how to restrict the sighash flag used by signer with a covenant
Hashtype value is last byte of the sig
so you could do something like
function example(sig userSig){
bytes userSighashFlag = userSig.split(63)[1];
// SIGHASH_UTXOS = 0x20
require(userSighashFlag == 0x20);
}
I think the above is actually acceptably clear as code, but we'd need more info in the docs about when it make sense to restrict the sighash types and maybe extra explanation about how they work