Skip to content

Commit

Permalink
New genCardanoKeyWitness function
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Apr 11, 2023
1 parent e60ac65 commit 0ad15f2
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 0ad15f2

Please sign in to comment.