| Copyright | No rights reserved |
|---|---|
| License | MIT |
| Maintainer | jprupp@protonmail.ch |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Haskoin.Transaction.Common
Contents
Description
Code related to transactions parsing and serialization.
Synopsis
- data Tx = Tx {}
- data TxIn = TxIn {}
- data TxOut = TxOut {
- value :: !Word64
- script :: !ByteString
- data OutPoint = OutPoint {}
- 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.
Constructors
| Tx | |
Instances
Data type representing a transaction input.
Constructors
| TxIn | |
Instances
Data type representing a transaction output.
Constructors
| TxOut | |
Fields
| |
Instances
The OutPoint refers to a transaction output being spent.
Constructors
| OutPoint | |
Instances
Transaction id: hash of transaction excluding witness data.
Instances
| FromJSON TxHash Source # | |
Defined in Haskoin.Transaction.Common | |
| ToJSON TxHash Source # | |
Defined in Haskoin.Transaction.Common Methods toEncoding :: TxHash -> Encoding toJSONList :: [TxHash] -> Value toEncodingList :: [TxHash] -> Encoding | |
| IsString TxHash Source # | |
Defined in Haskoin.Transaction.Common Methods fromString :: String -> TxHash # | |
| Generic TxHash Source # | |
| Read TxHash Source # | |
| Show TxHash Source # | |
| Binary TxHash Source # | |
| Serial TxHash Source # | |
Defined in Haskoin.Transaction.Common | |
| 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.
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.