Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hydra.Chain.Direct.WalletSpec
Synopsis
- spec :: Spec
- setupQuery :: VerificationKey PaymentKey -> IO (ChainQuery IO, QueryPoint -> Expectation)
- mockChainQuery :: VerificationKey PaymentKey -> ChainQuery IO
- prop_wellSuitedGenerators :: Property
- prop_reducesWhenNotOurs :: Property
- prop_seenInputsAreConsumed :: Property
- prop_balanceTransaction :: Property
- isBalanced :: Map TxIn TxOut -> Tx LedgerEra -> Tx LedgerEra -> Property
- ledgerPParams :: PParams (ShelleyLedgerEra Era)
- prop_picksLargestUTxOToPayTheFees :: Property
- genChainPoint :: Gen ChainPoint
- genChainPointAt :: SlotNo -> Gen ChainPoint
- 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 #
prop_wellSuitedGenerators :: Property Source #
prop_reducesWhenNotOurs :: Property Source #
prop_seenInputsAreConsumed :: Property Source #
prop_balanceTransaction :: Property Source #
isBalanced :: Map TxIn TxOut -> Tx LedgerEra -> Tx LedgerEra -> Property Source #
ledgerPParams :: PParams (ShelleyLedgerEra Era) Source #
prop_picksLargestUTxOToPayTheFees :: Property Source #
genChainPoint :: Gen ChainPoint Source #
Generate a chain point with a likely invalid block header hash.
genChainPointAt :: SlotNo -> Gen ChainPoint Source #
Generate a chain point at given slot with a likely invalid block header hash.
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