Definition
SIGHASH_ANYONECANPAY is a modifier flag (value 0x80) that, when OR-ed with one of the three base SIGHASH modes, restricts a signature to cover only the single input it is spending. Every other input is left unsigned, which means anyone can append additional inputs to the transaction without invalidating the existing signature. The name is literal: anyone can contribute funds.
How It Changes Coverage
Normally a signature commits to the full input set, so adding an input breaks every prior signature. With ANYONECANPAY set, the signing logic resizes the committed input vector down to just the current input. The flag does not alter how outputs are handled, so it composes with SIGHASH_ALL, SIGHASH_NONE, or SIGHASH_SINGLE to control the output side independently.
Why It Matters
This flag is the building block for collaborative funding. Crowdfunding-style assurance contracts let many participants each sign one input toward a shared output set; the transaction only becomes valid once enough inputs accumulate. It also enables transaction batching and certain fee-bumping designs where a third party adds an input to cover fees. Care is required, however: because the rest of the input set is open, a malicious party can sometimes pin or reshape a partial transaction in unexpected ways.
This modifier is one option within the broader set of SIGHASH Flags, and the same flexibility carries forward into Schnorr-based spends covered under the Schnorr signature entry.
In Simple Terms
SIGHASH_ANYONECANPAY is a modifier flag (value 0x80) that, when OR-ed with one of the three base SIGHASH modes, restricts a signature to cover only the…
