@@ -6,6 +6,133 @@ 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 more a predictable, robust and
29
+ less error-prone control flow.
30
+
31
+ #### Account Module
32
+
33
+ ##### Enforced Hex Prefixing for Address Strings
34
+
35
+ PR: [ #241 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/241 )
36
+
37
+ Hex prefixing is now enforced for all address string inputs and functions
38
+ will throw if a non-hex string is provided:
39
+
40
+ - ` Account.isValidAddress() `
41
+ - ` Account.isZeroAddress() `
42
+ - ` Account.toChecksumAddress() `
43
+ - ` Account.isValidChecksumAddress() `
44
+
45
+ The ` Account.isPrecompile() ` method was removed from the code base,
46
+ PR [ #242 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/242 )
47
+
48
+ ##### Enforce Buffer Inputs for Account Methods
49
+
50
+ PR: [ #245 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/245 )
51
+
52
+ Implicit ` Buffer ` conversions for the following methods have been removed
53
+ and ` Buffer ` inputs are now enforced:
54
+
55
+ - ` Account.generateAddress() `
56
+ - ` Account.generateAddress2() `
57
+ - ` Account.pubToAddress() `
58
+ - ` AccountprivateToPublic() `
59
+ - ` AccountimportPublic() `
60
+
61
+ #### Bytes Module
62
+
63
+ ##### Typestrict Methods and Type-Explicit Method Split-Up
64
+
65
+ PR: [ #244 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/244 )
66
+
67
+ - Enforced ` Buffer ` input for ` Bytes.setLengthLeft() ` , ` Bytes.setLengthRight() `
68
+ - ` Bytes.setLength() ` has been removed (alias for ` Bytes.setLengthLeft() ` )
69
+ - ` Bytes.stripZeros() ` has been removed (alias for ` Bytes.unPad() ` )
70
+ - ` Bytes.unpad ` has been split up into:
71
+ - ` Bytes.unpadBuffer() `
72
+ - ` Bytes.unpadHexString() `
73
+ - ` Bytes.unpadArray() `
74
+
75
+ #### Hash Module
76
+
77
+ ##### Typestrict Methods and Type-Explicit Method Split-Up
78
+
79
+ PR [ #247 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/247 )
80
+
81
+ The following methods are now ` Buffer ` -only:
82
+
83
+ - ` Hash.keccak() `
84
+ - ` Hash.keccak256() `
85
+ - ` Hash.sha256() `
86
+ - ` Hash.ripemd160() `
87
+
88
+ ` Hash.keccak() ` gets the following additional convenience methods:
89
+
90
+ - ` Hash.keccakFromString() `
91
+ - ` Hash.keccakFromHexString() ` (hex string enforced)
92
+ ` Hash.keccakFromArray() `
93
+
94
+ ` Hash.sha256() ` gets the following additional convenience methods:
95
+
96
+ - ` Hash.sha256FromString() `
97
+ - ` Hash.sha256FromArray() `
98
+
99
+ ` Hash.ripemd160() ` gets the following additional convenience methods:
100
+
101
+ - ` Hash.ripemd160FromString() `
102
+ - ` Hash.ripemd160FromArray() `
103
+
104
+ #### Other Breaking Changes
105
+
106
+ - Dropped support for Node ` 8 ` along
107
+ PR [ #228 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/228 )
108
+ - Removed ` secp2561 ` re-export (use methods provided or import directly),
109
+ PR [ #228 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/228 )
110
+
111
+ ### Cryto Library Updates: Keccak, secp2561
112
+
113
+ ` Keccak ` dependency has been updated from ` 2.1.0 ` to ` 3.0.0 ` . This version
114
+ comes with prebuilds for Linux, MacOS and Windows so most users won't need
115
+ to have ` node-gyp ` run on installation.
116
+
117
+ The version update also brings in feature compatibility with newer Node.js
118
+ versions.
119
+
120
+ The ` secp2561 ` ECDSA dependency has been updated from ` 3.0.1 ` to ` 4.0.1 ` .
121
+
122
+ ### Developer Improvements
123
+
124
+ - Refactored test suite (module split-up, headless Firefox and Chrome),
125
+ PR [ #231 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/231 )
126
+ - Moved CI from Travis to GitHub Actions,
127
+ PR [ #231 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/231 )
128
+ - Improved and updated ` TypeDoc ` API documentation,
129
+ PR [ #232 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/232 ) and
130
+ PR [ #236 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/236 )
131
+ - Basic API tests for re-exports (BN.js, RLP, ethjsUtil),
132
+ PR [ #235 ] ( https://github.com/ethereumjs/ethereumjs-util/pull/235 )
133
+
134
+ [ 7.0.0 ] : https://github.com/ethereumjs/ethereumjs-util/compare/v6.2.0...v7.0.0
135
+
9
136
## [ 6.2.0] - 2019-11-06
10
137
11
138
This release comes with a new file structure, related functionality is now broken
0 commit comments