Files
blackcoin-more/src/cashaddr.h
lateminer 323a6750c2 Add CashAddr Address Format
Ported from Bitcoin Unlimited, Bitcoin ABC
2018-01-14 22:32:08 +03:00

27 lines
786 B
C++

// Copyright (c) 2017 Pieter Wuille
// Copyright (c) 2017 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Cashaddr is an address format inspired by bech32.
#include <cstdint>
#include <string>
#include <vector>
namespace cashaddr
{
/**
* Encode a cashaddr string. Returns the empty string in case of failure.
*/
std::string Encode(const std::string &prefix, const std::vector<uint8_t> &values);
/**
* Decode a cashaddr string. Returns (prefix, data). Empty prefix means failure.
*/
std::pair<std::string, std::vector<uint8_t> > Decode(const std::string &str, const std::string &default_prefix);
std::vector<uint8_t> EncodingCharset();
} // namespace cashaddr