cardano-api:internal
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Keys.Class

Synopsis

Documentation

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.

Associated Types

data VerificationKey keyrole Source #

The type of cryptographic verification key, for each key role.

data SigningKey keyrole Source #

The type of cryptographic signing key, for each key role.

Methods

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

Instances details
Key ByronKey Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

Key ByronKeyLegacy Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

Key KesKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

Key VrfKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

Key CommitteeColdExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key CommitteeColdKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key CommitteeHotExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key CommitteeHotKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key DRepExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key DRepKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key GenesisDelegateExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key GenesisExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key GenesisKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key GenesisUTxOKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key StakeExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key StakeKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

Key StakePoolKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

generateSigningKey :: (MonadIO m, Key keyrole) => AsType keyrole -> m (SigningKey keyrole) Source #

Generate a SigningKey using a seed from operating system entropy.

generateInsecureSigningKey :: (MonadIO m, Key keyrole, SerialiseAsRawBytes (SigningKey keyrole)) => StdGen -> AsType keyrole -> m (SigningKey keyrole, StdGen) Source #

class CastVerificationKeyRole keyroleA keyroleB where Source #

Some key roles share the same representation and it is sometimes legitimate to change the role of a key.

Methods

castVerificationKey :: VerificationKey keyroleA -> VerificationKey keyroleB Source #

Change the role of a VerificationKey, if the representation permits.

Instances

Instances details
CastVerificationKeyRole ByronKey PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

CastVerificationKeyRole ByronKey PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

CastVerificationKeyRole ByronKeyLegacy ByronKey Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

CastVerificationKeyRole CommitteeColdExtendedKey CommitteeColdKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole CommitteeColdKey PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole CommitteeHotExtendedKey CommitteeHotKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole CommitteeHotKey PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole DRepExtendedKey DRepKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole GenesisDelegateExtendedKey GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole GenesisDelegateKey StakePoolKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole GenesisExtendedKey GenesisKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole GenesisKey PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole GenesisUTxOKey PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole PaymentExtendedKey PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole StakeExtendedKey StakeKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

CastVerificationKeyRole StakePoolKey StakeKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

class CastSigningKeyRole keyroleA keyroleB where Source #

Methods

castSigningKey :: SigningKey keyroleA -> SigningKey keyroleB Source #

Change the role of a SigningKey, if the representation permits.

data family AsType t 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.

Instances

Instances details
data AsType AddressAny Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ByronAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ShelleyAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType StakeAddress Source # 
Instance details

Defined in Cardano.Api.Address

data AsType BlockHeader Source # 
Instance details

Defined in Cardano.Api.Block

data AsType DRepMetadata Source # 
Instance details

Defined in Cardano.Api.DRepMetadata

data AsType AllegraEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType AlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType ByronEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType MaryEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType ShelleyEra Source # 
Instance details

Defined in Cardano.Api.Eras.Core

data AsType GovernancePoll Source # 
Instance details

Defined in Cardano.Api.Governance.Poll

data AsType GovernancePollAnswer Source # 
Instance details

Defined in Cardano.Api.Governance.Poll

data AsType ByronKey Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

data AsType ByronKeyLegacy Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

data AsType KesKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

data AsType VrfKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

data AsType CommitteeColdExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType CommitteeColdKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType CommitteeHotExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType CommitteeHotKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType DRepExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType DRepKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisDelegateExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisUTxOKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakeExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakeKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakePoolKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType OperationalCertificate Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType OperationalCertificateIssueCounter Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType PraosNonce Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType UpdateProposal Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType PlutusScriptV3 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ScriptHash Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Script

data AsType SimpleScript' Source # 
Instance details

Defined in Cardano.Api.Script

data AsType HashableScriptData Source # 
Instance details

Defined in Cardano.Api.ScriptData

data AsType ScriptData Source # 
Instance details

Defined in Cardano.Api.ScriptData

data AsType TextEnvelope Source # 
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

data AsType ByronUpdateProposal Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType ByronVote Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType StakePoolMetadata Source # 
Instance details

Defined in Cardano.Api.StakePoolMetadata

data AsType TxId Source # 
Instance details

Defined in Cardano.Api.TxIn

data AsType TxMetadata Source # 
Instance details

Defined in Cardano.Api.TxMetadata

data AsType AssetName Source # 
Instance details

Defined in Cardano.Api.Value

data AsType PolicyId Source # 
Instance details

Defined in Cardano.Api.Value

data AsType (Address addrtype) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Address addrtype) = AsAddress (AsType addrtype)
data AsType (AddressInEra era) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Certificate era) Source # 
Instance details

Defined in Cardano.Api.Certificate

data AsType (Proposal era) Source # 
Instance details

Defined in Cardano.Api.Governance.Actions.ProposalProcedure

data AsType (VotingProcedure era) Source # 
Instance details

Defined in Cardano.Api.Governance.Actions.VotingProcedure

data AsType (VotingProcedures era) Source # 
Instance details

Defined in Cardano.Api.Governance.Actions.VotingProcedure

data AsType (Hash a) Source # 
Instance details

Defined in Cardano.Api.Hash

data AsType (Hash a) = AsHash (AsType a)
data AsType (SigningKey a) Source # 
Instance details

Defined in Cardano.Api.Keys.Class

data AsType (VerificationKey a) Source # 
Instance details

Defined in Cardano.Api.Keys.Class

data AsType (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) = AsScript (AsType lang)
data AsType (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx.Sign

data AsType (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx.Sign

data AsType (Tx era) = AsTx (AsType era)
data AsType (TxBody era) Source # 
Instance details

Defined in Cardano.Api.Tx.Sign

data AsType (TxBody era) = AsTxBody (AsType era)