Module

Network.Ethereum.Uport.Connect

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

#UPORT Source

data UPORT :: Effect

This effect is used to annotate code which possibly uses Uport lib for signing etherium transactions.

#Connect Source

data Connect :: Type

An instance of Connect class from uport-connect

#AppName Source

newtype AppName

A type used for representing Uport application name

Constructors

#ClientId Source

newtype ClientId

Constructors

#connect Source

connect :: forall eff. OptionsBuilder eff -> Eff (exception :: EXCEPTION, uport :: UPORT | eff) Connect

#getProvider Source

getProvider :: forall eff. Connect -> Eff (uport :: UPORT | eff) Provider

Instantiates and returns a web3 styple provider wrapped with uPort functionality

#Options Source

type Options eff = { appName :: Maybe AppName, clientId :: Maybe ClientId, network :: Maybe Network, signer :: Maybe (Signer eff) }

A Type used to create Connect

#withCredentials Source

withCredentials :: forall eff. Credentials eff -> Options eff -> Options eff

A combinator used as part of OptionsBuilder, it set's Uport application credentials (used when signed requests are requried). Example:

connect
  $ withAppName (AppName "MyApp")
  >>> withCredentials myAppCredentials

#Credentials Source

type Credentials eff = { clientId :: ClientId, network :: Network, signer :: Signer eff }

#withAppName Source

withAppName :: forall eff. AppName -> Options eff -> Options eff

A combinator used as part of OptionsBuilder, it set's Uport application name. Example:

connect
  $ withAppName (AppName "MyApp")
  >>> withNetwork rinkeby

#withNetwork Source

withNetwork :: forall eff. Network -> Options eff -> Options eff

A combinator used as part of OptionsBuilder, it set's network on which Connect will operate. Example:

connect
  $ withAppName (AppName "MyApp")
  >>> withNetwork rinkeby

#OptionsBuilder Source

type OptionsBuilder eff = Options eff -> Options eff

Builder type for Options used to construct Connect

#optionsDefaults Source

optionsDefaults :: forall eff. OptionsBuilder eff

OptionsBuilder which could be used to create Connect using default options