@@ -6,6 +6,140 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
(modification: no type change headlines) and this project adheres to
7
7
[ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
8
8
9
+ ## [ 7.0.0] - 2020-04-30
10
+
11
+ This release comes with significant changes to the API, updated versions of
12
+ the core crypto libraries and substantial developer improvements in the form
13
+ of a refactored test suite and API documentation.
14
+
15
+ ### API Changes
16
+
17
+ Changes to the API have been discussed in Issue
18
+ [ #172 ] ( https://github.com/ethereumjs/ethereumjs-util/issues/172 ) and are
19
+ guided by the principles of:
20
+
21
+ - Make the API more typestrict
22
+ - Be less ambiguous regarding accepted values
23
+ - Avoid implicit type conversions
24
+ - Be more explicit on wrong input (just: throw)
25
+
26
+ While the implemented changes come with some additional need for manual type
27
+ conversions depending on the usage context, they should finally lead to
28
+ cleaner usage patterns on the cosuming side and a more predictable, robust and
29
+ less error-prone control flow.
30
+
31
+ Some note: for methods where ` Buffer ` usage is now enforced you can use the
32
+ ` Bytes.toBuffer() ` method for conversion.
33
+
34
+ #### Account Module
35
+
36
+ ##### Enforced Hex Prefixing for Address Strings
37
+
38
+ PR: [ #241 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/241 )
39
+
40
+ Hex prefixing is now enforced for all address string inputs and functions
41
+ will throw if a non-hex string is provided:
42
+
43
+ - ` Account.isValidAddress() `
44
+ - ` Account.isZeroAddress() `
45
+ - ` Account.toChecksumAddress() `
46
+ - ` Account.isValidChecksumAddress() `
47
+
48
+ The ` Account.isPrecompile() ` method was removed from the code base,
49
+ PR [ #242 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/242 )
50
+
51
+ ##### Enforce Buffer Inputs for Account Methods
52
+
53
+ PR: [ #245 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/245 )
54
+
55
+ Implicit ` Buffer ` conversions for the following methods have been removed
56
+ and ` Buffer ` inputs are now enforced:
57
+
58
+ - ` Account.generateAddress() `
59
+ - ` Account.generateAddress2() `
60
+ - ` Account.pubToAddress() `
61
+ - ` AccountprivateToPublic() `
62
+ - ` AccountimportPublic() `
63
+
64
+ #### Bytes Module
65
+
66
+ ##### Typestrict Methods and Type-Explicit Method Split-Up
67
+
68
+ PR: [ #244 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/244 )
69
+
70
+ - Enforced ` Buffer ` input for ` Bytes.setLengthLeft() ` , ` Bytes.setLengthRight() `
71
+ - ` Bytes.setLength() ` has been removed (alias for ` Bytes.setLengthLeft() ` )
72
+ - ` Bytes.stripZeros() ` has been removed (alias for ` Bytes.unPad() ` )
73
+ - ` Bytes.unpad ` has been split up into:
74
+ - ` Bytes.unpadBuffer() `
75
+ - ` Bytes.unpadHexString() `
76
+ - ` Bytes.unpadArray() `
77
+
78
+ #### Hash Module
79
+
80
+ ##### Typestrict Methods and Type-Explicit Method Split-Up
81
+
82
+ PR [ #247 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/247 )
83
+
84
+ The following methods are now ` Buffer ` -only:
85
+
86
+ - ` Hash.keccak() `
87
+ - ` Hash.keccak256() `
88
+ - ` Hash.sha256() `
89
+ - ` Hash.ripemd160() `
90
+
91
+ ` Hash.keccak() ` gets the following additional convenience methods:
92
+
93
+ - ` Hash.keccakFromString() `
94
+ - ` Hash.keccakFromHexString() ` (hex string enforced)
95
+ ` Hash.keccakFromArray() `
96
+
97
+ ` Hash.sha256() ` gets the following additional convenience methods:
98
+
99
+ - ` Hash.sha256FromString() `
100
+ - ` Hash.sha256FromArray() `
101
+
102
+ ` Hash.ripemd160() ` gets the following additional convenience methods:
103
+
104
+ - ` Hash.ripemd160FromString() `
105
+ - ` Hash.ripemd160FromArray() `
106
+
107
+ #### Other Breaking Changes
108
+
109
+ - Added support for Node 14,
110
+ PR [ #249 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/249 )
111
+ - Dropped support for Node ` 8 ` along
112
+ PR [ #228 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/228 )
113
+ - Updated ` BN.js ` library re-export from ` 4.x ` to ` 5.x ` ,
114
+ PR [ #249 ] , https://github.com/ethereumjs/ethereumjs-util/pull/249
115
+ - Removed ` secp2561 ` re-export (use methods provided or import directly),
116
+ PR [ #228 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/228 )
117
+
118
+ ### Cryto Library Updates: Keccak, secp2561
119
+
120
+ ` Keccak ` dependency has been updated from ` 2.1.0 ` to ` 3.0.0 ` . This version
121
+ comes with prebuilds for Linux, MacOS and Windows so most users won't need
122
+ to have ` node-gyp ` run on installation.
123
+
124
+ The version update also brings in feature compatibility with newer Node.js
125
+ versions.
126
+
127
+ The ` secp2561 ` ECDSA dependency has been updated from ` 3.0.1 ` to ` 4.0.1 ` .
128
+
129
+ ### Developer Improvements
130
+
131
+ - Refactored test suite (module split-up, headless Firefox and Chrome),
132
+ PR [ #231 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/231 )
133
+ - Moved CI from Travis to GitHub Actions,
134
+ PR [ #231 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/231 )
135
+ - Improved and updated ` TypeDoc ` API documentation,
136
+ PR [ #232 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/232 ) and
137
+ PR [ #236 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/236 )
138
+ - Basic API tests for re-exports (BN.js, RLP, ethjsUtil),
139
+ PR [ #235 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/235 )
140
+
141
+ [ 7.0.0 ] : https://github.com/ethereumjs/ethereumjs-util/compare/v6.2.0...v7.0.0
142
+
9
143
## [ 6.2.0] - 2019-11-06
10
144
11
145
This release comes with a new file structure, related functionality is now broken
0 commit comments