cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.UtxoRpc.Type.Block

Description

Conversion of a fetched or streamed chain block to the UTxO RPC AnyChainBlock message.

Synopsis

Documentation

mkAnyChainBlock Source #

Arguments

:: ByteString

Raw CBOR bytes of the block, exactly as stored on chain

-> BlockInMode

The same block, parsed and placed in its era context

-> UTCTime

Slot wall-clock time; encoded as milliseconds since the Unix epoch

-> Proto AnyChainBlock

Message carrying the native bytes, the parsed cardano block and the timestamp

Assemble the AnyChainBlock proto message: raw CBOR bytes, the cardano header (slot, hash, height - derived from the block itself) and the parsed transactions (all eras), plus the given slot timestamp.