cardano-ledger-shelley-test-1.8.0.0: Test helpers from cardano-ledger-shelley exposed to other packages
Safe HaskellNone
LanguageHaskell2010

Test.Cardano.Ledger.Shelley.Utils

Synopsis

Documentation

mkSeedFromWordsRawSeedSeed Source #

Construct a seed from a bunch of Word64s

We multiply these words by some extra stuff to make sure they contain enough bits for our seed.

mkCertifiedVRF ∷ (Signable v a, VRFAlgorithm v, ContextVRF v ~ (), Coercible b (CertifiedVRF v a)) ⇒ a → SignKeyVRF v → b Source #

For testing purposes, create a VRF value

evolveKESUntil Source #

Arguments

∷ (UnsoundPureKESAlgorithm c, ContextKES c ~ ()) 
UnsoundPureSignKeyKES c 
KESPeriod

Current KES period

KESPeriod

Target KES period

Maybe (UnsoundPureSignKeyKES c) 

Try to evolve KES key until specific KES period is reached, given the current KES period.

mkHash ∷ ∀ a h. HashAlgorithm h ⇒ IntHash h a Source #

mkKeyPair ∷ ∀ (kd ∷ KeyRole). RawSeed → (SignKeyDSIGN DSIGN, VKey kd) Source #

For testing purposes, generate a deterministic key pair given a seed.

mkKeyPair' ∷ ∀ (kd ∷ KeyRole). RawSeedKeyPair kd Source #

For testing purposes, generate a deterministic key pair given a seed.

mkGenKey ∷ ∀ (kd ∷ KeyRole). RawSeed → (SignKeyDSIGN DSIGN, VKey kd) Source #

For testing purposes, generate a deterministic genesis key pair given a seed.

mkKESKeyPairCrypto c ⇒ RawSeedKESKeyPair c Source #

For testing purposes, generate a deterministic KES key pair given a seed.

mkVRFKeyPairCrypto c ⇒ RawSeedVRFKeyPair c Source #

For testing purposes, generate a deterministic VRF key pair given a seed.

runSTS ∷ ∀ (rule ∷ Symbol) era. (BaseM (EraRule rule era) ~ ShelleyBase, STS (EraRule rule era)) ⇒ GlobalsEnvironment (EraRule rule era) → State (EraRule rule era) → Signal (EraRule rule era) → Either (NonEmpty (PredicateFailure (EraRule rule era))) (State (EraRule rule era), [Event (EraRule rule era)]) Source #

applySTSTest ∷ ∀ s m (rtype ∷ RuleType). (STS s, RuleTypeRep rtype, m ~ BaseM s) ⇒ RuleContext rtype s → m (Either (NonEmpty (PredicateFailure s)) (State s)) Source #

Apply STS checking assertions.

type ChainProperty era = (ApplyBlock era, GetLedgerView era, EraTx era) Source #

data RawSeed Source #

Instances

Instances details
Arbitrary RawSeed 
Instance details

Defined in Test.Cardano.Ledger.Shelley.Arbitrary

EncCBOR RawSeed 
Instance details

Defined in Test.Cardano.Ledger.Shelley.Arbitrary

Show RawSeed 
Instance details

Defined in Test.Cardano.Ledger.Shelley.Arbitrary

Methods

showsPrecIntRawSeedShowS #

showRawSeedString #

showList ∷ [RawSeed] → ShowS #

Eq RawSeed 
Instance details

Defined in Test.Cardano.Ledger.Shelley.Arbitrary

Methods

(==)RawSeedRawSeedBool #

(/=)RawSeedRawSeedBool #

class Split v where Source #

Methods

vsplit ∷ v → Integer → ([v], Coin) Source #

Instances

Instances details
Split Coin Source # 
Instance details

Defined in Test.Cardano.Ledger.Shelley.Utils

Methods

vsplitCoinInteger → ([Coin], Coin) Source #