Skip to main content

ScriptHashableTag

Trait ScriptHashableTag 

Source
pub trait ScriptHashableTag: Sealed { }
Expand description

Either a redeem script or a Segwit version 0 scriptpubkey.

In the case of P2SH-wrapped Segwit version outputs, we take a Segwit scriptPubKey and put it in a redeem script slot. The Bitcoin script interpreter has special logic to handle this case, which is reflected in our API in several methods relating to P2SH and signature hashing. These methods take either a normal P2SH redeem script, or a Segwit version 0 scriptpubkey.

Segwit version 1 (Taproot) and higher do not support P2SH-wrapping, and such scriptPubKeys should not be used with this trait.

Implementors§