SIGHASH_ANYPREVOUT, or
BIP-118
(previously named SIGHASH_NOINPUT), is a soft-fork that allows a
transaction to be signed without reference to any specific previous output,
such that any output with a matching signature can be dynamically added later.
Use Cases
There are two main super-powerful things you can do with BIP-118 that you
cannot do otherwise:
As an off-chain value transfer mechanism in itself, used to transfer
large values as single, unbroken UTXOs (with change being given with
statechains of smaller denominations or through other means).
To open Lightning channels on top of these UTXOs. And then these
channels can be used or transferred to others without the chain
being touched.
To do any fancy thing that involves UTXO ownership (Ordinals
or DLCs, for
example), but off-chain.
Statechains and even
Lightning on top of statechains
are already implemented by the
Mercury Wallet, but using a
much worse set of tradeoffs (which are ready to be swapped for the
improved Eltoo-based version when that is available).
Covenants, a way to make sure
one transaction can only be spent by an specific other can be
achieved using
this secret little trick
that embeds the signature for transaction t+1 right inside the
output of transaction t.
These covenants enable very important things such as:
A chain for all kinds of assets issued by entities or individuals;
A DNS chain that solves Zooko's triangle without needing an altcoin;
A chain that executes Ethereum-like smart-contracts;
A chain with BTC IOU tokens in it, guaranteed by an entity, by
hashrate escrows, some magical zero-knowledge proof system or some
other complex mechanism yet to be invented;
A chain with all of the above;
All without burdening Bitcoin users and at the same time paying fees to
miners who don't even have to be aware these things exist.
Have the benefits and tradeoffs of the
change explained in clear form and acknowledged by anyone who may be
interested (this website is an attempt at this).
(Who knows what has to happen for something to be soft-forked in, but let's
hope at this point
miners will push for it themselves
so it won't take 2 years.)