{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}
module Plutus.V1.Ledger.Crypto(
PubKeyHash(..)
) where
import Control.DeepSeq (NFData)
import Data.String
import GHC.Generics (Generic)
import Plutus.V1.Ledger.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
(PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> Bool) -> Eq PubKeyHash
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
Eq PubKeyHash
-> (PubKeyHash -> PubKeyHash -> Ordering)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> PubKeyHash)
-> (PubKeyHash -> PubKeyHash -> PubKeyHash)
-> Ord 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
$cp1Ord :: Eq PubKeyHash
Ord, (forall x. PubKeyHash -> Rep PubKeyHash x)
-> (forall x. Rep PubKeyHash x -> PubKeyHash) -> Generic PubKeyHash
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 -> ()
(PubKeyHash -> ()) -> NFData PubKeyHash
forall a. (a -> ()) -> NFData a
rnf :: PubKeyHash -> ()
$crnf :: PubKeyHash -> ()
NFData)
deriving newtype (PubKeyHash -> PubKeyHash -> Bool
(PubKeyHash -> PubKeyHash -> Bool) -> Eq PubKeyHash
forall a. (a -> a -> Bool) -> Eq a
== :: PubKeyHash -> PubKeyHash -> Bool
$c== :: PubKeyHash -> PubKeyHash -> Bool
PlutusTx.Eq, Eq PubKeyHash
Eq PubKeyHash
-> (PubKeyHash -> PubKeyHash -> Ordering)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> Bool)
-> (PubKeyHash -> PubKeyHash -> PubKeyHash)
-> (PubKeyHash -> PubKeyHash -> PubKeyHash)
-> Ord 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
$cp1Ord :: Eq PubKeyHash
PlutusTx.Ord, PubKeyHash -> BuiltinData
(PubKeyHash -> BuiltinData) -> ToData PubKeyHash
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: PubKeyHash -> BuiltinData
$ctoBuiltinData :: PubKeyHash -> BuiltinData
PlutusTx.ToData, BuiltinData -> Maybe PubKeyHash
(BuiltinData -> Maybe PubKeyHash) -> FromData PubKeyHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe PubKeyHash
$cfromBuiltinData :: BuiltinData -> Maybe PubKeyHash
PlutusTx.FromData, BuiltinData -> PubKeyHash
(BuiltinData -> PubKeyHash) -> UnsafeFromData PubKeyHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> PubKeyHash
$cunsafeFromBuiltinData :: BuiltinData -> PubKeyHash
PlutusTx.UnsafeFromData)
deriving String -> PubKeyHash
(String -> PubKeyHash) -> IsString PubKeyHash
forall a. (String -> a) -> IsString a
fromString :: String -> PubKeyHash
$cfromString :: String -> PubKeyHash
IsString via LedgerBytes
deriving (Int -> PubKeyHash -> ShowS
[PubKeyHash] -> ShowS
PubKeyHash -> String
(Int -> PubKeyHash -> ShowS)
-> (PubKeyHash -> String)
-> ([PubKeyHash] -> ShowS)
-> Show PubKeyHash
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, [PubKeyHash] -> Doc ann
PubKeyHash -> Doc ann
(forall ann. PubKeyHash -> Doc ann)
-> (forall ann. [PubKeyHash] -> Doc ann) -> Pretty PubKeyHash
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 :: [PubKeyHash] -> Doc ann
$cprettyList :: forall ann. [PubKeyHash] -> Doc ann
pretty :: PubKeyHash -> Doc ann
$cpretty :: forall ann. PubKeyHash -> Doc ann
Pretty) via LedgerBytes
makeLift ''PubKeyHash