cardano-ledger-core-1.15.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.Plutus.Data

Synopsis

Documentation

newtype PlutusData era Source #

This is a wrapper with a phantom era for PV1.Data, since we need something with kind (* -> *) for MemoBytes

Constructors

PlutusData Data 

Instances

Instances details
Generic (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Associated Types

type Rep (PlutusData era) ∷ TypeType Source #

Methods

fromPlutusData era → Rep (PlutusData era) x Source #

toRep (PlutusData era) x → PlutusData era Source #

Show (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

showsPrecIntPlutusData era → ShowS Source #

showPlutusData era → String Source #

showList ∷ [PlutusData era] → ShowS Source #

Typeable era ⇒ DecCBOR (Annotator (PlutusData era)) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Typeable era ⇒ EncCBOR (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

encCBORPlutusData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (PlutusData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [PlutusData era] → Size Source #

NFData (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

rnfPlutusData era → () Source #

Eq (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

(==)PlutusData era → PlutusData era → Bool Source #

(/=)PlutusData era → PlutusData era → Bool Source #

NoThunks (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Serialise (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type MemoHashIndex PlutusData Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (PlutusData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (PlutusData era) = Rep Data

data Data era where Source #

Bundled Patterns

pattern DataEra era ⇒ DataData era 

Instances

Instances details
Memoized Data Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Associated Types

type RawType Data = (r ∷ TypeType) Source #

Methods

getMemoBytesData era → MemoBytes (RawType Data) era

wrapMemoBytesMemoBytes (RawType Data) era → Data era

Generic (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Associated Types

type Rep (Data era) ∷ TypeType Source #

Methods

fromData era → Rep (Data era) x Source #

toRep (Data era) x → Data era Source #

HashAlgorithm (HASH (EraCrypto era)) ⇒ Show (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

showsPrecIntData era → ShowS Source #

showData era → String Source #

showList ∷ [Data era] → ShowS Source #

Typeable era ⇒ ToCBOR (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

toCBORData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (Data era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Data era] → Size Source #

Era era ⇒ DecCBOR (Annotator (Data era)) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

decCBORDecoder s (Annotator (Data era)) Source #

dropCBORProxy (Annotator (Data era)) → Decoder s () Source #

labelProxy (Annotator (Data era)) → Text Source #

Typeable era ⇒ EncCBOR (Data era) Source #

Encodes memoized bytes created upon construction.

Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

encCBORData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Data era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Data era] → Size Source #

SafeToHash (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

NFData (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

rnfData era → () Source #

Eq (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

(==)Data era → Data era → Bool Source #

(/=)Data era → Data era → Bool Source #

Typeable era ⇒ NoThunks (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

EraCrypto era ~ c ⇒ HashAnnotated (Data era) EraIndependentData c Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type RawType Data Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (Data era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (Data era) = D1 ('MetaData "Data" "Cardano.Ledger.Plutus.Data" "cardano-ledger-core-1.15.0.0-inplace" 'True) (C1 ('MetaCons "DataConstr" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes PlutusData era))))

unDataData era → Data Source #

upgradeData ∷ (Era era1, Era era2) ⇒ Data era1 → Data era2 Source #

Upgrade Data from one era to another. While the underlying data will remain the same, the memoised serialisation may change to reflect the versioned serialisation of the new era.

hashDataEra era ⇒ Data era → DataHash (EraCrypto era) Source #

data BinaryData era Source #

Inlined data must be stored in the most compact form because it contributes to the memory overhead of the ledger state. Constructor is intentionally not exported, in order to prevent invalid creation of data from arbitrary binary data. Use makeBinaryData for smart construction.

Instances

Instances details
Generic (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Associated Types

type Rep (BinaryData era) ∷ TypeType Source #

Methods

fromBinaryData era → Rep (BinaryData era) x Source #

toRep (BinaryData era) x → BinaryData era Source #

Show (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

showsPrecIntBinaryData era → ShowS Source #

showBinaryData era → String Source #

showList ∷ [BinaryData era] → ShowS Source #

Era era ⇒ DecCBOR (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

decCBORDecoder s (BinaryData era) Source #

dropCBORProxy (BinaryData era) → Decoder s () Source #

labelProxy (BinaryData era) → Text Source #

Typeable era ⇒ EncCBOR (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

encCBORBinaryData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (BinaryData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [BinaryData era] → Size Source #

SafeToHash (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Eq (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

(==)BinaryData era → BinaryData era → Bool Source #

(/=)BinaryData era → BinaryData era → Bool Source #

Ord (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

compareBinaryData era → BinaryData era → Ordering Source #

(<)BinaryData era → BinaryData era → Bool Source #

(<=)BinaryData era → BinaryData era → Bool Source #

(>)BinaryData era → BinaryData era → Bool Source #

(>=)BinaryData era → BinaryData era → Bool Source #

maxBinaryData era → BinaryData era → BinaryData era Source #

minBinaryData era → BinaryData era → BinaryData era Source #

NoThunks (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

EraCrypto era ~ c ⇒ HashAnnotated (BinaryData era) EraIndependentData c Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (BinaryData era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (BinaryData era) = D1 ('MetaData "BinaryData" "Cardano.Ledger.Plutus.Data" "cardano-ledger-core-1.15.0.0-inplace" 'True) (C1 ('MetaCons "BinaryData" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))

makeBinaryDataEra era ⇒ ShortByteStringEither String (BinaryData era) Source #

Construct BinaryData from a buffer of bytes, while ensuring that it can be later safely converted to Data with binaryDataToData

binaryDataToDataEra era ⇒ BinaryData era → Data era Source #

It is safe to convert BinaryData to Data because the only way to construct BinaryData is through the smart constructor makeBinaryData that takes care of validation.

dataToBinaryDataEra era ⇒ Data era → BinaryData era Source #

data Datum era Source #

Datum can be described by a either a data hash or binary data, but not both. It can also be neither one of them.

Constructors

NoDatum 
DatumHash !(DataHash (EraCrypto era)) 
Datum !(BinaryData era) 

Instances

Instances details
Era era ⇒ ToJSON (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Generic (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Associated Types

type Rep (Datum era) ∷ TypeType Source #

Methods

fromDatum era → Rep (Datum era) x Source #

toRep (Datum era) x → Datum era Source #

Show (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

showsPrecIntDatum era → ShowS Source #

showDatum era → String Source #

showList ∷ [Datum era] → ShowS Source #

Era era ⇒ DecCBOR (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

decCBORDecoder s (Datum era) Source #

dropCBORProxy (Datum era) → Decoder s () Source #

labelProxy (Datum era) → Text Source #

Era era ⇒ EncCBOR (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

encCBORDatum era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (Datum era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Datum era] → Size Source #

Eq (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

(==)Datum era → Datum era → Bool Source #

(/=)Datum era → Datum era → Bool Source #

Ord (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

Methods

compareDatum era → Datum era → Ordering Source #

(<)Datum era → Datum era → Bool Source #

(<=)Datum era → Datum era → Bool Source #

(>)Datum era → Datum era → Bool Source #

(>=)Datum era → Datum era → Bool Source #

maxDatum era → Datum era → Datum era Source #

minDatum era → Datum era → Datum era Source #

NoThunks (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (Datum era) Source # 
Instance details

Defined in Cardano.Ledger.Plutus.Data

type Rep (Datum era) = D1 ('MetaData "Datum" "Cardano.Ledger.Plutus.Data" "cardano-ledger-core-1.15.0.0-inplace" 'False) (C1 ('MetaCons "NoDatum" 'PrefixI 'False) (U1TypeType) :+: (C1 ('MetaCons "DatumHash" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DataHash (EraCrypto era)))) :+: C1 ('MetaCons "Datum" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (BinaryData era)))))

datumDataHashEra era ⇒ Datum era → StrictMaybe (DataHash (EraCrypto era)) Source #

Get the Hash of the datum.

translateDatumEraCrypto era1 ~ EraCrypto era2 ⇒ Datum era1 → Datum era2 Source #

Orphan instances

Crypto c ⇒ HeapWords (StrictMaybe (DataHash c)) Source # 
Instance details