| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Ledger.Cardano
Synopsis
- adjustUTxO :: Tx -> UTxO -> UTxO
- fromChainSlot :: ChainSlot -> SlotNo
- cardanoLedger :: Globals -> LedgerEnv LedgerEra -> Ledger Tx
- newLedgerEnv :: PParams LedgerEra -> LedgerEnv LedgerEra
- mkTransferTx :: MonadFail m => NetworkId -> UTxO -> Secret (SigningKey PaymentKey) -> VerificationKey PaymentKey -> m Tx
- mkSimpleTx :: (TxIn, TxOut CtxUTxO) -> (AddressInEra, Value) -> Secret (SigningKey PaymentKey) -> Either TxBodyError Tx
- data ShelleyGenesis = ShelleyGenesis {
- sgSystemStart :: !UTCTime
- sgNetworkMagic :: !Word32
- sgNetworkId :: !Network
- sgActiveSlotsCoeff :: !PositiveUnitInterval
- sgSecurityParam :: !(NonZero Word64)
- sgEpochLength :: !EpochSize
- sgSlotsPerKESPeriod :: !Word64
- sgMaxKESEvolutions :: !Word64
- sgSlotLength :: !NominalDiffTimeMicro
- sgUpdateQuorum :: !Word64
- sgMaxLovelaceSupply :: !Word64
- sgProtocolParams :: !(PParams ShelleyEra)
- sgGenDelegs :: !(Map (KeyHash 'GenesisRole) GenDelegPair)
- sgInitialFunds :: ListMap Addr Coin
- sgStaking :: ShelleyGenesisStaking
- data Globals
- data LedgerEnv era
- type Tx = Tx Era
Documentation
adjustUTxO :: Tx -> UTxO -> UTxO Source #
fromChainSlot :: ChainSlot -> SlotNo Source #
Simple conversion from a generic slot to a specific local one.
cardanoLedger :: Globals -> LedgerEnv LedgerEra -> Ledger Tx Source #
Use the cardano-ledger as an in-hydra Ledger.
newLedgerEnv :: PParams LedgerEra -> LedgerEnv LedgerEra Source #
Create a new ledger env from given protocol parameters.
mkTransferTx :: MonadFail m => NetworkId -> UTxO -> Secret (SigningKey PaymentKey) -> VerificationKey PaymentKey -> m Tx Source #
Build a zero-fee transaction which spends the first output owned by given signing key and transfers it in full to given verification key.
Arguments
| :: (TxIn, TxOut CtxUTxO) | |
| -> (AddressInEra, Value) | Recipient address and amount. |
| -> Secret (SigningKey PaymentKey) | Sender's signing key. |
| -> Either TxBodyError Tx |
Build a zero-fee payment transaction.
data ShelleyGenesis #
Constructors
| ShelleyGenesis | |
Fields
| |