Page MenuHomePhabricator

cashaddrenc.h
No OneTemporary

cashaddrenc.h

// Copyright (c) 2017-2019 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_CASHADDRENC_H
#define BITCOIN_CASHADDRENC_H
#include <script/standard.h>
#include <string>
#include <vector>
class CChainParams;
enum CashAddrType : uint8_t { PUBKEY_TYPE = 0, SCRIPT_TYPE = 1 };
struct CashAddrContent {
CashAddrType type;
std::vector<uint8_t> hash;
};
std::string EncodeCashAddr(const CTxDestination &, const CChainParams &);
std::string EncodeCashAddr(const std::string &prefix,
const CashAddrContent &content);
CTxDestination DecodeCashAddr(const std::string &addr,
const CChainParams &params);
CashAddrContent DecodeCashAddrContent(const std::string &addr,
const std::string &prefix);
CTxDestination DecodeCashAddrDestination(const CashAddrContent &content);
std::vector<uint8_t> PackCashAddrContent(const CashAddrContent &content);
#endif // BITCOIN_CASHADDRENC_H

File Metadata

Mime Type
text/x-c
Expires
Sat, Nov 23, 10:02 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4507516
Default Alt Text
cashaddrenc.h (1 KB)

Event Timeline