cardano-api:gen
Safe HaskellNone
LanguageHaskell2010

Test.Gen.Cardano.Api.Typed

Contents

Synopsis

Documentation

genFeaturedInEra :: Alternative f => eon era -> f a -> f (Featured eon era a) Source #

Generate a Featured for the given CardanoEra with the provided generator.

genMaybeFeaturedInEra :: (Eon eon, Alternative f) => (eon era -> f a) -> CardanoEra era -> f (Maybe (Featured eon era a)) Source #

Generate a Featured for the given CardanoEra with the provided generator.

Byron

genTxBodyByron :: HasCallStack => Gen (Annotated Tx ByteString) Source #

Partial! It will throw if the generated transaction body is invalid.

genCostModel :: MonadGen m => m CostModel Source #

genCostModels :: MonadGen m => m CostModels Source #

genValidProtocolParameters :: ShelleyBasedEra era -> Gen (LedgerProtocolParameters era) Source #

Generate valid protocol parameters which pass validations in Cardano.Api.ProtocolParameters

genUTxO :: ShelleyBasedEra era -> Gen (UTxO era) Source #

Scripts

genScript :: ScriptLanguage lang -> Gen (Script lang) Source #

genScriptData :: Gen ScriptData Source #

Deprecated: Use genHashableScriptData

genSeed :: Int -> Gen Seed Source #

genSignedQuantity :: Gen Quantity Source #

Generate a positive or negative quantity.

genSignedNonZeroQuantity :: Gen Quantity Source #

Generate a positive or negative, but not zero quantity.

genSigningKey :: Key keyrole => AsType keyrole -> Gen (SigningKey keyrole) Source #

genTx :: ShelleyBasedEra era -> Gen (Tx era) Source #

genTxBody :: HasCallStack => ShelleyBasedEra era -> Gen (TxBody era) Source #

Partial! This function will throw an error when the generated transaction is invalid.

genValidTxBody Source #

Arguments

:: ShelleyBasedEra era 
-> Gen (TxBody era, TxBodyContent BuildTx era)

validated TxBody and TxBodyContent

This generator validates generated TxBodyContent and backtracks when the generated body fails the validation. That also means that it is quite slow.

genTxFee :: ShelleyBasedEra era -> Gen (TxFee era) Source #

genValue :: Gen AssetId -> Gen Quantity -> Gen Value Source #

genValueDefault :: MaryEraOnwards era -> Gen (Value (ShelleyLedgerEra era)) Source #

Generate a Value with any asset ID and a positive or negative quantity.

genVerificationKey :: (HasTypeProxy keyrole, Key keyrole) => AsType keyrole -> Gen (VerificationKey keyrole) Source #

genVerificationKeyHash :: (HasTypeProxy keyrole, Key keyrole) => AsType keyrole -> Gen (Hash keyrole) Source #

genValueForMinting :: Gen Value Source #

Generate a Value suitable for minting, i.e. non-ADA asset ID and a positive or negative quantity.

genValueForTxOut :: ShelleyBasedEra era -> Gen (Value (ShelleyLedgerEra era)) Source #

Generate a Value suitable for usage in a transaction output, i.e. any asset ID and a positive quantity.