PIVX Core  5.6.99
P2P Digital Currency
addressbook.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2020 The PIVX Core 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 PIVX_ADDRESSBOOK_H
6 #define PIVX_ADDRESSBOOK_H
7 
8 #include <map>
9 #include <string>
10 
11 namespace AddressBook {
12 
13  namespace AddressBookPurpose {
14  extern const std::string UNKNOWN;
15  extern const std::string RECEIVE;
16  extern const std::string SEND;
17  extern const std::string DELEGABLE;
18  extern const std::string DELEGATOR;
19  extern const std::string COLD_STAKING;
20  extern const std::string COLD_STAKING_SEND;
21  extern const std::string SHIELDED_RECEIVE;
22  extern const std::string SHIELDED_SEND;
23  extern const std::string EXCHANGE_ADDRESS;
24  }
25 
26  bool IsColdStakingPurpose(const std::string& purpose);
27  bool IsShieldedPurpose(const std::string& purpose);
28  bool IsExchangePurpose(const std::string& purpose);
29 
32  public:
33 
34  std::string name;
35  std::string purpose;
36 
39  }
40 
41  typedef std::map<std::string, std::string> StringMap;
43 
44  bool isSendColdStakingPurpose() const;
45  bool isSendPurpose() const;
46  bool isReceivePurpose() const;
47  bool isShieldedReceivePurpose() const;
48  bool isShielded() const;
49  };
50 
51 }
52 
53 #endif // PIVX_ADDRESSBOOK_H
Address book data.
Definition: addressbook.h:31
bool isSendColdStakingPurpose() const
Definition: addressbook.cpp:36
std::map< std::string, std::string > StringMap
Definition: addressbook.h:41
bool isShieldedReceivePurpose() const
Definition: addressbook.cpp:48
const std::string EXCHANGE_ADDRESS
Definition: addressbook.cpp:19
const std::string COLD_STAKING_SEND
Definition: addressbook.cpp:16
const std::string SHIELDED_RECEIVE
Definition: addressbook.cpp:17
const std::string SHIELDED_SEND
Definition: addressbook.cpp:18
const std::string COLD_STAKING
Definition: addressbook.cpp:15
bool IsShieldedPurpose(const std::string &purpose)
Definition: addressbook.cpp:27
bool IsExchangePurpose(const std::string &purpose)
Definition: addressbook.cpp:32
bool IsColdStakingPurpose(const std::string &purpose)
Definition: addressbook.cpp:22