Skip to content

Commit

Permalink
Merge pull request #5071 from input-output-hk/newhoggy/new-genCardano…
Browse files Browse the repository at this point in the history
…KeyWitness-function

New genCardanoKeyWitness function
  • Loading branch information
newhoggy authored Apr 11, 2023
2 parents 68186b9 + 0ad15f2 commit 2dd271b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module Test.Gen.Cardano.Api.Typed
, genValueNestedRep
, genValueNestedBundle
, genByronKeyWitness
, genCardanoKeyWitness
, genShelleyKeyWitness

, genTxId
Expand Down Expand Up @@ -761,6 +762,13 @@ genShelleyWitnessSigningKey =
, WitnessGenesisUTxOKey <$> genSigningKey AsGenesisUTxOKey
]

genCardanoKeyWitness
:: CardanoEra era
-> Gen (KeyWitness era)
genCardanoKeyWitness era = case cardanoEraStyle era of
LegacyByronEra -> genByronKeyWitness
ShelleyBasedEra _ -> genShelleyWitness era

genSeed :: Int -> Gen Crypto.Seed
genSeed n = Crypto.mkSeedFromBytes <$> Gen.bytes (Range.singleton n)

Expand Down

0 comments on commit 2dd271b

Please sign in to comment.