cardano-ledger-0.1.0.0: The blockchain layer of Cardano
Safe HaskellNone
LanguageHaskell2010

Cardano.Chain.Delegation

Synopsis

Documentation

data APayload a Source #

The delegation Payload contains a list of delegation Certificates

Constructors

UnsafeAPayload 

Instances

Instances details
Functor APayload Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Methods

fmap :: (a -> b) -> APayload a -> APayload b #

(<$) :: a -> APayload b -> APayload a #

ToCBOR Payload Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Methods

toCBOR :: Payload -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Payload -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Payload] -> Size Source #

FromCBOR Payload Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Eq a => Eq (APayload a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Methods

(==) :: APayload a -> APayload a -> Bool #

(/=) :: APayload a -> APayload a -> Bool #

Show a => Show (APayload a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Methods

showsPrec :: Int -> APayload a -> ShowS #

show :: APayload a -> String #

showList :: [APayload a] -> ShowS #

Generic (APayload a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Associated Types

type Rep (APayload a) :: Type -> Type #

Methods

from :: APayload a -> Rep (APayload a) x #

to :: Rep (APayload a) x -> APayload a #

NFData a => NFData (APayload a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Methods

rnf :: APayload a -> () #

ToJSON a => ToJSON (APayload a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Decoded (APayload ByteString) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Associated Types

type BaseType (APayload ByteString) Source #

FromCBOR (APayload ByteSpan) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Buildable (APayload a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

Methods

build :: APayload a -> Builder Source #

type Rep (APayload a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

type Rep (APayload a) = D1 ('MetaData "APayload" "Cardano.Chain.Delegation.Payload" "cardano-ledger-0.1.0.0-LsmGdPmHvbsHmMt4VaqSe3" '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)))
type BaseType (APayload ByteString) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Payload

newtype Map Source #

Constructors

Map 

Instances

Instances details
Eq Map Source # 
Instance details

Defined in Cardano.Chain.Delegation.Map

Methods

(==) :: Map -> Map -> Bool #

(/=) :: Map -> Map -> Bool #

Show Map Source # 
Instance details

Defined in Cardano.Chain.Delegation.Map

Methods

showsPrec :: Int -> Map -> ShowS #

show :: Map -> String #

showList :: [Map] -> ShowS #

Generic Map Source # 
Instance details

Defined in Cardano.Chain.Delegation.Map

Associated Types

type Rep Map :: Type -> Type #

Methods

from :: Map -> Rep Map x #

to :: Rep Map x -> Map #

NFData Map Source # 
Instance details

Defined in Cardano.Chain.Delegation.Map

Methods

rnf :: Map -> () #

ToCBOR Map Source # 
Instance details

Defined in Cardano.Chain.Delegation.Map

Methods

toCBOR :: Map -> Encoding Source #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Map -> Size Source #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Map] -> Size Source #

FromCBOR Map Source # 
Instance details

Defined in Cardano.Chain.Delegation.Map

NoThunks Map Source #

A Bimap contains two regular Maps, which are spine strict; we therefore have to worry about the elements only

Instance details

Defined in Cardano.Chain.Delegation.Map

type Rep Map Source # 
Instance details

Defined in Cardano.Chain.Delegation.Map

type Rep Map = D1 ('MetaData "Map" "Cardano.Chain.Delegation.Map" "cardano-ledger-0.1.0.0-LsmGdPmHvbsHmMt4VaqSe3" 'True) (C1 ('MetaCons "Map" 'PrefixI 'True) (S1 ('MetaSel ('Just "unMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Bimap KeyHash KeyHash))))

Query

Update

Conversion/traversal

Certificate

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

Instances details
Functor ACertificate Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Methods

fmap :: (a -> b) -> ACertificate a -> ACertificate b #

(<$) :: a -> ACertificate b -> ACertificate a #

ToCBOR Certificate Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

FromCBOR Certificate Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Monad m => ToJSON m Certificate Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

MonadError SchemaError m => FromJSON m Certificate Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Eq a => Eq (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Ord a => Ord (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Show a => Show (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Generic (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Associated Types

type Rep (ACertificate a) :: Type -> Type #

Methods

from :: ACertificate a -> Rep (ACertificate a) x #

to :: Rep (ACertificate a) x -> ACertificate a #

NFData a => NFData (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Methods

rnf :: ACertificate a -> () #

ToJSON a => ToJSON (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Decoded (ACertificate ByteString) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Associated Types

type BaseType (ACertificate ByteString) Source #

FromCBOR (ACertificate ByteSpan) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

Buildable (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

NoThunks a => NoThunks (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

type Rep (ACertificate a) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

type Rep (ACertificate a) = D1 ('MetaData "ACertificate" "Cardano.Chain.Delegation.Certificate" "cardano-ledger-0.1.0.0-LsmGdPmHvbsHmMt4VaqSe3" 'False) (C1 ('MetaCons "UnsafeACertificate" 'PrefixI 'True) ((S1 ('MetaSel ('Just "aEpoch") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Annotated EpochNumber a)) :*: S1 ('MetaSel ('Just "issuerVK") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 VerificationKey)) :*: (S1 ('MetaSel ('Just "delegateVK") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 VerificationKey) :*: (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Signature EpochNumber)) :*: S1 ('MetaSel ('Just "annotation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))))
type BaseType (ACertificate ByteString) Source # 
Instance details

Defined in Cardano.Chain.Delegation.Certificate

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.

unsafeCertificate Source #

Arguments

:: EpochNumber 
-> VerificationKey

The issuer of the certificate. See UnsafeACertificate.

-> VerificationKey

The delegate of the certificate. See UnsafeACertificate.

-> Signature EpochNumber 
-> Certificate 

Create a certificate using the provided signature.

Certificate Accessor

Certificate Predicate