Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
APayload
a =
UnsafeAPayload
{
- getPayload :: [ ACertificate a]
- getAnnotation :: a
- type Payload = APayload ()
- unsafePayload :: [ Certificate ] -> Payload
- newtype Map = Map { }
- memberR :: KeyHash -> Map -> Bool
- notMemberR :: KeyHash -> Map -> Bool
- pairMember :: ( KeyHash , KeyHash ) -> Map -> Bool
- lookupR :: KeyHash -> Map -> Maybe KeyHash
- insert :: KeyHash -> KeyHash -> Map -> Map
- fromList :: [( KeyHash , KeyHash )] -> Map
- keysSet :: Map -> Set KeyHash
- 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
Documentation
The delegation
Payload
contains a list of delegation
Certificate
s
UnsafeAPayload | |
|
Instances
unsafePayload :: [ Certificate ] -> Payload Source #
Instances
Eq Map Source # | |
Show Map Source # | |
Generic Map Source # | |
NFData Map Source # | |
Defined in Cardano.Chain.Delegation.Map |
|
ToCBOR Map Source # | |
FromCBOR Map Source # | |
NoThunks Map Source # |
A
|
type Rep Map Source # | |
Defined in Cardano.Chain.Delegation.Map
type
Rep
Map
=
D1
('
MetaData
"Map" "Cardano.Chain.Delegation.Map" "cardano-ledger-byron-0.1.0.0-1U5kXR8zMRrE7QjCz70XVD" '
True
) (
C1
('
MetaCons
"Map" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"unMap") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
(
Bimap
KeyHash
KeyHash
))))
|
Query
Update
Conversion/traversal
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