Daniel Cousens
ea2a7449ad
tests: add isCoinbase tests and flags to fixtures
2016-05-03 21:51:30 +10:00
Daniel Cousens
31923197ea
tests: add more complex integration transaction
2016-04-22 17:08:45 +10:00
Daniel Cousens
9db67bb3b1
Cleanup for #540 ( #551 )
...
* Txbuilder: early exit as soon as possible
* Txbuilder: prefer function declaration over variable
* TxBuilder: extract extractFromOutputScript
* TxBuilder: extract buildFromInputData
2016-04-08 12:23:32 +10:00
Daniel Cousens
aae5db6a59
ECPair/HDNode: missing version from list is Unknown, not Invalid
2016-02-25 13:48:29 +11:00
Daniel Cousens
bdb0dd4a17
HDNode/tests: add testing for invalid network version from networks list
2016-02-25 13:41:35 +11:00
Daniel Cousens
9e32c892ef
ECPair/tests: always use WIF for error throwing
2016-02-25 13:26:05 +11:00
Karel Bilek
6a74eb6993
Renaming Path to Bip32Path, invalid to fixtures
...
Only thing I haven't been able to do is to add "undefined" to fixtures. So I could not properly test
that node.derivePath() properly fails as it should. However, I added "null" there, and "null" and "undefined"
behave in similar way in JavaScript, so that should catch that.
2016-02-14 16:12:16 +01:00
Karel Bilek
d2b43f1dfe
Validating path
...
Again through typeforce
2016-02-13 23:25:30 +01:00
Karel Bilek
755eac5bbd
Doubling down on the path testing
...
Maybe overdoing it a bit :)
2016-02-12 12:37:30 +01:00
Karel Bilek
7a61526705
Testing path derivation
...
I am taking description field for the path.
2016-02-12 12:37:29 +01:00
Karel Bilek
4a72001335
Typechecking indexes
...
As a consequence, it will not allow accidentally double-hardened indexes.
It also won't allow strings or forgotten parameters.
2016-02-06 17:57:11 +01:00
Karel Bilek
bfd294c31e
Adding tests for isNeutered
2016-02-05 20:29:52 +01:00
Karel Bilek
3df2976e2c
Using private key for testing neuterization
...
To test removing private information, it's probably better to start with them :)
2016-02-05 20:26:23 +01:00
Daniel Cousens
1771067dfc
tests: fix standard error, reword descriptions
2016-02-05 14:16:56 +11:00
Ruben de Vries
7c7537fc57
use typeforce >= 1.6.2 which allows us to use typeforce.TfTypeError
with a custom error message.
2016-02-02 14:04:37 +01:00
Ruben de Vries
ce21c99b43
add failing test case for hash160/256 typeforce check
2016-02-02 13:31:54 +01:00
Ruben de Vries
0e1424c2cb
fixed issues with integration tests that use the faucet
2016-01-28 11:27:34 +01:00
Ruben de Vries
b601f50c70
fixed another test where TX was signed before locktime was set
2016-01-28 16:11:49 +11:00
JP Richardson
682ba7e549
Merge pull request #530 from bitcoinjs/lesscomp
...
address: fix compiled assumption for fromOutputScript
2016-01-27 22:50:05 -06:00
Daniel Cousens
67da1b30e3
address: fix compiled assumption for fromOutputScript
2016-01-28 15:35:57 +11:00
JP Richardson
4ee194e840
Merge pull request #507 from bitcoinjs/locktime
...
txbuilder: add setLockTime
2016-01-27 08:29:00 -06:00
Daniel Cousens
f3913516ca
Merge pull request #509 from bitcoinjs/pow
...
Add Block proof-of-work validation function
2016-01-28 01:00:17 +11:00
Daniel Cousens
9a62ab600f
tests: update integration tests to use setLockTime
2016-01-28 00:56:58 +11:00
Daniel Cousens
8a37c1193a
tests: add signature invalidation test for setLockTime
2016-01-28 00:55:45 +11:00
Daniel Cousens
6c0745adce
TxBuilder: add setLockTime
2016-01-28 00:55:44 +11:00
Ruben de Vries
ccec864785
locktime and version were set too late in test scenario and not included when signing (the test scenario).
2016-01-26 17:13:07 +01:00
Daniel Cousens
35a2a6ba1e
tests/integration: increase multisig timeout
2016-01-06 13:14:36 +11:00
Daniel Cousens
a5f1994f86
tests/integration: remove redundant check
2016-01-06 13:10:57 +11:00
Daniel Cousens
f9f41addda
tests/integration: throw if no unspent is given
2016-01-06 13:01:43 +11:00
Daniel Cousens
755c344e16
tests/integration: re-broadcast input tx to avoid missing inputs error
2016-01-06 12:46:02 +11:00
Daniel Cousens
382409c575
tests: rm unused fixtures
2016-01-06 10:00:10 +11:00
Daniel Cousens
b6d986dd10
tests/integration: amend lockTime example to allow redemption, add redepemtion examples
2016-01-05 14:52:56 +11:00
Daniel Cousens
059f48b0c4
script_number: add impl/tests
2016-01-05 01:59:58 +11:00
Daniel Cousens
e4ba88e54f
block: rename verifyPow to checkProofOfWork
2016-01-04 12:49:33 +11:00
Daniel Cousens
bac700f52c
block: use buffer, faster, verified
2016-01-04 12:49:33 +11:00
Daniel Cousens
86b51b2d62
add Block.calculateTarget, use Buffer comparison rather than bigi
2016-01-04 12:49:33 +11:00
Daniel Cousens
26ccb43047
block: add Block.prototype.verifyPow
2016-01-04 12:49:33 +11:00
Daniel Cousens
15227d39bf
tests: add more test fixtures for blocks
2016-01-04 12:49:33 +11:00
Daniel Cousens
b077d7089d
tests/integration: change hodlDate to T+2 hours
2015-12-22 14:17:41 +11:00
Daniel Cousens
b5d1b4a0da
tests/integration: s/message/transaction
2015-12-22 14:13:45 +11:00
Daniel Cousens
cab3022719
add OP_CHECKLOCKTIMEVERIFY and integration tests
2015-12-22 14:13:45 +11:00
Daniel Cousens
07cf0bd057
tests/integration: use actual=expected consistently for asserts
2015-12-22 14:03:58 +11:00
Daniel Cousens
50f381fb5c
tests: add non-BIP62 compliant is*Output fixtures
2015-11-25 19:19:21 +11:00
Daniel Cousens
dca7a38362
tests: remove unnecessary branch, fix bscript.fromHex undefined
2015-11-25 19:19:21 +11:00
Kirill Fomichev
5de6818fcb
Fix TransactionBuilder.addOutput
2015-11-24 08:18:16 +03:00
Daniel Cousens
74fd5ae71d
tests: loop faucet until an unspent is given
2015-11-06 11:01:28 +11:00
Daniel Cousens
a686817f3c
tests: add m/n is data failing tests
2015-10-02 12:36:51 +10:00
Kirill Fomichev
eae8bcf676
fix isMultisigOutput
2015-10-01 23:12:38 +03:00
Daniel Cousens
0b4c67406f
use [].reverse over prototype
2015-09-27 23:49:29 +10:00
Daniel Cousens
5c1c4589c0
remove use of buffer-reverse
2015-09-27 23:30:06 +10:00
Daniel Cousens
731a31ecba
use buffer-reverse
2015-09-25 17:49:05 +10:00
Daniel Cousens
daafb9794e
ECPair/HDNode: adds getNetwork
2015-09-21 17:37:21 +10:00
Daniel Cousens
57d0ea84a2
HDNode: adds getPublicKeyBuffer
2015-09-21 17:37:09 +10:00
Daniel Cousens
923266672b
HDNode: add sign/verify
2015-09-21 16:42:22 +10:00
Daniel Cousens
888393fa8f
tests: add HDNode fromSeed throwing tests
2015-09-14 17:50:38 +10:00
Daniel Cousens
36fce53408
integration: check all unspents, not just this one
2015-09-14 17:28:17 +10:00
Daniel Cousens
05cfdf6a6a
docs: remove inline endian-ness notes, no endianness
2015-09-14 15:03:36 +10:00
Daniel Cousens
945276fbef
ECPair: move throwing constructor tests to fixtures
2015-09-12 15:17:45 +10:00
Daniel Cousens
322ade58e4
revert 4b825bf
2015-09-09 12:32:12 +10:00
Daniel Cousens
f11cce0710
tests: verify ECPair loops until within interval
2015-09-09 00:48:06 +10:00
Daniel Cousens
610f342707
tests: fix ECPair wrapper tests
2015-09-09 00:48:06 +10:00
Daniel Cousens
74e7d1edbc
tests: add further tests for #404
2015-09-08 22:48:54 +10:00
Daniel Cousens
0f9af83aa0
tests: add 2-of-3 multisig fixture
2015-09-08 21:45:43 +10:00
Daniel Cousens
18c8261cef
integration: fix HDNode search space
2015-09-08 16:29:41 +10:00
Daniel Cousens
262be17976
tests: simplify crypto fixtures
2015-09-08 16:03:49 +10:00
Daniel Cousens
b252924517
types: remove ECCurve
2015-09-05 15:42:25 +10:00
Daniel Cousens
4b825bf2a8
HDNode: stop exposing constants
2015-09-05 14:27:53 +10:00
Daniel Cousens
ccfaaf0b6f
ecdsa: remove curve parameter
2015-09-05 14:27:53 +10:00
Daniel Cousens
2d75b7e7ff
standard: remove padded Blocks
2015-09-05 14:10:32 +10:00
Daniel Cousens
ec1195bcee
Merge pull request #448 from bitcoinjs/bip66
...
Extract BIP66 module
2015-08-25 14:17:44 +10:00
Daniel Cousens
3be5dc88a1
integration: throw meaningful errors if no unspent is found
2015-08-25 14:11:49 +10:00
Daniel Cousens
845c1dc199
integration: fix stealth tests
2015-08-25 13:59:19 +10:00
Daniel Cousens
97ecb313c2
tests: add type tests
2015-08-25 13:52:24 +10:00
Daniel Cousens
e9762b14c7
integration: return sharedQ too
2015-08-25 13:45:35 +10:00
Daniel Cousens
86b2cf75ce
tests: add failing test for undefined hashType
2015-08-22 12:32:03 +10:00
Daniel Cousens
4be502a1bd
tests: add non-canonical pubkey fixtures
2015-08-22 12:32:01 +10:00
Daniel Cousens
e1cb5e6152
amend ECSignature tests to reflect BIP66 module
2015-08-21 21:22:33 +10:00
Daniel Cousens
efacd387be
ECPair: extract WIF to 3rd party module
2015-08-20 20:16:57 +10:00
Daniel Cousens
e5e24256fd
integration: mimic HDNode speedup
2015-08-20 18:25:54 +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
18e9cdcc02
rename Address to address
2015-08-20 13:55:13 +10:00
Daniel Cousens
8f9d59fb18
ECPair: stop exposing ECDSA curve
2015-08-20 13:55:13 +10:00
Daniel Cousens
b95223adcd
tests: clean up core test imports
2015-08-20 13:32:00 +10:00
Daniel Cousens
b62dd19f0d
tests: clean up TxBuilder beforeEach constants
2015-08-20 13:32:00 +10:00
Daniel Cousens
bfb7289cf2
Merge pull request #438 from bitcoinjs/noscript
...
No Script
2015-08-19 15:03:40 +10:00
Daniel Cousens
00dad84880
integration: annotate the shared secret
2015-08-19 15:00:06 +10:00
Daniel Cousens
b56bbce472
integration: nonce is not shared
2015-08-18 16:13:12 +10:00
Daniel Cousens
2ccf00f4be
integration: clean up single-key stealth derivation
2015-08-18 15:40:53 +10:00
Daniel Cousens
706f5d7a9c
scripts: adds tests for *HashOutput
2015-08-18 14:44:30 +10:00
Daniel Cousens
1c92cfb373
integration: fix script usage in integration tests
2015-08-18 14:44:30 +10:00
Daniel Cousens
e2abe2b3af
merge Script/scripts
2015-08-18 14:44:30 +10:00
Daniel Cousens
151386c46d
scripts: remove coercion, fromASM returns Buffer
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
5d2abb523e
HDNode: use typeforce.tuple for arguments
2015-08-18 14:21:38 +10:00
Daniel Cousens
eb752f8316
tests: fix bitcoin core address tests
2015-08-18 10:20:51 +10:00
Daniel Cousens
fd7f0b0ef8
address: use input first errors, easier detection
2015-08-18 09:27:55 +10:00
Daniel Cousens
d85df4a6d6
TransactionBuilder: remove use of assert
2015-08-14 10:56:31 +10:00