plutus-script-utils-1.2.0.0: Helper/utility functions for writing Plutus scripts.
Safe HaskellNone
LanguageHaskell2010

Plutus.Script.Utils.V1.Contexts

Synopsis

Documentation

data ScriptContext #

Instances

Instances details
Eq ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep ScriptContext :: Type -> Type Source #

Eq ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

fromBuiltinData :: BuiltinData -> Maybe ScriptContext

Pretty ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

pretty :: ScriptContext -> Doc ann

prettyList :: [ScriptContext] -> Doc ann

ToData ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

toBuiltinData :: ScriptContext -> BuiltinData

UnsafeFromData ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

unsafeFromBuiltinData :: BuiltinData -> ScriptContext

IsScriptContext ScriptContext Source # 
Instance details

Defined in Plutus.Script.Utils.Typed

Methods

mkUntypedValidator :: (UnsafeFromData d, UnsafeFromData r) => (d -> r -> ScriptContext -> Bool) -> UntypedValidator Source #

mkUntypedStakeValidator :: UnsafeFromData r => (r -> ScriptContext -> Bool) -> UntypedStakeValidator Source #

mkUntypedMintingPolicy :: UnsafeFromData r => (r -> ScriptContext -> Bool) -> UntypedMintingPolicy Source #

Lift DefaultUni ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

lift :: ScriptContext -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

typeRep :: Proxy ScriptContext -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep ScriptContext 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep ScriptContext = D1 ('MetaData "ScriptContext" "Plutus.V1.Ledger.Contexts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) (C1 ('MetaCons "ScriptContext" 'PrefixI 'True) (S1 ('MetaSel ('Just "scriptContextTxInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxInfo) :*: S1 ('MetaSel ('Just "scriptContextPurpose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptPurpose)))

data ScriptPurpose #

Constructors

Minting CurrencySymbol 
Spending TxOutRef 
Rewarding StakingCredential 
Certifying DCert 

Instances

Instances details
Eq ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep ScriptPurpose :: Type -> Type Source #

Eq ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

FromData ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

fromBuiltinData :: BuiltinData -> Maybe ScriptPurpose

Pretty ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

pretty :: ScriptPurpose -> Doc ann

prettyList :: [ScriptPurpose] -> Doc ann

ToData ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

toBuiltinData :: ScriptPurpose -> BuiltinData

UnsafeFromData ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

unsafeFromBuiltinData :: BuiltinData -> ScriptPurpose

Lift DefaultUni ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

lift :: ScriptPurpose -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

typeRep :: Proxy ScriptPurpose -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep ScriptPurpose 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep ScriptPurpose = D1 ('MetaData "ScriptPurpose" "Plutus.V1.Ledger.Contexts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) ((C1 ('MetaCons "Minting" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CurrencySymbol)) :+: C1 ('MetaCons "Spending" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef))) :+: (C1 ('MetaCons "Rewarding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StakingCredential)) :+: C1 ('MetaCons "Certifying" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCert))))

data TxInInfo #

Instances

Instances details
Eq TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep TxInInfo :: Type -> Type Source #

Eq TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

(==) :: TxInInfo -> TxInInfo -> Bool

FromData TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

fromBuiltinData :: BuiltinData -> Maybe TxInInfo

Pretty TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

pretty :: TxInInfo -> Doc ann

prettyList :: [TxInInfo] -> Doc ann

ToData TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

toBuiltinData :: TxInInfo -> BuiltinData

UnsafeFromData TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

unsafeFromBuiltinData :: BuiltinData -> TxInInfo

Lift DefaultUni TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

lift :: TxInInfo -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

typeRep :: Proxy TxInInfo -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep TxInInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep TxInInfo = D1 ('MetaData "TxInInfo" "Plutus.V1.Ledger.Contexts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) (C1 ('MetaCons "TxInInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "txInInfoOutRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef) :*: S1 ('MetaSel ('Just "txInInfoResolved") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOut)))

data TxInfo #

Constructors

TxInfo 

Fields

Instances

Instances details
Eq TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Show TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Generic TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Associated Types

type Rep TxInfo :: Type -> Type Source #

Eq TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

(==) :: TxInfo -> TxInfo -> Bool

FromData TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

fromBuiltinData :: BuiltinData -> Maybe TxInfo

Pretty TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

pretty :: TxInfo -> Doc ann

prettyList :: [TxInfo] -> Doc ann

ToData TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

toBuiltinData :: TxInfo -> BuiltinData

UnsafeFromData TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

unsafeFromBuiltinData :: BuiltinData -> TxInfo

Lift DefaultUni TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

lift :: TxInfo -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

Methods

typeRep :: Proxy TxInfo -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep TxInfo 
Instance details

Defined in Plutus.V1.Ledger.Contexts

type Rep TxInfo = D1 ('MetaData "TxInfo" "Plutus.V1.Ledger.Contexts" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) (C1 ('MetaCons "TxInfo" 'PrefixI 'True) (((S1 ('MetaSel ('Just "txInfoInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxInInfo]) :*: S1 ('MetaSel ('Just "txInfoOutputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxOut])) :*: (S1 ('MetaSel ('Just "txInfoFee") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: (S1 ('MetaSel ('Just "txInfoMint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "txInfoDCert") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DCert])))) :*: ((S1 ('MetaSel ('Just "txInfoWdrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(StakingCredential, Integer)]) :*: S1 ('MetaSel ('Just "txInfoValidRange") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTimeRange)) :*: (S1 ('MetaSel ('Just "txInfoSignatories") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PubKeyHash]) :*: (S1 ('MetaSel ('Just "txInfoData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(DatumHash, Datum)]) :*: S1 ('MetaSel ('Just "txInfoId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId))))))

newtype TxId #

Constructors

TxId 

Fields

Instances

Instances details
Eq TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

(==) :: TxId -> TxId -> Bool Source #

(/=) :: TxId -> TxId -> Bool Source #

Ord TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

IsString TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxId :: Type -> Type Source #

Methods

from :: TxId -> Rep TxId x Source #

to :: Rep TxId x -> TxId Source #

NFData TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxId -> () Source #

Eq TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

(==) :: TxId -> TxId -> Bool

FromData TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

fromBuiltinData :: BuiltinData -> Maybe TxId

Ord TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

compare :: TxId -> TxId -> Ordering

(<) :: TxId -> TxId -> Bool

(<=) :: TxId -> TxId -> Bool

(>) :: TxId -> TxId -> Bool

(>=) :: TxId -> TxId -> Bool

max :: TxId -> TxId -> TxId

min :: TxId -> TxId -> TxId

Pretty TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

pretty :: TxId -> Doc ann

prettyList :: [TxId] -> Doc ann

ToData TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

toBuiltinData :: TxId -> BuiltinData

UnsafeFromData TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

unsafeFromBuiltinData :: BuiltinData -> TxId

Lift DefaultUni TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

lift :: TxId -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

typeRep :: Proxy TxId -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep TxId 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxId = D1 ('MetaData "TxId" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'True) (C1 ('MetaCons "TxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))

data TxOut #

Constructors

TxOut 

Instances

Instances details
Eq TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

(==) :: TxOut -> TxOut -> Bool Source #

(/=) :: TxOut -> TxOut -> Bool Source #

Show TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxOut :: Type -> Type Source #

Methods

from :: TxOut -> Rep TxOut x Source #

to :: Rep TxOut x -> TxOut Source #

NFData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxOut -> () Source #

Eq TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

(==) :: TxOut -> TxOut -> Bool

FromData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

fromBuiltinData :: BuiltinData -> Maybe TxOut

Pretty TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

pretty :: TxOut -> Doc ann

prettyList :: [TxOut] -> Doc ann

ToData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

toBuiltinData :: TxOut -> BuiltinData

UnsafeFromData TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

unsafeFromBuiltinData :: BuiltinData -> TxOut

Lift DefaultUni TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

lift :: TxOut -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

typeRep :: Proxy TxOut -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep TxOut 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOut = D1 ('MetaData "TxOut" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Address) :*: (S1 ('MetaSel ('Just "txOutValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "txOutDatumHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DatumHash)))))

data TxOutRef #

Constructors

TxOutRef 

Instances

Instances details
Eq TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Ord TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Show TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Generic TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Associated Types

type Rep TxOutRef :: Type -> Type Source #

NFData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

rnf :: TxOutRef -> () Source #

Eq TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

(==) :: TxOutRef -> TxOutRef -> Bool

FromData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

fromBuiltinData :: BuiltinData -> Maybe TxOutRef

Pretty TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

pretty :: TxOutRef -> Doc ann

prettyList :: [TxOutRef] -> Doc ann

ToData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

toBuiltinData :: TxOutRef -> BuiltinData

UnsafeFromData TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

unsafeFromBuiltinData :: BuiltinData -> TxOutRef

Lift DefaultUni TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

lift :: TxOutRef -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ())

Typeable DefaultUni TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

Methods

typeRep :: Proxy TxOutRef -> RTCompile DefaultUni fun (Type TyName DefaultUni ())

type Rep TxOutRef 
Instance details

Defined in Plutus.V1.Ledger.Tx

type Rep TxOutRef = D1 ('MetaData "TxOutRef" "Plutus.V1.Ledger.Tx" "plutus-ledger-api-1.0.0.1-6EvbyJiK8IAAVEtnIJDu5Z" 'False) (C1 ('MetaCons "TxOutRef" 'PrefixI 'True) (S1 ('MetaSel ('Just "txOutRefId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: S1 ('MetaSel ('Just "txOutRefIdx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

pubKeyOutput :: TxOut -> Maybe PubKeyHash #

pubKeyOutputsAt :: PubKeyHash -> TxInfo -> [Value] #

txSignedBy :: TxInfo -> PubKeyHash -> Bool #

outputsAt :: Address -> TxInfo -> [Value] Source #

Get the values paid to a public key address by a pending transaction.

valuePaidTo :: TxInfo -> Address -> Value Source #

Get the total value paid to a public key address by a pending transaction.