Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hydra.Chain.Direct
Description
Chain component implementation which uses directly the Node-to-Client protocols to submit "hand-rolled" transactions.
Synopsis
- newtype NetworkMagic = NetworkMagic Word32
- type BlockType = BlockInMode CardanoMode
- newtype IntersectionNotFoundException = IntersectionNotFound {
- requestedPoint :: ChainPoint
- data ConnectException = ConnectException {
- ioException :: IOException
- nodeSocket :: SocketPath
- networkId :: NetworkId
- initialChainState :: ChainStateType Tx
- loadChainContext :: ChainConfig -> Party -> [Party] -> TxId -> IO ChainContext
- mkTinyWallet :: Tracer IO DirectChainLog -> ChainConfig -> IO (TinyWallet IO)
- withDirectChain :: Tracer IO DirectChainLog -> ChainConfig -> ChainContext -> TinyWallet IO -> ChainStateAt -> ChainComponent Tx IO a
- chainSyncClient :: forall m. (MonadSTM m, MonadThrow m) => ChainSyncHandler m -> TinyWallet m -> ChainPoint -> ChainSyncClient BlockType ChainPoint ChainTip m ()
- txSubmissionClient :: forall m. MonadSTM m => Tracer m DirectChainLog -> TQueue m (Tx, TMVar m (Maybe (PostTxError Tx))) -> LocalTxSubmissionClient (TxInMode CardanoMode) (TxValidationErrorInMode CardanoMode) m ()
Documentation
newtype NetworkMagic #
Constructors
NetworkMagic Word32 |
Instances
Generic NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods from :: NetworkMagic -> Rep NetworkMagic x Source # to :: Rep NetworkMagic x -> NetworkMagic Source # | |
Show NetworkMagic | |
Defined in Ouroboros.Network.Magic | |
Eq NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods (==) :: NetworkMagic -> NetworkMagic -> Bool Source # (/=) :: NetworkMagic -> NetworkMagic -> Bool Source # | |
NoThunks NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods noThunks :: Context -> NetworkMagic -> IO (Maybe ThunkInfo) wNoThunks :: Context -> NetworkMagic -> IO (Maybe ThunkInfo) showTypeOf :: Proxy NetworkMagic -> String | |
type Rep NetworkMagic | |
Defined in Ouroboros.Network.Magic type Rep NetworkMagic = D1 ('MetaData "NetworkMagic" "Ouroboros.Network.Magic" "ouroboros-network-api-0.5.0.0-DOtC5oCVHp0D42rekkGuEr" 'True) (C1 ('MetaCons "NetworkMagic" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNetworkMagic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) |
type BlockType = BlockInMode CardanoMode Source #
The block type used in the node-to-client protocols.
newtype IntersectionNotFoundException Source #
Thrown when the user-provided custom point of intersection is unknown to the local node. This may happen if users shut down their node quickly after starting them and hold on a not-so-stable point of the chain. When they turn the node back on, that point may no longer exist on the network if a fork with deeper roots has been adopted in the meantime.
Constructors
IntersectionNotFound | |
Fields
|
Instances
data ConnectException Source #
Constructors
ConnectException | |
Fields
|
Instances
Exception ConnectException Source # | |
Defined in Hydra.Chain.Direct Methods toException :: ConnectException -> SomeException Source # fromException :: SomeException -> Maybe ConnectException Source # | |
Show ConnectException Source # | |
Defined in Hydra.Chain.Direct |
initialChainState :: ChainStateType Tx Source #
Defines the starting state of the direct chain layer.
Arguments
:: ChainConfig | |
-> Party | Hydra party of our hydra node. |
-> [Party] | Other configured parties |
-> TxId | Transaction id at which to look for Hydra scripts. |
-> IO ChainContext |
Build the ChainContext
from a ChainConfig
and additional information.
mkTinyWallet :: Tracer IO DirectChainLog -> ChainConfig -> IO (TinyWallet IO) Source #
Arguments
:: Tracer IO DirectChainLog | |
-> ChainConfig | |
-> ChainContext | |
-> TinyWallet IO | |
-> ChainStateAt | Last known chain state as loaded from persistence. |
-> ChainComponent Tx IO a |
chainSyncClient :: forall m. (MonadSTM m, MonadThrow m) => ChainSyncHandler m -> TinyWallet m -> ChainPoint -> ChainSyncClient BlockType ChainPoint ChainTip m () Source #
txSubmissionClient :: forall m. MonadSTM m => Tracer m DirectChainLog -> TQueue m (Tx, TMVar m (Maybe (PostTxError Tx))) -> LocalTxSubmissionClient (TxInMode CardanoMode) (TxValidationErrorInMode CardanoMode) m () Source #