Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Version
- version :: Word8 -> Maybe Version
- unVersion :: Version -> Word8
- versionOp :: Version -> ScriptOp
- version0 :: Version
- data Program
- program :: Version -> ByteString -> Maybe Program
- programVersion :: Program -> Version
- programData :: Program -> ByteString
- renderProgram :: PrefixSegWit -> Program -> ByteString
- p2wpkh :: PubHash160 -> Program
- p2wsh :: ScriptSHA256 -> Program
Version
The version for of a SegWit Program
.
Programs
A SegWit program. Construct with program
.
:: Version | |
-> ByteString | Raw SegWit program bytes. |
-> Maybe Program | Nothing if program length is invalid for version. |
programVersion :: Program -> Version Source #
SegWit program version.
programData :: Program -> ByteString Source #
Raw SegWit program data.
renderProgram :: PrefixSegWit -> Program -> ByteString Source #
Bech32-encode a Program
.
Standard programs
p2wpkh :: PubHash160 -> Program Source #
Construct a standard SegWit version 0 P2WPKH program.
p2wsh :: ScriptSHA256 -> Program Source #
Construct a standard SegWit version 0 P2WSH program.