ytxp-plutarch-0.2.0: Control scripts, types, and utilities for the YTxP architecture
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.YTxP.Control.Yielding

Description

in the Yielding Transaction Protocol (YTxP). It includes types and functions for working with authorised scripts, yielding redeemers, and retrieving script hashes.

The module defines the following key components:

  • PAuthorisedScriptPurpose: An enumeration representing the purpose of an authorised script, which can be minting, spending, or rewarding.
  • PYieldingRedeemer: A data type representing the redeemer for yielding transactions. It includes an index for the authorised script and a proof index.
  • getAuthorisedScriptHash: A function that retrieves the hash of an authorised script based on the provided currency symbol, transaction reference inputs, and yielding redeemer.

This module is part of the YTxP SDK and is designed to be used in conjunction with other modules in the SDK to facilitate the creation and validation of yielding transactions.

Synopsis

Documentation

getAuthorisedScriptHash :: forall (s :: S). Term s (PCurrencySymbol :--> (PBuiltinList (PAsData PTxInInfo) :--> (PYieldingRedeemer :--> PScriptHash))) Source #

Retrieves the hash of an authorised script based on the provided currency symbol, transaction reference inputs, and yielding redeemer.

data PAuthorisedScriptPurpose (s :: S) Source #

A data type representing the purpose of an authorised script.

Constructors

PMinting 
PSpending 
PRewarding 

Instances

Instances details
PEq PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Methods

(#==) :: forall (s :: S). Term s PAuthorisedScriptPurpose -> Term s PAuthorisedScriptPurpose -> Term s PBool

PIsData PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PAuthorisedScriptPurpose) -> Term s PAuthorisedScriptPurpose

pdataImpl :: forall (s :: S). Term s PAuthorisedScriptPurpose -> Term s PData

PLiftable PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type AsHaskell PAuthorisedScriptPurpose

type PlutusRepr PAuthorisedScriptPurpose

Methods

haskToRepr :: AsHaskell PAuthorisedScriptPurpose -> PlutusRepr PAuthorisedScriptPurpose

reprToHask :: PlutusRepr PAuthorisedScriptPurpose -> Either LiftError (AsHaskell PAuthorisedScriptPurpose)

reprToPlut :: forall (s :: S). PlutusRepr PAuthorisedScriptPurpose -> PLifted s PAuthorisedScriptPurpose

plutToRepr :: (forall (s :: S). PLifted s PAuthorisedScriptPurpose) -> Either LiftError (PlutusRepr PAuthorisedScriptPurpose)

PlutusType PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type PInner PAuthorisedScriptPurpose :: PType

type PCovariant' PAuthorisedScriptPurpose

type PContravariant' PAuthorisedScriptPurpose

type PVariant' PAuthorisedScriptPurpose

Methods

pcon' :: forall (s :: S). PAuthorisedScriptPurpose s -> Term s (PInner PAuthorisedScriptPurpose)

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner PAuthorisedScriptPurpose) -> (PAuthorisedScriptPurpose s -> Term s b) -> Term s b

PTryFrom PData (PAsData PAuthorisedScriptPurpose) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type PTryFromExcess PData (PAsData PAuthorisedScriptPurpose) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PAuthorisedScriptPurpose), Reduce (PTryFromExcess PData (PAsData PAuthorisedScriptPurpose) s)) -> Term s r) -> Term s r

Bounded (PAuthorisedScriptPurpose s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Enum (PAuthorisedScriptPurpose s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Generic (PAuthorisedScriptPurpose s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type Rep (PAuthorisedScriptPurpose s) :: Type -> Type Source #

Generic (PAuthorisedScriptPurpose s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type Code (PAuthorisedScriptPurpose s) :: [[Type]]

type AsHaskell PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type AsHaskell PAuthorisedScriptPurpose = AuthorisedScriptPurpose
type PlutusRepr PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PContravariant' PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PContravariant' PAuthorisedScriptPurpose = PContravariant' (DeriveAsTag PAuthorisedScriptPurpose)
type PCovariant' PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PCovariant' PAuthorisedScriptPurpose = PCovariant' (DeriveAsTag PAuthorisedScriptPurpose)
type PInner PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PInner PAuthorisedScriptPurpose = PInner (DeriveAsTag PAuthorisedScriptPurpose)
type PVariant' PAuthorisedScriptPurpose Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PVariant' PAuthorisedScriptPurpose = PVariant' (DeriveAsTag PAuthorisedScriptPurpose)
type PTryFromExcess PData (PAsData PAuthorisedScriptPurpose) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PTryFromExcess PData (PAsData PAuthorisedScriptPurpose) = PTryFromExcess PData (PInner (PAsData PAuthorisedScriptPurpose))
type Rep (PAuthorisedScriptPurpose s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type Rep (PAuthorisedScriptPurpose s) = D1 ('MetaData "PAuthorisedScriptPurpose" "Cardano.YTxP.Control.Yielding" "ytxp-plutarch-0.2.0-MQKMaKQ6tIvETNN2Lark" 'False) (C1 ('MetaCons "PMinting" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PSpending" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PRewarding" 'PrefixI 'False) (U1 :: Type -> Type)))
type Code (PAuthorisedScriptPurpose s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

data PYieldingRedeemer (s :: S) Source #

A data type representing the redeemer for yielding transactions.

Constructors

PYieldingRedeemer 

Fields

Instances

Instances details
PIsData PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PYieldingRedeemer) -> Term s PYieldingRedeemer

pdataImpl :: forall (s :: S). Term s PYieldingRedeemer -> Term s PData

PLiftable PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type AsHaskell PYieldingRedeemer

type PlutusRepr PYieldingRedeemer

Methods

haskToRepr :: AsHaskell PYieldingRedeemer -> PlutusRepr PYieldingRedeemer

reprToHask :: PlutusRepr PYieldingRedeemer -> Either LiftError (AsHaskell PYieldingRedeemer)

reprToPlut :: forall (s :: S). PlutusRepr PYieldingRedeemer -> PLifted s PYieldingRedeemer

plutToRepr :: (forall (s :: S). PLifted s PYieldingRedeemer) -> Either LiftError (PlutusRepr PYieldingRedeemer)

PlutusType PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type PInner PYieldingRedeemer :: PType

type PCovariant' PYieldingRedeemer

type PContravariant' PYieldingRedeemer

type PVariant' PYieldingRedeemer

Methods

pcon' :: forall (s :: S). PYieldingRedeemer s -> Term s (PInner PYieldingRedeemer)

pmatch' :: forall (s :: S) (b :: PType). Term s (PInner PYieldingRedeemer) -> (PYieldingRedeemer s -> Term s b) -> Term s b

PTryFrom PData (PAsData PYieldingRedeemer) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type PTryFromExcess PData (PAsData PYieldingRedeemer) :: PType

Methods

ptryFrom' :: forall (s :: S) (r :: PType). Term s PData -> ((Term s (PAsData PYieldingRedeemer), Reduce (PTryFromExcess PData (PAsData PYieldingRedeemer) s)) -> Term s r) -> Term s r

Generic (PYieldingRedeemer s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type Rep (PYieldingRedeemer s) :: Type -> Type Source #

Generic (PYieldingRedeemer s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

Associated Types

type Code (PYieldingRedeemer s) :: [[Type]]

type AsHaskell PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type AsHaskell PYieldingRedeemer = AsHaskell (DeriveDataPLiftable PYieldingRedeemer YieldingRedeemer)
type PlutusRepr PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PlutusRepr PYieldingRedeemer = PlutusRepr (DeriveDataPLiftable PYieldingRedeemer YieldingRedeemer)
type PContravariant' PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PContravariant' PYieldingRedeemer = PContravariant' (DeriveAsDataStruct PYieldingRedeemer)
type PCovariant' PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PCovariant' PYieldingRedeemer = PCovariant' (DeriveAsDataStruct PYieldingRedeemer)
type PInner PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PInner PYieldingRedeemer = PInner (DeriveAsDataStruct PYieldingRedeemer)
type PVariant' PYieldingRedeemer Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PVariant' PYieldingRedeemer = PVariant' (DeriveAsDataStruct PYieldingRedeemer)
type PTryFromExcess PData (PAsData PYieldingRedeemer) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type PTryFromExcess PData (PAsData PYieldingRedeemer) = PTryFromExcess PData (PInner (PAsData PYieldingRedeemer))
type Rep (PYieldingRedeemer s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type Code (PYieldingRedeemer s) Source # 
Instance details

Defined in Cardano.YTxP.Control.Yielding

type Code (PYieldingRedeemer s) = GCode (PYieldingRedeemer s)