Commit graph

34 commits

Author SHA1 Message Date
Daniel Cousens
61c57adbf8 Address: Expected T, got PARAM for Buffer assertion 2014-05-31 15:05:33 +10:00
Daniel Cousens
8514bbfabd Address: remove Address.Error
By removing Address.Error, we remove a code smell.
This part of the code base was also not under any form of test.
Test data and tests have therefore been added verifying its behaviour in
both Wallet and Address tests.
2014-05-28 13:17:07 +10:00
Daniel Cousens
342c55c864 Address: remove circular dependency fix
This is no longer a problem.
2014-05-09 12:26:38 +10:00
Daniel Cousens
48e15b587a Address: remove redundant comments 2014-05-09 12:25:24 +10:00
Daniel Cousens
4207a0df99 Address: use Address.Error instead
This change is necessary for instanceof comparison when attempting to
rethrow.  Callbacks may be a better solution to introduce later.
2014-05-08 10:59:58 +10:00
Daniel Cousens
5e0d38ba54 Address: add Address.*ScriptPubKey and tests
The introduction of these two functions allow for the all the network
related code to be eventually removed from Transaction and Script.

Previously the result for non-standard transactions was undefined
behaviour.  This change mandates that an exception is thrown if a
non-standard transaction is input.
2014-05-08 10:59:58 +10:00
Daniel Cousens
74e53b49a5 Script/Transaction: remove untested functions
These functions are not under test, and are unnecessary bloat due to a
confusing API.

Script.from*(asmStr) were two functions that attempted to parse ASM
codes and produce a script from this.
While useful, an parser can be introduced later under a single function
and under test... removed.

Although Script.extractPublicKeys implementation is likely to be correct,
it is not absolute in that what it returns is even strictly a set of
public keys.
It is a useful function, but can be done in a better way later,
probably checking against the Script templates instead.

Transaction.signWithKeys has some inherent undocumented behaviour, and it is not
clear when you would use it over just Transaction.addOutput and
Transaction.sign individually.  Nor does it mimic anything in the
bitcoind API... removed.
2014-05-08 10:59:58 +10:00
Daniel Cousens
1d1306b054 Removes Address.fromPubKey and improves test vectors 2014-04-20 04:38:33 +10:00
Daniel Cousens
eae613d244 Adds error messages and better version checking 2014-04-18 17:12:29 +10:00
Daniel Cousens
682ec133bb Migrates Address to stricter API subset 2014-04-18 17:12:29 +10:00
Daniel Cousens
f047afef2d Updates network.js constant names 2014-04-17 05:50:59 +10:00
Daniel Cousens
a4c2cc6dd4 Removes pointless error utility function 2014-04-08 21:53:47 +10:00
Daniel Cousens
6fa0c07763 Changes existing code to use new base58 API 2014-04-04 05:10:12 +11:00
Wei Lu
93fe1b4c78 cosmetic standardization
[closes #56]
2014-03-31 11:47:47 +08:00
lms
98aeb47c6f cleaned up address.js 2014-03-27 23:11:04 +01:00
Daniel Cousens
b40374e332 Changes to new version-less ECKey API 2014-03-22 19:12:26 +11:00
Wei Lu
3d6b66e811 move convert methods from util to convert 2014-03-11 09:52:48 +08:00
Wei Lu
a281a5ab53 migrate crypto-js to 3.1.2 2014-03-09 09:49:24 +08:00
Kyle Drake
fdc78dad2e
merge weilu's changes 2014-03-06 17:21:42 -06:00
xnova
786198f130 * Fixes address.js to be able to deal with testnet P2SH addresses
* Enhanced address.js testsuite...now also verifies address versions
* Enhances README to show how to run test suite
2014-03-05 16:53:29 -05:00
Wei Lu
eaf84c4283 move address versions into network
Also change address type name:
address_types -> addressVersion
p2sh_types -> p2shVersion
prod -> mainnet
2014-02-28 16:58:14 +08:00
Michael Gooden
b8215dea60
Add testnet support to Address and ECKey, more tests.
Signed-off-by: Michael Gooden <me@michaelgooden.net>
2014-02-24 18:31:18 +02:00
Kyle Drake
cb3653105a Merge vbuterin/master 2014-02-02 11:33:46 -08:00
Andreas Brekken
bf6254d3e2 Trailing whitespace 2014-01-11 13:55:21 +07:00
Vitalik Buterin
7919c8cfc5 Added auto-instantiators to classes 2014-01-10 15:17:53 -05:00
vub
335d0dcd96 bugfix 2013-10-21 15:27:50 -04:00
vub
f53a4e3ffa Added sign with keys method to transaction and did lots of small cleanups 2013-10-21 14:00:31 -04:00
vub
b41a4ecb91 Fixed address object creation bug 2013-10-08 07:13:05 -04:00
vub
e43d23235b Added some transaction methods, and removed all internal use of base64 2013-10-07 15:27:19 -04:00
vub
9922864da4 Added deserialization, made some modifications 2013-10-07 08:21:00 -04:00
Roman Shtylman
0faac29134 start to split into node commonjs style modules
- no longer is the global Bitcoin used for modules
- cleaner and more maintainable code
- add more tests
2013-02-17 00:40:14 -05:00
Stefan Thomas
09e8c6e184 Added comments. 2012-01-11 10:41:52 +01:00
Stefan Thomas
1a7fc9d063 Fixed indents. 2012-01-11 02:40:45 +01:00
Stefan Thomas
8b32d43335 Moved sources into src/ subdirectory. 2011-08-11 18:35:23 +01:00
Renamed from address.js (Browse further)