Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Certificate = ACertificate ()
- data ACertificate a = UnsafeACertificate {
- aEpoch ∷ !(Annotated EpochNumber a)
- issuerVK ∷ !VerificationKey
- delegateVK ∷ !VerificationKey
- signature ∷ !(Signature EpochNumber)
- annotation ∷ !a
- type CertificateId = Hash Certificate
- signCertificate ∷ ProtocolMagicId → VerificationKey → EpochNumber → SafeSigner → Certificate
- unsafeCertificate ∷ EpochNumber → VerificationKey → VerificationKey → Signature EpochNumber → Certificate
- epoch ∷ ACertificate a → EpochNumber
- recoverCertificateId ∷ ACertificate ByteString → CertificateId
- isValid ∷ Annotated ProtocolMagicId ByteString → ACertificate ByteString → Bool
Certificate
type Certificate = ACertificate () Source #
data ACertificate a Source #
Delegation certificate allowing the delegateVK
to sign blocks on behalf
of issuerVK
Each delegator can publish at most one Certificate
per EpochNumber
, and
that EpochNumber
must correspond to the current or next EpochNumber
at
the time of publishing
UnsafeACertificate | |
|
Instances
type CertificateId = Hash Certificate Source #
A delegation certificate identifier (the Hash
of a Certificate
).
Certificate Constructors
signCertificate ∷ ProtocolMagicId → VerificationKey → EpochNumber → SafeSigner → Certificate Source #
Create a Certificate
, signing it with the provided safe signer.
∷ EpochNumber | |
→ VerificationKey | The issuer of the certificate. See |
→ VerificationKey | The delegate of the certificate. See |
→ Signature EpochNumber | |
→ Certificate |
Create a certificate using the provided signature.
Certificate Accessor
epoch ∷ ACertificate a → EpochNumber Source #
Certificate Predicate
isValid ∷ Annotated ProtocolMagicId ByteString → ACertificate ByteString → Bool Source #
A Certificate
is valid if the Signature
is valid