bitcoin-tx-0.11.0: Utility functions for manipulating bitcoin transactions

Safe HaskellNone
LanguageHaskell2010

Data.Bitcoin.Transaction

Synopsis

Documentation

decode :: ByteString -> Transaction Source

Decodes a hex representation of a transaction into a Transaction object.

encode :: Transaction -> ByteString Source

Encodes a Transaction object into a hex representation.

data Transaction Source

Data type representing a bitcoin transaction

Constructors

Transaction 

Fields

txVersion :: Word32

Transaction data format version

txIn :: [TransactionIn]

List of transaction inputs

txOut :: [TransactionOut]

List of transaction outputs

txLockTime :: Word32

The block number of timestamp at which this transaction is locked

data TransactionIn Source

Data type representing a transaction input.

Constructors

TransactionIn 

Fields

prevOutput :: OutPoint

Reference the previous transaction output (hash + position)

scriptInput :: Script

Script providing the requirements of the previous transaction output to spend those coins.

txInSequence :: Word32

Transaction version as defined by the sender of the transaction. The intended use is for replacing transactions with new information before the transaction is included in a block.

data TransactionOut Source

Data type representing a transaction output.

Constructors

TransactionOut 

Fields

outValue :: Word64

Transaction output value.

scriptOutput :: Script

Script specifying the conditions to spend this output.