]>
Commit | Line | Data |
---|---|---|
3d31e09c PW |
1 | // Copyright (c) 2009-2010 Satoshi Nakamoto |
2 | // Copyright (c) 2009-2015 The Bitcoin Core developers | |
3 | // Copyright (c) 2016-2018 The Zcash developers | |
4 | // Distributed under the MIT software license, see the accompanying | |
bc909a7a | 5 | // file COPYING or https://www.opensource.org/licenses/mit-license.php . |
3d31e09c PW |
6 | |
7 | #ifndef BITCOIN_KEYIO_H | |
8 | #define BITCOIN_KEYIO_H | |
9 | ||
10 | #include <chainparams.h> | |
11 | #include <key.h> | |
12 | #include <pubkey.h> | |
3d31e09c | 13 | #include <zcash/Address.hpp> |
70b4ad2d | 14 | #include <zcash/zip32.h> |
c8c684e9 | 15 | #include <pbaas/vdxf.h> |
3d31e09c PW |
16 | |
17 | #include <string> | |
18 | ||
6e62f837 | 19 | extern CIdentityID VERUS_DEFAULTID; |
c8c684e9 | 20 | extern CIdentityID VERUS_NOTARYID; |
ac07d7a9 | 21 | extern uint160 VERUS_NODEID; |
66533061 | 22 | extern int32_t MAX_UTXOS_ID_RESCAN; |
23 | extern int32_t MAX_OUR_UTXOS_ID_RESCAN; | |
6e62f837 | 24 | extern bool VERUS_PRIVATECHANGE; |
25 | extern std::string VERUS_DEFAULT_ZADDR; | |
26 | ||
c8c684e9 | 27 | std::vector<std::string> ParseSubNames(const std::string &Name, std::string &ChainOut, bool displayfilter=false, bool addVerus=true); |
3d31e09c PW |
28 | CKey DecodeSecret(const std::string& str); |
29 | std::string EncodeSecret(const CKey& key); | |
30 | ||
31 | CExtKey DecodeExtKey(const std::string& str); | |
32 | std::string EncodeExtKey(const CExtKey& extkey); | |
33 | CExtPubKey DecodeExtPubKey(const std::string& str); | |
34 | std::string EncodeExtPubKey(const CExtPubKey& extpubkey); | |
35 | ||
36 | std::string EncodeDestination(const CTxDestination& dest); | |
b2a98c42 MT |
37 | std::vector<unsigned char> GetDestinationBytes(const CTxDestination& dest); |
38 | uint160 GetDestinationID(const CTxDestination dest); | |
3d31e09c | 39 | CTxDestination DecodeDestination(const std::string& str); |
40c59fea | 40 | CTxDestination ValidateDestination(const std::string &destStr); |
3d31e09c PW |
41 | bool IsValidDestinationString(const std::string& str); |
42 | bool IsValidDestinationString(const std::string& str, const CChainParams& params); | |
43 | ||
44 | std::string EncodePaymentAddress(const libzcash::PaymentAddress& zaddr); | |
e5eab182 | 45 | libzcash::PaymentAddress DecodePaymentAddress(const std::string& str); |
5f63373e | 46 | bool IsValidPaymentAddressString(const std::string& str, uint32_t consensusBranchId); |
3d31e09c PW |
47 | |
48 | std::string EncodeViewingKey(const libzcash::ViewingKey& vk); | |
e5eab182 | 49 | libzcash::ViewingKey DecodeViewingKey(const std::string& str); |
3d31e09c PW |
50 | |
51 | std::string EncodeSpendingKey(const libzcash::SpendingKey& zkey); | |
e5eab182 | 52 | libzcash::SpendingKey DecodeSpendingKey(const std::string& str); |
3d31e09c PW |
53 | |
54 | #endif // BITCOIN_KEYIO_H |