Daniel Cousens
5f88cb8931
ECKey: use signum over compareTo
11 years ago
Daniel Cousens
7494a146a6
ECKey: fix exception tests
These weren't broken as such, but they weren't distinctly checking that
the right exception was thrown either.
11 years ago
Daniel Cousens
aca565239a
ECKey: remove unnecessary slice
11 years ago
Daniel Cousens
bcfd62fdb5
ecdsa: remove implicit ecparams
11 years ago
Daniel Cousens
10fe4474d1
ECKey: remove *Buffer/*Hex functions
An ECKey is a composition of a private key (D), a public key (Q) and its
compression flag.
These functions gave the impression of serialization of this
composition, when really they only serialized `D`.
They have therefore been removed in favour of always using a sane
serialization format (WIF) that matches the needed behaviour.
If a user needs the previous functionality, simply use `privKey.D.*`
instead of `privKey.*`, as BigInteger supports `*Buffer/*Hex` functions
as expected.
11 years ago
Daniel Cousens
e27c97a791
ECPubKey/ECKey: separate to two files
11 years ago
Daniel Cousens
57b8afbdab
Network: rename Network to Networks
This change removes the most common ambiguities.
As the network module is not representative of a class, the lower case
has been used.
11 years ago
Wei Lu
af1f121fd4
upgrade bigi & remove monkey patching
11 years ago
Daniel Cousens
df6ea8aea2
Removes toPaddedBuffer and extends toBuffer
11 years ago
Daniel Cousens
d8883e8d32
Adds BI.toPaddedBuffer and toBuffer
11 years ago
Daniel Cousens
ae60e6eb95
Replacse JSBN with bigi
11 years ago
Daniel Cousens
1d1306b054
Removes Address.fromPubKey and improves test vectors
11 years ago
Daniel Cousens
682ec133bb
Migrates Address to stricter API subset
11 years ago
Daniel Cousens
ca4ba91d9c
Cleans up ECKey error handling
11 years ago
Daniel Cousens
b4f70dcdde
Migrates ECKey to stricter API
11 years ago
Daniel Cousens
bc05828fbc
Adds Buffers as input parameters
11 years ago
Daniel Cousens
f047afef2d
Updates network.js constant names
11 years ago
Daniel Cousens
1f0fb90213
Pads zeros in toBytes output, fixes #121
11 years ago
Daniel Cousens
c99a576fbd
Migrates all usage of crypto-js/sha256 to ./crypto
11 years ago
Daniel Cousens
81d9c8e759
Renames util.js to crypto.js
11 years ago
Daniel Cousens
6fa0c07763
Changes existing code to use new base58 API
11 years ago
Wei Lu
93fe1b4c78
cosmetic standardization
[closes #56 ]
11 years ago
Daniel Cousens
8fd06681ef
Adds fail fast assertions for invalid input
11 years ago
Daniel Cousens
3fa43b83b6
Comma consistency
11 years ago
Daniel Cousens
626c31911b
Removes dangerous private key throwaway
11 years ago
Daniel Cousens
8f7f50d555
Removes deprecated ECKey.export function
11 years ago
Daniel Cousens
f1414b0d2f
Adds verify to ECPubKey
11 years ago
Daniel Cousens
a96dfea1f4
Adds compression flag to toHex/toBin and tests
11 years ago
Daniel Cousens
87453f1828
Fixes variable redeclarations
11 years ago
Wei Lu
9358a40500
tabs -> spaces
11 years ago
Daniel Cousens
e9fdfecfea
Changes default EC*Key.toString behaviour to Hex
11 years ago
Daniel Cousens
b40374e332
Changes to new version-less ECKey API
11 years ago
Daniel Cousens
a1be488d1b
Fixes #78
11 years ago
Wei Lu
3d6b66e811
move convert methods from util to convert
11 years ago
Wei Lu
a281a5ab53
migrate crypto-js to 3.1.2
11 years ago
Wei Lu
bde9b13b15
remove isArray shim
[closes #40 ]
11 years ago
Wei Lu
eaf84c4283
move address versions into network
Also change address type name:
address_types -> addressVersion
p2sh_types -> p2shVersion
prod -> mainnet
11 years ago
Michael Gooden
b8215dea60
Add testnet support to Address and ECKey, more tests.
Signed-off-by: Michael Gooden <me@michaelgooden.net>
11 years ago
Michael Gooden
b3e3f806cb
Fix parsing of base58 compressed private keys. Add base64 parse support.
Signed-off-by: Michael Gooden <me@michaelgooden.net>
11 years ago
Vitalik Buterin
c8732e5d38
Fixed ECKey constructor
11 years ago
Andreas Brekken
a68b0910af
Fix wrong bitcoin address from priv key.
11 years ago
Andreas Brekken
8ccb8ad70a
Add toBase58, toWif to ECPubKey
11 years ago
Andreas Brekken
ecbb6f81ee
Allow specifying whether to compress key in ECKey.toBytes
11 years ago
Andreas Brekken
56bb0a0c6d
Improve naming of ECKey/ECPubKey formatters. close vbuterin/bitcoinjs-lib#13
11 years ago
Andreas Brekken
29ebd4edc5
Fix ECKey.verify
11 years ago
Andreas Brekken
bc3136802c
Minor formatting
11 years ago
Andreas Brekken
20aa4a0e8a
Fix compressed check to avoid setting it to undefined
11 years ago
Vitalik Buterin
ff3679a3fe
Added 'wif' as an export format
11 years ago
Vitalik Buterin
1f33b7a291
fixed getBitcoinAddress
11 years ago
Vitalik Buterin
f58543b81a
Made return work
11 years ago