Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type SlotNoBhh = (SlotNo, Hash BlockHeader)
- getSecurityParamAndNetworkId :: FilePath -> IO (SecurityParam, NetworkId)
- getNetworkId :: FilePath -> IO NetworkId
- tipDistance :: BlockInMode mode -> ChainTip -> Natural
- newtype UnspecifiedException = UnspecifiedException String
- queryCurrentEra :: LocalNodeConnectInfo CardanoMode -> IO AnyCardanoEra
- querySecurityParamEra :: LocalNodeConnectInfo CardanoMode -> ShelleyBasedEra era -> IO SecurityParam
- querySecurityParam :: LocalNodeConnectInfo CardanoMode -> IO SecurityParam
- blockChainPoint :: BlockInMode mode -> ChainPoint
- blockNo :: BlockInMode mode -> BlockNo
- blockSlotNoBhh :: BlockInMode mode -> SlotNoBhh
- blockSlotNo :: BlockInMode mode -> SlotNo
- chainPointSlotNo :: ChainPoint -> SlotNo
- txoAddressAny :: TxOut ctx era -> AddressAny
- toAddressAny :: AddressInEra era -> AddressAny
- streamPassReturn :: Monad m => Stream (Of a) m r -> (a -> Stream (Of a) m r -> Stream (Of b) m r) -> Stream (Of b) m r
- loopM :: (MonadTrans t1, Monad m, Monad (t1 m)) => Stream (Of t2) m b -> (t2 -> t1 m a) -> t1 m b
- foldYield :: Monad m => (st -> a -> m (st, b)) -> st -> Stream (Of a) m r -> Stream (Of b) m r
- minusNaturalMaybe :: Natural -> Natural -> Maybe Natural
- defaultConfigStderr :: IO Configuration
- defaultConfigStderrSeverity :: Severity -> IO Configuration
- newtype NodeFolder = NodeFolder FilePath
- newtype NodeConfig = NodeConfig FilePath
- newtype SocketPath = SocketPath FilePath
- lastByron :: SlotNoBhh
- lastShelley :: SlotNoBhh
- lastAllegra :: SlotNoBhh
- lastMary :: SlotNoBhh
- lastAlonzo :: SlotNoBhh
- data LedgerEra
- lastBlockOf :: LedgerEra -> Maybe SlotNoBhh
- lastChainPointOfPreviousEra :: LedgerEra -> ChainPoint
- slotEra :: SlotNo -> LedgerEra
- newtype TxIndexInBlock = TxIndexInBlock Word64
- allDatums :: Tx era -> [(Hash ScriptData, ScriptData)]
- plutusDatums :: [Tx era] -> [(Hash ScriptData, ScriptData)]
- txPlutusDatums :: Tx era -> [(Hash ScriptData, ScriptData)]
- txAlonzoDatums :: Tx era -> [(DataHash (EraCrypto (ShelleyLedgerEra era)), Data (ShelleyLedgerEra era))]
- alonzoTxBodyDatums :: TxBody era -> Map (DataHash (EraCrypto (ShelleyLedgerEra era))) (Data (ShelleyLedgerEra era))
- datumFromAlonzo :: Data ledgerera -> (Hash ScriptData, ScriptData)
- getFilteredTxOutDatumsFromTxs :: Maybe (Address ShelleyAddr -> Bool) -> [Tx era] -> Map (Hash ScriptData) ScriptData
- getFilteredAddressDatumsFromTxs :: Maybe (Address ShelleyAddr -> Bool) -> [Tx era] -> [(AddressAny, Either (Hash ScriptData) (Hash ScriptData, ScriptData))]
- txAddressDatums :: Tx era -> [(AddressAny, Either (Hash ScriptData) (Hash ScriptData, ScriptData))]
- txDatums :: Tx era -> [Either (Hash ScriptData) (Hash ScriptData, ScriptData)]
- maybeDatum :: TxOut CtxTx era -> Maybe (Either (Hash ScriptData) (Hash ScriptData, ScriptData))
Additions to cardano-api
getSecurityParamAndNetworkId :: FilePath -> IO (SecurityParam, NetworkId) #
getNetworkId :: FilePath -> IO NetworkId #
tipDistance :: BlockInMode mode -> ChainTip -> Natural #
Query node
newtype UnspecifiedException #
Instances
Exception UnspecifiedException # | |
Defined in Mafoc.Upstream | |
Show UnspecifiedException # | |
Defined in Mafoc.Upstream showsPrec :: Int -> UnspecifiedException -> ShowS # show :: UnspecifiedException -> String # showList :: [UnspecifiedException] -> ShowS # |
queryCurrentEra :: LocalNodeConnectInfo CardanoMode -> IO AnyCardanoEra #
Query the current era of the local node's current state.
querySecurityParamEra :: LocalNodeConnectInfo CardanoMode -> ShelleyBasedEra era -> IO SecurityParam #
Query security param from the local node given a Shelley based era.
querySecurityParam :: LocalNodeConnectInfo CardanoMode -> IO SecurityParam #
Block accessors
blockChainPoint :: BlockInMode mode -> ChainPoint #
Create a ChainPoint from BlockInMode
blockSlotNoBhh :: BlockInMode mode -> SlotNoBhh #
blockSlotNo :: BlockInMode mode -> SlotNo #
chainPointSlotNo :: ChainPoint -> SlotNo #
txoAddressAny :: TxOut ctx era -> AddressAny #
toAddressAny :: AddressInEra era -> AddressAny #
Labels
TxId
ChainPoint
BlockNo
SlotNo
Block header hash
Streaming
streamPassReturn :: Monad m => Stream (Of a) m r -> (a -> Stream (Of a) m r -> Stream (Of b) m r) -> Stream (Of b) m r #
loopM :: (MonadTrans t1, Monad m, Monad (t1 m)) => Stream (Of t2) m b -> (t2 -> t1 m a) -> t1 m b #
Consume a stream source
in a loop and run effect f
on it.
foldYield :: Monad m => (st -> a -> m (st, b)) -> st -> Stream (Of a) m r -> Stream (Of b) m r #
Fold a stream of a
's, yield a stream of b
s, while keeping a state of @st".
Base
Send traces to stdout
defaultConfigStderr :: IO Configuration #
defaultConfigStderrSeverity :: Severity -> IO Configuration #
Newtypes for file paths
newtype NodeFolder #
Not sure if anyone actually wants these upstreamed
Instances
IsString NodeFolder # | |
Defined in Mafoc.Upstream fromString :: String -> NodeFolder # | |
Show NodeFolder # | |
Defined in Mafoc.Upstream showsPrec :: Int -> NodeFolder -> ShowS # show :: NodeFolder -> String # showList :: [NodeFolder] -> ShowS # | |
IsLabel "nodeConfig" (NodeFolder -> NodeConfig) # | |
Defined in Mafoc.Upstream fromLabel :: NodeFolder -> NodeConfig # |
newtype NodeConfig #
Instances
newtype SocketPath #
Instances
IsString SocketPath # | |
Defined in Mafoc.Upstream fromString :: String -> SocketPath # | |
Show SocketPath # | |
Defined in Mafoc.Upstream showsPrec :: Int -> SocketPath -> ShowS # show :: SocketPath -> String # showList :: [SocketPath] -> ShowS # | |
IsLabel "socketPath" (LocalChainsyncConfig a -> SocketPath) # | |
Defined in Mafoc.Core fromLabel :: LocalChainsyncConfig a -> SocketPath # | |
IsLabel "socketPath" (NodeInfo a -> SocketPath) # | |
Defined in Mafoc.Core fromLabel :: NodeInfo a -> SocketPath # |
Hard-coded chainpoints
Shamelessly stolen from Kupo's docs https://cardanosolutions.github.io/kupo/#section/Era-boundaries
Shamelessly stolen from Kupo's docs https://cardanosolutions.github.io/kupo/#section/Era-boundaries
Shamelessly stolen from Kupo's docs https://cardanosolutions.github.io/kupo/#section/Era-boundaries
Shamelessly stolen from Kupo's docs https://cardanosolutions.github.io/kupo/#section/Era-boundaries
lastAlonzo :: SlotNoBhh #
Shamelessly stolen from Kupo's docs https://cardanosolutions.github.io/kupo/#section/Era-boundaries
Instances
lastBlockOf :: LedgerEra -> Maybe SlotNoBhh #
lastChainPointOfPreviousEra :: LedgerEra -> ChainPoint #
newtype TxIndexInBlock #
Instances
Datum
Datums from script data
plutusDatums :: [Tx era] -> [(Hash ScriptData, ScriptData)] #
Get a map of datum hash to datum from a list of transactions.
txPlutusDatums :: Tx era -> [(Hash ScriptData, ScriptData)] #
txAlonzoDatums :: Tx era -> [(DataHash (EraCrypto (ShelleyLedgerEra era)), Data (ShelleyLedgerEra era))] #
alonzoTxBodyDatums :: TxBody era -> Map (DataHash (EraCrypto (ShelleyLedgerEra era))) (Data (ShelleyLedgerEra era)) #
datumFromAlonzo :: Data ledgerera -> (Hash ScriptData, ScriptData) #
From TxOut
getFilteredTxOutDatumsFromTxs :: Maybe (Address ShelleyAddr -> Bool) -> [Tx era] -> Map (Hash ScriptData) ScriptData #
getFilteredAddressDatumsFromTxs :: Maybe (Address ShelleyAddr -> Bool) -> [Tx era] -> [(AddressAny, Either (Hash ScriptData) (Hash ScriptData, ScriptData))] #
txAddressDatums :: Tx era -> [(AddressAny, Either (Hash ScriptData) (Hash ScriptData, ScriptData))] #
maybeDatum :: TxOut CtxTx era -> Maybe (Either (Hash ScriptData) (Hash ScriptData, ScriptData)) #
Orphan instances
Exception AcquiringFailure # | |
toException :: AcquiringFailure -> SomeException # fromException :: SomeException -> Maybe AcquiringFailure # displayException :: AcquiringFailure -> String # | |
Exception EraMismatch # | |
toException :: EraMismatch -> SomeException # fromException :: SomeException -> Maybe EraMismatch # displayException :: EraMismatch -> String # | |
Ord ChainTip # | |
IsLabel "blockHeaderHash" (Block era -> Hash BlockHeader) # | |
IsLabel "blockHeaderHash" (BlockHeader -> Hash BlockHeader) # | |
IsLabel "blockHeaderHash" (BlockInMode era -> Hash BlockHeader) # | |
IsLabel "blockNo" (Block era -> BlockNo) # | |
IsLabel "blockNo" (BlockHeader -> BlockNo) # | |
IsLabel "blockNo" (BlockInMode mode -> BlockNo) # | |
IsLabel "calculateTxId" (Tx era -> TxId) # | |
IsLabel "calculateTxId" (TxBody era -> TxId) # | We say calculate because transaction body is actually hashed. |
IsLabel "chainPoint" (Block era -> ChainPoint) # | |
IsLabel "chainPoint" (BlockHeader -> ChainPoint) # | |
IsLabel "chainPoint" (BlockInMode era -> ChainPoint) # | |
IsLabel "chainPoint" (SlotNoBhh -> ChainPoint) # | |
IsLabel "slotNo" (Either SlotNo ChainPoint -> SlotNo) # | |
IsLabel "slotNo" (Block era -> SlotNo) # | |
IsLabel "slotNo" (BlockHeader -> SlotNo) # | |
IsLabel "slotNo" (BlockInMode era -> SlotNo) # | |
IsLabel "slotNo" (ChainPoint -> SlotNo) # | |
IsLabel "slotNo" (ChainTip -> SlotNo) # | |
IsLabel "slotNo" (SlotNoBhh -> SlotNo) # | |
IsLabel "slotNoBhh" (Block era -> SlotNoBhh) # | |
IsLabel "slotNoBhh" (BlockHeader -> SlotNoBhh) # | |
IsLabel "slotNoBhh" (BlockInMode era -> SlotNoBhh) # | |