Safe Haskell | None |
---|---|
Language | Haskell2010 |
- Eras
- Type tags
- Cryptographic key interface
- Payment addresses
- Stake addresses
- Currency values
- Blocks
- Building transactions
-
Building transactions
- Transaction bodies
- Transaction Ids
- Transaction inputs
- Transaction outputs
- Other transaction body types
- Building vs viewing transactions
- Era-dependent transaction body features
- Feature availability functions
- Fee calculation
- Minimum required UTxO calculation
- Script execution units
- Transaction balance
- Building transactions with automated fees and balancing
- Signing transactions
- Transaction metadata
- Certificates
- Stake pool off-chain metadata
-
Scripts
- Script languages
- Scripts in a specific language
- Scripts in any language
- Scripts in a specific era
- Use of a script in an era as a witness
-
Inspecting
ScriptWitness
es - Languages supported in each era
- Simple scripts
- Plutus scripts
- Script data
- Validation
- Conversion to/from JSON
- Script execution units
- Script addresses
- Serialisation
- Errors
- Node interaction
- Node operation
- Genesis file
- Special transactions
- Protocol parameter updates
- Node socket related
- Convenience functions
This module provides a library interface for interacting with Cardano as a user of the system.
It is intended to be the complete API covering everything but without exposing constructors that reveal any lower level types.
In the interest of simplicity it glosses over some details of the system. Most simple tools should be able to work just using this interface, however you can go deeper and expose the types from the underlying libraries using Cardano.Api.Byron or Cardano.Api.Shelley .
Synopsis
- data ByronEra
- data ShelleyEra
- data AllegraEra
- data MaryEra
- data AlonzoEra
- data BabbageEra
- data CardanoEra era where
-
class
HasTypeProxy
era =>
IsCardanoEra
era
where
- cardanoEra :: CardanoEra era
-
data
AnyCardanoEra
where
- AnyCardanoEra :: IsCardanoEra era => CardanoEra era -> AnyCardanoEra
- anyCardanoEra :: CardanoEra era -> AnyCardanoEra
-
data
InAnyCardanoEra
thing
where
- InAnyCardanoEra :: IsCardanoEra era => CardanoEra era -> thing era -> InAnyCardanoEra thing
- data ShelleyBasedEra era where
-
class
IsCardanoEra
era =>
IsShelleyBasedEra
era
where
- shelleyBasedEra :: ShelleyBasedEra era
-
data
InAnyShelleyBasedEra
thing
where
- InAnyShelleyBasedEra :: IsShelleyBasedEra era => ShelleyBasedEra era -> thing era -> InAnyShelleyBasedEra thing
-
data
CardanoEraStyle
era
where
- LegacyByronEra :: CardanoEraStyle ByronEra
- ShelleyBasedEra :: IsShelleyBasedEra era => ShelleyBasedEra era -> CardanoEraStyle era
- cardanoEraStyle :: CardanoEra era -> CardanoEraStyle era
- shelleyBasedToCardanoEra :: ShelleyBasedEra era -> CardanoEra era
- type Byron = ByronEra
- type Shelley = ShelleyEra
- type Allegra = AllegraEra
- type Mary = MaryEra
-
class
HasTypeProxy
t
where
- data AsType t
- proxyToAsType :: Proxy t -> AsType t
-
class
(
Eq
(
VerificationKey
keyrole),
Show
(
VerificationKey
keyrole),
SerialiseAsRawBytes
(
Hash
keyrole),
HasTextEnvelope
(
VerificationKey
keyrole),
HasTextEnvelope
(
SigningKey
keyrole)) =>
Key
keyrole
where
- data VerificationKey keyrole :: Type
- data SigningKey keyrole :: Type
- getVerificationKey :: SigningKey keyrole -> VerificationKey keyrole
- deterministicSigningKey :: AsType keyrole -> Seed -> SigningKey keyrole
- deterministicSigningKeySeedSize :: AsType keyrole -> Word
- verificationKeyHash :: VerificationKey keyrole -> Hash keyrole
- castVerificationKey :: CastVerificationKeyRole keyroleA keyroleB => VerificationKey keyroleA -> VerificationKey keyroleB
- castSigningKey :: CastSigningKeyRole keyroleA keyroleB => SigningKey keyroleA -> SigningKey keyroleB
- generateSigningKey :: Key keyrole => AsType keyrole -> IO ( SigningKey keyrole)
- data family Hash keyrole :: Type
- castHash :: CastHash roleA roleB => Hash roleA -> Hash roleB
- data Address addrtype
- data ByronAddr
- data ShelleyAddr
-
data
NetworkId
- = Mainnet
- | Testnet ! NetworkMagic
- makeByronAddress :: NetworkId -> VerificationKey ByronKey -> Address ByronAddr
- data ByronKey
- data ByronKeyLegacy
- makeShelleyAddress :: NetworkId -> PaymentCredential -> StakeAddressReference -> Address ShelleyAddr
- data PaymentCredential
- newtype StakeAddressPointer = StakeAddressPointer { }
- data StakeAddressReference
- data PaymentKey
- data PaymentExtendedKey
-
data
AddressAny
- = AddressByron !( Address ByronAddr )
- | AddressShelley !( Address ShelleyAddr )
- lexPlausibleAddressString :: Parser Text
- parseAddressAny :: Parser AddressAny
-
data
AddressInEra
era
where
- AddressInEra :: AddressTypeInEra addrtype era -> Address addrtype -> AddressInEra era
- isKeyAddress :: AddressInEra era -> Bool
-
data
AddressTypeInEra
addrtype era
where
- ByronAddressInAnyEra :: AddressTypeInEra ByronAddr era
- ShelleyAddressInEra :: ShelleyBasedEra era -> AddressTypeInEra ShelleyAddr era
- byronAddressInEra :: Address ByronAddr -> AddressInEra era
- shelleyAddressInEra :: IsShelleyBasedEra era => Address ShelleyAddr -> AddressInEra era
- anyAddressInShelleyBasedEra :: IsShelleyBasedEra era => AddressAny -> AddressInEra era
- anyAddressInEra :: CardanoEra era -> AddressAny -> Maybe ( AddressInEra era)
- toAddressAny :: Address addr -> AddressAny
- makeByronAddressInEra :: NetworkId -> VerificationKey ByronKey -> AddressInEra era
- makeShelleyAddressInEra :: IsShelleyBasedEra era => NetworkId -> PaymentCredential -> StakeAddressReference -> AddressInEra era
- data StakeAddress
- data StakeCredential
- makeStakeAddress :: NetworkId -> StakeCredential -> StakeAddress
- data StakeKey
- data StakeExtendedKey
- newtype Lovelace = Lovelace Integer
- newtype Quantity = Quantity Integer
- newtype PolicyId = PolicyId { }
- scriptPolicyId :: Script lang -> PolicyId
- newtype AssetName = AssetName ByteString
-
data
AssetId
- = AdaAssetId
- | AssetId ! PolicyId ! AssetName
- data Value
- parseValue :: Parser Value
- policyId :: Parser PolicyId
- selectAsset :: Value -> AssetId -> Quantity
- valueFromList :: [( AssetId , Quantity )] -> Value
- valueToList :: Value -> [( AssetId , Quantity )]
- filterValue :: ( AssetId -> Bool ) -> Value -> Value
- negateValue :: Value -> Value
- newtype ValueNestedRep = ValueNestedRep [ ValueNestedBundle ]
- data ValueNestedBundle
- valueToNestedRep :: Value -> ValueNestedRep
- valueFromNestedRep :: ValueNestedRep -> Value
- renderValue :: Value -> Text
- renderValuePretty :: Value -> Text
- quantityToLovelace :: Quantity -> Lovelace
- lovelaceToQuantity :: Lovelace -> Quantity
- selectLovelace :: Value -> Lovelace
- lovelaceToValue :: Lovelace -> Value
- valueToLovelace :: Value -> Maybe Lovelace
-
data
Block
era
where
- pattern Block :: BlockHeader -> [ Tx era] -> Block era
- data BlockHeader = BlockHeader ! SlotNo !( Hash BlockHeader ) ! BlockNo
- getBlockHeader :: forall era. Block era -> BlockHeader
-
data
ChainPoint
- = ChainPointAtGenesis
- | ChainPoint ! SlotNo !( Hash BlockHeader )
- newtype EpochNo = EpochNo { }
-
data
ChainTip
- = ChainTipAtGenesis
- | ChainTip ! SlotNo !( Hash BlockHeader ) ! BlockNo
- newtype BlockNo = BlockNo { }
- chainTipToChainPoint :: ChainTip -> ChainPoint
-
data
TxBody
era
where
- pattern TxBody :: TxBodyContent ViewTx era -> TxBody era
- makeTransactionBody :: forall era. IsCardanoEra era => TxBodyContent BuildTx era -> Either TxBodyError ( TxBody era)
-
data
TxBodyContent
build era =
TxBodyContent
{
- txIns :: TxIns build era
- txInsCollateral :: TxInsCollateral era
- txInsReference :: TxInsReference build era
- txOuts :: [ TxOut CtxTx era]
- txTotalCollateral :: TxTotalCollateral era
- txReturnCollateral :: TxReturnCollateral CtxTx era
- txFee :: TxFee era
- txValidityRange :: ( TxValidityLowerBound era, TxValidityUpperBound era)
- txMetadata :: TxMetadataInEra era
- txAuxScripts :: TxAuxScripts era
- txExtraKeyWits :: TxExtraKeyWitnesses era
- txProtocolParams :: BuildTxWith build ( Maybe ProtocolParameters )
- txWithdrawals :: TxWithdrawals build era
- txCertificates :: TxCertificates build era
- txUpdateProposal :: TxUpdateProposal era
- txMintValue :: TxMintValue build era
- txScriptValidity :: TxScriptValidity era
-
data
TxBodyError
- = TxBodyEmptyTxIns
- | TxBodyEmptyTxInsCollateral
- | TxBodyEmptyTxOuts
- | TxBodyOutputNegative Quantity TxOutInAnyEra
- | TxBodyOutputOverflow Quantity TxOutInAnyEra
- | TxBodyMetadataError [( Word64 , TxMetadataRangeError )]
- | TxBodyMintAdaError
- | TxBodyMissingProtocolParams
- | TxBodyInIxOverflow TxIn
-
data
TxBodyScriptData
era
where
- TxBodyNoScriptData :: TxBodyScriptData era
- TxBodyScriptData :: ScriptDataSupportedInEra era -> TxDats ( ShelleyLedgerEra era) -> Redeemers ( ShelleyLedgerEra era) -> TxBodyScriptData era
- newtype TxId = TxId ( Hash StandardCrypto EraIndependentTxBody )
- getTxId :: forall era. TxBody era -> TxId
- data TxIn = TxIn TxId TxIx
- newtype TxIx = TxIx Word
- renderTxIn :: TxIn -> Text
- data CtxTx
- data CtxUTxO
- data TxOut ctx era = TxOut ( AddressInEra era) ( TxOutValue era) ( TxOutDatum ctx era) ( ReferenceScript era)
-
data
TxOutValue
era
where
- TxOutAdaOnly :: OnlyAdaSupportedInEra era -> Lovelace -> TxOutValue era
- TxOutValue :: MultiAssetSupportedInEra era -> Value -> TxOutValue era
- txOutValueToLovelace :: TxOutValue era -> Lovelace
- txOutValueToValue :: TxOutValue era -> Value
- lovelaceToTxOutValue :: IsCardanoEra era => Lovelace -> TxOutValue era
-
data
TxOutDatum
ctx era
where
- TxOutDatumNone :: TxOutDatum ctx era
- TxOutDatumHash :: ScriptDataSupportedInEra era -> Hash ScriptData -> TxOutDatum ctx era
- TxOutDatumInline :: ReferenceTxInsScriptsInlineDatumsSupportedInEra era -> ScriptData -> TxOutDatum ctx era
- pattern TxOutDatumInTx :: ScriptDataSupportedInEra era -> ScriptData -> TxOutDatum CtxTx era
- parseHash :: SerialiseAsRawBytes ( Hash a) => AsType ( Hash a) -> Parser ( Hash a)
-
data
TxInsCollateral
era
where
- TxInsCollateralNone :: TxInsCollateral era
- TxInsCollateral :: CollateralSupportedInEra era -> [ TxIn ] -> TxInsCollateral era
-
data
TxInsReference
build era
where
- TxInsReferenceNone :: TxInsReference build era
- TxInsReference :: ReferenceTxInsScriptsInlineDatumsSupportedInEra era -> [ TxIn ] -> TxInsReference build era
-
data
TxTotalCollateral
era
where
- TxTotalCollateralNone :: TxTotalCollateral era
- TxTotalCollateral :: TxTotalAndReturnCollateralSupportedInEra era -> Lovelace -> TxTotalCollateral era
-
data
TxReturnCollateral
ctx era
where
- TxReturnCollateralNone :: TxReturnCollateral ctx era
- TxReturnCollateral :: TxTotalAndReturnCollateralSupportedInEra era -> TxOut ctx era -> TxReturnCollateral ctx era
-
data
TxFee
era
where
- TxFeeImplicit :: TxFeesImplicitInEra era -> TxFee era
- TxFeeExplicit :: TxFeesExplicitInEra era -> Lovelace -> TxFee era
- data TxValidityLowerBound era where
- data TxValidityUpperBound era where
- newtype SlotNo = SlotNo { }
- newtype EpochSlots = EpochSlots { }
-
data
TxMetadataInEra
era
where
- TxMetadataNone :: TxMetadataInEra era
- TxMetadataInEra :: TxMetadataSupportedInEra era -> TxMetadata -> TxMetadataInEra era
-
data
TxAuxScripts
era
where
- TxAuxScriptsNone :: TxAuxScripts era
- TxAuxScripts :: AuxScriptsSupportedInEra era -> [ ScriptInEra era] -> TxAuxScripts era
-
data
TxExtraKeyWitnesses
era
where
- TxExtraKeyWitnessesNone :: TxExtraKeyWitnesses era
- TxExtraKeyWitnesses :: TxExtraKeyWitnessesSupportedInEra era -> [ Hash PaymentKey ] -> TxExtraKeyWitnesses era
-
data
TxWithdrawals
build era
where
- TxWithdrawalsNone :: TxWithdrawals build era
- TxWithdrawals :: WithdrawalsSupportedInEra era -> [( StakeAddress , Lovelace , BuildTxWith build ( Witness WitCtxStake era))] -> TxWithdrawals build era
-
data
TxCertificates
build era
where
- TxCertificatesNone :: TxCertificates build era
- TxCertificates :: CertificatesSupportedInEra era -> [ Certificate ] -> BuildTxWith build ( Map StakeCredential ( Witness WitCtxStake era)) -> TxCertificates build era
-
data
TxUpdateProposal
era
where
- TxUpdateProposalNone :: TxUpdateProposal era
- TxUpdateProposal :: UpdateProposalSupportedInEra era -> UpdateProposal -> TxUpdateProposal era
-
data
TxMintValue
build era
where
- TxMintNone :: TxMintValue build era
- TxMintValue :: MultiAssetSupportedInEra era -> Value -> BuildTxWith build ( Map PolicyId ( ScriptWitness WitCtxMint era)) -> TxMintValue build era
-
data
BuildTxWith
build a
where
- ViewTx :: BuildTxWith ViewTx a
- BuildTxWith :: a -> BuildTxWith BuildTx a
- data BuildTx
- data ViewTx
- data CollateralSupportedInEra era where
- data MultiAssetSupportedInEra era where
- data OnlyAdaSupportedInEra era where
- data TxFeesExplicitInEra era where
- data TxFeesImplicitInEra era where
-
data
ValidityUpperBoundSupportedInEra
era
where
- ValidityUpperBoundInShelleyEra :: ValidityUpperBoundSupportedInEra ShelleyEra
- ValidityUpperBoundInAllegraEra :: ValidityUpperBoundSupportedInEra AllegraEra
- ValidityUpperBoundInMaryEra :: ValidityUpperBoundSupportedInEra MaryEra
- ValidityUpperBoundInAlonzoEra :: ValidityUpperBoundSupportedInEra AlonzoEra
- ValidityUpperBoundInBabbageEra :: ValidityUpperBoundSupportedInEra BabbageEra
-
data
ValidityNoUpperBoundSupportedInEra
era
where
- ValidityNoUpperBoundInByronEra :: ValidityNoUpperBoundSupportedInEra ByronEra
- ValidityNoUpperBoundInAllegraEra :: ValidityNoUpperBoundSupportedInEra AllegraEra
- ValidityNoUpperBoundInMaryEra :: ValidityNoUpperBoundSupportedInEra MaryEra
- ValidityNoUpperBoundInAlonzoEra :: ValidityNoUpperBoundSupportedInEra AlonzoEra
- ValidityNoUpperBoundInBabbageEra :: ValidityNoUpperBoundSupportedInEra BabbageEra
-
data
ValidityLowerBoundSupportedInEra
era
where
- ValidityLowerBoundInAllegraEra :: ValidityLowerBoundSupportedInEra AllegraEra
- ValidityLowerBoundInMaryEra :: ValidityLowerBoundSupportedInEra MaryEra
- ValidityLowerBoundInAlonzoEra :: ValidityLowerBoundSupportedInEra AlonzoEra
- ValidityLowerBoundInBabbageEra :: ValidityLowerBoundSupportedInEra BabbageEra
-
data
TxMetadataSupportedInEra
era
where
- TxMetadataInShelleyEra :: TxMetadataSupportedInEra ShelleyEra
- TxMetadataInAllegraEra :: TxMetadataSupportedInEra AllegraEra
- TxMetadataInMaryEra :: TxMetadataSupportedInEra MaryEra
- TxMetadataInAlonzoEra :: TxMetadataSupportedInEra AlonzoEra
- TxMetadataInBabbageEra :: TxMetadataSupportedInEra BabbageEra
- data AuxScriptsSupportedInEra era where
- data TxExtraKeyWitnessesSupportedInEra era where
- data ScriptDataSupportedInEra era where
-
data
WithdrawalsSupportedInEra
era
where
- WithdrawalsInShelleyEra :: WithdrawalsSupportedInEra ShelleyEra
- WithdrawalsInAllegraEra :: WithdrawalsSupportedInEra AllegraEra
- WithdrawalsInMaryEra :: WithdrawalsSupportedInEra MaryEra
- WithdrawalsInAlonzoEra :: WithdrawalsSupportedInEra AlonzoEra
- WithdrawalsInBabbageEra :: WithdrawalsSupportedInEra BabbageEra
-
data
CertificatesSupportedInEra
era
where
- CertificatesInShelleyEra :: CertificatesSupportedInEra ShelleyEra
- CertificatesInAllegraEra :: CertificatesSupportedInEra AllegraEra
- CertificatesInMaryEra :: CertificatesSupportedInEra MaryEra
- CertificatesInAlonzoEra :: CertificatesSupportedInEra AlonzoEra
- CertificatesInBabbageEra :: CertificatesSupportedInEra BabbageEra
-
data
UpdateProposalSupportedInEra
era
where
- UpdateProposalInShelleyEra :: UpdateProposalSupportedInEra ShelleyEra
- UpdateProposalInAllegraEra :: UpdateProposalSupportedInEra AllegraEra
- UpdateProposalInMaryEra :: UpdateProposalSupportedInEra MaryEra
- UpdateProposalInAlonzoEra :: UpdateProposalSupportedInEra AlonzoEra
- UpdateProposalInBabbageEra :: UpdateProposalSupportedInEra BabbageEra
- collateralSupportedInEra :: CardanoEra era -> Maybe ( CollateralSupportedInEra era)
- multiAssetSupportedInEra :: CardanoEra era -> Either ( OnlyAdaSupportedInEra era) ( MultiAssetSupportedInEra era)
- txFeesExplicitInEra :: CardanoEra era -> Either ( TxFeesImplicitInEra era) ( TxFeesExplicitInEra era)
- validityUpperBoundSupportedInEra :: CardanoEra era -> Maybe ( ValidityUpperBoundSupportedInEra era)
- validityNoUpperBoundSupportedInEra :: CardanoEra era -> Maybe ( ValidityNoUpperBoundSupportedInEra era)
- validityLowerBoundSupportedInEra :: CardanoEra era -> Maybe ( ValidityLowerBoundSupportedInEra era)
- txMetadataSupportedInEra :: CardanoEra era -> Maybe ( TxMetadataSupportedInEra era)
- auxScriptsSupportedInEra :: CardanoEra era -> Maybe ( AuxScriptsSupportedInEra era)
- extraKeyWitnessesSupportedInEra :: CardanoEra era -> Maybe ( TxExtraKeyWitnessesSupportedInEra era)
- withdrawalsSupportedInEra :: CardanoEra era -> Maybe ( WithdrawalsSupportedInEra era)
- certificatesSupportedInEra :: CardanoEra era -> Maybe ( CertificatesSupportedInEra era)
- updateProposalSupportedInEra :: CardanoEra era -> Maybe ( UpdateProposalSupportedInEra era)
- scriptDataSupportedInEra :: CardanoEra era -> Maybe ( ScriptDataSupportedInEra era)
- totalAndReturnCollateralSupportedInEra :: CardanoEra era -> Maybe (TxTotalAndReturnCollateralSupportedInEra era)
- transactionFee :: forall era. IsShelleyBasedEra era => Natural -> Natural -> Tx era -> Lovelace
- toLedgerEpochInfo :: EraHistory mode -> EpochInfo ( Either Text )
- estimateTransactionFee :: forall era. IsShelleyBasedEra era => NetworkId -> Natural -> Natural -> Tx era -> Int -> Int -> Int -> Int -> Lovelace
- evaluateTransactionFee :: forall era. IsShelleyBasedEra era => ProtocolParameters -> TxBody era -> Word -> Word -> Lovelace
- estimateTransactionKeyWitnessCount :: TxBodyContent BuildTx era -> Word
- calculateMinimumUTxO :: ShelleyBasedEra era -> TxOut CtxTx era -> ProtocolParameters -> Either MinimumUTxOError Value
- data MinimumUTxOError
- evaluateTransactionExecutionUnits :: forall era mode. EraInMode era mode -> SystemStart -> EraHistory mode -> ProtocolParameters -> UTxO era -> TxBody era -> Either TransactionValidityError ( Map ScriptWitnessIndex ( Either ScriptExecutionError ExecutionUnits ))
-
data
ScriptExecutionError
- = ScriptErrorMissingTxIn TxIn
- | ScriptErrorTxInWithoutDatum TxIn
- | ScriptErrorWrongDatum ( Hash ScriptData )
- | ScriptErrorEvaluationFailed EvaluationError [ Text ]
- | ScriptErrorExecutionUnitsOverflow
- | ScriptErrorNotPlutusWitnessedTxIn ScriptWitnessIndex ScriptHash
- | ScriptErrorRedeemerPointsToUnknownScriptHash ScriptWitnessIndex
- | ScriptErrorMissingScript RdmrPtr ResolvablePointers
- | ScriptErrorMissingCostModel Language
- data TransactionValidityError
- evaluateTransactionBalance :: forall era. IsShelleyBasedEra era => ProtocolParameters -> Set PoolId -> UTxO era -> TxBody era -> TxOutValue era
- makeTransactionBodyAutoBalance :: forall era mode. IsShelleyBasedEra era => EraInMode era mode -> SystemStart -> EraHistory mode -> ProtocolParameters -> Set PoolId -> UTxO era -> TxBodyContent BuildTx era -> AddressInEra era -> Maybe Word -> Either TxBodyErrorAutoBalance ( BalancedTxBody era)
- data BalancedTxBody era = BalancedTxBody ( TxBody era) ( TxOut CtxTx era) Lovelace
-
data
TxBodyErrorAutoBalance
- = TxBodyError TxBodyError
- | TxBodyScriptExecutionError [( ScriptWitnessIndex , ScriptExecutionError )]
- | TxBodyScriptBadScriptValidity
- | TxBodyErrorAssetBalanceWrong Value
- | TxBodyErrorAdaBalanceNegative Lovelace
- | TxBodyErrorAdaBalanceTooSmall TxOutInAnyEra Lovelace Lovelace
- | TxBodyErrorByronEraNotSupported
- | TxBodyErrorMissingParamMinUTxO
- | TxBodyErrorValidityInterval TransactionValidityError
- | TxBodyErrorMinUTxONotMet TxOutInAnyEra Lovelace
- | TxBodyErrorMinUTxOMissingPParams MinimumUTxOError
- | TxBodyErrorNonAdaAssetsUnbalanced Value
- | TxBodyErrorScriptWitnessIndexMissingFromExecUnitsMap ScriptWitnessIndex ( Map ScriptWitnessIndex ExecutionUnits )
-
data
TxScriptValidity
era
where
- TxScriptValidityNone :: TxScriptValidity era
- TxScriptValidity :: TxScriptValiditySupportedInEra era -> ScriptValidity -> TxScriptValidity era
- data ScriptValidity
- data TxScriptValiditySupportedInEra era where
- scriptValidityToTxScriptValidity :: ShelleyBasedEra era -> ScriptValidity -> TxScriptValidity era
- txScriptValiditySupportedInShelleyBasedEra :: ShelleyBasedEra era -> Maybe ( TxScriptValiditySupportedInEra era)
- txScriptValiditySupportedInCardanoEra :: CardanoEra era -> Maybe ( TxScriptValiditySupportedInEra era)
-
data
Tx
era
where
- pattern Tx :: TxBody era -> [ KeyWitness era] -> Tx era
- getTxBody :: forall era. Tx era -> TxBody era
- getTxWitnesses :: forall era. Tx era -> [ KeyWitness era]
- signByronTransaction :: NetworkId -> TxBody ByronEra -> [ SigningKey ByronKey ] -> Tx ByronEra
- signShelleyTransaction :: IsShelleyBasedEra era => TxBody era -> [ ShelleyWitnessSigningKey ] -> Tx era
- makeSignedTransaction :: forall era. [ KeyWitness era] -> TxBody era -> Tx era
- data KeyWitness era
- makeByronKeyWitness :: forall key. IsByronKey key => NetworkId -> TxBody ByronEra -> SigningKey key -> KeyWitness ByronEra
-
data
ShelleyWitnessSigningKey
- = WitnessPaymentKey ( SigningKey PaymentKey )
- | WitnessPaymentExtendedKey ( SigningKey PaymentExtendedKey )
- | WitnessStakeKey ( SigningKey StakeKey )
- | WitnessStakeExtendedKey ( SigningKey StakeExtendedKey )
- | WitnessStakePoolKey ( SigningKey StakePoolKey )
- | WitnessGenesisKey ( SigningKey GenesisKey )
- | WitnessGenesisExtendedKey ( SigningKey GenesisExtendedKey )
- | WitnessGenesisDelegateKey ( SigningKey GenesisDelegateKey )
- | WitnessGenesisDelegateExtendedKey ( SigningKey GenesisDelegateExtendedKey )
- | WitnessGenesisUTxOKey ( SigningKey GenesisUTxOKey )
- makeShelleyKeyWitness :: forall era. IsShelleyBasedEra era => TxBody era -> ShelleyWitnessSigningKey -> KeyWitness era
- makeShelleyBootstrapWitness :: forall era. IsShelleyBasedEra era => WitnessNetworkIdOrByronAddress -> TxBody era -> SigningKey ByronKey -> KeyWitness era
- newtype TxMetadata = TxMetadata ( Map Word64 TxMetadataValue )
-
data
TxMetadataValue
- = TxMetaMap [( TxMetadataValue , TxMetadataValue )]
- | TxMetaList [ TxMetadataValue ]
- | TxMetaNumber Integer
- | TxMetaBytes ByteString
- | TxMetaText Text
- makeTransactionMetadata :: Map Word64 TxMetadataValue -> TxMetadata
- validateTxMetadata :: TxMetadata -> Either [( Word64 , TxMetadataRangeError )] ()
- data TxMetadataRangeError
- data TxMetadataJsonSchema
- metadataFromJson :: TxMetadataJsonSchema -> Value -> Either TxMetadataJsonError TxMetadata
- metadataToJson :: TxMetadataJsonSchema -> TxMetadata -> Value
- metadataValueToJsonNoSchema :: TxMetadataValue -> Value
- data TxMetadataJsonError
- data TxMetadataJsonSchemaError
-
data
Certificate
- = StakeAddressRegistrationCertificate StakeCredential
- | StakeAddressDeregistrationCertificate StakeCredential
- | StakeAddressDelegationCertificate StakeCredential PoolId
- | StakePoolRegistrationCertificate StakePoolParameters
- | StakePoolRetirementCertificate PoolId EpochNo
- | GenesisKeyDelegationCertificate ( Hash GenesisKey ) ( Hash GenesisDelegateKey ) ( Hash VrfKey )
- | MIRCertificate MIRPot MIRTarget
- makeStakeAddressRegistrationCertificate :: StakeCredential -> Certificate
- makeStakeAddressDeregistrationCertificate :: StakeCredential -> Certificate
- makeStakeAddressDelegationCertificate :: StakeCredential -> PoolId -> Certificate
- makeStakePoolRegistrationCertificate :: StakePoolParameters -> Certificate
- makeStakePoolRetirementCertificate :: PoolId -> EpochNo -> Certificate
- data StakePoolParameters
- data StakePoolRelay
- data StakePoolMetadataReference
- data StakePoolMetadata
- validateAndHashStakePoolMetadata :: ByteString -> Either StakePoolMetadataValidationError ( StakePoolMetadata , Hash StakePoolMetadata )
- data StakePoolMetadataValidationError
- data SimpleScriptV1
- data SimpleScriptV2
- data PlutusScriptV1
- data PlutusScriptV2
-
data
ScriptLanguage
lang
where
- SimpleScriptLanguage :: SimpleScriptVersion lang -> ScriptLanguage lang
- PlutusScriptLanguage :: PlutusScriptVersion lang -> ScriptLanguage lang
- data SimpleScriptVersion lang where
- data PlutusScriptVersion lang where
-
data
AnyScriptLanguage
where
- AnyScriptLanguage :: ScriptLanguage lang -> AnyScriptLanguage
- data AnyPlutusScriptVersion where
-
class
HasTypeProxy
lang =>
IsScriptLanguage
lang
where
- scriptLanguage :: ScriptLanguage lang
- class IsScriptLanguage lang => IsSimpleScriptLanguage lang where
-
data
Script
lang
where
- SimpleScript :: !( SimpleScriptVersion lang) -> !( SimpleScript lang) -> Script lang
- PlutusScript :: !( PlutusScriptVersion lang) -> !( PlutusScript lang) -> Script lang
-
data
ScriptInAnyLang
where
- ScriptInAnyLang :: ScriptLanguage lang -> Script lang -> ScriptInAnyLang
- toScriptInAnyLang :: Script lang -> ScriptInAnyLang
-
data
ScriptInEra
era
where
- ScriptInEra :: ScriptLanguageInEra lang era -> Script lang -> ScriptInEra era
- toScriptInEra :: CardanoEra era -> ScriptInAnyLang -> Maybe ( ScriptInEra era)
- eraOfScriptInEra :: ScriptInEra era -> ShelleyBasedEra era
- data WitCtxTxIn
- data WitCtxMint
- data WitCtxStake
- data WitCtx witctx where
-
data
ScriptWitness
witctx era
where
- SimpleScriptWitness :: ScriptLanguageInEra lang era -> SimpleScriptVersion lang -> SimpleScriptOrReferenceInput lang -> ScriptWitness witctx era
- PlutusScriptWitness :: ScriptLanguageInEra lang era -> PlutusScriptVersion lang -> PlutusScriptOrReferenceInput lang -> ScriptDatum witctx -> ScriptRedeemer -> ExecutionUnits -> ScriptWitness witctx era
-
data
Witness
witctx era
where
- KeyWitness :: KeyWitnessInCtx witctx -> Witness witctx era
- ScriptWitness :: ScriptWitnessInCtx witctx -> ScriptWitness witctx era -> Witness witctx era
- data KeyWitnessInCtx witctx where
- data ScriptWitnessInCtx witctx where
- data ScriptDatum witctx where
- type ScriptRedeemer = ScriptData
- scriptWitnessScript :: ScriptWitness witctx era -> Maybe ( ScriptInEra era)
-
data
AnyScriptWitness
era
where
- AnyScriptWitness :: ScriptWitness witctx era -> AnyScriptWitness era
- data ScriptWitnessIndex
- renderScriptWitnessIndex :: ScriptWitnessIndex -> String
- collectTxBodyScriptWitnesses :: forall era. TxBodyContent BuildTx era -> [( ScriptWitnessIndex , AnyScriptWitness era)]
- mapTxScriptWitnesses :: forall era. ( forall witctx. ScriptWitnessIndex -> ScriptWitness witctx era -> Either TxBodyErrorAutoBalance ( ScriptWitness witctx era)) -> TxBodyContent BuildTx era -> Either TxBodyErrorAutoBalance ( TxBodyContent BuildTx era)
-
data
ScriptLanguageInEra
lang era
where
- SimpleScriptV1InShelley :: ScriptLanguageInEra SimpleScriptV1 ShelleyEra
- SimpleScriptV1InAllegra :: ScriptLanguageInEra SimpleScriptV1 AllegraEra
- SimpleScriptV1InMary :: ScriptLanguageInEra SimpleScriptV1 MaryEra
- SimpleScriptV1InAlonzo :: ScriptLanguageInEra SimpleScriptV1 AlonzoEra
- SimpleScriptV1InBabbage :: ScriptLanguageInEra SimpleScriptV1 BabbageEra
- SimpleScriptV2InAllegra :: ScriptLanguageInEra SimpleScriptV2 AllegraEra
- SimpleScriptV2InMary :: ScriptLanguageInEra SimpleScriptV2 MaryEra
- SimpleScriptV2InAlonzo :: ScriptLanguageInEra SimpleScriptV2 AlonzoEra
- SimpleScriptV2InBabbage :: ScriptLanguageInEra SimpleScriptV2 BabbageEra
- PlutusScriptV1InAlonzo :: ScriptLanguageInEra PlutusScriptV1 AlonzoEra
- PlutusScriptV1InBabbage :: ScriptLanguageInEra PlutusScriptV1 BabbageEra
- PlutusScriptV2InBabbage :: ScriptLanguageInEra PlutusScriptV2 BabbageEra
- scriptLanguageSupportedInEra :: CardanoEra era -> ScriptLanguage lang -> Maybe ( ScriptLanguageInEra lang era)
- languageOfScriptLanguageInEra :: ScriptLanguageInEra lang era -> ScriptLanguage lang
- eraOfScriptLanguageInEra :: ScriptLanguageInEra lang era -> ShelleyBasedEra era
-
data
SimpleScript
lang
where
- RequireSignature :: !( Hash PaymentKey ) -> SimpleScript lang
- RequireTimeBefore :: !( TimeLocksSupported lang) -> ! SlotNo -> SimpleScript lang
- RequireTimeAfter :: !( TimeLocksSupported lang) -> ! SlotNo -> SimpleScript lang
- RequireAllOf :: [ SimpleScript lang] -> SimpleScript lang
- RequireAnyOf :: [ SimpleScript lang] -> SimpleScript lang
- RequireMOf :: Int -> [ SimpleScript lang] -> SimpleScript lang
- data TimeLocksSupported lang where
- timeLocksSupported :: SimpleScriptVersion lang -> Maybe ( TimeLocksSupported lang)
- adjustSimpleScriptVersion :: SimpleScriptVersion lang' -> SimpleScript lang -> Maybe ( SimpleScript lang')
- data PlutusScript lang
- examplePlutusScriptAlwaysSucceeds :: WitCtx witctx -> PlutusScript PlutusScriptV1
- examplePlutusScriptAlwaysFails :: WitCtx witctx -> PlutusScript PlutusScriptV1
-
data
ScriptData
- = ScriptDataConstructor Integer [ ScriptData ]
- | ScriptDataMap [( ScriptData , ScriptData )]
- | ScriptDataList [ ScriptData ]
- | ScriptDataNumber Integer
- | ScriptDataBytes ByteString
- hashScriptData :: ScriptData -> Hash ScriptData
- data ScriptDataRangeError
- validateScriptData :: ScriptData -> Either ScriptDataRangeError ()
- data ScriptDataJsonSchema
- scriptDataFromJson :: ScriptDataJsonSchema -> Value -> Either ScriptDataJsonError ScriptData
- scriptDataToJson :: ScriptDataJsonSchema -> ScriptData -> Value
- data ScriptDataJsonError
- data ScriptDataJsonSchemaError
- data ExecutionUnits = ExecutionUnits { }
- data ExecutionUnitPrices = ExecutionUnitPrices { }
- newtype CostModel = CostModel ( Map Text Integer )
- validateCostModel :: PlutusScriptVersion lang -> CostModel -> Either InvalidCostModel ()
- data ScriptHash
- hashScript :: Script lang -> ScriptHash
- class HasTypeProxy a => SerialiseAsCBOR a
- class Typeable a => ToCBOR a
- class Typeable a => FromCBOR a
- serialiseToCBOR :: SerialiseAsCBOR a => a -> ByteString
- deserialiseFromCBOR :: SerialiseAsCBOR a => AsType a -> ByteString -> Either DecoderError a
- class ToJSON a
- class FromJSON a
- serialiseToJSON :: ToJSON a => a -> ByteString
- deserialiseFromJSON :: FromJSON a => AsType a -> ByteString -> Either JsonDecodeError a
- newtype JsonDecodeError = JsonDecodeError String
- readFileJSON :: FromJSON a => AsType a -> FilePath -> IO ( Either ( FileError JsonDecodeError ) a)
- writeFileJSON :: ToJSON a => FilePath -> a -> IO ( Either ( FileError ()) ())
- prettyPrintJSON :: ToJSON a => a -> ByteString
- class ( HasTypeProxy a, SerialiseAsRawBytes a) => SerialiseAsBech32 a
- serialiseToBech32 :: SerialiseAsBech32 a => a -> Text
- deserialiseFromBech32 :: SerialiseAsBech32 a => AsType a -> Text -> Either Bech32DecodeError a
- deserialiseAnyOfFromBech32 :: forall b. [ FromSomeType SerialiseAsBech32 b] -> Text -> Either Bech32DecodeError b
- data Bech32DecodeError
- class HasTypeProxy addr => SerialiseAddress addr
- serialiseAddress :: SerialiseAddress addr => addr -> Text
- deserialiseAddress :: SerialiseAddress addr => AsType addr -> Text -> Maybe addr
- class HasTypeProxy a => SerialiseAsRawBytes a
- serialiseToRawBytes :: SerialiseAsRawBytes a => a -> ByteString
- deserialiseFromRawBytes :: SerialiseAsRawBytes a => AsType a -> ByteString -> Maybe a
- serialiseToRawBytesHex :: SerialiseAsRawBytes a => a -> ByteString
- deserialiseFromRawBytesHex :: SerialiseAsRawBytes a => AsType a -> ByteString -> Either RawBytesHexError a
- serialiseToRawBytesHexText :: SerialiseAsRawBytes a => a -> Text
-
class
SerialiseAsCBOR
a =>
HasTextEnvelope
a
where
- textEnvelopeType :: AsType a -> TextEnvelopeType
- textEnvelopeDefaultDescr :: a -> TextEnvelopeDescr
-
data
TextEnvelope
=
TextEnvelope
{
- teType :: ! TextEnvelopeType
- teDescription :: ! TextEnvelopeDescr
- teRawCBOR :: ! ByteString
- newtype TextEnvelopeType = TextEnvelopeType String
- data TextEnvelopeDescr
- data TextEnvelopeError
- textEnvelopeRawCBOR :: TextEnvelope -> ByteString
- serialiseToTextEnvelope :: forall a. HasTextEnvelope a => Maybe TextEnvelopeDescr -> a -> TextEnvelope
- deserialiseFromTextEnvelope :: HasTextEnvelope a => AsType a -> TextEnvelope -> Either TextEnvelopeError a
- readFileTextEnvelope :: HasTextEnvelope a => AsType a -> FilePath -> IO ( Either ( FileError TextEnvelopeError ) a)
- writeFileTextEnvelope :: HasTextEnvelope a => FilePath -> Maybe TextEnvelopeDescr -> a -> IO ( Either ( FileError ()) ())
- writeFileTextEnvelopeWithOwnerPermissions :: HasTextEnvelope a => FilePath -> Maybe TextEnvelopeDescr -> a -> IO ( Either ( FileError ()) ())
- readTextEnvelopeFromFile :: FilePath -> IO ( Either ( FileError TextEnvelopeError ) TextEnvelope )
- readTextEnvelopeOfTypeFromFile :: TextEnvelopeType -> FilePath -> IO ( Either ( FileError TextEnvelopeError ) TextEnvelope )
-
data
FromSomeTypeCDDL
c b
where
- FromCDDLTx :: Text -> ( InAnyCardanoEra Tx -> b) -> FromSomeTypeCDDL TextEnvelopeCddl b
- FromCDDLWitness :: Text -> ( InAnyCardanoEra KeyWitness -> b) -> FromSomeTypeCDDL TextEnvelopeCddl b
- readFileTextEnvelopeCddlAnyOf :: [ FromSomeTypeCDDL TextEnvelopeCddl b] -> FilePath -> IO ( Either ( FileError TextEnvelopeCddlError ) b)
- writeTxFileTextEnvelopeCddl :: IsCardanoEra era => FilePath -> Tx era -> IO ( Either ( FileError ()) ())
- writeTxWitnessFileTextEnvelopeCddl :: ShelleyBasedEra era -> FilePath -> KeyWitness era -> IO ( Either ( FileError ()) ())
- serialiseTxLedgerCddl :: forall era. IsCardanoEra era => Tx era -> TextEnvelopeCddl
- deserialiseTxLedgerCddl :: IsCardanoEra era => CardanoEra era -> TextEnvelopeCddl -> Either TextEnvelopeCddlError ( Tx era)
- serialiseWitnessLedgerCddl :: forall era. ShelleyBasedEra era -> KeyWitness era -> TextEnvelopeCddl
- deserialiseWitnessLedgerCddl :: ShelleyBasedEra era -> TextEnvelopeCddl -> Either TextEnvelopeCddlError ( KeyWitness era)
- data TextEnvelopeCddlError
-
data
FromSomeType
(c ::
Type
->
Constraint
) b
where
- FromSomeType :: c a => AsType a -> (a -> b) -> FromSomeType c b
- deserialiseFromTextEnvelopeAnyOf :: [ FromSomeType HasTextEnvelope b] -> TextEnvelope -> Either TextEnvelopeError b
- readFileTextEnvelopeAnyOf :: [ FromSomeType HasTextEnvelope b] -> FilePath -> IO ( Either ( FileError TextEnvelopeError ) b)
-
class
Show
e =>
Error
e
where
- displayError :: e -> String
- throwErrorAsException :: Error e => e -> IO a
- data FileError e
- data Env = Env { }
- envSecurityParam :: Env -> Word64
-
newtype
LedgerState
where
- LedgerState { }
- pattern LedgerStateAlonzo :: LedgerState ( ShelleyBlock protocol ( AlonzoEra StandardCrypto )) -> LedgerState
- pattern LedgerStateMary :: LedgerState ( ShelleyBlock protocol ( MaryEra StandardCrypto )) -> LedgerState
- pattern LedgerStateAllegra :: LedgerState ( ShelleyBlock protocol ( AllegraEra StandardCrypto )) -> LedgerState
- pattern LedgerStateShelley :: LedgerState ( ShelleyBlock protocol ( ShelleyEra StandardCrypto )) -> LedgerState
- pattern LedgerStateByron :: LedgerState ByronBlock -> LedgerState
- initialLedgerState :: FilePath -> ExceptT InitialLedgerStateError IO ( Env , LedgerState )
- applyBlock :: Env -> LedgerState -> ValidationMode -> Block era -> Either LedgerStateError ( LedgerState , [ LedgerEvent ])
- data ValidationMode
-
data
LedgerEvent
- = PoolRegistration Certificate
- | PoolReRegistration Certificate
- | IncrementalRewardsDistribution EpochNo ( Map StakeCredential ( Set ( Reward StandardCrypto )))
- | RewardsDistribution EpochNo ( Map StakeCredential ( Set ( Reward StandardCrypto )))
- | MIRDistribution MIRDistributionDetails
- | PoolReap PoolReapDetails
- data MIRDistributionDetails = MIRDistributionDetails { }
-
data
PoolReapDetails
=
PoolReapDetails
{
- prdEpochNo :: EpochNo
- prdRefunded :: Map StakeCredential ( Map ( Hash StakePoolKey ) Lovelace )
- prdUnclaimed :: Map StakeCredential ( Map ( Hash StakePoolKey ) Lovelace )
- toLedgerEvent :: ConvertLedgerEvent blk => WrapLedgerEvent blk -> Maybe LedgerEvent
- foldBlocks :: forall a. FilePath -> FilePath -> ValidationMode -> a -> ( Env -> LedgerState -> [ LedgerEvent ] -> BlockInMode CardanoMode -> a -> IO a) -> ExceptT FoldBlocksError IO a
- chainSyncClientWithLedgerState :: forall m a. Monad m => Env -> LedgerState -> ValidationMode -> ChainSyncClient ( BlockInMode CardanoMode , Either LedgerStateError ( LedgerState , [ LedgerEvent ])) ChainPoint ChainTip m a -> ChainSyncClient ( BlockInMode CardanoMode ) ChainPoint ChainTip m a
- chainSyncClientPipelinedWithLedgerState :: forall m a. Monad m => Env -> LedgerState -> ValidationMode -> ChainSyncClientPipelined ( BlockInMode CardanoMode , Either LedgerStateError ( LedgerState , [ LedgerEvent ])) ChainPoint ChainTip m a -> ChainSyncClientPipelined ( BlockInMode CardanoMode ) ChainPoint ChainTip m a
- data LedgerStateError
- data FoldBlocksError
-
data
GenesisConfigError
- = NEError ! Text
- | NEByronConfig ! FilePath ! ConfigurationError
- | NEShelleyConfig ! FilePath ! Text
- | NEAlonzoConfig ! FilePath ! Text
- | NECardanoConfig ! Text
- data InitialLedgerStateError
- renderLedgerStateError :: LedgerStateError -> Text
- renderFoldBlocksError :: FoldBlocksError -> Text
- renderGenesisConfigError :: GenesisConfigError -> Text
- renderInitialLedgerStateError :: InitialLedgerStateError -> Text
- connectToLocalNode :: LocalNodeConnectInfo mode -> LocalNodeClientProtocolsInMode mode -> IO ()
- connectToLocalNodeWithVersion :: LocalNodeConnectInfo mode -> ( NodeToClientVersion -> LocalNodeClientProtocolsInMode mode) -> IO ()
- data LocalNodeConnectInfo mode = LocalNodeConnectInfo { }
-
data
AnyConsensusMode
where
- AnyConsensusMode :: ConsensusMode mode -> AnyConsensusMode
- renderMode :: AnyConsensusMode -> Text
- data ConsensusMode mode where
- consensusModeOnly :: ConsensusModeParams mode -> ConsensusMode mode
- data ConsensusModeIsMultiEra mode where
- data AnyConsensusModeParams where
- data ConsensusModeParams mode where
- type family ConsensusProtocol era where ...
- type family ChainDepStateProtocol era where ...
- type family ConsensusBlockForMode mode where ...
- type family ConsensusBlockForEra era where ...
-
data
EraInMode
era mode
where
- ByronEraInByronMode :: EraInMode ByronEra ByronMode
- ShelleyEraInShelleyMode :: EraInMode ShelleyEra ShelleyMode
- ByronEraInCardanoMode :: EraInMode ByronEra CardanoMode
- ShelleyEraInCardanoMode :: EraInMode ShelleyEra CardanoMode
- AllegraEraInCardanoMode :: EraInMode AllegraEra CardanoMode
- MaryEraInCardanoMode :: EraInMode MaryEra CardanoMode
- AlonzoEraInCardanoMode :: EraInMode AlonzoEra CardanoMode
- BabbageEraInCardanoMode :: EraInMode BabbageEra CardanoMode
- toEraInMode :: CardanoEra era -> ConsensusMode mode -> Maybe ( EraInMode era mode)
-
data
LocalNodeClientProtocols
block point tip slot tx txid txerr query m =
LocalNodeClientProtocols
{
- localChainSyncClient :: LocalChainSyncClient block point tip m
- localTxSubmissionClient :: Maybe ( LocalTxSubmissionClient tx txerr m ())
- localStateQueryClient :: Maybe ( LocalStateQueryClient block point query m ())
- localTxMonitoringClient :: Maybe ( LocalTxMonitorClient txid tx slot m ())
-
data
LocalNodeClientParams
where
- LocalNodeClientParamsSingleBlock :: ( ProtocolClient block, LedgerSupportsProtocol ( ShelleyBlock ( TPraos StandardCrypto ) ( ShelleyEra StandardCrypto ))) => ProtocolClientInfoArgs block -> ( NodeToClientVersion -> LocalNodeClientProtocolsForBlock block) -> LocalNodeClientParams
- LocalNodeClientParamsCardano :: ( ProtocolClient block, CardanoHardForkConstraints (ConsensusCryptoForBlock block)) => ProtocolClientInfoArgs block -> ( NodeToClientVersion -> LocalNodeClientProtocolsForBlock block) -> LocalNodeClientParams
- mkLocalNodeClientParams :: forall mode block. ConsensusBlockForMode mode ~ block => ConsensusModeParams mode -> ( NodeToClientVersion -> LocalNodeClientProtocolsInMode mode) -> LocalNodeClientParams
-
data
LocalChainSyncClient
block point tip m
- = NoLocalChainSyncClient
- | LocalChainSyncClientPipelined ( ChainSyncClientPipelined block point tip m ())
- | LocalChainSyncClient ( ChainSyncClient block point tip m ())
- data CardanoMode
-
newtype
ChainSyncClient
header point tip (m ::
Type
->
Type
) a =
ChainSyncClient
{
- runChainSyncClient :: m ( ClientStIdle header point tip m a)
-
newtype
ChainSyncClientPipelined
header point tip (m ::
Type
->
Type
) a =
ChainSyncClientPipelined
{
- runChainSyncClientPipelined :: m ( ClientPipelinedStIdle ' Z header point tip m a)
-
data
BlockInMode
mode
where
- BlockInMode :: IsCardanoEra era => Block era -> EraInMode era mode -> BlockInMode mode
- type LocalNodeClientProtocolsInMode mode = LocalNodeClientProtocols ( BlockInMode mode) ChainPoint ChainTip SlotNo ( TxInMode mode) (TxIdInMode mode) ( TxValidationErrorInMode mode) ( QueryInMode mode) IO
- data LocalTxSubmissionClient tx reject (m :: Type -> Type ) a
-
data
TxInMode
mode
where
- TxInMode :: Tx era -> EraInMode era mode -> TxInMode mode
- TxInByronSpecial :: GenTx ByronBlock -> EraInMode ByronEra mode -> TxInMode mode
-
data
TxValidationErrorInMode
mode
where
- TxValidationErrorInMode :: TxValidationError era -> EraInMode era mode -> TxValidationErrorInMode mode
- TxValidationEraMismatch :: EraMismatch -> TxValidationErrorInMode mode
- runLocalTxSubmissionClient :: LocalTxSubmissionClient tx reject m a -> m ( LocalTxClientStIdle tx reject m a)
- submitTxToNodeLocal :: forall mode. LocalNodeConnectInfo mode -> TxInMode mode -> IO ( SubmitResult ( TxValidationErrorInMode mode))
-
newtype
LocalStateQueryClient
block point (query ::
Type
->
Type
) (m ::
Type
->
Type
) a =
LocalStateQueryClient
{
- runLocalStateQueryClient :: m ( ClientStIdle block point query m a)
-
data
QueryInMode
mode result
where
- QueryCurrentEra :: ConsensusModeIsMultiEra mode -> QueryInMode mode AnyCardanoEra
- QueryInEra :: EraInMode era mode -> QueryInEra era result -> QueryInMode mode ( Either EraMismatch result)
- QueryEraHistory :: ConsensusModeIsMultiEra mode -> QueryInMode mode ( EraHistory mode)
- QuerySystemStart :: QueryInMode mode SystemStart
- QueryChainBlockNo :: QueryInMode mode ( WithOrigin BlockNo )
- QueryChainPoint :: ConsensusMode mode -> QueryInMode mode ChainPoint
- newtype SystemStart = SystemStart { }
-
data
QueryInEra
era result
where
- QueryByronUpdateState :: QueryInEra ByronEra ByronUpdateState
- QueryInShelleyBasedEra :: ShelleyBasedEra era -> QueryInShelleyBasedEra era result -> QueryInEra era result
-
data
QueryInShelleyBasedEra
era result
where
- QueryEpoch :: QueryInShelleyBasedEra era EpochNo
- QueryGenesisParameters :: QueryInShelleyBasedEra era GenesisParameters
- QueryProtocolParameters :: QueryInShelleyBasedEra era ProtocolParameters
- QueryProtocolParametersUpdate :: QueryInShelleyBasedEra era ( Map ( Hash GenesisKey ) ProtocolParametersUpdate )
- QueryStakeDistribution :: QueryInShelleyBasedEra era ( Map ( Hash StakePoolKey ) Rational )
- QueryUTxO :: QueryUTxOFilter -> QueryInShelleyBasedEra era ( UTxO era)
- QueryStakeAddresses :: Set StakeCredential -> NetworkId -> QueryInShelleyBasedEra era ( Map StakeAddress Lovelace , Map StakeAddress PoolId )
- QueryStakePools :: QueryInShelleyBasedEra era ( Set PoolId )
- QueryStakePoolParameters :: Set PoolId -> QueryInShelleyBasedEra era ( Map PoolId StakePoolParameters )
- QueryDebugLedgerState :: QueryInShelleyBasedEra era ( SerialisedDebugLedgerState era)
- QueryProtocolState :: QueryInShelleyBasedEra era ( ProtocolState era)
- QueryCurrentEpochState :: QueryInShelleyBasedEra era ( SerialisedCurrentEpochState era)
-
data
QueryUTxOFilter
- = QueryUTxOWhole
- | QueryUTxOByAddress ( Set AddressAny )
- | QueryUTxOByTxIn ( Set TxIn )
- newtype UTxO era = UTxO { }
- queryNodeLocalState :: forall mode result. LocalNodeConnectInfo mode -> Maybe ChainPoint -> QueryInMode mode result -> IO ( Either AcquiringFailure result)
- executeQueryCardanoMode :: CardanoEra era -> NetworkId -> QueryInMode CardanoMode ( Either EraMismatch result) -> IO ( Either QueryConvenienceError result)
-
newtype
LocalTxMonitorClient
txid tx slot (m ::
Type
->
Type
) a =
LocalTxMonitorClient
{
- runLocalTxMonitorClient :: m ( ClientStIdle txid tx slot m a)
-
data
LocalTxMonitoringQuery
mode
- = LocalTxMonitoringQueryTx (TxIdInMode mode)
- | LocalTxMonitoringSendNextTx
- | LocalTxMonitoringMempoolInformation
- data LocalTxMonitoringResult mode
-
data
MempoolSizeAndCapacity
=
MempoolSizeAndCapacity
{
- capacityInBytes :: ! Word32
- sizeInBytes :: ! Word32
- numberOfTxs :: ! Word32
- queryTxMonitoringLocal :: forall mode. LocalNodeConnectInfo mode -> LocalTxMonitoringQuery mode -> IO ( LocalTxMonitoringResult mode)
-
data
EraHistory
mode
where
- EraHistory :: ConsensusBlockForMode mode ~ HardForkBlock xs => ConsensusMode mode -> Interpreter xs -> EraHistory mode
- getProgress :: SlotNo -> EraHistory mode -> Either PastHorizonException ( RelativeTime , SlotLength )
- determineEra :: ConsensusModeParams mode -> LocalNodeConnectInfo mode -> IO ( Either AcquiringFailure AnyCardanoEra )
- getLocalChainTip :: LocalNodeConnectInfo mode -> IO ChainTip
- data OperationalCertificate
- data OperationalCertificateIssueCounter
- data OperationalCertIssueError
- getHotKey :: OperationalCertificate -> VerificationKey KesKey
- getKesPeriod :: OperationalCertificate -> Word
- getOpCertCount :: OperationalCertificate -> Word64
- issueOperationalCertificate :: VerificationKey KesKey -> Either ( SigningKey StakePoolKey ) ( SigningKey GenesisDelegateExtendedKey ) -> KESPeriod -> OperationalCertificateIssueCounter -> Either OperationalCertIssueError ( OperationalCertificate , OperationalCertificateIssueCounter )
- data GenesisKey
- data GenesisExtendedKey
- data GenesisDelegateKey
- data GenesisDelegateExtendedKey
- data GenesisUTxOKey
- genesisUTxOPseudoTxIn :: NetworkId -> Hash GenesisUTxOKey -> TxIn
-
data
GenesisParameters
=
GenesisParameters
{
- protocolParamSystemStart :: UTCTime
- protocolParamNetworkId :: NetworkId
- protocolParamActiveSlotsCoefficient :: Rational
- protocolParamSecurity :: Int
- protocolParamEpochLength :: EpochSize
- protocolParamSlotLength :: NominalDiffTime
- protocolParamSlotsPerKESPeriod :: Int
- protocolParamMaxKESEvolutions :: Int
- protocolParamUpdateQuorum :: Int
- protocolParamMaxLovelaceSupply :: Lovelace
- protocolInitialUpdateableProtocolParameters :: ProtocolParameters
- makeMIRCertificate :: MIRPot -> MIRTarget -> Certificate
- makeGenesisKeyDelegationCertificate :: Hash GenesisKey -> Hash GenesisDelegateKey -> Hash VrfKey -> Certificate
- data MIRTarget
- data UpdateProposal = UpdateProposal !( Map ( Hash GenesisKey ) ProtocolParametersUpdate ) ! EpochNo
-
data
ProtocolParametersUpdate
=
ProtocolParametersUpdate
{
- protocolUpdateProtocolVersion :: Maybe ( Natural , Natural )
- protocolUpdateDecentralization :: Maybe Rational
- protocolUpdateExtraPraosEntropy :: Maybe ( Maybe PraosNonce )
- protocolUpdateMaxBlockHeaderSize :: Maybe Natural
- protocolUpdateMaxBlockBodySize :: Maybe Natural
- protocolUpdateMaxTxSize :: Maybe Natural
- protocolUpdateTxFeeFixed :: Maybe Natural
- protocolUpdateTxFeePerByte :: Maybe Natural
- protocolUpdateMinUTxOValue :: Maybe Lovelace
- protocolUpdateStakeAddressDeposit :: Maybe Lovelace
- protocolUpdateStakePoolDeposit :: Maybe Lovelace
- protocolUpdateMinPoolCost :: Maybe Lovelace
- protocolUpdatePoolRetireMaxEpoch :: Maybe EpochNo
- protocolUpdateStakePoolTargetNum :: Maybe Natural
- protocolUpdatePoolPledgeInfluence :: Maybe Rational
- protocolUpdateMonetaryExpansion :: Maybe Rational
- protocolUpdateTreasuryCut :: Maybe Rational
- protocolUpdateUTxOCostPerWord :: Maybe Lovelace
- protocolUpdateCostModels :: Map AnyPlutusScriptVersion CostModel
- protocolUpdatePrices :: Maybe ExecutionUnitPrices
- protocolUpdateMaxTxExUnits :: Maybe ExecutionUnits
- protocolUpdateMaxBlockExUnits :: Maybe ExecutionUnits
- protocolUpdateMaxValueSize :: Maybe Natural
- protocolUpdateCollateralPercent :: Maybe Natural
- protocolUpdateMaxCollateralInputs :: Maybe Natural
- protocolUpdateUTxOCostPerByte :: Maybe Lovelace
- makeShelleyUpdateProposal :: ProtocolParametersUpdate -> [ Hash GenesisKey ] -> EpochNo -> UpdateProposal
- data PraosNonce
- makePraosNonce :: ByteString -> PraosNonce
- newtype NetworkMagic = NetworkMagic { }
- toLedgerPParams :: ShelleyBasedEra era -> ProtocolParameters -> PParams ( ShelleyLedgerEra era)
- fromLedgerPParams :: ShelleyBasedEra era -> PParams ( ShelleyLedgerEra era) -> ProtocolParameters
- toCtxUTxOTxOut :: TxOut CtxTx era -> TxOut CtxUTxO era
- fromNetworkMagic :: NetworkMagic -> NetworkId
- toNetworkMagic :: NetworkId -> NetworkMagic
- fromLedgerTxOuts :: forall era. ShelleyBasedEra era -> TxBody ( ShelleyLedgerEra era) -> TxBodyScriptData era -> [ TxOut CtxTx era]
- toLedgerUTxO :: ShelleyLedgerEra era ~ ledgerera => Crypto ledgerera ~ StandardCrypto => ShelleyBasedEra era -> UTxO era -> UTxO ledgerera
- runParsecParser :: Parser a -> Text -> Parser a
- newtype SlotsInEpoch = SlotsInEpoch Word64
- newtype SlotsToEpochEnd = SlotsToEpochEnd Word64
- slotToEpoch :: SlotNo -> EraHistory mode -> Either PastHorizonException ( EpochNo , SlotsInEpoch , SlotsToEpochEnd )
- newtype EnvSocketError = CliEnvVarLookup Text
- newtype SocketPath = SocketPath { }
- readEnvSocketPath :: IO ( Either EnvSocketError SocketPath )
- renderEnvSocketError :: EnvSocketError -> Text
- data NodeToClientVersion
- data LocalStateQueryExpr block point query r m a
- executeLocalStateQueryExpr :: LocalNodeConnectInfo mode -> Maybe ChainPoint -> ( NodeToClientVersion -> LocalStateQueryExpr ( BlockInMode mode) ChainPoint ( QueryInMode mode) () IO a) -> IO ( Either AcquiringFailure a)
- queryExpr :: QueryInMode mode a -> LocalStateQueryExpr block point ( QueryInMode mode) r IO a
- determineEraExpr :: ConsensusModeParams mode -> LocalStateQueryExpr block point ( QueryInMode mode) r IO AnyCardanoEra
- chainPointToSlotNo :: ChainPoint -> Maybe SlotNo
- chainPointToHeaderHash :: ChainPoint -> Maybe ( Hash BlockHeader )
- makeChainTip :: WithOrigin BlockNo -> ChainPoint -> ChainTip
- parseFilePath :: String -> String -> Parser FilePath
- writeSecrets :: FilePath -> [ Char ] -> [ Char ] -> (a -> ByteString ) -> [a] -> IO ()
-
class
EraCast
(f ::
Type
->
Type
)
where
- eraCast :: ( IsCardanoEra fromEra, IsCardanoEra toEra) => CardanoEra toEra -> f fromEra -> Either EraCastError (f toEra)
-
data
EraCastError
=
forall
fromEra toEra value.(
IsCardanoEra
fromEra,
IsCardanoEra
toEra,
Show
value) =>
EraCastError
{
- originalValue :: value
- fromEra :: CardanoEra fromEra
- toEra :: CardanoEra toEra
- constructBalancedTx :: IsShelleyBasedEra era => EraInMode era CardanoMode -> TxBodyContent BuildTx era -> AddressInEra era -> Maybe Word -> UTxO era -> ProtocolParameters -> EraHistory CardanoMode -> SystemStart -> Set PoolId -> [ ShelleyWitnessSigningKey ] -> Either TxBodyErrorAutoBalance ( Tx era)
- data QueryConvenienceError
- queryStateForBalancedTx :: CardanoEra era -> NetworkId -> [ TxIn ] -> IO ( Either QueryConvenienceError ( UTxO era, ProtocolParameters , EraHistory CardanoMode , SystemStart , Set PoolId ))
- renderQueryConvenienceError :: QueryConvenienceError -> Text
- getIsCardanoEraConstraint :: CardanoEra era -> ( IsCardanoEra era => a) -> a
- newtype ScriptLockedTxInsError = ScriptLockedTxIns [ TxIn ]
-
data
TxInsExistError
- = TxInsDoNotExist [ TxIn ]
- | EmptyUTxO
- renderNotScriptLockedTxInsError :: ScriptLockedTxInsError -> Text
- renderTxInsExistError :: TxInsExistError -> Text
- txInsExistInUTxO :: [ TxIn ] -> UTxO era -> Either TxInsExistError ()
- notScriptLockedTxIns :: [ TxIn ] -> UTxO era -> Either ScriptLockedTxInsError ()
- textShow :: Show a => a -> Text
Eras
A type used as a tag to distinguish the Byron era.
Instances
HasTypeProxy ByronEra Source # | |
IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras |
|
FromJSON ( EraInMode ByronEra CardanoMode ) Source # | |
Defined in Cardano.Api.Modes |
|
FromJSON ( EraInMode ByronEra ByronMode ) Source # | |
data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras |
data ShelleyEra Source #
A type used as a tag to distinguish the Shelley era.
Instances
HasTypeProxy ShelleyEra Source # | |
Defined in Cardano.Api.Eras data AsType ShelleyEra Source # |
|
IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras |
|
FromJSON ( EraInMode ShelleyEra CardanoMode ) Source # | |
Defined in Cardano.Api.Modes parseJSON :: Value -> Parser ( EraInMode ShelleyEra CardanoMode ) Source # parseJSONList :: Value -> Parser [ EraInMode ShelleyEra CardanoMode ] Source # |
|
FromJSON ( EraInMode ShelleyEra ShelleyMode ) Source # | |
Defined in Cardano.Api.Modes parseJSON :: Value -> Parser ( EraInMode ShelleyEra ShelleyMode ) Source # parseJSONList :: Value -> Parser [ EraInMode ShelleyEra ShelleyMode ] Source # |
|
data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras |
data AllegraEra Source #
A type used as a tag to distinguish the Allegra era.
Instances
HasTypeProxy AllegraEra Source # | |
Defined in Cardano.Api.Eras data AsType AllegraEra Source # |
|
IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras |
|
FromJSON ( EraInMode AllegraEra CardanoMode ) Source # | |
Defined in Cardano.Api.Modes parseJSON :: Value -> Parser ( EraInMode AllegraEra CardanoMode ) Source # parseJSONList :: Value -> Parser [ EraInMode AllegraEra CardanoMode ] Source # |
|
data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras |
A type used as a tag to distinguish the Mary era.
Instances
HasTypeProxy MaryEra Source # | |
IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras |
|
FromJSON ( EraInMode MaryEra CardanoMode ) Source # | |
Defined in Cardano.Api.Modes |
|
data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras |
A type used as a tag to distinguish the Alonzo era.
Instances
HasTypeProxy AlonzoEra Source # | |
IsShelleyBasedEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras |
|
FromJSON ( EraInMode AlonzoEra CardanoMode ) Source # | |
Defined in Cardano.Api.Modes |
|
data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Eras |
data BabbageEra Source #
A type used as a tag to distinguish the Babbage era.
Instances
HasTypeProxy BabbageEra Source # | |
Defined in Cardano.Api.Eras data AsType BabbageEra Source # |
|
IsShelleyBasedEra BabbageEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra BabbageEra Source # | |
Defined in Cardano.Api.Eras |
|
data AsType BabbageEra Source # | |
Defined in Cardano.Api.Eras |
data CardanoEra era where Source #
This GADT provides a value-level representation of all the Cardano eras. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
This can be used in combination with the
IsCardanoEra
class to get access
to this value.
In combination this can often enable code that handles all eras, and does so uniformly where possible, and non-uniformly where necessary.
Instances
class HasTypeProxy era => IsCardanoEra era where Source #
The class of Cardano eras. This allows uniform handling of all Cardano
eras, but also non-uniform by making case distinctions on the
CardanoEra
constructors, or the
CardanoEraStyle
constructors via
cardanoEraStyle
.
cardanoEra :: CardanoEra era Source #
Instances
IsCardanoEra BabbageEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras |
|
IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras |
data AnyCardanoEra where Source #
AnyCardanoEra :: IsCardanoEra era => CardanoEra era -> AnyCardanoEra |
Instances
anyCardanoEra :: CardanoEra era -> AnyCardanoEra Source #
Like the
AnyCardanoEra
constructor but does not demand a
IsCardanoEra
class constraint.
data InAnyCardanoEra thing where Source #
This pairs up some era-dependent type with a
CardanoEra
value that tells
us what era it is, but hides the era type. This is useful when the era is
not statically known, for example when deserialising from a file.
InAnyCardanoEra :: IsCardanoEra era => CardanoEra era -> thing era -> InAnyCardanoEra thing |
Instances
Eq ( InAnyCardanoEra Tx ) Source # | |
Defined in Cardano.Api.Tx (==) :: InAnyCardanoEra Tx -> InAnyCardanoEra Tx -> Bool Source # (/=) :: InAnyCardanoEra Tx -> InAnyCardanoEra Tx -> Bool Source # |
|
Show ( InAnyCardanoEra Tx ) Source # | |
Defined in Cardano.Api.Tx |
Shelley-based eras
data ShelleyBasedEra era where Source #
While the Byron and Shelley eras are quite different, there are several eras that are based on Shelley with only minor differences. It is useful to be able to treat the Shelley-based eras in a mostly-uniform way.
Values of this type witness the fact that the era is Shelley-based. This can be used to constrain the era to being a Shelley-based on. It allows non-uniform handling making case distinctions on the constructor.
Instances
Eq ( ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras (==) :: ShelleyBasedEra era -> ShelleyBasedEra era -> Bool Source # (/=) :: ShelleyBasedEra era -> ShelleyBasedEra era -> Bool Source # |
|
Ord ( ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras compare :: ShelleyBasedEra era -> ShelleyBasedEra era -> Ordering Source # (<) :: ShelleyBasedEra era -> ShelleyBasedEra era -> Bool Source # (<=) :: ShelleyBasedEra era -> ShelleyBasedEra era -> Bool Source # (>) :: ShelleyBasedEra era -> ShelleyBasedEra era -> Bool Source # (>=) :: ShelleyBasedEra era -> ShelleyBasedEra era -> Bool Source # max :: ShelleyBasedEra era -> ShelleyBasedEra era -> ShelleyBasedEra era Source # min :: ShelleyBasedEra era -> ShelleyBasedEra era -> ShelleyBasedEra era Source # |
|
Show ( ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras |
class IsCardanoEra era => IsShelleyBasedEra era where Source #
The class of eras that are based on Shelley. This allows uniform handling
of Shelley-based eras, but also non-uniform by making case distinctions on
the
ShelleyBasedEra
constructors.
shelleyBasedEra :: ShelleyBasedEra era Source #
Instances
IsShelleyBasedEra BabbageEra Source # | |
Defined in Cardano.Api.Eras |
|
IsShelleyBasedEra AlonzoEra Source # | |
Defined in Cardano.Api.Eras |
|
IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras |
|
IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras |
|
IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras |
data InAnyShelleyBasedEra thing where Source #
This pairs up some era-dependent type with a
ShelleyBasedEra
value that
tells us what era it is, but hides the era type. This is useful when the era
is not statically known, for example when deserialising from a file.
InAnyShelleyBasedEra :: IsShelleyBasedEra era => ShelleyBasedEra era -> thing era -> InAnyShelleyBasedEra thing |
data CardanoEraStyle era where Source #
This is the same essential information as
CardanoEra
but instead of a
flat set of alternative eras, it is factored into the legcy Byron era and
the current Shelley-based eras.
This way of factoring the eras is useful because in many cases the major differences are between the Byron and Shelley-based eras, and the Shelley-based eras can often be treated uniformly.
LegacyByronEra :: CardanoEraStyle ByronEra | |
ShelleyBasedEra :: IsShelleyBasedEra era => ShelleyBasedEra era -> CardanoEraStyle era |
Instances
Eq ( CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras (==) :: CardanoEraStyle era -> CardanoEraStyle era -> Bool Source # (/=) :: CardanoEraStyle era -> CardanoEraStyle era -> Bool Source # |
|
Ord ( CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras compare :: CardanoEraStyle era -> CardanoEraStyle era -> Ordering Source # (<) :: CardanoEraStyle era -> CardanoEraStyle era -> Bool Source # (<=) :: CardanoEraStyle era -> CardanoEraStyle era -> Bool Source # (>) :: CardanoEraStyle era -> CardanoEraStyle era -> Bool Source # (>=) :: CardanoEraStyle era -> CardanoEraStyle era -> Bool Source # max :: CardanoEraStyle era -> CardanoEraStyle era -> CardanoEraStyle era Source # min :: CardanoEraStyle era -> CardanoEraStyle era -> CardanoEraStyle era Source # |
|
Show ( CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras |
cardanoEraStyle :: CardanoEra era -> CardanoEraStyle era Source #
The
CardanoEraStyle
for a
CardanoEra
.
shelleyBasedToCardanoEra :: ShelleyBasedEra era -> CardanoEra era Source #
Converts a
ShelleyBasedEra
to the broader
CardanoEra
.
Deprecated
type Shelley = ShelleyEra Source #
Deprecated: Use
ShelleyEra
or
ShelleyAddr
as appropriate
type Allegra = AllegraEra Source #
Deprecated: Use
AllegraEra
instead
Type tags
class HasTypeProxy t where Source #
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
proxyToAsType :: Proxy t -> AsType t Source #
Instances
Cryptographic key interface
class ( Eq ( VerificationKey keyrole), Show ( VerificationKey keyrole), SerialiseAsRawBytes ( Hash keyrole), HasTextEnvelope ( VerificationKey keyrole), HasTextEnvelope ( SigningKey keyrole)) => Key keyrole where Source #
An interface for cryptographic keys used for signatures with a
SigningKey
and a
VerificationKey
key.
This interface does not provide actual signing or verifying functions since this API is concerned with the management of keys: generating and serialising.
data VerificationKey keyrole :: Type Source #
The type of cryptographic verification key, for each key role.
data SigningKey keyrole :: Type Source #
The type of cryptographic signing key, for each key role.
getVerificationKey :: SigningKey keyrole -> VerificationKey keyrole Source #
Get the corresponding verification key from a signing key.
deterministicSigningKey :: AsType keyrole -> Seed -> SigningKey keyrole Source #
Generate a
SigningKey
deterministically, given a
Seed
. The
required size of the seed is given by
deterministicSigningKeySeedSize
.
deterministicSigningKeySeedSize :: AsType keyrole -> Word Source #
verificationKeyHash :: VerificationKey keyrole -> Hash keyrole Source #
Instances
castVerificationKey :: CastVerificationKeyRole keyroleA keyroleB => VerificationKey keyroleA -> VerificationKey keyroleB Source #
Change the role of a
VerificationKey
, if the representation permits.
castSigningKey :: CastSigningKeyRole keyroleA keyroleB => SigningKey keyroleA -> SigningKey keyroleB Source #
Change the role of a
SigningKey
, if the representation permits.
generateSigningKey :: Key keyrole => AsType keyrole -> IO ( SigningKey keyrole) Source #
Generate a
SigningKey
using a seed from operating system entropy.
Hashes
In Cardano most keys are identified by their hash, and hashes are used in many other places.
data family Hash keyrole :: Type Source #