@btc-vision/bitcoin 6.4.10 → 6.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/.babelrc +4 -4
  2. package/.mocharc.json +13 -13
  3. package/.prettierrc.json +12 -12
  4. package/CHANGELOG.md +403 -403
  5. package/CONTRIBUTING.md +83 -83
  6. package/LICENSE +21 -21
  7. package/README.md +201 -201
  8. package/cjs/package.json +3 -3
  9. package/gulpfile.js +42 -42
  10. package/package.json +150 -150
  11. package/src/bip66.ts +107 -107
  12. package/src/block.ts +233 -233
  13. package/src/bufferutils.ts +188 -188
  14. package/src/crypto.ts +108 -108
  15. package/src/ecc_lib.ts +94 -94
  16. package/src/hooks/AdvancedSignatureManager.ts +104 -104
  17. package/src/hooks/SignatureManager.ts +84 -84
  18. package/src/index.ts +105 -105
  19. package/src/merkle.ts +31 -31
  20. package/src/opcodes.ts +280 -280
  21. package/src/payments/bip341.ts +140 -140
  22. package/src/payments/embed.ts +61 -61
  23. package/src/payments/index.ts +172 -172
  24. package/src/payments/lazy.ts +28 -28
  25. package/src/payments/p2ms.ts +156 -156
  26. package/src/payments/p2op.ts +195 -195
  27. package/src/payments/p2pk.ts +93 -93
  28. package/src/payments/p2pkh.ts +214 -214
  29. package/src/payments/p2tr.ts +309 -309
  30. package/src/psbt/bip371.ts +441 -441
  31. package/src/push_data.ts +97 -97
  32. package/src/script.ts +247 -247
  33. package/src/script_number.ts +72 -72
  34. package/src/script_signature.ts +91 -91
  35. package/src/transaction.ts +656 -656
  36. package/test/address.spec.ts +155 -155
  37. package/test/bitcoin.core.spec.ts +212 -212
  38. package/test/block.spec.ts +171 -171
  39. package/test/bufferutils.spec.ts +450 -450
  40. package/test/crypto.spec.ts +49 -49
  41. package/test/fixtures/address.json +329 -329
  42. package/test/fixtures/block.json +148 -148
  43. package/test/fixtures/bufferutils.json +102 -102
  44. package/test/fixtures/core/README.md +26 -26
  45. package/test/fixtures/core/base58_encode_decode.json +50 -50
  46. package/test/fixtures/core/base58_keys_invalid.json +152 -152
  47. package/test/fixtures/core/base58_keys_valid.json +452 -452
  48. package/test/fixtures/core/blocks.json +27 -27
  49. package/test/fixtures/core/sig_canonical.json +7 -7
  50. package/test/fixtures/core/sig_noncanonical.json +33 -33
  51. package/test/fixtures/core/sighash.json +3505 -3505
  52. package/test/fixtures/core/tx_valid.json +2023 -2023
  53. package/test/fixtures/crypto.json +43 -43
  54. package/test/fixtures/ecdsa.json +217 -217
  55. package/test/fixtures/ecpair.json +141 -141
  56. package/test/fixtures/embed.json +108 -108
  57. package/test/fixtures/p2ms.json +434 -434
  58. package/test/fixtures/p2pk.json +179 -179
  59. package/test/fixtures/p2pkh.json +276 -276
  60. package/test/fixtures/p2sh.json +508 -508
  61. package/test/fixtures/p2tr.json +1198 -1198
  62. package/test/fixtures/p2wpkh.json +290 -290
  63. package/test/fixtures/p2wsh.json +489 -489
  64. package/test/fixtures/psbt.json +924 -924
  65. package/test/fixtures/script.json +465 -465
  66. package/test/fixtures/script_number.json +225 -225
  67. package/test/fixtures/signature.json +140 -140
  68. package/test/fixtures/transaction.json +916 -916
  69. package/test/integration/_regtest.ts +6 -6
  70. package/test/integration/addresses.spec.ts +142 -142
  71. package/test/integration/bip32.spec.ts +130 -130
  72. package/test/integration/blocks.spec.ts +28 -28
  73. package/test/integration/cltv.spec.ts +241 -241
  74. package/test/integration/csv.spec.ts +452 -452
  75. package/test/integration/payments.spec.ts +110 -110
  76. package/test/integration/taproot.spec.ts +663 -663
  77. package/test/integration/transactions.spec.ts +668 -668
  78. package/test/payments.spec.ts +114 -114
  79. package/test/payments.utils.ts +165 -165
  80. package/test/psbt.spec.ts +1285 -1285
  81. package/test/script.spec.ts +186 -186
  82. package/test/script_number.spec.ts +26 -26
  83. package/test/script_signature.spec.ts +66 -66
  84. package/test/transaction.spec.ts +337 -337
  85. package/test/ts-node-register.js +7 -7
  86. package/test/tsconfig.json +48 -48
  87. package/test/types.spec.ts +53 -53
  88. package/tsconfig.base.json +27 -27
  89. package/tsconfig.json +19 -19
  90. package/tsconfig.webpack.json +18 -18
  91. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/.ready +0 -0
  92. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/.release-please-manifest.json +0 -3
  93. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/CHANGELOG.md +0 -962
  94. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/CONTRIBUTING.md +0 -34
  95. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/LICENSE +0 -24
  96. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/README.md +0 -273
  97. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/SECURITY.md +0 -2
  98. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/addon.gypi +0 -204
  99. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/bin/node-gyp.js +0 -138
  100. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/.release-please-manifest.json +0 -3
  101. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/LICENSE +0 -28
  102. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/data/ninja/build.ninja +0 -4
  103. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc +0 -12
  104. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/GypVsCMake.md +0 -116
  105. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/Hacking.md +0 -46
  106. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/InputFormatReference.md +0 -1080
  107. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/LanguageSpecification.md +0 -430
  108. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/README.md +0 -27
  109. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/Testing.md +0 -450
  110. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/docs/UserDocumentation.md +0 -965
  111. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/gyp +0 -8
  112. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/gyp.bat +0 -5
  113. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/gyp_main.py +0 -45
  114. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -365
  115. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -206
  116. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -1272
  117. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -1547
  118. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -59
  119. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -153
  120. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -271
  121. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -574
  122. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -692
  123. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -711
  124. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -171
  125. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -169
  126. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -113
  127. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -55
  128. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
  129. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -804
  130. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -1173
  131. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -1318
  132. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -127
  133. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -103
  134. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -461
  135. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -89
  136. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -57
  137. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -2745
  138. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -3976
  139. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -44
  140. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -2964
  141. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -67
  142. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -1391
  143. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -25
  144. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -3115
  145. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -98
  146. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -771
  147. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -1260
  148. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -174
  149. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -61
  150. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -373
  151. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -1938
  152. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +0 -53
  153. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -302
  154. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -3198
  155. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -65
  156. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +0 -3
  157. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +0 -177
  158. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +0 -23
  159. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +0 -15
  160. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +0 -108
  161. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +0 -252
  162. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +0 -83
  163. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +0 -359
  164. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +0 -61
  165. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +0 -192
  166. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/markers.py +0 -252
  167. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +0 -825
  168. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
  169. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +0 -90
  170. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +0 -1030
  171. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/tags.py +0 -553
  172. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/utils.py +0 -172
  173. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pylib/packaging/version.py +0 -563
  174. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/pyproject.toml +0 -120
  175. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/release-please-config.json +0 -11
  176. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/gyp/test_gyp.py +0 -261
  177. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/Find-VisualStudio.cs +0 -250
  178. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/build.js +0 -227
  179. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/clean.js +0 -15
  180. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/configure.js +0 -328
  181. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/create-config-gypi.js +0 -150
  182. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/download.js +0 -39
  183. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/find-node-directory.js +0 -63
  184. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/find-python.js +0 -310
  185. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/find-visualstudio.js +0 -590
  186. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/install.js +0 -415
  187. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/list.js +0 -26
  188. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/log.js +0 -168
  189. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/node-gyp.js +0 -188
  190. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/process-release.js +0 -146
  191. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/rebuild.js +0 -12
  192. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/remove.js +0 -43
  193. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/lib/util.js +0 -81
  194. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/macOS_Catalina_acid_test.sh +0 -21
  195. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/package.json +0 -51
  196. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/release-please-config.json +0 -40
  197. package/.yarn/unplugged/node-gyp-npm-10.2.0-cad1109948/node_modules/node-gyp/src/win_delay_load_hook.cc +0 -39
  198. package/browser/ops.d.ts +0 -126
  199. package/build/ops.d.ts +0 -126
  200. package/build/ops.js +0 -127
  201. package/coverage/tmp/coverage-31752-1735543485354-0.json +0 -1
  202. package/coverage/tmp/coverage-59920-1735543484555-0.json +0 -1
  203. package/coverage/tmp/coverage-66252-1735543483919-0.json +0 -1
  204. package/coverage/tmp/coverage-68440-1735543485236-0.json +0 -1
  205. package/coverage/tmp/coverage-70588-1735543484426-0.json +0 -1
  206. package/coverage/tmp/coverage-79292-1735543485296-0.json +0 -1
  207. package/coverage/tmp/coverage-80212-1735543483980-0.json +0 -1
package/CHANGELOG.md CHANGED
@@ -1,403 +1,403 @@
1
- # 6.1.6
2
- __fixed__
3
- - Fix sighash treatment when signing taproot script sign scripts using Psbt (#2104)
4
- - Fix error for invalid scripts in toASM (#2097)
5
- - Fix mutation of input to addOutput method on Psbt (#2091)
6
-
7
- # 6.1.5
8
- __fixed__
9
- - Updated bip174 dependency to fix issue with unknownKeyVals. (#1979)
10
-
11
- # 6.1.4
12
- __changed__
13
- - Changed internal usage of the Buffer API to match with newer broken bundlers that don't follow spec. The new usage is still compatible with older versions of Buffer, so there shouldn't be any breakage. The public API interface was not changed. (#1975)
14
-
15
- # 6.1.3
16
- __fixed__
17
- - validateSignaturesOfInput for taproot inputs returned false for valid signatures in specific cases. (#1934)
18
-
19
- # 6.1.2
20
- __fixed__
21
- - validateSignaturesOfInput for taproot inputs returned true for invalid signatures in specific cases. (#1932)
22
-
23
- # 6.1.1
24
- __added__
25
- - add example using BIP86 vector to verify the sending to and from a BIP86 generated taproot address
26
-
27
- __fixed__
28
- - support for 65 byte taproot signature
29
- - prevent the creation of unspendable scripts in bitcoinjs-lib by implementing checks for resource limitations
30
- - use `Buffer.from()` instead of `Buffer.of()`
31
-
32
- __changed__
33
- - performance: precompute the taproot hashes
34
- - performance: switch from `create-hash` and `ripemd160` to noble-hashes
35
-
36
- __removed__
37
- - types: removed unused methods `privateAdd` and `privateNegate` from `TinySecp256k1Interface`
38
-
39
- # 6.1.0
40
- __added__
41
- - taproot support for payments (p2tr) and PSBT. See taproot.spec.ts integration test for examples. (#1742)
42
-
43
- # 6.0.2
44
- __fixed__
45
- - p2sh payment now uses empty Buffer for redeem.output when redeemScript is OP_FALSE (#1802)
46
- - Fix ripemd160 hashing fallback issue (#1812)
47
-
48
- # 6.0.1
49
- - No changes to public API
50
-
51
- # 6.0.0
52
- __removed__
53
- - bip32: Removed the re-export. Please add as dependency to your app instead.
54
- - ECPair: Please use bip32 moving forward. ecpair package was created for those who need it.
55
- - TransactionBuilder: Any internal files used only in TB (classify, templates, etc.) were also removed.
56
-
57
- __added__
58
- - taproot segwit v1 address support (bech32m) via address module (#1676)
59
- - hashForWitnessV1 method on Transaction class (#1745)
60
-
61
- __fixed__
62
- - Transaction version read/write differed. (#1717)
63
-
64
- # 5.2.0
65
- __changed__
66
- - Updated PSBT to allow for witnessUtxo and nonWitnessUtxo simultaneously (Re: segwit psbt bug) (#1563)
67
-
68
- __added__
69
- - PSBT methods `getInputType`, `inputHasPubkey`, `inputHasHDKey`, `outputHasPubkey`, `outputHasHDKey` (#1563)
70
-
71
- # 5.1.10
72
- __fixed__
73
- - Fixed psbt.signInputAsync (and consequentially all Async signing methods) not handling rejection of keypair.sign properly (#1582)
74
-
75
- # 5.1.9
76
- __fixed__
77
- - Fixed errors for psbt.txOutputs getter (#1578)
78
-
79
- # 5.1.8
80
- __fixed__
81
- - Throw errors when p2wsh or p2wpkh contain uncompressed pubkeys (#1573)
82
-
83
- __added__
84
- - Add txInputs and txOutputs for Psbt (#1561)
85
-
86
- __changed__
87
- - (Not exposed) Added BufferWriter to help ease maintenance of certain forks of this library (#1533)
88
-
89
- # 5.1.7
90
- __fixed__
91
- - Fixed Transaction class Output interface typing for TypeScript (#1506)
92
- - Add `weight()` to Block class, add optional includeWitness arg to Transaction byteLength method (#1515)
93
- - Match the old TransactionBuilder behavior of allowing for multiple instances of the same pubkey to be in a p2ms script for PSBT (#1519)
94
-
95
- __added__
96
- - Allow the API consumer to pass in the finalizer functions to allow for any type of transaction to be finalized. It places the most crucial part of transaction construction on the consumer, and should be used with caution. (#1491)
97
-
98
- # 5.1.6
99
- __fixed__
100
- - `PsbtOutputExtended` did not support using the address attribute properly. It is now fixed.
101
-
102
- # 5.1.5
103
- __added__
104
- - `Psbt` now has `getFee(): number` for use when all inputs are finalized. It returns the satoshi fee of the transaction. Calling getFee, getFeeRate, or extractTransaction will cache these values so if you call one after the other, the second call will return immediately.
105
-
106
- # 5.1.4
107
- __changed__
108
- - `Psbt` inputs using segwit scripts can now work with nonWitnessUtxo as well as the original witnessUtxo. The reasoning for this is that nonWitnessUtxo has all the information contained in the witnessUtxo, so rejecting signing even though we have all the info we need is unnecessary. Trying to sign a non-segwit script with a witnessUtxo will still throw an Error as it should.
109
-
110
- # 5.1.3
111
- __changed__
112
- - TypeScript types: Made Signer and SignerAsync use any for network since we only check for equivalence. (#1448)
113
- - TypeScript types: Made the args for addInput and addOutput for Psbt actually accept updateInput and updateOutput parameters. (#1449)
114
-
115
- # 5.1.2
116
- __added__
117
- - `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)
118
-
119
- # 5.1.1
120
- __changed__
121
- - Name inconsistencies for Psbt class. (Quick fix)
122
-
123
- # 5.1.0
124
- __added__
125
- - A new `Psbt` class for creating, distributing, combining, signing, and compiling Transactions (#1425)
126
- - 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)
127
-
128
- __changed__
129
- - `TransactionBuilder`: Migrate to stricter type checks during sign by switching to a single object parameter (#1416)
130
- - `tests`: Use regtest-client as separate library (#1421)
131
-
132
- # 5.0.5
133
- __added__
134
- - Added `ECPairInterface` `Stack` and `StackElement` interfaces to the main index.ts export (TypeScript only affected)
135
-
136
- # 5.0.4
137
- __added__
138
- - low R value support for ECPair, bip32, and TransactionBuilder (default off) via `txb.setLowR()` (#1385)
139
-
140
- __fixed__
141
- - Fixed Various TypeScript types that have been pushed out since v5.0.0 (#1388)
142
-
143
- # 5.0.0
144
- __added__
145
- - TypeScript support (#1319)
146
- - `Block.prototype.checkTxRoots` will check the merkleRoot and witnessCommit if it exists against the transactions array. (e52abec) (0426c66)
147
-
148
- __changed__
149
- - `Transaction.prototype.getHash` now has `forWitness?: boolean` which when true returns the hash for wtxid (a652d04)
150
- - `Block.calculateMerkleRoot` now has `forWitness?: boolean` which when true returns the witness commit (a652d04)
151
-
152
- __removed__
153
- - `Block.prototype.checkMerkleRoot` was removed, please use `checkTxRoots` (0426c66)
154
-
155
- # 4.0.5
156
- __fixed__
157
- - Fixed bug where Angular apps break due to lack of crypto at build time. Reverted #1373 and added (6bead5d).
158
-
159
- # 4.0.4
160
- __fixed__
161
- - Fixed bug where Electron v4 breaks due to lack of `'rmd160'` alias for ripemd160 hash. (#1373)
162
-
163
- # 4.0.3
164
- __fixed__
165
- - Fixed `TransactionBuilder` to require that the Transaction has outputs before signing (#1151)
166
- - Fixed `payments.p2sh`, which now takes the network from the redeem attribute if one is not given in the object argument (#1232)
167
- - Fixed `Block.calculateTarget` to allow for exponents up to 29 (#1285)
168
- - Fixed some low priority rarely occurring bugs with multisig payments and `TransactionBuilder` multisig processing (#1307)
169
-
170
- __added__
171
- - Regtest network object to `networks` (#1261)
172
-
173
- # 4.0.2
174
- __fixed__
175
- - Fixed `TransactionBuilder` not throwing when payment type validation should fail (#1195)
176
-
177
- __removed__
178
- - Removed rogue `package.json` from `src/payments` (#1216)
179
-
180
- # 4.0.1
181
- __fixed__
182
- - Fixed `tiny-secp256k1` dependency version (used `ecurve`) (#1139)
183
- - Fixed `TransactionBuilder` throwing when trying to sign `P2WSH(P2WPKH)` (#1135)
184
-
185
- # 4.0.0
186
- __added__
187
- - Added [`bip32`](https://github.com/bitcoinjs/bip32) dependency as a primary export (#1073)
188
- - Added `ECPair.fromPrivateKey` (#1070)
189
- - Added `payments` export, with support for `p2pkh`, `p2pk`, `p2ms`, `p2sh`, `p2wpkh`, `p2wsh` and `embed` payment types (#1096, #1119)
190
- - Added `script.signature.encode/decode` for script signatures (#459)
191
-
192
- __changed__
193
- - `ECPair.prototype.sign` now returns a 64-byte signature `Buffer`, not an `ECSignature` object (#1084)
194
- - `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)
195
- - `TransactionBuilder` internal variables are now `__` prefixed to discourage public usage (#1038)
196
- - `TransactionBuilder` now defaults to version 2 transaction versions (#1036)
197
- - `script.decompile` now returns `[Buffer]` or `null`, if decompilation failed (#1039)
198
-
199
- __fixed__
200
- - Fixed `TransactionBuilder` rejecting uncompressed public keys to comply with BIP143 (#987)
201
-
202
- __removed__
203
- - Removed Node 4/5 LTS support (#1080)
204
- - Removed `ECPair.fromPublicKeyBuffer`, use `ECPair.fromPublicKey` (#1070)
205
- - Removed `ECPair.prototype.getAddress`, use `payments.p2pkh` instead (#1085)
206
- - Removed `ECPair.prototype.getPrivateKey`, use `ECPair.prototype.privateKey` property (#1070)
207
- - Removed `ECPair.prototype.getPublicKey`, use `ECPair.prototype.publicKey` property (#1070)
208
- - Removed `ECPair.prototype.getNetwork`, use `ECPair.prototype.network` property (#1070)
209
- - Removed `ECSignature`, use `script.signature.encode/decode` instead (#459)
210
- - Removed `HDNode`, use `bip32` export instead (#1073)
211
- - Removed `bufferutils` (#1035)
212
- - Removed `networks.litecoin`, BYO non-Bitcoin networks instead (#1095)
213
- - Removed `script.isCanonicalSignature`, use `script.isCanonicalScriptSignature` instead (#1094)
214
- - Removed `script.*.input/output/check` functions (`templates`), use `payments.*` instead (`templates` previously added in #681, #682) (#1119)
215
- - Removed dependency `bigi`, uses `bn.js` internally now (via `tiny-secp256k1`) (#1070, #1112)
216
- - Removed public access to `ECPair` constructor, use exported functions `ECPair.fromPrivateKey`, `ECPair.fromWIF`, `ECPair.makeRandom`, or `ECPair.fromPublicKey` (#1070)
217
-
218
- # 3.3.2
219
- __fixed__
220
- - Fixed `decodeStack` arbitrarily supporting non-Array arguments (#942)
221
-
222
- # 3.3.1
223
- __changed__
224
- - Increased the `TransactionBuilder` `maximumFeeRate` from 1000 to 2500 satoshis/byte. (#931)
225
-
226
- # 3.3.0
227
- __added__
228
- - Added `ECSignature.prototype.toRSBuffer`/`ECSignature.fromRSBuffer` (#915)
229
- - Added support to `TransactionBuilder` for 64-byte signatures via `.sign` (#915)
230
- - Added support to `TransactionBuilder` for the `.publicKey` standard as an alternative to `.getPublicKey()` (#915)
231
-
232
- # 3.2.1
233
- __fixed__
234
- - Fixed `script.scripthash.input.check` recursion (#898)
235
- - Fixed `TransactionBuilder` sometimes ignoring witness value (#901)
236
- - Fixed `script.witnessScriptHash.input` implementation (previously used the P2SH impl.) (#911)
237
-
238
- # 3.2.0
239
- __added__
240
- - Added `address.fromBech32/toBech32` (#846)
241
-
242
- # 3.1.0
243
- __added__
244
- - Added `Transaction.prototype.virtualSize` (#811)
245
- - Added `Transaction.prototype.weight` (#811)
246
-
247
- # 3.0.0
248
- From this release users can expect out-of-the-box Segregated Witness support.
249
- The majority of breaking changes have been in how `script` encoding/decoding occurs, with the introduction of witness stacks.
250
-
251
- __added__
252
- - Added `script.types` enums (#679)
253
- - Added `script.*.*.{check,encode,decode[,encodeStack,decodeStack]}` functions (#681, #682)
254
- - Added minimal `TransactionBuilder.prototype.build` absurd fee-safety (#696)
255
- - Added `script.(decompile/compile)PushOnly` and `script.toStack` functions (#700)
256
- - Added `Transaction.prototype.toBuffer` Segregated Witness serialization support (#684, #701)
257
- - Added `Transaction.prototype.hasWitnesses` (#718)
258
- - Added `script.witnessCommitment.*` template
259
- - Added `TransactionBuilder.prototype.sign` now has two additional parameters, `witnessValue`, and `witnessScript`
260
- - Added `Transaction.hashForWitnessV0` and `Transaction.setWitness` (5c2fdb60436714f18440dc709f0be065928c1e49)
261
-
262
- __fixed__
263
- - Fixed `script` must compile minimally (#638)
264
- - Fixed `Transaction` and `Block` versions should be Int32, signed integers (#662)
265
-
266
- __removed__
267
- - Removed `ecdsa.calcPubKeyRecoveryParam`, `ecdsa.recoverPubKey` (#456)
268
- - Removed `buffer-equals`/`buffer-compare` dependencies (#650)
269
- - Removed `HDNode.prototype.toString` (#665)
270
- - Removed `dogecoin` network (#675)
271
- - Removed `message` export, moved to [`bitcoinjs-message`](https://github.com/bitcoinjs/bitcoinjs-message) (#456)
272
-
273
- __renamed__
274
- - Removed `script.*` functions in favour of `bitcoin.script.*.(input/output).(encode/decode/check)` style (#682)
275
-
276
- # 2.3.0
277
- __added__
278
- - Added `HDNode.prototype.isNeutered` (#536)
279
- - Added `HDNode.prototype.derivePath` (#538)
280
- - Added typeforce checking for `HDNode.prototype.derive*` (#539)
281
- - Added `Transaction.prototype.isCoinbase` (#578)
282
- - Added `Block.prototype.checkMerkleRoot` (#580)
283
- - Added `Block.calculateMerkleRoot` (#580)
284
- - Added `TransactionBuilder.prototype.setVersion` (#599)
285
- - Added `script.isWitnessPubKeyHashOutput` (#602)
286
- - Added `script.isWitnessScriptHashOutput` (#602)
287
- - Added `script.witnessPubKeyHashOutput` (#602)
288
- - Added `script.witnessScriptHashOutput` (#602)
289
- - Added `script.witnessScriptHashInput` (#602)
290
-
291
- __fixed__
292
- - Fixed "BIP32 is undefined" when network list given to `HDNode` but no compatible version found (#550)
293
- - Fixed `writePushDataInt` output to adhere to minimal data push policy (#617)
294
-
295
-
296
- # 2.2.0
297
- __added__
298
- - Added `Block.calculateTarget` for difficulty calculations (#509)
299
- - Added `Block.prototype.checkProofOfWork` (#509)
300
- - Added `opcodes.OP_CHECKLOCKTIMEVERIFY` alias for `OP_NOP2` (#511)
301
- - Added `script.number.[encode/decode]` for CScriptNum-encoded `Buffer`s (#516)
302
- - Added `TransactionBuilder.prototype.setLockTime` (#507)
303
-
304
- __fixed__
305
- - Bumped `typeforce` version to fix erroneous error message from `types.Hash*bit` types (#534)
306
-
307
-
308
- # 2.1.4
309
- __fixed__
310
- - script.isPubKeyHashOutput and script.isScriptHashOutput no longer allow for non-minimal data pushes (per bitcoin/bitcoin `IsStandard` policy) (#499)
311
- - TransactionBuilder.addOutput now allows for SIGHASH_SINGLE, throwing if the contract is violated (#504)
312
- - remove use of `const`, use ES5 only (#502)
313
-
314
-
315
- # 2.1.3
316
- __fixed__
317
- - Bumped typeforce to 1.5.5 (see #493)
318
-
319
-
320
- # 2.1.2
321
- __fixed__
322
- - Add missing CHANGELOG entry for 2.1.1
323
-
324
-
325
- # 2.1.1
326
- __changed__
327
- - removed use of `buffer-reverse`, dependency only kept for `bufferutils.reverse`, to be deprecated (#478)
328
-
329
- __fixed__
330
- - `isMultisigOutput` no longer allows data chunks for `m`/`n` (#482)
331
- - `isMultisigOutput`'s `n` value must now match the number of public keys (as per bitcoin/bitcoin) (#484)
332
-
333
-
334
- # 2.1.0
335
- From this release users should use the HDNode directly (compared to accessing `.keyPair`) when performing ECDSA operations such as `sign` or `verify`.
336
- Ideally you shoud not have to directly access `HDNode` internals for general usage, as it can often be confusing and error prone.
337
-
338
- __added__
339
- - `ECPair.prototype.getNetwork`
340
- - `HDNode.prototype.getNetwork`, wraps the underlying keyPair's `getNetwork` method
341
- - `HDNode.prototype.getPublicKeyBuffer`, wraps the underlying keyPair's `getPublicKeyBuffer` method
342
- - `HDNode.prototype.sign`, wraps the underlying keyPair's `sign` method
343
- - `HDNode.prototype.verify`, wraps the underlying keyPair's `verify` method
344
-
345
-
346
- # 2.0.0
347
- 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.
348
-
349
- 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.
350
- Several other cumbersome modules have been removed, with their new independent modules recommended for usage instead for greater modularity in your projects.
351
-
352
- -----------------------------
353
-
354
- Backward incompatible changes:
355
-
356
- __added__
357
- - 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
358
- - 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
359
- - export `ECPair`, a merged replacement for `ECKey`/`ECPubKey`, invalid types will throw via `typeforce`
360
-
361
- __changed__
362
- - `address.toOutputScript`, `ECPair.prototype.fromWIF` and `HDNode.prototype.fromBase58` no longer automatically detect the network, `networks.bitcoin` is always assumed unless given.
363
- - `assert` was used for type checking, now replaced by `typeforce`
364
- - `BIP66` compliant strict DER signature validation was added to `ECSignature.fromDER`, changing the exact exception messages slightly, see #448.
365
-
366
- - `new HDNode(d/Q, chainCode, network)` -> `new HDNode(keyPair, chainCode)`, now uses `ECPair`
367
- - `HDNode.prototype.toBase58(false)` -> `HDNode.prototype.neutered().toBase58()` for exporting an extended public key
368
- - `HDNode.prototype.toBase58(true)` -> `HDNode.prototype.toBase58()` for exporting an extended private key
369
-
370
- - `Transaction.prototype.hashForSignature(prevOutScript, inIndex, hashType)` -> `Transaction.prototype.hashForSignature(inIndex, prevOutScript, hashType)`
371
- - `Transaction.prototype.addInput(hash, ...)`: `hash` could be a string, Transaction or Buffer -> `hash` can now **only** be a `Buffer`.
372
- - `Transaction.prototype.addOutput(scriptPubKey, ...)`: `scriptPubKey ` could be a string, `Address` or a `Buffer` -> `scriptPubKey` can now **only** be a `Buffer`.
373
- - `TransactionBuilder` API unchanged.
374
-
375
- __removed__
376
- - export `Address`, `strings` are now used, benchwith no performance loss for most use cases
377
- - export `base58check`, use [`bs58check`](https://github.com/bitcoinjs/bs58check) instead
378
- - export `ecdsa`, use [`ecurve`](https://github.com/cryptocoinjs/ecurve) instead
379
- - export `ECKey`, use new export `ECPair` instead
380
- - export `ECPubKey`, use new export `ECPair` instead
381
- - export `Wallet`, see README.md#complementing-libraries instead
382
- - export `Script`, use new utility export `script` instead (#438 for more information)
383
-
384
- - `crypto.HmacSHA256 `, use [node crypto](https://nodejs.org/api/crypto.html) instead
385
- - `crypto.HmacSHA512 `, use [node crypto](https://nodejs.org/api/crypto.html) instead
386
-
387
- - `Transaction.prototype.sign`, use `TransactionBuilder.prototype.sign`
388
- - `Transaction.prototype.signInput`, use `TransactionBuilder.prototype.sign`
389
- - `Transaction.prototype.validateInput`, use `Transaction.prototype.hashForSignature` and `ECPair.verify`
390
-
391
- - `HDNode.fromBuffer`, use `HDNode.fromBase58` instead
392
- - `HDNode.fromHex`, use `HDNode.fromBase58` instead
393
- - `HDNode.toBuffer`, use `HDNode.prototype.toBase58` instead
394
- - `HDNode.toHex`, use `HDNode.prototype.toBase58` instead
395
-
396
- - `networks.*.magic`, see the comment [here](https://github.com/bitcoinjs/bitcoinjs-lib/pull/432/files#r36715792)
397
- - `networks.[viacoin|viacointestnet|gamerscoin|jumbucks|zetacoin]`, import these yourself (see #383/a0e6ee7)
398
- - `networks.*.estimateFee`, out-dated
399
-
400
- __renamed__
401
- - `Message` -> `message`
402
- - `scripts` -> `script`
403
- - `scripts.dataOutput ` -> `script.nullDataOutput` (per [convention](https://org/en/glossary/null-data-transaction))
1
+ # 6.1.6
2
+ __fixed__
3
+ - Fix sighash treatment when signing taproot script sign scripts using Psbt (#2104)
4
+ - Fix error for invalid scripts in toASM (#2097)
5
+ - Fix mutation of input to addOutput method on Psbt (#2091)
6
+
7
+ # 6.1.5
8
+ __fixed__
9
+ - Updated bip174 dependency to fix issue with unknownKeyVals. (#1979)
10
+
11
+ # 6.1.4
12
+ __changed__
13
+ - Changed internal usage of the Buffer API to match with newer broken bundlers that don't follow spec. The new usage is still compatible with older versions of Buffer, so there shouldn't be any breakage. The public API interface was not changed. (#1975)
14
+
15
+ # 6.1.3
16
+ __fixed__
17
+ - validateSignaturesOfInput for taproot inputs returned false for valid signatures in specific cases. (#1934)
18
+
19
+ # 6.1.2
20
+ __fixed__
21
+ - validateSignaturesOfInput for taproot inputs returned true for invalid signatures in specific cases. (#1932)
22
+
23
+ # 6.1.1
24
+ __added__
25
+ - add example using BIP86 vector to verify the sending to and from a BIP86 generated taproot address
26
+
27
+ __fixed__
28
+ - support for 65 byte taproot signature
29
+ - prevent the creation of unspendable scripts in bitcoinjs-lib by implementing checks for resource limitations
30
+ - use `Buffer.from()` instead of `Buffer.of()`
31
+
32
+ __changed__
33
+ - performance: precompute the taproot hashes
34
+ - performance: switch from `create-hash` and `ripemd160` to noble-hashes
35
+
36
+ __removed__
37
+ - types: removed unused methods `privateAdd` and `privateNegate` from `TinySecp256k1Interface`
38
+
39
+ # 6.1.0
40
+ __added__
41
+ - taproot support for payments (p2tr) and PSBT. See taproot.spec.ts integration test for examples. (#1742)
42
+
43
+ # 6.0.2
44
+ __fixed__
45
+ - p2sh payment now uses empty Buffer for redeem.output when redeemScript is OP_FALSE (#1802)
46
+ - Fix ripemd160 hashing fallback issue (#1812)
47
+
48
+ # 6.0.1
49
+ - No changes to public API
50
+
51
+ # 6.0.0
52
+ __removed__
53
+ - bip32: Removed the re-export. Please add as dependency to your app instead.
54
+ - ECPair: Please use bip32 moving forward. ecpair package was created for those who need it.
55
+ - TransactionBuilder: Any internal files used only in TB (classify, templates, etc.) were also removed.
56
+
57
+ __added__
58
+ - taproot segwit v1 address support (bech32m) via address module (#1676)
59
+ - hashForWitnessV1 method on Transaction class (#1745)
60
+
61
+ __fixed__
62
+ - Transaction version read/write differed. (#1717)
63
+
64
+ # 5.2.0
65
+ __changed__
66
+ - Updated PSBT to allow for witnessUtxo and nonWitnessUtxo simultaneously (Re: segwit psbt bug) (#1563)
67
+
68
+ __added__
69
+ - PSBT methods `getInputType`, `inputHasPubkey`, `inputHasHDKey`, `outputHasPubkey`, `outputHasHDKey` (#1563)
70
+
71
+ # 5.1.10
72
+ __fixed__
73
+ - Fixed psbt.signInputAsync (and consequentially all Async signing methods) not handling rejection of keypair.sign properly (#1582)
74
+
75
+ # 5.1.9
76
+ __fixed__
77
+ - Fixed errors for psbt.txOutputs getter (#1578)
78
+
79
+ # 5.1.8
80
+ __fixed__
81
+ - Throw errors when p2wsh or p2wpkh contain uncompressed pubkeys (#1573)
82
+
83
+ __added__
84
+ - Add txInputs and txOutputs for Psbt (#1561)
85
+
86
+ __changed__
87
+ - (Not exposed) Added BufferWriter to help ease maintenance of certain forks of this library (#1533)
88
+
89
+ # 5.1.7
90
+ __fixed__
91
+ - Fixed Transaction class Output interface typing for TypeScript (#1506)
92
+ - Add `weight()` to Block class, add optional includeWitness arg to Transaction byteLength method (#1515)
93
+ - Match the old TransactionBuilder behavior of allowing for multiple instances of the same pubkey to be in a p2ms script for PSBT (#1519)
94
+
95
+ __added__
96
+ - Allow the API consumer to pass in the finalizer functions to allow for any type of transaction to be finalized. It places the most crucial part of transaction construction on the consumer, and should be used with caution. (#1491)
97
+
98
+ # 5.1.6
99
+ __fixed__
100
+ - `PsbtOutputExtended` did not support using the address attribute properly. It is now fixed.
101
+
102
+ # 5.1.5
103
+ __added__
104
+ - `Psbt` now has `getFee(): number` for use when all inputs are finalized. It returns the satoshi fee of the transaction. Calling getFee, getFeeRate, or extractTransaction will cache these values so if you call one after the other, the second call will return immediately.
105
+
106
+ # 5.1.4
107
+ __changed__
108
+ - `Psbt` inputs using segwit scripts can now work with nonWitnessUtxo as well as the original witnessUtxo. The reasoning for this is that nonWitnessUtxo has all the information contained in the witnessUtxo, so rejecting signing even though we have all the info we need is unnecessary. Trying to sign a non-segwit script with a witnessUtxo will still throw an Error as it should.
109
+
110
+ # 5.1.3
111
+ __changed__
112
+ - TypeScript types: Made Signer and SignerAsync use any for network since we only check for equivalence. (#1448)
113
+ - TypeScript types: Made the args for addInput and addOutput for Psbt actually accept updateInput and updateOutput parameters. (#1449)
114
+
115
+ # 5.1.2
116
+ __added__
117
+ - `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)
118
+
119
+ # 5.1.1
120
+ __changed__
121
+ - Name inconsistencies for Psbt class. (Quick fix)
122
+
123
+ # 5.1.0
124
+ __added__
125
+ - A new `Psbt` class for creating, distributing, combining, signing, and compiling Transactions (#1425)
126
+ - 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)
127
+
128
+ __changed__
129
+ - `TransactionBuilder`: Migrate to stricter type checks during sign by switching to a single object parameter (#1416)
130
+ - `tests`: Use regtest-client as separate library (#1421)
131
+
132
+ # 5.0.5
133
+ __added__
134
+ - Added `ECPairInterface` `Stack` and `StackElement` interfaces to the main index.ts export (TypeScript only affected)
135
+
136
+ # 5.0.4
137
+ __added__
138
+ - low R value support for ECPair, bip32, and TransactionBuilder (default off) via `txb.setLowR()` (#1385)
139
+
140
+ __fixed__
141
+ - Fixed Various TypeScript types that have been pushed out since v5.0.0 (#1388)
142
+
143
+ # 5.0.0
144
+ __added__
145
+ - TypeScript support (#1319)
146
+ - `Block.prototype.checkTxRoots` will check the merkleRoot and witnessCommit if it exists against the transactions array. (e52abec) (0426c66)
147
+
148
+ __changed__
149
+ - `Transaction.prototype.getHash` now has `forWitness?: boolean` which when true returns the hash for wtxid (a652d04)
150
+ - `Block.calculateMerkleRoot` now has `forWitness?: boolean` which when true returns the witness commit (a652d04)
151
+
152
+ __removed__
153
+ - `Block.prototype.checkMerkleRoot` was removed, please use `checkTxRoots` (0426c66)
154
+
155
+ # 4.0.5
156
+ __fixed__
157
+ - Fixed bug where Angular apps break due to lack of crypto at build time. Reverted #1373 and added (6bead5d).
158
+
159
+ # 4.0.4
160
+ __fixed__
161
+ - Fixed bug where Electron v4 breaks due to lack of `'rmd160'` alias for ripemd160 hash. (#1373)
162
+
163
+ # 4.0.3
164
+ __fixed__
165
+ - Fixed `TransactionBuilder` to require that the Transaction has outputs before signing (#1151)
166
+ - Fixed `payments.p2sh`, which now takes the network from the redeem attribute if one is not given in the object argument (#1232)
167
+ - Fixed `Block.calculateTarget` to allow for exponents up to 29 (#1285)
168
+ - Fixed some low priority rarely occurring bugs with multisig payments and `TransactionBuilder` multisig processing (#1307)
169
+
170
+ __added__
171
+ - Regtest network object to `networks` (#1261)
172
+
173
+ # 4.0.2
174
+ __fixed__
175
+ - Fixed `TransactionBuilder` not throwing when payment type validation should fail (#1195)
176
+
177
+ __removed__
178
+ - Removed rogue `package.json` from `src/payments` (#1216)
179
+
180
+ # 4.0.1
181
+ __fixed__
182
+ - Fixed `tiny-secp256k1` dependency version (used `ecurve`) (#1139)
183
+ - Fixed `TransactionBuilder` throwing when trying to sign `P2WSH(P2WPKH)` (#1135)
184
+
185
+ # 4.0.0
186
+ __added__
187
+ - Added [`bip32`](https://github.com/bitcoinjs/bip32) dependency as a primary export (#1073)
188
+ - Added `ECPair.fromPrivateKey` (#1070)
189
+ - Added `payments` export, with support for `p2pkh`, `p2pk`, `p2ms`, `p2sh`, `p2wpkh`, `p2wsh` and `embed` payment types (#1096, #1119)
190
+ - Added `script.signature.encode/decode` for script signatures (#459)
191
+
192
+ __changed__
193
+ - `ECPair.prototype.sign` now returns a 64-byte signature `Buffer`, not an `ECSignature` object (#1084)
194
+ - `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)
195
+ - `TransactionBuilder` internal variables are now `__` prefixed to discourage public usage (#1038)
196
+ - `TransactionBuilder` now defaults to version 2 transaction versions (#1036)
197
+ - `script.decompile` now returns `[Buffer]` or `null`, if decompilation failed (#1039)
198
+
199
+ __fixed__
200
+ - Fixed `TransactionBuilder` rejecting uncompressed public keys to comply with BIP143 (#987)
201
+
202
+ __removed__
203
+ - Removed Node 4/5 LTS support (#1080)
204
+ - Removed `ECPair.fromPublicKeyBuffer`, use `ECPair.fromPublicKey` (#1070)
205
+ - Removed `ECPair.prototype.getAddress`, use `payments.p2pkh` instead (#1085)
206
+ - Removed `ECPair.prototype.getPrivateKey`, use `ECPair.prototype.privateKey` property (#1070)
207
+ - Removed `ECPair.prototype.getPublicKey`, use `ECPair.prototype.publicKey` property (#1070)
208
+ - Removed `ECPair.prototype.getNetwork`, use `ECPair.prototype.network` property (#1070)
209
+ - Removed `ECSignature`, use `script.signature.encode/decode` instead (#459)
210
+ - Removed `HDNode`, use `bip32` export instead (#1073)
211
+ - Removed `bufferutils` (#1035)
212
+ - Removed `networks.litecoin`, BYO non-Bitcoin networks instead (#1095)
213
+ - Removed `script.isCanonicalSignature`, use `script.isCanonicalScriptSignature` instead (#1094)
214
+ - Removed `script.*.input/output/check` functions (`templates`), use `payments.*` instead (`templates` previously added in #681, #682) (#1119)
215
+ - Removed dependency `bigi`, uses `bn.js` internally now (via `tiny-secp256k1`) (#1070, #1112)
216
+ - Removed public access to `ECPair` constructor, use exported functions `ECPair.fromPrivateKey`, `ECPair.fromWIF`, `ECPair.makeRandom`, or `ECPair.fromPublicKey` (#1070)
217
+
218
+ # 3.3.2
219
+ __fixed__
220
+ - Fixed `decodeStack` arbitrarily supporting non-Array arguments (#942)
221
+
222
+ # 3.3.1
223
+ __changed__
224
+ - Increased the `TransactionBuilder` `maximumFeeRate` from 1000 to 2500 satoshis/byte. (#931)
225
+
226
+ # 3.3.0
227
+ __added__
228
+ - Added `ECSignature.prototype.toRSBuffer`/`ECSignature.fromRSBuffer` (#915)
229
+ - Added support to `TransactionBuilder` for 64-byte signatures via `.sign` (#915)
230
+ - Added support to `TransactionBuilder` for the `.publicKey` standard as an alternative to `.getPublicKey()` (#915)
231
+
232
+ # 3.2.1
233
+ __fixed__
234
+ - Fixed `script.scripthash.input.check` recursion (#898)
235
+ - Fixed `TransactionBuilder` sometimes ignoring witness value (#901)
236
+ - Fixed `script.witnessScriptHash.input` implementation (previously used the P2SH impl.) (#911)
237
+
238
+ # 3.2.0
239
+ __added__
240
+ - Added `address.fromBech32/toBech32` (#846)
241
+
242
+ # 3.1.0
243
+ __added__
244
+ - Added `Transaction.prototype.virtualSize` (#811)
245
+ - Added `Transaction.prototype.weight` (#811)
246
+
247
+ # 3.0.0
248
+ From this release users can expect out-of-the-box Segregated Witness support.
249
+ The majority of breaking changes have been in how `script` encoding/decoding occurs, with the introduction of witness stacks.
250
+
251
+ __added__
252
+ - Added `script.types` enums (#679)
253
+ - Added `script.*.*.{check,encode,decode[,encodeStack,decodeStack]}` functions (#681, #682)
254
+ - Added minimal `TransactionBuilder.prototype.build` absurd fee-safety (#696)
255
+ - Added `script.(decompile/compile)PushOnly` and `script.toStack` functions (#700)
256
+ - Added `Transaction.prototype.toBuffer` Segregated Witness serialization support (#684, #701)
257
+ - Added `Transaction.prototype.hasWitnesses` (#718)
258
+ - Added `script.witnessCommitment.*` template
259
+ - Added `TransactionBuilder.prototype.sign` now has two additional parameters, `witnessValue`, and `witnessScript`
260
+ - Added `Transaction.hashForWitnessV0` and `Transaction.setWitness` (5c2fdb60436714f18440dc709f0be065928c1e49)
261
+
262
+ __fixed__
263
+ - Fixed `script` must compile minimally (#638)
264
+ - Fixed `Transaction` and `Block` versions should be Int32, signed integers (#662)
265
+
266
+ __removed__
267
+ - Removed `ecdsa.calcPubKeyRecoveryParam`, `ecdsa.recoverPubKey` (#456)
268
+ - Removed `buffer-equals`/`buffer-compare` dependencies (#650)
269
+ - Removed `HDNode.prototype.toString` (#665)
270
+ - Removed `dogecoin` network (#675)
271
+ - Removed `message` export, moved to [`bitcoinjs-message`](https://github.com/bitcoinjs/bitcoinjs-message) (#456)
272
+
273
+ __renamed__
274
+ - Removed `script.*` functions in favour of `bitcoin.script.*.(input/output).(encode/decode/check)` style (#682)
275
+
276
+ # 2.3.0
277
+ __added__
278
+ - Added `HDNode.prototype.isNeutered` (#536)
279
+ - Added `HDNode.prototype.derivePath` (#538)
280
+ - Added typeforce checking for `HDNode.prototype.derive*` (#539)
281
+ - Added `Transaction.prototype.isCoinbase` (#578)
282
+ - Added `Block.prototype.checkMerkleRoot` (#580)
283
+ - Added `Block.calculateMerkleRoot` (#580)
284
+ - Added `TransactionBuilder.prototype.setVersion` (#599)
285
+ - Added `script.isWitnessPubKeyHashOutput` (#602)
286
+ - Added `script.isWitnessScriptHashOutput` (#602)
287
+ - Added `script.witnessPubKeyHashOutput` (#602)
288
+ - Added `script.witnessScriptHashOutput` (#602)
289
+ - Added `script.witnessScriptHashInput` (#602)
290
+
291
+ __fixed__
292
+ - Fixed "BIP32 is undefined" when network list given to `HDNode` but no compatible version found (#550)
293
+ - Fixed `writePushDataInt` output to adhere to minimal data push policy (#617)
294
+
295
+
296
+ # 2.2.0
297
+ __added__
298
+ - Added `Block.calculateTarget` for difficulty calculations (#509)
299
+ - Added `Block.prototype.checkProofOfWork` (#509)
300
+ - Added `opcodes.OP_CHECKLOCKTIMEVERIFY` alias for `OP_NOP2` (#511)
301
+ - Added `script.number.[encode/decode]` for CScriptNum-encoded `Buffer`s (#516)
302
+ - Added `TransactionBuilder.prototype.setLockTime` (#507)
303
+
304
+ __fixed__
305
+ - Bumped `typeforce` version to fix erroneous error message from `types.Hash*bit` types (#534)
306
+
307
+
308
+ # 2.1.4
309
+ __fixed__
310
+ - script.isPubKeyHashOutput and script.isScriptHashOutput no longer allow for non-minimal data pushes (per bitcoin/bitcoin `IsStandard` policy) (#499)
311
+ - TransactionBuilder.addOutput now allows for SIGHASH_SINGLE, throwing if the contract is violated (#504)
312
+ - remove use of `const`, use ES5 only (#502)
313
+
314
+
315
+ # 2.1.3
316
+ __fixed__
317
+ - Bumped typeforce to 1.5.5 (see #493)
318
+
319
+
320
+ # 2.1.2
321
+ __fixed__
322
+ - Add missing CHANGELOG entry for 2.1.1
323
+
324
+
325
+ # 2.1.1
326
+ __changed__
327
+ - removed use of `buffer-reverse`, dependency only kept for `bufferutils.reverse`, to be deprecated (#478)
328
+
329
+ __fixed__
330
+ - `isMultisigOutput` no longer allows data chunks for `m`/`n` (#482)
331
+ - `isMultisigOutput`'s `n` value must now match the number of public keys (as per bitcoin/bitcoin) (#484)
332
+
333
+
334
+ # 2.1.0
335
+ From this release users should use the HDNode directly (compared to accessing `.keyPair`) when performing ECDSA operations such as `sign` or `verify`.
336
+ Ideally you shoud not have to directly access `HDNode` internals for general usage, as it can often be confusing and error prone.
337
+
338
+ __added__
339
+ - `ECPair.prototype.getNetwork`
340
+ - `HDNode.prototype.getNetwork`, wraps the underlying keyPair's `getNetwork` method
341
+ - `HDNode.prototype.getPublicKeyBuffer`, wraps the underlying keyPair's `getPublicKeyBuffer` method
342
+ - `HDNode.prototype.sign`, wraps the underlying keyPair's `sign` method
343
+ - `HDNode.prototype.verify`, wraps the underlying keyPair's `verify` method
344
+
345
+
346
+ # 2.0.0
347
+ 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.
348
+
349
+ 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.
350
+ Several other cumbersome modules have been removed, with their new independent modules recommended for usage instead for greater modularity in your projects.
351
+
352
+ -----------------------------
353
+
354
+ Backward incompatible changes:
355
+
356
+ __added__
357
+ - 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
358
+ - 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
359
+ - export `ECPair`, a merged replacement for `ECKey`/`ECPubKey`, invalid types will throw via `typeforce`
360
+
361
+ __changed__
362
+ - `address.toOutputScript`, `ECPair.prototype.fromWIF` and `HDNode.prototype.fromBase58` no longer automatically detect the network, `networks.bitcoin` is always assumed unless given.
363
+ - `assert` was used for type checking, now replaced by `typeforce`
364
+ - `BIP66` compliant strict DER signature validation was added to `ECSignature.fromDER`, changing the exact exception messages slightly, see #448.
365
+
366
+ - `new HDNode(d/Q, chainCode, network)` -> `new HDNode(keyPair, chainCode)`, now uses `ECPair`
367
+ - `HDNode.prototype.toBase58(false)` -> `HDNode.prototype.neutered().toBase58()` for exporting an extended public key
368
+ - `HDNode.prototype.toBase58(true)` -> `HDNode.prototype.toBase58()` for exporting an extended private key
369
+
370
+ - `Transaction.prototype.hashForSignature(prevOutScript, inIndex, hashType)` -> `Transaction.prototype.hashForSignature(inIndex, prevOutScript, hashType)`
371
+ - `Transaction.prototype.addInput(hash, ...)`: `hash` could be a string, Transaction or Buffer -> `hash` can now **only** be a `Buffer`.
372
+ - `Transaction.prototype.addOutput(scriptPubKey, ...)`: `scriptPubKey ` could be a string, `Address` or a `Buffer` -> `scriptPubKey` can now **only** be a `Buffer`.
373
+ - `TransactionBuilder` API unchanged.
374
+
375
+ __removed__
376
+ - export `Address`, `strings` are now used, benchwith no performance loss for most use cases
377
+ - export `base58check`, use [`bs58check`](https://github.com/bitcoinjs/bs58check) instead
378
+ - export `ecdsa`, use [`ecurve`](https://github.com/cryptocoinjs/ecurve) instead
379
+ - export `ECKey`, use new export `ECPair` instead
380
+ - export `ECPubKey`, use new export `ECPair` instead
381
+ - export `Wallet`, see README.md#complementing-libraries instead
382
+ - export `Script`, use new utility export `script` instead (#438 for more information)
383
+
384
+ - `crypto.HmacSHA256 `, use [node crypto](https://nodejs.org/api/crypto.html) instead
385
+ - `crypto.HmacSHA512 `, use [node crypto](https://nodejs.org/api/crypto.html) instead
386
+
387
+ - `Transaction.prototype.sign`, use `TransactionBuilder.prototype.sign`
388
+ - `Transaction.prototype.signInput`, use `TransactionBuilder.prototype.sign`
389
+ - `Transaction.prototype.validateInput`, use `Transaction.prototype.hashForSignature` and `ECPair.verify`
390
+
391
+ - `HDNode.fromBuffer`, use `HDNode.fromBase58` instead
392
+ - `HDNode.fromHex`, use `HDNode.fromBase58` instead
393
+ - `HDNode.toBuffer`, use `HDNode.prototype.toBase58` instead
394
+ - `HDNode.toHex`, use `HDNode.prototype.toBase58` instead
395
+
396
+ - `networks.*.magic`, see the comment [here](https://github.com/bitcoinjs/bitcoinjs-lib/pull/432/files#r36715792)
397
+ - `networks.[viacoin|viacointestnet|gamerscoin|jumbucks|zetacoin]`, import these yourself (see #383/a0e6ee7)
398
+ - `networks.*.estimateFee`, out-dated
399
+
400
+ __renamed__
401
+ - `Message` -> `message`
402
+ - `scripts` -> `script`
403
+ - `scripts.dataOutput ` -> `script.nullDataOutput` (per [convention](https://org/en/glossary/null-data-transaction))