BitcoinJS v4.0.0 Release Notes
-
➕ added
- ➕ Added
bip32
dependency as a primary export (#1073) - ➕ Added
ECPair.fromPrivateKey
(#1070) - ➕ Added
payments
export, with support forp2pkh
,p2pk
,p2ms
,p2sh
,p2wpkh
,p2wsh
andembed
payment types (#1096, #1119) - ➕ Added
script.signature.encode/decode
for script signatures (#459)
🔄 changed
ECPair.prototype.sign
now returns a 64-byte signatureBuffer
, not anECSignature
object (#1084)ECPair
(and all ECDSA code) now usestiny-secp256k1
, which uses thelibsecp256k1
library (#1070)- 🛠
TransactionBuilder
internal variables are now__
prefixed to discourage public usage (#1038) - 0️⃣
TransactionBuilder
now defaults to version 2 transaction versions (#1036) script.decompile
now returns[Buffer]
ornull
, 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
, useECPair.fromPublicKey
(#1070) - ✂ Removed
ECPair.prototype.getAddress
, usepayments.p2pkh
instead (#1085) - ✂ Removed
ECPair.prototype.getPrivateKey
, useECPair.prototype.privateKey
property (#1070) - ✂ Removed
ECPair.prototype.getPublicKey
, useECPair.prototype.publicKey
property (#1070) - ✂ Removed
ECPair.prototype.getNetwork
, useECPair.prototype.network
property (#1070) - ✂ Removed
ECSignature
, usescript.signature.encode/decode
instead (#459) - ✂ Removed
HDNode
, usebip32
export instead (#1073) - ✂ Removed
bufferutils
(#1035) - ✂ Removed
networks.litecoin
, BYO non-Bitcoin networks instead (#1095) - ✂ Removed
script.isCanonicalSignature
, usescript.isCanonicalScriptSignature
instead (#1094) - Removed
script.*.input/output/check
functions (templates
), usepayments.*
instead (templates
previously added in #681, #682) (#1119) - ✂ Removed dependency
bigi
, usesbn.js
internally now (viatiny-secp256k1
) (#1070, #1112) - ✂ Removed public access to
ECPair
constructor, use exported functionsECPair.fromPrivateKey
,ECPair.fromWIF
,ECPair.makeRandom
, orECPair.fromPublicKey
(#1070)
- ➕ Added