ouroboros-network-protocols
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Protocol.LocalTxSubmission.Type

Description

The type of the local transaction submission protocol.

This is used by local clients (like wallets and CLI tools) to submit transactions to a local node.

Synopsis

Documentation

data LocalTxSubmission (tx :: k) (reject :: k1) where Source #

The kind of the local transaction-submission protocol, and the types of the states in the protocol state machine.

It is parametrised over the type of transactions and the type of reasons used when rejecting a transaction.

Constructors

StIdle :: forall {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject

The client has agency; it can submit a transaction or terminate.

There is no timeout in this state.

StBusy :: forall {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject

The server has agency; it must process the submitted transaction and either accept or reject it (with a reason).

There is a timeout in this state. If the mempool is full and remains so for a period then the transaction should be rejected with a suitable temporary failure reason.

StDone :: forall {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject

Nobody has agency. The terminal state.

Instances

Instances details
(ShowProxy tx, ShowProxy reject) => ShowProxy (LocalTxSubmission tx reject :: Type) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

showProxy :: Proxy (LocalTxSubmission tx reject) -> String #

(NFData tx, NFData reject) => NFData (Message (LocalTxSubmission tx reject) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

rnf :: Message (LocalTxSubmission tx reject) from to -> () #

(Show tx, Show reject) => Show (Message (LocalTxSubmission tx reject) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

showsPrec :: Int -> Message (LocalTxSubmission tx reject) from to -> ShowS #

show :: Message (LocalTxSubmission tx reject) from to -> String #

showList :: [Message (LocalTxSubmission tx reject) from to] -> ShowS #

(Eq tx, Eq reject) => Eq (Message (LocalTxSubmission tx reject) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

(==) :: Message (LocalTxSubmission tx reject) from to -> Message (LocalTxSubmission tx reject) from to -> Bool #

(/=) :: Message (LocalTxSubmission tx reject) from to -> Message (LocalTxSubmission tx reject) from to -> Bool #

Protocol (LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Associated Types

type StateToken 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

StateTokenI ('StBusy :: LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

stateToken :: StateToken ('StBusy :: LocalTxSubmission tx reject) #

StateTokenI ('StDone :: LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

stateToken :: StateToken ('StDone :: LocalTxSubmission tx reject) #

StateTokenI ('StIdle :: LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

stateToken :: StateToken ('StIdle :: LocalTxSubmission tx reject) #

data Message (LocalTxSubmission tx reject) (from :: LocalTxSubmission tx reject) (to :: LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

data Message (LocalTxSubmission tx reject) (from :: LocalTxSubmission tx reject) (to :: LocalTxSubmission tx reject) where
type StateToken Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

type StateAgency ('StBusy :: LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

type StateAgency ('StDone :: LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

type StateAgency ('StIdle :: LocalTxSubmission tx reject) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

data SingLocalTxSubmission (k2 :: LocalTxSubmission tx rejct) where Source #

Constructors

SingIdle :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StIdle :: LocalTxSubmission tx rejct) 
SingBusy :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StBusy :: LocalTxSubmission tx rejct) 
SingDone :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StDone :: LocalTxSubmission tx rejct) 

data SubmitResult reason Source #

Isomorphic with Maybe but with a name that better describes its purpose and usage.

Constructors

SubmitSuccess 
SubmitFail reason 

Instances

Instances details
Functor SubmitResult Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

fmap :: (a -> b) -> SubmitResult a -> SubmitResult b #

(<$) :: a -> SubmitResult b -> SubmitResult a #

Eq reason => Eq (SubmitResult reason) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type

Methods

(==) :: SubmitResult reason -> SubmitResult reason -> Bool #

(/=) :: SubmitResult reason -> SubmitResult reason -> Bool #