Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types to ReexposeLedger #420

Merged
merged 6 commits into from
Feb 13, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 65 additions & 13 deletions cardano-api/internal/Cardano/Api/ReexposeLedger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

module Cardano.Api.ReexposeLedger
( Credential (..)
, credToText
, KeyHash(..)
, KeyRole(..)
, VKey (..)
, ShelleyTxCert(..)
, ShelleyDelegCert(..)
, ShelleyEraTxCert(..)
, PState (..)
, GenesisDelegCert(..)
, GenDelegPair(..)
, StakeReference (..)
, WitVKey (..)
, hashKey
, hashVerKeyVRF
, hashWithSerialiser
, PoolParams (..)
, HasKeyRole
, MIRPot(..)
Expand Down Expand Up @@ -37,6 +46,7 @@ module Cardano.Api.ReexposeLedger
-- Core
, Coin (..)
, EraCrypto
, Era
, Network(..)
, PoolCert(..)
, PParams(..)
Expand All @@ -46,6 +56,7 @@ module Cardano.Api.ReexposeLedger
, toDeltaCoin
, toEraCBOR
, fromEraCBOR
, ppMinUTxOValueL

-- Conway
, Anchor(..)
Expand All @@ -56,11 +67,14 @@ module Cardano.Api.ReexposeLedger
, ConwayDelegCert(..)
, ConwayEraTxCert(..)
, ConwayGovCert(..)
, ConwayGenesis
, GovState
, GovActionId(..)
, Vote (..)
, Voter (..)
, VotingProcedure(..)
, ProposalProcedure(..)
, VotingProcedures(..)
, PoolVotingThresholds(..)
, DRepVotingThresholds(..)
, dvtPPNetworkGroupL
Expand All @@ -74,15 +88,29 @@ module Cardano.Api.ReexposeLedger
, csCommitteeCredsL

-- Byron
, Annotated
, Annotated(..)
, Byron.Tx(..)
, byronProtVer
, serialize'
, toPlainDecoder
, toCBOR
, fromCBOR
, ByteSpan (..)
, slice
, Decoder

-- Shelley
, secondsToNominalDiffTimeMicro

-- Babbage
, CoinPerByte (..)

-- Alonzo
, CoinPerWord (..)
, Prices(..)
, CostModels
, AlonzoGenesis
, ppPricesL

-- Base
, boundRational
Expand All @@ -97,48 +125,72 @@ module Cardano.Api.ReexposeLedger
, ProtVer(..)
, strictMaybeToMaybe
, maybeToStrictMaybe
, AnchorData(..)
, hashAnchorData
, UnitInterval
, mkVersion
, NonNegativeInterval

-- Crypto
, hashToBytes
, hashFromBytes
, Crypto
, StandardCrypto
, ADDRHASH

-- Slotting
, EpochNo(..)

-- SafeHash
, SafeHash
, unsafeMakeSafeHash
, extractHash
) where

import qualified Cardano.Chain.UTxO as Byron
import Cardano.Crypto.Hash.Class (hashFromBytes, hashToBytes)
import Cardano.Ledger.Alonzo.Core (CoinPerWord (..), PParamsUpdate (..))
import Cardano.Ledger.Alonzo.Scripts (Prices (..))
import Cardano.Ledger.Alonzo.Core (CoinPerWord (..), PParamsUpdate (..), ppPricesL)
import Cardano.Ledger.Alonzo.Genesis (AlonzoGenesis)
import Cardano.Ledger.Alonzo.Scripts (CostModels (..), Prices (..))
import Cardano.Ledger.Api.Tx.Cert (pattern AuthCommitteeHotKeyTxCert,
pattern DelegStakeTxCert, pattern DelegTxCert, pattern GenesisDelegTxCert,
pattern MirTxCert, pattern RegDRepTxCert, pattern RegDepositDelegTxCert,
pattern RegDepositTxCert, pattern RegPoolTxCert, pattern RegTxCert,
pattern ResignCommitteeColdTxCert, pattern RetirePoolTxCert,
pattern UnRegDRepTxCert, pattern UnRegDepositTxCert, pattern UnRegTxCert)
import Cardano.Ledger.Babbage.Core (CoinPerByte (..))
import Cardano.Ledger.BaseTypes (DnsName, Network (..), ProtVer (..), StrictMaybe (..),
Url, boundRational, dnsToText, maybeToStrictMaybe, portToWord16,
strictMaybeToMaybe, textToDns, textToUrl, unboundRational, urlToText)
import Cardano.Ledger.Binary (Annotated (..))
import Cardano.Ledger.BaseTypes (AnchorData (..), DnsName, Network (..),
NonNegativeInterval, ProtVer (..), StrictMaybe (..), UnitInterval, Url,
boundRational, dnsToText, hashAnchorData, maybeToStrictMaybe, mkVersion,
portToWord16, strictMaybeToMaybe, textToDns, textToUrl, unboundRational,
urlToText)
import Cardano.Ledger.Binary (Annotated (..), ByteSpan (..), byronProtVer, fromCBOR,
serialize', slice, toCBOR, toPlainDecoder)
import Cardano.Ledger.Binary.Plain (Decoder)
import Cardano.Ledger.CertState (DRepState, csCommitteeCredsL)
import Cardano.Ledger.Coin (Coin (..), addDeltaCoin, toDeltaCoin)
import Cardano.Ledger.Conway.Core (DRepVotingThresholds (..), PoolVotingThresholds (..),
dvtPPEconomicGroupL, dvtPPGovGroupL, dvtPPNetworkGroupL, dvtPPTechnicalGroupL,
dvtUpdateToConstitutionL)
import Cardano.Ledger.Conway.Genesis (ConwayGenesis)
import Cardano.Ledger.Conway.Governance (Anchor (..), GovActionId (..), GovState,
Vote (..), Voter (..), VotingProcedure (..))
ProposalProcedure (..), Vote (..), Voter (..), VotingProcedure (..),
VotingProcedures (..))
import Cardano.Ledger.Conway.TxCert (ConwayDelegCert (..), ConwayEraTxCert (..),
ConwayGovCert (..), ConwayTxCert (..), Delegatee (..), pattern UpdateDRepTxCert)
import Cardano.Ledger.Core (EraCrypto, PParams (..), PoolCert (..), Value, fromEraCBOR,
toEraCBOR)
import Cardano.Ledger.Credential (Credential (..))
import Cardano.Ledger.Crypto (Crypto, StandardCrypto)
import Cardano.Ledger.Core (Era, EraCrypto, PParams (..), PoolCert (..), Value,
fromEraCBOR, ppMinUTxOValueL, toEraCBOR)
import Cardano.Ledger.Credential (Credential (..), credToText)
import Cardano.Ledger.Crypto (ADDRHASH, Crypto, StandardCrypto)
import Cardano.Ledger.DRep (DRep (..), drepAnchorL, drepDepositL, drepExpiryL)
import Cardano.Ledger.Keys (HasKeyRole, KeyHash (..), KeyRole (..))
import Cardano.Ledger.Keys (HasKeyRole, KeyHash (..), KeyRole (..), VKey (..),
hashWithSerialiser)
import Cardano.Ledger.PoolParams (PoolMetadata (..), PoolParams (..), StakePoolRelay (..))
import Cardano.Ledger.SafeHash (SafeHash, extractHash, unsafeMakeSafeHash)
import Cardano.Ledger.Shelley.API (GenDelegPair (..), StakeReference (..), WitVKey (..),
hashKey, hashVerKeyVRF)
import Cardano.Ledger.Shelley.Genesis (secondsToNominalDiffTimeMicro)
import Cardano.Ledger.Shelley.LedgerState (PState (..))
import Cardano.Ledger.Shelley.TxCert (EraTxCert (..), GenesisDelegCert (..), MIRCert (..),
MIRPot (..), MIRTarget (..), ShelleyDelegCert (..), ShelleyEraTxCert (..),
ShelleyTxCert (..))
Expand Down
Loading