Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Auth = Module AuthName EmptyTxServer EmptyTxServer Api AuthEffs '[]
- authModule :: Members (ModuleEffs Auth) r => Auth r
- data Accounts m a where
- CreateAccount :: Address -> Accounts m Account
- UpdateAccount :: Address -> (Account -> Account) -> Accounts m ()
- GetAccount :: Address -> Accounts m (Maybe Account)
- type AuthEffs = '[Accounts, Error AuthError]
- createAccount :: forall r. MemberWithError Accounts r => Address -> Sem r Account
- updateAccount :: forall r. MemberWithError Accounts r => Address -> (Account -> Account) -> Sem r ()
- getAccount :: forall r. MemberWithError Accounts r => Address -> Sem r (Maybe Account)
- eval :: Members [ReadStore, WriteStore, Error AppError] r => Sem (Accounts ': (Error AuthError ': r)) a -> Sem r a
- type Api = "accounts" :> StoreLeaf (Map Address Account)
- querier :: Members QueryEffs r => RouteQ Api r
- data Account = Account {
- accountCoins :: [Coin]
- accountNonce :: Word64
- data Coin = Coin {
- coinId :: CoinId
- coinAmount :: Amount
- newtype Amount = Amount {}
- newtype CoinId = CoinId {}
- data AuthError
- type AuthName = "auth"
- coinAesonOptions :: Options
- newtype Address = Address HexString
Documentation
type Auth = Module AuthName EmptyTxServer EmptyTxServer Api AuthEffs '[] Source #
authModule :: Members (ModuleEffs Auth) r => Auth r Source #
data Accounts m a where Source #
CreateAccount :: Address -> Accounts m Account | |
UpdateAccount :: Address -> (Account -> Account) -> Accounts m () | |
GetAccount :: Address -> Accounts m (Maybe Account) |
updateAccount :: forall r. MemberWithError Accounts r => Address -> (Account -> Account) -> Sem r () Source #
eval :: Members [ReadStore, WriteStore, Error AppError] r => Sem (Accounts ': (Error AuthError ': r)) a -> Sem r a Source #
Account | |
|
Instances
Show Account Source # | |
Generic Account Source # | |
Wrapped Account Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types type Unwrapped Account | |
HasCodec Account Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types | |
type Rep Account Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types type Rep Account = D1 ('MetaData "Account" "Tendermint.SDK.Modules.Auth.Types" "hs-abci-sdk-0.1.0.0-6BthCXrKFfHAhK2oYxZQI4" 'False) (C1 ('MetaCons "Account" 'PrefixI 'True) (S1 ('MetaSel ('Just "accountCoins") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Coin]) :*: S1 ('MetaSel ('Just "accountNonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
type Unwrapped Account Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types |
Coin | |
|
Instances
Eq Coin Source # | |
Show Coin Source # | |
Generic Coin Source # | |
Wrapped Coin Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types type Unwrapped Coin | |
HasCodec Coin Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types | |
type Rep Coin Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types type Rep Coin = D1 ('MetaData "Coin" "Tendermint.SDK.Modules.Auth.Types" "hs-abci-sdk-0.1.0.0-6BthCXrKFfHAhK2oYxZQI4" 'False) (C1 ('MetaCons "Coin" 'PrefixI 'True) (S1 ('MetaSel ('Just "coinId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CoinId) :*: S1 ('MetaSel ('Just "coinAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Amount))) | |
type Unwrapped Coin Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types |
Instances
Eq Amount Source # | |
Num Amount Source # | |
Ord Amount Source # | |
Show Amount Source # | |
Generic Amount Source # | |
FromJSON Amount Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types parseJSON :: Value -> Parser Amount parseJSONList :: Value -> Parser [Amount] | |
ToJSON Amount Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types toEncoding :: Amount -> Encoding toJSONList :: [Amount] -> Value toEncodingList :: [Amount] -> Encoding | |
Wrapped Amount Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types type Unwrapped Amount | |
HasCodec Amount Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types | |
type Rep Amount Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types | |
type Unwrapped Amount Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types |
Instances
Instances
IsAppError AuthError Source # | |
Defined in Tendermint.SDK.Modules.Auth.Types makeAppError :: AuthError -> AppError Source # |
coinAesonOptions :: Options Source #
Used as a unique identifier for an account.