{-# OPTIONS_GHC -Wno-orphans #-}

module Plutarch.LedgerApi.V1 (
  -- * Contexts
  Contexts.PScriptPurpose (..),
  PScriptContext (..),

  -- * Certificates
  DCert.PDCert (..),

  -- * Credentials
  Credential.PCredential (..),
  Credential.PStakingCredential (..),

  -- * Value
  Value.PValue (..),
  Value.AmountGuarantees (..),
  Value.PLovelace (..),
  Value.PTokenName (..),
  Value.PCurrencySymbol (..),

  -- * Time
  Time.PPosixTime (..),
  Time.pposixTime,
  Time.unPPosixTime,

  -- * Intervals
  Interval.PExtended (..),
  Interval.PLowerBound (..),
  Interval.PUpperBound (..),
  Interval.PInterval (..),

  -- * Script stuff
  Scripts.PDatum (..),
  Scripts.PRedeemer (..),
  Scripts.PDatumHash (..),
  Scripts.PRedeemerHash (..),
  Scripts.PScriptHash (..),

  -- * Transactions
  Address.PAddress (..),
  Tx.PTxId (..),
  PTxOut (..),
  PTxInInfo (..),
  Tx.PTxOutRef (..),
  Crypto.PPubKeyHash (..),
  PTxInfo (..),

  -- * Helpers
  AssocMap.PMap (..),
  AssocMap.KeyGuarantees (..),
  AssocMap.Commutativity (..),

  -- * Utilities

  -- ** Types
  Utils.PMaybeData (..),
  Utils.PRationalData (..),

  -- ** Utilities
  Utils.pfromDJust,
  Utils.pisDJust,
  Utils.pmaybeData,
  Utils.pdjust,
  Utils.pdnothing,
  Utils.pmaybeToMaybeData,
  Utils.passertPDJust,
  Utils.prationalFromData,
) where

import GHC.Generics (Generic)
import Generics.SOP qualified as SOP
import Plutarch.LedgerApi.AssocMap qualified as AssocMap
import Plutarch.LedgerApi.Interval qualified as Interval
import Plutarch.LedgerApi.Utils qualified as Utils
import Plutarch.LedgerApi.V1.Address qualified as Address
import Plutarch.LedgerApi.V1.Contexts qualified as Contexts
import Plutarch.LedgerApi.V1.Credential qualified as Credential
import Plutarch.LedgerApi.V1.Crypto qualified as Crypto
import Plutarch.LedgerApi.V1.DCert qualified as DCert
import Plutarch.LedgerApi.V1.Scripts qualified as Scripts
import Plutarch.LedgerApi.V1.Time qualified as Time
import Plutarch.LedgerApi.V1.Tx qualified as Tx
import Plutarch.LedgerApi.Value qualified as Value
import Plutarch.Prelude
import PlutusLedgerApi.V1 qualified as Plutus

-- | @since 3.1.1
data PTxOut (s :: S) = PTxOut
  { forall (s :: S). PTxOut s -> Term s PAddress
ptxOut'address :: Term s Address.PAddress
  , forall (s :: S).
PTxOut s -> Term s (PAsData (PValue 'Sorted 'Positive))
ptxOut'value :: Term s (PAsData (Value.PValue 'AssocMap.Sorted 'Value.Positive))
  , forall (s :: S). PTxOut s -> Term s (PAsData PDatumHash)
ptxOut'datumHash :: Term s (PAsData Scripts.PDatumHash)
  }
  deriving stock
    ( -- | @since 3.1.1
      (forall x. PTxOut s -> Rep (PTxOut s) x)
-> (forall x. Rep (PTxOut s) x -> PTxOut s) -> Generic (PTxOut s)
forall x. Rep (PTxOut s) x -> PTxOut s
forall x. PTxOut s -> Rep (PTxOut s) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (s :: S) x. Rep (PTxOut s) x -> PTxOut s
forall (s :: S) x. PTxOut s -> Rep (PTxOut s) x
$cfrom :: forall (s :: S) x. PTxOut s -> Rep (PTxOut s) x
from :: forall x. PTxOut s -> Rep (PTxOut s) x
$cto :: forall (s :: S) x. Rep (PTxOut s) x -> PTxOut s
to :: forall x. Rep (PTxOut s) x -> PTxOut s
Generic
    )
  deriving anyclass
    ( -- | @since 3.3.0
      All SListI (Code (PTxOut s))
All SListI (Code (PTxOut s)) =>
(PTxOut s -> Rep (PTxOut s))
-> (Rep (PTxOut s) -> PTxOut s) -> Generic (PTxOut s)
Rep (PTxOut s) -> PTxOut s
PTxOut s -> Rep (PTxOut s)
forall a.
All SListI (Code a) =>
(a -> Rep a) -> (Rep a -> a) -> Generic a
forall (s :: S). All SListI (Code (PTxOut s))
forall (s :: S). Rep (PTxOut s) -> PTxOut s
forall (s :: S). PTxOut s -> Rep (PTxOut s)
$cfrom :: forall (s :: S). PTxOut s -> Rep (PTxOut s)
from :: PTxOut s -> Rep (PTxOut s)
$cto :: forall (s :: S). Rep (PTxOut s) -> PTxOut s
to :: Rep (PTxOut s) -> PTxOut s
SOP.Generic
    , -- | @since 3.1.1
      (forall (s :: S). Term s (PAsData PTxOut) -> Term s PTxOut)
-> (forall (s :: S). Term s PTxOut -> Term s PData)
-> PIsData PTxOut
forall (s :: S). Term s (PAsData PTxOut) -> Term s PTxOut
forall (s :: S). Term s PTxOut -> 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 PTxOut) -> Term s PTxOut
pfromDataImpl :: forall (s :: S). Term s (PAsData PTxOut) -> Term s PTxOut
$cpdataImpl :: forall (s :: S). Term s PTxOut -> Term s PData
pdataImpl :: forall (s :: S). Term s PTxOut -> Term s PData
PIsData
    , -- | @since 3.1.1
      (forall (s :: S). Term s PTxOut -> Term s PTxOut -> Term s PBool)
-> PEq PTxOut
forall (s :: S). Term s PTxOut -> Term s PTxOut -> 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 PTxOut -> Term s PTxOut -> Term s PBool
#== :: forall (s :: S). Term s PTxOut -> Term s PTxOut -> Term s PBool
PEq
    , -- | @since 3.1.1
      (forall (s :: S). Bool -> Term s PTxOut -> Term s PString)
-> PShow PTxOut
forall (s :: S). Bool -> Term s PTxOut -> 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 PTxOut -> Term s PString
pshow' :: forall (s :: S). Bool -> Term s PTxOut -> Term s PString
PShow
    )
  deriving
    ( -- | @since 3.3.0
      (forall (s :: S). PTxOut s -> Term s (PInner PTxOut))
-> (forall (s :: S) (b :: S -> Type).
    Term s (PInner PTxOut) -> (PTxOut s -> Term s b) -> Term s b)
-> PlutusType PTxOut
forall (s :: S). PTxOut s -> Term s (PInner PTxOut)
forall (s :: S) (b :: S -> Type).
Term s (PInner PTxOut) -> (PTxOut 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). PTxOut s -> Term s (PInner PTxOut)
pcon' :: forall (s :: S). PTxOut s -> Term s (PInner PTxOut)
$cpmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PTxOut) -> (PTxOut s -> Term s b) -> Term s b
pmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PTxOut) -> (PTxOut s -> Term s b) -> Term s b
PlutusType
    )
    via (DeriveAsDataStruct PTxOut)

-- | @since 3.3.0
deriving via
  DeriveDataPLiftable PTxOut Plutus.TxOut
  instance
    PLiftable PTxOut

-- | @since 3.1.1
data PTxInInfo (s :: S) = PTxInInfo
  { forall (s :: S). PTxInInfo s -> Term s PTxOutRef
ptxInInfo'outRef :: Term s Tx.PTxOutRef
  , forall (s :: S). PTxInInfo s -> Term s PTxOut
ptxInInfo'resolved :: Term s PTxOut
  }
  deriving stock
    ( -- | @since 3.1.1
      (forall x. PTxInInfo s -> Rep (PTxInInfo s) x)
-> (forall x. Rep (PTxInInfo s) x -> PTxInInfo s)
-> Generic (PTxInInfo s)
forall x. Rep (PTxInInfo s) x -> PTxInInfo s
forall x. PTxInInfo s -> Rep (PTxInInfo s) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (s :: S) x. Rep (PTxInInfo s) x -> PTxInInfo s
forall (s :: S) x. PTxInInfo s -> Rep (PTxInInfo s) x
$cfrom :: forall (s :: S) x. PTxInInfo s -> Rep (PTxInInfo s) x
from :: forall x. PTxInInfo s -> Rep (PTxInInfo s) x
$cto :: forall (s :: S) x. Rep (PTxInInfo s) x -> PTxInInfo s
to :: forall x. Rep (PTxInInfo s) x -> PTxInInfo s
Generic
    )
  deriving anyclass
    ( -- | @since 3.3.0
      All SListI (Code (PTxInInfo s))
All SListI (Code (PTxInInfo s)) =>
(PTxInInfo s -> Rep (PTxInInfo s))
-> (Rep (PTxInInfo s) -> PTxInInfo s) -> Generic (PTxInInfo s)
Rep (PTxInInfo s) -> PTxInInfo s
PTxInInfo s -> Rep (PTxInInfo s)
forall a.
All SListI (Code a) =>
(a -> Rep a) -> (Rep a -> a) -> Generic a
forall (s :: S). All SListI (Code (PTxInInfo s))
forall (s :: S). Rep (PTxInInfo s) -> PTxInInfo s
forall (s :: S). PTxInInfo s -> Rep (PTxInInfo s)
$cfrom :: forall (s :: S). PTxInInfo s -> Rep (PTxInInfo s)
from :: PTxInInfo s -> Rep (PTxInInfo s)
$cto :: forall (s :: S). Rep (PTxInInfo s) -> PTxInInfo s
to :: Rep (PTxInInfo s) -> PTxInInfo s
SOP.Generic
    , -- | @since 3.1.1
      (forall (s :: S). Term s (PAsData PTxInInfo) -> Term s PTxInInfo)
-> (forall (s :: S). Term s PTxInInfo -> Term s PData)
-> PIsData PTxInInfo
forall (s :: S). Term s (PAsData PTxInInfo) -> Term s PTxInInfo
forall (s :: S). Term s PTxInInfo -> 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 PTxInInfo) -> Term s PTxInInfo
pfromDataImpl :: forall (s :: S). Term s (PAsData PTxInInfo) -> Term s PTxInInfo
$cpdataImpl :: forall (s :: S). Term s PTxInInfo -> Term s PData
pdataImpl :: forall (s :: S). Term s PTxInInfo -> Term s PData
PIsData
    , -- | @since 3.1.1
      (forall (s :: S).
 Term s PTxInInfo -> Term s PTxInInfo -> Term s PBool)
-> PEq PTxInInfo
forall (s :: S).
Term s PTxInInfo -> Term s PTxInInfo -> 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 PTxInInfo -> Term s PTxInInfo -> Term s PBool
#== :: forall (s :: S).
Term s PTxInInfo -> Term s PTxInInfo -> Term s PBool
PEq
    , -- | @since 3.1.1
      (forall (s :: S). Bool -> Term s PTxInInfo -> Term s PString)
-> PShow PTxInInfo
forall (s :: S). Bool -> Term s PTxInInfo -> 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 PTxInInfo -> Term s PString
pshow' :: forall (s :: S). Bool -> Term s PTxInInfo -> Term s PString
PShow
    )
  deriving
    ( -- | @since 3.3.0
      (forall (s :: S). PTxInInfo s -> Term s (PInner PTxInInfo))
-> (forall (s :: S) (b :: S -> Type).
    Term s (PInner PTxInInfo) -> (PTxInInfo s -> Term s b) -> Term s b)
-> PlutusType PTxInInfo
forall (s :: S). PTxInInfo s -> Term s (PInner PTxInInfo)
forall (s :: S) (b :: S -> Type).
Term s (PInner PTxInInfo) -> (PTxInInfo 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). PTxInInfo s -> Term s (PInner PTxInInfo)
pcon' :: forall (s :: S). PTxInInfo s -> Term s (PInner PTxInInfo)
$cpmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PTxInInfo) -> (PTxInInfo s -> Term s b) -> Term s b
pmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PTxInInfo) -> (PTxInInfo s -> Term s b) -> Term s b
PlutusType
    )
    via (DeriveAsDataStruct PTxInInfo)

-- | @since 3.3.0
deriving via
  DeriveDataPLiftable PTxInInfo Plutus.TxInInfo
  instance
    PLiftable PTxInInfo

-- | @since 3.3.0
data PTxInfo (s :: S) = PTxInfo
  { forall (s :: S).
PTxInfo s -> Term s (PAsData (PBuiltinList PTxInInfo))
ptxInfo'inputs :: Term s (PAsData (PBuiltinList PTxInInfo))
  , forall (s :: S).
PTxInfo s -> Term s (PAsData (PBuiltinList PTxOut))
ptxInfo'outputs :: Term s (PAsData (PBuiltinList PTxOut))
  , forall (s :: S).
PTxInfo s -> Term s (PAsData (PValue 'Sorted 'Positive))
ptxInfo'fee :: Term s (PAsData (Value.PValue 'AssocMap.Sorted 'Value.Positive))
  , forall (s :: S).
PTxInfo s -> Term s (PAsData (PValue 'Sorted 'NoGuarantees))
ptxInfo'mint :: Term s (PAsData (Value.PValue 'AssocMap.Sorted 'Value.NoGuarantees)) -- value minted by transaction
  , forall (s :: S).
PTxInfo s -> Term s (PAsData (PBuiltinList PDCert))
ptxInfo'dCert :: Term s (PAsData (PBuiltinList DCert.PDCert))
  , forall (s :: S).
PTxInfo s
-> Term
     s
     (PAsData
        (PBuiltinList
           (PAsData
              (PBuiltinPair (PAsData PStakingCredential) (PAsData PInteger)))))
ptxInfo'wdrl :: Term s (PAsData (PBuiltinList (PAsData (PBuiltinPair (PAsData Credential.PStakingCredential) (PAsData PInteger))))) -- Staking withdrawals
  , forall (s :: S). PTxInfo s -> Term s (PInterval PPosixTime)
ptxInfo'validRange :: Term s (Interval.PInterval Time.PPosixTime)
  , forall (s :: S).
PTxInfo s -> Term s (PAsData (PBuiltinList (PAsData PPubKeyHash)))
ptxInfo'signatories :: Term s (PAsData (PBuiltinList (PAsData Crypto.PPubKeyHash)))
  , forall (s :: S).
PTxInfo s
-> Term
     s
     (PAsData
        (PBuiltinList
           (PAsData (PBuiltinPair (PAsData PDatumHash) (PAsData PDatum)))))
ptxInfo'data :: Term s (PAsData (PBuiltinList (PAsData (PBuiltinPair (PAsData Scripts.PDatumHash) (PAsData Scripts.PDatum)))))
  , forall (s :: S). PTxInfo s -> Term s (PAsData PTxId)
ptxInfo'id :: Term s (PAsData Tx.PTxId) -- hash of the pending transaction
  }
  deriving stock
    ( -- | @since 3.1.1
      (forall x. PTxInfo s -> Rep (PTxInfo s) x)
-> (forall x. Rep (PTxInfo s) x -> PTxInfo s)
-> Generic (PTxInfo s)
forall x. Rep (PTxInfo s) x -> PTxInfo s
forall x. PTxInfo s -> Rep (PTxInfo s) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (s :: S) x. Rep (PTxInfo s) x -> PTxInfo s
forall (s :: S) x. PTxInfo s -> Rep (PTxInfo s) x
$cfrom :: forall (s :: S) x. PTxInfo s -> Rep (PTxInfo s) x
from :: forall x. PTxInfo s -> Rep (PTxInfo s) x
$cto :: forall (s :: S) x. Rep (PTxInfo s) x -> PTxInfo s
to :: forall x. Rep (PTxInfo s) x -> PTxInfo s
Generic
    )
  deriving anyclass
    ( -- | @since 3.3.0
      All SListI (Code (PTxInfo s))
All SListI (Code (PTxInfo s)) =>
(PTxInfo s -> Rep (PTxInfo s))
-> (Rep (PTxInfo s) -> PTxInfo s) -> Generic (PTxInfo s)
Rep (PTxInfo s) -> PTxInfo s
PTxInfo s -> Rep (PTxInfo s)
forall a.
All SListI (Code a) =>
(a -> Rep a) -> (Rep a -> a) -> Generic a
forall (s :: S). All SListI (Code (PTxInfo s))
forall (s :: S). Rep (PTxInfo s) -> PTxInfo s
forall (s :: S). PTxInfo s -> Rep (PTxInfo s)
$cfrom :: forall (s :: S). PTxInfo s -> Rep (PTxInfo s)
from :: PTxInfo s -> Rep (PTxInfo s)
$cto :: forall (s :: S). Rep (PTxInfo s) -> PTxInfo s
to :: Rep (PTxInfo s) -> PTxInfo s
SOP.Generic
    , -- | @since 3.1.1
      (forall (s :: S). Term s (PAsData PTxInfo) -> Term s PTxInfo)
-> (forall (s :: S). Term s PTxInfo -> Term s PData)
-> PIsData PTxInfo
forall (s :: S). Term s (PAsData PTxInfo) -> Term s PTxInfo
forall (s :: S). Term s PTxInfo -> 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 PTxInfo) -> Term s PTxInfo
pfromDataImpl :: forall (s :: S). Term s (PAsData PTxInfo) -> Term s PTxInfo
$cpdataImpl :: forall (s :: S). Term s PTxInfo -> Term s PData
pdataImpl :: forall (s :: S). Term s PTxInfo -> Term s PData
PIsData
    , -- | @since 3.1.1
      (forall (s :: S). Term s PTxInfo -> Term s PTxInfo -> Term s PBool)
-> PEq PTxInfo
forall (s :: S). Term s PTxInfo -> Term s PTxInfo -> 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 PTxInfo -> Term s PTxInfo -> Term s PBool
#== :: forall (s :: S). Term s PTxInfo -> Term s PTxInfo -> Term s PBool
PEq
    , -- | @since 3.1.1
      (forall (s :: S). Bool -> Term s PTxInfo -> Term s PString)
-> PShow PTxInfo
forall (s :: S). Bool -> Term s PTxInfo -> 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 PTxInfo -> Term s PString
pshow' :: forall (s :: S). Bool -> Term s PTxInfo -> Term s PString
PShow
    )
  deriving
    ( -- | @since 3.3.0
      (forall (s :: S). PTxInfo s -> Term s (PInner PTxInfo))
-> (forall (s :: S) (b :: S -> Type).
    Term s (PInner PTxInfo) -> (PTxInfo s -> Term s b) -> Term s b)
-> PlutusType PTxInfo
forall (s :: S). PTxInfo s -> Term s (PInner PTxInfo)
forall (s :: S) (b :: S -> Type).
Term s (PInner PTxInfo) -> (PTxInfo 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). PTxInfo s -> Term s (PInner PTxInfo)
pcon' :: forall (s :: S). PTxInfo s -> Term s (PInner PTxInfo)
$cpmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PTxInfo) -> (PTxInfo s -> Term s b) -> Term s b
pmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PTxInfo) -> (PTxInfo s -> Term s b) -> Term s b
PlutusType
    )
    via (DeriveAsDataStruct PTxInfo)

-- | @since 3.3.0
deriving via
  DeriveDataPLiftable PTxInfo Plutus.TxInfo
  instance
    PLiftable PTxInfo

-- | @since 3.1.1
data PScriptContext (s :: S) = PScriptContext
  { forall (s :: S). PScriptContext s -> Term s PTxInfo
pscriptContext'txInfo :: Term s PTxInfo
  , forall (s :: S). PScriptContext s -> Term s PScriptPurpose
pscriptContext'purpose :: Term s Contexts.PScriptPurpose
  }
  deriving stock
    ( -- | @since 3.1.1
      (forall x. PScriptContext s -> Rep (PScriptContext s) x)
-> (forall x. Rep (PScriptContext s) x -> PScriptContext s)
-> Generic (PScriptContext s)
forall x. Rep (PScriptContext s) x -> PScriptContext s
forall x. PScriptContext s -> Rep (PScriptContext s) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (s :: S) x. Rep (PScriptContext s) x -> PScriptContext s
forall (s :: S) x. PScriptContext s -> Rep (PScriptContext s) x
$cfrom :: forall (s :: S) x. PScriptContext s -> Rep (PScriptContext s) x
from :: forall x. PScriptContext s -> Rep (PScriptContext s) x
$cto :: forall (s :: S) x. Rep (PScriptContext s) x -> PScriptContext s
to :: forall x. Rep (PScriptContext s) x -> PScriptContext s
Generic
    )
  deriving anyclass
    ( -- | @since 3.3.0
      All SListI (Code (PScriptContext s))
All SListI (Code (PScriptContext s)) =>
(PScriptContext s -> Rep (PScriptContext s))
-> (Rep (PScriptContext s) -> PScriptContext s)
-> Generic (PScriptContext s)
Rep (PScriptContext s) -> PScriptContext s
PScriptContext s -> Rep (PScriptContext s)
forall a.
All SListI (Code a) =>
(a -> Rep a) -> (Rep a -> a) -> Generic a
forall (s :: S). All SListI (Code (PScriptContext s))
forall (s :: S). Rep (PScriptContext s) -> PScriptContext s
forall (s :: S). PScriptContext s -> Rep (PScriptContext s)
$cfrom :: forall (s :: S). PScriptContext s -> Rep (PScriptContext s)
from :: PScriptContext s -> Rep (PScriptContext s)
$cto :: forall (s :: S). Rep (PScriptContext s) -> PScriptContext s
to :: Rep (PScriptContext s) -> PScriptContext s
SOP.Generic
    , -- | @since 3.1.1
      (forall (s :: S).
 Term s (PAsData PScriptContext) -> Term s PScriptContext)
-> (forall (s :: S). Term s PScriptContext -> Term s PData)
-> PIsData PScriptContext
forall (s :: S).
Term s (PAsData PScriptContext) -> Term s PScriptContext
forall (s :: S). Term s PScriptContext -> 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 PScriptContext) -> Term s PScriptContext
pfromDataImpl :: forall (s :: S).
Term s (PAsData PScriptContext) -> Term s PScriptContext
$cpdataImpl :: forall (s :: S). Term s PScriptContext -> Term s PData
pdataImpl :: forall (s :: S). Term s PScriptContext -> Term s PData
PIsData
    , -- | @since 3.1.1
      (forall (s :: S).
 Term s PScriptContext -> Term s PScriptContext -> Term s PBool)
-> PEq PScriptContext
forall (s :: S).
Term s PScriptContext -> Term s PScriptContext -> 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 PScriptContext -> Term s PScriptContext -> Term s PBool
#== :: forall (s :: S).
Term s PScriptContext -> Term s PScriptContext -> Term s PBool
PEq
    , -- | @since 3.1.1
      (forall (s :: S). Bool -> Term s PScriptContext -> Term s PString)
-> PShow PScriptContext
forall (s :: S). Bool -> Term s PScriptContext -> 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 PScriptContext -> Term s PString
pshow' :: forall (s :: S). Bool -> Term s PScriptContext -> Term s PString
PShow
    )
  deriving
    ( -- | @since 3.3.0
      (forall (s :: S).
 PScriptContext s -> Term s (PInner PScriptContext))
-> (forall (s :: S) (b :: S -> Type).
    Term s (PInner PScriptContext)
    -> (PScriptContext s -> Term s b) -> Term s b)
-> PlutusType PScriptContext
forall (s :: S). PScriptContext s -> Term s (PInner PScriptContext)
forall (s :: S) (b :: S -> Type).
Term s (PInner PScriptContext)
-> (PScriptContext 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). PScriptContext s -> Term s (PInner PScriptContext)
pcon' :: forall (s :: S). PScriptContext s -> Term s (PInner PScriptContext)
$cpmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PScriptContext)
-> (PScriptContext s -> Term s b) -> Term s b
pmatch' :: forall (s :: S) (b :: S -> Type).
Term s (PInner PScriptContext)
-> (PScriptContext s -> Term s b) -> Term s b
PlutusType
    )
    via (DeriveAsDataStruct PScriptContext)

-- | @since 3.3.0
deriving via
  DeriveDataPLiftable PScriptContext Plutus.ScriptContext
  instance
    PLiftable PScriptContext