Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Language
- data Versioned script = Versioned {
- unversioned :: script
- version :: Language
- forwardingMintingPolicy :: TypedValidator a -> MintingPolicy
- forwardingMintingPolicyHash :: TypedValidator a -> MintingPolicyHash
- generalise :: TypedValidator a -> TypedValidator Any
- vForwardingMintingPolicy :: TypedValidator a -> Versioned MintingPolicy
- vValidatorScript :: TypedValidator a -> Versioned Validator
- validatorAddress :: TypedValidator a -> Address
- validatorHash :: TypedValidator a -> ValidatorHash
- validatorScript :: TypedValidator a -> Validator
- class UnsafeFromData sc => IsScriptContext sc where
- mkUntypedValidator :: (UnsafeFromData d, UnsafeFromData r) => (d -> r -> sc -> Bool) -> UntypedValidator
- mkUntypedStakeValidator :: UnsafeFromData r => (r -> sc -> Bool) -> UntypedStakeValidator
- mkUntypedMintingPolicy :: UnsafeFromData r => (r -> sc -> Bool) -> UntypedMintingPolicy
- data TypedValidator a = TypedValidator {}
- type UntypedValidator = BuiltinData -> BuiltinData -> BuiltinData -> ()
- class ValidatorTypes a where
- type RedeemerType a
- type DatumType a
- type family DatumType a
- type family RedeemerType a
- validatorCardanoAddress :: NetworkId -> TypedValidator a -> AddressInEra BabbageEra
- validatorCardanoAddressAny :: NetworkId -> TypedValidator a -> AddressAny
- data Any
- type ScriptContextV1 = ScriptContext
- type ScriptContextV2 = ScriptContext
- type UntypedMintingPolicy = BuiltinData -> BuiltinData -> ()
- type UntypedStakeValidator = BuiltinData -> BuiltinData -> ()
- data MintingPolicy
- data Validator
- data ConnectionError
- = WrongValidatorAddress Address Address
- | WrongOutType WrongOutTypeError
- | WrongValidatorType String
- | WrongRedeemerType BuiltinData
- | WrongDatumType BuiltinData
- | NoDatum TxOutRef DatumHash
- | UnknownRef TxOutRef
- mkForwardingMintingPolicy :: Versioned Validator -> Versioned MintingPolicy
- unsafeMkTypedValidator :: Versioned Validator -> TypedValidator Any
- type ValidatorType a = DatumType a -> RedeemerType a -> ScriptContext -> Bool
- mkTypedValidator :: CompiledCode (ValidatorType a) -> CompiledCode (ValidatorType a -> UntypedValidator) -> TypedValidator a
- mkTypedValidatorParam :: forall a param. Lift DefaultUni param => CompiledCode (param -> ValidatorType a) -> CompiledCode (ValidatorType a -> UntypedValidator) -> param -> TypedValidator a
Documentation
Instances
Versioned | |
|
Instances
Functor Versioned | |
Eq script => Eq (Versioned script) | |
Ord script => Ord (Versioned script) | |
Defined in Plutus.Script.Utils.Scripts compare :: Versioned script -> Versioned script -> Ordering Source # (<) :: Versioned script -> Versioned script -> Bool Source # (<=) :: Versioned script -> Versioned script -> Bool Source # (>) :: Versioned script -> Versioned script -> Bool Source # (>=) :: Versioned script -> Versioned script -> Bool Source # max :: Versioned script -> Versioned script -> Versioned script Source # min :: Versioned script -> Versioned script -> Versioned script Source # | |
Show script => Show (Versioned script) | |
Generic (Versioned script) | |
Serialise script => Serialise (Versioned script) | |
Defined in Plutus.Script.Utils.Scripts encode :: Versioned script -> Encoding decode :: Decoder s (Versioned script) encodeList :: [Versioned script] -> Encoding decodeList :: Decoder s [Versioned script] | |
FromJSON script => FromJSON (Versioned script) | |
Defined in Plutus.Script.Utils.Scripts parseJSON :: Value -> Parser (Versioned script) parseJSONList :: Value -> Parser [Versioned script] | |
ToJSON script => ToJSON (Versioned script) | |
Defined in Plutus.Script.Utils.Scripts toJSON :: Versioned script -> Value toEncoding :: Versioned script -> Encoding toJSONList :: [Versioned script] -> Value toEncodingList :: [Versioned script] -> Encoding | |
Pretty script => Pretty (Versioned script) | |
Defined in Plutus.Script.Utils.Scripts | |
type Rep (Versioned script) | |
Defined in Plutus.Script.Utils.Scripts type Rep (Versioned script) = D1 ('MetaData "Versioned" "Plutus.Script.Utils.Scripts" "plutus-script-utils-1.2.0.0-5TpLCy32WGLK5IaOxcwe9j" 'False) (C1 ('MetaCons "Versioned" 'PrefixI 'True) (S1 ('MetaSel ('Just "unversioned") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 script) :*: S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Language))) |
generalise :: TypedValidator a -> TypedValidator Any #
validatorAddress :: TypedValidator a -> Address #
validatorHash :: TypedValidator a -> ValidatorHash #
validatorScript :: TypedValidator a -> Validator #
class UnsafeFromData sc => IsScriptContext sc where #
Nothing
mkUntypedValidator :: (UnsafeFromData d, UnsafeFromData r) => (d -> r -> sc -> Bool) -> UntypedValidator #
mkUntypedStakeValidator :: UnsafeFromData r => (r -> sc -> Bool) -> UntypedStakeValidator #
mkUntypedMintingPolicy :: UnsafeFromData r => (r -> sc -> Bool) -> UntypedMintingPolicy #
Instances
IsScriptContext ScriptContext | |
Defined in Plutus.Script.Utils.Typed mkUntypedValidator :: (UnsafeFromData d, UnsafeFromData r) => (d -> r -> ScriptContext -> Bool) -> UntypedValidator # mkUntypedStakeValidator :: UnsafeFromData r => (r -> ScriptContext -> Bool) -> UntypedStakeValidator # mkUntypedMintingPolicy :: UnsafeFromData r => (r -> ScriptContext -> Bool) -> UntypedMintingPolicy # | |
IsScriptContext ScriptContext | |
Defined in Plutus.Script.Utils.Typed mkUntypedValidator :: (UnsafeFromData d, UnsafeFromData r) => (d -> r -> ScriptContext -> Bool) -> UntypedValidator # mkUntypedStakeValidator :: UnsafeFromData r => (r -> ScriptContext -> Bool) -> UntypedStakeValidator # mkUntypedMintingPolicy :: UnsafeFromData r => (r -> ScriptContext -> Bool) -> UntypedMintingPolicy # |
data TypedValidator a #
Instances
type UntypedValidator = BuiltinData -> BuiltinData -> BuiltinData -> () #
class ValidatorTypes a #
Instances
ValidatorTypes Void | |
Defined in Plutus.Script.Utils.Typed | |
ValidatorTypes Any | |
Defined in Plutus.Script.Utils.Typed |
type family RedeemerType a #
Instances
type RedeemerType Void | |
Defined in Plutus.Script.Utils.Typed | |
type RedeemerType Any | |
Defined in Plutus.Script.Utils.Typed |
validatorCardanoAddress :: NetworkId -> TypedValidator a -> AddressInEra BabbageEra #
validatorCardanoAddressAny :: NetworkId -> TypedValidator a -> AddressAny #
Instances
Eq Any | |
Show Any | |
Generic Any | |
ToJSON Any | |
Defined in Plutus.Script.Utils.Typed | |
ValidatorTypes Any | |
Defined in Plutus.Script.Utils.Typed | |
type Rep Any | |
type DatumType Any | |
Defined in Plutus.Script.Utils.Typed | |
type RedeemerType Any | |
Defined in Plutus.Script.Utils.Typed |
type ScriptContextV1 = ScriptContext #
type ScriptContextV2 = ScriptContext #
type UntypedMintingPolicy = BuiltinData -> BuiltinData -> () #
type UntypedStakeValidator = BuiltinData -> BuiltinData -> () #
data MintingPolicy #
Instances
Instances
Eq Validator | |
Ord Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
Show Validator | |
Generic Validator | |
NFData Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
Serialise Validator | |
Defined in Plutus.V1.Ledger.Scripts encode :: Validator -> Encoding encodeList :: [Validator] -> Encoding decodeList :: Decoder s [Validator] | |
FromJSON Validator | |
Defined in Ledger.Scripts.Orphans parseJSON :: Value -> Parser Validator parseJSONList :: Value -> Parser [Validator] | |
ToJSON Validator | |
Defined in Ledger.Scripts.Orphans toEncoding :: Validator -> Encoding toJSONList :: [Validator] -> Value toEncodingList :: [Validator] -> Encoding | |
Pretty Validator | |
Defined in Plutus.V1.Ledger.Scripts | |
type Rep Validator | |
Defined in Plutus.V1.Ledger.Scripts |
data ConnectionError #
WrongValidatorAddress Address Address | |
WrongOutType WrongOutTypeError | |
WrongValidatorType String | |
WrongRedeemerType BuiltinData | |
WrongDatumType BuiltinData | |
NoDatum TxOutRef DatumHash | |
UnknownRef TxOutRef |
Instances
unsafeMkTypedValidator :: Versioned Validator -> TypedValidator Any Source #
Make a TypedValidator
(with no type constraints) from an untyped Validator
script.
type ValidatorType a = DatumType a -> RedeemerType a -> ScriptContext -> Bool #
mkTypedValidator :: CompiledCode (ValidatorType a) -> CompiledCode (ValidatorType a -> UntypedValidator) -> TypedValidator a #
mkTypedValidatorParam :: forall a param. Lift DefaultUni param => CompiledCode (param -> ValidatorType a) -> CompiledCode (ValidatorType a -> UntypedValidator) -> param -> TypedValidator a #