bitpay/copay — pull request #816 by yemel (2014-07-03 20:01:49+00:00)
Title: WIP: Feature/bip nnn refactor

This PR add support for the HD wallet schema published [here](https://github.com/maraoz/bips/blob/master/bip-NNNN.mediawiki).

The motivation for this change is to avoid copayers to reuse addresses accidentally, now every copayer derives addresses only from their own HD branch instead from a shared one.

The changes are summarised bellow:

* The AddressIndex includes a cosigner index.
* Cosigner index is derived computed by sorting the public keys of the wallet ring,
* The PublicKeyRing know contains an array of N+1 AddressIndex objects, N copayers + 1 Shared branch.
* The address list from the UI hides the those without balance and derived from other copayer's branch.
* The import process now scans N+1 indexes looking for balances.
* Minor version bumped

Notes:
* The latest version allow open and importing old wallets, migrating to the new schema.
* The latest version can't work properly if a copayer is using and old version (cause it can't derive addresses from other than the shared branch).

To do:
* Check testing coverage