web3-0.8.1.0: Ethereum API for Haskell

CopyrightAlexander Krupenkin 2018
LicenseBSD3
Maintainermail@akru.me
Stabilityexperimental
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

Network.Ethereum.Account.Class

Description

Ethereum external owned account abstraction.

Synopsis

Documentation

class MonadTrans t => Account a t | t -> a where Source #

Account is needed for sending transactions to blockchain

Typically account is provided by node. In this case node manage accounts: encrypt and decrypt private keys, manipulate files etc. In other case web3 can derive account from private key and send to node already signed transactions.

Minimal complete definition

withAccount, send, call

Methods

withAccount Source #

Arguments

:: JsonRpc m 
=> a

Account params (like a password or private key)

-> t m b

Computation that use account for sending transactions

-> m b

Json-rpc monad

Run computation with given account credentials

send Source #

Arguments

:: (JsonRpc m, Method args) 
=> args

Contract method arguments

-> t m TxReceipt

Receipt of sended transaction

Send transaction to contract, like a write command

call Source #

Arguments

:: (JsonRpc m, Method args, AbiGet result) 
=> args

Contact method arguments

-> t m result

Decoded result of method call

Call constant method of contract, like a read command

Instances
Account () DefaultAccount Source # 
Instance details

Defined in Network.Ethereum.Account.Default

Methods

withAccount :: JsonRpc m => () -> DefaultAccount m b -> m b Source #

send :: (JsonRpc m, Method args) => args -> DefaultAccount m TxReceipt Source #

call :: (JsonRpc m, Method args, AbiGet result) => args -> DefaultAccount m result Source #

Account PrivateKey PrivateKeyAccount Source # 
Instance details

Defined in Network.Ethereum.Account.PrivateKey

Methods

withAccount :: JsonRpc m => PrivateKey -> PrivateKeyAccount m b -> m b Source #

send :: (JsonRpc m, Method args) => args -> PrivateKeyAccount m TxReceipt Source #

call :: (JsonRpc m, Method args, AbiGet result) => args -> PrivateKeyAccount m result Source #

Account Personal PersonalAccount Source # 
Instance details

Defined in Network.Ethereum.Account.Personal

Methods

withAccount :: JsonRpc m => Personal -> PersonalAccount m b -> m b Source #

send :: (JsonRpc m, Method args) => args -> PersonalAccount m TxReceipt Source #

call :: (JsonRpc m, Method args, AbiGet result) => args -> PersonalAccount m result Source #