Module

Network.Ethereum.Web3.Types

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

Re-exports from Network.Ethereum.Types

#HexString

newtype HexString

Represents a base16, utf8 encoded bytestring

Instances

  • Show HexString
  • Eq HexString
  • Ord HexString
  • Semigroup HexString
  • Monoid HexString
  • Decode HexString
  • ReadForeign HexString
  • WriteForeign HexString
  • Encode HexString
  • DecodeJson HexString
  • EncodeJson HexString

#BigNumber

data BigNumber :: Type

Large Integer, needed for handling numbers of up to 32 bytes

Instances

  • Show BigNumber
  • Eq BigNumber
  • Ord BigNumber
  • Semiring BigNumber
  • Ring BigNumber
  • LeftModule BigNumber Int
  • RightModule BigNumber Int
  • Algebra BigNumber Int
  • Decode BigNumber
  • ReadForeign BigNumber
  • WriteForeign BigNumber
  • Encode BigNumber
  • DecodeJson BigNumber
  • EncodeJson BigNumber

#Address

newtype Address

Represents and Ethereum address, which is a 20 byte HexString

Instances

  • Show Address
  • Eq Address
  • Ord Address
  • Encode Address
  • Decode Address
  • DecodeJson Address
  • EncodeJson Address
  • ReadForeign Address
  • WriteForeign Address

#unHex

unHex :: HexString -> String

#unAddress

unAddress :: Address -> HexString

#mkHexString

mkHexString :: String -> Maybe HexString

#mkAddress

mkAddress :: HexString -> Maybe Address

#embed

embed :: forall a r. Algebra a r => r -> a

Re-exports from Network.Ethereum.Web3.Types.EtherUnit

#ETHER Source

data ETHER :: Token

Re-exports from Network.Ethereum.Web3.Types.TokenUnit

#Value Source

newtype Value (a :: TokenUnit)

A value of some token in specific denomination

Instances

#NoPay Source

#TokenUnit Source

class TokenUnit a  where

Useful for converting to and from the base denomination

Members

Instances

#mkValue Source

mkValue :: forall a. TokenUnitSpec a => BigNumber -> Value a

Convert a big number into value, first using floor function to take the integer part

#formatValue Source

formatValue :: forall a. TokenUnitSpec a => Value a -> String

#convert Source

convert :: forall b a. TokenUnit a => TokenUnit b => a -> b

Convert between two denominations

Re-exports from Network.Ethereum.Web3.Types.Types

#Web3 Source

newtype Web3 e a

A monad for asynchronous Web3 actions

Instances

#TransactionReceipt Source

newtype TransactionReceipt

Constructors

Instances

#Transaction Source

newtype Transaction

Constructors

Instances

#SyncStatus Source

newtype SyncStatus

Constructors

Instances

#Response Source

newtype Response a

Constructors

Instances

#Request Source

#MethodName Source

type MethodName = String

Web3 RPC

#FilterId Source

newtype FilterId

Used by the ethereum client to identify the filter you are querying

Instances

#Filter Source

newtype Filter a

Low-level event filter data structure

Instances

#FalseOrObject Source

newtype FalseOrObject a

Newtype wrapper around Maybe to handle cases where Web3 passes back either false or some data type

Constructors

Instances

#EventAction Source

data EventAction

EventAction Represents a flag to continue or discontinue listening to the filter

Constructors

Instances

#ETH Source

data ETH :: Effect

Instances

#Change Source

newtype Change

Changes pulled by low-level call 'eth_getFilterChanges', 'eth_getLogs', and 'eth_getFilterLogs'

Constructors

Instances

#ChainCursor Source

data ChainCursor

Refers to a particular block time, used when making calls, transactions, or watching for events.

Constructors

Instances

#CallError Source

data CallError

Constructors

Instances

#Block Source

newtype Block

Constructors

Instances

#throwWeb3 Source

throwWeb3 :: forall a e. Error -> Web3 e a

#runWeb3 Source

runWeb3 :: forall a e. Provider -> Web3 e a -> Aff (eth :: ETH | e) (Either Web3Error a)

Run an asynchronous ETH action

#forkWeb3' Source

forkWeb3' :: forall a e. Web3 e a -> Web3 e (Fiber (eth :: ETH | e) (Either Web3Error a))

Fork an asynchronous ETH action inside Web3 monad

#forkWeb3 Source

forkWeb3 :: forall a e. Provider -> Web3 e a -> Aff (eth :: ETH | e) (Fiber (eth :: ETH | e) (Either Web3Error a))

Fork an asynchronous ETH action

#defaultFilter Source

defaultFilter :: forall a. Filter a

#_topics Source

_topics :: forall a. Lens' (Filter a) (Maybe (Array (Maybe HexString)))

#_toBlock Source

_toBlock :: forall a. Lens' (Filter a) ChainCursor

#_fromBlock Source

#_address Source

_address :: forall a. Lens' (Filter a) (Maybe Address)