UNPKG

8.38 kBMarkdownView Raw
1# 3.2.0
2__added__
3- Added `address.fromBech32/toBech32` (#846)
4
5# 3.1.0
6__added__
7- Added `Transaction.prototype.virtualSize` (#811)
8- Added `Transaction.prototype.weight` (#811)
9
10# 3.0.0
11From this release users can expect out-of-the-box Segregated Witness support.
12The majority of breaking changes have been in how `script` encoding/decoding occurs, with the introduction of witness stacks.
13
14__added__
15- Added `script.types` enums (#679)
16- Added `script.*.*.{check,encode,decode[,encodeStack,decodeStack]}` functions (#681, #682)
17- Added minimal `TransactionBuilder.prototype.build` absurd fee-safety (#696)
18- Added `script.(decompile/compile)PushOnly` and `script.toStack` functions (#700)
19- Added `Transaction.prototype.toBuffer` Segregated Witness serialization support (#684, #701)
20- Added `Transaction.prototype.hasWitnesses` (#718)
21- Added `script.witnessCommitment.*` template
22- Added `TransactionBuilder.prototype.sign` now has two additional parameters, `witnessValue`, and `witnessScript`
23- Added `Transaction.hashForWitnessV0` and `Transaction.setWitness` (5c2fdb60436714f18440dc709f0be065928c1e49)
24
25__fixed__
26- Fixed `script` must compile minimally (#638)
27- Fixed `Transaction` and `Block` versions should be Int32, signed integers (#662)
28
29__removed__
30- Removed `ecdsa.calcPubKeyRecoveryParam`, `ecdsa.recoverPubKey` (#456)
31- Removed `buffer-equals`/`buffer-compare` dependencies (#650)
32- Removed `HDNode.prototype.toString` (#665)
33- Removed `dogecoin` network (#675)
34- Removed `message` export, moved to [`bitcoinjs-message`](https://github.com/bitcoinjs/bitcoinjs-message) (#456)
35
36__renamed__
37- Removed `script.*` functions in favour of `bitcoin.script.*.(input/output).(encode/decode/check)` style (#682)
38
39# 2.3.0
40__added__
41- Added `HDNode.prototype.isNeutered` (#536)
42- Added `HDNode.prototype.derivePath` (#538)
43- Added typeforce checking for `HDNode.prototype.derive*` (#539)
44- Added `Transaction.prototype.isCoinbase` (#578)
45- Added `Block.prototype.checkMerkleRoot` (#580)
46- Added `Block.calculateMerkleRoot` (#580)
47- Added `TransactionBuilder.prototype.setVersion` (#599)
48- Added `script.isWitnessPubKeyHashOutput` (#602)
49- Added `script.isWitnessScriptHashOutput` (#602)
50- Added `script.witnessPubKeyHashOutput` (#602)
51- Added `script.witnessScriptHashOutput` (#602)
52- Added `script.witnessScriptHashInput` (#602)
53
54__fixed__
55- Fixed "BIP32 is undefined" when network list given to `HDNode` but no compatible version found (#550)
56- Fixed `writePushDataInt` output to adhere to minimal data push policy (#617)
57
58
59# 2.2.0
60__added__
61- Added `Block.calculateTarget` for difficulty calculations (#509)
62- Added `Block.prototype.checkProofOfWork` (#509)
63- Added `opcodes.OP_CHECKLOCKTIMEVERIFY` alias for `OP_NOP2` (#511)
64- Added `script.number.[encode/decode]` for CScriptNum-encoded `Buffer`s (#516)
65- Added `TransactionBuilder.prototype.setLockTime` (#507)
66
67__fixed__
68- Bumped `typeforce` version to fix erroneous error message from `types.Hash*bit` types (#534)
69
70
71# 2.1.4
72__fixed__
73- script.isPubKeyHashOutput and script.isScriptHashOutput no longer allow for non-minimal data pushes (per bitcoin/bitcoin `IsStandard` policy) (#499)
74- TransactionBuilder.addOutput now allows for SIGHASH_SINGLE, throwing if the contract is violated (#504)
75- remove use of `const`, use ES5 only (#502)
76
77
78# 2.1.3
79__fixed__
80- Bumped typeforce to 1.5.5 (see #493)
81
82
83# 2.1.2
84__fixed__
85- Add missing CHANGELOG entry for 2.1.1
86
87
88# 2.1.1
89__changed__
90- removed use of `buffer-reverse`, dependency only kept for `bufferutils.reverse`, to be deprecated (#478)
91
92__fixed__
93- `isMultisigOutput` no longer allows data chunks for `m`/`n` (#482)
94- `isMultisigOutput`'s `n` value must now match the number of public keys (as per bitcoin/bitcoin) (#484)
95
96
97# 2.1.0
98From this release users should use the HDNode directly (compared to accessing `.keyPair`) when performing ECDSA operations such as `sign` or `verify`.
99Ideally you shoud not have to directly access `HDNode` internals for general usage, as it can often be confusing and error prone.
100
101__added__
102- `ECPair.prototype.getNetwork`
103- `HDNode.prototype.getNetwork`, wraps the underyling keyPair's `getNetwork` method
104- `HDNode.prototype.getPublicKeyBuffer`, wraps the underyling keyPair's `getPublicKeyBuffer` method
105- `HDNode.prototype.sign`, wraps the underlying keyPair's `sign` method
106- `HDNode.prototype.verify`, wraps the underlying keyPair's `verify` method
107
108
109# 2.0.0
110In 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.
111
112The `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.
113Several other cumbersome modules have been removed, with their new independent modules recommended for usage instead for greater modularity in your projects.
114
115-----------------------------
116
117Backward incompatible changes:
118
119__added__
120- 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
121- 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
122- export `ECPair`, a merged replacement for `ECKey`/`ECPubKey`, invalid types will throw via `typeforce`
123
124__changed__
125- `address.toOutputScript`, `ECPair.prototype.fromWIF` and `HDNode.prototype.fromBase58` no longer automatically detect the network, `networks.bitcoin` is always assumed unless given.
126- `assert` was used for type checking, now replaced by `typeforce`
127- `BIP66` compliant strict DER signature validation was added to `ECSignature.fromDER`, changing the exact exception messages slightly, see #448.
128
129- `new HDNode(d/Q, chainCode, network)` -> `new HDNode(keyPair, chainCode)`, now uses `ECPair`
130- `HDNode.prototype.toBase58(false)` -> `HDNode.prototype.neutered().toBase58()` for exporting an extended public key
131- `HDNode.prototype.toBase58(true)` -> `HDNode.prototype.toBase58()` for exporting an extended private key
132
133- `Transaction.prototype.hashForSignature(prevOutScript, inIndex, hashType)` -> `Transaction.prototype.hashForSignature(inIndex, prevOutScript, hashType)`
134- `Transaction.prototype.addInput(hash, ...)`: `hash` could be a string, Transaction or Buffer -> `hash` can now **only** be a `Buffer`.
135- `Transaction.prototype.addOutput(scriptPubKey, ...)`: `scriptPubKey ` could be a string, `Address` or a `Buffer` -> `scriptPubKey` can now **only** be a `Buffer`.
136- `TransactionBuilder` API unchanged.
137
138__removed__
139- export `Address`, `strings` are now used, benchwith no performance loss for most use cases
140- export `base58check`, use [`bs58check`](https://github.com/bitcoinjs/bs58check) instead
141- export `ecdsa`, use [`ecurve`](https://github.com/cryptocoinjs/ecurve) instead
142- export `ECKey`, use new export `ECPair` instead
143- export `ECPubKey`, use new export `ECPair` instead
144- export `Wallet`, see README.md#complementing-libraries instead
145- export `Script`, use new utility export `script` instead (#438 for more information)
146
147- `crypto.HmacSHA256 `, use [node crypto](https://nodejs.org/api/crypto.html) instead
148- `crypto.HmacSHA512 `, use [node crypto](https://nodejs.org/api/crypto.html) instead
149
150- `Transaction.prototype.sign`, use `TransactionBuilder.prototype.sign`
151- `Transaction.prototype.signInput`, use `TransactionBuilder.prototype.sign`
152- `Transaction.prototype.validateInput`, use `Transaction.prototype.hashForSignature` and `ECPair.verify`
153
154- `HDNode.fromBuffer`, use `HDNode.fromBase58` instead
155- `HDNode.fromHex`, use `HDNode.fromBase58` instead
156- `HDNode.toBuffer`, use `HDNode.prototype.toBase58` instead
157- `HDNode.toHex`, use `HDNode.prototype.toBase58` instead
158
159- `networks.*.magic`, see the comment [here](https://github.com/bitcoinjs/bitcoinjs-lib/pull/432/files#r36715792)
160- `networks.[viacoin|viacointestnet|gamerscoin|jumbucks|zetacoin]`, import these yourself (see #383/a0e6ee7)
161- `networks.*.estimateFee`, out-dated
162
163__renamed__
164- `Message` -> `message`
165- `scripts` -> `script`
166- `scripts.dataOutput ` -> `script.nullDataOutput` (per [convention](https://org/en/glossary/null-data-transaction))