Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Show c => SpendCondition c where
- class SpendFulfillment f c where
- class ScriptPubKey c t where
- class SignatureScript c f t where
- newtype Pay2 a = Pay2 a
- newtype ScriptHash a = ScriptHash a
- data Cond = Cond
- type P2S = Pay2 Cond
- type P2SH = Pay2 (ScriptHash Cond)
- p2shScriptPubKey :: TxOutputScript a -> TxOutputScript b
- data PubkeyHash = PubkeyHash PubKey
- data SpendPKH = SpendPKH BtcSig
Documentation
class Show c => SpendCondition c where Source #
Script that defines a condition to spend
conditionScript :: c -> Script Source #
The script will, depending on transaction type, be placed either in output, input or witness of transaction
class SpendFulfillment f c where Source #
Script that can spend funds sent to conditionScript
signatureScript :: f -> c -> Script Source #
Script fulfilling conditionScript
rawSigs :: f -> c -> [(PubKey, BtcSig)] Source #
Return all pubkeys-and-signature pairs from "f" and "c". Used for signature verification.
class ScriptPubKey c t where Source #
Script we put in the output of a transaction
scriptPubKey :: c -> TxOutputScript t Source #
SpendCondition c => ScriptPubKey c P2SH Source # | |
SpendCondition c => ScriptPubKey c P2S Source # | |
class SignatureScript c f t where Source #
inputScript :: f -> c -> TxInputScript t Source #
The script we put inside a transaction input
witnessScript :: f -> c -> WitnessScript t Source #
The script we put inside a transaction witness
(SpendCondition c, SpendFulfillment f c) => SignatureScript c f P2SH Source # | |
SpendFulfillment f c => SignatureScript c f P2S Source # | |
SignatureScript PubkeyHash SpendPKH Void Source # | |
Pay to something
Pay2 a |
SpendCondition c => ScriptPubKey c P2SH Source # | |
SpendCondition c => ScriptPubKey c P2S Source # | |
(SpendCondition c, SpendFulfillment f c) => SignatureScript c f P2SH Source # | |
SpendFulfillment f c => SignatureScript c f P2S Source # | |
Eq a => Eq (Pay2 a) Source # | |
Show a => Show (Pay2 a) Source # | |
Generic (Pay2 a) Source # | |
ToJSON a => ToJSON (Pay2 a) Source # | |
FromJSON a => FromJSON (Pay2 a) Source # | |
Serialize a => Serialize (Pay2 a) Source # | |
NFData a => NFData (Pay2 a) Source # | |
type Rep (Pay2 a) Source # | |
newtype ScriptHash a Source #
Turns something into its SegWit counterpart newtype Witness a = Witness a deriving (Eq, Show, Typeable, Generic, JSON.ToJSON, JSON.FromJSON, Bin.Serialize, NFData)
Hash a SpendCondition
SpendCondition c => ScriptPubKey c P2SH Source # | |
(SpendCondition c, SpendFulfillment f c) => SignatureScript c f P2SH Source # | |
Eq a => Eq (ScriptHash a) Source # | |
Show a => Show (ScriptHash a) Source # | |
Generic (ScriptHash a) Source # | |
ToJSON a => ToJSON (ScriptHash a) Source # | |
FromJSON a => FromJSON (ScriptHash a) Source # | |
Serialize a => Serialize (ScriptHash a) Source # | |
NFData a => NFData (ScriptHash a) Source # | |
type Rep (ScriptHash a) Source # | |
Represents a SpendCondition
Eq Cond Source # | |
Show Cond Source # | |
Generic Cond Source # | |
ToJSON Cond Source # | |
FromJSON Cond Source # | |
Serialize Cond Source # | |
NFData Cond Source # | |
SpendCondition c => ScriptPubKey c P2SH Source # | |
SpendCondition c => ScriptPubKey c P2S Source # | |
(SpendCondition c, SpendFulfillment f c) => SignatureScript c f P2SH Source # | |
SpendFulfillment f c => SignatureScript c f P2S Source # | |
type Rep Cond Source # | |
p2shScriptPubKey :: TxOutputScript a -> TxOutputScript b Source #
data PubkeyHash Source #
PubkeyHash PubKey |