Closed cgcardona closed 2 years ago
Also can we make the hashtype
argument optional and default to 0x01
? That way there could be 3 states.
// default to 0x01 SIGHASH_ALL for hashtype and 0x00 ECDSA for sigtype
.spend(alicePK, new Sig(aliceKP))
// default to 0x00 ECDSA for sigtype
.spend(alicePK, new Sig(aliceKP, 0x01))
// explicit
.spend(alicePK, new Sig(aliceKP, 0x01, 0x00))
Let's pair program when you get to this so that we can confirm the hashtype
and sigtype
hex values are correct in my comment above.
Primarily we want to add a 3rd sigtype
arg to the Sig
constructor. We also want to make the 2nd and 3rd args optional. Ensure the 2nd arg defaults to SIGHASH_ALL
and ensure the 3rd arg defaults to ECDSA
Since multisigs now also support Schnorr signatures, I'd prefer being opinionated and only allowing Schnorr until there's a very strong use case for providing ECDSA support in SignatureTemplate
.
Currently
Sig
defaults to Schnorr signatures which is causing a problem w/ MultiSig contracts. We need to default toECDSA
sigs and add an optional 3rdsignatureAlgorithms
argument to theSig
class. For example