web3-0.9.0.0: Web3 API for Haskell.

CopyrightAlexander Krupenkin 2018
LicenseBSD3
Maintainermail@akru.me
Stabilityexperimental
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

Data.ByteArray.HexString

Description

Hex string data type and useful functions.

Synopsis

Documentation

newtype HexString Source #

Represents a Hex string. Guarantees that all characters it contains are valid hex characters.

Constructors

HexString 
Instances
Eq HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

Ord HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

Show HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

IsString HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

Semigroup HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

Monoid HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

ToJSON HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

FromJSON HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

ByteArray HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

Methods

allocRet :: Int -> (Ptr p -> IO a) -> IO (a, HexString) #

ByteArrayAccess HexString Source # 
Instance details

Defined in Data.ByteArray.HexString

Methods

length :: HexString -> Int #

withByteArray :: HexString -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: HexString -> Ptr p -> IO () #

hexString :: ByteArray ba => ba -> Either String HexString Source #

Smart constructor which trims '0x' and validates length is even.

fromBytes :: ByteArrayAccess ba => ba -> HexString Source #

Reads a raw bytes and converts to hex representation.

toBytes :: ByteArray ba => HexString -> ba Source #

Access to the raw bytes of HexString.

toText :: HexString -> Text Source #

Access to a Text representation of the HexString