Safe Haskell | None |
---|---|
Language | Haskell2010 |
Shared QuickCheck generators for wallet types.
Our convention is to let each test module define its own
Arbitrary
orphans.
This module allows for code-reuse where desired, by providing generators.
Synopsis
- genMnemonic :: forall mw ent csz. ( ConsistentEntropy ent mw csz, EntropySize mw ~ ent) => Gen ( Mnemonic mw)
- genPercentage :: Gen Percentage
- shrinkPercentage :: Percentage -> [ Percentage ]
- genLegacyAddress :: Maybe ProtocolMagic -> Gen Address
- genBlockHeader :: SlotNo -> Gen BlockHeader
- genChainPoint :: Gen ChainPoint
- genSlot :: Gen Slot
- genActiveSlotCoefficient :: Gen ActiveSlotCoefficient
- shrinkActiveSlotCoefficient :: ActiveSlotCoefficient -> [ ActiveSlotCoefficient ]
- genSlotNo :: Gen SlotNo
- shrinkSlotNo :: SlotNo -> [ SlotNo ]
- genNestedTxMetadata :: Gen TxMetadata
- genSimpleTxMetadata :: Gen TxMetadata
- shrinkTxMetadata :: TxMetadata -> [ TxMetadata ]
- genScript :: [a] -> Gen ( Script a)
- genScriptCosigners :: Gen ( Script Cosigner )
- genScriptTemplate :: Gen ScriptTemplate
- genScriptTemplateEntry :: Gen ApiScriptTemplateEntry
- genMockXPub :: Gen XPub
- genNatural :: Gen Natural
Documentation
genMnemonic :: forall mw ent csz. ( ConsistentEntropy ent mw csz, EntropySize mw ~ ent) => Gen ( Mnemonic mw) Source #
Generates an arbitrary mnemonic of a size according to the type parameter.
E.g: >>> arbitrary = SomeMnemonic $ genMnemonic @12
shrinkPercentage :: Percentage -> [ Percentage ] Source #
genBlockHeader :: SlotNo -> Gen BlockHeader Source #
shrinkSlotNo :: SlotNo -> [ SlotNo ] Source #
genNestedTxMetadata :: Gen TxMetadata Source #
Generates a
TxMetadata
with arbitrary levels of nesting.
genSimpleTxMetadata :: Gen TxMetadata Source #
Generates a
TxMetadata
containing only simple values, without nesting.
shrinkTxMetadata :: TxMetadata -> [ TxMetadata ] Source #
genMockXPub :: Gen XPub Source #
genNatural :: Gen Natural Source #