10 #include <boost/lexical_cast.hpp>
12 #define printf OutputDebugStringF
37 if (fHelp || params.size() < 1 || params.size() > 3)
39 "importprivkey <feathercoinprivkey> [label] [rescan=true]\n"
40 "Adds a private key (as returned by dumpprivkey) to your wallet.");
42 string strSecret = params[0].
get_str();
44 if (params.size() > 1)
49 if (params.size() > 2)
50 fRescan = params[2].get_bool();
53 bool fGood = vchSecret.
SetString(strSecret);
80 if (fHelp || params.size() != 1)
82 "dumpprivkey <feathercoinaddress>\n"
83 "Reveals the private key corresponding to <feathercoinaddress>.");
85 string strAddress = params[0].
get_str();
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
CCriticalSection cs_wallet
Object JSONRPCError(int code, const string &message)
void ReacceptWalletTransactions()
bool GetKey(const CKeyID &address, CKey &keyOut) const
Value importprivkey(const Array ¶ms, bool fHelp)
bool SetAddressBookName(const CTxDestination &address, const std::string &strName)
bool GetKeyID(CKeyID &keyID) const
bool SetString(const char *pszSecret)
CPubKey GetPubKey() const
A base58-encoded secret key.
An encapsulated public key.
static const Value_impl null
std::string ToString() const
const String_type & get_str() const
A transaction with a bunch of additional info that only the owner cares about.
CBlockIndex * pindexGenesisBlock
int ScanForWalletTransactions(CBlockIndex *pindexStart, bool fUpdate=false)
CTxDump(CWalletTx *ptx=NULL, int nOut=-1)
The block chain is a tree shaped structure starting with the genesis block at the root...
A reference to a CKey: the Hash160 of its serialized public key.
bool SetString(const char *psz)
An encapsulated private key.
std::string get_str(std::string::const_iterator begin, std::string::const_iterator end)
Value dumpprivkey(const Array ¶ms, bool fHelp)