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
Daniel Cousens
f8e662e495
Script: rename toScriptHash to getHash and add tests
2014-05-09 13:07:06 +10:00
Daniel Cousens
cace8316e4
Script: extract test data to fixture
2014-05-09 12:56:35 +10:00
Daniel Cousens
708aa03390
Transaction/Script: bitcoin network no longer implied
...
A Transaction (and its subsequent scripts) do not carry any network
specific information in the Bitcoin protocol.
Therefore they can not (without further context) produce the network
specific constants for the generation of the base58 Addresses.
As TransactionOut.address is used heavily throughout Wallet and other
areas of the library, this could not be entirely removed without a large
number of changes.
For now, TransactionOut.address is only defined in the case of
Tx.addOutput being used directly:
Transaction.addOutput(address, value)
2014-05-08 10:59:58 +10:00
Daniel Cousens
0822def7e0
Script: add standard Script.create*ScriptPubKey
...
Extracts the two Script types out of Script.createOutputScript, and puts
them both under test.
Also renames Script.createMultiSigOutputScript to adhere to the same
convention.
2014-05-08 10:59:58 +10:00
Daniel Cousens
d0f684844c
Script: add toHex, fromHex
...
Script.fromHex previously existed, but was not under any kind of test.
This commit adds tests (despite being a little circular in nature) to
check that the output is as expected.
2014-05-08 10:59:58 +10:00
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.
2014-05-08 10:59:58 +10:00
Daniel Cousens
f5ce83beca
Adds working implementation of Script.createP2SHMultisigScriptSig
2014-04-22 00:28:13 +10:00
Daniel Cousens
6edd97d4fd
Removes convert usage
2014-04-21 21:55:49 +10:00
Daniel Cousens
682ec133bb
Migrates Address to stricter API subset
2014-04-18 17:12:29 +10:00