Safe Haskell | None |
---|---|
Language | Haskell2010 |
- decode :: HexString -> Block
- encode :: Block -> HexString
- headerHash :: Block -> HexString
- data Block = Block {}
- data BlockHeader = BlockHeader {}
Documentation
:: HexString | The hexadecimal representation of the transaction |
-> Block | The decoded |
Decodes a hex representation of a transaction into a Block
object.
:: Block | The |
-> HexString | The hexadecimal representation of the transaction |
Encodes a Block
object into a hex representation.
headerHash :: Block -> HexString Source
Calculates the transaction id of a Transaction
as a HexString
so it
can be used in RPC interfaces.
Data type describing a block in the bitcoin protocol.
Block | |
|
data BlockHeader Source
Data type recording information on a Block
. The hash of a block is
defined as the hash of this data structure. The block mining process
involves finding a partial hash collision by varying the nonce in the
BlockHeader
and/or additional randomness in the Coinbase
of this
Block
. Variations in the Coinbase
will result in different merkle
roots in the BlockHeader
.
BlockHeader | |
|