You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a part of code in the signIdx function that searches for the public key of the signer in the witnessScript and throws an error if the public key is not found:
else{// only compressed keys are supported for nowconstpubKey=u.pubECDSA(privateKey);// TODO: replace with explicit checks// Check if script has public key or its has insidelethasPubkey=false;constpubKeyHash=u.hash160(pubKey);for(constiofScript.decode(inputType.lastScript)){if(isBytes(i)&&(P.equalBytes(i,pubKey)||P.equalBytes(i,pubKeyHash)))hasPubkey=true;}if(!hasPubkey)thrownewError(`Input script doesn't have pubKey: ${inputType.lastScript}`);
Is this check really necessary? I have a witnessScript that only contains addresses and opcodes. The subscripts are standard PayToAddr subscripts, so there are no public keys in them.
Would it be possible to have this check removed, since it prevents the signing process for no good reason?
For context my input is a wsh-unknown type. Since the unknown type script can be arbitrary, I don't see a reason why it has to contain the public key of the signer.
The text was updated successfully, but these errors were encountered:
There is a part of code in the
signIdx
function that searches for the public key of the signer in thewitnessScript
and throws an error if the public key is not found:Is this check really necessary? I have a
witnessScript
that only contains addresses and opcodes. The subscripts are standard PayToAddr subscripts, so there are no public keys in them.Would it be possible to have this check removed, since it prevents the signing process for no good reason?
For context my input is a
wsh-unknown
type. Since the unknown type script can be arbitrary, I don't see a reason why it has to contain the public key of the signer.The text was updated successfully, but these errors were encountered: