bitcoinjs/bitcoinjs-lib — pull request #180 by dcousens (2014-05-16 04:07:02+00:00)
Title: ECKey WIF only and Message tests

Depends on #179.

The test `Message.signing.'testnet address'` was removed, as the signing process is agnostic of a network parameter for now (this will change when cross-network magic message constants are added `network.js`).

The only controversial functionality change in this pull request is the removal of `ECKey.*Buffer/*Hex functions.
This is change is suggested for the following reasons:
* These functions gave the impression of serialization of this composition, when really they only serialized `D`.

Where as an `ECKey` is a composition of a private key (D), a public key (Q) and its compression flag.
These formats have therefore been removed in favour of always using a sane serialization format (WIF).

If the user needs the previous functionality, simply use `privKey.D.*` instead of `privKey.*`, as BigInteger supports the `*Buffer/*Hex` functions as expected. So this does not pose any real inconvenience to the user.

More extensive test fixtures for `ECKey` were [also added](https://github.com/dcousens/bitcoinjs-lib/blob/b63a628b8cdfd4c0843b73b3626169e312ad83a2/test/fixtures/eckey.js), testing exceptions where expected and that the calculated public keys are as expected.