hydra-plutus-0.19.0: Hydra Plutus Contracts
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Contract.Hash

Description

An experimental validator which simply hashes a bytestring stored in the datum using one of three supported algorithms.

Documentation

data HashAlgorithm Source #

Constructors

Base 
SHA2 
SHA3 
Blake2b 

Instances

Instances details
Arbitrary HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

Bounded HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

Enum HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

Generic HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

Associated Types

type Rep HashAlgorithm :: Type -> Type Source #

Show HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

FromData HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

Methods

fromBuiltinData :: BuiltinData -> Maybe HashAlgorithm

ToData HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

Methods

toBuiltinData :: HashAlgorithm -> BuiltinData

UnsafeFromData HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

Methods

unsafeFromBuiltinData :: BuiltinData -> HashAlgorithm

type Rep HashAlgorithm Source # 
Instance details

Defined in Hydra.Contract.Hash

type Rep HashAlgorithm = D1 ('MetaData "HashAlgorithm" "Hydra.Contract.Hash" "hydra-plutus-0.19.0-GnF2WpVD9y0FLxIAE5jUsh" 'False) ((C1 ('MetaCons "Base" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SHA2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SHA3" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Blake2b" 'PrefixI 'False) (U1 :: Type -> Type)))

type DatumType = BuiltinByteString Source #

validator :: DatumType -> RedeemerType -> ScriptContext -> Bool Source #

compiledValidator :: CompiledCode ValidatorType Source #

validatorScript :: SerialisedScript Source #

validatorHash :: ScriptHash Source #

datum :: DatumType -> Datum Source #

redeemer :: RedeemerType -> Redeemer Source #