coinop-logan/phace/2.0.1

NOTE: the latest version is 3.0.1

Phace

Making Phaces

fromEthAddress : Address -> Html msg

Generate a phace from an Ethereum Address. Uses 32 chraracters, leaving 6 characters near the middle unused.

CAUTION: If you supply a malformed Eth address (maybe you were mucking about with Eth.Utils.unsafeToAddress?), this will produce a plain div with an error message in it.

fromHexString : String -> Result Error (Html msg)

Generate a phace from a hexadecimal String. Make sure to remove any "0x" from the source first.

type Error
= NotHexString
| SourceTooSmall

Phace generation will fail if the provided source is too short or not composed of hex characters.

errorToString : Error -> String

Get an explanation from an error type.