Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send my bitcoin $to [email protected] #1

Merged
merged 1,423 commits into from
Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1423 commits
Select commit Hold shift + click to select a range
8329e74
ci: check formats
d-yokoi Mar 3, 2019
070a782
style: apply format
d-yokoi Mar 4, 2019
763cb8b
ci: check formats in npm test
d-yokoi Mar 4, 2019
0729fde
Remove eslint comments.
junderw Mar 5, 2019
7b8d8a1
Merge pull request #1343 from d-yokoi/prettier
junderw Mar 5, 2019
09ad808
Merge branch 'master' into typeScript
junderw Mar 5, 2019
e8857d3
Update package-lock.json
junderw Mar 5, 2019
02c1cdf
Merge pull request #1347 from bitcoinjs/bump403
junderw Mar 5, 2019
a567a97
style: fix glob pattern for prettier
d-yokoi Mar 6, 2019
03f86a6
Merge pull request #1353 from d-yokoi/prettier
junderw Mar 7, 2019
ee60862
Add JS for prettier glob fix
junderw Mar 7, 2019
f084439
ci: add tslint
d-yokoi Mar 5, 2019
99d0de8
update package-lock
junderw Mar 7, 2019
d9cba6f
Fixed address.ts lint
junderw Mar 7, 2019
51d078c
Fix block.ts lint
junderw Mar 7, 2019
cb5ab76
Fix classify.ts lint
junderw Mar 7, 2019
6a734ae
Fix lint for ecpair.ts
junderw Mar 7, 2019
3f34fe4
Fix index.ts networks.ts lint
junderw Mar 7, 2019
389ec8c
Fix embed.ts and index.ts for payments lint
junderw Mar 7, 2019
db937f8
Fix lazy.ts in payments lint
junderw Mar 7, 2019
4054f3a
Fix lint for p2ms payment
junderw Mar 7, 2019
8d5d784
Fix P2PK payment lint
junderw Mar 7, 2019
db0e3f1
Fix lint payments p2pkh
junderw Mar 7, 2019
fe62e13
Fix lint payments p2sh
junderw Mar 7, 2019
3ddb881
Fix lint payments p2wpkh
junderw Mar 7, 2019
f058140
Fix lint payments p2wsh
junderw Mar 7, 2019
c2c6508
Fix lint script.ts
junderw Mar 7, 2019
94f3348
Fix lint for script_number.ts script_signature.ts
junderw Mar 7, 2019
e6ea038
Fix lint for transaction.ts
junderw Mar 7, 2019
512b03e
Fix lint transaction_builder.ts
junderw Mar 7, 2019
08c4d6a
Fix lint for templates
junderw Mar 7, 2019
7fb859b
Fix lint types.ts
junderw Mar 7, 2019
cb21cdb
Specify version
junderw Mar 7, 2019
64aa7ba
Add TypeScript section to CONTRIBUTING
junderw Mar 7, 2019
32721c7
Modify typescript portion of README
junderw Mar 7, 2019
492c435
Merge pull request #1349 from d-yokoi/lint
junderw Mar 12, 2019
0426c66
Remove prepare script and checkMerkleRoot method on Block
junderw Mar 14, 2019
fabd1d6
Update bip32 and nyc to latest
junderw Mar 19, 2019
74375bf
Fix class constructors
junderw Mar 20, 2019
0cdd7b1
ci: add a tslint rule to require type definitions
d-yokoi Mar 21, 2019
2d5307f
Add tslint to travis
junderw Mar 22, 2019
63d6d94
Merge pull request #1369 from bitcoinjs/lint
junderw Mar 22, 2019
d4dc26f
Prevent JS/TS diff in Travis
junderw Apr 1, 2019
335ed99
Fix error for lack of rmd160 in Electron v4
junderw Apr 2, 2019
af7c308
Update README and CHANGELOG for v5 (typescript)
junderw Apr 5, 2019
8a65e85
5.0.0
junderw Apr 5, 2019
22141b5
Merge pull request #1319 from bitcoinjs/typeScript
junderw Apr 5, 2019
fcde977
Amend CHANGELOG
junderw Apr 6, 2019
1c24201
Merge pull request #1376 from bitcoinjs/addChangelog
junderw Apr 6, 2019
8ec1911
Fix tests Missing Input
junderw Apr 7, 2019
77bd66c
Fix Bad Request errors from the client side
junderw Apr 8, 2019
b27df61
Randomize sleep times
junderw Apr 8, 2019
d9fd6d6
Fix race condition for two integration test jobs
junderw Apr 8, 2019
d951423
Fix TransactionBuilder types
junderw Apr 8, 2019
2381b66
5.0.1
junderw Apr 8, 2019
cdbf56c
Merge pull request #1379 from bitcoinjs/fixTypes
junderw Apr 8, 2019
16823e9
Add APIURL env for endpoint
junderw Apr 9, 2019
dc1ef59
Tests to arrow functions, use strict asserts, travis uses docker inst…
junderw Apr 9, 2019
c77db1a
Only run docker in integration with cache
junderw Apr 9, 2019
848c819
Merge pull request #1378 from bitcoinjs/fixTests
junderw Apr 9, 2019
329809f
Fix address.*OutputScript and ECPairOptions rng
junderw Apr 11, 2019
f6f3359
5.0.2
junderw Apr 11, 2019
a52ef82
Merge pull request #1381 from bitcoinjs/fixTypes
junderw Apr 11, 2019
3b402d0
Add low R grinding option
junderw Apr 12, 2019
ccd439b
Modify interface
junderw Apr 12, 2019
b557760
Add tests for low R signing
junderw Apr 15, 2019
352e9ef
Add low R signing to TransactionBuilder
junderw Apr 15, 2019
e28e044
Use Prettier to make JS easier to read/audit
junderw Apr 21, 2019
67aa87e
fix bug:ECPair.verify should return boolean
jolestar Apr 23, 2019
00ca4c2
Fix ts files from Buffer to boolean
junderw Apr 23, 2019
4e7e364
Merge pull request #1388 from jolestar/patch-1
junderw Apr 23, 2019
56c876e
5.0.3
junderw Apr 25, 2019
3bee658
Merge pull request #1391 from bitcoinjs/bumpver
junderw Apr 25, 2019
68339fd
Remove source files before rebuilding
lukechilds May 13, 2019
5ef135f
Ensure build scripts are in alphabetical order
lukechilds May 13, 2019
ea4fd58
Merge pull request #1396 from lukechilds/clean-before-build
junderw May 13, 2019
1c75c02
Fix publicKey type on ECPairInterface
junderw May 16, 2019
5a381ba
Bump tiny-secp256k1 to version supporting node 12
agentofuser May 17, 2019
88cfdcc
Merge pull request #1398 from agentofuser/node-12
junderw May 18, 2019
6c3e30e
Merge branch 'master' into lowR
junderw May 21, 2019
41d88f8
Merge branch 'master' into trimSpace
junderw May 21, 2019
cbc189c
Merge pull request #1397 from bitcoinjs/fixECPair
junderw May 21, 2019
4d9c1b8
Update packages npm audit
junderw May 21, 2019
04b1f50
Add js format check to CI
junderw May 21, 2019
39bd080
Merge pull request #1385 from bitcoinjs/lowR
junderw May 21, 2019
9aa2842
Merge branch 'master' into trimSpace
junderw May 21, 2019
94872f9
Merge pull request #1387 from bitcoinjs/trimSpace
junderw May 21, 2019
9f96fd0
Merge branch 'master' into addComplexScript
junderw May 21, 2019
267b0c5
Easier var names
junderw May 21, 2019
3145d3f
Fix comments
junderw May 21, 2019
0b37eaa
Update changelog
junderw May 21, 2019
dfd2504
Fix rimraf to delete types folder as well
junderw May 21, 2019
119e839
5.0.4
junderw May 21, 2019
6808dc6
Merge pull request #1185 from bitcoinjs/addComplexScript
junderw May 21, 2019
f2ce2ba
Merge pull request #1400 from bitcoinjs/updateChangelog
junderw May 21, 2019
be942f0
Merge pull request #1401 from bitcoinjs/fixRimraf
junderw May 21, 2019
f9f4707
Merge pull request #1402 from bitcoinjs/bump504
junderw May 21, 2019
c6c59c7
Expose more interfaces to top level
junderw May 22, 2019
73b6f55
5.0.5
junderw May 22, 2019
b3def6b
Merge pull request #1404 from bitcoinjs/fixExports
junderw May 27, 2019
17f5f35
Migrate to stricter type checks during sign
junderw Jun 12, 2019
969b3a5
Fix tests to use new sign method
junderw Jun 13, 2019
053d282
Add stricter Signer interface check
junderw Jun 13, 2019
2e4c9f6
Remove checks to outer function
junderw Jun 13, 2019
7c454e5
TIL: destructuring objects without let or const is a thing
junderw Jun 13, 2019
ee3150d
Refactor sign for clarity
junderw Jun 14, 2019
4bed585
Test old args as well
junderw Jun 14, 2019
84d5e67
Use for loop instead of some to allow for future await usage
junderw Jun 14, 2019
d814c21
Condense sign parts work directly
junderw Jun 14, 2019
1cc7205
Remove @ts-ignore
junderw Jun 14, 2019
691e4d1
Create Signer interface and use it
junderw Jun 14, 2019
071e201
Silence console.warn during old arg tests
junderw Jun 17, 2019
1b39d9c
Make errors clearer and increase coverage
junderw Jun 17, 2019
8bbe7c7
Merge pull request #1416 from bitcoinjs/signTxb
junderw Jun 20, 2019
e4c5128
Use regtest-client
junderw Jun 15, 2019
62f1749
Add BIP174 dependency
lukechilds Jun 24, 2019
6a5e395
Extend BIP174 PSBT base class
lukechilds Jun 24, 2019
2ed89cd
Update BIP174 package
lukechilds Jun 25, 2019
6ed635d
Flesh out signInput interface
lukechilds Jun 25, 2019
ff3caa0
Add BIP174 pseudo code for signing checks
lukechilds Jun 26, 2019
98dff9a
Check Non-witness UTXO hash when signing PSBT input
lukechilds Jun 26, 2019
2dcac55
Add simple tests for non-witness UTXO check
lukechilds Jun 26, 2019
5fd18d8
Check redeem script matches when signing PSBT input
lukechilds Jun 27, 2019
64dc654
Add simple tests for redeem script check
lukechilds Jun 27, 2019
1afac39
Update BIP174 package to fix inheritance issues
lukechilds Jun 28, 2019
3a82486
Loop over PSBT tests from fixtures
lukechilds Jun 28, 2019
6562ee9
Remove redundant import from test
lukechilds Jun 28, 2019
08627e6
Check redeem script matches witness utxo when signing PSBT input
lukechilds Jun 28, 2019
10b3aff
Test redeem script witness utxo check
lukechilds Jun 28, 2019
95b4a28
Improve code re-use for redeem script checks
lukechilds Jun 28, 2019
f961724
Prefer buf1.equals(buf2) over Buffer.compare(buf1, buf2) !== 0
lukechilds Jun 28, 2019
18e7c9d
Move comments to main check logic
lukechilds Jun 28, 2019
667ffb5
Use signature encode
junderw Jul 1, 2019
f87b66e
Finish sign
junderw Jul 1, 2019
f72c915
Start towards finalizing inputs
junderw Jul 1, 2019
f28e9ce
Refactor
junderw Jul 2, 2019
4644e9d
Finish canFinalize
junderw Jul 2, 2019
354d67a
Just some ideas, TODO mostly.
junderw Jul 2, 2019
7ff40ce
Recreate test case PSBTs and try and sign them with the valid key
lukechilds Jul 2, 2019
8d74beb
Throw error when signing with a privkey that doesn't match the pubkey
lukechilds Jul 2, 2019
658ea84
Test matching privkey check
lukechilds Jul 2, 2019
b8789c5
Test input exists check
lukechilds Jul 2, 2019
343297a
Test error if UTXO doesn't exist
lukechilds Jul 2, 2019
813b84f
Finalize and extract done
junderw Jul 3, 2019
77dde89
Add async signing method
junderw Jul 3, 2019
1c8fc69
Stick with ES2015 for now
junderw Jul 3, 2019
48fc75c
Fix p2sh and p2wsh not working
junderw Jul 3, 2019
1fc2e14
Test BIP174 invalid test cases
lukechilds Jul 3, 2019
c24a6e1
Include test case number in test output
lukechilds Jul 3, 2019
2662e46
Test BIP174 valid test cases
lukechilds Jul 3, 2019
336c76b
Add descriptions to invalid test cases from BIP174 spec
lukechilds Jul 3, 2019
54e2e55
Add descriptions to valid test cases from BIP174 spec
lukechilds Jul 3, 2019
a876698
Test BIP174 signer check test cases
lukechilds Jul 3, 2019
df9008b
Update bip174
junderw Jul 4, 2019
2b8e800
Support Addresses for outputs
junderw Jul 4, 2019
b28c96d
Set to version 2 by default
junderw Jul 4, 2019
f7e726a
Add TX cache and addInput addOutput
junderw Jul 4, 2019
539c885
Add version and locktime setters
junderw Jul 4, 2019
b98761a
Promise fixes for async
junderw Jul 4, 2019
5b5daf8
Remove unnecessary extra Transaction Buffer parsing
junderw Jul 4, 2019
3e7f490
Check for input empty on parse
junderw Jul 4, 2019
45bd5b4
Check for signatures, add setSequence
junderw Jul 4, 2019
2501fc9
Test BIP174 creator check test cases
lukechilds Jul 4, 2019
275618e
Remove console.log
lukechilds Jul 4, 2019
a32d1c3
Test BIP174 updater check test cases
lukechilds Jul 4, 2019
30815e9
Test BIP174 signer test cases
lukechilds Jul 4, 2019
4e55ab0
Test BIP174 combiner test cases
lukechilds Jul 4, 2019
a80155d
Test BIP174 finalizer test cases
lukechilds Jul 4, 2019
35cf120
Add extra combiner test case
lukechilds Jul 4, 2019
e3efdbd
Test BIP174 extractor test cases
lukechilds Jul 4, 2019
dc23b8c
Test fromTransaction
lukechilds Jul 4, 2019
09a6c37
Test setVersion
lukechilds Jul 4, 2019
871e587
Test setLocktime
lukechilds Jul 4, 2019
ba5f336
Test setSequence
lukechilds Jul 4, 2019
14eeb30
Add fee checking before extract
junderw Jul 5, 2019
51133c8
Add type instance check tests
junderw Jul 5, 2019
93e1661
Remove need for ts-ignore
junderw Jul 5, 2019
8d52ce1
Add some tests and an input duplicate checker
junderw Jul 5, 2019
5f26654
Add tests
junderw Jul 5, 2019
02ba6c7
Add integration tests with examples
junderw Jul 5, 2019
d0d94c7
Add signature verify method
junderw Jul 8, 2019
f66b568
Add sign all inputs method
junderw Jul 8, 2019
e15b515
Add tests
junderw Jul 8, 2019
09fcb1c
Use function keyword
junderw Jul 9, 2019
36a966c
Check actual sighash flags instead of psbtInput one
junderw Jul 9, 2019
88de1e7
Refactor: nonWitnessUtxo cache
junderw Jul 9, 2019
e4e5111
Refactor: cache
junderw Jul 9, 2019
497d048
Refactor: externalize outputAdder
junderw Jul 9, 2019
9749a21
Refactor: input finalize and get fee shared logic
junderw Jul 9, 2019
2fd4b9d
Refactor: pass only cache to certain functions
junderw Jul 9, 2019
479c56b
Refactor: Re-order helper functions based on like-kind
junderw Jul 9, 2019
0f76aa9
Refactor: Use varint from BIP174
junderw Jul 9, 2019
ba33f03
Add check for spending more than you have
junderw Jul 9, 2019
b8c341d
Finalize should chain this as well.
junderw Jul 9, 2019
01c7ac3
Add clone, addInputs, addOutputs
junderw Jul 9, 2019
75f5e8f
Use Buffer notation in JSON
lukechilds Jul 9, 2019
0d9fa87
Move nonWitnessUtxo cache tests out into own test
lukechilds Jul 9, 2019
fa897cf
Check signatures for sighash type before finalize
junderw Jul 10, 2019
ccab265
Add sighash checks for signer
junderw Jul 10, 2019
a50ec33
Update dep
junderw Jul 10, 2019
da5adcf
Refactor and cleanup validateSignatures tests
lukechilds Jul 10, 2019
47b42e7
Refactor and cleanup getFeeRate tests
lukechilds Jul 10, 2019
d051446
Add P2MS test case to finalizer tests
lukechilds Jul 10, 2019
f6ab5b7
Move all BIP174 test cases into BIP14 describe block
lukechilds Jul 10, 2019
ec2c14b
Extract finalizeAllInputs test out of BIP174 test cases
lukechilds Jul 10, 2019
bc56ca0
Test finalizeAllInputs against P2PK input
lukechilds Jul 10, 2019
f55ee32
Test finalizeAllInputs against P2PKH input
lukechilds Jul 10, 2019
7377566
Test finalizeAllInputs against P2SH-P2WPKH input
lukechilds Jul 10, 2019
876a241
Test finalizeAllInputs against P2WPKH input
lukechilds Jul 10, 2019
9ee115b
assert the fee calculation is correct
junderw Jul 11, 2019
266302a
Add P2WSH-P2PK finalize vector
junderw Jul 11, 2019
8a5104c
Add tests
junderw Jul 11, 2019
2f1609b
Fix: P2WPKH was signing with nonWitnessUtxo
junderw Jul 11, 2019
c403757
Add name attribute to Payments
junderw Jul 11, 2019
1feef95
Composition over inheritance
junderw Jul 11, 2019
f25938d
Test signing a non-whitelisted sighashtype
lukechilds Jul 11, 2019
d790288
Test the sighashtype is checked when signing
lukechilds Jul 11, 2019
71ddd65
Modify for new BIP174 interface system
junderw Jul 18, 2019
19a33f7
Add comments and remove fromTransaction
junderw Jul 18, 2019
def2182
Fix: integration test comments
junderw Jul 18, 2019
1326e0c
Remove the cached buffer getter
junderw Jul 19, 2019
4366b62
Add HD signer methods
junderw Jul 19, 2019
1c5b002
Update integration test with HD example
junderw Jul 19, 2019
acf59f1
Use [email protected]
junderw Jul 19, 2019
eca05f7
Merge pull request #1421 from bitcoinjs/useRegtestLib
junderw Jul 19, 2019
19a126c
Merge pull request #1433 from bitcoinjs/addNamePayments
junderw Jul 19, 2019
e19bc58
Rename methods
junderw Jul 19, 2019
d05806f
Update README, add deprecation warning
junderw Jul 19, 2019
6e447b1
Refactor: Create cache in constructor
junderw Jul 19, 2019
aca9766
Merge pull request #1425 from lukechilds/psbt
junderw Jul 19, 2019
ecba58b
Update CHANGELOG
junderw Jul 19, 2019
de20dce
5.1.0
junderw Jul 19, 2019
f75aebc
Merge pull request #1435 from bitcoinjs/bump510
junderw Jul 19, 2019
a3bfee7
Fix method names for PSBT
junderw Jul 19, 2019
3b44133
5.1.1
junderw Jul 19, 2019
1803b64
Merge pull request #1436 from bitcoinjs/fixNames
junderw Jul 19, 2019
e484482
Check signatures for finalized inputs too
junderw Jul 23, 2019
e36450c
build: npm audit fix
d-yokoi Jul 23, 2019
06b38a7
Refactor: add function getPsigsFromInputFinalScripts
junderw Jul 23, 2019
87c80d0
Merge pull request #1440 from bitcoinjs/build
junderw Jul 23, 2019
af8f41a
Merge pull request #1439 from bitcoinjs/checkFinalizedSighash
junderw Jul 23, 2019
a3b6cda
Update regtest-client
junderw Jul 25, 2019
4e8aecb
Use output for faucetComplex
junderw Jul 25, 2019
1605f99
Move lowR to public writable attribute
junderw Jul 25, 2019
d48864e
Bump bip32
junderw Jul 25, 2019
4a29cb4
5.1.2
junderw Jul 25, 2019
1c639c0
Merge pull request #1442 from bitcoinjs/lowRECPair
junderw Jul 25, 2019
5580475
Update CHANGELOG
junderw Jul 26, 2019
b66e77b
Merge pull request #1443 from bitcoinjs/updateChange
d-yokoi Jul 26, 2019
099360a
Merge pull request #1441 from bitcoinjs/updateRegCli
d-yokoi Jul 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bitcoin.js
coverage
node_modules
.nyc_output
npm-debug.log
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

Empty file added .prettierignore
Empty file.
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
29 changes: 22 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
sudo: false
language: node_js
services:
- docker
before_install:
- "npm install npm -g"
- if [ $TEST_SUITE = "integration" ]; then
docker pull junderw/bitcoinjs-regtest-server &&
docker run -d -p 127.0.0.1:8080:8080 junderw/bitcoinjs-regtest-server &&
docker ps -a;
fi
node_js:
- "0.11"
- "0.10"
- "8"
- "lts/*"
matrix:
include:
- node_js: "lts/*"
env: TEST_SUITE=format:ci
- node_js: "lts/*"
env: TEST_SUITE=gitdiff:ci
- node_js: "lts/*"
env: TEST_SUITE=lint
- node_js: "lts/*"
env: TEST_SUITE=coverage
env:
- TEST_SUITE=coveralls
- TEST_SUITE=integration
- TEST_SUITE=standard
- TEST_SUITE=unit
script: "npm run-script $TEST_SUITE"
- TEST_SUITE=integration APIURL=http://127.0.0.1:8080/1
script: npm run-script $TEST_SUITE
289 changes: 289 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
# 5.1.2
__added__
- `ECPair` and `bip32` objects now have a lowR boolean attribute defaulted to false. You may set it to true to ensure that the sign method uses low R values (#1442) (This is to enable low R usage in Psbt, since we decided not to give the low R flag to the Psbt class, since it makes more sense to be an attribute of the Signer interface)

# 5.1.1
__changed__
- Name inconsistencies for Psbt class. (Quick fix)

# 5.1.0
__added__
- A new `Psbt` class for creating, distributing, combining, signing, and compiling Transactions (#1425)
- A `name` attribute to the Payment interface. P2SH and P2WSH are nested with `'-'` as separator, and p2ms is in the format of `'p2ms(m of n)''` all others are just hard coded. (#1433)

__changed__
- `TransactionBuilder`: Migrate to stricter type checks during sign by switching to a single object parameter (#1416)
- `tests`: Use regtest-client as separate library (#1421)

# 5.0.5
__added__
- Added `ECPairInterface` `Stack` and `StackElement` interfaces to the main index.ts export (TypeScript only affected)

# 5.0.4
__added__
- low R value support for ECPair, bip32, and TransactionBuilder (default off) via `txb.setLowR()` (#1385)

__fixed__
- Fixed Various TypeScript types that have been pushed out since v5.0.0 (#1388)

# 5.0.0
__added__
- TypeScript support (#1319)
- `Block.prototype.checkTxRoots` will check the merkleRoot and witnessCommit if it exists against the transactions array. (e52abec) (0426c66)

__changed__
- `Transaction.prototype.getHash` now has `forWitness?: boolean` which when true returns the hash for wtxid (a652d04)
- `Block.calculateMerkleRoot` now has `forWitness?: boolean` which when true returns the witness commit (a652d04)

__removed__
- `Block.prototype.checkMerkleRoot` was removed, please use `checkTxRoots` (0426c66)

# 4.0.5
__fixed__
- Fixed bug where Angular apps break due to lack of crypto at build time. Reverted #1373 and added (6bead5d).

# 4.0.4
__fixed__
- Fixed bug where Electron v4 breaks due to lack of `'rmd160'` alias for ripemd160 hash. (#1373)

# 4.0.3
__fixed__
- Fixed `TransactionBuilder` to require that the Transaction has outputs before signing (#1151)
- Fixed `payments.p2sh`, which now takes the network from the redeem attribute if one is not given in the object argument (#1232)
- Fixed `Block.calculateTarget` to allow for exponents up to 29 (#1285)
- Fixed some low priority rarely occurring bugs with multisig payments and `TransactionBuilder` multisig processing (#1307)

__added__
- Regtest network object to `networks` (#1261)

# 4.0.2
__fixed__
- Fixed `TransactionBuilder` not throwing when payment type validation should fail (#1195)

__removed__
- Removed rogue `package.json` from `src/payments` (#1216)

# 4.0.1
__fixed__
- Fixed `tiny-secp256k1` dependency version (used `ecurve`) (#1139)
- Fixed `TransactionBuilder` throwing when trying to sign `P2WSH(P2WPKH)` (#1135)

# 4.0.0
__added__
- Added [`bip32`](https://github.com/bitcoinjs/bip32) dependency as a primary export (#1073)
- Added `ECPair.fromPrivateKey` (#1070)
- Added `payments` export, with support for `p2pkh`, `p2pk`, `p2ms`, `p2sh`, `p2wpkh`, `p2wsh` and `embed` payment types (#1096, #1119)
- Added `script.signature.encode/decode` for script signatures (#459)

__changed__
- `ECPair.prototype.sign` now returns a 64-byte signature `Buffer`, not an `ECSignature` object (#1084)
- `ECPair` (and all ECDSA code) now uses [`tiny-secp256k1`](https://github.com/bitcoinjs/tiny-secp256k1), which uses the [`libsecp256k1` library](https://github.com/bitcoin-core/secp256k1) (#1070)
- `TransactionBuilder` internal variables are now `__` prefixed to discourage public usage (#1038)
- `TransactionBuilder` now defaults to version 2 transaction versions (#1036)
- `script.decompile` now returns `[Buffer]` or `null`, if decompilation failed (#1039)

__fixed__
- Fixed `TransactionBuilder` rejecting uncompressed public keys to comply with BIP143 (#987)

__removed__
- Removed Node 4/5 LTS support (#1080)
- Removed `ECPair.fromPublicKeyBuffer`, use `ECPair.fromPublicKey` (#1070)
- Removed `ECPair.prototype.getAddress`, use `payments.p2pkh` instead (#1085)
- Removed `ECPair.prototype.getPrivateKey`, use `ECPair.prototype.privateKey` property (#1070)
- Removed `ECPair.prototype.getPublicKey`, use `ECPair.prototype.publicKey` property (#1070)
- Removed `ECPair.prototype.getNetwork`, use `ECPair.prototype.network` property (#1070)
- Removed `ECSignature`, use `script.signature.encode/decode` instead (#459)
- Removed `HDNode`, use `bip32` export instead (#1073)
- Removed `bufferutils` (#1035)
- Removed `networks.litecoin`, BYO non-Bitcoin networks instead (#1095)
- Removed `script.isCanonicalSignature`, use `script.isCanonicalScriptSignature` instead (#1094)
- Removed `script.*.input/output/check` functions (`templates`), use `payments.*` instead (`templates` previously added in #681, #682) (#1119)
- Removed dependency `bigi`, uses `bn.js` internally now (via `tiny-secp256k1`) (#1070, #1112)
- Removed public access to `ECPair` constructor, use exported functions `ECPair.fromPrivateKey`, `ECPair.fromWIF`, `ECPair.makeRandom`, or `ECPair.fromPublicKey` (#1070)

# 3.3.2
__fixed__
- Fixed `decodeStack` arbitrarily supporting non-Array arguments (#942)

# 3.3.1
__changed__
- Increased the `TransactionBuilder` `maximumFeeRate` from 1000 to 2500 satoshis/byte. (#931)

# 3.3.0
__added__
- Added `ECSignature.prototype.toRSBuffer`/`ECSignature.fromRSBuffer` (#915)
- Added support to `TransactionBuilder` for 64-byte signatures via `.sign` (#915)
- Added support to `TransactionBuilder` for the `.publicKey` standard as an alternative to `.getPublicKey()` (#915)

# 3.2.1
__fixed__
- Fixed `script.scripthash.input.check` recursion (#898)
- Fixed `TransactionBuilder` sometimes ignoring witness value (#901)
- Fixed `script.witnessScriptHash.input` implementation (previously used the P2SH impl.) (#911)

# 3.2.0
__added__
- Added `address.fromBech32/toBech32` (#846)

# 3.1.0
__added__
- Added `Transaction.prototype.virtualSize` (#811)
- Added `Transaction.prototype.weight` (#811)

# 3.0.0
From this release users can expect out-of-the-box Segregated Witness support.
The majority of breaking changes have been in how `script` encoding/decoding occurs, with the introduction of witness stacks.

__added__
- Added `script.types` enums (#679)
- Added `script.*.*.{check,encode,decode[,encodeStack,decodeStack]}` functions (#681, #682)
- Added minimal `TransactionBuilder.prototype.build` absurd fee-safety (#696)
- Added `script.(decompile/compile)PushOnly` and `script.toStack` functions (#700)
- Added `Transaction.prototype.toBuffer` Segregated Witness serialization support (#684, #701)
- Added `Transaction.prototype.hasWitnesses` (#718)
- Added `script.witnessCommitment.*` template
- Added `TransactionBuilder.prototype.sign` now has two additional parameters, `witnessValue`, and `witnessScript`
- Added `Transaction.hashForWitnessV0` and `Transaction.setWitness` (5c2fdb60436714f18440dc709f0be065928c1e49)

__fixed__
- Fixed `script` must compile minimally (#638)
- Fixed `Transaction` and `Block` versions should be Int32, signed integers (#662)

__removed__
- Removed `ecdsa.calcPubKeyRecoveryParam`, `ecdsa.recoverPubKey` (#456)
- Removed `buffer-equals`/`buffer-compare` dependencies (#650)
- Removed `HDNode.prototype.toString` (#665)
- Removed `dogecoin` network (#675)
- Removed `message` export, moved to [`bitcoinjs-message`](https://github.com/bitcoinjs/bitcoinjs-message) (#456)

__renamed__
- Removed `script.*` functions in favour of `bitcoin.script.*.(input/output).(encode/decode/check)` style (#682)

# 2.3.0
__added__
- Added `HDNode.prototype.isNeutered` (#536)
- Added `HDNode.prototype.derivePath` (#538)
- Added typeforce checking for `HDNode.prototype.derive*` (#539)
- Added `Transaction.prototype.isCoinbase` (#578)
- Added `Block.prototype.checkMerkleRoot` (#580)
- Added `Block.calculateMerkleRoot` (#580)
- Added `TransactionBuilder.prototype.setVersion` (#599)
- Added `script.isWitnessPubKeyHashOutput` (#602)
- Added `script.isWitnessScriptHashOutput` (#602)
- Added `script.witnessPubKeyHashOutput` (#602)
- Added `script.witnessScriptHashOutput` (#602)
- Added `script.witnessScriptHashInput` (#602)

__fixed__
- Fixed "BIP32 is undefined" when network list given to `HDNode` but no compatible version found (#550)
- Fixed `writePushDataInt` output to adhere to minimal data push policy (#617)


# 2.2.0
__added__
- Added `Block.calculateTarget` for difficulty calculations (#509)
- Added `Block.prototype.checkProofOfWork` (#509)
- Added `opcodes.OP_CHECKLOCKTIMEVERIFY` alias for `OP_NOP2` (#511)
- Added `script.number.[encode/decode]` for CScriptNum-encoded `Buffer`s (#516)
- Added `TransactionBuilder.prototype.setLockTime` (#507)

__fixed__
- Bumped `typeforce` version to fix erroneous error message from `types.Hash*bit` types (#534)


# 2.1.4
__fixed__
- script.isPubKeyHashOutput and script.isScriptHashOutput no longer allow for non-minimal data pushes (per bitcoin/bitcoin `IsStandard` policy) (#499)
- TransactionBuilder.addOutput now allows for SIGHASH_SINGLE, throwing if the contract is violated (#504)
- remove use of `const`, use ES5 only (#502)


# 2.1.3
__fixed__
- Bumped typeforce to 1.5.5 (see #493)


# 2.1.2
__fixed__
- Add missing CHANGELOG entry for 2.1.1


# 2.1.1
__changed__
- removed use of `buffer-reverse`, dependency only kept for `bufferutils.reverse`, to be deprecated (#478)

__fixed__
- `isMultisigOutput` no longer allows data chunks for `m`/`n` (#482)
- `isMultisigOutput`'s `n` value must now match the number of public keys (as per bitcoin/bitcoin) (#484)


# 2.1.0
From this release users should use the HDNode directly (compared to accessing `.keyPair`) when performing ECDSA operations such as `sign` or `verify`.
Ideally you shoud not have to directly access `HDNode` internals for general usage, as it can often be confusing and error prone.

__added__
- `ECPair.prototype.getNetwork`
- `HDNode.prototype.getNetwork`, wraps the underyling keyPair's `getNetwork` method
- `HDNode.prototype.getPublicKeyBuffer`, wraps the underyling keyPair's `getPublicKeyBuffer` method
- `HDNode.prototype.sign`, wraps the underlying keyPair's `sign` method
- `HDNode.prototype.verify`, wraps the underlying keyPair's `verify` method


# 2.0.0
In this release we have strived to simplify the API, [using native types](https://github.com/bitcoinjs/bitcoinjs-lib/issues/407) wherevever possible to encourage cross-compatibility with other open source community modules.

The `ecdsa` module has been removed in lieu of using a new ECDSA module (for performance and safety reasons) during the `2.x.y` major release.
Several other cumbersome modules have been removed, with their new independent modules recommended for usage instead for greater modularity in your projects.

-----------------------------

Backward incompatible changes:

__added__
- export `address`, for `address` based [utility functions](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/src/address.js), most compatible, just without `Address` instantiation, see #401, #444
- export `script`, for `script` based [utility functions](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/src/script.js), mostly compatible, just without `Script` instantiation, see #438, #444
- export `ECPair`, a merged replacement for `ECKey`/`ECPubKey`, invalid types will throw via `typeforce`

__changed__
- `address.toOutputScript`, `ECPair.prototype.fromWIF` and `HDNode.prototype.fromBase58` no longer automatically detect the network, `networks.bitcoin` is always assumed unless given.
- `assert` was used for type checking, now replaced by `typeforce`
- `BIP66` compliant strict DER signature validation was added to `ECSignature.fromDER`, changing the exact exception messages slightly, see #448.

- `new HDNode(d/Q, chainCode, network)` -> `new HDNode(keyPair, chainCode)`, now uses `ECPair`
- `HDNode.prototype.toBase58(false)` -> `HDNode.prototype.neutered().toBase58()` for exporting an extended public key
- `HDNode.prototype.toBase58(true)` -> `HDNode.prototype.toBase58()` for exporting an extended private key

- `Transaction.prototype.hashForSignature(prevOutScript, inIndex, hashType)` -> `Transaction.prototype.hashForSignature(inIndex, prevOutScript, hashType)`
- `Transaction.prototype.addInput(hash, ...)`: `hash` could be a string, Transaction or Buffer -> `hash` can now **only** be a `Buffer`.
- `Transaction.prototype.addOutput(scriptPubKey, ...)`: `scriptPubKey ` could be a string, `Address` or a `Buffer` -> `scriptPubKey` can now **only** be a `Buffer`.
- `TransactionBuilder` API unchanged.

__removed__
- export `Address`, `strings` are now used, benchwith no performance loss for most use cases
- export `base58check`, use [`bs58check`](https://github.com/bitcoinjs/bs58check) instead
- export `ecdsa`, use [`ecurve`](https://github.com/cryptocoinjs/ecurve) instead
- export `ECKey`, use new export `ECPair` instead
- export `ECPubKey`, use new export `ECPair` instead
- export `Wallet`, see README.md#complementing-libraries instead
- export `Script`, use new utility export `script` instead (#438 for more information)

- `crypto.HmacSHA256 `, use [node crypto](https://nodejs.org/api/crypto.html) instead
- `crypto.HmacSHA512 `, use [node crypto](https://nodejs.org/api/crypto.html) instead

- `Transaction.prototype.sign`, use `TransactionBuilder.prototype.sign`
- `Transaction.prototype.signInput`, use `TransactionBuilder.prototype.sign`
- `Transaction.prototype.validateInput`, use `Transaction.prototype.hashForSignature` and `ECPair.verify`

- `HDNode.fromBuffer`, use `HDNode.fromBase58` instead
- `HDNode.fromHex`, use `HDNode.fromBase58` instead
- `HDNode.toBuffer`, use `HDNode.prototype.toBase58` instead
- `HDNode.toHex`, use `HDNode.prototype.toBase58` instead

- `networks.*.magic`, see the comment [here](https://github.com/bitcoinjs/bitcoinjs-lib/pull/432/files#r36715792)
- `networks.[viacoin|viacointestnet|gamerscoin|jumbucks|zetacoin]`, import these yourself (see #383/a0e6ee7)
- `networks.*.estimateFee`, out-dated

__renamed__
- `Message` -> `message`
- `scripts` -> `script`
- `scripts.dataOutput ` -> `script.nullDataOutput` (per [convention](https://org/en/glossary/null-data-transaction))
Loading