Multi coin support for GatewaysCC (#18)
- Added support for other cions - New RPC for getting address for a pubkey on external chain and for dumping private key in external chain format
This commit is contained in:
committed by
GitHub
parent
bcdae3fbb8
commit
0edf474beb
31
src/base58.h
31
src/base58.h
@@ -130,9 +130,9 @@ public:
|
||||
*/
|
||||
class CBitcoinAddress : public CBase58Data {
|
||||
public:
|
||||
bool Set(const CKeyID &id);
|
||||
bool Set(const CPubKey &key);
|
||||
bool Set(const CScriptID &id);
|
||||
virtual bool Set(const CKeyID &id);
|
||||
virtual bool Set(const CPubKey &key);
|
||||
virtual bool Set(const CScriptID &id);
|
||||
bool Set(const CTxDestination &dest);
|
||||
bool IsValid() const;
|
||||
bool IsValid(const CChainParams ¶ms) const;
|
||||
@@ -151,6 +151,31 @@ public:
|
||||
bool IsScript() const;
|
||||
};
|
||||
|
||||
class CCustomBitcoinAddress : public CBitcoinAddress {
|
||||
std::vector<unsigned char> base58Prefixes[2];
|
||||
public:
|
||||
bool Set(const CKeyID &id);
|
||||
bool Set(const CPubKey &key);
|
||||
bool Set(const CScriptID &id);
|
||||
bool Set(const CTxDestination &dest);
|
||||
bool IsValid() const;
|
||||
|
||||
CCustomBitcoinAddress() {}
|
||||
CCustomBitcoinAddress(const CTxDestination &dest,uint8_t taddr,uint8_t pubkey_prefix,uint8_t script_prefix)
|
||||
{
|
||||
if (taddr!=0) base58Prefixes[0].push_back(taddr);
|
||||
base58Prefixes[0].push_back(pubkey_prefix);
|
||||
base58Prefixes[1].push_back(script_prefix);
|
||||
Set(dest);
|
||||
}
|
||||
|
||||
CTxDestination Get() const;
|
||||
bool GetKeyID(CKeyID &keyID) const;
|
||||
bool GetKeyID_NoCheck(CKeyID& keyID) const;
|
||||
bool GetIndexKey(uint160& hashBytes, int& type) const;
|
||||
bool IsScript() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* A base58-encoded secret key
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user