Bitcoin ABC  0.29.2
P2P Digital Currency
cashaddr.h
Go to the documentation of this file.
1 // Copyright (c) 2017 Pieter Wuille
2 // Copyright (c) 2017-2018 The Bitcoin developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_CASHADDR_H
7 #define BITCOIN_CASHADDR_H
8 
9 // Cashaddr is an address format inspired by bech32.
10 
11 #include <cstdint>
12 #include <string>
13 #include <vector>
14 
15 namespace cashaddr {
16 
20 std::string Encode(const std::string &prefix,
21  const std::vector<uint8_t> &values);
22 
26 std::pair<std::string, std::vector<uint8_t>>
27 Decode(const std::string &str, const std::string &default_prefix);
28 
29 } // namespace cashaddr
30 
31 #endif // BITCOIN_CASHADDR_H
std::pair< std::string, data > Decode(const std::string &str, const std::string &default_prefix)
Decode a cashaddr string.
Definition: cashaddr.cpp:214
std::string Encode(const std::string &prefix, const data &payload)
Encode a cashaddr string.
Definition: cashaddr.cpp:198
const char * prefix
Definition: rest.cpp:819