{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wno-orphans #-} module Cardano.Ledger.Allegra.TxSeq () where import Cardano.Ledger.Allegra.Era (AllegraEra) import Cardano.Ledger.Allegra.Tx () import Cardano.Ledger.Core (EraSegWits (..)) import Cardano.Ledger.Crypto (Crypto, StandardCrypto) import Cardano.Ledger.Shelley.BlockChain (ShelleyTxSeq (..), bbHash, txSeqTxns) instance Crypto c => EraSegWits (AllegraEra c) where {-# SPECIALIZE instance EraSegWits (AllegraEra StandardCrypto) #-} type TxSeq (AllegraEra c) = ShelleyTxSeq (AllegraEra c) fromTxSeq :: TxSeq (AllegraEra c) -> StrictSeq (Tx (AllegraEra c)) fromTxSeq = forall era. ShelleyTxSeq era -> StrictSeq (ShelleyTx era) txSeqTxns toTxSeq :: StrictSeq (Tx (AllegraEra c)) -> TxSeq (AllegraEra c) toTxSeq = forall era. (EraTx era, Tx era ~ ShelleyTx era, SafeToHash (TxWits era)) => StrictSeq (Tx era) -> ShelleyTxSeq era ShelleyTxSeq hashTxSeq :: TxSeq (AllegraEra c) -> Hash (HASH (EraCrypto (AllegraEra c))) EraIndependentBlockBody hashTxSeq = forall era. Era era => ShelleyTxSeq era -> Hash (EraCrypto era) EraIndependentBlockBody bbHash numSegComponents :: Word64 numSegComponents = Word64 3