Why use P2SH?

So why Pay to Script Hash instead of just pay to a script? By providing a hash of the script to the customer, the vendor offloads the complicated task of having to compose a bitcoin script to himself.

This is particularly helpful from a vendor-customer standpoint, where the vendor is the recipient of bitcoin, and the customer is the sender.

Let’s say a vendor wants to receive money and use complicated features such as multisignature, they don’t want to burden their customers by forcing them to write complicated scripts just to make a transaction.

Therefore, all P2SH requires is for sender to use only hash of the script to compose a locking script.

The customer doesn’t care what the script actually is — all they care about is getting their goods.

It’s up to the vendor that they write the correct output script so that they and ONLY they are able to redeem that output.

It also makes sense that the customer shouldn’t need to know anything about how the vendor holds their funds in order to be able to easily send them money.

Pay to Script Hash was an update to Bitcoin back in 2012, and since then has been one of the most important improvements to Bitcoin since Bitcoin’s inception.

Multisignature