Bitcoin Covenants Part 3: SIGHASH_ANYPREVOUT

Summary

SIGHASH_ANYPREVOUT (BIP 118) is a proposed soft-fork extension to Taproot signatures that removes the outpoint commitment from the signature digest. Unlike existing SIGHASH modes, it lets one signature authorize multiple compatible UTXOs instead of a single exact UTXO. The main variants are ANYPREVOUT, which still commits to the previous output’s amount, scriptPubKey, and nSequence, and ANYPREVOUTANYSCRIPT, which also omits the previous script and amount. This makes signatures reusable for layer-2 and pre-signed transaction designs, but it does not add recursive covenants or transaction introspection. For covenant-style use, ANYPREVOUT is more relevant because it keeps the locking script binding, while ANYPREVOUTANYSCRIPT is looser. The main tradeoff is replay risk: a signature can be reused on another matching UTXO if protocol designers do not carefully constrain amounts, scripts, and transaction structure.