bitcoin-address-0.1.2: Bitcoin address generation and rendering. Parsing coming soon.
Safe HaskellNone
LanguageHaskell2010

Bitcoin.Address.Script

Contents

Description

This module exports standard Bitcoin Script constructions.

Synopsis

Scripts

segWit :: Program -> Script Source #

Standard SegWit Program script.

ver
SegWit versionOp
prog
SegWit programData

Script:

ver
OP_PUSHDATA prog OPCODE

multiSig Source #

Arguments

:: [Pub]

Public keys. Total number in range [1 … 16]

-> Int

Required number of signatures in range [1, 16].

-> Maybe Script

Nothing if any of the inputs is invalid.

Standard “m-of-n” multi-signature script.

m
Number of required signatures in range [OP_1OP_16]
n
Number of Public keys given in range [OP_1OP_16]
pubs
Compressed SEC representation the given Public keys, each one (pub) encoded as OP_PUSHDATA (pubCompressed pub) OPCODE.

Script:

m
pubs
n
OP_CHECKMULTISIG