PIVX Core  5.6.99
P2P Digital Currency
addressbook.cpp
Go to the documentation of this file.
1 // Copyright (c) 2019-2021 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 #include "addressbook.h"
6 
7 namespace AddressBook {
8 
9  namespace AddressBookPurpose {
10  const std::string UNKNOWN{"unknown"};
11  const std::string RECEIVE{"receive"};
12  const std::string SEND{"send"};
13  const std::string DELEGABLE{"delegable"};
14  const std::string DELEGATOR{"delegator"};
15  const std::string COLD_STAKING{"coldstaking"};
16  const std::string COLD_STAKING_SEND{"coldstaking_send"};
17  const std::string SHIELDED_RECEIVE{"shielded_receive"};
18  const std::string SHIELDED_SEND{"shielded_spend"};
19  const std::string EXCHANGE_ADDRESS{"exchange_address"};
20  }
21 
22  bool IsColdStakingPurpose(const std::string& purpose) {
23  return purpose == AddressBookPurpose::COLD_STAKING
25  }
26 
27  bool IsShieldedPurpose(const std::string& purpose) {
28  return purpose == AddressBookPurpose::SHIELDED_RECEIVE
30  }
31 
32  bool IsExchangePurpose(const std::string& purpose) {
33  return purpose == AddressBookPurpose::EXCHANGE_ADDRESS;
34  }
35 
38  }
39 
42  }
43 
46  }
47 
50  }
51 
53  return IsShieldedPurpose(purpose);
54  }
55 
56 
57 }
58 
bool isSendColdStakingPurpose() const
Definition: addressbook.cpp:36
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