Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module exports standard Bitcoin Script
constructions.
Scripts
p2pkh :: PubHash160 -> Script Source #
Standard P2PKH
script.
- pubh
PubHash160
.
Script:
OP_DUP
OP_HASH160
OP_PUSHDATA
pubhOPCODE
OP_EQUALVERIFY
OP_CHECKSIG
p2sh :: ScriptHash160 -> Script Source #
segWit :: Program -> Script Source #
Standard SegWit Program
script.
- ver
- SegWit
versionOp
- prog
- SegWit
programData
Script:
verOP_PUSHDATA
progOPCODE
:: [Pub] | Public keys. Total number in range [1 … 16] |
-> Int | Required number of signatures in range [1, 16]. |
-> Maybe Script |
|
Standard “m-of-n” multi-signature script.
- m
- Number of required signatures in range [
OP_1
…OP_16
] - n
- Number of
Pub
lic keys given in range [OP_1
…OP_16
] - pubs
- Compressed SEC representation the given
Pub
lic keys, each one (pub
) encoded as
.OP_PUSHDATA
(pubCompressed
pub)OPCODE
Script:
m
pubs
n
OP_CHECKMULTISIG