Skip to content

Commit 03bb3ff

Browse files
authored
Merge pull request ethereumjs#249 from ethereumjs/new-release-v700
New release v7.0.0
2 parents f86dc07 + 788d7d1 commit 03bb3ff

File tree

13 files changed

+491
-131
lines changed

13 files changed

+491
-131
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [10.x, 12.x, 13.x]
15+
node-version: [10.x, 12.x, 13.x, 14.x]
1616

1717
steps:
1818
- name: Use Node.js ${{ matrix.node-version }}

CHANGELOG.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,140 @@ 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 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+
9143
## [6.2.0] - 2019-11-06
10144

11145
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

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
* ["constants"](modules/_constants_.md)
1212
* ["externals"](modules/_externals_.md)
1313
* ["hash"](modules/_hash_.md)
14+
* ["helpers"](modules/_helpers_.md)
1415
* ["object"](modules/_object_.md)
1516
* ["signature"](modules/_signature_.md)

docs/interfaces/_signature_.ecdsasignature.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@
2020

2121
**r**: *Buffer*
2222

23-
*Defined in [signature.ts:8](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/signature.ts#L8)*
23+
*Defined in [signature.ts:9](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/signature.ts#L9)*
2424

2525
___
2626

2727
### s
2828

2929
**s**: *Buffer*
3030

31-
*Defined in [signature.ts:9](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/signature.ts#L9)*
31+
*Defined in [signature.ts:10](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/signature.ts#L10)*
3232

3333
___
3434

3535
### v
3636

3737
**v**: *number*
3838

39-
*Defined in [signature.ts:7](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/signature.ts#L7)*
39+
*Defined in [signature.ts:8](https://github.com/ethereumjs/ethereumjs-util/blob/master/src/signature.ts#L8)*

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