| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Bitcoin.Address.Script
Contents
Description
This module exports standard Bitcoin Script constructions.
Scripts
p2pkh :: PubHash160 -> Script Source #
Standard P2PKH script.
- pubh
PubHash160.
Script:
OP_DUPOP_HASH160OP_PUSHDATApubhOPCODEOP_EQUALVERIFYOP_CHECKSIG
p2sh :: ScriptHash160 -> Script Source #
segWit :: Program -> Script Source #
Standard SegWit Program script.
- ver
- SegWit
versionOp - prog
- SegWit
programData
Script:
verOP_PUSHDATAprogOPCODE
Arguments
| :: [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
Public keys given in range [OP_1…OP_16] - pubs
- Compressed SEC representation the given
Public keys, each one (pub) encoded as.OP_PUSHDATA(pubCompressedpub)OPCODE
Script:
m
pubs
n
OP_CHECKMULTISIG