Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
delegationbuilder.h
Go to the documentation of this file.
1// Copyright (c) 2020 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_AVALANCHE_DELEGATIONBUILDER_H
6#define BITCOIN_AVALANCHE_DELEGATIONBUILDER_H
7
9
10#include <vector>
11
12class CKey;
13class CPubKey;
14
15namespace avalanche {
16
17struct LimitedProofId;
18class Proof;
19
23
24 std::vector<Delegation::Level> levels;
25
27 const CPubKey &proofMaster,
29
30public:
32 const CPubKey &proofMaster);
33 explicit DelegationBuilder(const Proof &p);
34 explicit DelegationBuilder(const Delegation &dg);
35
37
38 Delegation build() const;
39};
40
41} // namespace avalanche
42
43#endif // BITCOIN_AVALANCHE_DELEGATIONBUILDER_H
An encapsulated secp256k1 private key.
Definition key.h:28
An encapsulated public key.
Definition pubkey.h:31
std::vector< Delegation::Level > levels
bool addLevel(const CKey &delegatorKey, const CPubKey &delegatedPubKey)
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...
Definition random.h:85