This fixes some cornercases and makes the test
a) properly data-driven (don't use 'today').
b) much more extensive.
This also removes some duplicate code and fixes some bugs in the actual
model it tests.
In our wallet we very rarely end up in a situation where we have to ask
the same transactions twice from a peer due to us having generated a
bunch of new keys from a HD wallet in the middle of a series we asked
that peer. Making the filter we sent at the start of the series be
outdated halfway through.
This is now handled properly.
This adds a unit test which tests that we now reach the right balance
and can add the same block multiple times without it failing.
Fixes: #12
Slowly the amount of cpp sources has been growing to the point
where its just too much to store in the root of the project.
I think they are more happy in a subdir as well, getting an elevated
position for themselves.
This new allows a value to be set as a number, for instance from the
user reading a QR code, and the "typed-value" is created from this
in order to allow the user to edit it instead of overwrite it.
For mined transactions we now use the historical fiat price of BCH
instead of the current.
This will give us a much more stable and historically accurate view of
our transactions.
Fixes: #7
For the 'fullyEncrypted' option we now simply fully
encrypt the entire blob of both the secrets file as well
as the wallet.dat (which transactions we own).
We encrypt using a standard AES256 encryption scheme.
The key is 256 bits and we derive that from a user provided password
which we double-hash (sha256). Additionally we use a randomly generated
salt for a specific wallet that is fed into the hashing algo as well.
This version simply encrypts the private keys of a wallet, which makes
it quite basic. A good start.
When the wallet contains fused transactions we select UTXOs a bit
different in order to maximize privacy.
Additionally this prefers an UTXO that is closest in value to the paid
amount.
To avoid recompiles and such generally to simplify stuff, this
moves all the code into a static lib that is then linked with
by the various apps (including tests).
As transactions are found on the blockchain we remember the signature
type used in order to avoid one private key to be used for both types of
signatures, which can cause compromised keys.
This changes the default generated wallet to be a HD wallet.
We also add a helper class to configure newly created wallets from QML.
This finishes up the new wallet panel to have all the visible features
actually do something.