| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | GHC2021 | 
Hydra.Chain.Direct.WalletSpec
Synopsis
- spec :: Spec
 - setupQuery :: VerificationKey PaymentKey -> IO (ChainQuery IO, QueryPoint -> Expectation)
 - mockChainQuery :: VerificationKey PaymentKey -> ChainQuery IO
 - mockQueryEpochInfo :: IO (EpochInfo (Either Text))
 - mockQueryPParams :: IO (PParams ConwayEra)
 - prop_wellSuitedGenerators :: Property
 - prop_reducesWhenNotOurs :: Property
 - prop_seenInputsAreConsumed :: Property
 - prop_setsMinUTxOValue :: Property
 - prop_balanceTransaction :: Property
 - hasLowFees :: PParams LedgerEra -> Tx LedgerEra -> Property
 - isBalanced :: Map TxIn TxOut -> Tx LedgerEra -> Tx LedgerEra -> Property
 - prop_picksLargestUTxOToPayTheFees :: Property
 - genTxsSpending :: Map TxIn TxOut -> Gen [Tx LedgerEra]
 - genUTxO :: Gen (Map TxIn TxOut)
 - genOutputsForInputs :: Tx LedgerEra -> Gen (Map TxIn TxOut)
 - genLedgerTx :: Gen (Tx LedgerEra)
 - allTxIns :: [Tx LedgerEra] -> Set TxIn
 - allTxOuts :: [Tx LedgerEra] -> [TxOut]
 - isOurs :: Map TxIn TxOut -> Address -> Bool
 - ourDirectInputs :: Map TxIn TxOut -> [Tx LedgerEra] -> [TxIn]
 - ourOutputs :: Map TxIn TxOut -> [Tx LedgerEra] -> [TxOut]
 - getValue :: TxOut -> Value LedgerEra
 - deltaValue :: Value LedgerEra -> Value LedgerEra -> Value LedgerEra
 - knownInputBalance :: Map TxIn TxOut -> Tx LedgerEra -> Value LedgerEra
 - outputBalance :: Tx LedgerEra -> Value LedgerEra
 
Documentation
setupQuery :: VerificationKey PaymentKey -> IO (ChainQuery IO, QueryPoint -> Expectation) Source #
mockChainQuery :: VerificationKey PaymentKey -> ChainQuery IO Source #
mockQueryPParams :: IO (PParams ConwayEra) Source #
prop_wellSuitedGenerators :: Property Source #
prop_reducesWhenNotOurs :: Property Source #
prop_seenInputsAreConsumed :: Property Source #
prop_setsMinUTxOValue :: Property Source #
prop_balanceTransaction :: Property Source #
hasLowFees :: PParams LedgerEra -> Tx LedgerEra -> Property Source #
isBalanced :: Map TxIn TxOut -> Tx LedgerEra -> Tx LedgerEra -> Property Source #
prop_picksLargestUTxOToPayTheFees :: Property Source #
genTxsSpending :: Map TxIn TxOut -> Gen [Tx LedgerEra] Source #
Generate an arbitrary list of transactions from a UTXO set such that, transactions may *sometimes* consume given UTXO and produce new ones. The generator is geared towards certain use-cases,
genOutputsForInputs :: Tx LedgerEra -> Gen (Map TxIn TxOut) Source #
genLedgerTx :: Gen (Tx LedgerEra) Source #
ourDirectInputs :: Map TxIn TxOut -> [Tx LedgerEra] -> [TxIn] Source #
ourOutputs :: Map TxIn TxOut -> [Tx LedgerEra] -> [TxOut] Source #
deltaValue :: Value LedgerEra -> Value LedgerEra -> Value LedgerEra Source #
knownInputBalance :: Map TxIn TxOut -> Tx LedgerEra -> Value LedgerEra Source #
NOTE: This does not account for withdrawals
outputBalance :: Tx LedgerEra -> Value LedgerEra Source #
NOTE: This does not account for deposits