private uint256 GetExpectedHash(PSBT psbt, Coin[] coins)
 {
     psbt = psbt.Clone();
     psbt.AddCoins(coins);
     if (!psbt.TryGetFinalizedHash(out var hash))
     {
         throw new InvalidOperationException("Unable to get the finalized hash");
     }
     return(hash);
 }