5#ifndef BITCOIN_AVALANCHE_DELEGATION_H
6#define BITCOIN_AVALANCHE_DELEGATION_H
An encapsulated public key.
ProofId getProofId() const
const std::vector< Level > & getLevels() const
static bool FromHex(Delegation &dg, const std::string &dgHex, bilingual_str &errorOut)
bool verify(DelegationState &state, CPubKey &auth) const
const CPubKey & getProofMaster() const
std::vector< Level > levels
LimitedProofId limitedProofid
Delegation(const LimitedProofId &limitedProofid_, const CPubKey &proofMaster_, const DelegationId &dgid_, std::vector< Level > levels_)
const DelegationId & getId() const
const CPubKey & getDelegatedPubkey() const
SERIALIZE_METHODS(Delegation, obj)
const LimitedProofId & getLimitedProofId() const
DelegationId computeDelegationId() const
std::array< uint8_t, CPubKey::SCHNORR_SIZE > SchnorrSig
a Schnorr signature
constexpr size_t MAX_DELEGATION_LEVELS
The maximum number of delegation levels we are willing to verify.
Implement std::hash so RCUPtr can be used as a key for maps or sets.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
#define SER_READ(obj, code)
SERIALIZE_METHODS(Level, obj)