Make coordinator support P2TR scripts
MODIFY
WalletWasabi/Extensions/NBitcoinExtensions.cs
WalletWasabi/Extensions/NBitcoinExtensions.cs
@@ -478,6 +478,7 @@ public static class NBitcoinExtensions
scriptPubKey.GetScriptType() switch
{
ScriptType.P2WPKH => Constants.P2wpkhInputVirtualSize,
+ ScriptType.Taproot => Constants.P2trInputVirtualSize,
_ => throw new NotImplementedException($"Size estimation isn't implemented for provided script type.")
};

MODIFY
WalletWasabi/WabiSabi/Models/MultipartyTransaction/SigningState.cs
WalletWasabi/WabiSabi/Models/MultipartyTransaction/SigningState.cs
@@ -72,7 +72,8 @@ public record SigningState : MultipartyTransactionState
IndexedTxIn currentIndexedInput = cjCopy.Inputs.AsIndexedInputs().Skip(index).First();
// 6. Verify if currentIndexedInput is correctly signed, if not, return the specific error.
- if (!currentIndexedInput.VerifyScript(registeredCoin, out ScriptError error))
+ var precomputedTransactionData = cjCopy.PrecomputeTransactionData(SortedInputs.Select(x => x.TxOut).ToArray());
+ if (!currentIndexedInput.VerifyScript(registeredCoin, ScriptVerify.Standard, precomputedTransactionData, out ScriptError error))
{
throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.WrongCoinjoinSignature); // TODO keep script error
}

Make coordinator support P2TR scripts