Module

Network.Ethereum.Web3.Types.Utils

Package
purescript-web3
Repository
f-o-a-m/purescript-web3

#getPadLength Source

getPadLength :: Int -> Int

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.