Bitcoin ABC  0.24.10
P2P Digital Currency
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
avalanche::Delegation Class Reference

#include <delegation.h>

Collaboration diagram for avalanche::Delegation:
[legend]

Classes

struct  Level
 

Public Member Functions

 Delegation ()
 
const DelegationIdgetId () const
 
const LimitedProofIdgetLimitedProofId () const
 
const CPubKeygetProofMaster () const
 
const CPubKeygetDelegatedPubkey () const
 
ProofId getProofId () const
 
 SERIALIZE_METHODS (Delegation, obj)
 
bool verify (DelegationState &state, CPubKey &auth) const
 

Static Public Member Functions

static bool FromHex (Delegation &dg, const std::string &dgHex, bilingual_str &errorOut)
 

Private Member Functions

DelegationId computeDelegationId () const
 
 Delegation (const LimitedProofId &limitedProofid_, const CPubKey &proofMaster_, const DelegationId &dgid_, std::vector< Level > levels_)
 

Private Attributes

LimitedProofId limitedProofid
 
CPubKey proofMaster
 
DelegationId dgid
 
std::vector< Levellevels
 

Friends

class DelegationBuilder
 

Detailed Description

Definition at line 23 of file delegation.h.

Constructor & Destructor Documentation

◆ Delegation() [1/2]

avalanche::Delegation::Delegation ( const LimitedProofId limitedProofid_,
const CPubKey proofMaster_,
const DelegationId dgid_,
std::vector< Level levels_ 
)
inlineprivate

Definition at line 40 of file delegation.h.

◆ Delegation() [2/2]

avalanche::Delegation::Delegation ( )
inlineexplicit

Definition at line 47 of file delegation.h.

Member Function Documentation

◆ computeDelegationId()

DelegationId avalanche::Delegation::computeDelegationId ( ) const
private

Definition at line 67 of file delegation.cpp.

Here is the call graph for this function:

◆ FromHex()

bool avalanche::Delegation::FromHex ( Delegation dg,
const std::string &  dgHex,
bilingual_str errorOut 
)
static

Definition at line 16 of file delegation.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDelegatedPubkey()

const CPubKey & avalanche::Delegation::getDelegatedPubkey ( ) const

Definition at line 60 of file delegation.cpp.

Here is the caller graph for this function:

◆ getId()

const DelegationId& avalanche::Delegation::getId ( ) const
inline

Definition at line 52 of file delegation.h.

Here is the caller graph for this function:

◆ getLimitedProofId()

const LimitedProofId& avalanche::Delegation::getLimitedProofId ( ) const
inline

Definition at line 53 of file delegation.h.

◆ getProofId()

ProofId avalanche::Delegation::getProofId ( ) const

Definition at line 56 of file delegation.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProofMaster()

const CPubKey& avalanche::Delegation::getProofMaster ( ) const
inline

Definition at line 54 of file delegation.h.

Here is the caller graph for this function:

◆ SERIALIZE_METHODS()

avalanche::Delegation::SERIALIZE_METHODS ( Delegation  ,
obj   
)
inline

Definition at line 59 of file delegation.h.

◆ verify()

bool avalanche::Delegation::verify ( DelegationState state,
CPubKey auth 
) const

Definition at line 73 of file delegation.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ DelegationBuilder

friend class DelegationBuilder
friend

Definition at line 39 of file delegation.h.

Member Data Documentation

◆ dgid

DelegationId avalanche::Delegation::dgid
private

Definition at line 27 of file delegation.h.

◆ levels

std::vector<Level> avalanche::Delegation::levels
private

Definition at line 37 of file delegation.h.

◆ limitedProofid

LimitedProofId avalanche::Delegation::limitedProofid
private

Definition at line 24 of file delegation.h.

◆ proofMaster

CPubKey avalanche::Delegation::proofMaster
private

Definition at line 25 of file delegation.h.


The documentation for this class was generated from the following files: