Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ShelleyTxSeq era where
- TxSeq' !(StrictSeq (ShelleyTx era)) ByteString ByteString ByteString
- pattern ShelleyTxSeq ∷ ∀ era. (EraTx era, Tx era ~ ShelleyTx era, SafeToHash (TxWits era)) ⇒ StrictSeq (Tx era) → ShelleyTxSeq era
- constructMetadata ∷ ∀ era. Int → Map Int (Annotator (TxAuxData era)) → Seq (Maybe (Annotator (TxAuxData era)))
- txSeqTxns ∷ ShelleyTxSeq era → StrictSeq (ShelleyTx era)
- bbHash ∷ ∀ era. Era era ⇒ ShelleyTxSeq era → Hash (EraCrypto era) EraIndependentBlockBody
- bBodySize ∷ EraSegWits era ⇒ ProtVer → TxSeq era → Int
- slotToNonce ∷ SlotNo → Nonce
- incrBlocks ∷ Bool → KeyHash 'StakePool c → BlocksMade c → BlocksMade c
- coreAuxDataBytes ∷ EraTx era ⇒ Tx era → StrictMaybe ByteString
- txSeqDecoder ∷ ∀ era. EraTx era ⇒ Bool → ∀ s. Decoder s (Annotator (ShelleyTxSeq era))
Documentation
data ShelleyTxSeq era Source #
TxSeq' !(StrictSeq (ShelleyTx era)) ByteString ByteString ByteString |
pattern ShelleyTxSeq ∷ ∀ era. (EraTx era, Tx era ~ ShelleyTx era, SafeToHash (TxWits era)) ⇒ StrictSeq (Tx era) → ShelleyTxSeq era | Constuct a TxSeq (with all it bytes) from just Tx's |
Instances
constructMetadata ∷ ∀ era. Int → Map Int (Annotator (TxAuxData era)) → Seq (Maybe (Annotator (TxAuxData era))) Source #
Given a size and a mapping from indices to maybe metadata, return a sequence whose size is the size paramater and whose non-Nothing values correspond to the values in the mapping.
bbHash ∷ ∀ era. Era era ⇒ ShelleyTxSeq era → Hash (EraCrypto era) EraIndependentBlockBody Source #
Hash a given block body
slotToNonce ∷ SlotNo → Nonce Source #
incrBlocks ∷ Bool → KeyHash 'StakePool c → BlocksMade c → BlocksMade c Source #
coreAuxDataBytes ∷ EraTx era ⇒ Tx era → StrictMaybe ByteString Source #
txSeqDecoder ∷ ∀ era. EraTx era ⇒ Bool → ∀ s. Decoder s (Annotator (ShelleyTxSeq era)) Source #
The parts of the Tx in Blocks that have to have DecCBOR(Annotator x) instances. These are exactly the parts that are SafeToHash. | Decode a TxSeq, used in decoding a Block.
Orphan instances
Crypto c ⇒ EraSegWits (ShelleyEra c) Source # | |
type TxSeq (ShelleyEra c) = (r ∷ Type) Source # fromTxSeq ∷ TxSeq (ShelleyEra c) → StrictSeq (Tx (ShelleyEra c)) Source # toTxSeq ∷ StrictSeq (Tx (ShelleyEra c)) → TxSeq (ShelleyEra c) Source # hashTxSeq ∷ TxSeq (ShelleyEra c) → Hash (HASH (EraCrypto (ShelleyEra c))) EraIndependentBlockBody Source # |