aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-01-02 12:34:08 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2016-05-31 14:47:00 +0200
commitf19025106de47a92396f9fb98e6d3bbc568c40b5 (patch)
tree54d64f8e6aad10ec6866e5f25cad88d65dd3b4ab /src/wallet/wallet.h
parent950be19727a581970591d8f8138dfe4725750382 (diff)
downloadbitcoin-f19025106de47a92396f9fb98e6d3bbc568c40b5.tar.xz
[Wallet] Add simplest BIP32/deterministic key generation implementation
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index b2180a5a26..a819c03266 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -57,6 +57,9 @@ static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 2;
static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
static const bool DEFAULT_WALLETBROADCAST = true;
+//! if set, all keys will be derived by using BIP32
+static const bool DEFAULT_USE_HD_WALLET = true;
+
extern const char * DEFAULT_WALLET_DAT;
class CBlockIndex;
@@ -574,6 +577,9 @@ private:
void SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator>);
+ /* the hd chain data model (external chain counters) */
+ CHDChain hdChain;
+
public:
/*
* Main wallet lock.
@@ -887,6 +893,12 @@ public:
static bool ParameterInteraction();
bool BackupWallet(const std::string& strDest);
+
+ /* Set the hd chain model (chain child index counters) */
+ bool SetHDChain(const CHDChain& chain, bool memonly);
+
+ /* Set the current hd master key (will reset the chain child index counters) */
+ bool SetHDMasterKey(const CKey& key);
};
/** A key allocated from the key pool. */