Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) => Key keyrole where
- data VerificationKey keyrole
- data SigningKey keyrole
- getVerificationKey :: SigningKey keyrole -> VerificationKey keyrole
- deterministicSigningKey :: AsType keyrole -> Seed -> SigningKey keyrole
- deterministicSigningKeySeedSize :: AsType keyrole -> Word
- verificationKeyHash :: VerificationKey keyrole -> Hash keyrole
- generateSigningKey :: (MonadIO m, Key keyrole) => AsType keyrole -> m (SigningKey keyrole)
- generateInsecureSigningKey :: (MonadIO m, Key keyrole, SerialiseAsRawBytes (SigningKey keyrole)) => StdGen -> AsType keyrole -> m (SigningKey keyrole, StdGen)
- class CastVerificationKeyRole keyroleA keyroleB where
- castVerificationKey :: VerificationKey keyroleA -> VerificationKey keyroleB
- class CastSigningKeyRole keyroleA keyroleB where
- castSigningKey :: SigningKey keyroleA -> SigningKey keyroleB
- data family AsType t
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.
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.
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
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.
castVerificationKey :: VerificationKey keyroleA -> VerificationKey keyroleB Source #
Change the role of a VerificationKey
, if the representation permits.
Instances
CastVerificationKeyRole ByronKey PaymentExtendedKey Source # | |
CastVerificationKeyRole ByronKey PaymentKey Source # | |
Defined in Cardano.Api.Keys.Byron | |
CastVerificationKeyRole ByronKeyLegacy ByronKey Source # | |
CastVerificationKeyRole CommitteeColdExtendedKey CommitteeColdKey Source # | |
CastVerificationKeyRole CommitteeColdKey PaymentKey Source # | |
CastVerificationKeyRole CommitteeHotExtendedKey CommitteeHotKey Source # | |
CastVerificationKeyRole CommitteeHotKey PaymentKey Source # | |
CastVerificationKeyRole DRepExtendedKey DRepKey Source # | |
CastVerificationKeyRole GenesisDelegateExtendedKey GenesisDelegateKey Source # | |
CastVerificationKeyRole GenesisDelegateKey StakePoolKey Source # | |
CastVerificationKeyRole GenesisExtendedKey GenesisKey Source # | |
CastVerificationKeyRole GenesisKey PaymentKey Source # | |
CastVerificationKeyRole GenesisUTxOKey PaymentKey Source # | |
CastVerificationKeyRole PaymentExtendedKey PaymentKey Source # | |
CastVerificationKeyRole StakeExtendedKey StakeKey Source # | |
CastVerificationKeyRole StakePoolKey StakeKey Source # | |
class CastSigningKeyRole keyroleA keyroleB where Source #
castSigningKey :: SigningKey keyroleA -> SigningKey keyroleB Source #
Change the role of a SigningKey
, if the representation permits.
Instances
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
data AsType AddressAny Source # | |
Defined in Cardano.Api.Address | |
data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType StakeAddress Source # | |
Defined in Cardano.Api.Address | |
data AsType BlockHeader Source # | |
Defined in Cardano.Api.Block | |
data AsType DRepMetadata Source # | |
Defined in Cardano.Api.DRepMetadata | |
data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType BabbageEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ConwayEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType GovernancePoll Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType GovernancePollAnswer Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType ByronKey Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType ByronKeyLegacy Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType KesKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType VrfKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType CommitteeColdExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeColdKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisUTxOKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakePoolKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType OperationalCertificate Source # | |
data AsType OperationalCertificateIssueCounter Source # | |
data AsType PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV3 Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptHash Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script | |
data AsType SimpleScript' Source # | |
Defined in Cardano.Api.Script | |
data AsType HashableScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType ScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
data AsType ByronUpdateProposal Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType ByronVote Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType StakePoolMetadata Source # | |
Defined in Cardano.Api.StakePoolMetadata | |
data AsType TxId Source # | |
Defined in Cardano.Api.TxIn | |
data AsType TxMetadata Source # | |
Defined in Cardano.Api.TxMetadata | |
data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
data AsType (Address addrtype) Source # | |
Defined in Cardano.Api.Address | |
data AsType (AddressInEra era) Source # | |
Defined in Cardano.Api.Address | |
data AsType (Certificate era) Source # | |
Defined in Cardano.Api.Certificate | |
data AsType (Proposal era) Source # | |
data AsType (VotingProcedure era) Source # | |
data AsType (VotingProcedures era) Source # | |
data AsType (Hash a) Source # | |
Defined in Cardano.Api.Hash | |
data AsType (SigningKey a) Source # | |
Defined in Cardano.Api.Keys.Class | |
data AsType (VerificationKey a) Source # | |
Defined in Cardano.Api.Keys.Class | |
data AsType (PlutusScript lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script | |
data AsType (KeyWitness era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (TxBody era) Source # | |
Defined in Cardano.Api.Tx.Sign |