View Source BitcoinLib.Script.Analyzer (BitcoinLib v0.4.3)

Based on that table https://i.stack.imgur.com/iXfVX.png

useful links:

Link to this section Summary

Functions

Identify a script in either binary or opcode list forms

Link to this section Functions

@spec identify(binary() | list()) ::
  {:p2pk | :p2pkh | :p2wpkh | :p2sh | :p2wsh, bitstring()}

Identify a script in either binary or opcode list forms

examples

Examples

iex> <<0x4104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC::536>>
...> |> BitcoinLib.Script.Analyzer.identify()
{:p2pk, <<0x04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f::520>>}