plutus-ledger-api-1.34.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.V1.Bytes

Synopsis

Documentation

newtype LedgerBytes Source #

Instances

Instances details
IsString LedgerBytes Source #

Read in arbitrary LedgerBytes as a "string" (of characters).

This is mostly used together with GHC's OverloadedStrings extension to specify at the source code any LedgerBytes constants, by utilizing Haskell's double-quoted string syntax.

IMPORTANT: the LedgerBytes are expected to be already hex-encoded (base16); otherwise, LedgerBytesError will be raised as an Exception.

Instance details

Defined in PlutusLedgerApi.V1.Bytes

Generic LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Associated Types

type Rep LedgerBytesTypeType Source #

Show LedgerBytes Source #

The Show instance of LedgerBytes is its Base16/Hex encoded bytestring, decoded with UTF-8, unpacked to String.

Instance details

Defined in PlutusLedgerApi.V1.Bytes

NFData LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Methods

rnfLedgerBytes → () Source #

Eq LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Ord LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

HasBlueprintDefinition LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Associated Types

type Unroll LedgerBytes ∷ [Type] Source #

Eq LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

FromData LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

ToData LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

UnsafeFromData LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Ord LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Pretty LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Methods

prettyLedgerBytesDoc ann Source #

prettyList ∷ [LedgerBytes] → Doc ann Source #

HasBlueprintSchema LedgerBytes referencedTypes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Methods

schemaSchema referencedTypes Source #

Lift DefaultUni LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

Typeable DefaultUni LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

type Rep LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

type Rep LedgerBytes = D1 ('MetaData "LedgerBytes" "PlutusLedgerApi.V1.Bytes" "plutus-ledger-api-1.34.0.0-inplace" 'True) (C1 ('MetaCons "LedgerBytes" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLedgerBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinByteString)))
type Unroll LedgerBytes Source # 
Instance details

Defined in PlutusLedgerApi.V1.Bytes

data LedgerBytesError Source #

An error that is encountered when converting a ByteString to a LedgerBytes.

Constructors

UnpairedDigit

Odd number of bytes in the original bytestring.

NotHexit !Char

A non-hex digit character ([^A-Fa-f0-9]) encountered during decoding.

fromHexByteStringEither LedgerBytesError LedgerBytes Source #

Convert a hex-encoded (Base16) ByteString to a LedgerBytes. May return an error (LedgerBytesError).

bytesLedgerBytesByteString Source #

Extract the Haskell bytestring from inside the Plutus opaque LedgerBytes.

fromBytesByteStringLedgerBytes Source #

Lift a Haskell bytestring to the Plutus abstraction LedgerBytes

encodeByteStringByteStringText Source #

Encode a ByteString value to Base16 (i.e. hexadecimal), then decode with UTF-8 to a Text.