Copyright | No rights reserved |
---|---|
License | MIT |
Maintainer | jprupp@protonmail.ch |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Code related to transactions parsing and serialization.
Synopsis
- data Tx = Tx {
- txVersion :: !Word32
- txIn :: ![TxIn]
- txOut :: ![TxOut]
- txWitness :: !WitnessData
- txLockTime :: !Word32
- data TxIn = TxIn {
- prevOutput :: !OutPoint
- scriptInput :: !ByteString
- txInSequence :: !Word32
- data TxOut = TxOut {
- outValue :: !Word64
- scriptOutput :: !ByteString
- data OutPoint = OutPoint {
- outPointHash :: !TxHash
- outPointIndex :: !Word32
- newtype TxHash = TxHash {}
- type WitnessData = [WitnessStack]
- type WitnessStack = [WitnessStackItem]
- type WitnessStackItem = ByteString
- txHash :: Tx -> TxHash
- hexToTxHash :: Text -> Maybe TxHash
- txHashToHex :: TxHash -> Text
- nosigTxHash :: Tx -> TxHash
- nullOutPoint :: OutPoint
Transactions
Data type representing a transaction.
Tx | |
|
Instances
Data type representing a transaction input.
TxIn | |
|
Instances
Data type representing a transaction output.
TxOut | |
|
Instances
The OutPoint
refers to a transaction output being spent.
OutPoint | |
|
Instances
Transaction id: hash of transaction excluding witness data.
Instances
FromJSON TxHash Source # | |
Defined in Haskoin.Transaction.Common parseJSON :: Value -> Parser TxHash parseJSONList :: Value -> Parser [TxHash] | |
ToJSON TxHash Source # | |
Defined in Haskoin.Transaction.Common toEncoding :: TxHash -> Encoding toJSONList :: [TxHash] -> Value toEncodingList :: [TxHash] -> Encoding | |
IsString TxHash Source # | |
Defined in Haskoin.Transaction.Common fromString :: String -> TxHash # | |
Generic TxHash Source # | |
Read TxHash Source # | |
Show TxHash Source # | |
Binary TxHash Source # | |
Serial TxHash Source # | |
Defined in Haskoin.Transaction.Common serialize :: MonadPut m => TxHash -> m () deserialize :: MonadGet m => m TxHash | |
Serialize TxHash Source # | |
Defined in Haskoin.Transaction.Common | |
NFData TxHash Source # | |
Defined in Haskoin.Transaction.Common | |
Eq TxHash Source # | |
Ord TxHash Source # | |
Hashable TxHash Source # | |
Defined in Haskoin.Transaction.Common | |
type Rep TxHash Source # | |
Defined in Haskoin.Transaction.Common |
type WitnessData = [WitnessStack] Source #
Witness stack for SegWit transactions.
type WitnessStack = [WitnessStackItem] Source #
Witness stack for SegWit transactions.
type WitnessStackItem = ByteString Source #
Witness stack item for SegWit transactions.
hexToTxHash :: Text -> Maybe TxHash Source #
Convert transaction hash from hex, reversing bytes.
txHashToHex :: TxHash -> Text Source #
Convert transaction hash to hex form, reversing bytes.
nosigTxHash :: Tx -> TxHash Source #
Transaction hash excluding signatures.
nullOutPoint :: OutPoint Source #
Outpoint used in coinbase transactions.