forked from PIVX-Project/PIVX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddressbook.h
51 lines (39 loc) · 1.39 KB
/
addressbook.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) 2019 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef PIVX_ADDRESSBOOK_H
#define PIVX_ADDRESSBOOK_H
#include <map>
#include <string>
namespace AddressBook {
namespace AddressBookPurpose {
extern const std::string UNKNOWN;
extern const std::string RECEIVE;
extern const std::string SEND;
extern const std::string DELEGABLE;
extern const std::string DELEGATOR;
extern const std::string COLD_STAKING;
extern const std::string COLD_STAKING_SEND;
extern const std::string SHIELDED_RECEIVE;
extern const std::string SHIELDED_SEND;
}
bool IsColdStakingPurpose(const std::string& purpose);
bool IsShieldedPurpose(const std::string& purpose);
/** Address book data */
class CAddressBookData {
public:
std::string name;
std::string purpose;
CAddressBookData() {
purpose = AddressBook::AddressBookPurpose::UNKNOWN;
}
typedef std::map<std::string, std::string> StringMap;
StringMap destdata;
bool isSendColdStakingPurpose() const;
bool isSendPurpose() const;
bool isReceivePurpose() const;
bool isShieldedReceivePurpose() const;
bool isShielded() const;
};
}
#endif //PIVX_ADDRESSBOOK_H