module Plutus.V1.Ledger.Api (
SerializedScript
, Script
, fromCompiledCode
, isScriptWellFormed
, evaluateScriptRestricting
, evaluateScriptCounting
, ProtocolVersion (..)
, VerboseMode (..)
, LogOutput
, ExBudget (..)
, ExCPU (..)
, ExMemory (..)
, SatInt
, EvaluationContext
, mkEvaluationContext
, CostModelApplyError (..)
, CostModelParams
, assertWellFormedCostModelParams
, costModelParamNames
, ScriptContext(..)
, ScriptPurpose(..)
, BuiltinByteString
, toBuiltin
, fromBuiltin
, LedgerBytes (..)
, fromBytes
, DCert(..)
, StakingCredential(..)
, Credential(..)
, Value (..)
, CurrencySymbol (..)
, TokenName (..)
, singleton
, unionWith
, adaSymbol
, adaToken
, POSIXTime (..)
, POSIXTimeRange
, Address (..)
, PubKeyHash (..)
, TxId (..)
, TxInfo (..)
, TxOut(..)
, TxOutRef(..)
, TxInInfo(..)
, Interval (..)
, Extended (..)
, Closure
, UpperBound (..)
, LowerBound (..)
, always
, from
, to
, lowerBound
, upperBound
, strictLowerBound
, strictUpperBound
, Validator (..)
, mkValidatorScript
, unValidatorScript
, ValidatorHash (..)
, MintingPolicy (..)
, mkMintingPolicyScript
, unMintingPolicyScript
, MintingPolicyHash (..)
, StakeValidator (..)
, mkStakeValidatorScript
, unStakeValidatorScript
, StakeValidatorHash (..)
, Redeemer (..)
, RedeemerHash (..)
, Datum (..)
, DatumHash (..)
, PLC.Data (..)
, BuiltinData (..)
, ToData (..)
, FromData (..)
, UnsafeFromData (..)
, toData
, fromData
, dataToBuiltinData
, builtinDataToData
, EvaluationError (..)
) where
import Data.SatInt
import Plutus.ApiCommon as Common hiding (evaluateScriptCounting, evaluateScriptRestricting, isScriptWellFormed)
import Plutus.ApiCommon qualified as Common (evaluateScriptCounting, evaluateScriptRestricting, isScriptWellFormed)
import Plutus.V1.Ledger.Address
import Plutus.V1.Ledger.Bytes
import Plutus.V1.Ledger.Contexts
import Plutus.V1.Ledger.Credential
import Plutus.V1.Ledger.Crypto
import Plutus.V1.Ledger.DCert
import Plutus.V1.Ledger.EvaluationContext
import Plutus.V1.Ledger.Interval hiding (singleton)
import Plutus.V1.Ledger.Scripts as Scripts
import Plutus.V1.Ledger.Time
import Plutus.V1.Ledger.Value
import PlutusCore.Data qualified as PLC
import PlutusCore.Evaluation.Machine.ExBudget as PLC
import PlutusCore.Evaluation.Machine.ExMemory (ExCPU (..), ExMemory (..))
import PlutusTx (FromData (..), ToData (..), UnsafeFromData (..), fromData, toData)
import PlutusTx.Builtins.Internal (BuiltinData (..), builtinDataToData, dataToBuiltinData)
import PlutusTx.Prelude (BuiltinByteString, fromBuiltin, toBuiltin)
isScriptWellFormed :: ProtocolVersion -> SerializedScript -> Bool
isScriptWellFormed :: ProtocolVersion -> SerializedScript -> Bool
isScriptWellFormed = LedgerPlutusVersion -> ProtocolVersion -> SerializedScript -> Bool
Common.isScriptWellFormed LedgerPlutusVersion
PlutusV1
evaluateScriptCounting
:: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerializedScript
-> [PLC.Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting :: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptCounting = LedgerPlutusVersion
-> ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptCounting LedgerPlutusVersion
PlutusV1
evaluateScriptRestricting
:: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerializedScript
-> [PLC.Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptRestricting :: ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
evaluateScriptRestricting = LedgerPlutusVersion
-> ProtocolVersion
-> VerboseMode
-> EvaluationContext
-> ExBudget
-> SerializedScript
-> [Data]
-> (LogOutput, Either EvaluationError ExBudget)
Common.evaluateScriptRestricting LedgerPlutusVersion
PlutusV1