Commit graph

47 commits

Author SHA1 Message Date
junderw
d684a6b2ef
Fix compiler errors, tests, and scripts 2018-12-29 15:20:37 +09:00
Daniel Cousens
16195cc6ce explicitly import mocha variables 2018-07-23 17:45:01 +10:00
Daniel Cousens
a5db0a4e44 sed -i 's/ var / const /', with const->let fixes 2018-06-25 18:26:23 +10:00
Daniel Cousens
93b1ae4303 sed -i 's/^let /const /' 2018-06-25 16:24:37 +10:00
Daniel Cousens
d934e543d8 rm Litecoin 2018-06-05 17:22:39 +10:00
Dave Kerr
504b6c24bc fix failing address test by error-thrown assertion 2018-02-19 17:10:44 -05:00
Daniel Cousens
b1272a1200 add Bech32 support to toOutputScript/fromOutputScript 2017-08-21 11:17:30 +10:00
Daniel Cousens
d1052e4996 add from/toBech32 2017-08-21 11:17:30 +10:00
Daniel Cousens
f1ab151c31 tests: use safe-buffers throughout 2017-05-23 18:39:53 +10:00
Thomas Kerin
27b48e8aa2 Add methods to decode information from output scripts 2016-11-02 10:58:45 +11:00
Daniel Cousens
67da1b30e3 address: fix compiled assumption for fromOutputScript 2016-01-28 15:35:57 +11:00
Daniel Cousens
6ec687deba rename scripts to script 2015-08-20 13:55:13 +10:00
Daniel Cousens
18e9cdcc02 rename Address to address 2015-08-20 13:55:13 +10:00
Daniel Cousens
e2abe2b3af merge Script/scripts 2015-08-18 14:44:30 +10:00
Daniel Cousens
e05f8a542d remove Script object 2015-08-18 14:44:29 +10:00
Daniel Cousens
e743c58ed6 remove usage of instanced Scripts 2015-08-18 14:44:29 +10:00
Daniel Cousens
fd7f0b0ef8 address: use input first errors, easier detection 2015-08-18 09:27:55 +10:00
Daniel Cousens
f5d99d8f8a address: remove network detection 2015-08-07 16:36:10 +10:00
Daniel Cousens
13f414c122 remove Address constructor 2015-07-24 12:18:00 +10:00
Daniel Cousens
ec9cea0cf1 tests: use strictEqual always 2015-05-07 11:29:20 +10:00
Daniel Cousens
399803affa use standardjs formatting 2015-02-24 12:45:38 +11:00
Daniel Cousens
7fbc397141 Address: use script ASM over hex 2014-11-28 14:02:50 +11:00
Daniel Cousens
7e5af52cd1 Transaction: mass rename from SPK/SS to Input/Output
I think it is important we maintain some reasoning that an Input script
is actually a script signature, but in the end, these names are more
coherent and understandable when reasoning with our code.  So I think
its OK we break tradition with bitcoind.
2014-06-13 11:36:31 +10:00
Daniel Cousens
00cec9ce64 Script: move all templates to templates.js 2014-06-13 10:52:07 +10:00
Daniel Cousens
943621f466 Address/HDNode: fix test descriptions 2014-06-04 15:46:40 +10:00
Daniel Cousens
2fc69b0834 address/base58check: fix missing exceptions/tests
All the `invalid2` tests have been removed as they were not invalid
base58check.  They were actually valid in some cases.
They will be re-integrated in more specific bitcoin core tests in
relation to Address/ECKey respectively.
2014-05-29 14:43:44 +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
b2351f9026 tests: use JSON fixtures exclusively 2014-05-24 00:52:24 +10:00
Daniel Cousens
54cc123d31 Address/Script: consistent function ordering 2014-05-17 00:09:13 +10:00
Daniel Cousens
6c0eebe94b tests: use filepaths directly
After a long IRC discussion, it was decided that the use of direct
filepaths instead of the module is a more pure form of testing ,
although it may provide less overall coverage than the mixed integration
style imports used previously.

This will need to be remedied by further integration testing in
/test/integration.
2014-05-13 18:05:56 +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
231ccdd721 Now shares base58 data with Address base58 tests 2014-04-22 00:24:03 +10:00
Daniel Cousens
12a5b75cbe Address now properly checks malformed base58 2014-04-22 00:24:02 +10:00
Daniel Cousens
1d1306b054 Removes Address.fromPubKey and improves test vectors 2014-04-20 04:38:33 +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
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
Kyle Drake
a6706ea8be
fix spacing 2014-03-06 17:57:32 -06:00
Kyle Drake
09925cff5a
cleanup throw tests, add case for bad input 2014-03-06 17:27:40 -06:00
Kyle Drake
fdc78dad2e
merge weilu's changes 2014-03-06 17:21:42 -06:00
Wei Lu
2f3e597596 reorganize address tests #50 2014-03-06 09:45:56 +08: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
02b3a2b564 HDWallet prod -> mainnet 2014-02-28 17:28:03 +08:00
Andreas Brekken
f591cc0111 Reformat all tests for more modern mocha syntax (describe, it) 2014-01-11 13:57:43 +07:00
Roman Shtylman
e94636ef25 fix test require so browserify works for testling 2013-02-17 00:51:16 -05: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