{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}
module PlutusLedgerApi.V1.Crypto
( PubKeyHash(..)
) where
import Control.DeepSeq (NFData)
import Data.String
import GHC.Generics (Generic)
import PlutusLedgerApi.V1.Bytes (LedgerBytes (..))
import PlutusTx qualified
import PlutusTx.Lift (makeLift)
import PlutusTx.Prelude qualified as PlutusTx
import Prettyprinter
newtype PubKeyHash = PubKeyHash { PubKeyHash -> BuiltinByteString
getPubKeyHash :: PlutusTx.BuiltinByteString }
deriving stock (PubKeyHash -> PubKeyHash -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PubKeyHash -> PubKeyHash -> Bool
$c/= :: PubKeyHash -> PubKeyHash -> Bool
== :: PubKeyHash -> PubKeyHash -> Bool
$c== :: PubKeyHash -> PubKeyHash -> Bool
Eq, Eq PubKeyHash
PubKeyHash -> PubKeyHash -> Bool
PubKeyHash -> PubKeyHash -> Ordering
PubKeyHash -> PubKeyHash -> PubKeyHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PubKeyHash -> PubKeyHash -> PubKeyHash
$cmin :: PubKeyHash -> PubKeyHash -> PubKeyHash
max :: PubKeyHash -> PubKeyHash -> PubKeyHash
$cmax :: PubKeyHash -> PubKeyHash -> PubKeyHash
>= :: PubKeyHash -> PubKeyHash -> Bool
$c>= :: PubKeyHash -> PubKeyHash -> Bool
> :: PubKeyHash -> PubKeyHash -> Bool
$c> :: PubKeyHash -> PubKeyHash -> Bool
<= :: PubKeyHash -> PubKeyHash -> Bool
$c<= :: PubKeyHash -> PubKeyHash -> Bool
< :: PubKeyHash -> PubKeyHash -> Bool
$c< :: PubKeyHash -> PubKeyHash -> Bool
compare :: PubKeyHash -> PubKeyHash -> Ordering
$ccompare :: PubKeyHash -> PubKeyHash -> Ordering
Ord, forall x. Rep PubKeyHash x -> PubKeyHash
forall x. PubKeyHash -> Rep PubKeyHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PubKeyHash x -> PubKeyHash
$cfrom :: forall x. PubKeyHash -> Rep PubKeyHash x
Generic)
deriving anyclass (PubKeyHash -> ()
forall a. (a -> ()) -> NFData a
rnf :: PubKeyHash -> ()
$crnf :: PubKeyHash -> ()
NFData)
deriving newtype (PubKeyHash -> PubKeyHash -> Bool
forall a. (a -> a -> Bool) -> Eq a
== :: PubKeyHash -> PubKeyHash -> Bool
$c== :: PubKeyHash -> PubKeyHash -> Bool
PlutusTx.Eq, Eq PubKeyHash
PubKeyHash -> PubKeyHash -> Bool
PubKeyHash -> PubKeyHash -> Ordering
PubKeyHash -> PubKeyHash -> PubKeyHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PubKeyHash -> PubKeyHash -> PubKeyHash
$cmin :: PubKeyHash -> PubKeyHash -> PubKeyHash
max :: PubKeyHash -> PubKeyHash -> PubKeyHash
$cmax :: PubKeyHash -> PubKeyHash -> PubKeyHash
>= :: PubKeyHash -> PubKeyHash -> Bool
$c>= :: PubKeyHash -> PubKeyHash -> Bool
> :: PubKeyHash -> PubKeyHash -> Bool
$c> :: PubKeyHash -> PubKeyHash -> Bool
<= :: PubKeyHash -> PubKeyHash -> Bool
$c<= :: PubKeyHash -> PubKeyHash -> Bool
< :: PubKeyHash -> PubKeyHash -> Bool
$c< :: PubKeyHash -> PubKeyHash -> Bool
compare :: PubKeyHash -> PubKeyHash -> Ordering
$ccompare :: PubKeyHash -> PubKeyHash -> Ordering
PlutusTx.Ord, PubKeyHash -> BuiltinData
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: PubKeyHash -> BuiltinData
$ctoBuiltinData :: PubKeyHash -> BuiltinData
PlutusTx.ToData, BuiltinData -> Maybe PubKeyHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe PubKeyHash
$cfromBuiltinData :: BuiltinData -> Maybe PubKeyHash
PlutusTx.FromData, BuiltinData -> PubKeyHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> PubKeyHash
$cunsafeFromBuiltinData :: BuiltinData -> PubKeyHash
PlutusTx.UnsafeFromData)
deriving
(String -> PubKeyHash
forall a. (String -> a) -> IsString a
fromString :: String -> PubKeyHash
$cfromString :: String -> PubKeyHash
IsString
, Int -> PubKeyHash -> ShowS
[PubKeyHash] -> ShowS
PubKeyHash -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PubKeyHash] -> ShowS
$cshowList :: [PubKeyHash] -> ShowS
show :: PubKeyHash -> String
$cshow :: PubKeyHash -> String
showsPrec :: Int -> PubKeyHash -> ShowS
$cshowsPrec :: Int -> PubKeyHash -> ShowS
Show
, forall ann. [PubKeyHash] -> Doc ann
forall ann. PubKeyHash -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [PubKeyHash] -> Doc ann
$cprettyList :: forall ann. [PubKeyHash] -> Doc ann
pretty :: forall ann. PubKeyHash -> Doc ann
$cpretty :: forall ann. PubKeyHash -> Doc ann
Pretty
) via LedgerBytes
makeLift ''PubKeyHash