Bitcoin ABC 0.30.5
P2P Digital Currency
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
26 DelegationBuilder(const LimitedProofId &ltdProofId,
27 const CPubKey &proofMaster,
28 const DelegationId &delegationId);
29
30public:
31 DelegationBuilder(const LimitedProofId &ltdProofId,
32 const CPubKey &proofMaster);
33 explicit DelegationBuilder(const Proof &p);
34 explicit DelegationBuilder(const Delegation &dg);
35
36 bool addLevel(const CKey &delegatorKey, const CPubKey &delegatedPubKey);
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)
DelegationBuilder(const LimitedProofId &ltdProofId, const CPubKey &proofMaster, const DelegationId &delegationId)