Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
cashaddrenc.h
Go to the documentation of this file.
1// Copyright (c) 2017-2019 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4#ifndef BITCOIN_CASHADDRENC_H
5#define BITCOIN_CASHADDRENC_H
6
7#include <script/standard.h>
8
9#include <string>
10#include <vector>
11
12class CChainParams;
13
15
18 std::vector<uint8_t> hash;
19};
20
21std::string EncodeCashAddr(const CTxDestination &, const CChainParams &);
22std::string EncodeCashAddr(const std::string &prefix,
24
25CTxDestination DecodeCashAddr(const std::string &addr,
26 const CChainParams &params);
27CashAddrContent DecodeCashAddrContent(const std::string &addr,
28 const std::string &prefix);
30
31std::vector<uint8_t> PackCashAddrContent(const CashAddrContent &content);
32#endif // BITCOIN_CASHADDRENC_H
CashAddrType
Definition cashaddrenc.h:14
@ PUBKEY_TYPE
Definition cashaddrenc.h:14
@ SCRIPT_TYPE
Definition cashaddrenc.h:14
std::string EncodeCashAddr(const CTxDestination &, const CChainParams &)
CTxDestination DecodeCashAddrDestination(const CashAddrContent &content)
CTxDestination DecodeCashAddr(const std::string &addr, const CChainParams &params)
std::vector< uint8_t > PackCashAddrContent(const CashAddrContent &content)
CashAddrContent DecodeCashAddrContent(const std::string &addr, const std::string &prefix)
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
Definition chainparams.h:80
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
const char * prefix
Definition rest.cpp:817
std::variant< CNoDestination, PKHash, ScriptHash > CTxDestination
A txout script template with a specific destination.
Definition standard.h:85
CashAddrType type
Definition cashaddrenc.h:17
std::vector< uint8_t > hash
Definition cashaddrenc.h:18