bitcoin-script-0.10.0: Compilation, manipulation and decompilation of Bitcoin scripts

Safe HaskellNone
LanguageHaskell2010

Network.Bitcoin.Script

Synopsis

Documentation

decode :: ByteString -> Script Source

Decodes a hex representation of a script into a Script object.

encode :: Script -> ByteString Source

Encodes a Script object into a hex representation

data Script Source

Data type representing a transaction script. Scripts are defined as lists of script operators ScriptOp. Scripts are used to:

  • Define the spending conditions in the output of a transaction
  • Provide the spending signatures in the input of a transaction

Constructors

Script 

Fields

scriptOps :: ![ScriptOp]

List of script operators defining this script

data PushDataType Source

Data type representing the type of an OP_PUSHDATA opcode.

Constructors

OPCODE

The next opcode bytes is data to be pushed onto the stack

OPDATA1

The next byte contains the number of bytes to be pushed onto the stack

OPDATA2

The next two bytes contains the number of bytes to be pushed onto the stack

OPDATA4

The next four bytes contains the number of bytes to be pushed onto the stack