Skip to content
This repository was archived by the owner on Jun 17, 2021. It is now read-only.

Commit 51b258b

Browse files
committed
Added CHANGELOG entry, updated README
1 parent 873345d commit 51b258b

File tree

2 files changed

+128
-2
lines changed

2 files changed

+128
-2
lines changed

CHANGELOG.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,133 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
(modification: no type change headlines) and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

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+
9136
## [6.2.0] - 2019-11-06
10137

11138
This release comes with a new file structure, related functionality is now broken

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ assert.equal(new BN('dead', 16).add(new BN('101010', 2)), 57047)
4646
- Signing, signature validation, conversion, recovery
4747
- [externals](docs/modules/_externals_.md)
4848
- Helper methods from `ethjs-util`
49-
- Re-exports of `BN`, `rlp`, `secp256k1`
49+
- Re-exports of `BN`, `rlp`
5050

5151
### ethjs-util methods
5252

@@ -72,7 +72,6 @@ Additionally `ethereumjs-util` re-exports a few commonly-used libraries. These i
7272

7373
- `BN` ([bn.js](https://github.com/indutny/bn.js))
7474
- `rlp` ([rlp](https://github.com/ethereumjs/rlp))
75-
- `secp256k1` ([secp256k1](https://github.com/cryptocoinjs/secp256k1-node/))
7675

7776
# EthereumJS
7877

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy