Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Data era where
- type DataHash crypto = SafeHash crypto EraIndependentData
- hashData :: Era era => Data era -> DataHash ( Crypto era)
- getPlutusData :: Data era -> Data
- dataHashSize :: StrictMaybe ( DataHash c) -> Integer
- data BinaryData era
- hashBinaryData :: Era era => BinaryData era -> DataHash ( Crypto era)
- makeBinaryData :: ShortByteString -> Either String ( BinaryData era)
- binaryDataToData :: BinaryData era -> Data era
- dataToBinaryData :: Data era -> BinaryData era
- decodeBinaryData :: BinaryData era -> Either DecoderError ( Data era)
- data Datum era
- datumDataHash :: Era era => Datum era -> StrictMaybe ( DataHash ( Crypto era))
- data AuxiliaryData era where
- newtype AuxiliaryDataHash crypto = AuxiliaryDataHash { }
Documentation
Instances
type DataHash crypto = SafeHash crypto EraIndependentData Source #
getPlutusData :: Data era -> Data Source #
dataHashSize :: StrictMaybe ( DataHash c) -> Integer 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
hashBinaryData :: Era era => BinaryData era -> DataHash ( Crypto era) Source #
makeBinaryData :: ShortByteString -> Either String ( BinaryData era) Source #
binaryDataToData :: BinaryData era -> Data era Source #
It is safe to convert
BinaryData
to
Data
because the only way to
construct
BinaryData
is thorugh smart constructor
makeBinaryData
that
takes care of verification.
dataToBinaryData :: Data era -> BinaryData era Source #
decodeBinaryData :: BinaryData era -> Either DecoderError ( Data 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.
Instances
Eq ( Datum era) Source # | |
Ord ( Datum era) Source # | |
Defined in Cardano.Ledger.Alonzo.Data |
|
Show ( Datum era) Source # | |
Era era => ToCBOR ( Datum era) Source # | |
Era era => FromCBOR ( Datum era) Source # | |
datumDataHash :: Era era => Datum era -> StrictMaybe ( DataHash ( Crypto era)) Source #
Get the Hash of the datum.
data AuxiliaryData era where Source #
pattern AuxiliaryData :: ( Era era, ToCBOR ( Script era), Script era ~ Script era, Ord ( Script era)) => Map Word64 Metadatum -> StrictSeq ( Script era) -> AuxiliaryData era | |
pattern AuxiliaryData' :: Map Word64 Metadatum -> StrictSeq ( Script era) -> AuxiliaryData era |
Instances
newtype AuxiliaryDataHash crypto Source #