Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type StoreEffs = [Tagged 'Consensus ReadStore, Tagged 'QueryAndMempool ReadStore, Tagged 'Consensus WriteStore, Transaction, CommitBlock]
- data Scope
- data ReadStore m a where
- StoreGet :: StoreKey -> ReadStore m (Maybe ByteString)
- StoreProve :: StoreKey -> ReadStore m (Maybe ByteString)
- storeGet :: forall r. MemberWithError ReadStore r => StoreKey -> Sem r (Maybe ByteString)
- get :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Members [ReadStore, Error AppError] r => Store ns -> k -> Sem r (Maybe (Value k ns))
- prove :: forall k ns r. IsKey k ns => Member ReadStore r => Store ns -> k -> Sem r (Maybe ByteString)
- data WriteStore m a where
- StorePut :: StoreKey -> ByteString -> WriteStore m ()
- StoreDelete :: StoreKey -> WriteStore m ()
- put :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Member WriteStore r => Store ns -> k -> Value k ns -> Sem r ()
- storePut :: forall r. MemberWithError WriteStore r => StoreKey -> ByteString -> Sem r ()
- delete :: forall k ns r. IsKey k ns => Member WriteStore r => Store ns -> k -> Sem r ()
- storeDelete :: forall r. MemberWithError WriteStore r => StoreKey -> Sem r ()
- data CommitBlock m a where
- commitBlock :: forall r. MemberWithError CommitBlock r => Sem r Base64String
- data Transaction m a where
- BeginTransaction :: Transaction m ()
- Rollback :: Transaction m ()
- Commit :: Transaction m CommitResponse
- beginTransaction :: forall r. MemberWithError Transaction r => Sem r ()
- withSandbox :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r a
- withTransaction :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r (a, CommitResponse)
- commit :: forall r. MemberWithError Transaction r => Sem r CommitResponse
- class RawKey k where
- rawKey :: Iso' k ByteString
- class RawKey k => IsKey k ns where
- data StoreKey = StoreKey {
- skPathFromRoot :: [ByteString]
- skKey :: ByteString
- newtype KeyRoot ns = KeyRoot ByteString
- makeKeyBytes :: StoreKey -> ByteString
- data CommitResponse = CommitResponse {}
- data Store ns
- nestStore :: Store parentns -> Store childns -> Store childns
- makeStore :: KeyRoot ns -> Store ns
- makeStoreKey :: forall k ns. IsKey k ns => Store ns -> k -> StoreKey
- data Version
Effects
type StoreEffs = [Tagged 'Consensus ReadStore, Tagged 'QueryAndMempool ReadStore, Tagged 'Consensus WriteStore, Transaction, CommitBlock] Source #
data ReadStore m a where Source #
Read and Write Effects
StoreGet :: StoreKey -> ReadStore m (Maybe ByteString) | |
StoreProve :: StoreKey -> ReadStore m (Maybe ByteString) |
get :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Members [ReadStore, Error AppError] r => Store ns -> k -> Sem r (Maybe (Value k ns)) Source #
prove :: forall k ns r. IsKey k ns => Member ReadStore r => Store ns -> k -> Sem r (Maybe ByteString) Source #
data WriteStore m a where Source #
StorePut :: StoreKey -> ByteString -> WriteStore m () | |
StoreDelete :: StoreKey -> WriteStore m () |
Instances
type DefiningModule (WriteStore :: k -> Type -> Type) Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore |
put :: forall k r ns. IsKey k ns => HasCodec (Value k ns) => Member WriteStore r => Store ns -> k -> Value k ns -> Sem r () Source #
storePut :: forall r. MemberWithError WriteStore r => StoreKey -> ByteString -> Sem r () Source #
storeDelete :: forall r. MemberWithError WriteStore r => StoreKey -> Sem r () Source #
data CommitBlock m a where Source #
Consensus Effects
Instances
type DefiningModule (CommitBlock :: k -> Type -> Type) Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore |
commitBlock :: forall r. MemberWithError CommitBlock r => Sem r Base64String Source #
data Transaction m a where Source #
BeginTransaction :: Transaction m () | |
Rollback :: Transaction m () | |
Commit :: Transaction m CommitResponse |
Instances
type DefiningModule (Transaction :: k -> Type -> Type) Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore |
beginTransaction :: forall r. MemberWithError Transaction r => Sem r () Source #
withSandbox :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r a Source #
withTransaction :: forall r a. Members [Transaction, Resource, Error AppError] r => Sem r a -> Sem r (a, CommitResponse) Source #
commit :: forall r. MemberWithError Transaction r => Sem r CommitResponse Source #
Types
Keys
rawKey :: Iso' k ByteString Source #
Instances
RawKey Word64 Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore rawKey :: Iso' Word64 ByteString Source # | |
RawKey () Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore rawKey :: Iso' () ByteString Source # | |
RawKey Text Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore rawKey :: Iso' Text ByteString Source # | |
RawKey Address Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore rawKey :: Iso' Address ByteString Source # | |
RawKey PubKey_ Source # | |
Defined in Tendermint.SDK.Modules.Validators.Types rawKey :: Iso' PubKey_ ByteString Source # |
class RawKey k => IsKey k ns where Source #
Nothing
StoreKey | |
|
makeKeyBytes :: StoreKey -> ByteString Source #
data CommitResponse Source #
Instances
Eq CommitResponse Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore (==) :: CommitResponse -> CommitResponse -> Bool # (/=) :: CommitResponse -> CommitResponse -> Bool # | |
Show CommitResponse Source # | |
Defined in Tendermint.SDK.BaseApp.Store.RawStore showsPrec :: Int -> CommitResponse -> ShowS # show :: CommitResponse -> String # showList :: [CommitResponse] -> ShowS # |