plutus-pab-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.PAB.Arbitrary

Description

Temporary code that'll make it easy for us to generate arbitrary events. This should either be deleted when we can get real events, or at least moved across to the test suite.

Synopsis

Documentation

acceptingValidator :: Validator Source #

A validator that always succeeds.

acceptingMintingPolicy :: MintingPolicy Source #

A minting policy that always succeeds.

genResponse :: PABReq -> Maybe (Gen PABResp) Source #

Generate responses for mock requests. This function returns a Maybe because we can't (yet) create a generator for every request type.

Orphan instances

Arbitrary Value Source # 
Instance details

Methods

arbitrary :: Gen Value

shrink :: Value -> [Value]

Arbitrary Slot Source # 
Instance details

Methods

arbitrary :: Gen Slot

shrink :: Slot -> [Slot]

Arbitrary DatumHash Source # 
Instance details

Methods

arbitrary :: Gen DatumHash

shrink :: DatumHash -> [DatumHash]

Arbitrary Datum Source # 
Instance details

Methods

arbitrary :: Gen Datum

shrink :: Datum -> [Datum]

Arbitrary Value Source # 
Instance details

Methods

arbitrary :: Gen Value

shrink :: Value -> [Value]

Arbitrary TxIx Source # 
Instance details

Methods

arbitrary :: Gen TxIx

shrink :: TxIx -> [TxIx]

Arbitrary AssetId Source # 
Instance details

Methods

arbitrary :: Gen AssetId

shrink :: AssetId -> [AssetId]

Arbitrary AssetName Source # 
Instance details

Methods

arbitrary :: Gen AssetName

shrink :: AssetName -> [AssetName]

Arbitrary Lovelace Source # 
Instance details

Methods

arbitrary :: Gen Lovelace

shrink :: Lovelace -> [Lovelace]

Arbitrary PolicyId Source # 
Instance details

Methods

arbitrary :: Gen PolicyId

shrink :: PolicyId -> [PolicyId]

Arbitrary Language Source # 
Instance details

Methods

arbitrary :: Gen Language

shrink :: Language -> [Language]

Arbitrary PaymentPubKey Source # 
Instance details

Methods

arbitrary :: Gen PaymentPubKey

shrink :: PaymentPubKey -> [PaymentPubKey]

Arbitrary PaymentPubKeyHash Source # 
Instance details

Methods

arbitrary :: Gen PaymentPubKeyHash

shrink :: PaymentPubKeyHash -> [PaymentPubKeyHash]

Arbitrary StakePubKey Source # 
Instance details

Methods

arbitrary :: Gen StakePubKey

shrink :: StakePubKey -> [StakePubKey]

Arbitrary StakePubKeyHash Source # 
Instance details

Methods

arbitrary :: Gen StakePubKeyHash

shrink :: StakePubKeyHash -> [StakePubKeyHash]

Arbitrary PubKey Source # 
Instance details

Methods

arbitrary :: Gen PubKey

shrink :: PubKey -> [PubKey]

Arbitrary Signature Source # 
Instance details

Methods

arbitrary :: Gen Signature

shrink :: Signature -> [Signature]

Arbitrary ToCardanoError Source # 
Instance details

Methods

arbitrary :: Gen ToCardanoError

shrink :: ToCardanoError -> [ToCardanoError]

Arbitrary Certificate Source # 
Instance details

Methods

arbitrary :: Gen Certificate

shrink :: Certificate -> [Certificate]

Arbitrary TxOut Source # 
Instance details

Methods

arbitrary :: Gen TxOut

shrink :: TxOut -> [TxOut]

Arbitrary Withdrawal Source # 
Instance details

Methods

arbitrary :: Gen Withdrawal

shrink :: Withdrawal -> [Withdrawal]

Arbitrary Address Source # 
Instance details

Methods

arbitrary :: Gen Address

shrink :: Address -> [Address]

Arbitrary Credential Source # 
Instance details

Methods

arbitrary :: Gen Credential

shrink :: Credential -> [Credential]

Arbitrary StakingCredential Source # 
Instance details

Methods

arbitrary :: Gen StakingCredential

shrink :: StakingCredential -> [StakingCredential]

Arbitrary PubKeyHash Source # 
Instance details

Methods

arbitrary :: Gen PubKeyHash

shrink :: PubKeyHash -> [PubKeyHash]

Arbitrary DCert Source # 
Instance details

Methods

arbitrary :: Gen DCert

shrink :: DCert -> [DCert]

Arbitrary MintingPolicy Source # 
Instance details

Methods

arbitrary :: Gen MintingPolicy

shrink :: MintingPolicy -> [MintingPolicy]

Arbitrary MintingPolicyHash Source # 
Instance details

Methods

arbitrary :: Gen MintingPolicyHash

shrink :: MintingPolicyHash -> [MintingPolicyHash]

Arbitrary Redeemer Source # 
Instance details

Methods

arbitrary :: Gen Redeemer

shrink :: Redeemer -> [Redeemer]

Arbitrary Script Source # 
Instance details

Methods

arbitrary :: Gen Script

shrink :: Script -> [Script]

Arbitrary ScriptError Source # 
Instance details

Methods

arbitrary :: Gen ScriptError

shrink :: ScriptError -> [ScriptError]

Arbitrary ScriptHash Source # 
Instance details

Methods

arbitrary :: Gen ScriptHash

shrink :: ScriptHash -> [ScriptHash]

Arbitrary Validator Source # 
Instance details

Methods

arbitrary :: Gen Validator

shrink :: Validator -> [Validator]

Arbitrary ValidatorHash Source # 
Instance details

Methods

arbitrary :: Gen ValidatorHash

shrink :: ValidatorHash -> [ValidatorHash]

Arbitrary RedeemerPtr Source # 
Instance details

Methods

arbitrary :: Gen RedeemerPtr

shrink :: RedeemerPtr -> [RedeemerPtr]

Arbitrary ScriptTag Source # 
Instance details

Methods

arbitrary :: Gen ScriptTag

shrink :: ScriptTag -> [ScriptTag]

Arbitrary TxOutRef Source # 
Instance details

Methods

arbitrary :: Gen TxOutRef

shrink :: TxOutRef -> [TxOutRef]

Arbitrary ConnectionError Source # 
Instance details

Methods

arbitrary :: Gen ConnectionError

shrink :: ConnectionError -> [ConnectionError]

Arbitrary WrongOutTypeError Source # 
Instance details

Methods

arbitrary :: Gen WrongOutTypeError

shrink :: WrongOutTypeError -> [WrongOutTypeError]

Arbitrary BuiltinData Source # 
Instance details

Methods

arbitrary :: Gen BuiltinData

shrink :: BuiltinData -> [BuiltinData]

Arbitrary Data Source # 
Instance details

Methods

arbitrary :: Gen Data

shrink :: Data -> [Data]

Arbitrary BuiltinByteString Source # 
Instance details

Methods

arbitrary :: Gen BuiltinByteString

shrink :: BuiltinByteString -> [BuiltinByteString]

Arbitrary TxId Source # 
Instance details

Methods

arbitrary :: Gen TxId

shrink :: TxId -> [TxId]

Arbitrary OutputDatum Source # 
Instance details

Methods

arbitrary :: Gen OutputDatum

shrink :: OutputDatum -> [OutputDatum]

Arbitrary CurrencySymbol Source # 
Instance details

Methods

arbitrary :: Gen CurrencySymbol

shrink :: CurrencySymbol -> [CurrencySymbol]

Arbitrary TokenName Source # 
Instance details

Methods

arbitrary :: Gen TokenName

shrink :: TokenName -> [TokenName]

Arbitrary Value Source # 
Instance details

Methods

arbitrary :: Gen Value

shrink :: Value -> [Value]

Arbitrary Quantity Source # 
Instance details

Methods

arbitrary :: Gen Quantity

shrink :: Quantity -> [Quantity]

Arbitrary Ada Source # 
Instance details

Methods

arbitrary :: Gen Ada

shrink :: Ada -> [Ada]

Arbitrary LedgerBytes Source # 
Instance details

Methods

arbitrary :: Gen LedgerBytes

shrink :: LedgerBytes -> [LedgerBytes]

Arbitrary MkTxError Source # 
Instance details

Methods

arbitrary :: Gen MkTxError

shrink :: MkTxError -> [MkTxError]

Arbitrary ActiveEndpoint Source # 
Instance details

Methods

arbitrary :: Gen ActiveEndpoint

shrink :: ActiveEndpoint -> [ActiveEndpoint]

Arbitrary PABReq Source # 
Instance details

Methods

arbitrary :: Gen PABReq

shrink :: PABReq -> [PABReq]

Arbitrary EndpointDescription Source # 
Instance details

Methods

arbitrary :: Gen EndpointDescription

shrink :: EndpointDescription -> [EndpointDescription]

Arbitrary ThreadToken Source # 
Instance details

Methods

arbitrary :: Gen ThreadToken

shrink :: ThreadToken -> [ThreadToken]

(Arg (Extended a) a, Arbitrary a) => Arbitrary (Extended a) Source # 
Instance details

Methods

arbitrary :: Gen (Extended a)

shrink :: Extended a -> [Extended a]

(Arg (Extended a) a, Arg (LowerBound a) a, Arg (UpperBound a) a, Arg (Interval a) a, Arbitrary a) => Arbitrary (Interval a) Source # 
Instance details

Methods

arbitrary :: Gen (Interval a)

shrink :: Interval a -> [Interval a]

(Arg (Extended a) a, Arg (LowerBound a) a, Arbitrary a) => Arbitrary (LowerBound a) Source # 
Instance details

Methods

arbitrary :: Gen (LowerBound a)

shrink :: LowerBound a -> [LowerBound a]

(Arg (Extended a) a, Arg (UpperBound a) a, Arbitrary a) => Arbitrary (UpperBound a) Source # 
Instance details

Methods

arbitrary :: Gen (UpperBound a)

shrink :: UpperBound a -> [UpperBound a]

(Arg (Versioned script) script, Arbitrary script) => Arbitrary (Versioned script) Source # 
Instance details

Methods

arbitrary :: Gen (Versioned script)

shrink :: Versioned script -> [Versioned script]

Arbitrary (AddressInEra BabbageEra) Source # 
Instance details

Methods

arbitrary :: Gen (AddressInEra BabbageEra)

shrink :: AddressInEra BabbageEra -> [AddressInEra BabbageEra]

(Arbitrary k, Arbitrary v) => Arbitrary (Map k v) Source # 
Instance details

Methods

arbitrary :: Gen (Map k v)

shrink :: Map k v -> [Map k v]