Module

Network.Ethereum.Core.HexString

Package
purescript-eth-core
Repository
f-o-a-m/purescript-eth-core

#Sign Source

data Sign

Constructors

Instances

#Signed Source

data Signed a

Represents values that can be either positive or negative.

Constructors

Instances

#asSigned Source

asSigned :: forall a. a -> Signed a

Coerce a value into a positive signed value

#hexLength Source

hexLength :: HexString -> Int

Compute the length of the hex string, which is twice the number of bytes it represents

#getPadLength Source

getPadLength :: Int -> Int

Utils Computes the number of 0s needed to pad a bytestring of the input length

#padLeftSigned Source

padLeftSigned :: Signed HexString -> HexString

Pad a Signed HexString on the left until it has length == 0 mod 64.

#padLeft Source

padLeft :: HexString -> HexString

Pad a HexString on the left with '0's until it has length == 0 mod 64.

#padRightSigned Source

padRightSigned :: Signed HexString -> HexString

Pad a Signed HexString on the right until it has length 0 mod 64.

#padRight Source

padRight :: HexString -> HexString

Pad a HexString on the right with 0's until it has length 0 mod 64.

#toUtf8 Source

toUtf8 :: HexString -> String

Takes a hex string and produces the corresponding UTF8-decoded string. This breaks at the first null octet, following the web3 function toUft8.

#fromUtf8 Source

fromUtf8 :: String -> HexString

Get the 'HexString' corresponding to the UTF8 encoding.

#toAscii Source

toAscii :: HexString -> String

Takes a hex string and produces the corresponding ASCII decoded string.

#fromAscii Source

fromAscii :: String -> HexString

Get the 'HexString' corresponding to the ASCII encoding.

#toBigNumberFromSignedHexString Source