{-# OPTIONS_GHC -Wno-orphans #-}
module PlutusLedgerApi.V1.Orphans.Crypto () where
import Data.Coerce (coerce)
import PlutusLedgerApi.Orphans.Common (
Blake2b244Hash (Blake2b244Hash),
)
import PlutusLedgerApi.V1 qualified as PLA
import Test.QuickCheck (
Arbitrary,
CoArbitrary,
Function (function),
functionMap,
)
deriving via Blake2b244Hash instance Arbitrary PLA.PubKeyHash
deriving via Blake2b244Hash instance CoArbitrary PLA.PubKeyHash
instance Function PLA.PubKeyHash where
{-# INLINEABLE function #-}
function :: forall b. (PubKeyHash -> b) -> PubKeyHash :-> b
function = (PubKeyHash -> BuiltinByteString)
-> (BuiltinByteString -> PubKeyHash)
-> (PubKeyHash -> b)
-> PubKeyHash :-> b
forall b a c.
Function b =>
(a -> b) -> (b -> a) -> (a -> c) -> a :-> c
functionMap PubKeyHash -> BuiltinByteString
forall a b. Coercible a b => a -> b
coerce BuiltinByteString -> PubKeyHash
PLA.PubKeyHash