| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V1.Bytes
Synopsis
- newtype LedgerBytes = LedgerBytes {}
- data LedgerBytesError
Documentation
newtype LedgerBytes #
Constructors
| LedgerBytes | |
Fields | |
Instances
| IsString LedgerBytes # | Read in arbitrary This is mostly used together with GHC's OverloadedStrings extension
to specify at the source code any IMPORTANT: the |
Defined in PlutusLedgerApi.V1.Bytes Methods fromString :: String -> LedgerBytes # | |
| Generic LedgerBytes # | |
Defined in PlutusLedgerApi.V1.Bytes Associated Types type Rep LedgerBytes :: Type -> Type # | |
| Show LedgerBytes # | The |
data LedgerBytesError #
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. |
Instances
| Exception LedgerBytesError # | |
Defined in PlutusLedgerApi.V1.Bytes Methods toException :: LedgerBytesError -> SomeException # | |
| Show LedgerBytesError # | |
Defined in PlutusLedgerApi.V1.Bytes Methods showsPrec :: Int -> LedgerBytesError -> ShowS # show :: LedgerBytesError -> String # showList :: [LedgerBytesError] -> ShowS # | |
fromHex :: ByteString -> Either LedgerBytesError LedgerBytes #
Convert a hex-encoded (Base16) ByteString to a LedgerBytes.
May return an error (LedgerBytesError).
bytes :: LedgerBytes -> Text #
Encode a ByteString value to Base16 (i.e. hexadecimal), then
decode with UTF-8 to a Text.