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
Daniel Cousens
f047afef2d
Updates network.js constant names
2014-04-17 05:50:59 +10:00
Wei Lu
c3d95010ae
standardize test descriptions & add nonstandard script test vector
...
[follow-up #125 ]
2014-04-14 12:25:48 +08:00
sidazhang
92cff2fb43
Test vectors for nulldata (OP_RETURN) and multisig
2014-04-13 14:32:22 -07:00
sidazhang
aa43e98ac0
Aligning type naming with bitcoind and fixed pubkeyhash bug
2014-04-11 15:20:42 -07:00
Daniel Cousens
c99a576fbd
Migrates all usage of crypto-js/sha256 to ./crypto
2014-04-08 23:07:46 +10:00
Daniel Cousens
81d9c8e759
Renames util.js to crypto.js
2014-04-08 22:00:28 +10:00
Wei Lu
93fe1b4c78
cosmetic standardization
...
[closes #56 ]
2014-03-31 11:47:47 +08:00
Wei Lu
66e04fe701
Merge branch 'multisig_tests' of github.com:juliustayl/bitcoinjs-lib into juliustayl-multisig_tests
...
Conflicts:
test/script.js
2014-03-29 22:13:39 +08:00
Julius Taylor
bad2f769ff
added redeem script test
...
refactored the previous multi-sig address test a bit and added a test
to validate the # of signatures required and possible addresses
included in the redeemscript
2014-03-27 22:56:10 -04:00
Wei Lu
83381186d1
add (some) fromAddress and getInType tests to script
2014-03-26 08:43:31 +08:00