quietgarden/elm-web3/1.0.0

NOTE: the latest version is 2.0.1

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/quietgarden/elm-web3 is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 1.0.0 found (5 same-name repos checked); no cached copy. Use another version.

Details

Web3.Types

Core types for EVM interaction.

All types are opaque — you can't accidentally pass a TxHash where an Address is expected. Construction validates format.

type Address

A validated Ethereum address (0x + 40 hex chars).

type TxHash

A transaction hash (0x + 64 hex chars).

= BlockNum Int
| Latest
| Pending
| Earliest

A block number — specific or a tag.

type ChainId

An EVM chain ID.

type alias Wei =

Wei amount as a string (uint256 — too large for Int).

A raw hex string.

address : String -> Maybe Address

Create an Address from a hex string. Returns Nothing if invalid.

Extract the string value of an Address.

txHash : String -> Maybe TxHash

Create a TxHash from a hex string.

Extract the string value of a TxHash.

chainId : Int -> ChainId

Create a ChainId.

Extract the integer value of a ChainId.

hexString : String -> Maybe HexString

Create a HexString.

Extract the string value of a HexString.