Commit graph

74 commits

Author SHA1 Message Date
junderw
dc1ef5958b
Tests to arrow functions, use strict asserts, travis uses docker instead of regtest server 2019-04-09 15:09:50 +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
91b8823aa8 sed -i 's/^var /const /' 2018-06-25 16:25:46 +10:00
Daniel Cousens
7592a6bcc2 script: rename isCanonicalSignature to isCanonicalScriptSignature 2018-06-05 17:26:52 +10:00
Daniel Cousens
581f57ff6f script/tx: decompile returns maybe chunks 2018-05-22 18:50:00 +10:00
Daniel Cousens
deb8b0f7d8 tests: script tests can validate template fixtures too 2017-09-22 11:33:32 +10:00
Daniel Cousens
e7c59c4b8b script: use asMinimalOP for ASM/decompile 2017-08-24 12:28:50 +10:00
Daniel Cousens
f1ab151c31 tests: use safe-buffers throughout 2017-05-23 18:39:53 +10:00
Daniel Cousens
a86e905611 script: add fromASM failing test case and fix 2016-12-17 14:30:37 +11:00
Thomas Kerin
d0b4f0adf7 Add tests ensuring stacks can be converted back to ASM 2016-12-17 14:17:27 +11:00
Daniel Cousens
ff68116ee9 tests: separate templates and script tests 2016-12-17 14:17:27 +11:00
Daniel Cousens
b2a2a2a136 tests: add toScript tests 2016-12-17 14:17:27 +11:00
Daniel Cousens
2bb021ab64 rm *PushOnly, add isPushOnly and toStack 2016-12-17 14:17:27 +11:00
Thomas Kerin
0696ca95b6 Script: add {compile,decompile}PushOnly 2016-11-14 15:13:12 +11:00
Daniel Cousens
69d8e9ed9e move templates to templates/index.js 2016-11-04 07:23:02 +11:00
Daniel Cousens
a5e65ab977 tests: remove tests for missing witnessScriptHash.input.encode 2016-11-04 07:23:02 +11:00
Daniel Cousens
d9fa39a2cc scripts: extract all scripts to encode/decode/check style 2016-11-04 07:23:02 +11:00
Thomas Kerin
27b48e8aa2 Add methods to decode information from output scripts 2016-11-02 10:58:45 +11:00
Daniel Cousens
c1570f8056 script: always compile in a minimaldata compliant way 2016-09-29 13:51:17 +10:00
Daniel Cousens
d96b7036fb tests: add BIP62 compliance tests 2016-08-31 16:01:36 +10:00
Daniel Cousens
20a026aefe scripts/tests: add witness* scripts 2016-07-12 12:32:29 +10:00
Daniel Cousens
dca7a38362 tests: remove unnecessary branch, fix bscript.fromHex undefined 2015-11-25 19:19:21 +11:00
Daniel Cousens
2d75b7e7ff standard: remove padded Blocks 2015-09-05 14:10:32 +10:00
Daniel Cousens
8934de591c use baddress/bcrypto/bscript for ambuigities 2015-08-20 13:55:13 +10:00
Daniel Cousens
6ec687deba rename scripts to script 2015-08-20 13:55:13 +10:00
Daniel Cousens
e2abe2b3af merge Script/scripts 2015-08-18 14:44:30 +10:00
Daniel Cousens
2aff7bd899 tests: add more tests for Script compile/decompile 2015-08-18 14:44:29 +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
ec9cea0cf1 tests: use strictEqual always 2015-05-07 11:29:20 +10:00
Daniel Cousens
d904e4424c tests: add failing scripts by cross-verifying ASM/Hex 2015-03-04 21:26:42 +11:00
Daniel Cousens
2f100e0eae tests: add failing pushDataInt fixtures 2015-03-04 20:47:52 +11:00
Daniel Cousens
399803affa use standardjs formatting 2015-02-24 12:45:38 +11:00
Daniel Cousens
13d41f67e9 Script: adds toASM/fromASM 2014-06-25 15:44:15 +10:00
Daniel Cousens
00cec9ce64 Script: move all templates to templates.js 2014-06-13 10:52:07 +10:00
Daniel Cousens
aded938ab6 Script: check hex not template result 2014-06-13 10:52:07 +10:00
Daniel Cousens
4e04eea436 Script: use fromChunks internally for all Script templates 2014-06-13 10:49:52 +10:00
Daniel Cousens
f20ffec8b3 tests: always use for, it testing style 2014-06-07 19:46:06 +10:00
Daniel Cousens
7d94d1b068 Script: add fromChunks and without 2014-05-29 16:06:19 +10:00
Daniel Cousens
b05d17f904 Script: adds missing exception regex 2014-05-29 16:06:18 +10:00
Daniel Cousens
778aab104e tests: fix #198 indentation 2014-05-28 19:02:57 +10:00
John Russell
343289229e ensures that pubKey length is greater than m
ensure that pubKey length is greater than m

use Array.isArray over instanceof

error message
2014-05-28 01:48:17 -07:00
Daniel Cousens
08951be66f Script: add createPubKeyScriptPubKey 2014-05-25 10:21:06 +10:00
Kyle Drake
f545ed1279 remove crypto hash transition code 2014-05-25 09:46:06 +10:00
Daniel Cousens
b2351f9026 tests: use JSON fixtures exclusively 2014-05-24 00:52:24 +10:00
Daniel Cousens
55681e7e5d Script: use PubKey objects not prebuilt Buffers 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
7a740c2e7b tests: forces consistent import syntax 2014-05-13 16:46:08 +10:00
Daniel Cousens
f18c5e4c1e Script: removes Script.createP2SHMultiSigScriptSig
It is favoured to compose the scriptSig manually using
Script.createP2SHScriptSig and Script.createMultisigScriptSig.

Added a test to verify that createMultisigScriptSig throws when not
enough signatures a provided and the redeemScript is given.
2014-05-09 16:26:35 +10:00