{-# OPTIONS_GHC -Wno-orphans #-}
module Plutarch.LedgerApi.V1.Address (
PAddress (..),
) where
import GHC.Generics (Generic)
import Plutarch.LedgerApi.Utils (PMaybeData)
import Plutarch.LedgerApi.V1.Credential (PCredential, PStakingCredential)
import Plutarch.Prelude
import PlutusLedgerApi.V1 qualified as Plutus
newtype PAddress (s :: S)
= PAddress
( Term
s
( PDataRecord
'[ "credential" ':= PCredential
, "stakingCredential" ':= PMaybeData PStakingCredential
]
)
)
deriving stock
(
(forall x. PAddress s -> Rep (PAddress s) x)
-> (forall x. Rep (PAddress s) x -> PAddress s)
-> Generic (PAddress s)
forall x. Rep (PAddress s) x -> PAddress s
forall x. PAddress s -> Rep (PAddress s) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (s :: S) x. Rep (PAddress s) x -> PAddress s
forall (s :: S) x. PAddress s -> Rep (PAddress s) x
$cfrom :: forall (s :: S) x. PAddress s -> Rep (PAddress s) x
from :: forall x. PAddress s -> Rep (PAddress s) x
$cto :: forall (s :: S) x. Rep (PAddress s) x -> PAddress s
to :: forall x. Rep (PAddress s) x -> PAddress s
Generic
)
deriving anyclass
(
(forall (s :: S). PAddress s -> Term s (PInner PAddress))
-> (forall (s :: S) (b :: PType).
Term s (PInner PAddress) -> (PAddress s -> Term s b) -> Term s b)
-> PlutusType PAddress
forall (s :: S). PAddress s -> Term s (PInner PAddress)
forall (s :: S) (b :: PType).
Term s (PInner PAddress) -> (PAddress s -> Term s b) -> Term s b
forall (a :: PType).
(forall (s :: S). a s -> Term s (PInner a))
-> (forall (s :: S) (b :: PType).
Term s (PInner a) -> (a s -> Term s b) -> Term s b)
-> PlutusType a
$cpcon' :: forall (s :: S). PAddress s -> Term s (PInner PAddress)
pcon' :: forall (s :: S). PAddress s -> Term s (PInner PAddress)
$cpmatch' :: forall (s :: S) (b :: PType).
Term s (PInner PAddress) -> (PAddress s -> Term s b) -> Term s b
pmatch' :: forall (s :: S) (b :: PType).
Term s (PInner PAddress) -> (PAddress s -> Term s b) -> Term s b
PlutusType
,
(forall (s :: S). Term s (PAsData PAddress) -> Term s PAddress)
-> (forall (s :: S). Term s PAddress -> Term s PData)
-> PIsData PAddress
forall (s :: S). Term s (PAsData PAddress) -> Term s PAddress
forall (s :: S). Term s PAddress -> Term s PData
forall (a :: PType).
(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 PAddress) -> Term s PAddress
pfromDataImpl :: forall (s :: S). Term s (PAsData PAddress) -> Term s PAddress
$cpdataImpl :: forall (s :: S). Term s PAddress -> Term s PData
pdataImpl :: forall (s :: S). Term s PAddress -> Term s PData
PIsData
,
(forall (s :: S).
Term s PAddress -> Term s (PDataRecord (PFields PAddress)))
-> PDataFields PAddress
forall (s :: S).
Term s PAddress -> Term s (PDataRecord (PFields PAddress))
forall (a :: PType).
(forall (s :: S). Term s a -> Term s (PDataRecord (PFields a)))
-> PDataFields a
$cptoFields :: forall (s :: S).
Term s PAddress -> Term s (PDataRecord (PFields PAddress))
ptoFields :: forall (s :: S).
Term s PAddress -> Term s (PDataRecord (PFields PAddress))
PDataFields
,
(forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PBool)
-> PEq PAddress
forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
forall (t :: PType).
(forall (s :: S). Term s t -> Term s t -> Term s PBool) -> PEq t
$c#== :: forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
#== :: forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
PEq
,
PEq PAddress
PEq PAddress =>
(forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PBool)
-> (forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PBool)
-> (forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PAddress)
-> (forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PAddress)
-> POrd PAddress
forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PAddress
forall (t :: PType).
PEq t =>
(forall (s :: S). Term s t -> Term s t -> Term s PBool)
-> (forall (s :: S). Term s t -> Term s t -> Term s PBool)
-> (forall (s :: S). Term s t -> Term s t -> Term s t)
-> (forall (s :: S). Term s t -> Term s t -> Term s t)
-> POrd t
$c#<= :: forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
#<= :: forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
$c#< :: forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
#< :: forall (s :: S). Term s PAddress -> Term s PAddress -> Term s PBool
$cpmax :: forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PAddress
pmax :: forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PAddress
$cpmin :: forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PAddress
pmin :: forall (s :: S).
Term s PAddress -> Term s PAddress -> Term s PAddress
POrd
,
(forall (s :: S). Bool -> Term s PAddress -> Term s PString)
-> PShow PAddress
forall (s :: S). Bool -> Term s PAddress -> Term s PString
forall (t :: PType).
(forall (s :: S). Bool -> Term s t -> Term s PString) -> PShow t
$cpshow' :: forall (s :: S). Bool -> Term s PAddress -> Term s PString
pshow' :: forall (s :: S). Bool -> Term s PAddress -> Term s PString
PShow
,
PTryFrom PData
)
instance DerivePlutusType PAddress where
type DPTStrat _ = PlutusTypeData
deriving via
DeriveDataPLiftable PAddress Plutus.Address
instance
PLiftable PAddress
instance PTryFrom PData (PAsData PAddress)