Changeset View
Changeset View
Standalone View
Standalone View
src/base58.h
Show All 13 Lines | |||||
* alphanumeric. | * alphanumeric. | ||||
*/ | */ | ||||
#ifndef BITCOIN_BASE58_H | #ifndef BITCOIN_BASE58_H | ||||
#define BITCOIN_BASE58_H | #define BITCOIN_BASE58_H | ||||
#include "chainparams.h" | #include "chainparams.h" | ||||
#include "key.h" | #include "key.h" | ||||
#include "pubkey.h" | #include "pubkey.h" | ||||
#include "script/script.h" | |||||
#include "script/standard.h" | #include "script/standard.h" | ||||
#include "support/allocators/zeroafterfree.h" | #include "support/allocators/zeroafterfree.h" | ||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
/** | /** | ||||
* Encode a byte sequence as a base58-encoded string. | * Encode a byte sequence as a base58-encoded string. | ||||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | |||||
typedef CBitcoinExtKeyBase<CExtKey, BIP32_EXTKEY_SIZE, | typedef CBitcoinExtKeyBase<CExtKey, BIP32_EXTKEY_SIZE, | ||||
CChainParams::EXT_SECRET_KEY> | CChainParams::EXT_SECRET_KEY> | ||||
CBitcoinExtKey; | CBitcoinExtKey; | ||||
typedef CBitcoinExtKeyBase<CExtPubKey, BIP32_EXTKEY_SIZE, | typedef CBitcoinExtKeyBase<CExtPubKey, BIP32_EXTKEY_SIZE, | ||||
CChainParams::EXT_PUBLIC_KEY> | CChainParams::EXT_PUBLIC_KEY> | ||||
CBitcoinExtPubKey; | CBitcoinExtPubKey; | ||||
// Encodes destination with the cash address format. | |||||
std::string EncodeDestination(const CTxDestination &dest); | std::string EncodeDestination(const CTxDestination &dest); | ||||
// Encodes destination with the deprecated base58 format. | |||||
std::string EncodeDestinationBase58(const CTxDestination &dest); | |||||
CTxDestination DecodeDestination(const std::string &str); | CTxDestination DecodeDestination(const std::string &str); | ||||
bool IsValidDestinationString(const std::string &str); | bool IsValidDestinationString(const std::string &str); | ||||
bool IsValidDestinationString(const std::string &str, | bool IsValidDestinationString(const std::string &str, | ||||
const CChainParams ¶ms); | const CChainParams ¶ms); | ||||
#endif // BITCOIN_BASE58_H | #endif // BITCOIN_BASE58_H |