Safe Haskell | None |
---|---|
Language | Haskell98 |
Network.Haskoin.Test
Contents
Description
This package provides test types for Network.Haskoin
- data ArbitraryByteString = ArbitraryByteString ByteString
- data ArbitraryNotNullByteString = ArbitraryNotNullByteString ByteString
- newtype ArbitraryUTCTime = ArbitraryUTCTime UTCTime
- newtype ArbitraryHash512 = ArbitraryHash512 Hash512
- newtype ArbitraryHash256 = ArbitraryHash256 Hash256
- newtype ArbitraryHash160 = ArbitraryHash160 Hash160
- newtype ArbitraryCheckSum32 = ArbitraryCheckSum32 CheckSum32
- newtype ArbitraryPrvKey = ArbitraryPrvKey PrvKey
- newtype ArbitraryPrvKeyC = ArbitraryPrvKeyC PrvKeyC
- newtype ArbitraryPrvKeyU = ArbitraryPrvKeyU PrvKeyU
- data ArbitraryPubKey = ArbitraryPubKey PrvKey PubKey
- data ArbitraryPubKeyC = ArbitraryPubKeyC PrvKeyC PubKeyC
- data ArbitraryPubKeyU = ArbitraryPubKeyU PrvKeyU PubKeyU
- newtype ArbitraryAddress = ArbitraryAddress Address
- newtype ArbitraryPubKeyAddress = ArbitraryPubKeyAddress Address
- newtype ArbitraryScriptAddress = ArbitraryScriptAddress Address
- data ArbitrarySignature = ArbitrarySignature Hash256 PrvKey Signature
- data ArbitraryXPrvKey = ArbitraryXPrvKey XPrvKey
- data ArbitraryXPubKey = ArbitraryXPubKey XPrvKey XPubKey
- data ArbitraryHardPath = ArbitraryHardPath HardPath
- data ArbitrarySoftPath = ArbitrarySoftPath SoftPath
- data ArbitraryDerivPath = ArbitraryDerivPath DerivPath
- data ArbitraryParsedPath = ArbitraryParsedPath ParsedPath
- newtype ArbitraryVarInt = ArbitraryVarInt VarInt
- newtype ArbitraryVarString = ArbitraryVarString VarString
- newtype ArbitraryNetworkAddress = ArbitraryNetworkAddress NetworkAddress
- newtype ArbitraryNetworkAddressTime = ArbitraryNetworkAddressTime (Word32, NetworkAddress)
- newtype ArbitraryInvType = ArbitraryInvType InvType
- newtype ArbitraryInvVector = ArbitraryInvVector InvVector
- newtype ArbitraryInv = ArbitraryInv Inv
- newtype ArbitraryVersion = ArbitraryVersion Version
- newtype ArbitraryAddr = ArbitraryAddr Addr
- newtype ArbitraryAlert = ArbitraryAlert Alert
- newtype ArbitraryReject = ArbitraryReject Reject
- newtype ArbitraryRejectCode = ArbitraryRejectCode RejectCode
- newtype ArbitraryGetData = ArbitraryGetData GetData
- newtype ArbitraryNotFound = ArbitraryNotFound NotFound
- newtype ArbitraryPing = ArbitraryPing Ping
- newtype ArbitraryPong = ArbitraryPong Pong
- data ArbitraryBloomFlags = ArbitraryBloomFlags BloomFlags
- data ArbitraryBloomFilter = ArbitraryBloomFilter Int Double BloomFilter
- data ArbitraryFilterLoad = ArbitraryFilterLoad FilterLoad
- data ArbitraryFilterAdd = ArbitraryFilterAdd FilterAdd
- newtype ArbitraryMessageCommand = ArbitraryMessageCommand MessageCommand
- newtype ArbitraryMessageHeader = ArbitraryMessageHeader MessageHeader
- newtype ArbitraryMessage = ArbitraryMessage Message
- newtype ArbitraryScriptOp = ArbitraryScriptOp ScriptOp
- newtype ArbitraryScript = ArbitraryScript Script
- newtype ArbitraryIntScriptOp = ArbitraryIntScriptOp ScriptOp
- newtype ArbitraryPushDataType = ArbitraryPushDataType PushDataType
- data ArbitraryTxSignature = ArbitraryTxSignature TxHash PrvKey TxSignature
- newtype ArbitrarySigHash = ArbitrarySigHash SigHash
- newtype ArbitraryValidSigHash = ArbitraryValidSigHash SigHash
- data ArbitraryMSParam = ArbitraryMSParam Int Int
- newtype ArbitraryScriptOutput = ArbitraryScriptOutput ScriptOutput
- newtype ArbitrarySimpleOutput = ArbitrarySimpleOutput ScriptOutput
- newtype ArbitraryPKOutput = ArbitraryPKOutput ScriptOutput
- newtype ArbitraryPKHashOutput = ArbitraryPKHashOutput ScriptOutput
- newtype ArbitraryMSOutput = ArbitraryMSOutput ScriptOutput
- newtype ArbitraryMSCOutput = ArbitraryMSCOutput ScriptOutput
- newtype ArbitrarySHOutput = ArbitrarySHOutput ScriptOutput
- newtype ArbitraryScriptInput = ArbitraryScriptInput ScriptInput
- newtype ArbitrarySimpleInput = ArbitrarySimpleInput ScriptInput
- newtype ArbitraryPKInput = ArbitraryPKInput ScriptInput
- newtype ArbitraryPKHashInput = ArbitraryPKHashInput ScriptInput
- newtype ArbitraryPKHashCInput = ArbitraryPKHashCInput ScriptInput
- newtype ArbitraryMSInput = ArbitraryMSInput ScriptInput
- newtype ArbitrarySHInput = ArbitrarySHInput ScriptInput
- newtype ArbitraryMulSigSHCInput = ArbitraryMulSigSHCInput ScriptInput
- newtype ArbitrarySatoshi = ArbitrarySatoshi Word64
- newtype ArbitraryTx = ArbitraryTx Tx
- newtype ArbitraryTxHash = ArbitraryTxHash TxHash
- newtype ArbitraryTxIn = ArbitraryTxIn TxIn
- newtype ArbitraryTxOut = ArbitraryTxOut TxOut
- newtype ArbitraryOutPoint = ArbitraryOutPoint OutPoint
- newtype ArbitraryCoinbaseTx = ArbitraryCoinbaseTx CoinbaseTx
- newtype ArbitraryAddrOnlyTx = ArbitraryAddrOnlyTx Tx
- newtype ArbitraryAddrOnlyTxIn = ArbitraryAddrOnlyTxIn TxIn
- newtype ArbitraryAddrOnlyTxOut = ArbitraryAddrOnlyTxOut TxOut
- data ArbitrarySigInput = ArbitrarySigInput SigInput [PrvKey]
- data ArbitraryPKSigInput = ArbitraryPKSigInput SigInput PrvKey
- data ArbitraryPKHashSigInput = ArbitraryPKHashSigInput SigInput PrvKey
- data ArbitraryMSSigInput = ArbitraryMSSigInput SigInput [PrvKey]
- data ArbitrarySHSigInput = ArbitrarySHSigInput SigInput [PrvKey]
- data ArbitrarySigningData = ArbitrarySigningData Tx [SigInput] [PrvKey]
- data ArbitraryPartialTxs = ArbitraryPartialTxs [Tx] [(ScriptOutput, OutPoint, Int, Int)]
- newtype ArbitraryBlock = ArbitraryBlock Block
- newtype ArbitraryBlockHeader = ArbitraryBlockHeader BlockHeader
- newtype ArbitraryBlockHash = ArbitraryBlockHash BlockHash
- newtype ArbitraryGetBlocks = ArbitraryGetBlocks GetBlocks
- newtype ArbitraryGetHeaders = ArbitraryGetHeaders GetHeaders
- newtype ArbitraryHeaders = ArbitraryHeaders Headers
- newtype ArbitraryMerkleBlock = ArbitraryMerkleBlock MerkleBlock
Util Arbitrary instances
data ArbitraryByteString Source
Arbitrary strict ByteString
Constructors
ArbitraryByteString ByteString |
data ArbitraryNotNullByteString Source
Arbitrary strict ByteString that is not empty
Constructors
ArbitraryNotNullByteString ByteString |
newtype ArbitraryUTCTime Source
Arbitrary UTCTime that generates dates after 01 Jan 1970 01:00:00 CET
Constructors
ArbitraryUTCTime UTCTime |
newtype ArbitraryHash512 Source
Constructors
ArbitraryHash512 Hash512 |
newtype ArbitraryHash256 Source
Constructors
ArbitraryHash256 Hash256 |
newtype ArbitraryHash160 Source
Constructors
ArbitraryHash160 Hash160 |
newtype ArbitraryCheckSum32 Source
Constructors
ArbitraryCheckSum32 CheckSum32 |
Crypto Arbitrary instances
newtype ArbitraryPrvKey Source
Arbitrary private key (can be both compressed or uncompressed)
Constructors
ArbitraryPrvKey PrvKey |
newtype ArbitraryPrvKeyU Source
Arbitrary uncompressed private key
Constructors
ArbitraryPrvKeyU PrvKeyU |
data ArbitraryPubKey Source
Arbitrary public key (can be both compressed or uncompressed) with its corresponding private key.
Constructors
ArbitraryPubKey PrvKey PubKey |
data ArbitraryPubKeyC Source
Arbitrary compressed public key with its corresponding private key.
Constructors
ArbitraryPubKeyC PrvKeyC PubKeyC |
data ArbitraryPubKeyU Source
Arbitrary uncompressed public key with its corresponding private key.
Constructors
ArbitraryPubKeyU PrvKeyU PubKeyU |
newtype ArbitraryAddress Source
Arbitrary address (can be a pubkey or script hash address)
Constructors
ArbitraryAddress Address |
newtype ArbitraryPubKeyAddress Source
Arbitrary public key hash address
Constructors
ArbitraryPubKeyAddress Address |
newtype ArbitraryScriptAddress Source
Arbitrary script hash address
Constructors
ArbitraryScriptAddress Address |
data ArbitrarySignature Source
Arbitrary message hash, private key, nonce and corresponding signature. The signature is generated with a random message, random private key and a random nonce.
Constructors
ArbitrarySignature Hash256 PrvKey Signature |
data ArbitraryXPubKey Source
Arbitrary extended public key with its corresponding private key.
Constructors
ArbitraryXPubKey XPrvKey XPubKey |
data ArbitraryHardPath Source
Constructors
ArbitraryHardPath HardPath |
data ArbitrarySoftPath Source
Constructors
ArbitrarySoftPath SoftPath |
data ArbitraryDerivPath Source
Constructors
ArbitraryDerivPath DerivPath |
data ArbitraryParsedPath Source
Constructors
ArbitraryParsedPath ParsedPath |
Node Arbitrary instances
newtype ArbitraryNetworkAddress Source
Arbitrary NetworkAddress
Constructors
ArbitraryNetworkAddress NetworkAddress |
newtype ArbitraryNetworkAddressTime Source
Arbitrary NetworkAddressTime
Constructors
ArbitraryNetworkAddressTime (Word32, NetworkAddress) |
Instances
newtype ArbitraryAlert Source
Arbitrary alert with random payload and signature. Signature is not valid.
Constructors
ArbitraryAlert Alert |
data ArbitraryBloomFlags Source
Arbitrary bloom filter flags
Constructors
ArbitraryBloomFlags BloomFlags |
data ArbitraryBloomFilter Source
Arbitrary bloom filter with its corresponding number of elements and false positive rate.
Constructors
ArbitraryBloomFilter Int Double BloomFilter |
newtype ArbitraryMessageCommand Source
Arbitrary MessageCommand
Constructors
ArbitraryMessageCommand MessageCommand |
Message Arbitrary instances
newtype ArbitraryMessageHeader Source
Arbitrary MessageHeader
Constructors
ArbitraryMessageHeader MessageHeader |
Script Arbitrary instances
newtype ArbitraryScriptOp Source
Arbitrary ScriptOp (push operations have random data)
Constructors
ArbitraryScriptOp ScriptOp |
newtype ArbitraryScript Source
Arbitrary Script with random script ops
Constructors
ArbitraryScript Script |
newtype ArbitraryIntScriptOp Source
Arbtirary ScriptOp with a value in [OP_1 .. OP_16]
Constructors
ArbitraryIntScriptOp ScriptOp |
newtype ArbitraryPushDataType Source
Arbitrary PushDataType
Constructors
ArbitraryPushDataType PushDataType |
data ArbitraryTxSignature Source
Arbitrary message hash, private key and corresponding TxSignature. The signature is generated deterministically using a random message and a random private key.
Constructors
ArbitraryTxSignature TxHash PrvKey TxSignature |
newtype ArbitrarySigHash Source
Arbitrary SigHash (including invalid/unknown sighash codes)
Constructors
ArbitrarySigHash SigHash |
newtype ArbitraryValidSigHash Source
Arbitrary valid SigHash
Constructors
ArbitraryValidSigHash SigHash |
newtype ArbitraryScriptOutput Source
Arbitrary ScriptOutput (Can by any valid type)
Constructors
ArbitraryScriptOutput ScriptOutput |
newtype ArbitrarySimpleOutput Source
Arbitrary ScriptOutput of type PayPK, PayPKHash or PayMS (Not PayScriptHash)
Constructors
ArbitrarySimpleOutput ScriptOutput |
newtype ArbitraryPKOutput Source
Arbitrary ScriptOutput of type PayPK
Constructors
ArbitraryPKOutput ScriptOutput |
newtype ArbitraryPKHashOutput Source
Arbitrary ScriptOutput of type PayPKHash
Constructors
ArbitraryPKHashOutput ScriptOutput |
newtype ArbitraryMSOutput Source
Arbitrary ScriptOutput of type PayMS
Constructors
ArbitraryMSOutput ScriptOutput |
newtype ArbitraryMSCOutput Source
Arbitrary ScriptOutput of type PayMS containing only compressed keys
Constructors
ArbitraryMSCOutput ScriptOutput |
newtype ArbitrarySHOutput Source
Arbitrary ScriptOutput of type PayScriptHash
Constructors
ArbitrarySHOutput ScriptOutput |
newtype ArbitraryScriptInput Source
Arbitrary ScriptInput
Constructors
ArbitraryScriptInput ScriptInput |
newtype ArbitrarySimpleInput Source
Arbitrary ScriptInput of type SpendPK, SpendPKHash or SpendMulSig (not ScriptHashInput)
Constructors
ArbitrarySimpleInput ScriptInput |
newtype ArbitraryPKInput Source
Arbitrary ScriptInput of type SpendPK
Constructors
ArbitraryPKInput ScriptInput |
newtype ArbitraryPKHashInput Source
Arbitrary ScriptInput of type SpendPK
Constructors
ArbitraryPKHashInput ScriptInput |
newtype ArbitraryPKHashCInput Source
Arbitrary ScriptInput of type SpendPK with a compressed public key
Constructors
ArbitraryPKHashCInput ScriptInput |
newtype ArbitraryMSInput Source
Arbitrary ScriptInput of type SpendMulSig
Constructors
ArbitraryMSInput ScriptInput |
newtype ArbitrarySHInput Source
Arbitrary ScriptInput of type ScriptHashInput
Constructors
ArbitrarySHInput ScriptInput |
newtype ArbitraryMulSigSHCInput Source
Arbitrary ScriptInput of type ScriptHashInput containing a RedeemScript of type PayMulSig and an input of type SpendMulSig. Only compressed keys are used.
Constructors
ArbitraryMulSigSHCInput ScriptInput |
Transaction Arbitrary instances
newtype ArbitrarySatoshi Source
Arbitrary amount of Satoshi as Word64 (Between 1 and 21e14)
Constructors
ArbitrarySatoshi Word64 |
newtype ArbitraryTxHash Source
Constructors
ArbitraryTxHash TxHash |
newtype ArbitraryAddrOnlyTx Source
Arbitrary Tx containing only inputs of type SpendPKHash, SpendScriptHash (multisig) and outputs of type PayPKHash and PaySH. Only compressed public keys are used.
Constructors
ArbitraryAddrOnlyTx Tx |
newtype ArbitraryAddrOnlyTxIn Source
Arbitrary TxIn that can only be of type SpendPKHash or SpendScriptHash (multisig). Only compressed public keys are used.
Constructors
ArbitraryAddrOnlyTxIn TxIn |
newtype ArbitraryAddrOnlyTxOut Source
Arbitrary TxOut that can only be of type PayPKHash or PaySH
Constructors
ArbitraryAddrOnlyTxOut TxOut |
data ArbitrarySigInput Source
Arbitrary SigInput with the corresponding private keys used to generate the ScriptOutput or RedeemScript
Constructors
ArbitrarySigInput SigInput [PrvKey] |
data ArbitraryPKSigInput Source
Arbitrary SigInput with a ScriptOutput of type PayPK
Constructors
ArbitraryPKSigInput SigInput PrvKey |
data ArbitraryPKHashSigInput Source
Arbitrary SigInput with a ScriptOutput of type PayPKHash
Constructors
ArbitraryPKHashSigInput SigInput PrvKey |
data ArbitraryMSSigInput Source
Arbitrary SigInput with a ScriptOutput of type PayMulSig
Constructors
ArbitraryMSSigInput SigInput [PrvKey] |
data ArbitrarySHSigInput Source
Arbitrary SigInput with ScriptOutput of type PaySH and a RedeemScript
Constructors
ArbitrarySHSigInput SigInput [PrvKey] |
data ArbitrarySigningData Source
Arbitrary Tx (empty TxIn), SigInputs and PrvKeys that can be passed to signTx or detSignTx to fully sign the Tx.
Constructors
ArbitrarySigningData Tx [SigInput] [PrvKey] |
data ArbitraryPartialTxs Source
Constructors
ArbitraryPartialTxs [Tx] [(ScriptOutput, OutPoint, Int, Int)] |
Block Arbitrary instances
newtype ArbitraryBlockHeader Source
Arbitrary BlockHeader
Constructors
ArbitraryBlockHeader BlockHeader |
newtype ArbitraryBlockHash Source
Constructors
ArbitraryBlockHash BlockHash |
newtype ArbitraryMerkleBlock Source
Arbitrary MerkleBlock
Constructors
ArbitraryMerkleBlock MerkleBlock |