{-# OPTIONS_GHC -Wno-orphans #-}
module Plutarch.LedgerApi.V1.DCert (
PDCert (..),
) where
import GHC.Generics (Generic)
import Generics.SOP qualified as SOP
import Plutarch.LedgerApi.V1.Credential (PStakingCredential)
import Plutarch.LedgerApi.V1.Crypto (PPubKeyHash)
import Plutarch.Prelude
import PlutusLedgerApi.V1 qualified as Plutus
data PDCert (s :: S)
= PDCertDelegRegKey (Term s PStakingCredential)
| PDCertDelegDeRegKey (Term s PStakingCredential)
| PDCertDelegDelegate (Term s PStakingCredential) (Term s (PAsData PPubKeyHash))
| PDCertPoolRegister (Term s (PAsData PPubKeyHash)) (Term s (PAsData PPubKeyHash))
| PDCertPoolRetire (Term s (PAsData PPubKeyHash)) (Term s (PAsData PInteger))
| PDCertGenesis
| PDCertMir
deriving stock
(
(forall x. PDCert s -> Rep (PDCert s) x)
-> (forall x. Rep (PDCert s) x -> PDCert s) -> Generic (PDCert s)
forall x. Rep (PDCert s) x -> PDCert s
forall x. PDCert s -> Rep (PDCert s) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (s :: S) x. Rep (PDCert s) x -> PDCert s
forall (s :: S) x. PDCert s -> Rep (PDCert s) x
$cfrom :: forall (s :: S) x. PDCert s -> Rep (PDCert s) x
from :: forall x. PDCert s -> Rep (PDCert s) x
$cto :: forall (s :: S) x. Rep (PDCert s) x -> PDCert s
to :: forall x. Rep (PDCert s) x -> PDCert s
Generic
)
deriving anyclass
(
All SListI (Code (PDCert s))
All SListI (Code (PDCert s)) =>
(PDCert s -> Rep (PDCert s))
-> (Rep (PDCert s) -> PDCert s) -> Generic (PDCert s)
Rep (PDCert s) -> PDCert s
PDCert s -> Rep (PDCert s)
forall a.
All SListI (Code a) =>
(a -> Rep a) -> (Rep a -> a) -> Generic a
forall (s :: S). All SListI (Code (PDCert s))
forall (s :: S). Rep (PDCert s) -> PDCert s
forall (s :: S). PDCert s -> Rep (PDCert s)
$cfrom :: forall (s :: S). PDCert s -> Rep (PDCert s)
from :: PDCert s -> Rep (PDCert s)
$cto :: forall (s :: S). Rep (PDCert s) -> PDCert s
to :: Rep (PDCert s) -> PDCert s
SOP.Generic
,
(forall (s :: S). Term s (PAsData PDCert) -> Term s PDCert)
-> (forall (s :: S). Term s PDCert -> Term s PData)
-> PIsData PDCert
forall (s :: S). Term s (PAsData PDCert) -> Term s PDCert
forall (s :: S). Term s PDCert -> Term s PData
forall (a :: S -> Type).
(forall (s :: S). Term s (PAsData a) -> Term s a)
-> (forall (s :: S). Term s a -> Term s PData) -> PIsData a
$cpfromDataImpl :: forall (s :: S). Term s (PAsData PDCert) -> Term s PDCert
pfromDataImpl :: forall (s :: S). Term s (PAsData PDCert) -> Term s PDCert
$cpdataImpl :: forall (s :: S). Term s PDCert -> Term s PData
pdataImpl :: forall (s :: S). Term s PDCert -> Term s PData
PIsData
,
(forall (s :: S). Term s PDCert -> Term s PDCert -> Term s PBool)
-> PEq PDCert
forall (s :: S). Term s PDCert -> Term s PDCert -> Term s PBool
forall (t :: S -> Type).
(forall (s :: S). Term s t -> Term s t -> Term s PBool) -> PEq t
$c#== :: forall (s :: S). Term s PDCert -> Term s PDCert -> Term s PBool
#== :: forall (s :: S). Term s PDCert -> Term s PDCert -> Term s PBool
PEq
,
(forall (s :: S). Bool -> Term s PDCert -> Term s PString)
-> PShow PDCert
forall (s :: S). Bool -> Term s PDCert -> Term s PString
forall (t :: S -> Type).
(forall (s :: S). Bool -> Term s t -> Term s PString) -> PShow t
$cpshow' :: forall (s :: S). Bool -> Term s PDCert -> Term s PString
pshow' :: forall (s :: S). Bool -> Term s PDCert -> Term s PString
PShow
)
deriving
(
(forall (s :: S). PDCert s -> Term s (PInner PDCert))
-> (forall (s :: S) (b :: S -> Type).
Term s (PInner PDCert) -> (PDCert s -> Term s b) -> Term s b)
-> PlutusType PDCert
forall (s :: S). PDCert s -> Term s (PInner PDCert)
forall (s :: S) (b :: S -> Type).
Term s (PInner PDCert) -> (PDCert s -> Term s b) -> Term s b
forall (a :: S -> Type).
(forall (s :: S). a s -> Term s (PInner a))
-> (forall (s :: S) (b :: S -> Type).
Term s (PInner a) -> (a s -> Term s b) -> Term s b)
-> PlutusType a
$cpcon' :: forall (s :: S). PDCert s -> Term s (PInner PDCert)
pcon' :: forall (s :: S). PDCert s -> Term s (PInner PDCert)
$cpmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PDCert) -> (PDCert s -> Term s b) -> Term s b
pmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PDCert) -> (PDCert s -> Term s b) -> Term s b
PlutusType
)
via (DeriveAsDataStruct PDCert)
deriving via
DeriveDataPLiftable PDCert Plutus.DCert
instance
PLiftable PDCert