| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Chain.Delegation
Synopsis
- fromList ∷ [(KeyHash, KeyHash)] → Map
- newtype Map = Map {}
- insert ∷ KeyHash → KeyHash → Map → Map
- memberR ∷ KeyHash → Map → Bool
- notMemberR ∷ KeyHash → Map → Bool
- pairMember ∷ (KeyHash, KeyHash) → Map → Bool
- lookupR ∷ KeyHash → Map → Maybe KeyHash
- data ACertificate a = UnsafeACertificate {
- aEpoch ∷ !(Annotated EpochNumber a)
- issuerVK ∷ !VerificationKey
- delegateVK ∷ !VerificationKey
- signature ∷ !(Signature EpochNumber)
- annotation ∷ !a
- keysSet ∷ Map → Set KeyHash
- isValid ∷ Annotated ProtocolMagicId ByteString → ACertificate ByteString → Bool
- epoch ∷ ACertificate a → EpochNumber
- type Certificate = ACertificate ()
- type Payload = APayload ()
- type CertificateId = Hash Certificate
- signCertificate ∷ ProtocolMagicId → VerificationKey → EpochNumber → SafeSigner → Certificate
- unsafeCertificate ∷ EpochNumber → VerificationKey → VerificationKey → Signature EpochNumber → Certificate
- recoverCertificateId ∷ ACertificate ByteString → CertificateId
- data APayload a = UnsafeAPayload {
- getPayload ∷ [ACertificate a]
- getAnnotation ∷ a
- unsafePayload ∷ [Certificate] → Payload
Documentation
Instances
| FromCBOR Map Source # | |||||
| ToCBOR Map Source # | |||||
| DecCBOR Map Source # | |||||
| EncCBOR Map Source # | |||||
| NFData Map Source # | |||||
Defined in Cardano.Chain.Delegation.Map | |||||
| Generic Map Source # | |||||
Defined in Cardano.Chain.Delegation.Map Associated Types
| |||||
| Show Map Source # | |||||
| Eq Map Source # | |||||
| NoThunks Map Source # | A | ||||
| type Rep Map Source # | |||||
Defined in Cardano.Chain.Delegation.Map | |||||
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
Constructors
| UnsafeACertificate | |
Fields
| |
Instances
isValid ∷ Annotated ProtocolMagicId ByteString → ACertificate ByteString → Bool Source #
A Certificate is valid if the Signature is valid
epoch ∷ ACertificate a → EpochNumber Source #
type Certificate = ACertificate () Source #
type CertificateId = Hash Certificate Source #
A delegation certificate identifier (the Hash of a Certificate).
signCertificate ∷ ProtocolMagicId → VerificationKey → EpochNumber → SafeSigner → Certificate Source #
Create a Certificate, signing it with the provided safe signer.
Arguments
| ∷ 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.
The delegation Payload contains a list of delegation Certificates
Constructors
| UnsafeAPayload | |
Fields
| |
Instances
| FromCBOR Payload Source # | |||||
| ToCBOR Payload Source # | |||||
| DecCBOR Payload Source # | |||||
| EncCBOR Payload Source # | |||||
| Functor APayload Source # | |||||
| ToJSON a ⇒ ToJSON (APayload a) Source # | |||||
| FromCBOR (APayload ByteSpan) Source # | |||||
| Decoded (APayload ByteString) Source # | |||||
Defined in Cardano.Chain.Delegation.Payload Associated Types
Methods | |||||
| DecCBOR (APayload ByteSpan) Source # | |||||
| NFData a ⇒ NFData (APayload a) Source # | |||||
Defined in Cardano.Chain.Delegation.Payload | |||||
| Buildable (APayload a) Source # | |||||
| Generic (APayload a) Source # | |||||
Defined in Cardano.Chain.Delegation.Payload Associated Types
| |||||
| Show a ⇒ Show (APayload a) Source # | |||||
| Eq a ⇒ Eq (APayload a) Source # | |||||
| type BaseType (APayload ByteString) Source # | |||||
Defined in Cardano.Chain.Delegation.Payload | |||||
| type Rep (APayload a) Source # | |||||
Defined in Cardano.Chain.Delegation.Payload type Rep (APayload a) = D1 ('MetaData "APayload" "Cardano.Chain.Delegation.Payload" "cardano-ledger-byron-1.3.0.0-inplace" 'False) (C1 ('MetaCons "UnsafeAPayload" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ACertificate a]) :*: S1 ('MetaSel ('Just "getAnnotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) | |||||
unsafePayload ∷ [Certificate] → Payload Source #